• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ISymbolWriter类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: GetConverter

 public static IConverter GetConverter(string filename, ISymbolWriter symbolWriter)
 {
     return new Converter(filename, symbolWriter);
 }
开发者ID:afrog33k,项目名称:csnative,代码行数:4,代码来源:Driver.cs


示例17: PerformRewrite

		public PerformRewrite (ISymbolWriter sym, RewriterOptions options)
		{
			this.sym = sym;
			this.options = options;
		}
开发者ID:afaerber,项目名称:mono,代码行数:5,代码来源:PerformRewrite.cs


示例18: EmitLineNumberInfo

        [System.Security.SecurityCritical] // auto-generated
        #endif
        internal void EmitLineNumberInfo(ISymbolWriter symWriter)
        {
            int[]       iOffsetsTemp;
            int[]       iLinesTemp;
            int[]       iColumnsTemp;
            int[]       iEndLinesTemp;
            int[]       iEndColumnsTemp;

            if (m_iLineNumberCount == 0)
                return;
            // reduce the array size to be exact
            iOffsetsTemp = new int [m_iLineNumberCount];
            Array.Copy(m_iOffsets, iOffsetsTemp, m_iLineNumberCount);

            iLinesTemp = new int [m_iLineNumberCount];
            Array.Copy(m_iLines, iLinesTemp, m_iLineNumberCount);

            iColumnsTemp = new int [m_iLineNumberCount];
            Array.Copy(m_iColumns, iColumnsTemp, m_iLineNumberCount);

            iEndLinesTemp = new int [m_iLineNumberCount];
            Array.Copy(m_iEndLines, iEndLinesTemp, m_iLineNumberCount);

            iEndColumnsTemp = new int [m_iLineNumberCount];
            Array.Copy(m_iEndColumns, iEndColumnsTemp, m_iLineNumberCount);

            symWriter.DefineSequencePoints(m_document, iOffsetsTemp, iLinesTemp, iColumnsTemp, iEndLinesTemp, iEndColumnsTemp); 
        }
开发者ID:uQr,项目名称:referencesource,代码行数:30,代码来源:ilgenerator.cs


示例19: GetSourceFile

        /// <summary>
        /// </summary>
        /// <param name="symbolWriter">
        /// </param>
        /// <param name="function">
        /// </param>
        /// <returns>
        /// </returns>
        private SourceFile GetSourceFile(ISymbolWriter symbolWriter, PdbFunction function)
        {
            var name = (from l in function.lines where l.file != null select l.file.name).First();

            SourceFile file;
            if (this.files.TryGetValue(name, out file))
            {
                return file;
            }

            var entry = symbolWriter.DefineDocument(name);
            var unit = symbolWriter.DefineCompilationUnit(entry);

            file = new SourceFile(unit, entry);
            this.files.Add(name, file);
            return file;
        }
开发者ID:afrog33k,项目名称:csnative,代码行数:25,代码来源:Driver.cs


示例20: CreateSymWriter

 internal void CreateSymWriter()
 {
     _symbolWriter = _myModule.GetSymWriter();
 }
开发者ID:robertlj,项目名称:IronScheme,代码行数:4,代码来源:AssemblyGen.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ISymbolicExpressionTree类代码示例发布时间:2022-05-24
下一篇:
C# ISymbolDocumentWriter类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap