EndpointMetadataCollection.GetRequiredMetadata<T> Method

Definition

Gets the most significant metadata item of type T. Throws an InvalidOperationException if the metadata is not found.

public T GetRequiredMetadata<T> () where T : class;
member this.GetRequiredMetadata : unit -> 'T (requires 'T : null)
Public Function GetRequiredMetadata(Of T As Class) () As T

Type Parameters

T

The type of metadata to retrieve.

Returns

T

The most significant metadata of type T.

Applies to