protected CodeLinePragma CreateCodeLinePragma(string virtualPath, int lineNumber, int column, int generatedColumn, int codeLength, bool isCodeNugget) { if (!this.Parser.FLinePragmas) { return(null); } if (string.IsNullOrEmpty(virtualPath)) { return(null); } if (this._designerMode) { if (codeLength < 0) { return(null); } LinePragmaCodeInfo info = new LinePragmaCodeInfo { _startLine = lineNumber, _startColumn = column, _startGeneratedColumn = generatedColumn, _codeLength = codeLength, _isCodeNugget = isCodeNugget }; lineNumber = this._pragmaIdGenerator++; if (this._linePragmasTable == null) { this._linePragmasTable = new Hashtable(); } this._linePragmasTable[lineNumber] = info; } return(CreateCodeLinePragmaHelper(virtualPath, lineNumber)); }
protected internal virtual CodeCompileUnit GetCodeCompileUnit(out IDictionary linePragmasTable) { CodeSnippetCompileUnit unit = new CodeSnippetCompileUnit(Util.StringFromVirtualPath(this.VirtualPathObject)); LinePragmaCodeInfo info = new LinePragmaCodeInfo(1, 1, 1, -1, false); linePragmasTable = new Hashtable(); linePragmasTable[1] = info; return(unit); }
protected CodeLinePragma CreateCodeLinePragma(string virtualPath, int lineNumber, int column, int generatedColumn, int codeLength, bool isCodeNugget) { // Return null if we're not supposed to generate line pragmas if (!Parser.FLinePragmas) { return(null); } // The problem with disabling pragmas in non-debug is that we no longer // get line information on compile errors, while in v1 we did. So // unless we find a better solution, don't disable pragmas in non-debug /* * // Also, don't bother with pragmas unless we're compiling for debugging * if (!CompilParams.IncludeDebugInformation) * return null; */ if (String.IsNullOrEmpty(virtualPath)) { return(null); } if (_designerMode) { // Only generate pragmas for code blocks in designer mode if (codeLength < 0) { return(null); } LinePragmaCodeInfo codeInfo = new LinePragmaCodeInfo(); codeInfo._startLine = lineNumber; codeInfo._startColumn = column; codeInfo._startGeneratedColumn = generatedColumn; codeInfo._codeLength = codeLength; codeInfo._isCodeNugget = isCodeNugget; lineNumber = _pragmaIdGenerator++; if (_linePragmasTable == null) { _linePragmasTable = new Hashtable(); } _linePragmasTable[lineNumber] = codeInfo; } return(CreateCodeLinePragmaHelper(virtualPath, lineNumber)); }
// This is used in the CBM scenario only /// <devdoc> /// Returns the CodeCompileUnit and sets the associated dictionary containing the line pragmas. /// </devdoc> protected internal virtual CodeCompileUnit GetCodeCompileUnit(out IDictionary linePragmasTable) { // Default implementation with code at line 1 string sourceString = Util.StringFromVirtualPath(VirtualPathObject); CodeSnippetCompileUnit snippetCompileUnit = new CodeSnippetCompileUnit(sourceString); LinePragmaCodeInfo codeInfo = new LinePragmaCodeInfo(1 /* startLine */, 1 /* startColumn */, 1 /* startGeneratedColumn */, -1 /* codeLength */, false /* isCodeNuggest */); linePragmasTable = new Hashtable(); linePragmasTable[1] = codeInfo; return(snippetCompileUnit); }
protected CodeLinePragma CreateCodeLinePragma(string virtualPath, int lineNumber, int column, int generatedColumn, int codeLength, bool isCodeNugget) { // Return null if we're not supposed to generate line pragmas if (!Parser.FLinePragmas) return null; // The problem with disabling pragmas in non-debug is that we no longer // get line information on compile errors, while in v1 we did. So // unless we find a better solution, don't disable pragmas in non-debug /* // Also, don't bother with pragmas unless we're compiling for debugging if (!CompilParams.IncludeDebugInformation) return null; */ if (String.IsNullOrEmpty(virtualPath)) return null; if (_designerMode) { // Only generate pragmas for code blocks in designer mode if (codeLength < 0) return null; LinePragmaCodeInfo codeInfo = new LinePragmaCodeInfo(); codeInfo._startLine = lineNumber; codeInfo._startColumn = column; codeInfo._startGeneratedColumn = generatedColumn; codeInfo._codeLength = codeLength; codeInfo._isCodeNugget = isCodeNugget; lineNumber = _pragmaIdGenerator++; if (_linePragmasTable == null) _linePragmasTable = new Hashtable(); _linePragmasTable[lineNumber] = codeInfo; } return CreateCodeLinePragmaHelper(virtualPath, lineNumber); }
internal IDictionary GetLinePragmasTable() { LinePragmaCodeInfo info = new LinePragmaCodeInfo(this.lineNumber, this.startColumn, 1, -1, false); IDictionary dictionary = new Hashtable(); dictionary[this.lineNumber] = info; return dictionary; }
internal IDictionary GetLinePragmasTable() { LinePragmaCodeInfo codeInfo = new LinePragmaCodeInfo(); codeInfo._startLine = _lineNumber; codeInfo._startColumn = _startColumn; codeInfo._startGeneratedColumn = 1; codeInfo._codeLength = -1; codeInfo._isCodeNugget = false; IDictionary linePragmasTable = new Hashtable(); linePragmasTable[_lineNumber] = codeInfo; return linePragmasTable; }
internal IDictionary GetLinePragmasTable() { LinePragmaCodeInfo info = new LinePragmaCodeInfo { _startLine = this._lineNumber, _startColumn = this._startColumn, _startGeneratedColumn = 1, _codeLength = -1, _isCodeNugget = false }; IDictionary dictionary = new Hashtable(); dictionary[this._lineNumber] = info; return dictionary; }
// This is used in the CBM scenario only /// <devdoc> /// Returns the CodeCompileUnit and sets the associated dictionary containing the line pragmas. /// </devdoc> protected internal virtual CodeCompileUnit GetCodeCompileUnit(out IDictionary linePragmasTable) { // Default implementation with code at line 1 string sourceString = Util.StringFromVirtualPath(VirtualPathObject); CodeSnippetCompileUnit snippetCompileUnit = new CodeSnippetCompileUnit(sourceString); LinePragmaCodeInfo codeInfo = new LinePragmaCodeInfo(1 /* startLine */, 1 /* startColumn */, 1 /* startGeneratedColumn */, -1 /* codeLength */, false /* isCodeNuggest */); linePragmasTable = new Hashtable(); linePragmasTable[1] = codeInfo; return snippetCompileUnit; }
protected internal virtual CodeCompileUnit GetCodeCompileUnit(out IDictionary linePragmasTable) { CodeSnippetCompileUnit unit = new CodeSnippetCompileUnit(Util.StringFromVirtualPath(this.VirtualPathObject)); LinePragmaCodeInfo info = new LinePragmaCodeInfo(1, 1, 1, -1, false); linePragmasTable = new Hashtable(); linePragmasTable[1] = info; return unit; }