Table of Contents

Class PropertyCollection

Namespace
Stride.Core.Assets
Assembly
Stride.Core.Assets.dll

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
PropertyCollection
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

dictionary IEnumerable<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

properties IDictionary<PropertyKey, object>

The dictionary to receive a copy of the properties of this instance.

overrideValues bool

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

key PropertyKey

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

key PropertyKey<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

key PropertyKey

The key.

value object

The value.

Set<T>(PropertyKey<T>, T)

Sets a value for the specified key.

public void Set<T>(PropertyKey<T> key, T value)

Parameters

key PropertyKey<T>

The key.

value T

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

key PropertyKey<T>

The key.

value T

The value.

Returns

bool

A value for the specified key, null if not found.

Type Parameters

T

Type of the value