コード例 #1
0
        protected RedisWatcher(string name, RedisWatcherConfiguration configuration)
        {
            if (string.IsNullOrEmpty(name))
            {
                throw new ArgumentException("Watcher name can not be empty.");
            }

            if (configuration == null)
            {
                throw new ArgumentNullException(nameof(configuration),
                                                "Redis Watcher configuration has not been provided.");
            }

            Name           = name;
            _configuration = configuration;
            _connection    = _configuration.ConnectionProvider(_configuration.ConnectionString);
        }