Exemplo n.º 1
0
 public AsyncInfo(AsyncInfo other)
     : base(other)
 {
     this.listener   = other.listener;
     this.serverNode = other.serverNode;
     this.commands   = other.commands;
 }
Exemplo n.º 2
0
 public AsyncInfo(AsyncCluster cluster, InfoPolicy policy, InfoListener listener, AsyncNode node, params string[] commands)
     : base(cluster, CreatePolicy(policy))
 {
     this.listener   = listener;
     this.serverNode = node;
     this.commands   = commands;
 }
    public bool RemoveInfoListener(InfoCallback callback, object userData)
    {
        InfoListener item = new InfoListener();

        item.SetCallback(callback);
        item.SetUserData(userData);
        return(this.m_infoListeners.Remove(item));
    }
    public bool RegisterInfoListener(InfoCallback callback, object userData)
    {
        InfoListener item = new InfoListener();

        item.SetCallback(callback);
        item.SetUserData(userData);
        if (this.m_infoListeners.Contains(item))
        {
            return(false);
        }
        this.m_infoListeners.Add(item);
        return(true);
    }