logo
logo

Interface IPropertyBag

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

Namespace: Stylelabs.M.Scripting.Types.V1_0.Action
Assembly: Stylelabs.M.Scripting.Types.dll
Syntax
public interface IPropertyBag

Properties

Item[String]

Gets or sets the value associated with the given key.

Declaration
string this[string key] { get; set; }
Parameters
Type Name Description
System.String key

The key to get the value for.

Property Value
Type Description
System.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
string Add(string key, string addValue)
Parameters
Type Name Description
System.String key

The key.

System.String addValue

The value.

Returns
Type Description
System.String

Added value.

ContainsKey(String)

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

Declaration
bool ContainsKey(string key)
Parameters
Type Name Description
System.String key

The key to check.

Returns
Type Description
System.Boolean

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
bool Remove(string key)
Parameters
Type Name Description
System.String key

The key to remove.

Returns
Type Description
System.Boolean

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
bool TryGetValue(string key, out string value)
Parameters
Type Name Description
System.String key

The key.

System.String value

The value.

Returns
Type Description
System.Boolean

true if the value was returned.

Can we improve this article ? Provide feedback