コード例 #1
0
        public IUriHealthCheckBuilder Add(UriOptionsSetup optionsSetup)
        {
            if (optionsSetup == null)
            {
                throw new ArgumentNullException(nameof(optionsSetup));
            }

            Services.Configure <UriHealthCheckOptions>(CheckName, option =>
            {
                option.UriOptions.Add(optionsSetup);
            });
            return(this);
        }
コード例 #2
0
        public IUriHealthCheckBuilder Add(Action <UriOptionsSetup> action)
        {
            if (action == null)
            {
                throw new ArgumentNullException(nameof(action));
            }

            var option = new UriOptionsSetup();

            action(option);

            Services.Configure <UriHealthCheckOptions>(CheckName, options =>
            {
                options.UriOptions.Add(option);
            });

            return(this);
        }