1. Stylelabs.M.Scripting.Types.V1_0.Action

Interface IPropertyBag

Defines simple property bag which stores langword_csharp_string properties associated with langword_csharp_string keys.

Namespace: StylelabsStylelabs.MStylelabs.M.ScriptingStylelabs.M.Scripting.TypesStylelabs.M.Scripting.Types.V1_0Action

Assembly: Stylelabs.M.Scripting.Types.dll

Syntax

public interface IPropertyBag

Properties

this[string]

Gets or sets the value associated with the given key.

Declaration

string this[string key] { get; set; }

Parameters

TypeNameDescription
stringkeyThe key to get the value for.

Property Value

TypeDescription
stringThe value associated with the given key. If the value's not there, null is returned.

Methods

Add(string, string)

Add specified value or override existing one.

Declaration

string Add(string key, string addValue)

Parameters

TypeNameDescription
stringkeyThe key.
stringaddValueThe value.

Returns

TypeDescription
stringAdded value.

ContainsKey(string)

Checks if the IPropertyBag contains an entry for the given key.

Declaration

bool ContainsKey(string key)

Parameters

TypeNameDescription
stringkeyThe key to check.

Returns

TypeDescription
booltrue if the bag contains an entry for the given key; otherwise false.

Remove(string)

Tries to removes the entry with the specified key from the property-bag. If the entry doesn't exist, nothing will happen.

Declaration

bool Remove(string key)

Parameters

TypeNameDescription
stringkeyThe key to remove.

Returns

TypeDescription
booltrue if entry's been removed, meaning the property-bag contained an entry wit the given key; otherwise false.

TryGetValue(string, out string)

Attempts to get the value associated with specified key.

Declaration

bool TryGetValue(string key, out string value)

Parameters

TypeNameDescription
stringkeyThe key.
stringvalueThe value.

Returns

TypeDescription
booltrue if the value was returned.
If you have suggestions for improving this article, let us know!