SushiHangover.RealmJson.Extensions
Extension Methods for adding JSON APIs to a Realm Instance.
Static Public Member Functions | Public Attributes | List of all members
SushiHangover.RealmJson.RealmDoesJson Class Reference

.Net Realm does json. More...

Static Public Member Functions

static T CreateObjectFromJson< T > (this Realm realm, string jsonString, bool inTransaction=false)
 Creates a single RealmObject from a json string. More...
 
static T CreateObjectFromJson< T > (this Realm realm, Stream stream, bool inTransaction=false)
 Creates the single RealmObject from a stream containing json. More...
 
static T CreateOrUpdateObjectFromJson< T > (this Realm realm, string jsonString, bool inTransaction=false)
 Creates or updates a single RealmObject from a json string. More...
 
static void CreateAllFromJson< T > (this Realm realm, Stream stream, bool updateExistingRecords=true, bool inTransaction=false)
 Creates multiple RealmObjects from a json stream More...
 
static void CreateAllFromJson< T > (this Realm realm, string jsonString, bool updateExistingRecords=true, bool inTransaction=false)
 Creates multiple RealmObjects from a json string. More...
 
static void CreateAllFromJsonViaAutoMapper< T > (this Realm realm, Stream stream, bool inTransaction=false)
 Creates multiple RealmObjects from a json stream using AutoMapper More...
 
static T NonManagedCopy< T > (this RealmObject realmObject)
 Create a Generic non-managed RealmObject Copy More...
 
static RealmObject NonManagedCopy (this RealmObject realmObject)
 Create a non-managed RealmObject Copy. More...
 
static IQueryable< T > NonManagedCopy< T > (this IQueryable< T > results)
 Create a non-managed copy of Realm's Query Result. More...
 
static IList< T > NonManagedCopy< T > (this IList< T > list)
 Create a non-managed copy of Realm's Query Result. More...
 

Public Attributes

const string ExMalFormeJsonMessage = "Malformed Json"
 Malformed json exception message. More...
 

Detailed Description

.Net Realm does json.

Member Function Documentation

◆ CreateAllFromJson< T >() [1/2]

static void SushiHangover.RealmJson.RealmDoesJson.CreateAllFromJson< T > ( this Realm  realm,
Stream  stream,
bool  updateExistingRecords = true,
bool  inTransaction = false 
)
inlinestatic

Creates multiple RealmObjects from a json stream

Parameters
realmRealm Instance.
streamStream.
updateExistingRecordsIf set to true update existing records.
inTransactionIf set to true in transaction.
Template Parameters
TRealmObject-based Class.
Type Constraints
T :RealmObject 

◆ CreateAllFromJson< T >() [2/2]

static void SushiHangover.RealmJson.RealmDoesJson.CreateAllFromJson< T > ( this Realm  realm,
string  jsonString,
bool  updateExistingRecords = true,
bool  inTransaction = false 
)
inlinestatic

Creates multiple RealmObjects from a json string.

Parameters
realmRealm Instance.
jsonStringJson string.
updateExistingRecordsIf set to true update existing records.
inTransactionIf set to true in transaction.
Template Parameters
TRealmObject-based Class.
Type Constraints
T :RealmObject 

◆ CreateAllFromJsonViaAutoMapper< T >()

static void SushiHangover.RealmJson.RealmDoesJson.CreateAllFromJsonViaAutoMapper< T > ( this Realm  realm,
Stream  stream,
bool  inTransaction = false 
)
inlinestatic

Creates multiple RealmObjects from a json stream using AutoMapper

Parameters
realmRealm Instance.
streamStream.
inTransactionbool.
Template Parameters
TRealmObject-based Class.
Type Constraints
T :RealmObject 

◆ CreateObjectFromJson< T >() [1/2]

static T SushiHangover.RealmJson.RealmDoesJson.CreateObjectFromJson< T > ( this Realm  realm,
string  jsonString,
bool  inTransaction = false 
)
inlinestatic

Creates a single RealmObject from a json string.

Returns
Parameters
realmRealm Instance
jsonStringJson string
inTransactionbool.
Template Parameters
TRealmOject-based Class..
Type Constraints
T :RealmObject 

◆ CreateObjectFromJson< T >() [2/2]

static T SushiHangover.RealmJson.RealmDoesJson.CreateObjectFromJson< T > ( this Realm  realm,
Stream  stream,
bool  inTransaction = false 
)
inlinestatic

Creates the single RealmObject from a stream containing json.

Returns
The object from json.
Parameters
realmRealm Instance.
streamStream.
inTransactionbool.
Template Parameters
TRealmObject-based Class.
Type Constraints
T :RealmObject 

◆ CreateOrUpdateObjectFromJson< T >()

static T SushiHangover.RealmJson.RealmDoesJson.CreateOrUpdateObjectFromJson< T > ( this Realm  realm,
string  jsonString,
bool  inTransaction = false 
)
inlinestatic

Creates or updates a single RealmObject from a json string.

Returns
the updatex object from json.
Parameters
realmRealm Instance.
jsonStringJson string.
inTransactionIf set to true in transaction.
Template Parameters
TRealmObject-based Class.
Type Constraints
T :RealmObject 

◆ NonManagedCopy()

static RealmObject SushiHangover.RealmJson.RealmDoesJson.NonManagedCopy ( this RealmObject  realmObject)
inlinestatic

Create a non-managed RealmObject Copy.

Returns
The managed copy.
Parameters
realmObjectRealm object.

◆ NonManagedCopy< T >() [1/3]

static T SushiHangover.RealmJson.RealmDoesJson.NonManagedCopy< T > ( this RealmObject  realmObject)
inlinestatic

Create a Generic non-managed RealmObject Copy

Returns
The managed copy.
Parameters
realmObjectRealm object.
Template Parameters
TThe 1st type parameter.
Type Constraints
T :RealmObject 

◆ NonManagedCopy< T >() [2/3]

static IQueryable<T> SushiHangover.RealmJson.RealmDoesJson.NonManagedCopy< T > ( this IQueryable< T >  results)
inlinestatic

Create a non-managed copy of Realm's Query Result.

Parameters
resultsRealm collection
Template Parameters
TType of the RealmObject in the results.
Returns
The collection of non-managed realm objects.
Type Constraints
T :RealmObject 

◆ NonManagedCopy< T >() [3/3]

static IList<T> SushiHangover.RealmJson.RealmDoesJson.NonManagedCopy< T > ( this IList< T >  list)
inlinestatic

Create a non-managed copy of Realm's Query Result.

Parameters
resultsRealm collection
Template Parameters
TType of the RealmObject in the results.
Returns
The collection of non-managed realm objects.
Type Constraints
T :RealmObject 

Member Data Documentation

◆ ExMalFormeJsonMessage

const string SushiHangover.RealmJson.RealmDoesJson.ExMalFormeJsonMessage = "Malformed Json"

Malformed json exception message.


The documentation for this class was generated from the following file: