Exemplo n.º 1
0
        private void tryAddingComponent(object o)
        {
            if (o is IAliasAnswerer)
            {
                IAliasAnswerer        asAns = (IAliasAnswerer)o;
                List <IAliasAnswerer> answerers;

                if (asAns.getAlias() == null)
                {
                    return;
                }

                if (components.ContainsKey(asAns.getAlias()))
                {
                    answerers = components[asAns.getAlias()];
                    answerers.Add(asAns);
                }
                else
                {
                    answerers = new List <IAliasAnswerer>();
                    answerers.Add(asAns);
                    components.Add(asAns.getAlias(), answerers);
                }

                notifyAliasAdd(asAns.getAlias(), asAns);
            }
        }
Exemplo n.º 2
0
 //public void unregisterComponent(IAliased comp)
 public void unregisterComponent(IAliasAnswerer comp)
 {
     try
     {
         unregisterComponent(comp.getAlias());
     }
     catch (Exception e)
     {
     }
 }
Exemplo n.º 3
0
        //public void registerComponent(string alias, IAliased comp)
        public void registerComponent(string alias, IAliasAnswerer comp)
        {
            if (alias != null && alias.Length > 0)
            {
                if (components.ContainsKey(comp.getAlias()))
                {
                    components[comp.getAlias()] = comp;
                }
                else
                {
                    components.Add(alias, comp);
                }

                if (socket != null && active)
                {
                    notifyAliasAdd(alias);
                }
            }
        }
Exemplo n.º 4
0
        //public void registerComponent(string alias, IAliased comp)
        public void registerComponent(string alias, IAliasAnswerer comp)
        {
            if (alias != null && alias.Length > 0)
            {
                if (components.ContainsKey(comp.getAlias()))
                {
                    components[comp.getAlias()] = comp;
                }
                else
                {
                    components.Add(alias, comp);
                }

                if (socket != null && active)
                {
                    notifyAliasAdd(alias);
                }
            }
        }
Exemplo n.º 5
0
        private void tryRemovingComponent(object o)
        {
            if (o is IAliasAnswerer)
            {
                IAliasAnswerer asAns = (IAliasAnswerer)o;

                if (asAns.getAlias() == null)
                {
                    return;
                }

                List <IAliasAnswerer> answerers = components[asAns.getAlias()];

                if (answerers != null)
                {
                    answerers.Remove(asAns);
                }
            }
        }
Exemplo n.º 6
0
        //public void unregisterComponent(IAliased comp)
        public void unregisterComponent(IAliasAnswerer comp)
        {
            try
            {
                unregisterComponent(comp.getAlias());
            }
            catch (Exception e)
            {

            }
        }
Exemplo n.º 7
0
 //public void registerComponent(IAliased comp)
 public void registerComponent(IAliasAnswerer comp)
 {
     registerComponent(comp.getAlias(), comp);
 }
Exemplo n.º 8
0
 //public void registerComponent(IAliased comp)
 public void registerComponent(IAliasAnswerer comp)
 {
     registerComponent(comp.getAlias(), comp);
 }