How to Use

/// Range: 1 - 100
/// Labels: Default
/// Output: Console
Lib.FB.Run(1, 100);
/// Range: -100 - 100
/// Labels: Default
/// Output: Console
Lib.FB.Run(-100, 100);
/// Range: 1 - 100
/// Labels: Custom
/// Output: Console
Lib.FB.Run(1, 100, "Works?", "For real!");
/// Range: 1 - 100
/// Labels: Default
/// Output: Log file
///config trace settings
  <system.diagnostics>
    <trace autoflush="true">
      <listeners>
        <add name="LogFile" type="System.Diagnostics.TextWriterTraceListener"
          initializeData="trace.log" />
      </listeners>
    </trace>
  </system.diagnostics>

Lib.FB.Run(Trace.Listeners["LogFile"], 1, 100);
/// Range: 1 - 100
/// Labels: Default
/// Output: string collection
var values = new List<string>();
Lib.FB.Run(values, 1, 100);
System.Console.WriteLine("Number of items in collection: {0}", values.Count());
values.ForEach(value => System.Console.WriteLine(value));
/// Range: 1 - 100
/// Labels: Default
/// Output: String Writer 
var sb = new StringBuilder();
var writer = new StringWriter(sb);
Lib.FB.Run(writer, 1, 100);
var values = sb.ToString();
System.Console.Write(values);
/// Range: 1 - 100
/// Labels: Default
/// Output: Stream, Unicode 
using (var stream = new MemoryStream())
{
      Lib.FB.Run(stream, Encoding.Unicode, 1, 100);
      stream.Position = 0;
      using (var reader = new StreamReader(stream, Encoding.Unicode))
       {
             var values = reader.ReadToEnd();
             System.Console.WriteLine("MemoryStream size: {0} bytes", stream.Length);
             System.Console.Write(values);
      }
}
/// Range: 1 - 100
/// Labels: Default
/// Output: FBWriter, Console
var writer = new FBWriter();
Lib.FB.Run(writer, 1, 100);
var values = writer.ReadAll();
System.Console.WriteLine("FBWriter size: {0} chars", values.Length);
System.Console.Write(values);

Last edited Jun 6, 2012 at 11:45 PM by cesarhq, version 10

Comments

No comments yet.