Click or drag to resize

NullableWeakReference Class

A WeakReference implementation that can have the Target object set to null. Natively, setting Target to null will throw an InvalidOperationException,
Inheritance Hierarchy
SystemObject
  SystemWeakReference
    GSFNullableWeakReference
      GSF.ThreadingWeakAction
      GSF.ThreadingWeakActionT

Namespace: GSF
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.207-beta+1781b796b2aa7a54013a031eb432fe4ccee31867
Syntax
[SerializableAttribute]
public class NullableWeakReference : WeakReference
View Source

The NullableWeakReference type exposes the following members.

Constructors
 NameDescription
Public methodNullableWeakReference Creates a NullableWeakReference
Top
Properties
 NameDescription
Public propertyIsAlive Gets an indication whether the object referenced by the current NullableWeakReference object has been cleared or garbage collected.
(Overrides WeakReferenceIsAlive)
Public propertyTarget Gets the object (the target) referenced by the current NullableWeakReference object. Set will only accept null.
(Overrides WeakReferenceTarget)
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 Sets Target to null so subsequent calls to Target returns null
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)
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
See Also

Reference

GSF Namespace