Search Results for

    Show / Hide Table of Contents

    Class DefaultLocalizerJsonSerializer

    Class holding static methods to wrap a localizer into a JObject and back again.

    Inheritance
    System.Object
    DefaultLocalizerJsonSerializer
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: TimeCockpit.Data.Localization.Default
    Assembly: TimeCockpit.Data.dll
    Syntax
    public static class DefaultLocalizerJsonSerializer

    Methods

    FromJson(DefaultLocalizer, JObject, String)

    Reads a localizer instance from a json root object using a specific culture. The localizations found in the json object will be stored as the culture.

    Declaration
    public static void FromJson(DefaultLocalizer localizer, JObject root, string culture)
    Parameters
    Type Name Description
    DefaultLocalizer localizer

    the localizer to save to.

    Newtonsoft.Json.Linq.JObject root

    the root object containing the localization info for the specific culture.

    System.String culture

    the culture that is serialized.

    ToJson(DefaultLocalizer, String)

    Writes the strings of a given culture to a json object.

    Declaration
    public static JObject ToJson(DefaultLocalizer localizer, string culture)
    Parameters
    Type Name Description
    DefaultLocalizer localizer

    the localizer to write.

    System.String culture

    the culture to use.

    Returns
    Type Description
    Newtonsoft.Json.Linq.JObject

    returns the object containing the localization information for the given culture.

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