public void CreateFile() { StreamWriter writer = new StreamWriter( fileName ); writer.Write( "Hello" ); writer.Close(); handler = new CounterEventHandler(); watcher = new AssemblyWatcher(watcherDelayMs, fileName); watcher.AssemblyChangedEvent += new AssemblyWatcher.AssemblyChangedHandler( handler.OnChanged ); watcher.Start(); }
public void CreateFile() { StreamWriter writer = new StreamWriter(fileName); writer.Write("Hello"); writer.Close(); handler = new CounterEventHandler(); watcher = new AssemblyWatcher(watcherDelayMs, fileName); watcher.AssemblyChangedEvent += new AssemblyWatcher.AssemblyChangedHandler(handler.OnChanged); watcher.Start(); }
public void CreateFile() { string tempDir = Path.GetTempPath(); fileName = Path.Combine(tempDir, "temp.txt"); tempFileName = Path.Combine(tempDir, "newTempFile.txt"); StreamWriter writer = new StreamWriter( fileName ); writer.Write( "Hello" ); writer.Close(); handler = new CounterEventHandler(); watcher = new AssemblyWatcher(); watcher.Setup(watcherDelayMs, fileName); watcher.AssemblyChanged += new AssemblyChangedHandler( handler.OnChanged ); watcher.Start(); }
public void CreateFile() { if (Environment.OSVersion.Platform != System.PlatformID.Win32NT) { return; } file = new FileInfo(fileName); FileStream stream = file.Create(); stream.Close(); handler = new CounterEventHandler(); watcher = new AssemblyWatcher(watcherDelayMs, fileName); watcher.AssemblyChangedEvent += new AssemblyWatcher.AssemblyChangedHandler(handler.OnChanged); watcher.Start(); }
public void CreateFile() { string tempDir = Path.GetTempPath(); fileName = Path.Combine(tempDir, "temp.txt"); tempFileName = Path.Combine(tempDir, "newTempFile.txt"); StreamWriter writer = new StreamWriter(fileName); writer.Write("Hello"); writer.Close(); handler = new CounterEventHandler(); watcher = new AssemblyWatcher(); watcher.Setup(watcherDelayMs, fileName); watcher.AssemblyChanged += new AssemblyChangedHandler(handler.OnChanged); watcher.Start(); }