Show / Hide Table of Contents

Class DeviceConfigManager

Handles device configuration tasks for Phoenix.

Inheritance
System.Object
DeviceConfigManager
Implements
IDeviceConfigManager
System.IDisposable
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.DeviceConfiguration
Assembly: Phoenix.DeviceConfiguration.dll
Syntax
public class DeviceConfigManager : IDeviceConfigManager, IDisposable

Constructors

View Source

DeviceConfigManager(IDeviceCommandManager, IPhoenixLogger, IDeviceManager, IEventAggregator, ISettingsManager)

Initializes a new instance of the DeviceConfigManager class.

Declaration
public DeviceConfigManager(IDeviceCommandManager commands, IPhoenixLogger logger, IDeviceManager deviceManager, IEventAggregator eventAggregator, ISettingsManager settingsManager)
Parameters
Type Name Description
IDeviceCommandManager commands

The device command manager implementation.

IPhoenixLogger logger

The logger.

IDeviceManager deviceManager

The device manager.

IEventAggregator eventAggregator

The event service.

ISettingsManager settingsManager

The settings manager.

Fields

View Source

CommandCategory

Declaration
public const string CommandCategory = "Kit Config"
Field Value
Type Description
System.String

Properties

View Source

Configurations

Gets the configurations that have been loaded.

Declaration
public IReadOnlyCollection<IDeviceConfiguration> Configurations { get; }
Property Value
Type Description
System.Collections.Generic.IReadOnlyCollection<IDeviceConfiguration>
View Source

IconUri

Gets the device config icon Uri.

Declaration
public Uri IconUri { get; }
Property Value
Type Description
System.Uri
View Source

Settings

Gets a lookup of settings available to device configurations.

Declaration
public ILookup<string, SettingInformation> Settings { get; }
Property Value
Type Description
System.Linq.ILookup<System.String, SettingInformation>
View Source

UserConfigurationsLocation

Gets the default folder path for user-created device configurations.

Declaration
public string UserConfigurationsLocation { get; }
Property Value
Type Description
System.String

Methods

View Source

ChangeDeviceEnlistment(IDevice, String)

Changes a devices enlistment to the specific configuration.

Declaration
public void ChangeDeviceEnlistment(IDevice device, string configName)
Parameters
Type Name Description
IDevice device

The device to enlist.

System.String configName

The configuration to enlist in.

View Source

CreateSettingsList(IEnumerable<IDevice>, IDeviceConfiguration)

Creates the list of settings for a given configuration and device.

Declaration
public Collection<DeviceConfigSetting> CreateSettingsList(IEnumerable<IDevice> devices, IDeviceConfiguration config)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<IDevice> devices

The devices to create the settings for.

IDeviceConfiguration config

The configuration containing the settings.

Returns
Type Description
System.Collections.ObjectModel.Collection<DeviceConfigSetting>

A collection of the available settings.

View Source

Dispose()

Disposes the config manager

Declaration
public void Dispose()
View Source

Dispose(Boolean)

Disposes the config manager resources

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing

True if disposing the managed resources

View Source

GetConfiguration(String)

Gets the specified configuration.

Declaration
public IDeviceConfiguration GetConfiguration(string name)
Parameters
Type Name Description
System.String name

The name of the configuration.

Returns
Type Description
IDeviceConfiguration

The IDeviceConfiguration.

View Source

LoadConfigurationSettings(IDeviceConfiguration, Boolean)

Loads settings from a IDeviceConfiguration object.

Declaration
public void LoadConfigurationSettings(IDeviceConfiguration config, bool overwrite)
Parameters
Type Name Description
IDeviceConfiguration config

The IDeviceConfiguration object to load.

System.Boolean overwrite

Overwrite existing configurations or settings values if they already exist.

View Source

LoadConfigurationSettings(String, Boolean)

Loads one or more configurations from a settings file.

Declaration
public IReadOnlyCollection<IDeviceConfiguration> LoadConfigurationSettings(string configurationFile, bool overwrite)
Parameters
Type Name Description
System.String configurationFile

The path to a configuration settings file.

System.Boolean overwrite

Overwrite existing configurations or settings values if they already exist.

Returns
Type Description
System.Collections.Generic.IReadOnlyCollection<IDeviceConfiguration>

The configurations loaded.

View Source

LoadConfigurationsFromFile(String)

Loads one or more configurations from a settings file.

Declaration
public static List<DeviceConfiguration> LoadConfigurationsFromFile(string configurationFile)
Parameters
Type Name Description
System.String configurationFile

The path to a configuration settings file.

Returns
Type Description
System.Collections.Generic.List<DeviceConfiguration>

The loaded DeviceConfiguration objects.

View Source

SaveConfigurationsToFile(String, IEnumerable<IDeviceConfiguration>)

Saves one or more configurations to a settings file.

Declaration
public void SaveConfigurationsToFile(string configurationFile, IEnumerable<IDeviceConfiguration> configurations)
Parameters
Type Name Description
System.String configurationFile

The path to save the configuration settings file.

System.Collections.Generic.IEnumerable<IDeviceConfiguration> configurations

The configurations to save.

Implements

IDeviceConfigManager
System.IDisposable
  • View Source
In This Article
Back to top Generated by DocFX