Esempio n. 1
0
        // UI thread
        public override IHexBufferInfo CreateBuffer()
        {
            uiDispatcher.VerifyAccess();
            var debuggerHexBufferStream = new DebuggerHexBufferStream();
            var buffer      = hexBufferFactoryService.Create(debuggerHexBufferStream, hexBufferFactoryService.DefaultMemoryTags, disposeStream: true);
            var bufferState = new BufferState(buffer, debuggerHexBufferStream);

            bufferStates.Add(bufferState);
            buffer.Disposed           += Buffer_Disposed;
            buffer.ChangedLowPriority += Buffer_ChangedLowPriority;
            var info = processInfos.FirstOrDefault();

            bufferState.SetUnderlyingStream(info?.Stream, info?.Process);
            HexBufferInfoCreated?.Invoke(this, new HexBufferInfoCreatedEventArgs(bufferState));
            return(bufferState);
        }
Esempio n. 2
0
 public void InvalidateSpan(NormalizedHexChangeCollection changes) => DebuggerHexBufferStream.Invalidate(changes);
Esempio n. 3
0
 public BufferState(HexBuffer buffer, DebuggerHexBufferStream debuggerHexBufferStream)
 {
     Buffer = buffer ?? throw new ArgumentNullException(nameof(buffer));
     DebuggerHexBufferStream = debuggerHexBufferStream ?? throw new ArgumentNullException(nameof(debuggerHexBufferStream));
 }