Table of Contents

Class WeakReferenceCallback

Namespace
MADE.Runtime
Assembly
MADE.Runtime.dll

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

action Delegate

The callback action.

callbackType Type

The expected type for the callback.

Exceptions

Exception

The action callback throws an exception acquiring method info.

Properties

IsAlive

Gets a value indicating whether the callback is alive.

public bool IsAlive { get; }

Property Value

bool

Type

Gets the expected type for the callback.

public Type Type { get; }

Property Value

Type

Methods

Invoke(object)

Invokes the callback with the specified parameter.

public void Invoke(object param)

Parameters

param object

The parameter to pass to the callback.

Exceptions

InvalidOperationException

The associated weak reference is no longer alive.