Exemplo n.º 1
0
        /// <inheritdoc />
        public IHealthBuilder Configure(IEnumerable <KeyValuePair <string, string> > optionValues)
        {
            if (optionValues == null)
            {
                throw new ArgumentNullException(nameof(optionValues));
            }

            var mergedOptions = new KeyValuePairHealthOptions(_options, optionValues).AsOptions();

            _setupAction(mergedOptions);

            _options = mergedOptions;

            return(Builder);
        }
Exemplo n.º 2
0
        /// <inheritdoc />
        public IHealthBuilder Extend(HealthOptions options)
        {
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            var optionsValuesToExtend = options.ToKeyValue();
            var extendedOptions       = new KeyValuePairHealthOptions(_options, optionsValuesToExtend).AsOptions();

            _setupAction(extendedOptions);

            _options = extendedOptions;

            return(Builder);
        }