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
Datei anzeigen Open project: GridProtectionAlliance/openHistorian

Public Methods

Method Description
Clear ( ) : void
WeakActionFast ( System.Action target, object &localStrongReference ) : System

Creates a high speed weak action

Private Methods

Method Description
TryInvoke ( ) : bool

Method Details

Clear() public method

public Clear ( ) : void
return void

WeakActionFast() public method

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
return System