ContextCallback Delegado

Definición

Representa un método al que llamar dentro de un nuevo contexto.Represents a method to be called within a new context.

public delegate void ContextCallback(System::Object ^ state);
public delegate void ContextCallback(object state);
public delegate void ContextCallback(object? state);
[System.Runtime.InteropServices.ComVisible(true)]
public delegate void ContextCallback(object state);
type ContextCallback = delegate of obj -> unit
[<System.Runtime.InteropServices.ComVisible(true)>]
type ContextCallback = delegate of obj -> unit
Public Delegate Sub ContextCallback(state As Object)

Parámetros

state
Object

Objeto que contiene la información que va a utilizar el método de devolución de llamadas cada vez que se ejecute.An object containing information to be used by the callback method each time it executes.

Atributos

Comentarios

ContextCallback lo usan los ExecutionContext.Run SecurityContext.Run métodos y.ContextCallback is used by the ExecutionContext.Run and the SecurityContext.Run methods. ContextCallback representa el método que se va a ejecutar en el contexto proporcionado.ContextCallback represents the method to be run in the provided context. Al finalizar la ejecución del método, el contexto se restaura a su estado anterior.Upon completion of the method execution, the context is restored to its previous state.

Cree el delegado pasando el método de devolución de llamada al ContextCallback constructor.Create the delegate by passing your callback method to the ContextCallback constructor. El método debe tener la firma que se muestra aquí.Your method must have the signature shown here.

Métodos de extensión

GetMethodInfo(Delegate)

Obtiene un objeto que representa el método representado por el delegado especificado.Gets an object that represents the method represented by the specified delegate.

Se aplica a