private void HandleModification(object sender, ModificationEventArgs args)
        {
            if (args == null)
            {
                throw new ArgumentNullException("args");
            }

            switch (args.Type)
            {
            case ModificationType.Added:
                WriteColored(ConsoleColor.Green, "ADDED:   ");
                break;

            case ModificationType.Removed:
                WriteColored(ConsoleColor.Red, "REMOVED: ");
                break;

            case ModificationType.Changed:
                WriteColored(ConsoleColor.Yellow, "CHANGED: ");
                break;

            default:
                break;
            }
            Console.WriteLine(args.Path);
        }
 protected void OnModification(ModificationEventArgs args)
 {
     var handler = Modification;
     if (handler != null)
     {
         handler(this, args);
     }
 }
Exemple #3
0
        protected void OnModification(ModificationEventArgs args)
        {
            var handler = Modification;

            if (handler != null)
            {
                handler(this, args);
            }
        }
        private void HandleModification(object sender, ModificationEventArgs args)
        {
            if (args == null)
            {
                throw new ArgumentNullException("args");
            }

            switch (args.Type)
            {
                case ModificationType.Added:
                    WriteColored(ConsoleColor.Green, "ADDED:   ");
                    break;
                case ModificationType.Removed:
                    WriteColored(ConsoleColor.Red,   "REMOVED: ");
                    break;
                case ModificationType.Changed:
                    WriteColored(ConsoleColor.Yellow, "CHANGED: ");
                    break;
                default:
                    break;
            }
            Console.WriteLine(args.Path);
        }