コード例 #1
0
        }         // proc OnBeginReadConfiguration

        protected override void OnEndReadConfiguration(IDEConfigLoading config)
        {
            base.OnEndReadConfiguration(config);

            ReadLastTimeStamp();

            // reset the parameters
            fileSystemWatcher.Path   = Config.GetAttribute("path", null);
            fileSystemWatcher.Filter = Config.GetAttribute("filter", "*.*");
            fileSystemWatcher.IncludeSubdirectories = Config.GetAttribute("recursive", false);

            notifyMethod = Config.GetAttribute <NotifyMethod>("method", NotifyMethod.None);

            switch (notifyMethod)
            {
            case NotifyMethod.ArchiveBit:
                fileSystemWatcher.NotifyFilter = NotifyFilters.Attributes | NotifyFilters.FileName;
                break;

            case NotifyMethod.TimeStamp:
                fileSystemWatcher.NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.FileName;
                break;

            default:
                fileSystemWatcher.NotifyFilter = NotifyFilters.Attributes | NotifyFilters.LastWrite | NotifyFilters.FileName;
                break;
            }

            // run
            Server.Queue.RegisterIdle(notifyCheck);
            fileSystemWatcher.EnableRaisingEvents = true;
        }         // proc OnEndReadConfiguration
コード例 #2
0
ファイル: Observer.cs プロジェクト: ly774508966/unity-puremvc
 public virtual void NotifyObserver(INotification <T> Notification)
 {
     NotifyMethod.Invoke(Notification);
 }
コード例 #3
0
ファイル: Action.cs プロジェクト: makicombi/autowebagent
 public NotifyAction(NotifyMethod method, awaDAL.DAL dal, WatiN.Core.IE ie, SiteObject target)
     : base(dal, ie, target)
 {
     this.notifyMethod = method;
 }