EnableCorsAttribute 类

定义

一个接口,可用于标识提供启用 CORS 支持所需的元数据的类型。

public ref class EnableCorsAttribute : Attribute, Microsoft::AspNetCore::Cors::Infrastructure::IEnableCorsAttribute
public ref class EnableCorsAttribute : Attribute, Microsoft::AspNetCore::Cors::Infrastructure::ICorsMetadata, Microsoft::AspNetCore::Cors::Infrastructure::IEnableCorsAttribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public class EnableCorsAttribute : Attribute, Microsoft.AspNetCore.Cors.Infrastructure.IEnableCorsAttribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public class EnableCorsAttribute : Attribute, Microsoft.AspNetCore.Cors.Infrastructure.ICorsMetadata, Microsoft.AspNetCore.Cors.Infrastructure.IEnableCorsAttribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type EnableCorsAttribute = class
    inherit Attribute
    interface IEnableCorsAttribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type EnableCorsAttribute = class
    inherit Attribute
    interface ICorsMetadata
    interface IEnableCorsAttribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type EnableCorsAttribute = class
    inherit Attribute
    interface IEnableCorsAttribute
    interface ICorsMetadata
Public Class EnableCorsAttribute
Inherits Attribute
Implements IEnableCorsAttribute
Public Class EnableCorsAttribute
Inherits Attribute
Implements ICorsMetadata, IEnableCorsAttribute
继承
EnableCorsAttribute
属性
实现

构造函数

EnableCorsAttribute()

使用 定义DefaultPolicyName的默认策略名称创建 的新实例EnableCorsAttribute

EnableCorsAttribute(String)

使用提供的策略名称创建 的新实例 EnableCorsAttribute

属性

PolicyName

需要应用的策略的名称。

方法

ToString()

一个接口,可用于标识提供启用 CORS 支持所需的元数据的类型。

适用于