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
-
ObjectJsonEntityObjectList
- 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
entityObjectsIEnumerable<EntityObject>The entity objects.
modelModelThe 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
entityObjectEntityObjectThe entity object.
modelModelThe model containing the well-defined entity objects.
targetHashSet<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
readerJsonReaderThe reader that is used to read the Json string.
modelModelThe current DataContext model.
environmentEnvironmentthe 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
writerJsonWriterThe writer.
modelModelThe base model to use for existing types.
selectResultJsonEntityObjectListThe entity object.