void ICapeUnitPort.Connect(object objectToConnect) { if (objectToConnect == null) { ATCOError = new CapeOpenError(); ATCOError.UserCode = (int)eCapeErrorInterfaceHR_tag.ECapeInvalidArgumentHR; ATCOError.UserInterfaceName = "ICapeUnitPort"; ATCOError.UserOperation = "Connect"; ATCOError.UserDescription = "The input argument has not been initialized"; throw (new COMException("Errore", (int)eCapeErrorInterfaceHR_tag.ECapeInvalidArgumentHR)); } else { if (objectToConnect is ICapeThermoMaterialObject) { ConnectedObject = CapeOpenThermoMaterialObject.Connect((ICapeThermoMaterialObject)objectToConnect); } else { throw new CapeOpenException(); } } }