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; }
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; }