Show / Hide Table of Contents

Class PhoenixSettingsManager

Global settings manager for Phoenix.

Inheritance
System.Object
PhoenixSettingsManager
PhoenixUISettingsManager
Implements
ISettingsManager
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Phoenix.Settings
Assembly: Phoenix.Core.dll
Syntax
public class PhoenixSettingsManager : ISettingsManager

Constructors

View Source

PhoenixSettingsManager(IEventAggregator, IPhoenixLogger, String)

Initializes a new instance of the PhoenixSettingsManager class.

Declaration
public PhoenixSettingsManager(IEventAggregator events, IPhoenixLogger logger, string rootDirectory = null)
Parameters
Type Name Description
IEventAggregator events

The event aggregator.

IPhoenixLogger logger

The logger.

System.String rootDirectory

The root for the app data directory for Phoenix.

Properties

View Source

AppDataDirectoryRoot

Gets a string representing the root for the app data directory for Phoenix.

Declaration
public string AppDataDirectoryRoot { get; }
Property Value
Type Description
System.String
View Source

ManagedSettings

Gets a mapping from settings category name to each category's settings.

Declaration
protected Dictionary<string, SettingsCategoryBase> ManagedSettings { get; }
Property Value
Type Description
System.Collections.Generic.Dictionary<System.String, SettingsCategoryBase>
View Source

SettingsCategories

Gets an enumeration of the settings categories.

Declaration
public IEnumerable<SettingsCategoryBase> SettingsCategories { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<SettingsCategoryBase>

Methods

View Source

ChangeSettings(SettingChangeInfo)

Saves a single changed setting to file and settings category object, then publishes an event.

Declaration
public void ChangeSettings(SettingChangeInfo changeInfo)
Parameters
Type Name Description
SettingChangeInfo changeInfo

The setting to change.

View Source

ChangeSettings(List<SettingChangeInfo>)

Batch saves changed settings to file and settings category objects, then publishes an event for each settings category affected.

Declaration
public void ChangeSettings(List<SettingChangeInfo> changeInfos)
Parameters
Type Name Description
System.Collections.Generic.List<SettingChangeInfo> changeInfos

List of the settings to change.

View Source

HandleLoadException(Exception, SettingsCategoryBase)

Declaration
protected virtual SettingsCategoryBase HandleLoadException(Exception e, SettingsCategoryBase defaultSettingsObject)
Parameters
Type Name Description
System.Exception e
SettingsCategoryBase defaultSettingsObject
Returns
Type Description
SettingsCategoryBase
View Source

IsValidSettingInfo(SettingChangeInfo)

Checks if setting exists in managed settings.

Declaration
public bool IsValidSettingInfo(SettingChangeInfo setting)
Parameters
Type Name Description
SettingChangeInfo setting

setting to check.

Returns
Type Description
System.Boolean

True if setting exists.

View Source

LoadSettings<T>()

Load the specified settings from file or load default values if file not found.

Declaration
public T LoadSettings<T>()
    where T : SettingsCategoryBase
Returns
Type Description
T

A SettingsCategory object.

Type Parameters
Name Description
T

SettingsCategoryBase type.

View Source

LoadSettings<T>(String)

Load the specified settings from file or load default values if file not found.

Declaration
public T LoadSettings<T>(string settingsName)
    where T : SettingsCategoryBase
Parameters
Type Name Description
System.String settingsName

Name of the settings to load.

Returns
Type Description
T

A SettingsCategory object.

Type Parameters
Name Description
T

SettingsCategoryBase type.

View Source

LogLoadException(Exception, String)

Declaration
protected void LogLoadException(Exception e, string categoryName)
Parameters
Type Name Description
System.Exception e
System.String categoryName
View Source

SaveSettingsToFile(SettingsCategoryBase)

Declaration
protected void SaveSettingsToFile(SettingsCategoryBase settingsCategory)
Parameters
Type Name Description
SettingsCategoryBase settingsCategory

Implements

ISettingsManager
  • View Source
In This Article
Back to top Generated by DocFX