            this.text = text;
            this.encoding = encoding;
        }

        public static Func<Stream, Task> Create(string text, Encoding encoding)
        {
            return stream =>
            {
                var textBody = new TextBody(text, encoding);
                return textBody.Start(stream);
            };
        }