Edit

Share via


NamedOptionExtensions.GetOptionsByName<TOption> Method

Definition

Gets a named options instance.

public static TOption GetOptionsByName<TOption> (this IServiceProvider services, string name) where TOption : class, new();
static member GetOptionsByName : IServiceProvider * string -> 'Option (requires 'Option : null and 'Option : (new : unit -> 'Option))
<Extension()>
Public Function GetOptionsByName(Of TOption As {Class, New}) (services As IServiceProvider, name As String) As TOption

Type Parameters

TOption

The type of the t option.

Parameters

services
IServiceProvider

The services.

name
String

The name.

Returns

TOption

TOption.

Applies to