本文整理汇总了C#中Mono.CompilerServices.SymbolWriter.SourceFileEntry类的典型用法代码示例。如果您正苦于以下问题:C# SourceFileEntry类的具体用法?C# SourceFileEntry怎么用?C# SourceFileEntry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SourceFileEntry类属于Mono.CompilerServices.SymbolWriter命名空间,在下文中一共展示了SourceFileEntry类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: MarkSequencePoint
public void MarkSequencePoint (int offset, SourceFileEntry file, int line, int column, bool is_hidden)
{
int file_idx = file != null ? file.Index : 0;
var lne = new LineNumberEntry (file_idx, line, column, offset, is_hidden);
if (method_lines.Count > 0) {
var prev = method_lines[method_lines.Count - 1];
//
// Same offset cannot be used for multiple lines
//
if (prev.Offset == offset) {
//
// Use the new location because debugger will adjust
// the breakpoint to next line with sequence point
//
if (LineNumberEntry.LocationComparer.Default.Compare (lne, prev) > 0)
method_lines[method_lines.Count - 1] = lne;
return;
}
}
method_lines.Add (lne);
}
开发者ID:dyxu,项目名称:vimrc,代码行数:25,代码来源:SourceMethodBuilder.cs
示例2: CompileUnitEntry
public CompileUnitEntry(MonoSymbolFile file, SourceFileEntry source)
{
this.file = file;
this.source = source;
this.Index = file.AddCompileUnit(this);
this.creating = true;
this.namespaces = new List<NamespaceEntry>();
}
开发者ID:FreshBirdZhe,项目名称:LSharp,代码行数:8,代码来源:CompileUnitEntry.cs
示例3: AddFile
public void AddFile(SourceFileEntry file)
{
if (!this.creating)
{
throw new InvalidOperationException();
}
if (this.include_files == null)
{
this.include_files = new List<SourceFileEntry>();
}
this.include_files.Add(file);
}
开发者ID:FreshBirdZhe,项目名称:LSharp,代码行数:12,代码来源:CompileUnitEntry.cs
示例4: GetDocument
private Document GetDocument(SourceFileEntry file)
{
string file_name = file.FileName;
Document document;
Document result;
if (this.documents.TryGetValue(file_name, out document))
{
result = document;
}
else
{
document = new Document(file_name);
this.documents.Add(file_name, document);
result = document;
}
return result;
}
开发者ID:qq1792,项目名称:LSharp,代码行数:17,代码来源:MdbReader.cs
示例5: ReadData
private void ReadData()
{
if (this.creating)
{
throw new InvalidOperationException();
}
lock (this.file)
{
if (this.namespaces == null)
{
MyBinaryReader reader = this.file.BinaryReader;
int old_pos = (int)reader.BaseStream.Position;
reader.BaseStream.Position = (long)this.DataOffset;
int source_idx = reader.ReadLeb128();
this.source = this.file.GetSourceFile(source_idx);
int count_includes = reader.ReadLeb128();
if (count_includes > 0)
{
this.include_files = new List<SourceFileEntry>();
for (int i = 0; i < count_includes; i++)
{
this.include_files.Add(this.file.GetSourceFile(reader.ReadLeb128()));
}
}
int count_ns = reader.ReadLeb128();
this.namespaces = new List<NamespaceEntry>();
for (int i = 0; i < count_ns; i++)
{
this.namespaces.Add(new NamespaceEntry(this.file, reader));
}
reader.BaseStream.Position = (long)old_pos;
}
}
}
开发者ID:FreshBirdZhe,项目名称:LSharp,代码行数:34,代码来源:CompileUnitEntry.cs
示例6: GetDocument
Document GetDocument (SourceFileEntry file)
{
Document doc = m_documents [file.FileName] as Document;
if (doc != null)
return doc;
doc = new Document (file.FileName);
m_documents [file.FileName] = doc;
return doc;
}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:11,代码来源:MdbReader.cs
示例7: GetSourceFile
public SourceFileEntry GetSourceFile (int index)
{
if ((index < 1) || (index > ot.SourceCount))
throw new ArgumentException ();
if (reader == null)
throw new InvalidOperationException ();
lock (this) {
SourceFileEntry source;
if (source_file_hash.TryGetValue (index, out source))
return source;
long old_pos = reader.BaseStream.Position;
reader.BaseStream.Position = ot.SourceTableOffset +
SourceFileEntry.Size * (index - 1);
source = new SourceFileEntry (this, reader);
source_file_hash.Add (index, source);
reader.BaseStream.Position = old_pos;
return source;
}
}
开发者ID:KAW0,项目名称:Alter-Native,代码行数:23,代码来源:MonoSymbolFile.cs
示例8: MarkSequencePoint
public void MarkSequencePoint (int offset, SourceFileEntry file, int line, int column,
bool is_hidden)
{
if (current_method == null)
return;
current_method.MarkSequencePoint (offset, file, line, column, is_hidden);
}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:8,代码来源:MonoSymbolWriter.cs
示例9: GetSourceFile
public SourceFileEntry GetSourceFile(int index)
{
if (index < 1 || index > this.ot.SourceCount)
{
throw new ArgumentException();
}
if (this.reader == null)
{
throw new InvalidOperationException();
}
SourceFileEntry result;
SourceFileEntry source;
if (this.source_file_hash.TryGetValue(index, out source))
{
result = source;
}
else
{
long old_pos = this.reader.BaseStream.Position;
this.reader.BaseStream.Position = (long)(this.ot.SourceTableOffset + SourceFileEntry.Size * (index - 1));
source = new SourceFileEntry(this, this.reader);
this.source_file_hash.Add(index, source);
this.reader.BaseStream.Position = old_pos;
result = source;
}
return result;
}
开发者ID:qq1792,项目名称:LSharp,代码行数:29,代码来源:MonoSymbolFile.cs
示例10: MarkSequencePoint
public void MarkSequencePoint(int offset, SourceFileEntry file, int start_line, int end_line,
int start_col, int end_col)
{
if (method_lines_pos == method_lines.Length) {
LineNumberEntry [] tmp = method_lines;
method_lines = new LineNumberEntry [method_lines.Length * 2];
Array.Copy (tmp, method_lines, method_lines_pos);
}
int file_idx = file != null ? file.Index : 0;
method_lines [method_lines_pos++] = new LineNumberEntry (
file_idx, offset, start_line, end_line, start_col, end_col);
}
开发者ID:baulig,项目名称:debugger,代码行数:13,代码来源:MonoSymbolWriter.cs
示例11: MonoSourceFile
public MonoSourceFile(DebuggerSession session, Module module,
C.SourceFileEntry file, string path)
: base(session, module, path)
{
this.file = file;
}
开发者ID:atomia,项目名称:mono_debugger,代码行数:6,代码来源:MonoSymbolFile.cs
示例12: MarkSequencePoint
public void MarkSequencePoint (int offset, SourceFileEntry file, int line, int column, bool is_hidden)
{
MarkSequencePoint (offset, file, line, column, -1, -1, is_hidden);
}
开发者ID:0xb1dd1e,项目名称:NRefactory,代码行数:4,代码来源:SourceMethodBuilder.cs
示例13: AddFile
public void AddFile (SourceFileEntry file)
{
if (!creating)
throw new InvalidOperationException ();
if (include_files == null)
include_files = new ArrayList ();
include_files.Add (file);
}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:10,代码来源:MonoSymbolTable.cs
示例14: DefineDocument
public SourceFileEntry DefineDocument (string url)
{
SourceFileEntry entry = new SourceFileEntry (file, url);
sources.Add (entry);
return entry;
}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:6,代码来源:MonoSymbolWriter.cs
示例15: AddSource
internal int AddSource (SourceFileEntry source)
{
sources.Add (source);
return sources.Count;
}
开发者ID:KAW0,项目名称:Alter-Native,代码行数:5,代码来源:MonoSymbolFile.cs
示例16: SourceFile
public SourceFile(CompileUnitEntry comp_unit, SourceFileEntry entry)
{
this.compilation_unit = comp_unit;
this.entry = entry;
}
开发者ID:juancarlosbaezpozos,项目名称:JustDecompileEngine,代码行数:5,代码来源:MdbWriter.cs
示例17: DefineCompilationUnit
public CompileUnitEntry DefineCompilationUnit (SourceFileEntry source)
{
CompileUnitEntry entry = new CompileUnitEntry (file, source);
comp_units.Add (entry);
return entry;
}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:6,代码来源:MonoSymbolWriter.cs
示例18: GetDocument
Document GetDocument (SourceFileEntry file)
{
var file_name = file.FileName;
Document document;
if (documents.TryGetValue (file_name, out document))
return document;
document = new Document (file_name);
documents.Add (file_name, document);
return document;
}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:13,代码来源:MdbReader.cs
示例19: DefineSymbolInfo
public virtual void DefineSymbolInfo (MonoSymbolWriter symwriter)
{
if (guid != null)
file = symwriter.DefineDocument (Path, guid, checksum);
else {
file = symwriter.DefineDocument (Path);
if (AutoGenerated)
file.SetAutoGenerated ();
}
}
开发者ID:afaerber,项目名称:mono,代码行数:10,代码来源:location.cs
示例20: ReadData
void ReadData ()
{
if (creating)
throw new InvalidOperationException ();
lock (file) {
if (namespaces != null)
return;
MyBinaryReader reader = file.BinaryReader;
int old_pos = (int) reader.BaseStream.Position;
reader.BaseStream.Position = DataOffset;
int source_idx = reader.ReadLeb128 ();
source = file.GetSourceFile (source_idx);
int count_includes = reader.ReadLeb128 ();
if (count_includes > 0) {
include_files = new ArrayList ();
for (int i = 0; i < count_includes; i++) {
// FIXME: The debugger will need this later on.
reader.ReadLeb128 ();
}
}
int count_ns = reader.ReadLeb128 ();
namespaces = new ArrayList ();
for (int i = 0; i < count_ns; i ++)
namespaces.Add (new NamespaceEntry (file, reader));
reader.BaseStream.Position = old_pos;
}
}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:34,代码来源:MonoSymbolTable.cs
注:本文中的Mono.CompilerServices.SymbolWriter.SourceFileEntry类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论