public void ProduceReport(ref string message) { ATCOError = new CapeOpenError(); ATCOError.UserCode = (int)eCapeErrorInterfaceHR_tag.ECapeNoImplHR; ATCOError.UserInterfaceName = "ICapeUnitReport"; ATCOError.UserOperation = "ProduceReport"; ATCOError.UserDescription = "CAPE-OPEN reporting is not implemented in this Unit Operation."; throw (new COMException("Errore", (int)eCapeErrorInterfaceHR_tag.ECapeNoImplHR)); }
public void Save(ref object storage) { ATCOError = new CapeOpenError(); ATCOError.UserCode = (int)eCapeErrorInterfaceHR_tag.ECapeNoImplHR; ATCOError.UserInterfaceName = "ICapeUnit"; ATCOError.UserOperation = "Save"; ATCOError.UserDescription = "Save method is not implemented - use COM persistence instead."; throw (new COMException("Errore", (int)eCapeErrorInterfaceHR_tag.ECapeNoImplHR)); }
public CapeOpenUnitParameter GetParameterByName(string name) { for (int i = 0; i < List.Count; i++) { CapeOpenUnitParameter zParam = (CapeOpenUnitParameter)List[i]; if (zParam.Name == name) { return((CapeOpenUnitParameter)List[i]); } } ATCOError = new CapeOpenError(); ATCOError.UserCode = (int)CAPEOPEN093.eCapeErrorInterfaceHR_tag.ECapeInvalidArgumentHR; ATCOError.UserInterfaceName = "ICapeUnitCollection_Item"; ATCOError.UserOperation = "Item"; ATCOError.UserDescription = "The input value is a string but not rapresents a valid portname"; throw new COMException("Errore", (int)CAPEOPEN093.eCapeErrorInterfaceHR_tag.ECapeInvalidArgumentHR); }
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(); } } }
protected override object OnItem(object id) { //LogClass.WriteLog("On Item di Parameter: Count:" + List.Count.ToString()); Int16 indice16; int indice32; if (!(id is int) && !(id is string) && !(id is Int16)) { ATCOError = new CapeOpenError(); ATCOError.UserCode = (int)CAPEOPEN093.eCapeErrorInterfaceHR_tag.ECapeInvalidArgumentHR; ATCOError.UserInterfaceName = "ICapeUnitCollection_Item"; ATCOError.UserOperation = "Item"; ATCOError.UserDescription = "The input value is not a valid number or string"; throw (new COMException("Errore", (int)CAPEOPEN093.eCapeErrorInterfaceHR_tag.ECapeInvalidArgumentHR)); } else { if (id is string) { string str; str = (string)id; for (int i = 0; i < List.Count; i++) { CapeOpenUnitParameter zParameter = (CapeOpenUnitParameter)List[i]; if (zParameter.Name == str) { return(List[i]); } } ATCOError = new CapeOpenError(); ATCOError.UserCode = (int)CAPEOPEN093.eCapeErrorInterfaceHR_tag.ECapeInvalidArgumentHR; ATCOError.UserInterfaceName = "ICapeUnitCollection_Item"; ATCOError.UserOperation = "Item"; ATCOError.UserDescription = "The input value is a string but not rapresents a valid portname"; throw new COMException("Errore", (int)CAPEOPEN093.eCapeErrorInterfaceHR_tag.ECapeInvalidArgumentHR); } else {//int or int16 try { if (id is int) { indice32 = (int)id; return(List[indice32 - 1]); } if (id is Int16) { indice16 = (Int16)id; return(List[indice16 - 1]); } return(null); } catch { ATCOError = new CapeOpenError(); ATCOError.UserCode = (int)CAPEOPEN093.eCapeErrorInterfaceHR_tag.ECapeInvalidArgumentHR; ATCOError.UserInterfaceName = "ICapeUnitCollection_Item"; ATCOError.UserOperation = "Item"; ATCOError.UserDescription = "The input value is a integer but is out of index"; throw (new COMException("Errore", (int)CAPEOPEN093.eCapeErrorInterfaceHR_tag.ECapeInvalidArgumentHR)); } } } }