Esempio n. 1
0
        public void TextWithStartingQuote_TryMatchTextWithNoQuote_Matches()
        {
            var options = new[] { "abc", "xyz" };
            var match   = ArrayRunEnumSegment.TryMatch("\"ab", options, out int _);

            Assert.True(match);
        }
Esempio n. 2
0
        public void SingleQuote_TryMatch_NoMatch()
        {
            var options = new[] { "abc", "xyz" };
            var match   = ArrayRunEnumSegment.TryMatch("\"", options, out int _);

            Assert.False(match);
        }
Esempio n. 3
0
 public ModelArrayElement this[string value] {
     get {
         var table = model.GetNextRun(arrayAddress) as ITableRun;
         if (ArrayRunEnumSegment.TryMatch(value, table.ElementNames, out int index))
         {
             return(this[index]);
         }
         else
         {
             throw new NotImplementedException();
         }
     }
 }