Beispiel #1
0
            public RangeMatchEntry(TOperand minOperand, TOperand maxOperand)
            {
                MinOperand = minOperand;
                MaxOperand = maxOperand;

                IntRange = new Interval <int>(ConvertOperand(minOperand), ConvertOperand(maxOperand));
            }
 public IndexerLocation(TOperand operand, object[] indices, MethodInfo getMethod, MethodInfo setMethod)
 {
     this.operand   = operand;
     this.indices   = indices;
     this.getMethod = getMethod;
     this.setMethod = setMethod;
 }
 public SingleOperandRangeLookup(TOperand from, TOperand to, ExecutionPathGroup executionPath, ExecutionPathGroup emptyGroup)
 {
     _executionPath = executionPath;
     _emptyGroup    = emptyGroup;
     _minValue      = ConvertOperand(from);
     _maxValue      = ConvertOperand(to);
 }
Beispiel #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="IndexerLocation" /> class.
 /// </summary>
 /// <param name="operand">The operand.</param>
 /// <param name="indices">The indices.</param>
 /// <param name="getMethod">The get method.</param>
 /// <param name="setMethod">The set method.</param>
 /// <param name="getFunc">The get function.</param>
 /// <param name="setFunc">The set function.</param>
 public IndexerLocation(TOperand operand, object[] indices, MethodInfo getMethod, MethodInfo setMethod,
                        Func <object, object[], object> getFunc, Func <object, object[], object> setFunc)
     : base()
 {
     this.SerializedOperand   = operand;
     this.SerializedIndices   = indices;
     this.SerializedGetMethod = getMethod;
     this.SerializedSetMethod = setMethod;
     this.getFunc             = getFunc;
     this.setFunc             = setFunc;
 }
Beispiel #5
0
 public IndexerLocation(TOperand operand, object[] indices, MethodInfo getMethod, MethodInfo setMethod,
                        Func <object, object[], object> getFunc, Func <object, object[], object> setFunc)
     : base()
 {
     _operand   = operand;
     _indices   = indices;
     _getMethod = getMethod;
     _setMethod = setMethod;
     _getFunc   = getFunc;
     _setFunc   = setFunc;
 }
Beispiel #6
0
            public override bool Match(TOperand operand)
            {
                for (var index = 0; index < Matches.Length; index++)
                {
                    var match = Matches[index];

                    if (match.Match(operand))
                    {
                        return(true);
                    }
                }

                return(false);
            }
 public override bool Match(TOperand operand)
 {
     return(Equals(operand, Operand));
 }
 public SingleMatchEntry(TOperand operand)
 {
     Operand    = operand;
     IntOperand = ConvertOperand(operand);
 }
Beispiel #9
0
 public override bool Match(TOperand operand)
 {
     return(IntRange.Contains(ConvertOperand(operand)));
 }
 public SingleOperandLookup(TOperand operand, ExecutionPathGroup executionPath, ExecutionPathGroup emptyGroup)
 {
     _operand       = ConvertOperand(operand);
     _executionPath = executionPath;
     _emptyGroup    = emptyGroup;
 }
 private static Interval <int> CreateRange(TOperand minimum, TOperand maximum)
 {
     return(new Interval <int>(ConvertOperand(minimum), ConvertOperand(maximum)));
 }
Beispiel #12
0
 public abstract bool Match(TOperand operand);
 public ExecutionPathGroup(TOperand operand, IEnumerable <ExecutionPath> executionPaths)
 {
     Match          = new SingleMatchEntry(operand);
     ExecutionPaths = BuildPathArray(executionPaths);
 }