C# Класс Zazzles.Settings

Показать файл Открыть проект

Private Properties

Свойство Тип Описание
Save bool
SaveSession bool
Settings System

Открытые методы

Метод Описание
Get ( string key ) : string

IsCompatible ( OSType type ) : bool

Check if the current OS is compatible with the given type

Reload ( ) : void

Reparse the settings.json file

Set ( string key, JToken value, bool session = true ) : void

Set the value of a setting. Will automatically save.

SetPath ( string filePath ) : void

Set the filePath of the settings.json file. Will automatically reload.

Приватные методы

Метод Описание
Save ( ) : bool

Save the current data to settings.json

SaveSession ( ) : bool
Settings ( ) : System

Описание методов

Get() публичный статический Метод

public static Get ( string key ) : string
key string The setting to retrieve
Результат string

IsCompatible() публичный статический Метод

Check if the current OS is compatible with the given type
public static IsCompatible ( OSType type ) : bool
type OSType The type of OS to check for compatibility with
Результат bool

Reload() публичный статический Метод

Reparse the settings.json file
public static Reload ( ) : void
Результат void

Set() публичный статический Метод

Set the value of a setting. Will automatically save.
public static Set ( string key, JToken value, bool session = true ) : void
key string The name of the setting
value JToken The new value of the setting
session bool
Результат void

SetPath() публичный статический Метод

Set the filePath of the settings.json file. Will automatically reload.
public static SetPath ( string filePath ) : void
filePath string The path of the file
Результат void