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.​Features.​FeatureCollectionExtensions
Assembly: Microsoft.Extensions.Features
Inheritance: object → FeatureCollectionExtensions
Extension methods for getting feature from <see cref="T:Microsoft.AspNetCore.Http.Features.IFeatureCollection" />
Methods
public static
TFeature
GetRequiredFeature​(IFeatureCollection featureCollection)
Retrieves the requested feature from the collection.
Throws an <see cref="T:System.InvalidOperationException" /> if the feature is not present.
Returns The requested feature.
featureCollection
The <see cref="T:Microsoft.AspNetCore.Http.Features.IFeatureCollection" /> .
public static
object
GetRequiredFeature​(IFeatureCollection featureCollection,
System.​Type key)
Retrieves the requested feature from the collection.
Throws an <see cref="T:System.InvalidOperationException" /> if the feature is not present.
Returns The requested feature.
featureCollection
feature collection
key
The feature key.
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