JSInvokableAttribute Clase

Definición

Identifica un método de .NET como permitir la invocación desde código JavaScript. Cualquier método marcado con este atributo puede recibir valores de parámetro arbitrarios de autores de llamadas que no son de confianza. Todas las entradas deben validarse cuidadosamente.

public ref class JSInvokableAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true)]
public sealed class JSInvokableAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true)>]
type JSInvokableAttribute = class
    inherit Attribute
Public NotInheritable Class JSInvokableAttribute
Inherits Attribute
Herencia
JSInvokableAttribute
Atributos

Constructores

JSInvokableAttribute()

Construye una instancia de JSInvokableAttribute sin establecer un identificador para el método .

JSInvokableAttribute(String)

Construye una instancia de JSInvokableAttribute mediante el identificador especificado.

Propiedades

Identifier

Obtiene el identificador del método . El identificador debe ser único dentro del ámbito de un ensamblado.

Si no se establece, el identificador se toma del nombre del método. En este caso, el nombre del método debe ser único dentro del ensamblado.

Se aplica a