Ejemplo n.º 1
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);
Ejemplo n.º 2
0
		/// <summary>
		/// Creates a new <see cref="HexBuffer"/>
		/// </summary>
		/// <param name="data">Data</param>
		/// <param name="name">Name, can be anything and is usually the filename</param>
		/// <param name="tags">Tags or null to use the default file tags</param>
		/// <returns></returns>
		public abstract HexBuffer Create(byte[] data, string name, HexTags tags = null);
Ejemplo n.º 3
0
		/// <summary>
		/// Constructor
		/// </summary>
		protected HexBufferFactoryService() {
			EmptyTags = new HexTags(Array.Empty<string>());
			DefaultMemoryTags = new HexTags(defaultMemoryTags);
			DefaultFileTags = new HexTags(defaultFileTags);
		}
Ejemplo n.º 4
0
		/// <summary>
		/// Creates a new <see cref="HexBuffer"/>
		/// </summary>
		/// <param name="filename">Filename</param>
		/// <param name="tags">Tags or null to use the default file tags</param>
		/// <returns></returns>
		public abstract HexBuffer Create(string filename, HexTags tags = null);
Ejemplo n.º 5
0
		/// <summary>
		/// Constructor
		/// </summary>
		protected HexBuffer(HexTags tags) {
			if (tags == null)
				throw new ArgumentNullException(nameof(tags));
			Properties = new VSUTIL.PropertyCollection();
			Tags = tags;
		}