Show / Hide Table of Contents

Class WeakEventHandlerManager

Implements functionalists for using the WeakReference

Inheritance
object
WeakEventHandlerManager
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Sartorius.SAF.Presentation.Commands
Assembly: Sartorius.SAF.Presentation.dll
Syntax
public static class WeakEventHandlerManager

Methods

View Source

AddWeakReferenceHandler(ref List<WeakReference>, EventHandler, int)

Adds a handler to the supplied list in a weak way.

Declaration
public static void AddWeakReferenceHandler(ref List<WeakReference> handlers, EventHandler handler, int defaultListSize)
Parameters
Type Name Description
List<WeakReference> handlers

Existing handler list. It will be created if null.

EventHandler handler

Handler to add.

int defaultListSize

Default list size.

View Source

CallWeakReferenceHandlers(object, List<WeakReference>)

Invokes the handlers

Declaration
public static void CallWeakReferenceHandlers(object sender, List<WeakReference> handlers)
Parameters
Type Name Description
object sender
List<WeakReference> handlers
View Source

RemoveWeakReferenceHandler(List<WeakReference>, EventHandler)

Removes an event handler from the reference list.

Declaration
public static void RemoveWeakReferenceHandler(List<WeakReference> handlers, EventHandler handler)
Parameters
Type Name Description
List<WeakReference> handlers

Handler list to remove reference from.

EventHandler handler

Handler to remove.

  • View Source
Back to top Generated by DocFX