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


C# SymbolWriter.MonoSymbolFile类代码示例

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


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

示例1: LineNumberTable

		protected LineNumberTable(MonoSymbolFile file)
		{
			this.LineBase = file.OffsetTable.LineNumberTable_LineBase;
			this.LineRange = file.OffsetTable.LineNumberTable_LineRange;
			this.OpcodeBase = (byte)file.OffsetTable.LineNumberTable_OpcodeBase;
			this.MaxAddressIncrement = (int)(255 - this.OpcodeBase) / this.LineRange;
		}
开发者ID:FreshBirdZhe,项目名称:LSharp,代码行数:7,代码来源:LineNumberTable.cs

示例2: SourceFileEntry

 public SourceFileEntry(MonoSymbolFile file, string file_name)
 {
     this.file = file;
     this.file_name = file_name;
     this.Index = file.AddSource(this);
     this.creating = true;
 }
开发者ID:xqy,项目名称:game,代码行数:7,代码来源:SourceFileEntry.cs

示例3: MonoSymbolWriter

		public MonoSymbolWriter (Stream stream)
		{
			this.stream = stream;
			this.methods = new List<SourceMethodBuilder> ();
			this.sources = new List<SourceFileEntry> ();
			this.comp_units = new List<CompileUnitEntry> ();
			this.file = new MonoSymbolFile ();
		}
开发者ID:cupsster,项目名称:Unity3D.IncrementalCompiler,代码行数:8,代码来源:MonoSymbolWriter.cs

示例4: CompileUnitEntry

		public CompileUnitEntry(MonoSymbolFile file, SourceFileEntry source)
		{
			this.file = file;
			this.source = source;
			this.Index = file.AddCompileUnit(this);
			this.creating = true;
			this.namespaces = new List<NamespaceEntry>();
		}
开发者ID:FreshBirdZhe,项目名称:LSharp,代码行数:8,代码来源:CompileUnitEntry.cs

示例5: MonoSymbolWriter

		public MonoSymbolWriter (string filename)
		{
			this.methods = new List<SourceMethodBuilder> ();
			this.sources = new List<SourceFileEntry> ();
			this.comp_units = new List<CompileUnitEntry> ();
			this.file = new MonoSymbolFile ();

			this.filename = filename + ".mdb";
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:9,代码来源:MonoSymbolWriter.cs

示例6: MonoSymbolWriter

		public MonoSymbolWriter (string filename)
		{
			this.methods = new ArrayList ();
			this.sources = new ArrayList ();
			this.comp_units = new ArrayList ();
			this.current_method_stack = new Stack ();
			this.file = new MonoSymbolFile ();

			this.filename = filename + ".mdb";
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:10,代码来源:MonoSymbolWriter.cs

示例7: NamespaceEntry

		internal NamespaceEntry(MonoSymbolFile file, MyBinaryReader reader)
		{
			this.Name = reader.ReadString();
			this.Index = reader.ReadLeb128();
			this.Parent = reader.ReadLeb128();
			int count = reader.ReadLeb128();
			this.UsingClauses = new string[count];
			for (int i = 0; i < count; i++)
			{
				this.UsingClauses[i] = reader.ReadString();
			}
		}
开发者ID:qq1792,项目名称:LSharp,代码行数:12,代码来源:NamespaceEntry.cs

示例8: MethodEntry

		internal MethodEntry(MonoSymbolFile file, CompileUnitEntry comp_unit, int token, ScopeVariable[] scope_vars, LocalVariableEntry[] locals, LineNumberEntry[] lines, CodeBlockEntry[] code_blocks, string real_name, MethodEntry.Flags flags, int namespace_id)
		{
			this.SymbolFile = file;
			this.real_name = real_name;
			this.locals = locals;
			this.code_blocks = code_blocks;
			this.scope_vars = scope_vars;
			this.flags = flags;
			this.index = -1;
			this.Token = token;
			this.CompileUnitIndex = comp_unit.Index;
			this.CompileUnit = comp_unit;
			this.NamespaceID = namespace_id;
			this.CheckLineNumberTable(lines);
			this.lnt = new LineNumberTable(file, lines);
			file.NumLineNumbers += lines.Length;
			int num_locals = (locals != null) ? locals.Length : 0;
			if (num_locals <= 32)
			{
				for (int i = 0; i < num_locals; i++)
				{
					string nm = locals[i].Name;
					for (int j = i + 1; j < num_locals; j++)
					{
						if (locals[j].Name == nm)
						{
							flags |= MethodEntry.Flags.LocalNamesAmbiguous;
							goto IL_108;
						}
					}
				}
				IL_108:;
			}
			else
			{
				Dictionary<string, LocalVariableEntry> local_names = new Dictionary<string, LocalVariableEntry>();
				for (int k = 0; k < locals.Length; k++)
				{
					LocalVariableEntry local = locals[k];
					if (local_names.ContainsKey(local.Name))
					{
						flags |= MethodEntry.Flags.LocalNamesAmbiguous;
						break;
					}
					local_names.Add(local.Name, local);
				}
			}
		}
开发者ID:qq1792,项目名称:LSharp,代码行数:48,代码来源:MethodEntry.cs

示例9: RewriteMdbFile

		public void RewriteMdbFile (string inputFile)
		{
			if (!settings.Quiet)
				Console.WriteLine ("Processing {0}", inputFile);
			var input = MonoSymbolFile.ReadSymbolFile (inputFile);

			var output = new MonoSymbolFile ();

			foreach (var s in input.Sources) {
				var newFileName = settings.FileNamesOnly
					? Path.Combine (Path.GetDirectoryName (s.FileName), settings.Replace (Path.GetFileName (s.FileName)))
					: settings.Replace (s.FileName);

				if (settings.Verbose)
					Console.WriteLine ("{0} -> {1}", s.FileName, newFileName);

				s.FileName = newFileName;
				output.AddSource (s);
			}

			foreach (var cu in input.CompileUnits) {
				cu.ReadAll ();
				output.AddCompileUnit (cu);
			}
		
			foreach (var m in input.Methods) {
				m.ReadAll ();
				output.AddMethod (m);
			}


			var mdbName = new FileInfo (inputFile).Name;
			var tmpMdb = Path.GetTempFileName ();
			var finalMdb = inputFile;
			if (settings.OutputDirectory != null)
				finalMdb = Path.Combine (settings.OutputDirectory, mdbName);

			using (var stream = new FileStream (tmpMdb, FileMode.Create)) {
				output.CreateSymbolFile (input.Guid, stream);
			}
			input.Dispose ();

			File.Delete (finalMdb);
			File.Move (tmpMdb, finalMdb);
		}
开发者ID:Profit0004,项目名称:mono,代码行数:45,代码来源:mdbrebase.cs

示例10: MdbRebase

        static void MdbRebase(string mdbFile, string toRemove)
        {
            #if WINDOWS_BUILD
            Console.Error.WriteLine ("Warning: skipping MDB rebasing of {0} (not supported on Windows)", mdbFile);
            #else
            using (var input = MonoSymbolFile.ReadSymbolFile (mdbFile)) {
                var output = new MonoSymbolFile ();

                foreach (var source in input.Sources) {
                    source.FileName = Path.Combine (
                        Path.GetDirectoryName (source.FileName),
                        Path.GetFileName (source.FileName).Replace (toRemove, String.Empty)
                    );

                    output.AddSource (source);
                }

                foreach (var compileUnit in input.CompileUnits) {
                    compileUnit.ReadAll ();
                    output.AddCompileUnit (compileUnit);
                }

                foreach (var method in input.Methods) {
                    method.ReadAll ();
                    output.AddMethod (method);
                }

                var tmpMdb = Path.GetTempFileName ();

                using (var stream = new FileStream (tmpMdb, FileMode.Create))
                    output.CreateSymbolFile (input.Guid, stream);

                File.Delete (mdbFile);
                File.Move (tmpMdb, mdbFile);
            }
            #endif
        }
开发者ID:yudhitech,项目名称:xamarin-macios,代码行数:37,代码来源:Driver.cs

示例11: CreateUnitSymbolInfo

        //
        // Creates symbol file index in debug symbol file
        //
        void CreateUnitSymbolInfo(MonoSymbolFile symwriter)
        {
            var si = file.CreateSymbolInfo (symwriter);
            comp_unit = new CompileUnitEntry (symwriter, si);

            if (include_files != null) {
                foreach (SourceFile include in include_files.Values) {
                    si = include.CreateSymbolInfo (symwriter);
                    comp_unit.AddFile (si);
                }
            }
        }
开发者ID:exodrifter,项目名称:mcs-ICodeCompiler,代码行数:15,代码来源:namespace.cs

示例12: MdbReader

		public MdbReader (MonoSymbolFile symFile)
		{
			symbol_file = symFile;
			documents = new Dictionary<string, Document> ();
		}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:5,代码来源:MdbReader.cs

示例13: WriteDebugSymbol

		public virtual void WriteDebugSymbol (MonoSymbolFile file)
		{
		}
开发者ID:johnluetke,项目名称:mono,代码行数:3,代码来源:decl.cs

示例14: WriteDebugSymbol

		public override void WriteDebugSymbol (MonoSymbolFile file)
		{
			if (debug_builder == null)
				return;

			var token = ConstructorBuilder.GetToken ();
			int t = token.Token;
#if STATIC
			if (token.IsPseudoToken)
				t = Module.Builder.ResolvePseudoToken (t);
#endif

			debug_builder.DefineMethod (file, t);
		}
开发者ID:Viewserve,项目名称:mono,代码行数:14,代码来源:method.cs

示例15: DefineMethod

		public void DefineMethod (MonoSymbolFile file, int token)
		{
			MethodEntry entry = new MethodEntry (
				file, _comp_unit.Entry, token, ScopeVariables,
				Locals, method_lines.ToArray (), Blocks, null, MethodEntry.Flags.ColumnsInfoIncluded, ns_id);

			file.AddMethod (entry);
		}
开发者ID:dyxu,项目名称:vimrc,代码行数:8,代码来源:SourceMethodBuilder.cs


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