Exemple #1
0
        public BaseInterface RemoveInterface(BaseInterface Interface)
        {
            lock (Interfaces)
                Interfaces.Remove(Interface);

            return(Interface);
        }
Exemple #2
0
        public BaseInterface AddInterface(BaseInterface Interface)
        {
            lock (Interfaces)
            {
                Interfaces.Add(Interface);
            }

            Interface.SetOwner(this);
            return(Interface);
        }
Exemple #3
0
        public T AddInterface <T>() where T : BaseInterface
        {
            BaseInterface Interface = Activator.CreateInstance <T>();

            lock (Interfaces)
            {
                Interfaces.Add(Interface);
            }

            Interface.SetOwner(this);
            return((T)Interface);
        }