當前位置: 首頁>>代碼示例>>C#>>正文


C# SymbolWriter.SourceFileEntry類代碼示例

本文整理匯總了C#中Mono.CompilerServices.SymbolWriter.SourceFileEntry的典型用法代碼示例。如果您正苦於以下問題:C# SourceFileEntry類的具體用法?C# SourceFileEntry怎麽用?C# SourceFileEntry使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


SourceFileEntry類屬於Mono.CompilerServices.SymbolWriter命名空間,在下文中一共展示了SourceFileEntry類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: MarkSequencePoint

		public void MarkSequencePoint (int offset, SourceFileEntry file, int line, int column, bool is_hidden)
		{
			int file_idx = file != null ? file.Index : 0;
			var lne = new LineNumberEntry (file_idx, line, column, offset, is_hidden);

			if (method_lines.Count > 0) {
				var prev = method_lines[method_lines.Count - 1];

				//
				// Same offset cannot be used for multiple lines
				// 
				if (prev.Offset == offset) {
					//
					// Use the new location because debugger will adjust
					// the breakpoint to next line with sequence point
					//
					if (LineNumberEntry.LocationComparer.Default.Compare (lne, prev) > 0)
						method_lines[method_lines.Count - 1] = lne;

					return;
				}
			}

			method_lines.Add (lne);
		}
開發者ID:dyxu,項目名稱:vimrc,代碼行數:25,代碼來源:SourceMethodBuilder.cs

示例2: 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

示例3: AddFile

		public void AddFile(SourceFileEntry file)
		{
			if (!this.creating)
			{
				throw new InvalidOperationException();
			}
			if (this.include_files == null)
			{
				this.include_files = new List<SourceFileEntry>();
			}
			this.include_files.Add(file);
		}
開發者ID:FreshBirdZhe,項目名稱:LSharp,代碼行數:12,代碼來源:CompileUnitEntry.cs

示例4: GetDocument

		private Document GetDocument(SourceFileEntry file)
		{
			string file_name = file.FileName;
			Document document;
			Document result;
			if (this.documents.TryGetValue(file_name, out document))
			{
				result = document;
			}
			else
			{
				document = new Document(file_name);
				this.documents.Add(file_name, document);
				result = document;
			}
			return result;
		}
開發者ID:qq1792,項目名稱:LSharp,代碼行數:17,代碼來源:MdbReader.cs

示例5: ReadData

		private void ReadData()
		{
			if (this.creating)
			{
				throw new InvalidOperationException();
			}
			lock (this.file)
			{
				if (this.namespaces == null)
				{
					MyBinaryReader reader = this.file.BinaryReader;
					int old_pos = (int)reader.BaseStream.Position;
					reader.BaseStream.Position = (long)this.DataOffset;
					int source_idx = reader.ReadLeb128();
					this.source = this.file.GetSourceFile(source_idx);
					int count_includes = reader.ReadLeb128();
					if (count_includes > 0)
					{
						this.include_files = new List<SourceFileEntry>();
						for (int i = 0; i < count_includes; i++)
						{
							this.include_files.Add(this.file.GetSourceFile(reader.ReadLeb128()));
						}
					}
					int count_ns = reader.ReadLeb128();
					this.namespaces = new List<NamespaceEntry>();
					for (int i = 0; i < count_ns; i++)
					{
						this.namespaces.Add(new NamespaceEntry(this.file, reader));
					}
					reader.BaseStream.Position = (long)old_pos;
				}
			}
		}
開發者ID:FreshBirdZhe,項目名稱:LSharp,代碼行數:34,代碼來源:CompileUnitEntry.cs

示例6: GetDocument

		Document GetDocument (SourceFileEntry file)
		{
			Document doc = m_documents [file.FileName] as Document;
			if (doc != null)
				return doc;

			doc = new Document (file.FileName);

			m_documents [file.FileName] = doc;
			return doc;
		}
開發者ID:transformersprimeabcxyz,項目名稱:monodevelop-1,代碼行數:11,代碼來源:MdbReader.cs

示例7: GetSourceFile

		public SourceFileEntry GetSourceFile (int index)
		{
			if ((index < 1) || (index > ot.SourceCount))
				throw new ArgumentException ();
			if (reader == null)
				throw new InvalidOperationException ();

			lock (this) {
				SourceFileEntry source;
				if (source_file_hash.TryGetValue (index, out source))
					return source;

				long old_pos = reader.BaseStream.Position;

				reader.BaseStream.Position = ot.SourceTableOffset +
					SourceFileEntry.Size * (index - 1);
				source = new SourceFileEntry (this, reader);
				source_file_hash.Add (index, source);

				reader.BaseStream.Position = old_pos;
				return source;
			}
		}
開發者ID:KAW0,項目名稱:Alter-Native,代碼行數:23,代碼來源:MonoSymbolFile.cs

示例8: MarkSequencePoint

		public void MarkSequencePoint (int offset, SourceFileEntry file, int line, int column,
					       bool is_hidden)
		{
			if (current_method == null)
				return;

			current_method.MarkSequencePoint (offset, file, line, column, is_hidden);
		}
開發者ID:transformersprimeabcxyz,項目名稱:monodevelop-1,代碼行數:8,代碼來源:MonoSymbolWriter.cs

示例9: GetSourceFile

        public SourceFileEntry GetSourceFile(int index)
        {
            if (index < 1 || index > this.ot.SourceCount)
            {
                throw new ArgumentException();
            }
            if (this.reader == null)
            {
                throw new InvalidOperationException();
            }
            SourceFileEntry result;

            SourceFileEntry source;
            if (this.source_file_hash.TryGetValue(index, out source))
            {
                result = source;
            }
            else
            {
                long old_pos = this.reader.BaseStream.Position;
                this.reader.BaseStream.Position = (long)(this.ot.SourceTableOffset + SourceFileEntry.Size * (index - 1));
                source = new SourceFileEntry(this, this.reader);
                this.source_file_hash.Add(index, source);
                this.reader.BaseStream.Position = old_pos;
                result = source;
            }

            return result;
        }
開發者ID:qq1792,項目名稱:LSharp,代碼行數:29,代碼來源:MonoSymbolFile.cs

示例10: MarkSequencePoint

        public void MarkSequencePoint(int offset, SourceFileEntry file, int start_line, int end_line,
					       int start_col, int end_col)
        {
            if (method_lines_pos == method_lines.Length) {
                LineNumberEntry [] tmp = method_lines;
                method_lines = new LineNumberEntry [method_lines.Length * 2];
                Array.Copy (tmp, method_lines, method_lines_pos);
            }

            int file_idx = file != null ? file.Index : 0;
            method_lines [method_lines_pos++] = new LineNumberEntry (
                file_idx, offset, start_line, end_line, start_col, end_col);
        }
開發者ID:baulig,項目名稱:debugger,代碼行數:13,代碼來源:MonoSymbolWriter.cs

示例11: MonoSourceFile

            public MonoSourceFile(DebuggerSession session, Module module,
					       C.SourceFileEntry file, string path)
                : base(session, module, path)
            {
                this.file = file;
            }
開發者ID:atomia,項目名稱:mono_debugger,代碼行數:6,代碼來源:MonoSymbolFile.cs

示例12: MarkSequencePoint

		public void MarkSequencePoint (int offset, SourceFileEntry file, int line, int column, bool is_hidden)
		{
			MarkSequencePoint (offset, file, line, column, -1, -1, is_hidden);
		}
開發者ID:0xb1dd1e,項目名稱:NRefactory,代碼行數:4,代碼來源:SourceMethodBuilder.cs

示例13: AddFile

		public void AddFile (SourceFileEntry file)
		{
			if (!creating)
				throw new InvalidOperationException ();

			if (include_files == null)
				include_files = new ArrayList ();

			include_files.Add (file);
		}
開發者ID:transformersprimeabcxyz,項目名稱:monodevelop-1,代碼行數:10,代碼來源:MonoSymbolTable.cs

示例14: DefineDocument

		public SourceFileEntry DefineDocument (string url)
		{
			SourceFileEntry entry = new SourceFileEntry (file, url);
			sources.Add (entry);
			return entry;
		}
開發者ID:transformersprimeabcxyz,項目名稱:monodevelop-1,代碼行數:6,代碼來源:MonoSymbolWriter.cs

示例15: AddSource

		internal int AddSource (SourceFileEntry source)
		{
			sources.Add (source);
			return sources.Count;
		}
開發者ID:KAW0,項目名稱:Alter-Native,代碼行數:5,代碼來源:MonoSymbolFile.cs


注:本文中的Mono.CompilerServices.SymbolWriter.SourceFileEntry類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。