Generated by DocFX

Class WeakFunc<TResult>

Class WeakFunc.

Inheritance
System.Object
WeakFunc<TResult>
WeakFunc<T, TResult>
Namespace: ISynergy.Framework.Core.Events
Assembly: ISynergy.Framework.Core.dll
Syntax
public class WeakFunc<TResult> : object
Type Parameters
Name Description
TResult

The type of the t result.

Constructors

View Source

WeakFunc()

Initializes a new instance of the WeakFunc<TResult> class.

Declaration
protected WeakFunc()
View Source

WeakFunc(Func<TResult>, Boolean)

Initializes a new instance of the WeakFunc<TResult> class.

Declaration
public WeakFunc(Func<TResult> func, bool keepTargetAlive = false)
Parameters
Type Name Description
Func<TResult> func

The function.

System.Boolean keepTargetAlive

if set to true [keep target alive].

View Source

WeakFunc(Object, Func<TResult>, Boolean)

Initializes a new instance of the WeakFunc<TResult> class.

Declaration
public WeakFunc(object target, Func<TResult> func, bool keepTargetAlive = false)
Parameters
Type Name Description
System.Object target

The target.

Func<TResult> func

The function.

System.Boolean keepTargetAlive

if set to true [keep target alive].

Properties

View Source

FuncReference

Gets or sets the function reference.

Declaration
protected WeakReference FuncReference { get; set; }
Property Value
Type Description
WeakReference

The function reference.

View Source

FuncTarget

Gets the function target.

Declaration
protected object FuncTarget { get; }
Property Value
Type Description
System.Object

The function target.

View Source

IsAlive

Gets a value indicating whether this instance is alive.

Declaration
public virtual bool IsAlive { get; }
Property Value
Type Description
System.Boolean

true if this instance is alive; otherwise, false.

View Source

IsStatic

Gets a value indicating whether this instance is static.

Declaration
public bool IsStatic { get; }
Property Value
Type Description
System.Boolean

true if this instance is static; otherwise, false.

View Source

LiveReference

Gets or sets the live reference.

Declaration
protected object LiveReference { get; set; }
Property Value
Type Description
System.Object

The live reference.

View Source

Method

Gets or sets the method.

Declaration
protected MethodInfo Method { get; set; }
Property Value
Type Description
MethodInfo

The method.

View Source

MethodName

Gets the name of the method.

Declaration
public virtual string MethodName { get; }
Property Value
Type Description
System.String

The name of the method.

View Source

Reference

Gets or sets the reference.

Declaration
protected WeakReference Reference { get; set; }
Property Value
Type Description
WeakReference

The reference.

View Source

Target

Gets the target.

Declaration
public object Target { get; }
Property Value
Type Description
System.Object

The target.

Methods

View Source

Execute()

Executes this instance.

Declaration
public TResult Execute()
Returns
Type Description
TResult

TResult.

View Source

MarkForDeletion()

Marks for deletion.

Declaration
public void MarkForDeletion()

Extension Methods

Matrix.Replace<T>(T, Object, Object)
Matrix.IsEqual(Object, Object, Decimal, Decimal)
EntityBaseExtensions.HasProperty(Object, String)
ArrayExtensions.Concatenate<T>(T, T[])
CollectionExtensions.FromHierarchy<TSource>(TSource, Func<TSource, TSource>, Func<TSource, Boolean>)
CollectionExtensions.FromHierarchy<TSource>(TSource, Func<TSource, TSource>)
ObjectExtensions.Clone<T>(T)
ObjectExtensions.To<T>(Object)
ObjectExtensions.To(Object, Type)
ObjectExtensions.HasMethod(Object, String)
ObjectExtensions.AddressOf<T>(T)
ReflectionExtensions.GetIdentityValue<T>(T)
ReflectionExtensions.GetIdentityValue<T, TResult>(T)
ReflectionExtensions.GetIdentityProperty<T>(T)
ReflectionExtensions.HasIdentityProperty<T>(T)
ReflectionExtensions.GetPropertyValue<T, TResult>(T, String, TResult)
ReflectionExtensions.GetPropertyInfo<T, TValue>(T, Expression<Func<T, TValue>>)
ReflectionExtensions.GetTitleValue<T>(T)
ReflectionExtensions.HasParentIdentityProperty<T>(T)
ReflectionExtensions.GetParentIdentityProperty<T>(T)
ReflectionExtensions.IsFreeApplication<T>(T)