Nancy.Response.GetStringContents C# (CSharp) Method

GetStringContents() protected static method

Converts a string content value to a response action.
protected static GetStringContents ( string contents ) : Action
contents string The string containing the content.
return Action
        protected static Action<Stream> GetStringContents(string contents)
        {
            return stream =>
            {
                var writer = new StreamWriter(stream) { AutoFlush = true };
                writer.Write(contents);
            };
        }