示例#1
0
 public MixinEvaluationResult(MixinDefinition mixin, MixinCall call, Scope closure, MixinGuardScope guardScope)
 {
     this.mixin      = mixin;
     this.call       = call;
     this.closure    = closure;
     this.guardScope = guardScope;
 }
示例#2
0
        public bool Guard(EvaluationContext context, MixinGuardScope guardScope)
        {
            if (guard == null)
            {
                return(true);
            }

            return(guard.SatisfiedBy(context, guardScope));
        }
示例#3
0
        public override bool SatisfiedBy(EvaluationContext context, MixinGuardScope guardScope)
        {
            if (!conditions.SatisfiedBy(context))
            {
                return(false);
            }

            guardScope.SetConditionGuard();

            return(true);
        }
示例#4
0
        public override bool SatisfiedBy(EvaluationContext context, MixinGuardScope guardScope)
        {
            if (guardScope.DefaultGuardMatched)
            {
                throw new EvaluationException("Ambiguous use of default()");
            }

            if (guardScope.ConditionGuardMatched)
            {
                return(false);
            }

            guardScope.SetDefaultGuard();

            return(true);
        }
示例#5
0
 public abstract bool SatisfiedBy(EvaluationContext context, MixinGuardScope guardScope);