Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
        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 FileWatcher(fileName, watcherDelayMs);
            watcher.Changed += new FileChangedHandler(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 FileWatcher(fileName, watcherDelayMs);
            watcher.Changed += new FileChangedHandler(handler.OnChanged);
            watcher.Start();
        }