Exemplo n.º 1
0
 public ParserResult(ParserResultOrigin origin, string originalText, string template, bool allowPartialTranslation, bool cacheCombinedResult, bool persistCombinedResult, bool persistTokenResult, Dictionary <string, string> args)
 {
     Origin                  = origin;
     OriginalText            = originalText;
     TranslationTemplate     = template;
     AllowPartialTranslation = allowPartialTranslation;
     CacheCombinedResult     = cacheCombinedResult;
     PersistCombinedResult   = persistCombinedResult;
     PersistTokenResult      = persistTokenResult;
     Arguments               = args;
 }
 public ParserResult(ParserResultOrigin origin, string originalText, string template, bool allowPartialTranslation, bool cacheCombinedResult, bool persistCombinedResult, bool persistTokenResult, Match match)
 {
     Origin                  = origin;
     OriginalText            = originalText;
     TranslationTemplate     = template;
     AllowPartialTranslation = allowPartialTranslation;
     CacheCombinedResult     = cacheCombinedResult;
     PersistCombinedResult   = persistCombinedResult;
     PersistTokenResult      = persistTokenResult;
     Match = match;
 }
Exemplo n.º 3
0
      public static bool HasBeenParsedBy( this ParserTranslationContext context, ParserResultOrigin parser )
      {
         var current = context;
         while( current != null )
         {
            if( current.Result.Origin == parser )
               return true;

            current = current.ParentContext;
         }
         return false;
      }