C# Класс 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.
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
jsonSerializer Newtonsoft.Json.JsonSerializer

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Описание методов

BreezeEntityBuilder() публичный Метод

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
Результат Newtonsoft.Json

BreezeEntityBuilder() публичный Метод

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
Результат Newtonsoft.Json

BuildEntityGroups() защищенный Метод

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
Результат List

BuildSaveWorkState() публичный Метод

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
Результат SaveWorkState

BuildSaveWorkState() публичный Метод

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
Результат SaveWorkState

CreateEntityInfoFromJson() защищенный статический Метод

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
Результат EntityInfo

CreateJsonSerializerSettings() защищенный статический Метод

Create breeze-friendly serializer settings
protected static CreateJsonSerializerSettings ( ) : JsonSerializerSettings
Результат Newtonsoft.Json.JsonSerializerSettings

JsonToDictionary() защищенный статический Метод

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
Результат Object>.Dictionary

LookupEntityType() защищенный Метод

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"
Результат System.Type

Описание свойств

jsonSerializer публичное статическое свойство

public static JsonSerializer,Newtonsoft.Json jsonSerializer
Результат Newtonsoft.Json.JsonSerializer