Table of Contents

Class SettingsManager

Namespace
Amazon.Util.Internal
Assembly
AWSSDK.Core.dll

Manager to access a settings store file. Settings store files are located under the current user's AppData\Local\AWSToolkit folder. Select keys in these files are encrypted on a per user, per machine basis using the Windows Data Protection API; the encrypted values cannot be used by any other user or on any other machine.

This class is not threadsafe.

public class SettingsManager
Inheritance
SettingsManager
Inherited Members

Constructors

SettingsManager(string)

Construct a SettingsManager.

public SettingsManager(string settingsType)

Parameters

settingsType string

The base filename to read/write.

Properties

IsAvailable

True if the encrypted store is availble, false otherwise.

public static bool IsAvailable { get; }

Property Value

bool

SettingsType

The base filename to read/write.

public string SettingsType { get; }

Property Value

string

Methods

ListUniqueKeys()

Get a list of the unique keys of all the objects in the store.

public List<string> ListUniqueKeys()

Returns

List<string>

RegisterObject(Dictionary<string, string>)

Register an object. Let the uniqueKey be assigned automatically.

public string RegisterObject(Dictionary<string, string> properties)

Parameters

properties Dictionary<string, string>

The property names and values for the object.

Returns

string

The unique key that was assigned to the object.

RegisterObject(string, Dictionary<string, string>)

Register an object.

public string RegisterObject(string uniqueKey, Dictionary<string, string> properties)

Parameters

uniqueKey string

The uniqueKey for the object, or null if one should be assigned automatically.

properties Dictionary<string, string>

The property names and values for the object.

Returns

string

The unique key that was assigned to the object.

SelectProperty(string)

Get the value of a specific property for each object in the store.

public List<string> SelectProperty(string propertyName)

Parameters

propertyName string

Returns

List<string>

TryGetObject(string, out Dictionary<string, string>)

Try to get an object form the store.

public bool TryGetObject(string uniqueKey, out Dictionary<string, string> properties)

Parameters

uniqueKey string

The uniqueKey of the object in the store

properties Dictionary<string, string>

The property names and values for the object.

Returns

bool

True if the object was found, false otherwise.

TryGetObjectByProperty(string, string, out string, out Dictionary<string, string>)

Try to get an object form the store based on the value of a specific property. If multiple objects with the same property value exist, return the first one.

public bool TryGetObjectByProperty(string propertyName, string value, out string uniqueKey, out Dictionary<string, string> properties)

Parameters

propertyName string

The name of the property to search on.

value string

The value of the property to search on.

uniqueKey string

The unique key of the object.

properties Dictionary<string, string>

The properties of the object.

Returns

bool

UnregisterObject(string)

Unregister an object from the store.

public void UnregisterObject(string uniqueKey)

Parameters

uniqueKey string

The unique key for the object.