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

This object is responsible for the conversions between JSON objects received from the Nuxeo server and C# Nuxeo Objects. More...

Public Member Functions

 Marshaller (Client client)
 Initializes a new instance of Marshaller. More...
 
void RegisterBO (string adapterType, Type objectType)
 Registers a business object type in the marshaller. More...
 
Entity UnMarshal (JToken json)
 Unmarshals a JSON object into a nuxeo Entity. More...
 
JObject Marshal (Entity entity)
 Marshals a nuxeo Entity to JSON. More...
 

Detailed Description

This object is responsible for the conversions between JSON objects received from the Nuxeo server and C# Nuxeo Objects.

Definition at line 30 of file Marshaller.cs.

Inheritance diagram for NuxeoClient.Marshaller:
NuxeoClient.IMarshaller

Constructor & Destructor Documentation

NuxeoClient.Marshaller.Marshaller ( Client  client)

Initializes a new instance of Marshaller.

Parameters
clientThe client throw which objects are received and sent through.

Definition at line 39 of file Marshaller.cs.

Member Function Documentation

JObject NuxeoClient.Marshaller.Marshal ( Entity  entity)

Marshals a nuxeo Entity to JSON.

Parameters
entityThe Entity to be marshalled.
Returns
The marshalled JSON object.

Implements NuxeoClient.IMarshaller.

Definition at line 90 of file Marshaller.cs.

void NuxeoClient.Marshaller.RegisterBO ( string  adapterType,
Type  objectType 
)

Registers a business object type in the marshaller.

Registering a business object type in the marshaller will allow objects of this type to be marshalled and unmarshalled.

Parameters
adapterTypeA string with the type of the adapter for the business object
objectTypeThe type of the business object.

Implements NuxeoClient.IMarshaller.

Definition at line 52 of file Marshaller.cs.

Entity NuxeoClient.Marshaller.UnMarshal ( JToken  json)

Unmarshals a JSON object into a nuxeo Entity.

Parameters
jsonThe JSON object to be unmarshalled.
Returns
The unmarshalled nuxeo Entity.

Implements NuxeoClient.IMarshaller.

Definition at line 62 of file Marshaller.cs.