Table of Contents

Class JsonEntityObjectList

Namespace
TimeCockpit.Data.JsonConverters
Assembly
TimeCockpit.Data.dll

Object representing a result as serialized by a service call. it contains a type and a collection of items. The type name is always set. If the NewWithType is null, the ModelEntityBase for the given type can be found in the already transferred model.

public class JsonEntityObjectList
Inheritance
Object
JsonEntityObjectList
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()

Constructors

JsonEntityObjectList()

public JsonEntityObjectList()

Properties

AnonynmousTypes

Gets or sets the type of the entity objects in the item collection.

public IEnumerable<ModelEntityBase> AnonynmousTypes { get; set; }

Property Value

IEnumerable<ModelEntityBase>

Items

Gets or sets a collection of entity object types.

public IEnumerable<EntityObject> Items { get; set; }

Property Value

IEnumerable<EntityObject>

Methods

FindAnonymousTypes(IEnumerable<EntityObject>, Model)

Finds the anonymous types.

public static IEnumerable<ModelEntityBase> FindAnonymousTypes(IEnumerable<EntityObject> entityObjects, Model model)

Parameters

entityObjects IEnumerable<EntityObject>

The entity objects.

model Model

The model to search for model entities.

Returns

IEnumerable<ModelEntityBase>

A list of types that cannot be found in the model.

FindAnonymousTypesAlongRelations(EntityObject, Model, HashSet<ModelEntityBase>)

Finds the anonymous types along an entity object. Calls itself along the relations.

public static void FindAnonymousTypesAlongRelations(EntityObject entityObject, Model model, HashSet<ModelEntityBase> target)

Parameters

entityObject EntityObject

The entity object.

model Model

The model containing the well-defined entity objects.

target HashSet<ModelEntityBase>

The target to write model entities to.

Read(JsonReader, Model, Environment)

Reads an instance of EntityObject that is serialized in Json

public static JsonEntityObjectList Read(JsonReader reader, Model model, Environment environment)

Parameters

reader JsonReader

The reader that is used to read the Json string.

model Model

The current DataContext model.

environment Environment

the Current DataContext Environment.

Returns

JsonEntityObjectList

an instance of EntityObject

Write(JsonWriter, Model, JsonEntityObjectList)

Writes the json.

public static void Write(JsonWriter writer, Model model, JsonEntityObjectList selectResult)

Parameters

writer JsonWriter

The writer.

model Model

The base model to use for existing types.

selectResult JsonEntityObjectList

The entity object.