BlueCollar.Service.Service.CreateWatcher C# (CSharp) Method

CreateWatcher() private method

Creates the Diagnostics.FileSystemWatcher to watch for configuration changes.
private CreateWatcher ( ) : void
return void
        private void CreateWatcher()
        {
            this.DestroyWatcher();

            this.watcher = new BlueCollar.FileSystemWatcher(Path.GetDirectoryName(BlueCollarServiceSection.Section.ElementInformation.Source), Path.GetFileName(BlueCollarServiceSection.Section.ElementInformation.Source));
            this.watcher.Operation += new FileSystemEventHandler(this.WatcherOperation);
            this.watcher.Mode = FileSystemWatcherMode.IndividualFiles;
            this.watcher.Threshold = 1000;
            this.watcher.EnableRaisingEvents = true;
        }