Class WeakEvent<T>

    Definition

    Namespace:
    Tizen.NUI
    Assembly:
    Tizen.NUI.dll

    The WeakEvent without holding strong reference of event handler.

    public class WeakEvent<T> where T : Delegate
    Inheritance
    object
    WeakEvent<T>

    Properties

    View Source

    Count

    The count of currently stored event handlers.

    Declaration
    protected int Count { get; }
    Property Value
    Type Description
    int

    Methods

    View Source

    Add(T)

    Adds an event handler to the list of weak references.

    Declaration
    public virtual void Add(T handler)
    Parameters
    Type Name Description
    T handler
    View Source

    Invoke(object, object)

    Invoke event handlers.

    Declaration
    public void Invoke(object sender, object args)
    Parameters
    Type Name Description
    object sender

    The source of the event.

    object args

    An object that contains event data.

    View Source

    OnCountDecreased()

    Invoked when the event handler count is decreased.

    Declaration
    protected virtual void OnCountDecreased()
    Remarks

    The event handler count decreases when an event handler is removed with Remove(T) or after detecting that it is no longer valid.

    View Source

    OnCountIncreased()

    Invoked when the event handler count is increased - a new event handler has been added.

    Declaration
    protected virtual void OnCountIncreased()
    View Source

    Remove(T)

    Remove last stored event handler equal to handler.

    Declaration
    public virtual void Remove(T handler)
    Parameters
    Type Name Description
    T handler

    The event handler to remove.

    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX