Class WeakAction<T>
Class WeakAction. Implements the WeakAction Implements the IExecuteWithObject
Implements
Inherited Members
Namespace: ISynergy.Framework.Core.Events
Assembly: ISynergy.Framework.Core.dll
Syntax
public class WeakAction<T> : WeakAction, IExecuteWithObject
  Type Parameters
| Name | Description | 
|---|---|
| T | 
Constructors
View SourceWeakAction(Action<T>, Boolean)
Initializes a new instance of the WeakAction<T> class.
Declaration
public WeakAction(Action<T> action, bool keepTargetAlive = false)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Action<T> | action | The action.  | 
      
| System.Boolean | keepTargetAlive | if set to   | 
      
WeakAction(Object, Action<T>, Boolean)
Initializes a new instance of the WeakAction<T> class.
Declaration
public WeakAction(object target, Action<T> action, bool keepTargetAlive = false)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Object | target | The target.  | 
      
| Action<T> | action | The action.  | 
      
| System.Boolean | keepTargetAlive | if set to   | 
      
Properties
View SourceIsAlive
Gets a value indicating whether this instance is alive.
Declaration
public override bool IsAlive { get; }
  Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
  | 
      
Overrides
View SourceMethodName
Gets the name of the method.
Declaration
public override string MethodName { get; }
  Property Value
| Type | Description | 
|---|---|
| System.String | The name of the method.  | 
      
Overrides
Methods
View SourceExecute()
Executes this instance.
Declaration
public void Execute()
  Execute(T)
Executes the specified parameter.
Declaration
public void Execute(T parameter)
  Parameters
| Type | Name | Description | 
|---|---|---|
| T | parameter | The parameter.  | 
      
ExecuteWithObject(Object)
Executes an action.
Declaration
public void ExecuteWithObject(object parameter)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Object | parameter | A parameter passed as an object, to be casted to the appropriate type.  | 
      
MarkForDeletion()
Marks for deletion.
Declaration
public void MarkForDeletion()
  Implements
Extension Methods
      CollectionExtensions.FromHierarchy<TSource>(TSource, Func<TSource, TSource>, Func<TSource, Boolean>)