public BaseInterface RemoveInterface(BaseInterface Interface) { lock (Interfaces) Interfaces.Remove(Interface); return(Interface); }
public BaseInterface AddInterface(BaseInterface Interface) { lock (Interfaces) { Interfaces.Add(Interface); } Interface.SetOwner(this); return(Interface); }
public T AddInterface <T>() where T : BaseInterface { BaseInterface Interface = Activator.CreateInstance <T>(); lock (Interfaces) { Interfaces.Add(Interface); } Interface.SetOwner(this); return((T)Interface); }