/// <summary> /// Removes the given item from the collection /// </summary> /// <returns>True, if the item was removed, otherwise False</returns> /// <param name="item">The item that should be removed</param> public override bool Remove(IModelElement item) { IServiceDeliveryPoint serviceDeliveryPointItem = item.As <IServiceDeliveryPoint>(); if (((serviceDeliveryPointItem != null) && this._parent.ServiceDeliveryPoints.Remove(serviceDeliveryPointItem))) { return(true); } IErpPerson erpPersonItem = item.As <IErpPerson>(); if (((erpPersonItem != null) && this._parent.ErpPersons.Remove(erpPersonItem))) { return(true); } ICustomerAgreement customerAgreementItem = item.As <ICustomerAgreement>(); if (((customerAgreementItem != null) && this._parent.CustomerAgreements.Remove(customerAgreementItem))) { return(true); } IEndDeviceAsset endDeviceAssetItem = item.As <IEndDeviceAsset>(); if (((endDeviceAssetItem != null) && this._parent.EndDeviceAssets.Remove(endDeviceAssetItem))) { return(true); } return(false); }
/// <summary> /// Removes the given item from the collection /// </summary> /// <returns>True, if the item was removed, otherwise False</returns> /// <param name="item">The item that should be removed</param> public override bool Remove(IModelElement item) { ICustomerAgreement customerAgreementItem = item.As <ICustomerAgreement>(); if (((customerAgreementItem != null) && this._parent.CustomerAgreements.Remove(customerAgreementItem))) { return(true); } if ((this._parent.ValidityInterval == item)) { this._parent.ValidityInterval = null; return(true); } IEndDeviceGroup endDeviceGroupItem = item.As <IEndDeviceGroup>(); if (((endDeviceGroupItem != null) && this._parent.EndDeviceGroups.Remove(endDeviceGroupItem))) { return(true); } IEndDeviceControl endDeviceControlItem = item.As <IEndDeviceControl>(); if (((endDeviceControlItem != null) && this._parent.EndDeviceControls.Remove(endDeviceControlItem))) { return(true); } return(false); }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { IServiceDeliveryPoint serviceDeliveryPointsCasted = item.As <IServiceDeliveryPoint>(); if ((serviceDeliveryPointsCasted != null)) { this._parent.ServiceDeliveryPoints.Add(serviceDeliveryPointsCasted); } IErpPerson erpPersonsCasted = item.As <IErpPerson>(); if ((erpPersonsCasted != null)) { this._parent.ErpPersons.Add(erpPersonsCasted); } ICustomerAgreement customerAgreementsCasted = item.As <ICustomerAgreement>(); if ((customerAgreementsCasted != null)) { this._parent.CustomerAgreements.Add(customerAgreementsCasted); } IEndDeviceAsset endDeviceAssetsCasted = item.As <IEndDeviceAsset>(); if ((endDeviceAssetsCasted != null)) { this._parent.EndDeviceAssets.Add(endDeviceAssetsCasted); } }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { IWorkBillingInfo workBillingInfosCasted = item.As <IWorkBillingInfo>(); if ((workBillingInfosCasted != null)) { this._parent.WorkBillingInfos.Add(workBillingInfosCasted); } ITransaction paymentTransactionsCasted = item.As <ITransaction>(); if ((paymentTransactionsCasted != null)) { this._parent.PaymentTransactions.Add(paymentTransactionsCasted); } ICustomerAgreement customerAgreementsCasted = item.As <ICustomerAgreement>(); if ((customerAgreementsCasted != null)) { this._parent.CustomerAgreements.Add(customerAgreementsCasted); } IErpInvoice erpInvoiceesCasted = item.As <IErpInvoice>(); if ((erpInvoiceesCasted != null)) { this._parent.ErpInvoicees.Add(erpInvoiceesCasted); } ICustomerBillingInfo customerBillingInfosCasted = item.As <ICustomerBillingInfo>(); if ((customerBillingInfosCasted != null)) { this._parent.CustomerBillingInfos.Add(customerBillingInfosCasted); } }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { ICustomerAgreement customerAgreementsCasted = item.As <ICustomerAgreement>(); if ((customerAgreementsCasted != null)) { this._parent.CustomerAgreements.Add(customerAgreementsCasted); } if ((this._parent.ValidityInterval == null)) { IDateTimeInterval validityIntervalCasted = item.As <IDateTimeInterval>(); if ((validityIntervalCasted != null)) { this._parent.ValidityInterval = validityIntervalCasted; return; } } IEndDeviceGroup endDeviceGroupsCasted = item.As <IEndDeviceGroup>(); if ((endDeviceGroupsCasted != null)) { this._parent.EndDeviceGroups.Add(endDeviceGroupsCasted); } IEndDeviceControl endDeviceControlsCasted = item.As <IEndDeviceControl>(); if ((endDeviceControlsCasted != null)) { this._parent.EndDeviceControls.Add(endDeviceControlsCasted); } }
/// <summary> /// Removes the given item from the collection /// </summary> /// <returns>True, if the item was removed, otherwise False</returns> /// <param name="item">The item that should be removed</param> public override bool Remove(IModelElement item) { ISDPAccountingFunction sDPAccountingFunctionItem = item.As <ISDPAccountingFunction>(); if (((sDPAccountingFunctionItem != null) && this._parent.SPAccountingFunctions.Remove(sDPAccountingFunctionItem))) { return(true); } IServiceDeliveryPoint serviceDeliveryPointItem = item.As <IServiceDeliveryPoint>(); if (((serviceDeliveryPointItem != null) && this._parent.ServiceDeliveryPoints.Remove(serviceDeliveryPointItem))) { return(true); } ICustomerAgreement customerAgreementItem = item.As <ICustomerAgreement>(); if (((customerAgreementItem != null) && this._parent.CustomerAgreements.Remove(customerAgreementItem))) { return(true); } IPricingStructure pricingStructureItem = item.As <IPricingStructure>(); if (((pricingStructureItem != null) && this._parent.PricingStructures.Remove(pricingStructureItem))) { return(true); } return(false); }
/// <summary> /// Removes the given item from the collection /// </summary> /// <returns>True, if the item was removed, otherwise False</returns> /// <param name="item">The item that should be removed</param> public override bool Remove(IModelElement item) { IServiceDeliveryPoint serviceDeliveryPointItem = item.As <IServiceDeliveryPoint>(); if (((serviceDeliveryPointItem != null) && this._parent.ServiceDeliveryPoints.Remove(serviceDeliveryPointItem))) { return(true); } IBankAccount bankAccountItem = item.As <IBankAccount>(); if (((bankAccountItem != null) && this._parent.BankAccounts.Remove(bankAccountItem))) { return(true); } ICustomerAgreement customerAgreementItem = item.As <ICustomerAgreement>(); if (((customerAgreementItem != null) && this._parent.CustomerAgreements.Remove(customerAgreementItem))) { return(true); } return(false); }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { ISDPAccountingFunction sPAccountingFunctionsCasted = item.As <ISDPAccountingFunction>(); if ((sPAccountingFunctionsCasted != null)) { this._parent.SPAccountingFunctions.Add(sPAccountingFunctionsCasted); } IServiceDeliveryPoint serviceDeliveryPointsCasted = item.As <IServiceDeliveryPoint>(); if ((serviceDeliveryPointsCasted != null)) { this._parent.ServiceDeliveryPoints.Add(serviceDeliveryPointsCasted); } ICustomerAgreement customerAgreementsCasted = item.As <ICustomerAgreement>(); if ((customerAgreementsCasted != null)) { this._parent.CustomerAgreements.Add(customerAgreementsCasted); } IPricingStructure pricingStructuresCasted = item.As <IPricingStructure>(); if ((pricingStructuresCasted != null)) { this._parent.PricingStructures.Add(pricingStructuresCasted); } }
/// <summary> /// Removes the given item from the collection /// </summary> /// <returns>True, if the item was removed, otherwise False</returns> /// <param name="item">The item that should be removed</param> public override bool Remove(IModelElement item) { IOperationalLimitSet operationalLimitSetItem = item.As <IOperationalLimitSet>(); if (((operationalLimitSetItem != null) && this._parent.OperationalLimitSet.Remove(operationalLimitSetItem))) { return(true); } IContingencyEquipment contingencyEquipmentItem = item.As <IContingencyEquipment>(); if (((contingencyEquipmentItem != null) && this._parent.ContingencyEquipment.Remove(contingencyEquipmentItem))) { return(true); } ICustomerAgreement customerAgreementItem = item.As <ICustomerAgreement>(); if (((customerAgreementItem != null) && this._parent.CustomerAgreements.Remove(customerAgreementItem))) { return(true); } if ((this._parent.EquipmentContainer == item)) { this._parent.EquipmentContainer = null; return(true); } return(false); }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { IOperationalLimitSet operationalLimitSetCasted = item.As <IOperationalLimitSet>(); if ((operationalLimitSetCasted != null)) { this._parent.OperationalLimitSet.Add(operationalLimitSetCasted); } IContingencyEquipment contingencyEquipmentCasted = item.As <IContingencyEquipment>(); if ((contingencyEquipmentCasted != null)) { this._parent.ContingencyEquipment.Add(contingencyEquipmentCasted); } ICustomerAgreement customerAgreementsCasted = item.As <ICustomerAgreement>(); if ((customerAgreementsCasted != null)) { this._parent.CustomerAgreements.Add(customerAgreementsCasted); } if ((this._parent.EquipmentContainer == null)) { IEquipmentContainer equipmentContainerCasted = item.As <IEquipmentContainer>(); if ((equipmentContainerCasted != null)) { this._parent.EquipmentContainer = equipmentContainerCasted; return; } } }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { IEndDeviceEvent endDeviceEventsCasted = item.As <IEndDeviceEvent>(); if ((endDeviceEventsCasted != null)) { this._parent.EndDeviceEvents.Add(endDeviceEventsCasted); } if ((this._parent.ServiceDeliveryPoint == null)) { IServiceDeliveryPoint serviceDeliveryPointCasted = item.As <IServiceDeliveryPoint>(); if ((serviceDeliveryPointCasted != null)) { this._parent.ServiceDeliveryPoint = serviceDeliveryPointCasted; return; } } if ((this._parent.CustomerAgreement == null)) { ICustomerAgreement customerAgreementCasted = item.As <ICustomerAgreement>(); if ((customerAgreementCasted != null)) { this._parent.CustomerAgreement = customerAgreementCasted; return; } } if ((this._parent.MeterAsset == null)) { IMeterAsset meterAssetCasted = item.As <IMeterAsset>(); if ((meterAssetCasted != null)) { this._parent.MeterAsset = meterAssetCasted; return; } } if ((this._parent.ValuesInterval == null)) { IDateTimeInterval valuesIntervalCasted = item.As <IDateTimeInterval>(); if ((valuesIntervalCasted != null)) { this._parent.ValuesInterval = valuesIntervalCasted; return; } } IReading readingsCasted = item.As <IReading>(); if ((readingsCasted != null)) { this._parent.Readings.Add(readingsCasted); } IIntervalBlock intervalBlocksCasted = item.As <IIntervalBlock>(); if ((intervalBlocksCasted != null)) { this._parent.IntervalBlocks.Add(intervalBlocksCasted); } }
public SOSService(ICustomerAgreement customerAgreement, IECAPIManagerRepository ecAPIManagerRepository, ILog logger) { this.custAgreement = customerAgreement; this.ecAPIManager = ecAPIManagerRepository; log = logger; //log.Info(string.Format("Carla Connection ip=[0} port={1}", Properties.Settings.Default.Ip7913, Properties.Settings.Default.port7913)); var bs = new Bootstrapper(); bs.Initialize(); }
public void init() { //Arrange string ip = "192.168.16.98"; int port = 1074; string logfile = "test.log"; custAgreement = new CustomerAgreementRepo(); ecAPIManager = new ECAPIManagerRepository(ip, port, logfile); log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { IServiceDeliveryPoint serviceDeliveryPointsCasted = item.As <IServiceDeliveryPoint>(); if ((serviceDeliveryPointsCasted != null)) { this._parent.ServiceDeliveryPoints.Add(serviceDeliveryPointsCasted); } IBankAccount bankAccountsCasted = item.As <IBankAccount>(); if ((bankAccountsCasted != null)) { this._parent.BankAccounts.Add(bankAccountsCasted); } ICustomerAgreement customerAgreementsCasted = item.As <ICustomerAgreement>(); if ((customerAgreementsCasted != null)) { this._parent.CustomerAgreements.Add(customerAgreementsCasted); } }
/// <summary> /// Removes the given item from the collection /// </summary> /// <returns>True, if the item was removed, otherwise False</returns> /// <param name="item">The item that should be removed</param> public override bool Remove(IModelElement item) { IWorkBillingInfo workBillingInfoItem = item.As <IWorkBillingInfo>(); if (((workBillingInfoItem != null) && this._parent.WorkBillingInfos.Remove(workBillingInfoItem))) { return(true); } ITransaction transactionItem = item.As <ITransaction>(); if (((transactionItem != null) && this._parent.PaymentTransactions.Remove(transactionItem))) { return(true); } ICustomerAgreement customerAgreementItem = item.As <ICustomerAgreement>(); if (((customerAgreementItem != null) && this._parent.CustomerAgreements.Remove(customerAgreementItem))) { return(true); } IErpInvoice erpInvoiceItem = item.As <IErpInvoice>(); if (((erpInvoiceItem != null) && this._parent.ErpInvoicees.Remove(erpInvoiceItem))) { return(true); } ICustomerBillingInfo customerBillingInfoItem = item.As <ICustomerBillingInfo>(); if (((customerBillingInfoItem != null) && this._parent.CustomerBillingInfos.Remove(customerBillingInfoItem))) { return(true); } return(false); }