/// <summary> /// Initializes a new instance of the <see cref="DeterministicStreamWriter"/> class. /// </summary> /// <param name="stream">The stream to write to.</param> /// <param name="encoding">The encoding used when writing to the stream.</param> /// <param name="action">The action to take for the stream when the writer is closed.</param> public DeterministicStreamWriter(Stream stream, Encoding encoding, StreamActionOnDispose action) : base(stream, encoding) { _closeAction = action; }