예제 #1
0
        public int LoadDocData(string pszMkDocument)
        {
            _document = new XinqDocument();
            _document.Load(pszMkDocument);

            _editor.Document = _document;
            _editor.LoadDocument();

            AdviseFileChanges(pszMkDocument);

            return(VSConstants.S_OK);
        }
예제 #2
0
        public int Load(string pszFilename, uint grfMode, int fReadOnly)
        {
            if (grfMode != 0)
            {
                throw new NotImplementedException();
            }

            var asReadOnly = (fReadOnly == 1);

            _document.Load(pszFilename, asReadOnly);

            return(VSConstants.S_OK);
        }
예제 #3
0
        protected override byte[] GenerateCode(string inputFileContent)
        {
            var stream = new MemoryStream();
            var writer = new StreamWriter(stream, Encoding.UTF8);

            var document = new XinqDocument();

            document.Load(InputFilePath);

            var compileUnit = GenerateCode(document);

            var generatorOptions = new CodeGeneratorOptions();

            GetCodeProvider().GenerateCodeFromCompileUnit(compileUnit, writer, generatorOptions);
            writer.Flush();

            return(stream.ToArray());
        }
예제 #4
0
        public int LoadDocData(string pszMkDocument)
        {
            _document = new XinqDocument();
            _document.Load(pszMkDocument);

            _editor.Document = _document;
            _editor.LoadDocument();

            AdviseFileChanges(pszMkDocument);

            return VSConstants.S_OK;
        }
예제 #5
0
        protected override byte[] GenerateCode(string inputFileContent)
        {
            var stream = new MemoryStream();
            var writer = new StreamWriter(stream, Encoding.UTF8);

            var document = new XinqDocument();
            document.Load(InputFilePath);

            var compileUnit = GenerateCode(document);

            var generatorOptions = new CodeGeneratorOptions();
            GetCodeProvider().GenerateCodeFromCompileUnit(compileUnit, writer, generatorOptions);
            writer.Flush();

            return stream.ToArray();
        }