当前位置: 首页>>代码示例>>C#>>正文


C# ISymbolWriter类代码示例

本文整理汇总了C#中ISymbolWriter的典型用法代码示例。如果您正苦于以下问题:C# ISymbolWriter类的具体用法?C# ISymbolWriter怎么用?C# ISymbolWriter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ISymbolWriter类属于命名空间,在下文中一共展示了ISymbolWriter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PdbWriter

 internal PdbWriter(ISymbolWriter writer, ModuleDefinition module, string pdb)
 {
     m_writer = writer;
     m_module = module;
     m_documents = new Hashtable ();
     m_pdb = pdb;
 }
开发者ID:sidecut,项目名称:xaeios,代码行数:7,代码来源:PdbWriter.cs

示例2: EmitLineNumberInfo

 internal void EmitLineNumberInfo(ISymbolWriter symWriter)
 {
     for (int i = 0; i < this.m_DocumentCount; i++)
     {
         this.m_Documents[i].EmitLineNumberInfo(symWriter);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:LineNumberInfo.cs

示例3: Convert

 /// <summary>
 /// </summary>
 /// <param name="filename">
 /// </param>
 public static void Convert(string filename, ISymbolWriter symbolWriter)
 {
     using (var stream = File.OpenRead(filename))
     {
         var funcs = PdbFile.LoadFunctions(stream, true);
         Convert(funcs, symbolWriter);
     }
 }
开发者ID:afrog33k,项目名称:csnative,代码行数:12,代码来源:Driver.cs

示例4: Converter

 /// <summary>
 /// </summary>
 /// <param name="filename">
 /// </param>
 /// <param name="symbolWriter">
 /// </param>
 internal Converter(string filename, ISymbolWriter symbolWriter)
 {
     this.symbolWriter = symbolWriter;
     using (var stream = File.OpenRead(filename))
     {
         foreach (var pdbFunc in PdbFile.LoadFunctions(stream, true))
         {
             funcs[pdbFunc.token] = pdbFunc;
         }
     }
 }
开发者ID:afrog33k,项目名称:csnative,代码行数:17,代码来源:Driver.cs

示例5: EmitLocalSymInfo

 internal virtual void EmitLocalSymInfo(ISymbolWriter symWriter)
 {
     int num;
     for (num = 0; num < this.m_iLocalSymCount; num++)
     {
         symWriter.DefineLocalVariable(this.m_strName[num], FieldAttributes.PrivateScope, this.m_ubSignature[num], SymAddressKind.ILOffset, this.m_iLocalSlot[num], 0, 0, this.m_iStartOffset[num], this.m_iEndOffset[num]);
     }
     for (num = 0; num < this.m_iNameSpaceCount; num++)
     {
         symWriter.UsingNamespace(this.m_namespace[num]);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:12,代码来源:LocalSymInfo.cs

示例6: EmitLineNumberInfo

 internal void EmitLineNumberInfo(ISymbolWriter symWriter)
 {
     if (this.m_iLineNumberCount != 0)
     {
         int[] destinationArray = new int[this.m_iLineNumberCount];
         Array.Copy(this.m_iOffsets, destinationArray, this.m_iLineNumberCount);
         int[] numArray2 = new int[this.m_iLineNumberCount];
         Array.Copy(this.m_iLines, numArray2, this.m_iLineNumberCount);
         int[] numArray3 = new int[this.m_iLineNumberCount];
         Array.Copy(this.m_iColumns, numArray3, this.m_iLineNumberCount);
         int[] numArray4 = new int[this.m_iLineNumberCount];
         Array.Copy(this.m_iEndLines, numArray4, this.m_iLineNumberCount);
         int[] numArray5 = new int[this.m_iLineNumberCount];
         Array.Copy(this.m_iEndColumns, numArray5, this.m_iLineNumberCount);
         symWriter.DefineSequencePoints(this.m_document, destinationArray, numArray2, numArray3, numArray4, numArray5);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:17,代码来源:REDocument.cs

示例7: EmitScopeTree

 internal void EmitScopeTree(ISymbolWriter symWriter)
 {
     for (int i = 0; i < this.m_iCount; i++)
     {
         if (this.m_ScopeActions[i] == ScopeAction.Open)
         {
             symWriter.OpenScope(this.m_iOffsets[i]);
         }
         else
         {
             symWriter.CloseScope(this.m_iOffsets[i]);
         }
         if (this.m_localSymInfos[i] != null)
         {
             this.m_localSymInfos[i].EmitLocalSymInfo(symWriter);
         }
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:18,代码来源:ScopeTree.cs

示例8: GenerateDebugInfo

		internal void GenerateDebugInfo (ISymbolWriter symbolWriter)
		{
			if (ilgen != null && ilgen.HasDebugInfo) {
				SymbolToken token = new SymbolToken (GetToken().Token);
				symbolWriter.OpenMethod (token);
				symbolWriter.SetSymAttribute (token, "__name", System.Text.Encoding.UTF8.GetBytes (Name));
				ilgen.GenerateDebugInfo (symbolWriter);
				symbolWriter.CloseMethod ();
			}
		}
开发者ID:stabbylambda,项目名称:mono,代码行数:10,代码来源:MethodBuilder.cs

示例9: GenerateDebugInfo

		internal void GenerateDebugInfo (ISymbolWriter symbolWriter)
		{
			symbolWriter.OpenNamespace (this.Namespace);

			if (methods != null) {
				for (int i = 0; i < num_methods; ++i) {
					MethodBuilder metb = (MethodBuilder) methods[i]; 
					metb.GenerateDebugInfo (symbolWriter);
				}
			}

			if (ctors != null) {
				foreach (ConstructorBuilder ctor in ctors)
					ctor.GenerateDebugInfo (symbolWriter);
			}
			
			symbolWriter.CloseNamespace ();

			if (subtypes != null) {
				for (int i = 0; i < subtypes.Length; ++i)
					subtypes [i].GenerateDebugInfo (symbolWriter);
			}
		}
开发者ID:ItsVeryWindy,项目名称:mono,代码行数:23,代码来源:TypeBuilder.cs

示例10: GenerateDebugInfo

		internal void GenerateDebugInfo (ISymbolWriter symbolWriter)
		{
			if (sequencePointLists != null) {
				SequencePointList first = (SequencePointList) sequencePointLists [0];
				SequencePointList last = (SequencePointList) sequencePointLists [sequencePointLists.Count - 1];
				symbolWriter.SetMethodSourceRange (first.Document, first.StartLine, first.StartColumn, last.Document, last.EndLine, last.EndColumn);
				
				foreach (SequencePointList list in sequencePointLists)
					symbolWriter.DefineSequencePoints (list.Document, list.GetOffsets(), list.GetLines(), list.GetColumns(), list.GetEndLines(), list.GetEndColumns());
				
				if (locals != null) {
					foreach (LocalBuilder local in locals) {
						if (local.Name != null && local.Name.Length > 0) {
							SignatureHelper sighelper = SignatureHelper.GetLocalVarSigHelper (module as ModuleBuilder);
							sighelper.AddArgument (local.LocalType);
							byte[] signature = sighelper.GetSignature ();
							symbolWriter.DefineLocalVariable (local.Name, FieldAttributes.Public, signature, SymAddressKind.ILOffset, local.position, 0, 0, local.StartOffset, local.EndOffset);
						}
					}
				}
				sequencePointLists = null;
			}
		}
开发者ID:Profit0004,项目名称:mono,代码行数:23,代码来源:ILGenerator.cs

示例11: ModuleBuilder

		internal ModuleBuilder (AssemblyBuilder assb, string name, string fullyqname, bool emitSymbolInfo, bool transient) {
			this.name = this.scopename = name;
			this.fqname = fullyqname;
			this.assembly = this.assemblyb = assb;
			this.transient = transient;
			// to keep mcs fast we do not want CryptoConfig wo be involved to create the RNG
			guid = Guid.FastNewGuidArray ();
			// guid = Guid.NewGuid().ToByteArray ();
			table_idx = get_next_table_index (this, 0x00, true);
			name_cache = new Hashtable ();
			us_string_cache = new Dictionary<string, int> (512);

			basic_init (this);

			CreateGlobalType ();

			if (assb.IsRun) {
				TypeBuilder tb = new TypeBuilder (this, TypeAttributes.Abstract, 0xFFFFFF); /*last valid token*/
				Type type = tb.CreateType ();
				set_wrappers_type (this, type);
			}

			if (emitSymbolInfo) {
#if MOONLIGHT
				symbolWriter = new Mono.CompilerServices.SymbolWriter.SymbolWriterImpl (this);
#else
				Assembly asm = Assembly.LoadWithPartialName ("Mono.CompilerServices.SymbolWriter");
				if (asm == null)
					throw new TypeLoadException ("The assembly for default symbol writer cannot be loaded");

				Type t = asm.GetType ("Mono.CompilerServices.SymbolWriter.SymbolWriterImpl", true);
				symbolWriter = (ISymbolWriter) Activator.CreateInstance (t, new object[] { this });
#endif
				string fileName = fqname;
				if (assemblyb.AssemblyDir != null)
					fileName = Path.Combine (assemblyb.AssemblyDir, fileName);
				symbolWriter.Initialize (IntPtr.Zero, fileName, true);
			}
		}
开发者ID:carrie901,项目名称:mono,代码行数:39,代码来源:ModuleBuilder.cs

示例12: EmitLocalSymInfo

        internal virtual void EmitLocalSymInfo(ISymbolWriter symWriter)
        {
            int         i;

            for (i = 0; i < m_iLocalSymCount; i ++)
            {
                symWriter.DefineLocalVariable(
                            m_strName[i],
                            FieldAttributes.PrivateScope,  
                            m_ubSignature[i],
                            SymAddressKind.ILOffset,
                            m_iLocalSlot[i],
                            0,          // addr2 is not used yet
                            0,          // addr3 is not used
                            m_iStartOffset[i],
                            m_iEndOffset[i]);
            }
            for (i = 0; i < m_iNameSpaceCount; i ++)
            {
                symWriter.UsingNamespace(m_namespace[i]);
            }
        }
开发者ID:gbarnett,项目名称:shared-source-cli-2.0,代码行数:22,代码来源:methodbuilder.cs

示例13: Init

        internal void Init(
            String             strModuleName,
            String             strFileName,
            ISymbolWriter      writer)
        {
            m_moduleData = new ModuleBuilderData(this, strModuleName, strFileName);
            m_TypeBuilderList = new ArrayList();    
            m_iSymWriter = writer;

            if (writer != null)
            {
                // Set the underlying writer for the managed writer
                // that we're using.  Note that this function requires
                // unmanaged code access.
                new SecurityPermission(SecurityPermissionFlag.UnmanagedCode).Assert();
                writer.SetUnderlyingWriter(m_pInternalSymWriter);
            }
        }
开发者ID:ArildF,项目名称:masters,代码行数:18,代码来源:modulebuilder.cs

示例14: SetSymWriter

 internal void SetSymWriter(ISymbolWriter writer)
 {
     m_iSymWriter = writer;
 }
开发者ID:crummel,项目名称:dotnet_coreclr,代码行数:4,代码来源:ModuleBuilder.cs

示例15: SaveSymbols

 public void SaveSymbols(string outputDirectory, ISymbolWriter writer)
 {
     SaveSymbols (outputDirectory);
     m_controller.Writer.SymbolWriter = writer;
 }
开发者ID:sidecut,项目名称:xaeios,代码行数:5,代码来源:ModuleDefinition.cs


注:本文中的ISymbolWriter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。