Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

IFeatureCollection Interface

Definition

Namespace:
Microsoft.AspNetCore.Http.Features
Assembly:
Microsoft.AspNetCore.Http.Features.dll
Assembly:
Microsoft.Extensions.Features.dll
Package:
Microsoft.AspNetCore.Http.Features v1.0.0
Package:
Microsoft.AspNetCore.Http.Features v1.1.0
Package:
Microsoft.Extensions.Features v10.0.0
Package:
Microsoft.Extensions.Features v11.0.0-preview.4.26230.115
Package:
Microsoft.AspNetCore.Http.Features v2.0.0
Package:
Microsoft.AspNetCore.Http.Features v2.1.0
Package:
Microsoft.AspNetCore.Http.Features v2.2.0
Package:
Microsoft.AspNetCore.Http.Features v3.0.3
Package:
Microsoft.AspNetCore.Http.Features v3.1.18
Package:
Microsoft.AspNetCore.Http.Features v5.0.9
Package:
Microsoft.Extensions.Features v6.0.6
Package:
Microsoft.Extensions.Features v7.0.5
Package:
Microsoft.Extensions.Features v8.0.19
Package:
Microsoft.Extensions.Features v9.0.8
Source:
IFeatureCollection.cs
Source:
IFeatureCollection.cs
Source:
IFeatureCollection.cs
Source:
IFeatureCollection.cs
Source:
IFeatureCollection.cs
Source:
IFeatureCollection.cs

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.

Represents a collection of HTTP features.

public interface class IFeatureCollection : System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<Type ^, System::Object ^>>
public interface IFeatureCollection : System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<Type,object>>
type IFeatureCollection = interface
 interface seq<KeyValuePair<Type, obj>>
 interface IEnumerable
Public Interface IFeatureCollection
Implements IEnumerable(Of KeyValuePair(Of Type, Object))
Derived
Implements

Properties

Name Description
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

Name Description
Get<TFeature>()

Retrieves the requested feature from the collection.

Set<TFeature>(TFeature)

Sets the given feature in the collection.

Extension Methods

Name Description
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


Feedback

Was this page helpful?