Empeld
Empeld plugin documentation.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
pluginbase.Objects.Libs.Events.WeakDelegate< TDelegate > Class Template Reference

Class that wraps itself around and decorates a weak delegate More...

Public Member Functions

 WeakDelegate (TDelegate method)
 Create a new weak delegate targeting a method More...
 

Static Public Member Functions

static implicit operator TDelegate (WeakDelegate< TDelegate > weakDelegate)
 
static operator WeakDelegate< TDelegate > (TDelegate method)
 

Properties

Action< WeakDelegate< TDelegate > > OnGone
 Triggered when an invoke discovers that its target is no longer alive More...
 
bool IsAlive [get]
 Gets a value indicating whether this instance is alive. More...
 
TDelegate Invoke [get]
 Returns the invoke wrapper which may be called immediately More...
 

Detailed Description

Class that wraps itself around and decorates a weak delegate

Type Constraints
TDelegate :class 

Constructor & Destructor Documentation

pluginbase.Objects.Libs.Events.WeakDelegate< TDelegate >.WeakDelegate ( TDelegate  method)

Create a new weak delegate targeting a method

Parameters
methodMethod.
36  {
37  _wrappedDelegate = WeakDelegate.Wrap<TDelegate>(method, HandleGone);
38  }

Member Function Documentation

static implicit pluginbase.Objects.Libs.Events.WeakDelegate< TDelegate >.operator TDelegate ( WeakDelegate< TDelegate >  weakDelegate)
static
68  {
69  return weakDelegate.Invoke;
70  }
static pluginbase.Objects.Libs.Events.WeakDelegate< TDelegate >.operator WeakDelegate< TDelegate > ( TDelegate  method)
explicitstatic
73  {
74  return new WeakDelegate<TDelegate>(method);
75  }

Property Documentation

TDelegate pluginbase.Objects.Libs.Events.WeakDelegate< TDelegate >.Invoke
get

Returns the invoke wrapper which may be called immediately

The invoke.

bool pluginbase.Objects.Libs.Events.WeakDelegate< TDelegate >.IsAlive
get

Gets a value indicating whether this instance is alive.

true if this instance is alive; otherwise, false.

Action<WeakDelegate<TDelegate> > pluginbase.Objects.Libs.Events.WeakDelegate< TDelegate >.OnGone
addremove

Triggered when an invoke discovers that its target is no longer alive


The documentation for this class was generated from the following file: