Empeld
Empeld plugin documentation.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
pluginbase.Helpers.WeakReferenceExt< T > Class Template Reference

An extended, generic, WeakReference type. Not named WeakReference to avoid conflict with the MS .Net 4.5 generic weak reference More...

Inheritance diagram for pluginbase.Helpers.WeakReferenceExt< T >:

Public Member Functions

 WeakReferenceExt (T target)
 Initializes a new instance of the class. More...
 
bool TryGetTarget (out T target)
 Try to get the target. Returns false if it does not exist More...
 

Static Public Member Functions

static operator WeakReferenceExt< T > (T obj)
 
static implicit operator T (WeakReferenceExt< T > input)
 

Properties

new T Target [get]
 Gets the target. More...
 

Detailed Description

An extended, generic, WeakReference type. Not named WeakReference to avoid conflict with the MS .Net 4.5 generic weak reference

Type Constraints
T :class 

Constructor & Destructor Documentation

pluginbase.Helpers.WeakReferenceExt< T >.WeakReferenceExt ( target)

Initializes a new instance of the class.

Parameters
targetTarget.
17  :base(target, false)
18  {}

Member Function Documentation

static implicit pluginbase.Helpers.WeakReferenceExt< T >.operator T ( WeakReferenceExt< T >  input)
static
46  {
47  return input.Target;
48  }
static pluginbase.Helpers.WeakReferenceExt< T >.operator WeakReferenceExt< T > ( obj)
explicitstatic
41  {
42  return new WeakReferenceExt<T>(obj);
43  }
bool pluginbase.Helpers.WeakReferenceExt< T >.TryGetTarget ( out T  target)

Try to get the target. Returns false if it does not exist

Returns
true, if get target was successful, false otherwise.
Parameters
targetTarget.
35  {
36  target = this.Target;
37  return target != null;
38  }
new T Target
Gets the target.
Definition: WeakReferenceExt.cs:25

Property Documentation

new T pluginbase.Helpers.WeakReferenceExt< T >.Target
get

Gets the target.

The target.


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