TidyJson.JsonPalette.ImportJson C# (CSharp) Method

ImportJson() public method

public ImportJson ( Jayrock.Json.JsonReader reader ) : void
reader Jayrock.Json.JsonReader
return void
        public void ImportJson(JsonReader reader)
        {
            ((IJsonImportable) this).Import(new ImportContext(), reader);
        }

Same methods

JsonPalette::ImportJson ( string text ) : void

Usage Example

Example #1
0
        public static JsonPalette Auto(ConsoleBrush defaultBrush)
        {
            string setting;

            try
            {
                setting = Settings.Default[defaultBrush.Background + "Palette"];
            }
            catch (KeyNotFoundException)
            {
                setting = null;
            }

            if (string.IsNullOrEmpty(setting))
            {
                setting      = Settings.BlackPalette;
                defaultBrush = new ConsoleBrush(ConsoleColor.White, ConsoleColor.Black);
            }

            var palette = new JsonPalette(defaultBrush);

            palette.ImportJson(setting);

            return(palette);
        }
All Usage Examples Of TidyJson.JsonPalette::ImportJson