IFeatureCollection Interface

Definition

Represents a collection of HTTP features.

C#
public interface IFeatureCollection : System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<Type,object>>
Derived
Implements

Properties

IsReadOnly

Indicates if the collection can be modified.

Item[Type]

Gets or sets a given feature. Setting a null value removes the feature.

Revision

Incremented for each modification and can be used to verify cached results.

Methods

Get<TFeature>()

Retrieves the requested feature from the collection.

Set<TFeature>(TFeature)

Sets the given feature in the collection.

Extension Methods

GetRequiredFeature(IFeatureCollection, Type)

Retrieves the requested feature from the collection. Throws an InvalidOperationException if the feature is not present.

GetRequiredFeature<TFeature>(IFeatureCollection)

Retrieves the requested feature from the collection. Throws an InvalidOperationException if the feature is not present.

Applies to

Product Versions
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0