Click or drag to resize

IPropertyBag Interface

Represents a scriptable collection of named properties.

Namespace: Microsoft.ClearScript
Assembly: ClearScript.Core (in ClearScript.Core.dll) Version: 7.4.5
Syntax
public interface IPropertyBag : IDictionary<string, Object>, 
	ICollection<KeyValuePair<string, Object>>, IEnumerable<KeyValuePair<string, Object>>, 
	IEnumerable

The IPropertyBag type exposes the following members.

Properties
 NameDescription
Public propertyCountGets the number of elements contained in the ICollectionT.
(Inherited from ICollectionKeyValuePairString, Object)
Public propertyIsReadOnlyGets a value indicating whether the ICollectionT is read-only.
(Inherited from ICollectionKeyValuePairString, Object)
Public propertyItemGets or sets the element with the specified key.
(Inherited from IDictionaryString, Object)
Public propertyKeysGets an ICollectionT containing the keys of the IDictionaryTKey, TValue.
(Inherited from IDictionaryString, Object)
Public propertyValuesGets an ICollectionT containing the values in the IDictionaryTKey, TValue.
(Inherited from IDictionaryString, Object)
Top
Methods
 NameDescription
Public methodAdd(T)Adds an item to the ICollectionT.
(Inherited from ICollectionKeyValuePairString, Object)
Public methodAdd(TKey, TValue)Adds an element with the provided key and value to the IDictionaryTKey, TValue.
(Inherited from IDictionaryString, Object)
Public methodClearRemoves all items from the ICollectionT.
(Inherited from ICollectionKeyValuePairString, Object)
Public methodContainsDetermines whether the ICollectionT contains a specific value.
(Inherited from ICollectionKeyValuePairString, Object)
Public methodContainsKeyDetermines whether the IDictionaryTKey, TValue contains an element with the specified key.
(Inherited from IDictionaryString, Object)
Public methodCopyToCopies the elements of the ICollectionT to an Array, starting at a particular Array index.
(Inherited from ICollectionKeyValuePairString, Object)
Public methodGetEnumeratorReturns an enumerator that iterates through the collection.
(Inherited from IEnumerableKeyValuePairString, Object)
Public methodRemove(T)Removes the first occurrence of a specific object from the ICollectionT.
(Inherited from ICollectionKeyValuePairString, Object)
Public methodRemove(TKey)Removes the element with the specified key from the IDictionaryTKey, TValue.
(Inherited from IDictionaryString, Object)
Public methodTryGetValueGets the value associated with the specified key.
(Inherited from IDictionaryString, Object)
Top
Remarks
If an object that implements this interface is added to a script engine (see AddHostObject), script code will be able to access the properties stored in the collection as if they were members of the object itself, using the script language's native syntax for member access. No other members of the object will be accessible. This interface also allows objects to implement dynamic properties for script languages that support them.
See Also