/// <summary> ///- /// </summary> /// <param name="state"> /// Represent the call context of the SqlMap or DaoManager ConfigureAndWatch method call. /// </param> /// <param name="onWhatchedFileChange"></param> public ConfigWatcherHandler(TimerCallback onWhatchedFileChange, StateConfig state) { for(int index = 0; index < _filesToWatch.Count; index++) { FileInfo configFile = (FileInfo)_filesToWatch[index]; AttachWatcher(configFile); // Create the timer that will be used to deliver events. Set as disabled // callback : A TimerCallback delegate representing a method to be executed. // state : An object containing information to be used by the callback method, or a null reference // dueTime : The amount of time to delay before callback is invoked, in milliseconds. Specify Timeout.Infinite to prevent the timer from starting. Specify zero (0) to start the timer immediately // period : The time interval between invocations of callback, in milliseconds. Specify Timeout.Infinite to disable periodic signaling _timer = new Timer(onWhatchedFileChange, state, Timeout.Infinite, Timeout.Infinite); } }