Exemple #1
0
 public static void Dispose()
 {
     if (runner != null)
     {
         runner.Kill();
         runner = null;
     }
 }
Exemple #2
0
        public static void Initialize(string file)
        {
            if (File.Exists(file))
                File.Delete(file);

            Pipe = new ConcurrentQueue<string>();

            runner = new Lumbermill(new StreamWriter(file, true));
            runner.Begin();

            string year = DateTime.Now.ToString("yyyy");
            string monthDay = DateTime.Now.ToString("MMdd");

            Write(string.Format("Captain's log, USS Enterprise (NCC-{0}-D), {1}", year, monthDay));
        }