Click or drag to resize

WeakActionT Class

Provides a weak referenced Action delegate.
Inheritance Hierarchy
SystemObject
  SystemWeakReference
    GSFNullableWeakReference
      GSF.ThreadingWeakActionT

Namespace: GSF.Threading
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.205-beta+5ef4169f3b1079d8b163dd363614f656bd140924
Syntax
public class WeakAction<T> : NullableWeakReference
View Source

Type Parameters

T

The WeakActionT type exposes the following members.

Constructors
 NameDescription
Public methodWeakActionT Creates a WeakAction.
Top
Properties
 NameDescription
Public propertyIsAlive Gets an indication whether the object referenced by the current NullableWeakReference object has been cleared or garbage collected.
(Inherited from NullableWeakReference)
Public propertyTarget Gets the object (the target) referenced by the current NullableWeakReference object. Set will only accept null.
(Inherited from NullableWeakReference)
Public propertyTrackResurrectionGets an indication whether the object referenced by the current WeakReference object is tracked after it is finalized.
(Inherited from WeakReference)
Top
Methods
 NameDescription
Public methodClear Clears Action callback target.
(Overrides NullableWeakReferenceClear)
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeDiscards the reference to the target represented by the current WeakReference object.
(Inherited from WeakReference)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetObjectDataPopulates a SerializationInfo object with all the data needed to serialize the current WeakReference object.
(Inherited from WeakReference)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodTryInvoke Attempts to invoke the delegate to a weak reference object.
Top
Extension Methods
 NameDescription
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Top
Remarks
This class will store the information necessary so the callback object will have a weak reference to it. This information is compiled an can be quickly executed without the overhead of using reflection.
See Also