Generated by DocFX

Class WeakFunc<T, TResult>

Class WeakFunc. Implements the WeakFunc<TResult> Implements the IExecuteWithObjectAndResult

Inheritance
System.Object
WeakFunc<TResult>
WeakFunc<T, TResult>
Implements
IExecuteWithObjectAndResult
Inherited Members
WeakFunc<TResult>.Method
WeakFunc<TResult>.IsStatic
WeakFunc<TResult>.FuncReference
WeakFunc<TResult>.LiveReference
WeakFunc<TResult>.Reference
WeakFunc<TResult>.Target
WeakFunc<TResult>.FuncTarget
Namespace: ISynergy.Framework.Core.Events
Assembly: ISynergy.Framework.Core.dll
Syntax
public class WeakFunc<T, TResult> : WeakFunc<TResult>, IExecuteWithObjectAndResult
Type Parameters
Name Description
T
TResult

The type of the t result.

Constructors

View Source

WeakFunc(Func<T, TResult>, Boolean)

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

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

The function.

System.Boolean keepTargetAlive

if set to true [keep target alive].

View Source

WeakFunc(Object, Func<T, TResult>, Boolean)

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

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

The target.

Func<T, TResult> func

The function.

System.Boolean keepTargetAlive

if set to true [keep target alive].

Properties

View Source

IsAlive

Gets a value indicating whether this instance is alive.

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

true if this instance is alive; otherwise, false.

Overrides
ISynergy.Framework.Core.Events.WeakFunc<TResult>.IsAlive
View Source

MethodName

Gets the name of the method.

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

The name of the method.

Overrides
ISynergy.Framework.Core.Events.WeakFunc<TResult>.MethodName

Methods

View Source

Execute()

Executes this instance.

Declaration
public TResult Execute()
Returns
Type Description
TResult

TResult.

View Source

Execute(T)

Executes the specified parameter.

Declaration
public TResult Execute(T parameter)
Parameters
Type Name Description
T parameter

The parameter.

Returns
Type Description
TResult

TResult.

View Source

ExecuteWithObject(Object)

Executes a Func and returns the result.

Declaration
public object ExecuteWithObject(object parameter)
Parameters
Type Name Description
System.Object parameter

A parameter passed as an object, to be casted to the appropriate type.

Returns
Type Description
System.Object

The result of the operation.

View Source

MarkForDeletion()

Marks for deletion.

Declaration
public void MarkForDeletion()

Implements

IExecuteWithObjectAndResult

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)

See Also

WeakFunc<TResult>
IExecuteWithObjectAndResult