Aracılığıyla paylaş


CorsEndpointConventionBuilderExtensions.RequireCors Yöntem

Tanım

Aşırı Yüklemeler

RequireCors<TBuilder>(TBuilder)

Uç noktalara varsayılan ilke adına sahip bir CORS ilkesi ekler.

RequireCors<TBuilder>(TBuilder, Action<CorsPolicyBuilder>)

Belirtilen CORS ilkesini uç noktalara ekler.

RequireCors<TBuilder>(TBuilder, String)

Uç noktalara belirtilen ada sahip bir CORS ilkesi ekler.

RequireCors<TBuilder>(TBuilder)

Kaynak:
CorsEndpointConventionBuilderExtensions.cs

Uç noktalara varsayılan ilke adına sahip bir CORS ilkesi ekler.

public static TBuilder RequireCors<TBuilder> (this TBuilder builder) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder;
static member RequireCors : 'Builder -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder)
<Extension()>
Public Function RequireCors(Of TBuilder As IEndpointConventionBuilder) (builder As TBuilder) As TBuilder

Tür Parametreleri

TBuilder

Parametreler

builder
TBuilder

Uç nokta kuralı oluşturucusu.

Döndürülenler

TBuilder

Özgün kural oluşturucu parametresi.

Şunlara uygulanır

RequireCors<TBuilder>(TBuilder, Action<CorsPolicyBuilder>)

Kaynak:
CorsEndpointConventionBuilderExtensions.cs

Belirtilen CORS ilkesini uç noktalara ekler.

public:
generic <typename TBuilder>
 where TBuilder : Microsoft::AspNetCore::Builder::IEndpointConventionBuilder[System::Runtime::CompilerServices::Extension]
 static TBuilder RequireCors(TBuilder builder, Action<Microsoft::AspNetCore::Cors::Infrastructure::CorsPolicyBuilder ^> ^ configurePolicy);
public static TBuilder RequireCors<TBuilder> (this TBuilder builder, Action<Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder> configurePolicy) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder;
static member RequireCors : 'Builder * Action<Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder> -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder)
<Extension()>
Public Function RequireCors(Of TBuilder As IEndpointConventionBuilder) (builder As TBuilder, configurePolicy As Action(Of CorsPolicyBuilder)) As TBuilder

Tür Parametreleri

TBuilder

Parametreler

builder
TBuilder

Uç nokta kuralı oluşturucusu.

configurePolicy
Action<CorsPolicyBuilder>

İlke oluşturmak için ilke oluşturucu kullanabilen bir temsilci.

Döndürülenler

TBuilder

Özgün kural oluşturucu parametresi.

Şunlara uygulanır

RequireCors<TBuilder>(TBuilder, String)

Kaynak:
CorsEndpointConventionBuilderExtensions.cs

Uç noktalara belirtilen ada sahip bir CORS ilkesi ekler.

public:
generic <typename TBuilder>
 where TBuilder : Microsoft::AspNetCore::Builder::IEndpointConventionBuilder[System::Runtime::CompilerServices::Extension]
 static TBuilder RequireCors(TBuilder builder, System::String ^ policyName);
public static TBuilder RequireCors<TBuilder> (this TBuilder builder, string policyName) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder;
static member RequireCors : 'Builder * string -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder)
<Extension()>
Public Function RequireCors(Of TBuilder As IEndpointConventionBuilder) (builder As TBuilder, policyName As String) As TBuilder

Tür Parametreleri

TBuilder

Parametreler

builder
TBuilder

Uç nokta kuralı oluşturucusu.

policyName
String

CORS ilke adı.

Döndürülenler

TBuilder

Özgün kural oluşturucu parametresi.

Şunlara uygulanır