7 instantiations of OptionsBuilder
Microsoft.AspNetCore.Identity (4)
IdentityCookiesBuilderExtensions.cs (4)
57
return new
OptionsBuilder
<CookieAuthenticationOptions>(builder.Services, IdentityConstants.ApplicationScheme);
72
return new
OptionsBuilder
<CookieAuthenticationOptions>(builder.Services, IdentityConstants.ExternalScheme);
90
return new
OptionsBuilder
<CookieAuthenticationOptions>(builder.Services, IdentityConstants.TwoFactorRememberMeScheme);
109
return new
OptionsBuilder
<CookieAuthenticationOptions>(builder.Services, IdentityConstants.TwoFactorUserIdScheme);
Microsoft.Extensions.Options (3)
OptionsServiceCollectionExtensions.cs (3)
50
return new
OptionsBuilder
<TOptions>(services, name ?? Options.Options.DefaultName).ValidateOnStart();
73
return new
OptionsBuilder
<TOptions>(services, name ?? Options.Options.DefaultName).ValidateOnStart();
283
return new
OptionsBuilder
<TOptions>(services, name);
101 references to OptionsBuilder
Microsoft.Analyzers.Local.Tests (1)
ApiLifecycle\ApiLifecycleAnalyzerTest.cs (1)
89
Assembly.GetAssembly(typeof(
OptionsBuilder
<>))!,
Microsoft.AspNetCore.Identity (12)
IdentityCookiesBuilder.cs (4)
17
public
OptionsBuilder
<CookieAuthenticationOptions>? ApplicationCookie { get; set; }
22
public
OptionsBuilder
<CookieAuthenticationOptions>? ExternalCookie { get; set; }
27
public
OptionsBuilder
<CookieAuthenticationOptions>? TwoFactorRememberMeCookie { get; set; }
32
public
OptionsBuilder
<CookieAuthenticationOptions>? TwoFactorUserIdCookie { get; set; }
IdentityCookiesBuilderExtensions.cs (8)
46
/// <returns>The <see cref="
OptionsBuilder
{TOptions}"/> which can be used to configure the cookie authentication.</returns>
47
public static
OptionsBuilder
<CookieAuthenticationOptions> AddApplicationCookie(this AuthenticationBuilder builder)
64
/// <returns>The <see cref="
OptionsBuilder
{TOptions}"/> which can be used to configure the cookie authentication.</returns>
65
public static
OptionsBuilder
<CookieAuthenticationOptions> AddExternalCookie(this AuthenticationBuilder builder)
79
/// <returns>The <see cref="
OptionsBuilder
{TOptions}"/> which can be used to configure the cookie authentication.</returns>
80
public static
OptionsBuilder
<CookieAuthenticationOptions> AddTwoFactorRememberMeCookie(this AuthenticationBuilder builder)
97
/// <returns>The <see cref="
OptionsBuilder
{TOptions}"/> which can be used to configure the cookie authentication.</returns>
98
public static
OptionsBuilder
<CookieAuthenticationOptions> AddTwoFactorUserIdCookie(this AuthenticationBuilder builder)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
ResourceMonitoringBuilderExtensions.cs (2)
53
Action<
OptionsBuilder
<ResourceMonitoringOptions>> configure)
55
var
optionsBuilder = builder
Microsoft.Extensions.Http.Diagnostics (2)
Logging\HttpClientLoggingHttpClientBuilderExtensions.cs (2)
80
private static IHttpClientBuilder AddExtendedHttpClientLoggingInternal(IHttpClientBuilder builder, Action<
OptionsBuilder
<LoggingOptions>>? configureOptionsBuilder = null)
82
var
optionsBuilder = builder.Services
Microsoft.Extensions.Http.Resilience (2)
Routing\RoutingStrategyBuilderExtensions.cs (2)
126
private static
OptionsBuilder
<OrderedGroupsRoutingOptions> ConfigureOrderedGroupsCore(this IRoutingStrategyBuilder builder)
138
private static
OptionsBuilder
<WeightedGroupsRoutingOptions> ConfigureWeightedGroupsCore(this IRoutingStrategyBuilder builder)
Microsoft.Extensions.Options (65)
IStartupValidator.cs (1)
10
/// Options are enabled to be validated during startup by calling <see cref="DependencyInjection.OptionsBuilderExtensions.ValidateOnStart{TOptions}(
OptionsBuilder
{TOptions})"/>.
OptionsBuilder.cs (49)
28
/// Creates a new instance of the <see cref="
OptionsBuilder
{TOptions}" /> class.
44
/// <returns>The current <see cref="
OptionsBuilder
{TOptions}"/>.</returns>
48
public virtual
OptionsBuilder
<TOptions> Configure(Action<TOptions> configureOptions)
61
/// <returns>The current <see cref="
OptionsBuilder
{TOptions}"/>.</returns>
65
public virtual
OptionsBuilder
<TOptions> Configure<TDep>(Action<TOptions, TDep> configureOptions)
81
/// <returns>The current <see cref="
OptionsBuilder
{TOptions}"/>.</returns>
85
public virtual
OptionsBuilder
<TOptions> Configure<TDep1, TDep2>(Action<TOptions, TDep1, TDep2> configureOptions)
103
/// <returns>The current <see cref="
OptionsBuilder
{TOptions}"/>.</returns>
107
public virtual
OptionsBuilder
<TOptions> Configure<TDep1, TDep2, TDep3>(Action<TOptions, TDep1, TDep2, TDep3> configureOptions)
132
/// <returns>The current <see cref="
OptionsBuilder
{TOptions}"/>.</returns>
136
public virtual
OptionsBuilder
<TOptions> Configure<TDep1, TDep2, TDep3, TDep4>(Action<TOptions, TDep1, TDep2, TDep3, TDep4> configureOptions)
164
/// <returns>The current <see cref="
OptionsBuilder
{TOptions}"/>.</returns>
168
public virtual
OptionsBuilder
<TOptions> Configure<TDep1, TDep2, TDep3, TDep4, TDep5>(Action<TOptions, TDep1, TDep2, TDep3, TDep4, TDep5> configureOptions)
193
/// <returns>The current <see cref="
OptionsBuilder
{TOptions}"/>.</returns>
197
public virtual
OptionsBuilder
<TOptions> PostConfigure(Action<TOptions> configureOptions)
210
/// <returns>The current <see cref="
OptionsBuilder
{TOptions}"/>.</returns>
214
public virtual
OptionsBuilder
<TOptions> PostConfigure<TDep>(Action<TOptions, TDep> configureOptions)
230
/// <returns>The current <see cref="
OptionsBuilder
{TOptions}"/>.</returns>
234
public virtual
OptionsBuilder
<TOptions> PostConfigure<TDep1, TDep2>(Action<TOptions, TDep1, TDep2> configureOptions)
252
/// <returns>The current <see cref="
OptionsBuilder
{TOptions}"/>.</returns>
256
public virtual
OptionsBuilder
<TOptions> PostConfigure<TDep1, TDep2, TDep3>(Action<TOptions, TDep1, TDep2, TDep3> configureOptions)
281
/// <returns>The current <see cref="
OptionsBuilder
{TOptions}"/>.</returns>
285
public virtual
OptionsBuilder
<TOptions> PostConfigure<TDep1, TDep2, TDep3, TDep4>(Action<TOptions, TDep1, TDep2, TDep3, TDep4> configureOptions)
313
/// <returns>The current <see cref="
OptionsBuilder
{TOptions}"/>.</returns>
317
public virtual
OptionsBuilder
<TOptions> PostConfigure<TDep1, TDep2, TDep3, TDep4, TDep5>(Action<TOptions, TDep1, TDep2, TDep3, TDep4, TDep5> configureOptions)
342
/// <returns>The current <see cref="
OptionsBuilder
{TOptions}"/>.</returns>
343
public virtual
OptionsBuilder
<TOptions> Validate(Func<TOptions, bool> validation)
351
/// <returns>The current <see cref="
OptionsBuilder
{TOptions}"/>.</returns>
352
public virtual
OptionsBuilder
<TOptions> Validate(Func<TOptions, bool> validation, string failureMessage)
365
/// <returns>The current <see cref="
OptionsBuilder
{TOptions}"/>.</returns>
366
public virtual
OptionsBuilder
<TOptions> Validate<TDep>(Func<TOptions, TDep, bool> validation) where TDep : notnull
375
/// <returns>The current <see cref="
OptionsBuilder
{TOptions}"/>.</returns>
376
public virtual
OptionsBuilder
<TOptions> Validate<TDep>(Func<TOptions, TDep, bool> validation, string failureMessage) where TDep : notnull
391
/// <returns>The current <see cref="
OptionsBuilder
{TOptions}"/>.</returns>
392
public virtual
OptionsBuilder
<TOptions> Validate<TDep1, TDep2>(Func<TOptions, TDep1, TDep2, bool> validation)
404
/// <returns>The current <see cref="
OptionsBuilder
{TOptions}"/>.</returns>
405
public virtual
OptionsBuilder
<TOptions> Validate<TDep1, TDep2>(Func<TOptions, TDep1, TDep2, bool> validation, string failureMessage)
427
/// <returns>The current <see cref="
OptionsBuilder
{TOptions}"/>.</returns>
428
public virtual
OptionsBuilder
<TOptions> Validate<TDep1, TDep2, TDep3>(Func<TOptions, TDep1, TDep2, TDep3, bool> validation)
442
/// <returns>The current <see cref="
OptionsBuilder
{TOptions}"/>.</returns>
443
public virtual
OptionsBuilder
<TOptions> Validate<TDep1, TDep2, TDep3>(Func<TOptions, TDep1, TDep2, TDep3, bool> validation, string failureMessage)
468
/// <returns>The current <see cref="
OptionsBuilder
{TOptions}"/>.</returns>
469
public virtual
OptionsBuilder
<TOptions> Validate<TDep1, TDep2, TDep3, TDep4>(Func<TOptions, TDep1, TDep2, TDep3, TDep4, bool> validation)
485
/// <returns>The current <see cref="
OptionsBuilder
{TOptions}"/>.</returns>
486
public virtual
OptionsBuilder
<TOptions> Validate<TDep1, TDep2, TDep3, TDep4>(Func<TOptions, TDep1, TDep2, TDep3, TDep4, bool> validation, string failureMessage)
514
/// <returns>The current <see cref="
OptionsBuilder
{TOptions}"/>.</returns>
515
public virtual
OptionsBuilder
<TOptions> Validate<TDep1, TDep2, TDep3, TDep4, TDep5>(Func<TOptions, TDep1, TDep2, TDep3, TDep4, TDep5, bool> validation)
533
/// <returns>The current <see cref="
OptionsBuilder
{TOptions}"/>.</returns>
534
public virtual
OptionsBuilder
<TOptions> Validate<TDep1, TDep2, TDep3, TDep4, TDep5>(Func<TOptions, TDep1, TDep2, TDep3, TDep4, TDep5, bool> validation, string failureMessage)
OptionsBuilderExtensions.cs (5)
12
/// Extension methods for adding configuration-related options services to the DI container via <see cref="
OptionsBuilder
{TOptions}"/>.
22
/// <param name="optionsBuilder">The <see cref="
OptionsBuilder
{TOptions}"/> to configure options instance.</param>
23
/// <returns>The <see cref="
OptionsBuilder
{TOptions}"/> so that additional calls can be chained.</returns>
24
public static
OptionsBuilder
<TOptions> ValidateOnStart<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] TOptions>(this
OptionsBuilder
<TOptions> optionsBuilder)
OptionsServiceCollectionExtensions.cs (10)
38
/// The <see cref="OptionsBuilderExtensions.ValidateOnStart{TOptions}(
OptionsBuilder
{TOptions})"/> extension is called by this method.
43
/// <returns>The <see cref="
OptionsBuilder
{TOptions}"/> so that configure calls can be chained in it.</returns>
44
public static
OptionsBuilder
<TOptions> AddOptionsWithValidateOnStart<
57
/// The <see cref="OptionsBuilderExtensions.ValidateOnStart{TOptions}(
OptionsBuilder
{TOptions})"/> extension is called by this method.
63
/// <returns>The <see cref="
OptionsBuilder
{TOptions}"/> so that configure calls can be chained in it.</returns>
64
public static
OptionsBuilder
<TOptions> AddOptionsWithValidateOnStart<
266
/// <returns>The <see cref="
OptionsBuilder
{TOptions}"/> so that configure calls can be chained in it.</returns>
267
public static
OptionsBuilder
<TOptions> AddOptions<TOptions>(this IServiceCollection services) where TOptions : class
276
/// <returns>The <see cref="
OptionsBuilder
{TOptions}"/> so that configure calls can be chained in it.</returns>
277
public static
OptionsBuilder
<TOptions> AddOptions<TOptions>(this IServiceCollection services, string? name)
Microsoft.Extensions.Options.ConfigurationExtensions (11)
OptionsBuilderConfigurationExtensions.cs (11)
12
/// Extension methods for adding configuration related options services to the DI container via <see cref="
OptionsBuilder
{TOptions}"/>.
25
/// <returns>The <see cref="
OptionsBuilder
{TOptions}"/> so that additional calls can be chained.</returns>
28
public static
OptionsBuilder
<TOptions> Bind<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TOptions>(this
OptionsBuilder
<TOptions> optionsBuilder, IConfiguration config) where TOptions : class
38
/// <returns>The <see cref="
OptionsBuilder
{TOptions}"/> so that additional calls can be chained.</returns>
41
public static
OptionsBuilder
<TOptions> Bind<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TOptions>(this
OptionsBuilder
<TOptions> optionsBuilder, IConfiguration config, Action<BinderOptions>? configureBinder) where TOptions : class
57
/// <returns>The <see cref="
OptionsBuilder
{TOptions}"/> so that additional calls can be chained.</returns>
61
/// <seealso cref="Bind{TOptions}(
OptionsBuilder
{TOptions}, IConfiguration, Action{BinderOptions})"/>
64
public static
OptionsBuilder
<TOptions> BindConfiguration<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TOptions>(
65
this
OptionsBuilder
<TOptions> optionsBuilder,
Microsoft.Extensions.Options.DataAnnotations (4)
OptionsBuilderDataAnnotationsExtensions.cs (4)
10
/// Extension methods for adding configuration related options services to the DI container via <see cref="
OptionsBuilder
{TOptions}"/>.
19
/// <returns>The <see cref="
OptionsBuilder
{TOptions}"/> so that additional calls can be chained.</returns>
22
public static
OptionsBuilder
<TOptions> ValidateDataAnnotations<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] TOptions>(this
OptionsBuilder
<TOptions> optionsBuilder) where TOptions : class
Microsoft.Extensions.ServiceDiscovery.Dns (2)
ServiceDiscoveryDnsServiceCollectionExtensions.cs (2)
51
var
options = services.AddOptions<DnsSrvServiceEndpointProviderOptions>();
87
var
options = services.AddOptions<DnsServiceEndpointProviderOptions>();