コード例 #1
0
 public ChoiceOptionEnabledWhenNodeParserTest()
 {
     elementParser     = A.Fake <IElementParser>(i => i.Strict());
     balloonTextParser = A.Dummy <IBalloonTextParser>();
     conditionParser   = A.Fake <IConditionParser>(i => i.Strict());
     sut = new(elementParser, balloonTextParser, conditionParser);
 }
コード例 #2
0
 public VersionedConditionParser()
 {
     parserLatest = new ConditionParser();
     parserV11    = new ConditionParser(new ConditionFormat {
         StatesUnderscored = true
     });
 }
コード例 #3
0
 public PermissionsService(IConditionParser parser, IDictionary <string, INode> nodeDefinitions,
                           IConditionEvaluator evaluator)
 {
     _parser          = parser;
     _nodeDefinitions = nodeDefinitions;
     _evaluator       = evaluator;
 }
コード例 #4
0
 public ConnectionsSectionReader(IXmlLoadLogger logger,
                                 IConditionParser conditionParser,
                                 IComponentPointParser componentPointParser)
 {
     this.logger               = logger;
     this.conditionParser      = conditionParser;
     this.componentPointParser = componentPointParser;
 }
コード例 #5
0
 public RenderSectionReader(
     IXmlLoadLogger logger,
     IConditionParser conditionParser,
     IComponentPointParser componentPointParser,
     IAutoRotateOptionsReader autoRotateOptionsReader,
     IIndex <string, IRenderCommandReader> renderCommandReaders)
 {
     this.logger                  = logger;
     this.conditionParser         = conditionParser;
     this.componentPointParser    = componentPointParser;
     this.autoRotateOptionsReader = autoRotateOptionsReader;
     this.renderCommandReaders    = renderCommandReaders;
 }
コード例 #6
0
 public RenderSectionWithDefinitionsReader(IXmlLoadLogger logger,
                                           IConditionParser conditionParser,
                                           IComponentPointParser componentPointParser,
                                           IComponentPointTemplateParser componentPointTemplateParser,
                                           ISectionRegistry sectionRegistry)
     : base(logger, conditionParser, componentPointParser)
 {
     this.logger                       = logger;
     this.conditionParser              = conditionParser;
     this.componentPointParser         = componentPointParser;
     this.componentPointTemplateParser = componentPointTemplateParser;
     definitionsSection                = sectionRegistry.GetSection <DefinitionsSection>();
     availableDefinitions              = definitionsSection?.Definitions.Select(x => x.Key).ToHashSet() ?? new HashSet <string>();
 }
コード例 #7
0
 public static bool Parse(this IConditionParser parser, XAttribute conditionsAttribute, ComponentDescription description, IXmlLoadLogger logger, out IConditionTreeItem value)
 {
     try
     {
         value = parser.Parse(description, conditionsAttribute.Value);
         return(true);
     }
     catch (ConditionFormatException ex)
     {
         IXmlLineInfo line     = conditionsAttribute;
         int          startCol = line.LinePosition + conditionsAttribute.Name.LocalName.Length + 2 + ex.PositionStart;
         var          position = new FileRange(line.LineNumber, startCol, line.LineNumber, startCol + ex.Length);
         logger.Log(LogLevel.Error, position, ex.Message, null);
         value = null;
         return(false);
     }
 }
コード例 #8
0
 public WhenAttributeParser(IConditionParser conditionParser)
 {
     this.conditionParser = conditionParser;
 }
コード例 #9
0
 public DefinitionsSectionReader(IXmlLoadLogger logger, IConditionParser conditionParser, ISectionRegistry sectionRegistry)
 {
     this.logger          = logger;
     this.conditionParser = conditionParser;
     this.sectionRegistry = sectionRegistry;
 }
コード例 #10
0
 public DeclarationSectionReader(IXmlLoadLogger logger, FeatureSwitcher featureSwitcher, IConditionParser conditionParser)
 {
     this.logger          = logger;
     this.featureSwitcher = featureSwitcher;
     this.conditionParser = conditionParser;
 }
コード例 #11
0
 public ChoiceOptionEnabledWhenNodeParser(IElementParser elementParser, IBalloonTextParser textParser, IConditionParser conditionParser)
 {
     this.elementParser   = elementParser;
     this.conditionParser = conditionParser;
     Settings             = ElementParserSettings.Normal(textParser);
 }