Class KeyValuePairPropertyBag<TKey, TValue>
A IPropertyBag<TContainer> implementation for a generic key/value pair.
Inherited Members
Namespace: Unity.Properties
Syntax
public class KeyValuePairPropertyBag<TKey, TValue> : PropertyBag<KeyValuePair<TKey, TValue>>, IPropertyBag<KeyValuePair<TKey, TValue>>, IPropertyBag, IPropertyBagRegister, IConstructor<KeyValuePair<TKey, TValue>>, IConstructor, INamedProperties<KeyValuePair<TKey, TValue>>
Type Parameters
Name | Description |
---|---|
TKey | The key type. |
TValue | The value type. |
Methods
GetProperties()
Returns an enumerator that iterates through all static properties for the type.
Declaration
public override PropertyCollection<KeyValuePair<TKey, TValue>> GetProperties()
Returns
Type | Description |
---|---|
PropertyCollection<KeyValuePair<TKey, TValue>> | A IEnumerator<T> structure for all properties. |
Overrides
Remarks
This should return a subset properties returned by GetProperties(ref TContainer).
GetProperties(ref KeyValuePair<TKey, TValue>)
Returns an enumerator that iterates through all static and dynamic properties for the given container.
Declaration
public override PropertyCollection<KeyValuePair<TKey, TValue>> GetProperties(ref KeyValuePair<TKey, TValue> container)
Parameters
Type | Name | Description |
---|---|---|
KeyValuePair<TKey, TValue> | container |
Returns
Type | Description |
---|---|
PropertyCollection<KeyValuePair<TKey, TValue>> | A IEnumerator<T> structure for all properties. |
Overrides
Remarks
This should return all static properties returned by GetProperties() in addition to any dynamic properties. If the container is a collection type all elements will be iterated.
TryGetProperty(ref KeyValuePair<TKey, TValue>, String, out IProperty<KeyValuePair<TKey, TValue>>)
Gets the property associated with the specified name.
Declaration
public bool TryGetProperty(ref KeyValuePair<TKey, TValue> container, string name, out IProperty<KeyValuePair<TKey, TValue>> property)
Parameters
Type | Name | Description |
---|---|---|
KeyValuePair<TKey, TValue> | container | The container hosting the data. |
String | name | The name of the property to get. |
IProperty<KeyValuePair<TKey, TValue>> | property | When this method returns, contains the property associated with the specified name, if the name is found; otherwise, null. |
Returns
Type | Description |
---|---|
Boolean | true if the INamedProperties<TContainer> contains a property with the specified name; otherwise, false. |