C# / .Net API Library Reference
ContentInfo Class Reference

The ContentInfo class represents content information in terms of content type and bytes.

The ResourceManager stores resources as ContentInfo objects. Objects of this type can also be passed to RenderTarget for streaming to client-side views, although this bypasses PureWeb's imaging pipeline and requires you to provide a client-side custom renderer implementation.

Public Functions

Constructors and Destructors
The type parameter in the constructor can be any mime type, such as PDF (application/pdf), PNG (image/png), or plain text (text/plain). If a type is not specified, it is assumed to be application/octet-stream by default.
 ContentInfo (string type)
 ContentInfo (string type, byte[] content)
 ContentInfo (string type, ArraySegment< byte > content)
 ContentInfo (byte[] content)
 ContentInfo (ArraySegment< byte > content)


byte[] Bytes [get]
ArraySegment< byte > Content [get]
bool IsEmpty [get]
int Length [get]
int Offset [get]
string Type [get]

Property Documentation

byte [] Bytes

Returns the underlying byte array containing the content.

ArraySegment<byte> Content

Returns the content.

bool IsEmpty

Returns a boolean value indicating whether this instance of ContentInfo is empty.

int Length

Returns the length of the content.

int Offset

Returns the offset of the content in the underlying byte array.

string Type

Returns the mime type of the content, as it was set in the constructor.