C# Class GSF.Threading.WeakActionFast

Provides a high speed weak referenced action delegate. This one does not use reflection, so calls will be faster. HOWEVER: a strong reference MUST be maintained for the Action delegate passed to this class. This reference is outputted in the constructor. Careful consideration must be made when deciding where to store this strong reference, as this strong reference will need to also lose reference. A good place would be as a member variable of the object of the target method.
Inheritance: System.WeakReference
Afficher le fichier Open project: GridProtectionAlliance/openHistorian

Méthodes publiques

Méthode Description
Clear ( ) : void
WeakActionFast ( System.Action target, object &localStrongReference ) : System

Creates a high speed weak action

Private Methods

Méthode Description
TryInvoke ( ) : bool

Method Details

Clear() public méthode

public Clear ( ) : void
Résultat void

WeakActionFast() public méthode

Creates a high speed weak action
public WeakActionFast ( System.Action target, object &localStrongReference ) : System
target System.Action the callback
localStrongReference object a strong reference that must be /// maintained in the class that is the target of the action
Résultat System