示例#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;
                    }
                }
            }
示例#2
0
 public ApplicationServiceCategory(IServiceCategory serviceCategory, IMapper mapper)
 {
     this.serviceCategory = serviceCategory;
     this.mapper          = mapper;
 }
示例#3
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 KindProxy(IServiceCategory modelElement) :
     base(modelElement, "kind")
 {
 }
 public CategoriesController(IServiceCategory service, ILogger <CategoriesController> log)
 {
     _service = service ?? throw new ArgumentNullException(nameof(service));
     Log      = log ?? throw new ArgumentNullException(nameof(log));
 }
示例#5
0
 public ServicesController(IAllServices iAllServices, IServiceCategory iServiceCat)
 {
     _allServices        = iAllServices;
     _allserviceCategory = iServiceCat;
 }
示例#6
0
 public AppCategory(IServiceCategory ServiceCategory) : base(ServiceCategory)
 {
     this.ServiceCategory = ServiceCategory;
 }