Skip to content
This repository
Browse code

Expose ModuleDefinition.SymbolReader

  • Loading branch information...
commit cf83e6fdbe0f6b676521ba641174a3085af60d0b 1 parent 5d43150
Jb Evain authored
4 Mono.Cecil.Cil/CodeReader.cs
@@ -102,7 +102,7 @@ void ReadMethodBody ()
102 102 throw new InvalidOperationException ();
103 103 }
104 104
105   - var symbol_reader = reader.module.SymbolReader;
  105 + var symbol_reader = reader.module.symbol_reader;
106 106
107 107 if (symbol_reader != null) {
108 108 var instructions = body.Instructions;
@@ -409,7 +409,7 @@ public ByteBuffer PatchRawMethodBody (MethodDefinition method, CodeWriter writer
409 409 throw new NotSupportedException ();
410 410 }
411 411
412   - var symbol_reader = reader.module.SymbolReader;
  412 + var symbol_reader = reader.module.symbol_reader;
413 413 if (symbol_reader != null && writer.metadata.write_symbols) {
414 414 symbols.method_token = GetOriginalToken (writer.metadata, method);
415 415 symbols.local_var_token = local_var_token;
4 Mono.Cecil/AssemblyWriter.cs
@@ -109,8 +109,8 @@ public static void WriteModuleTo (ModuleDefinition module, Stream stream, Writer
109 109
110 110 BuildMetadata (module, metadata);
111 111
112   - if (module.SymbolReader != null)
113   - module.SymbolReader.Dispose ();
  112 + if (module.symbol_reader != null)
  113 + module.symbol_reader.Dispose ();
114 114
115 115 var writer = ImageWriter.CreateWriter (module, metadata, stream);
116 116
12 Mono.Cecil/ModuleDefinition.cs
@@ -195,8 +195,8 @@ public sealed class ModuleDefinition : ModuleReference, ICustomAttributeProvider
195 195 internal MetadataSystem MetadataSystem;
196 196 internal ReadingMode ReadingMode;
197 197 internal ISymbolReaderProvider SymbolReaderProvider;
198   - internal ISymbolReader SymbolReader;
199 198
  199 + internal ISymbolReader symbol_reader;
200 200 internal IAssemblyResolver assembly_resolver;
201 201 internal IMetadataResolver metadata_resolver;
202 202 internal TypeSystem type_system;
@@ -261,7 +261,11 @@ public sealed class ModuleDefinition : ModuleReference, ICustomAttributeProvider
261 261 }
262 262
263 263 public bool HasSymbols {
264   - get { return SymbolReader != null; }
  264 + get { return symbol_reader != null; }
  265 + }
  266 +
  267 + public ISymbolReader SymbolReader {
  268 + get { return symbol_reader; }
265 269 }
266 270
267 271 public override MetadataScopeType MetadataScopeType {
@@ -827,7 +831,7 @@ void ProcessDebugHeader ()
827 831 byte [] header;
828 832 var directory = Image.GetDebugHeader (out header);
829 833
830   - if (!SymbolReader.ProcessDebugHeader (directory, header))
  834 + if (!symbol_reader.ProcessDebugHeader (directory, header))
831 835 throw new InvalidOperationException ();
832 836 }
833 837
@@ -897,7 +901,7 @@ public void ReadSymbols (ISymbolReader reader)
897 901 if (reader == null)
898 902 throw new ArgumentNullException ("reader");
899 903
900   - SymbolReader = reader;
  904 + symbol_reader = reader;
901 905
902 906 ProcessDebugHeader ();
903 907 }

0 comments on commit cf83e6f

Please sign in to comment.
Something went wrong with that request. Please try again.