예제 #1
0
            public RulesBundle(ContextModel context, IRule rule)
            {
                DigitalCodeValidationRule       = new DigitalCodeValidationRule(context.Parent.DigitalCode, rule).LoadDigitalCodeNumber();
                RequiredLoadCarrierIdRule       = new RequiredLoadCarrierIdRule(context, rule);
                RequiredLoadCarrierQuantityRule = new RequiredLoadCarrierQuantityRule(context, rule);
                ValidSourceAccountRule          = new ValidSourceAccountRule(context, rule);
                ValidDestinationAccountRule     = new ValidDestinationAccountRule(context, rule);
                SufficientBalanceRule           = new SufficientBalanceRule(context, rule);

                // TODO Muss als Beispiel gesehen werden
                // OrderResourceRule = new ResourceRule<Olma.Order>(1, rule);
                // var getOperatorRule = new GetOperatorRule<ContextModel, Olma.Order>(context, (c) => c.Rules.OrderResourceRule.Context.Resource);
                // AuthorizationRule = new AuthorizationRule<Olma.Order, ContextModel, PostingAccountPermissionResource, CanCancelOrderRequirement>(getOperatorRule, rule);
            }
 public ContextModel([NotNull] MainRule.ContextModel request, [NotNull] ValidSourceAccountRule rule) :
     base(request, rule)
 {
 }