예제 #1
0
        private Result MatchPair(JsonPair pair)
        {
            if (pair.Expected != null && ExpressionMatcher.MatcherRegex.IsMatch(pair.Expected.ToString()))
            {
                return(_expressionMatcher.MatchExpression(pair.Actual, pair.Expected.ToString()));
            }

            return(pair.IsEqual ? Result.Success() : Result.Failure(FormatError(pair.Actual, pair.Expected, pair.Path)));
        }
예제 #2
0
 /// <summary>Adds a new item.</summary>
 public void Add(JsonPair pair)
 {
     Add(pair.Key, pair.Value);
 }
예제 #3
0
 void ICollection <JsonPair> .Add(JsonPair item)
 {
     throw new NotImplementedException();
 }
예제 #4
0
 bool ICollection <JsonPair> .Remove(JsonPair item)
 {
     return((map as ICollection <JsonPair>).Remove(item));
 }
예제 #5
0
 bool ICollection <JsonPair> .Contains(JsonPair item)
 {
     return((map as ICollection <JsonPair>).Contains(item));
 }
예제 #6
0
 void ICollection <JsonPair> .Add(JsonPair item)
 {
     this.Add(item);
 }
예제 #7
0
 public override T VisitJsonPair(JsonPair node)
 {
     throw new NotImplementedException();
 }