Skip to main content

FileContents

Transforms multiple data content types into a FileContents containing either a binary Stream or text string

Assembly: ServiceStack.Common.dll
View Source
Declaration
public class FileContents

Properties

Stream

View Source
Declaration
public Stream Stream { get; }

Text

View Source
Declaration
public string Text { get; }

Methods

GetAsync(Object, Boolean)

Transform multi supported content types into FileContents containing either Stream or string. If returning unbuffered Stream responsibility is up to callee to properly dispose

View Source
Declaration
public static async Task<FileContents> GetAsync(object contents, bool buffer = false)
Returns

System.Threading.Tasks.Task<ServiceStack.IO.FileContents>

Parameters
TypeName
System.Objectcontents
System.Booleanbuffer