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
RequestResponse

public interface IPropertyBag

Properties

this[string]

Gets or sets the value associated with the given key.

Declaration
RequestResponse

string this[string key] { get; set; }
Parameters
TypeNameDescription
stringkey

The key to get the value for.

Property Value
TypeDescription
string

The 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
RequestResponse

string Add(string key, string addValue)
Parameters
TypeNameDescription
stringkey

The key.

stringaddValue

The value.

Returns
TypeDescription
string

Added value.

ContainsKey(string)

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

Declaration
RequestResponse

bool ContainsKey(string key)
Parameters
TypeNameDescription
stringkey

The key to check.

Returns
TypeDescription
bool

true 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
RequestResponse

bool Remove(string key)
Parameters
TypeNameDescription
stringkey

The key to remove.

Returns
TypeDescription
bool

true 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
RequestResponse

bool TryGetValue(string key, out string value)
Parameters
TypeNameDescription
stringkey

The key.

stringvalue

The value.

Returns
TypeDescription
bool

true if the value was returned.

Do you have some feedback for us?

If you have suggestions for improving this article,