EventMappingSettings.Type Propriedade

Definição

Obtém ou define um tipo de evento personalizado.Gets or sets a custom event type.

public:
 property System::String ^ Type { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("type", DefaultValue=Mono.Cecil.CustomAttributeArgument, IsRequired=true)]
public string Type { get; set; }
[<System.Configuration.ConfigurationProperty("type", DefaultValue=Mono.Cecil.CustomAttributeArgument, IsRequired=true)>]
member this.Type : string with get, set
Public Property Type As String

Valor da propriedade

String

Uma referência de tipo válida ou uma cadeia de caracteres vazia ("").A valid type reference or an empty string (""). O padrão é uma cadeia de caracteres vazia.The default is an empty string.

Atributos

Exemplos

O exemplo de código a seguir mostra como usar a Type propriedade.The following code example shows how to use the Type property. Este exemplo de código faz parte de um exemplo maior fornecido para a HealthMonitoringSection classe.This code example is part of a larger example provided for the HealthMonitoringSection class.

eventMappingSetting.Type = 
    "System.Web.Management.WebErrorEvent, System.Web";
eventMappingSetting.Type = _
    "System.Web.Management.WebErrorEvent, System.Web"

Comentários

Use essa propriedade para especificar o tipo do evento.Use this property to specify the type of the event. O tipo especificado pode ser o tipo de classe real ou um tipo pai da classe de evento.The specified type can be the actual class type or a parent type of the event class. Se for uma cadeia de caracteres vazia (""), nenhum evento será mapeado e o EventMappingSettings objeto atuará como um espaço reservado.If it is an empty string (""), no event is mapped, and the EventMappingSettings object acts as a placeholder.

A referência de tipo é formada da seguinte maneira (os itens entre colchetes não são obrigatórios): namespace. TypeName, AssemblyName[,] [versão = x,] [cultura = y,] [PublicKeyToken = z].The type reference is formed as follows (items in brackets are not required): Namespace.Typename, Assemblyname[,] [Version=x,] [Culture=y,] [PublicKeyToken=z]. Por exemplo, "ExampleNameSpace. ExampleType, exemplo. assembly, Version =% ASSEMBLY_VERSION%, Culture = neutral, PublicKeyToken =% MICROSOFT_PUBLICKEY%"For example "ExampleNameSpace.ExampleType, Example.Assembly, Version=%ASSEMBLY_VERSION%, Culture=neutral, PublicKeyToken=%MICROSOFT_PUBLICKEY%"

Aplica-se a

Confira também