Class ClientSettingsManager
Each client has settings associated with it. This class manages these settings, and allows a user to persist them.
Inheritance
Namespace: AppDrillCore.Session
Assembly: AppDrillCore.dll
Syntax
public sealed class ClientSettingsManager : object
Properties
Instance
The singleton instance of this class.
Declaration
public static ClientSettingsManager Instance { get; }
Property Value
Type | Description |
---|---|
Client |
Methods
GetSettings()
Return the client settings stored internally. In case no settings were ever stored, or loaded from a file, an object with default values will be returned.
Declaration
public ClientSettings GetSettings()
Returns
Type | Description |
---|---|
Client |
The client settings object stored internally |
LoadSettings(String)
Load the client settings from a file.
Declaration
public bool LoadSettings(string fileName)
Parameters
Type | Name | Description |
---|---|---|
System. |
fileName | The file name to load from |
Returns
Type | Description |
---|---|
System. |
true if the file exists, and loading was successful, false if the file does not exists, IOException for other errors |
SaveSettings(String)
Save the client settings to a file.
Declaration
public bool SaveSettings(string fileName)
Parameters
Type | Name | Description |
---|---|---|
System. |
fileName | The file name to write to |
Returns
Type | Description |
---|---|
System. |
true if storing was successful, IOException for other errors |
SetSettings(ClientSettings)
Set the client settings internally. Later, these settings can be stored to a file using
Save
Declaration
public bool SetSettings(ClientSettings settings)
Parameters
Type | Name | Description |
---|---|---|
Client |
settings |
Returns
Type | Description |
---|---|
System. |