public void Compose(string fileName, string title, Action <DocumentFormatter> contentWriter) { var path = Path.Combine(OutputPath, fileName); var textWriter = new StreamWriter(path, false, Encoding.UTF8); using (var formatter = _formatOptions.CreateFormatter(textWriter, this, leaveOpen: false)) { formatter.Prologue(title); contentWriter(formatter); formatter.Epilogue(); } }