예제 #1
0
		void SetUnderlyingStreamCore(HexBufferStream newStream) {
			if (stream == newStream)
				return;
			UnregisterEvents();
			stream?.Dispose();
			stream = newStream;
			RegisterEvents();
			InvalidateAll();
			UnderlyingStreamChanged?.Invoke(this, EventArgs.Empty);
		}
예제 #2
0
 /// <summary>
 /// Creates a new <see cref="HexBuffer"/>
 /// </summary>
 /// <param name="stream">Stream to use</param>
 /// <param name="tags">Tags</param>
 /// <param name="disposeStream">true if the returned buffer owns <paramref name="stream"/> and
 /// disposes it when the buffer gets disposed</param>
 /// <returns></returns>
 public abstract HexBuffer Create(HexBufferStream stream, HexTags tags, bool disposeStream);
예제 #3
0
		/// <summary>
		/// Creates a new <see cref="HexBuffer"/>
		/// </summary>
		/// <param name="stream">Stream to use</param>
		/// <param name="tags">Tags</param>
		/// <param name="disposeStream">true if the returned buffer owns <paramref name="stream"/> and
		/// disposes it when the buffer gets disposed</param>
		/// <returns></returns>
		public abstract HexBuffer Create(HexBufferStream stream, HexTags tags, bool disposeStream);
예제 #4
0
		public void SetUnderlyingStream(HexBufferStream newStream) {
			CheckDisposed();
			SetUnderlyingStreamCore(newStream);
		}