Class WeakEvent<T>
Definition
- Assembly:
- Tizen.NUI.dll
The WeakEvent without holding strong reference of event handler.
public class WeakEvent<T> where T : Delegate
- Inheritance
-
objectWeakEvent<T>
Properties
View SourceCount
The count of currently added event handlers.
Declaration
protected int Count { get; }
Property Value
Type | Description |
---|---|
int |
Methods
View SourceAdd(T)
Add an event handler.
Declaration
public virtual void Add(T handler)
Parameters
Type | Name | Description |
---|---|---|
T | handler |
Invoke(object, object)
Invoke event handlers.
Declaration
public void Invoke(object sender, object args)
Parameters
Type | Name | Description |
---|---|---|
object | sender | |
object | args |
OnCountDicreased()
Invoked when the event handler count is decreased.
Declaration
protected virtual void OnCountDicreased()
OnCountIncreased()
Invoked when the event handler count is increased.
Declaration
protected virtual void OnCountIncreased()
Remove(T)
Remove last added event handler.
Declaration
public virtual void Remove(T handler)
Parameters
Type | Name | Description |
---|---|---|
T | handler |