Table of Contents

Class NamedSettingsManager

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

Manager to access a settings store file. Objects are primarily accessed by DisplayName rather than unique key. 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 NamedSettingsManager
Inheritance
NamedSettingsManager
Inherited Members

Constructors

NamedSettingsManager(string)

Construct an NamedSettingsManager.

public NamedSettingsManager(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

Methods

CopyObject(string, string, bool)

Copy an object in the store. The new object will be a copy of the original, except it will be assigned a new unique key.

public void CopyObject(string fromDisplayName, string toDisplayName, bool force)

Parameters

fromDisplayName string
toDisplayName string
force bool

if true and destination object already exists overwrite it

ListObjectNames()

Get a list of the display names for the objects in the store.

public List<string> ListObjectNames()

Returns

List<string>

A list of display names.

RegisterObject(string, Dictionary<string, string>)

Register an object. Let the uniqueKey be assigned automatically.

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

Parameters

displayName string

The display name for the object.

properties Dictionary<string, string>

The property names and values for the object.

Returns

string

The unique key that was assigned to the object.

RenameObject(string, string, bool)

Rename an object in the store.

public void RenameObject(string oldDisplayName, string newDisplayName, bool force)

Parameters

oldDisplayName string
newDisplayName string
force bool

if true and destination object already exists overwrite it

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

Try to get an object form the store.

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

Parameters

displayName string

The display name for the object.

properties Dictionary<string, string>

The property names and values for the object.

Returns

bool

True if the object was found, false otherwise.

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

Try to get an object form the store.

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

Parameters

displayName string

The display name for the object.

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.

UnregisterObject(string)

Unregister an object from the store.

public void UnregisterObject(string displayName)

Parameters

displayName string

The display name for the object.