Class DelegateReference
Represents a reference to a System.Delegate that may contain a System.WeakReference to the target. This class is used internally by the Composite Application Library.
Inheritance
Implements
Namespace: Sartorius.SAF.Events
Assembly: Sartorius.SAF.dll
Syntax
public class DelegateReference : IDelegateReference
Constructors
View SourceDelegateReference(Delegate, Boolean)
Initializes a new instance of DelegateReference.
Declaration
public DelegateReference(Delegate delegate, bool keepReferenceAlive)
Parameters
Type | Name | Description |
---|---|---|
System.Delegate | delegate | The original System.Delegate to create a reference for. |
System.Boolean | keepReferenceAlive | If false the class will create a weak reference to the delegate, allowing it to be garbage collected. Otherwise it will keep a strong reference to the target. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If the passed |
Properties
View SourceTarget
Gets the System.Delegate (the target) referenced by the current DelegateReference object.
Declaration
public Delegate Target { get; }
Property Value
Type | Description |
---|---|
System.Delegate | null if the object referenced by the current DelegateReference object has been garbage collected; otherwise, a reference to the System.Delegate referenced by the current DelegateReference object. |