Exemple #1
0
    public void ReplaceTest2MultipleContextStandardEventListener(ITest2MultipleContextStandardEventListener newValue)
    {
        var index     = Test2ComponentsLookup.Test2MultipleContextStandardEventListener;
        var component = CreateComponent <Test2MultipleContextStandardEventListenerComponent>(index);

        component.value = newValue;
        ReplaceComponent(index, component);
    }
    public void AddTest2MultipleContextStandardEventListener(ITest2MultipleContextStandardEventListener value)
    {
        var listeners = hasTest2MultipleContextStandardEventListener
            ? test2MultipleContextStandardEventListener.value
            : new System.Collections.Generic.List <ITest2MultipleContextStandardEventListener>();

        listeners.Add(value);
        ReplaceTest2MultipleContextStandardEventListener(listeners);
    }
    public void RemoveTest2MultipleContextStandardEventListener(ITest2MultipleContextStandardEventListener value)
    {
        var listeners = test2MultipleContextStandardEventListener.value;

        listeners.Remove(value);
        if (listeners.Count == 0)
        {
            RemoveTest2MultipleContextStandardEventListener();
        }
        else
        {
            ReplaceTest2MultipleContextStandardEventListener(listeners);
        }
    }