Search Results for

    Show / Hide Table of Contents

    Class ModelEntityBaseJsonConverter

    Custom converter for ModelEntityBases into Json.

    Inheritance
    System.Object
    ModelEntityBaseJsonConverter
    Namespace: TimeCockpit.Data.JsonConverters
    Assembly: TimeCockpit.Data.dll
    Syntax
    public class ModelEntityBaseJsonConverter : CustomCreationConverter<ModelEntityBase>
    Remarks

    This converter creates a new instance of ModelEntity whenever the Json.Net serializer encounters a ModelEntityBase to deserialize.

    Constructors

    ModelEntityBaseJsonConverter()

    Declaration
    public ModelEntityBaseJsonConverter()

    Methods

    Create(Type)

    Creates the specified object type.

    Declaration
    public override ModelEntityBase Create(Type objectType)
    Parameters
    Type Name Description
    System.Type objectType

    Type of the object.

    Returns
    Type Description
    ModelEntityBase

    an instance of ModelEntity.

    ReadAnonymousTypeArray(JsonReader, Model)

    Reads an array of model entity base instances

    Declaration
    public static IEnumerable<ModelEntityBase> ReadAnonymousTypeArray(JsonReader reader, Model model)
    Parameters
    Type Name Description
    Newtonsoft.Json.JsonReader reader

    the reader to read from.

    Model model

    The model.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<ModelEntityBase>

    Returns a collection of model entity base.

    WriteAnonymousTypeArray(JsonWriter, Model, IEnumerable<ModelEntityBase>)

    Writes a collection of model entity base types to the writer.

    Declaration
    public static void WriteAnonymousTypeArray(JsonWriter writer, Model model, IEnumerable<ModelEntityBase> anonymousTypes)
    Parameters
    Type Name Description
    Newtonsoft.Json.JsonWriter writer

    the writer to write to.

    Model model

    The model.

    System.Collections.Generic.IEnumerable<ModelEntityBase> anonymousTypes

    ModelEntityBase types to serialize.

    In This Article
    Back to top Copyright © 2025 software architects gmbh