Click or drag to resize
Cimbalino ToolkitWeakEventSubscriptionT1, T2 Class
Stores a TypedEventHandlerTSender, TResult without causing a hard reference to be created to the event handler's owner. The owner can be garbage collected at any time.
Inheritance Hierarchy
SystemObject
  Cimbalino.Toolkit.HelpersWeakEventSubscriptionT1, T2

Namespace: Cimbalino.Toolkit.Helpers
Assembly: Cimbalino.Toolkit.Core (in Cimbalino.Toolkit.Core.dll) Version: 2.2.1.0 (2.2.1.0)
Syntax
C#
public class WeakEventSubscription<T1, T2> : IDisposable
where T2 : EventArgs

Type Parameters

T1
The type of the event source generated by the event.
T2
The type of the event data generated by the event.

The WeakEventSubscriptionT1, T2 type exposes the following members.

Constructors
  NameDescription
Public methodWeakEventSubscriptionT1, T2(TypedEventHandlerT1, T2, ActionTypedEventHandlerT1, T2, ActionTypedEventHandlerT1, T2)
Initializes a new instance of the WeakEventSubscriptionT1, T2 class.
Public methodWeakEventSubscriptionT1, T2(Object, TypedEventHandlerT1, T2, ActionTypedEventHandlerT1, T2, ActionTypedEventHandlerT1, T2)
Initializes a new instance of the WeakEventSubscriptionT1, T2 class.
Top
Properties
  NameDescription
Protected propertyEventHandlerReference
Public propertyIsAlive
Gets a value indicating whether the event handler's owner is still alive (not yet collected by the Garbage Collector).
Protected propertyMethod
Gets or sets the MethodInfo corresponding to this WeakEventSubscriptionT1, T2.
Protected propertyReference
Gets or sets a WeakReference to the target of this WeakEventSubscriptionT1, T2.
Top
Methods
  NameDescription
Public methodDispose
Disposes this instance and releases all references.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods
  NameDescription
Public Extension MethodAddEventHandler
Adds an event handler to an event source.
(Defined by ObjectExtensions.)
Public Extension MethodGetPropertyValue(String)Overloaded.
Searches for the public property with the specified name and gets its value.
(Defined by ObjectExtensions.)
Public Extension MethodGetPropertyValueTObject(String)Overloaded.
Searches for the public property with the specified name and gets its value.
(Defined by ObjectExtensions.)
Public Extension MethodInvokeMethod(String, Object)Overloaded.
Searches for the public method with the specified name and invokes it using the specified parameters.
(Defined by ObjectExtensions.)
Public Extension MethodInvokeMethodTObject(String, Object)Overloaded.
Searches for the public method with the specified name and invokes it using the specified parameters, returning the result.
(Defined by ObjectExtensions.)
Public Extension MethodRemoveEventHandler
Removes an event handler from an event source.
(Defined by ObjectExtensions.)
Public Extension MethodSetPropertyValueTObject
Searches for the public property with the specified name and sets its value.
(Defined by ObjectExtensions.)
Top
Version Information

Windows

Supported in: 10.0, 8.1

Windows Phone

Supported in: 8.1

Windows Phone Silverlight

Supported in: 8.1, 8.0
See Also