7 instantiations of OptionsBuilder
Microsoft.AspNetCore.Identity (4)
IdentityCookiesBuilderExtensions.cs (4)
57return new OptionsBuilder<CookieAuthenticationOptions>(builder.Services, IdentityConstants.ApplicationScheme); 72return new OptionsBuilder<CookieAuthenticationOptions>(builder.Services, IdentityConstants.ExternalScheme); 90return new OptionsBuilder<CookieAuthenticationOptions>(builder.Services, IdentityConstants.TwoFactorRememberMeScheme); 109return new OptionsBuilder<CookieAuthenticationOptions>(builder.Services, IdentityConstants.TwoFactorUserIdScheme);
Microsoft.Extensions.Options (3)
OptionsServiceCollectionExtensions.cs (3)
50return new OptionsBuilder<TOptions>(services, name ?? Options.Options.DefaultName).ValidateOnStart(); 73return new OptionsBuilder<TOptions>(services, name ?? Options.Options.DefaultName).ValidateOnStart(); 283return new OptionsBuilder<TOptions>(services, name);
101 references to OptionsBuilder
Microsoft.Analyzers.Local.Tests (1)
ApiLifecycle\ApiLifecycleAnalyzerTest.cs (1)
89Assembly.GetAssembly(typeof(OptionsBuilder<>))!,
Microsoft.AspNetCore.Identity (12)
IdentityCookiesBuilder.cs (4)
17public OptionsBuilder<CookieAuthenticationOptions>? ApplicationCookie { get; set; } 22public OptionsBuilder<CookieAuthenticationOptions>? ExternalCookie { get; set; } 27public OptionsBuilder<CookieAuthenticationOptions>? TwoFactorRememberMeCookie { get; set; } 32public 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> 47public static OptionsBuilder<CookieAuthenticationOptions> AddApplicationCookie(this AuthenticationBuilder builder) 64/// <returns>The <see cref="OptionsBuilder{TOptions}"/> which can be used to configure the cookie authentication.</returns> 65public static OptionsBuilder<CookieAuthenticationOptions> AddExternalCookie(this AuthenticationBuilder builder) 79/// <returns>The <see cref="OptionsBuilder{TOptions}"/> which can be used to configure the cookie authentication.</returns> 80public static OptionsBuilder<CookieAuthenticationOptions> AddTwoFactorRememberMeCookie(this AuthenticationBuilder builder) 97/// <returns>The <see cref="OptionsBuilder{TOptions}"/> which can be used to configure the cookie authentication.</returns> 98public static OptionsBuilder<CookieAuthenticationOptions> AddTwoFactorUserIdCookie(this AuthenticationBuilder builder)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
ResourceMonitoringBuilderExtensions.cs (2)
53Action<OptionsBuilder<ResourceMonitoringOptions>> configure) 55var optionsBuilder = builder
Microsoft.Extensions.Http.Diagnostics (2)
Logging\HttpClientLoggingHttpClientBuilderExtensions.cs (2)
80private static IHttpClientBuilder AddExtendedHttpClientLoggingInternal(IHttpClientBuilder builder, Action<OptionsBuilder<LoggingOptions>>? configureOptionsBuilder = null) 82var optionsBuilder = builder.Services
Microsoft.Extensions.Http.Resilience (2)
Routing\RoutingStrategyBuilderExtensions.cs (2)
126private static OptionsBuilder<OrderedGroupsRoutingOptions> ConfigureOrderedGroupsCore(this IRoutingStrategyBuilder builder) 138private 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> 48public virtual OptionsBuilder<TOptions> Configure(Action<TOptions> configureOptions) 61/// <returns>The current <see cref="OptionsBuilder{TOptions}"/>.</returns> 65public virtual OptionsBuilder<TOptions> Configure<TDep>(Action<TOptions, TDep> configureOptions) 81/// <returns>The current <see cref="OptionsBuilder{TOptions}"/>.</returns> 85public virtual OptionsBuilder<TOptions> Configure<TDep1, TDep2>(Action<TOptions, TDep1, TDep2> configureOptions) 103/// <returns>The current <see cref="OptionsBuilder{TOptions}"/>.</returns> 107public virtual OptionsBuilder<TOptions> Configure<TDep1, TDep2, TDep3>(Action<TOptions, TDep1, TDep2, TDep3> configureOptions) 132/// <returns>The current <see cref="OptionsBuilder{TOptions}"/>.</returns> 136public virtual OptionsBuilder<TOptions> Configure<TDep1, TDep2, TDep3, TDep4>(Action<TOptions, TDep1, TDep2, TDep3, TDep4> configureOptions) 164/// <returns>The current <see cref="OptionsBuilder{TOptions}"/>.</returns> 168public 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> 197public virtual OptionsBuilder<TOptions> PostConfigure(Action<TOptions> configureOptions) 210/// <returns>The current <see cref="OptionsBuilder{TOptions}"/>.</returns> 214public virtual OptionsBuilder<TOptions> PostConfigure<TDep>(Action<TOptions, TDep> configureOptions) 230/// <returns>The current <see cref="OptionsBuilder{TOptions}"/>.</returns> 234public virtual OptionsBuilder<TOptions> PostConfigure<TDep1, TDep2>(Action<TOptions, TDep1, TDep2> configureOptions) 252/// <returns>The current <see cref="OptionsBuilder{TOptions}"/>.</returns> 256public virtual OptionsBuilder<TOptions> PostConfigure<TDep1, TDep2, TDep3>(Action<TOptions, TDep1, TDep2, TDep3> configureOptions) 281/// <returns>The current <see cref="OptionsBuilder{TOptions}"/>.</returns> 285public virtual OptionsBuilder<TOptions> PostConfigure<TDep1, TDep2, TDep3, TDep4>(Action<TOptions, TDep1, TDep2, TDep3, TDep4> configureOptions) 313/// <returns>The current <see cref="OptionsBuilder{TOptions}"/>.</returns> 317public 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> 343public virtual OptionsBuilder<TOptions> Validate(Func<TOptions, bool> validation) 351/// <returns>The current <see cref="OptionsBuilder{TOptions}"/>.</returns> 352public virtual OptionsBuilder<TOptions> Validate(Func<TOptions, bool> validation, string failureMessage) 365/// <returns>The current <see cref="OptionsBuilder{TOptions}"/>.</returns> 366public virtual OptionsBuilder<TOptions> Validate<TDep>(Func<TOptions, TDep, bool> validation) where TDep : notnull 375/// <returns>The current <see cref="OptionsBuilder{TOptions}"/>.</returns> 376public virtual OptionsBuilder<TOptions> Validate<TDep>(Func<TOptions, TDep, bool> validation, string failureMessage) where TDep : notnull 391/// <returns>The current <see cref="OptionsBuilder{TOptions}"/>.</returns> 392public virtual OptionsBuilder<TOptions> Validate<TDep1, TDep2>(Func<TOptions, TDep1, TDep2, bool> validation) 404/// <returns>The current <see cref="OptionsBuilder{TOptions}"/>.</returns> 405public virtual OptionsBuilder<TOptions> Validate<TDep1, TDep2>(Func<TOptions, TDep1, TDep2, bool> validation, string failureMessage) 427/// <returns>The current <see cref="OptionsBuilder{TOptions}"/>.</returns> 428public virtual OptionsBuilder<TOptions> Validate<TDep1, TDep2, TDep3>(Func<TOptions, TDep1, TDep2, TDep3, bool> validation) 442/// <returns>The current <see cref="OptionsBuilder{TOptions}"/>.</returns> 443public 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> 469public 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> 486public 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> 515public 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> 534public 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> 24public 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> 44public 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> 64public static OptionsBuilder<TOptions> AddOptionsWithValidateOnStart< 266/// <returns>The <see cref="OptionsBuilder{TOptions}"/> so that configure calls can be chained in it.</returns> 267public 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> 277public 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> 28public 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> 41public 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})"/> 64public static OptionsBuilder<TOptions> BindConfiguration<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TOptions>( 65this 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> 22public 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)
51var options = services.AddOptions<DnsSrvServiceEndpointProviderOptions>(); 87var options = services.AddOptions<DnsServiceEndpointProviderOptions>();