Class WeakReferenceCallback
Defines a model for providing a weak referenced callback.
public sealed class WeakReferenceCallback
- Inheritance
-
WeakReferenceCallback
- Inherited Members
- Extension Methods
Constructors
WeakReferenceCallback(Delegate, Type)
Initializes a new instance of the WeakReferenceCallback class.
public WeakReferenceCallback(Delegate action, Type callbackType)
Parameters
Exceptions
- Exception
The
actioncallback throws an exception acquiring method info.
Properties
IsAlive
Gets a value indicating whether the callback is alive.
public bool IsAlive { get; }
Property Value
Type
Gets the expected type for the callback.
public Type Type { get; }
Property Value
Methods
Invoke(object)
Invokes the callback with the specified parameter.
public void Invoke(object param)
Parameters
paramobjectThe parameter to pass to the callback.
Exceptions
- InvalidOperationException
The associated weak reference is no longer alive.