EndpointMetadataCollection Class

Definition

A collection of arbitrary metadata associated with an endpoint.

C#
public sealed class EndpointMetadataCollection : System.Collections.Generic.IEnumerable<object>, System.Collections.Generic.IReadOnlyCollection<object>, System.Collections.Generic.IReadOnlyList<object>
Inheritance
EndpointMetadataCollection
Implements

Remarks

EndpointMetadataCollection instances contain a list of metadata items of arbitrary types. The metadata items are stored as an ordered collection with items arranged in ascending order of precedence.

Constructors

Fields

Properties

Count

Gets the count of metadata items.

Item[Int32]

Gets the item at index.

Methods

GetEnumerator()

Gets an IEnumerator of all metadata items.

GetMetadata<T>()

Gets the most significant metadata item of type T.

GetOrderedMetadata<T>()

Gets the metadata items of type T in ascending order of precedence.

GetRequiredMetadata<T>()

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

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Gets an IEnumerator of all metadata items.

IEnumerable<Object>.GetEnumerator()

Gets an IEnumerator<T> of all metadata items.

Applies to

Product Versions
ASP.NET Core 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0