FeatureCollectionExtensions.GetRequiredFeature Yöntem

Tanım

Aşırı Yüklemeler

GetRequiredFeature(IFeatureCollection, Type)

İstenen özelliği koleksiyondan alır. Özellik yoksa bir InvalidOperationException oluşturur.

GetRequiredFeature<TFeature>(IFeatureCollection)

İstenen özelliği koleksiyondan alır. Özellik yoksa bir InvalidOperationException oluşturur.

GetRequiredFeature(IFeatureCollection, Type)

Kaynak:
FeatureCollectionExtensions.cs
Kaynak:
FeatureCollectionExtensions.cs
Kaynak:
FeatureCollectionExtensions.cs

İstenen özelliği koleksiyondan alır. Özellik yoksa bir InvalidOperationException oluşturur.

C#
public static object GetRequiredFeature (this Microsoft.AspNetCore.Http.Features.IFeatureCollection featureCollection, Type key);

Parametreler

featureCollection
IFeatureCollection

özellik koleksiyonu

key
Type

Özellik anahtarı.

Döndürülenler

İstenen özellik.

Şunlara uygulanır

ASP.NET Core 9.0 ve diğer sürümler
Ürün Sürümler
ASP.NET Core 7.0, 8.0, 9.0

GetRequiredFeature<TFeature>(IFeatureCollection)

Kaynak:
FeatureCollectionExtensions.cs
Kaynak:
FeatureCollectionExtensions.cs
Kaynak:
FeatureCollectionExtensions.cs

İstenen özelliği koleksiyondan alır. Özellik yoksa bir InvalidOperationException oluşturur.

C#
public static TFeature GetRequiredFeature<TFeature> (this Microsoft.AspNetCore.Http.Features.IFeatureCollection featureCollection);

Tür Parametreleri

TFeature

Özellik anahtarı.

Parametreler

Döndürülenler

TFeature

İstenen özellik.

Şunlara uygulanır

ASP.NET Core 9.0 ve diğer sürümler
Ürün Sürümler
ASP.NET Core 7.0, 8.0, 9.0