FeatureCollectionExtensions.GetRequiredFeature 方法

定义

重载

GetRequiredFeature(IFeatureCollection, Type)

从集合中检索请求的功能。 如果功能不存在,则引发 InvalidOperationException

GetRequiredFeature<TFeature>(IFeatureCollection)

从集合中检索请求的功能。 如果功能不存在,则引发 InvalidOperationException

GetRequiredFeature(IFeatureCollection, Type)

Source:
FeatureCollectionExtensions.cs
Source:
FeatureCollectionExtensions.cs
Source:
FeatureCollectionExtensions.cs

从集合中检索请求的功能。 如果功能不存在,则引发 InvalidOperationException

public static object GetRequiredFeature (this Microsoft.AspNetCore.Http.Features.IFeatureCollection featureCollection, Type key);
static member GetRequiredFeature : Microsoft.AspNetCore.Http.Features.IFeatureCollection * Type -> obj
<Extension()>
Public Function GetRequiredFeature (featureCollection As IFeatureCollection, key As Type) As Object

参数

featureCollection
IFeatureCollection

功能集合

key
Type

功能键。

返回

请求的功能。

适用于

GetRequiredFeature<TFeature>(IFeatureCollection)

Source:
FeatureCollectionExtensions.cs
Source:
FeatureCollectionExtensions.cs
Source:
FeatureCollectionExtensions.cs

从集合中检索请求的功能。 如果功能不存在,则引发 InvalidOperationException

public static TFeature GetRequiredFeature<TFeature> (this Microsoft.AspNetCore.Http.Features.IFeatureCollection featureCollection);
static member GetRequiredFeature : Microsoft.AspNetCore.Http.Features.IFeatureCollection -> 'Feature
<Extension()>
Public Function GetRequiredFeature(Of TFeature) (featureCollection As IFeatureCollection) As TFeature

类型参数

TFeature

功能键。

参数

featureCollection
IFeatureCollection

IFeatureCollection

返回

TFeature

请求的功能。

适用于