C# / .Net API Library Reference  4.3.2-74-ge1d4cca
Properties
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
Note
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)
 

Properties

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

Property Documentation

byte [] Bytes
get

Returns the underlying byte array containing the content.

ArraySegment<byte> Content
get

Returns the content.

bool IsEmpty
get

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

int Length
get

Returns the length of the content.

int Offset
get

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

string Type
get

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