Class JsonEnvironmentResult
- Namespace
- TimeCockpit.Data.JsonConverters
- Assembly
- TimeCockpit.Data.dll
Represents an instance of Environment that is used during json (de-)serialization.
public class JsonEnvironmentResult
- Inheritance
-
ObjectJsonEnvironmentResult
- Inherited Members
-
Object.ToString()Object.Equals(Object)Object.Equals(Object, Object)Object.ReferenceEquals(Object, Object)Object.GetHashCode()Object.GetType()Object.MemberwiseClone()
Constructors
JsonEnvironmentResult()
public JsonEnvironmentResult()
Properties
CurrentUser
Gets or sets the current user of the DataContext.
public EntityObject CurrentUser { get; set; }
Property Value
Error
Gets or sets the error.
public JsonErrorMessage Error { get; set; }
Property Value
- JsonErrorMessage
The error.
GlobalSettings
Gets or sets the current global settings of the DataContext.
public EntityObject GlobalSettings { get; set; }
Property Value
NamedSets
Gets or sets a collection of named sets.
public IDictionary<string, NamedSet> NamedSets { get; set; }
Property Value
- IDictionary<String, NamedSet>
Methods
ReadEnvironmentResult(JsonReader, Model, Environment)
Reads an instance of EntityObject that is serialized in Json
public static JsonEnvironmentResult ReadEnvironmentResult(JsonReader reader, Model model, Environment environment)
Parameters
readerJsonReaderThe reader that is used to read the Json string.
modelModelThe model used to deserialize entity objects.
environmentEnvironmentThe current environment.
Returns
- JsonEnvironmentResult
an instance of EntityObject
ReadNamedSets(JsonReader, Model, Environment)
Reads the a named set
public static Dictionary<string, NamedSet> ReadNamedSets(JsonReader reader, Model model, Environment environment)
Parameters
readerJsonReaderthe reader to read from.
modelModelthe model to use for reading.
environmentEnvironmentthe environment used for reading.
Returns
- Dictionary<String, NamedSet>
Returns a new dictionary containing the named sets.
Write(JsonWriter, JsonEnvironmentResult, Model)
Writes the json.
public static void Write(JsonWriter writer, JsonEnvironmentResult environmentResult, Model model)
Parameters
writerJsonWriterThe writer.
environmentResultJsonEnvironmentResultThe result of a REST query.
modelModelthe model used for writing.