Class PropertyCollection
A collection of properties.
[DataContract("PropertyCollection")]
public sealed class PropertyCollection : ConcurrentDictionary<PropertyKey, object>, IDictionary<PropertyKey, object>, ICollection<KeyValuePair<PropertyKey, object>>, IReadOnlyDictionary<PropertyKey, object>, IReadOnlyCollection<KeyValuePair<PropertyKey, object>>, IEnumerable<KeyValuePair<PropertyKey, object>>, IDictionary, ICollection, IEnumerable- Inheritance
- 
      objectPropertyCollection
- Implements
- Inherited Members
- Extension Methods
Constructors
PropertyCollection()
Initializes a new instance of the PropertyCollection class.
public PropertyCollection()PropertyCollection(IEnumerable<KeyValuePair<PropertyKey, object>>)
Initializes a new instance of the PropertyCollection class.
public PropertyCollection(IEnumerable<KeyValuePair<PropertyKey, object>> dictionary)Parameters
- dictionaryIEnumerable<KeyValuePair<PropertyKey, object>>
- The dictionary. 
Methods
CopyTo(IDictionary<PropertyKey, object>, bool)
Copies this properties to a output dictionary.
public void CopyTo(IDictionary<PropertyKey, object> properties, bool overrideValues)Parameters
- propertiesIDictionary<PropertyKey, object>
- The dictionary to receive a copy of the properties of this instance. 
- overrideValuesbool
- if set to - true[override values].
Exceptions
- ArgumentNullException
- properties 
Get(PropertyKey)
Gets a value for the specified key, null if not found.
public object? Get(PropertyKey key)Parameters
- keyPropertyKey
- The key. 
Returns
- object
- A value for the specified key, null if not found. 
Get<T>(PropertyKey<T>)
Gets a value for the specified key, null if not found.
public T? Get<T>(PropertyKey<T> key)Parameters
- keyPropertyKey<T>
- The key. 
Returns
- T
- a value for the specified key, null if not found. 
Type Parameters
- T
- Type of the value 
Set(PropertyKey, object)
Sets a value for the specified key.
public void Set(PropertyKey key, object value)Parameters
- keyPropertyKey
- The key. 
- valueobject
- The value. 
Set<T>(PropertyKey<T>, T)
Sets a value for the specified key.
public void Set<T>(PropertyKey<T> key, T value)Parameters
- keyPropertyKey<T>
- The key. 
- valueT
- The value. 
Type Parameters
- T
- Type of the value. 
TryGet<T>(PropertyKey<T>, out T)
Gets a value for the specified key, null if not found.
public bool TryGet<T>(PropertyKey<T> key, out T value)Parameters
- keyPropertyKey<T>
- The key. 
- valueT
- The value. 
Returns
- bool
- A value for the specified key, null if not found. 
Type Parameters
- T
- Type of the value