本文整理汇总了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);
}
示例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;
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
}
}
}
示例10: StateMachineMethodMetaDataTableVM
public StateMachineMethodMetaDataTableVM(object owner, HexBuffer buffer, HexPosition startOffset, MDTable mdTable, HexSpan stringsHeapSpan, HexSpan guidHeapSpan)
: base(owner, buffer, startOffset, mdTable, stringsHeapSpan, guidHeapSpan) {
}
示例11: CustomDebugInformationMetaDataTableVM
public CustomDebugInformationMetaDataTableVM(object owner, HexBuffer buffer, HexPosition startOffset, MDTable mdTable, HexSpan stringsHeapSpan, HexSpan guidHeapSpan)
: base(owner, buffer, startOffset, mdTable, stringsHeapSpan, guidHeapSpan) {
}
示例12: GenericParamConstraintMetaDataTableVM
public GenericParamConstraintMetaDataTableVM(object owner, HexBuffer buffer, HexPosition startOffset, MDTable mdTable, HexSpan stringsHeapSpan, HexSpan guidHeapSpan)
: base(owner, buffer, startOffset, mdTable, stringsHeapSpan, guidHeapSpan) {
}
示例13: ImportScopeMetaDataTableVM
public ImportScopeMetaDataTableVM(object owner, HexBuffer buffer, HexPosition startOffset, MDTable mdTable, HexSpan stringsHeapSpan, HexSpan guidHeapSpan)
: base(owner, buffer, startOffset, mdTable, stringsHeapSpan, guidHeapSpan) {
}
示例14: ReadBytes
/// <summary>
/// Reads bytes
/// </summary>
/// <param name="span">Span</param>
/// <returns></returns>
public abstract byte[] ReadBytes(HexSpan span);
示例15: AssemblyRefProcessorMetaDataTableVM
public AssemblyRefProcessorMetaDataTableVM(object owner, HexBuffer buffer, HexPosition startOffset, MDTable mdTable, HexSpan stringsHeapSpan, HexSpan guidHeapSpan)
: base(owner, buffer, startOffset, mdTable, stringsHeapSpan, guidHeapSpan) {
}