共用方式為


FeatureCollectionExtensions.GetRequiredFeature 方法

定義

多載

GetRequiredFeature(IFeatureCollection, Type)

從集合擷取要求的功能。 如果功能不存在,則會擲回 InvalidOperationException

GetRequiredFeature<TFeature>(IFeatureCollection)

從集合擷取要求的功能。 如果功能不存在,則會擲回 InvalidOperationException

GetRequiredFeature(IFeatureCollection, Type)

來源:
FeatureCollectionExtensions.cs
來源:
FeatureCollectionExtensions.cs
來源:
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)

來源:
FeatureCollectionExtensions.cs
來源:
FeatureCollectionExtensions.cs
來源:
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

要求的功能。

適用於