Class WeakAction
Class WeakAction.
Namespace: ISynergy.Framework.Core.Events
Assembly: ISynergy.Framework.Core.dll
Syntax
public class WeakAction : object
Constructors
View SourceWeakAction()
Initializes a new instance of the WeakAction class.
Declaration
protected WeakAction()
WeakAction(Action, Boolean)
Initializes a new instance of the WeakAction class.
Declaration
public WeakAction(Action action, bool keepTargetAlive = false)
Parameters
Type | Name | Description |
---|---|---|
Action | action | The action. |
System.Boolean | keepTargetAlive | if set to |
WeakAction(Object, Action, Boolean)
Initializes a new instance of the WeakAction class.
Declaration
public WeakAction(object target, Action action, bool keepTargetAlive = false)
Parameters
Type | Name | Description |
---|---|---|
System.Object | target | The target. |
Action | action | The action. |
System.Boolean | keepTargetAlive | if set to |
Properties
View SourceActionReference
Gets or sets the action reference.
Declaration
protected WeakReference ActionReference { get; set; }
Property Value
Type | Description |
---|---|
WeakReference | The action reference. |
ActionTarget
Gets the action target.
Declaration
protected object ActionTarget { get; }
Property Value
Type | Description |
---|---|
System.Object | The action target. |
IsAlive
Gets a value indicating whether this instance is alive.
Declaration
public virtual bool IsAlive { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
IsStatic
Gets a value indicating whether this instance is static.
Declaration
public bool IsStatic { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
LiveReference
Gets or sets the live reference.
Declaration
protected object LiveReference { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The live reference. |
Method
Gets or sets the method.
Declaration
protected MethodInfo Method { get; set; }
Property Value
Type | Description |
---|---|
MethodInfo | The method. |
MethodName
Gets the name of the method.
Declaration
public virtual string MethodName { get; }
Property Value
Type | Description |
---|---|
System.String | The name of the method. |
Reference
Gets or sets the reference.
Declaration
protected WeakReference Reference { get; set; }
Property Value
Type | Description |
---|---|
WeakReference | The reference. |
Target
Gets the target.
Declaration
public object Target { get; }
Property Value
Type | Description |
---|---|
System.Object | The target. |
Methods
View SourceExecute()
Executes this instance.
Declaration
public void Execute()
MarkForDeletion()
Marks for deletion.
Declaration
public void MarkForDeletion()