Пример #1
0
        public WxsGenerator(SwixModel model, GuidProvider guidProvider)
        {
            _model        = model;
            _guidProvider = guidProvider;

            DetectIfModule();
            VerifyDirectories();
            AssignCabFileIds();
            FindNonUniqueDirectoryReadableIds();
            AssignDirectoryIds();
            VerifyDirectoryRefs();
            VerifyCabFileRefs();
            HandleInlineTargetDirSpecifications();
        }
Пример #2
0
        private SwixModel Run(IDictionary <string, string> variableDefinitions)
        {
            var result          = new SwixModel();
            var semanticContext = new FileSemanticContext(result, _guidProvider);

            if (variableDefinitions != null)
            {
                semanticContext.SetPredefinedSwixVariables(variableDefinitions);
            }
            IParsingContext parsingContext = new ParsingContext(semanticContext);
            var             lexer          = new AhlLexer(parsingContext, _sourceStream);

            lexer.Run();
            return(result);
        }
Пример #3
0
        public CabFilesSection(int line, IAttributeContext attributeContext, SwixModel model)
            : base(line, attributeContext)
        {
            _model = model;

            string startFromStr = attributeContext.GetInheritedAttribute("startFrom");

            if (startFromStr != null)
            {
                int startFrom;
                if (!int.TryParse(startFromStr, out startFrom))
                {
                    throw new SwixSemanticException(CurrentLine, "Can't parse startFrom number for cabFiles section");
                }
                _diskIdsStartFrom = startFrom;
            }
        }
Пример #4
0
 public FileSemanticContext(SwixModel result, GuidProvider guidProvider)
     : base(0, new AttributeContext(new Dictionary <string, string>(), guidProvider))
 {
     _result = result;
 }