public int LoadDocData(string pszMkDocument) { _document = new XinqDocument(); _document.Load(pszMkDocument); _editor.Document = _document; _editor.LoadDocument(); AdviseFileChanges(pszMkDocument); return(VSConstants.S_OK); }
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); }
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()); }
public int LoadDocData(string pszMkDocument) { _document = new XinqDocument(); _document.Load(pszMkDocument); _editor.Document = _document; _editor.LoadDocument(); AdviseFileChanges(pszMkDocument); return VSConstants.S_OK; }
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(); }