/// <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);
/// <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);
/// <summary> /// Constructor /// </summary> protected HexBufferFactoryService() { EmptyTags = new HexTags(Array.Empty<string>()); DefaultMemoryTags = new HexTags(defaultMemoryTags); DefaultFileTags = new HexTags(defaultFileTags); }
/// <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);
/// <summary> /// Constructor /// </summary> protected HexBuffer(HexTags tags) { if (tags == null) throw new ArgumentNullException(nameof(tags)); Properties = new VSUTIL.PropertyCollection(); Tags = tags; }