public TECProvidedController(TECProvidedController controllerSource, Dictionary <Guid, Guid> guidDictionary = null) : base(controllerSource, guidDictionary)
 {
     this._type = controllerSource.Type;
     foreach (TECIOModule module in controllerSource.IOModules)
     {
         this.IOModules.Add(module);
     }
 }
        public bool CanChangeType(TECControllerType newType)
        {
            if (newType == null)
            {
                return(false);
            }
            TECProvidedController possibleController = new TECProvidedController(newType);
            IOCollection          necessaryIO        = this.UsedIO;
            IOCollection          possibleIO         = possibleController.getPotentialIO() + possibleController.AvailableIO;

            return(possibleIO.Contains(necessaryIO));
        }
 public bool ChangeType(TECControllerType newType)
 {
     if (CanChangeType(newType))
     {
         this.IOModules.ObservablyClear();
         this.Type = newType;
         ModelCleanser.addRequiredIOModules(this);
         return(true);
     }
     else
     {
         return(false);
     }
 }
 public TECProvidedController(TECControllerType type) : this(Guid.NewGuid(), type)
 {
 }
 public TECProvidedController(Guid guid, TECControllerType type) : base(guid)
 {
     _type = type;
     this.IOModules.CollectionChanged += handleModulesChanged;
 }