C# Class Breeze.Entities.BreezeEntityBuilder

Builds server-side entities from JSON results sent by the Breeze client. This class is thread-safe and can be used to handle multiple requests.
Afficher le fichier Open project: Breeze/breeze.server.net

Méthodes publiques

Свойство Type Description
jsonSerializer Newtonsoft.Json.JsonSerializer

Méthodes publiques

Méthode Description
BreezeEntityBuilder ( List assemblies ) : Newtonsoft.Json

Create an instance using a list of assemblies to probe for entity types that match the entities from the client.

BreezeEntityBuilder ( string assemblyNameContains ) : Newtonsoft.Json

Create an instance using a string to match the assembly names. Matching assemblies will be probed for entity types that match the entities from the client.

BuildSaveWorkState ( Newtonsoft.Json.Linq.JObject saveBundle ) : SaveWorkState

Create a SaveWorkState from the JObject sent by the client.

BuildSaveWorkState ( List rawEntities ) : SaveWorkState

Create a SaveWorkState from the raw entities sent by the client.

Méthodes protégées

Méthode Description
BuildEntityGroups ( List rawEntities ) : List

Create EntityGroup objects from the raw entities sent by the client.

CreateEntityInfoFromJson ( dynamic jo, Type entityType ) : EntityInfo

Create an EntityInfo object from the raw client object

CreateJsonSerializerSettings ( ) : JsonSerializerSettings

Create breeze-friendly serializer settings

JsonToDictionary ( dynamic json ) : Object>.Dictionary

Convert the json object to a dictionary.

LookupEntityType ( string entityTypeName ) : Type

Get the C# type from the entity type name. Uses the modelAssemblies property to look up the entities.

Method Details

BreezeEntityBuilder() public méthode

Create an instance using a list of assemblies to probe for entity types that match the entities from the client.
public BreezeEntityBuilder ( List assemblies ) : Newtonsoft.Json
assemblies List List of assemblies to probe for entity types
Résultat Newtonsoft.Json

BreezeEntityBuilder() public méthode

Create an instance using a string to match the assembly names. Matching assemblies will be probed for entity types that match the entities from the client.
public BreezeEntityBuilder ( string assemblyNameContains ) : Newtonsoft.Json
assemblyNameContains string String contained in the assembly name
Résultat Newtonsoft.Json

BuildEntityGroups() protected méthode

Create EntityGroup objects from the raw entities sent by the client.
protected BuildEntityGroups ( List rawEntities ) : List
rawEntities List Objects assumed to have an entityAspect property containing the entityTypeName
Résultat List

BuildSaveWorkState() public méthode

Create a SaveWorkState from the JObject sent by the client.
public BuildSaveWorkState ( Newtonsoft.Json.Linq.JObject saveBundle ) : SaveWorkState
saveBundle Newtonsoft.Json.Linq.JObject JObject deserialized from Breeze client
Résultat SaveWorkState

BuildSaveWorkState() public méthode

Create a SaveWorkState from the raw entities sent by the client.
public BuildSaveWorkState ( List rawEntities ) : SaveWorkState
rawEntities List Objects assumed to have an entityAspect property containing the entityTypeName
Résultat SaveWorkState

CreateEntityInfoFromJson() protected static méthode

Create an EntityInfo object from the raw client object
protected static CreateEntityInfoFromJson ( dynamic jo, Type entityType ) : EntityInfo
jo dynamic Object assumed to have an entityAspect property containing entityState and optional originalValuesMap and autoGeneratedKey
entityType System.Type Domain model object type to create
Résultat EntityInfo

CreateJsonSerializerSettings() protected static méthode

Create breeze-friendly serializer settings
protected static CreateJsonSerializerSettings ( ) : JsonSerializerSettings
Résultat Newtonsoft.Json.JsonSerializerSettings

JsonToDictionary() protected static méthode

Convert the json object to a dictionary.
protected static JsonToDictionary ( dynamic json ) : Object>.Dictionary
json dynamic Object assumed to be an IEnumerable containing JProperty objects
Résultat Object>.Dictionary

LookupEntityType() protected méthode

Get the C# type from the entity type name. Uses the modelAssemblies property to look up the entities.
protected LookupEntityType ( string entityTypeName ) : Type
entityTypeName string Name in the form "Customer:#My.App.Namespace"
Résultat System.Type

Property Details

jsonSerializer public_oe static_oe property

public static JsonSerializer,Newtonsoft.Json jsonSerializer
Résultat Newtonsoft.Json.JsonSerializer