Exemplo n.º 1
0
        public ConfigWatcher(IConfig config)
        {
            Config = Guard.NotNull(nameof(config), config);
            config.AssertFilePathSet();

            _running = 0;
            Stop     = new CancellationTokenSource();
        }
Exemplo n.º 2
0
 public ConfigWatcher(TimeSpan period, IConfig config, Action executeWhenChanged) : base(period)
 {
     Config             = Guard.NotNull(nameof(config), config);
     ExecuteWhenChanged = Guard.NotNull(nameof(executeWhenChanged), executeWhenChanged);
     config.AssertFilePathSet();
 }
Exemplo n.º 3
0
 public ConfigWatcher(TimeSpan period, IConfig config, Func <Task> executeWhenChangedAsync) : base(period)
 {
     Config = Guard.NotNull(nameof(config), config);
     ExecuteWhenChangedAsync = Guard.NotNull(nameof(executeWhenChangedAsync), executeWhenChangedAsync);
     config.AssertFilePathSet();
 }