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


C# HexSpan类代码示例

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


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

示例1: Show

		public void Show(HexSpan span, int windowIndex) {
			var mc = GetMemoryToolWindowContent(windowIndex);
			Debug.Assert(mc != null);
			if (mc == null)
				return;
			ShowInMemoryWindow(mc, span);
		}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:7,代码来源:MemoryWindowService.cs

示例2: OverlapsWith

		public static bool OverlapsWith(this NormalizedHexChangeCollection changes, HexSpan span) {
			foreach (var change in changes) {
				if (change.OldSpan.OverlapsWith(span))
					return true;
			}
			return false;
		}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:7,代码来源:NormalizedHexChangeCollectionExtensions.cs

示例3: HexField

		protected HexField(HexBuffer buffer, string parentName, string name, HexPosition start, int size) {
			this.buffer = buffer;
			this.parentName = parentName;
			IsVisible = true;
			Name = name;
			Span = new HexSpan(start, (ulong)size);
		}
开发者ID:0xd4d,项目名称:dnSpy,代码行数:7,代码来源:HexField.cs

示例4: ByteArrayHexBufferStream

		public ByteArrayHexBufferStream(byte[] data, string name) {
			if (data == null)
				throw new ArgumentNullException(nameof(data));
			if (name == null)
				throw new ArgumentNullException(nameof(name));
			Span = new HexSpan(0, (ulong)data.LongLength);
			Name = name;
			this.data = data;
		}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:9,代码来源:ByteArrayHexBufferStream.cs

示例5: GetSpanInfo

		/// <summary>
		/// Gets information about a position in the stream
		/// </summary>
		/// <param name="position">Position</param>
		/// <param name="validSpan">Span of all valid data</param>
		/// <returns></returns>
		protected HexSpanInfo GetSpanInfo(HexPosition position, HexSpan validSpan) {
			if (position >= HexPosition.MaxEndPosition)
				throw new ArgumentOutOfRangeException(nameof(position));
			if (position >= validSpan.End)
				return new HexSpanInfo(HexSpan.FromBounds(validSpan.End, HexPosition.MaxEndPosition), HexSpanInfoFlags.None);
			else if (position < validSpan.Start)
				return new HexSpanInfo(HexSpan.FromBounds(HexPosition.Zero, validSpan.Start), HexSpanInfoFlags.None);
			else
				return new HexSpanInfo(validSpan, HexSpanInfoFlags.HasData);
		}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:16,代码来源:HexBufferStream.cs

示例6: InitializeHexView

		static void InitializeHexView(HexView hexView, HexSpan span) {
			if (!IsVisible(hexView, span))
				return;
			var bufferSpan = new HexBufferSpan(hexView.Buffer, span);
			hexView.Selection.Select(bufferSpan.Start, bufferSpan.End, alignPoints: false);
			var column = hexView.Caret.IsValuesCaretPresent ? HexColumnType.Values : HexColumnType.Ascii;
			hexView.Caret.MoveTo(column, bufferSpan.Start);
			var flags = column == HexColumnType.Values ? HexSpanSelectionFlags.Values : HexSpanSelectionFlags.Ascii;
			hexView.ViewScroller.EnsureSpanVisible(bufferSpan, flags, VSTE.EnsureSpanVisibleOptions.ShowStart);
		}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:10,代码来源:MemoryWindowService.cs

示例7: MetaDataTableVM

		protected MetaDataTableVM(object owner, HexBuffer buffer, HexPosition startOffset, MDTable mdTable, HexSpan stringsHeapSpan, HexSpan guidHeapSpan) {
			this.buffer = buffer;
			this.stringsHeapSpan = stringsHeapSpan;
			this.guidHeapSpan = guidHeapSpan;
			Owner = owner;
			Span = new HexSpan(startOffset, (ulong)mdTable.Rows * mdTable.RowSize);
			Rows = mdTable.Rows;
			TableInfo = CreateTableInfo(mdTable.TableInfo);
			Collection = new VirtualizedList<MetaDataTableRecordVM>((int)Rows, CreateItem);
		}
开发者ID:0xd4d,项目名称:dnSpy,代码行数:10,代码来源:MetaDataTableVM.cs

示例8: SelectAndMoveCaret

		static void SelectAndMoveCaret(WpfHexView hexView, HexSpan span) {
			if (!hexView.VisualElement.IsLoaded) {
				RoutedEventHandler loaded = null;
				loaded = (s, e) => {
					hexView.VisualElement.Loaded -= loaded;
					InitializeHexView(hexView, span);
				};
				hexView.VisualElement.Loaded += loaded;
			}
			else
				InitializeHexView(hexView, span);
		}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:12,代码来源:MemoryWindowService.cs

示例9: OnBufferChanged

		public override void OnBufferChanged(NormalizedHexChangeCollection changes) {
			if (infoTuple != null) {
				var tableInfo = ((MetaDataTableNode)TreeNode.Parent.Data).TableInfo;
				foreach (var index in infoTuple.Item1) {
					var col = tableInfo.Columns[index];
					var span = new HexSpan(Span.Start + (ulong)col.Offset, (ulong)col.Size);
					if (changes.OverlapsWith(span)) {
						TreeNode.RefreshUI();
						break;
					}
				}
			}
		}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:13,代码来源:MetaDataTableRecordNode.cs

示例10: StateMachineMethodMetaDataTableVM

		public StateMachineMethodMetaDataTableVM(object owner, HexBuffer buffer, HexPosition startOffset, MDTable mdTable, HexSpan stringsHeapSpan, HexSpan guidHeapSpan)
			: base(owner, buffer, startOffset, mdTable, stringsHeapSpan, guidHeapSpan) {
		}
开发者ID:0xd4d,项目名称:dnSpy,代码行数:3,代码来源:MetaDataTableVM.cs

示例11: CustomDebugInformationMetaDataTableVM

		public CustomDebugInformationMetaDataTableVM(object owner, HexBuffer buffer, HexPosition startOffset, MDTable mdTable, HexSpan stringsHeapSpan, HexSpan guidHeapSpan)
			: base(owner, buffer, startOffset, mdTable, stringsHeapSpan, guidHeapSpan) {
		}
开发者ID:0xd4d,项目名称:dnSpy,代码行数:3,代码来源:MetaDataTableVM.cs

示例12: GenericParamConstraintMetaDataTableVM

		public GenericParamConstraintMetaDataTableVM(object owner, HexBuffer buffer, HexPosition startOffset, MDTable mdTable, HexSpan stringsHeapSpan, HexSpan guidHeapSpan)
			: base(owner, buffer, startOffset, mdTable, stringsHeapSpan, guidHeapSpan) {
		}
开发者ID:0xd4d,项目名称:dnSpy,代码行数:3,代码来源:MetaDataTableVM.cs

示例13: ImportScopeMetaDataTableVM

		public ImportScopeMetaDataTableVM(object owner, HexBuffer buffer, HexPosition startOffset, MDTable mdTable, HexSpan stringsHeapSpan, HexSpan guidHeapSpan)
			: base(owner, buffer, startOffset, mdTable, stringsHeapSpan, guidHeapSpan) {
		}
开发者ID:0xd4d,项目名称:dnSpy,代码行数:3,代码来源:MetaDataTableVM.cs

示例14: ReadBytes

		/// <summary>
		/// Reads bytes
		/// </summary>
		/// <param name="span">Span</param>
		/// <returns></returns>
		public abstract byte[] ReadBytes(HexSpan span);
开发者ID:0xd4d,项目名称:dnSpy,代码行数:6,代码来源:HexBuffer.cs

示例15: AssemblyRefProcessorMetaDataTableVM

		public AssemblyRefProcessorMetaDataTableVM(object owner, HexBuffer buffer, HexPosition startOffset, MDTable mdTable, HexSpan stringsHeapSpan, HexSpan guidHeapSpan)
			: base(owner, buffer, startOffset, mdTable, stringsHeapSpan, guidHeapSpan) {
		}
开发者ID:0xd4d,项目名称:dnSpy,代码行数:3,代码来源:MetaDataTableVM.cs


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