Ejemplo n.º 1
0
 internal MatchByTwoMembersStatement(MatchBuilder builder, string memberName1, Expression memberValue1, string memberName2, Expression memberValue2)
     : base(builder)
 {
     this.memberName1  = memberName1;
     this.memberValue1 = memberValue1;
     this.memberName2  = memberName2;
     this.memberValue2 = memberValue2;
 }
Ejemplo n.º 2
0
            private protected override MatchBuilder Build(MatchBuilder builder, Action <MemberExpression> scope)
            {
                var pattern = StructuralPattern(Sequence.Singleton((memberName, memberValue)));

                return(builder.MatchByCondition(pattern, new CaseStatementBuilder(this, memberName, scope)));
            }
Ejemplo n.º 3
0
 internal MatchByMemberStatement(MatchBuilder builder, string memberName, Expression memberValue)
     : base(builder)
 {
     this.memberName  = memberName;
     this.memberValue = memberValue;
 }
Ejemplo n.º 4
0
 private protected override MatchBuilder Build(MatchBuilder builder, Action <ParameterExpression> scope)
 {
     scope(builder.value);
     return(builder.Default(Build()));
 }
Ejemplo n.º 5
0
 internal DefaultStatement(MatchBuilder builder)
     : base(builder)
 {
 }
Ejemplo n.º 6
0
 private protected abstract MatchBuilder Build(MatchBuilder builder, D scope);
Ejemplo n.º 7
0
 private protected MatchStatement(MatchBuilder builder) => this.builder = builder;
Ejemplo n.º 8
0
 private protected override MatchBuilder Build(MatchBuilder builder, Action <MemberExpression, MemberExpression> scope)
 {
     var pattern = StructuralPattern(new[] { (memberName1, memberValue1), (memberName2, memberValue2) });
Ejemplo n.º 9
0
 private protected abstract MatchBuilder Build(MatchBuilder builder, TDelegate scope);