예제 #1
0
 public void ConstructorSuccessTest()
 {
     using (var watcher = new MacWatcher(localFolder.FullName, queue.Object))
     {
         Assert.False(watcher.EnableEvents);
     }
 }
예제 #2
0
        static void Main(string[] args)
        {
            var networkWatcher = new MacWatcher();

            networkWatcher.MacConnected    += new EventHandler <KeyValuePair <string, string> >(networkWatcher_MacConnected);
            networkWatcher.MacDisconnected += new EventHandler <KeyValuePair <string, string> >(networkWatcher_MacDisconnected);
            networkWatcher.WatchNetwork();
            Console.ReadKey();
        }