NuxeoDotNetClient  1.0.0 beta
.NET Client for Nuxeo Automation and REST API
Public Member Functions | Static Public Member Functions | Properties | List of all members
NuxeoClient.Blob Class Reference

Represents a blob, that might enclose a whole file or a chunk. More...

Public Member Functions

 Blob (string filename)
 Initializes a new instance of Blob. More...
 
 Blob (string filename, byte[] content)
 Initializes a new instance of Blob. More...
 
 Blob (string filename, byte[] content, string mime)
 Initializes a new instance of Blob. More...
 
Blob SetFilename (string filename)
 Sets the name of the file represented by the blob. More...
 
Blob SetContent (byte[] content)
 Sets the blob's content. More...
 
Blob SetContent (string content)
 Sets the blob's content. More...
 
Blob SetMimeType (string mime)
 Set's the file's mime type. More...
 
Blob[] Split (int numChunks)
 Splits a blob into numChunks chunks. More...
 
JObject ToJObject ()
 Creates and returns a JObject representation of the current object. More...
 

Static Public Member Functions

static Blob FromJObject (JObject obj)
 Creates and returns a new instance of Blob build from an instance of JObject. More...
 

Properties

string Filename [get]
 Gets the file name. More...
 
byte[] Content [get]
 Gets the blob's content. More...
 
string MimeType [get]
 Gets the file's mime type. More...
 
bool IsChunk [get]
 Gets whether or not this blob is a chunk or the whole file. More...
 

Detailed Description

Represents a blob, that might enclose a whole file or a chunk.

Definition at line 28 of file Blob.cs.

Constructor & Destructor Documentation

NuxeoClient.Blob.Blob ( string  filename)

Initializes a new instance of Blob.

Parameters
filenameThe name of the file it represents.

Definition at line 54 of file Blob.cs.

NuxeoClient.Blob.Blob ( string  filename,
byte[]  content 
)

Initializes a new instance of Blob.

Parameters
filenameThe name of the file it represents.
contentThe blob's content.

Definition at line 63 of file Blob.cs.

NuxeoClient.Blob.Blob ( string  filename,
byte[]  content,
string  mime 
)

Initializes a new instance of Blob.

Parameters
filenameThe name of the file it represents.
contentThe blob's content.
mimeThe file's mime type.

Definition at line 73 of file Blob.cs.

Member Function Documentation

static Blob NuxeoClient.Blob.FromJObject ( JObject  obj)
static

Creates and returns a new instance of Blob build from an instance of JObject.

Parameters
objThe base JObject object.
Returns
A new instance of Blob.

Definition at line 162 of file Blob.cs.

Blob NuxeoClient.Blob.SetContent ( byte[]  content)

Sets the blob's content.

Parameters
contentThe blob's content.
Returns
The current Blob instance.

Definition at line 96 of file Blob.cs.

Blob NuxeoClient.Blob.SetContent ( string  content)

Sets the blob's content.

Parameters
contentThe blob's content.
Returns
The current Blob instance.

Definition at line 107 of file Blob.cs.

Blob NuxeoClient.Blob.SetFilename ( string  filename)

Sets the name of the file represented by the blob.

Parameters
filenameThe file's name.
Returns
The current Blob instance.

Definition at line 85 of file Blob.cs.

Blob NuxeoClient.Blob.SetMimeType ( string  mime)

Set's the file's mime type.

Parameters
mimeThe file's mime type.
Returns
The current Blob instance.

Definition at line 118 of file Blob.cs.

Blob [] NuxeoClient.Blob.Split ( int  numChunks)

Splits a blob into numChunks chunks.

Parameters
numChunksThe number of chunks to split the blob into.
Returns
An array with numChunks chunk blobs.

Definition at line 129 of file Blob.cs.

JObject NuxeoClient.Blob.ToJObject ( )

Creates and returns a JObject representation of the current object.

Returns
A JObject representation of the current object.

Definition at line 147 of file Blob.cs.

Property Documentation

byte [] NuxeoClient.Blob.Content
get

Gets the blob's content.

Definition at line 38 of file Blob.cs.

string NuxeoClient.Blob.Filename
get

Gets the file name.

Definition at line 33 of file Blob.cs.

bool NuxeoClient.Blob.IsChunk
get

Gets whether or not this blob is a chunk or the whole file.

Definition at line 48 of file Blob.cs.

string NuxeoClient.Blob.MimeType
get

Gets the file's mime type.

Definition at line 43 of file Blob.cs.