Skip to main content

SalNamedProperties

Namespace: PPJ.Runtime.Windows

Assembly: PPJ.Runtime.50 (5.0.0.0)

Stores string-valued properties under case-insensitive names for SAL controls.

public class SalNamedProperties : IList, ICollection, IEnumerable, IDictionary

The collection uses a hash table and does not guarantee enumeration order. Use the string indexer or Put to replace an existing value; Add rejects duplicate names. The IList interface does not support positional access, insertion, or removal.

Example:

var properties = new PPJ.Runtime.Windows.SalNamedProperties();
properties.Add("CustomerId", "42");
string id = properties["customerid"]; // "42"
properties.Put("CustomerId", "43");
bool exists = properties.Contains("CUSTOMERID"); // true

Constructors

Instance member SalNamedProperties()

Initializes a new instance of SalNamedProperties.

Properties

Instance member Count

Int32: Gets the number of named properties in the collection.

Instance member Item(key)

String: Gets or sets a property value using a case-insensitive name lookup.

Instance member Keys

ICollection: Gets a collection view of the stored property names.

Instance member Values

ICollection: Gets a collection view of the stored property values.

Methods

Instance member Add(key, value)

Adds a property whose name is not already present.

ParameterTypeDescription
keyStringThe non-null property name.
valueStringThe property value, which may be null.

Throws:

Instance member Clear()

Removes every named property from the collection.

Instance member Contains(key)

Checks whether a property name exists, ignoring case.

ParameterTypeDescription
keyStringThe non-null property name to find.

Returns: Boolean. when the name is present, including when its value is null; otherwise, .

Instance member CopyTo(array, index)

Copies the collection's key/value entries to an array.

ParameterTypeDescription
arrayArrayA one-dimensional destination array compatible with DictionaryEntry values.
indexInt32The zero-based destination index at which copying begins.

Instance member GetEnumerator()

Gets an enumerator over the named properties.

Returns: IEnumerator. An enumerator whose current value is a DictionaryEntry containing a property name and value.

Instance member Put(key, value)

Adds a named property or replaces its existing value using a case-insensitive name lookup.

ParameterTypeDescription
keyStringThe non-null property name.
valueStringThe property value, which may be null.

Throws:

Instance member Remove(key)

Removes the property with the specified name, if present.

ParameterTypeDescription
keyStringThe property name to remove, compared without regard to case.