Exemple #1
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                if ((this._parent.AvailableCredit == null))
                {
                    IAccountingUnit availableCreditCasted = item.As <IAccountingUnit>();
                    if ((availableCreditCasted != null))
                    {
                        this._parent.AvailableCredit = availableCreditCasted;
                        return;
                    }
                }
                ICreditRegister creditRegistersCasted = item.As <ICreditRegister>();

                if ((creditRegistersCasted != null))
                {
                    this._parent.CreditRegisters.Add(creditRegistersCasted);
                }
                IChargeRegister chargeRegistersCasted = item.As <IChargeRegister>();

                if ((chargeRegistersCasted != null))
                {
                    this._parent.ChargeRegisters.Add(chargeRegistersCasted);
                }
                if ((this._parent.LowCreditWarningLevel == null))
                {
                    IAccountingUnit lowCreditWarningLevelCasted = item.As <IAccountingUnit>();
                    if ((lowCreditWarningLevelCasted != null))
                    {
                        this._parent.LowCreditWarningLevel = lowCreditWarningLevelCasted;
                        return;
                    }
                }
                if ((this._parent.CreditExpiryLevel == null))
                {
                    IAccountingUnit creditExpiryLevelCasted = item.As <IAccountingUnit>();
                    if ((creditExpiryLevelCasted != null))
                    {
                        this._parent.CreditExpiryLevel = creditExpiryLevelCasted;
                        return;
                    }
                }
                if ((this._parent.ServiceKind == null))
                {
                    IServiceCategory serviceKindCasted = item.As <IServiceCategory>();
                    if ((serviceKindCasted != null))
                    {
                        this._parent.ServiceKind = serviceKindCasted;
                        return;
                    }
                }
            }
Exemple #2
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IAuxiliaryAccount auxiliaryAccountsCasted = item.As <IAuxiliaryAccount>();

                if ((auxiliaryAccountsCasted != null))
                {
                    this._parent.AuxiliaryAccounts.Add(auxiliaryAccountsCasted);
                }
                if ((this._parent.ParentCharge == null))
                {
                    ICharge parentChargeCasted = item.As <ICharge>();
                    if ((parentChargeCasted != null))
                    {
                        this._parent.ParentCharge = parentChargeCasted;
                        return;
                    }
                }
                IConsumptionTariffInterval consumptionTariffIntervalsCasted = item.As <IConsumptionTariffInterval>();

                if ((consumptionTariffIntervalsCasted != null))
                {
                    this._parent.ConsumptionTariffIntervals.Add(consumptionTariffIntervalsCasted);
                }
                ICharge childChargesCasted = item.As <ICharge>();

                if ((childChargesCasted != null))
                {
                    this._parent.ChildCharges.Add(childChargesCasted);
                }
                ITimeTariffInterval timeTariffIntervalsCasted = item.As <ITimeTariffInterval>();

                if ((timeTariffIntervalsCasted != null))
                {
                    this._parent.TimeTariffIntervals.Add(timeTariffIntervalsCasted);
                }
                if ((this._parent.FixedPortion == null))
                {
                    IAccountingUnit fixedPortionCasted = item.As <IAccountingUnit>();
                    if ((fixedPortionCasted != null))
                    {
                        this._parent.FixedPortion = fixedPortionCasted;
                        return;
                    }
                }
            }
Exemple #3
0
 /// <summary>
 /// Adds the given element to the collection
 /// </summary>
 /// <param name="item">The item to add</param>
 public override void Add(IModelElement item)
 {
     if ((this._parent.CreditAmount == null))
     {
         IAccountingUnit creditAmountCasted = item.As <IAccountingUnit>();
         if ((creditAmountCasted != null))
         {
             this._parent.CreditAmount = creditAmountCasted;
             return;
         }
     }
     if ((this._parent.SDPAccountingFunction == null))
     {
         ISDPAccountingFunction sDPAccountingFunctionCasted = item.As <ISDPAccountingFunction>();
         if ((sDPAccountingFunctionCasted != null))
         {
             this._parent.SDPAccountingFunction = sDPAccountingFunctionCasted;
             return;
         }
     }
 }
Exemple #4
0
 /// <summary>
 /// Creates a new observable property access proxy
 /// </summary>
 /// <param name="modelElement">The model instance element for which to create the property access proxy</param>
 public MultiplierProxy(IAccountingUnit modelElement) :
     base(modelElement, "multiplier")
 {
 }
Exemple #5
0
 /// <summary>
 /// Creates a new observable property access proxy
 /// </summary>
 /// <param name="modelElement">The model instance element for which to create the property access proxy</param>
 public MonetaryUnitProxy(IAccountingUnit modelElement) :
     base(modelElement, "monetaryUnit")
 {
 }