C# Class PsmFramework.Engines.Messaging.WeakAction

Stores an Action without causing a hard reference to be created to the Action's owner. The owner can be garbage collected at any time.
Afficher le fichier Open project: artwallace/PsmFramework

Méthodes publiques

Méthode Description
Execute ( ) : void

Executes the action. This only happens if the action's owner is still alive.

MarkForDeletion ( ) : void

Sets the reference that this instance stores to null.

WeakAction ( object target, System.Action action ) : System

Initializes a new instance of the WeakAction class.

Method Details

Execute() public méthode

Executes the action. This only happens if the action's owner is still alive.
public Execute ( ) : void
Résultat void

MarkForDeletion() public méthode

Sets the reference that this instance stores to null.
public MarkForDeletion ( ) : void
Résultat void

WeakAction() public méthode

Initializes a new instance of the WeakAction class.
public WeakAction ( object target, System.Action action ) : System
target object The action's owner.
action System.Action The action that will be associated to this instance.
Résultat System