Permalink
Browse files

Expose ModuleDefinition.SymbolReader

  • Loading branch information...
1 parent 5d43150 commit cf83e6fdbe0f6b676521ba641174a3085af60d0b @jbevain committed Feb 22, 2012
Showing with 12 additions and 8 deletions.
  1. +2 −2 Mono.Cecil.Cil/CodeReader.cs
  2. +2 −2 Mono.Cecil/AssemblyWriter.cs
  3. +8 −4 Mono.Cecil/ModuleDefinition.cs
@@ -102,7 +102,7 @@ void ReadMethodBody ()
throw new InvalidOperationException ();
}
- var symbol_reader = reader.module.SymbolReader;
+ var symbol_reader = reader.module.symbol_reader;
if (symbol_reader != null) {
var instructions = body.Instructions;
@@ -409,7 +409,7 @@ public ByteBuffer PatchRawMethodBody (MethodDefinition method, CodeWriter writer
throw new NotSupportedException ();
}
- var symbol_reader = reader.module.SymbolReader;
+ var symbol_reader = reader.module.symbol_reader;
if (symbol_reader != null && writer.metadata.write_symbols) {
symbols.method_token = GetOriginalToken (writer.metadata, method);
symbols.local_var_token = local_var_token;
@@ -109,8 +109,8 @@ public static void WriteModuleTo (ModuleDefinition module, Stream stream, Writer
BuildMetadata (module, metadata);
- if (module.SymbolReader != null)
- module.SymbolReader.Dispose ();
+ if (module.symbol_reader != null)
+ module.symbol_reader.Dispose ();
var writer = ImageWriter.CreateWriter (module, metadata, stream);
@@ -195,8 +195,8 @@ public sealed class ModuleDefinition : ModuleReference, ICustomAttributeProvider
internal MetadataSystem MetadataSystem;
internal ReadingMode ReadingMode;
internal ISymbolReaderProvider SymbolReaderProvider;
- internal ISymbolReader SymbolReader;
+ internal ISymbolReader symbol_reader;
internal IAssemblyResolver assembly_resolver;
internal IMetadataResolver metadata_resolver;
internal TypeSystem type_system;
@@ -261,7 +261,11 @@ public sealed class ModuleDefinition : ModuleReference, ICustomAttributeProvider
}
public bool HasSymbols {
- get { return SymbolReader != null; }
+ get { return symbol_reader != null; }
+ }
+
+ public ISymbolReader SymbolReader {
+ get { return symbol_reader; }
}
public override MetadataScopeType MetadataScopeType {
@@ -827,7 +831,7 @@ void ProcessDebugHeader ()
byte [] header;
var directory = Image.GetDebugHeader (out header);
- if (!SymbolReader.ProcessDebugHeader (directory, header))
+ if (!symbol_reader.ProcessDebugHeader (directory, header))
throw new InvalidOperationException ();
}
@@ -897,7 +901,7 @@ public void ReadSymbols (ISymbolReader reader)
if (reader == null)
throw new ArgumentNullException ("reader");
- SymbolReader = reader;
+ symbol_reader = reader;
ProcessDebugHeader ();
}

0 comments on commit cf83e6f

Please sign in to comment.