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()

Создает новый экземпляр EnableCorsAttribute с именем политики по умолчанию, определенным параметром DefaultPolicyName.

EnableCorsAttribute(String)

Создает новый экземпляр с EnableCorsAttribute указанным именем политики.

Свойства

PolicyName

Имя политики, которую необходимо применить.

Методы

ToString()

Интерфейс, который можно использовать для определения типа, предоставляющего метаданные, необходимые для включения поддержки CORS.

Применяется к