Show / Hide Table of Contents

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
System.Object
DelegateReference
Implements
IDelegateReference
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Sartorius.SAF.Events
Assembly: Sartorius.SAF.dll
Syntax
public class DelegateReference : IDelegateReference

Constructors

View Source

DelegateReference(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 delegate is not assignable to System.Delegate.

Properties

View Source

Target

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.

Implements

IDelegateReference

Extension Methods

CollectionExtensions.AddRange<T, TCollection>(TCollection, IEnumerable<T>)
SerializableObjectCloneExtension.Clone<T>(T)
  • View Source
Back to top Generated by DocFX