NamedOptionExtensions.GetOptionsByName<TOption> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.