Exemplo n.º 1
0
 private void HandleEmptyListCase(StringPart part, TagType typeToReplace)
 {
     if (part.TagType != typeToReplace)
     {
         _tmpOutput.Add(part);
     }
     else
     {
         if (part.ActionType != ActionType.Close)
         {
             _tmpListIsEmpty = false;
             _tmpList.Add(part);
         }
         else
         {
             _tmpOutput.Add(new StringPart(part.Value));
         }
     }
 }
Exemplo n.º 2
0
 private void HandleFilledListCase(StringPart part, TagType typeToReplace)
 {
     if (part.TagType != typeToReplace)
     {
         _tmpList.Add(part);
     }
     else
     {
         if (part.ActionType != ActionType.Open)
         {
             UploadToTmpOutput(typeToReplace);
             ClearTmpList();
             _tmpListIsEmpty = true;
         }
         else
         {
             _tmpList.Add(new StringPart(part.Value));
         }
     }
 }
Exemplo n.º 3
0
 public SubstringParser(char escapeSymbol = '/')
 {
     EscapeSymbol    = escapeSymbol;
     _result         = new List <StringPart>();
     _lastStringPart = null;
 }