コード例 #1
0
 PdbWriter(PdbState pdbState, MetaData metaData)
 {
     this.pdbState      = pdbState;
     this.metaData      = metaData;
     this.module        = metaData.Module;
     this.instrToOffset = new Dictionary <Instruction, uint>();
     this.customDebugInfoWriterContext = new PdbCustomDebugInfoWriterContext();
     this.localsEndScopeIncValue       = pdbState.GetCompiler(metaData.module) == Compiler.VisualBasic ? 1 : 0;
 }
コード例 #2
0
ファイル: PdbWriter.cs プロジェクト: EmilZhou/dnlib
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="writer">Symbol writer</param>
		/// <param name="pdbState">PDB state</param>
		/// <param name="metaData">Meta data</param>
		public PdbWriter(ISymbolWriter2 writer, PdbState pdbState, MetaData metaData) {
			if (writer == null)
				throw new ArgumentNullException("writer");
			if (pdbState == null)
				throw new ArgumentNullException("pdbState");
			if (metaData == null)
				throw new ArgumentNullException("metaData");
			this.writer = writer;
			this.pdbState = pdbState;
			this.metaData = metaData;
			this.module = metaData.Module;
			writer.Initialize(metaData);
		}
コード例 #3
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="writer">Symbol writer</param>
 /// <param name="pdbState">PDB state</param>
 /// <param name="metaData">Meta data</param>
 public PdbWriter(ISymbolWriter3 writer, PdbState pdbState, MetaData metaData)
     : this(pdbState, metaData)
 {
     if (writer == null)
     {
         throw new ArgumentNullException("writer");
     }
     if (pdbState == null)
     {
         throw new ArgumentNullException("pdbState");
     }
     if (metaData == null)
     {
         throw new ArgumentNullException("metaData");
     }
     this.writer  = writer;
     this.writer3 = writer;
     writer.Initialize(metaData);
 }
コード例 #4
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="writer">Symbol writer</param>
 /// <param name="pdbState">PDB state</param>
 /// <param name="metaData">Meta data</param>
 public PdbWriter(ISymbolWriter2 writer, PdbState pdbState, MetaData metaData)
 {
     if (writer == null)
     {
         throw new ArgumentNullException("writer");
     }
     if (pdbState == null)
     {
         throw new ArgumentNullException("pdbState");
     }
     if (metaData == null)
     {
         throw new ArgumentNullException("metaData");
     }
     this.writer   = writer;
     this.pdbState = pdbState;
     this.metaData = metaData;
     this.module   = metaData.Module;
     writer.Initialize(metaData);
 }
コード例 #5
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="writer">Symbol writer, it should implement <see cref="ISymbolWriter3"/></param>
 /// <param name="pdbState">PDB state</param>
 /// <param name="metaData">Meta data</param>
 public PdbWriter(ISymbolWriter2 writer, PdbState pdbState, MetaData metaData)
     : this(pdbState, metaData)
 {
     if (writer == null)
     {
         throw new ArgumentNullException("writer");
     }
     if (pdbState == null)
     {
         throw new ArgumentNullException("pdbState");
     }
     if (metaData == null)
     {
         throw new ArgumentNullException("metaData");
     }
     this.writer  = writer;
     this.writer3 = writer as ISymbolWriter3;
     Debug.Assert(writer3 != null, "Symbol writer doesn't implement interface ISymbolWriter3");
     writer.Initialize(metaData);
 }