Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class Microsoft.​AspNetCore.​Http.​EndpointMetadataCollection
Assembly: Microsoft.AspNetCore.Http.Abstractions
Inheritance: object → EndpointMetadataCollection
Implemented Interfaces
- System.​Collections.​Generic.​IReadOnlyList`1 (Inherits: IEnumerable<​object>IEnumerableIReadOnlyCollection<​object>)
A collection of arbitrary metadata associated with an endpoint.
Remarks
<see cref="T:Microsoft.AspNetCore.Http.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.
Fields and Constants
public static readonly
EndpointMetadataCollection
Empty
An empty <see cref="T:Microsoft.AspNetCore.Http.EndpointMetadataCollection" /> .
Properties
public
object
Item
public
int
Count
Gets the count of metadata items.
Methods
public
T
GetMetadata​()
Gets the most significant metadata item of type <typeparamref name="T" /> .
Returns The most significant metadata of type <typeparamref name="T" /> or <c>null</c> .
public
System.​Collections.​Generic.​IReadOnlyList<​T>
GetOrderedMetadata​()
Gets the metadata items of type <typeparamref name="T" /> in ascending
order of precedence.
Returns A sequence of metadata items of <typeparamref name="T" /> .
public
T
GetRequiredMetadata​()
Gets the most significant metadata item of type <typeparamref name="T" /> .
Throws an <see cref="T:System.InvalidOperationException" /> if the metadata is not found.
Returns The most significant metadata of type <typeparamref name="T" /> .
public
Enumerator
GetEnumerator​()
Gets an <see cref="T:System.Collections.IEnumerator" /> of all metadata items.
Returns An <see cref="T:System.Collections.IEnumerator" /> of all metadata items.
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object