MrKWatkins.Ast Help

Properties Class

Definition

A collection of properties for a node. Properties allow you to store arbitrary data against a node and will be copying during calls to Copy(). Properties can have a single value or multiple values.

public sealed class Properties

Properties

Name

Description

Count

The number of properties in the collection.

Methods

Name

Description

AddRangeToMultiple<T>(String, IEnumerable<T>)

Adds values to a multiple valued property with the specified key.

AddToMultiple<T>(String, T)

Adds a value to a multiple valued property with the specified key.

ContainsKey(String)

Tests whether a property exists with the specified key.

GetMultiple<T>(String)

Gets the values of a multiple valued property with the specified key.

GetOrAdd<T>(String, Func<String, T>)

Gets the value of a single valued property with the specified key or returns a default value if the property does not exist.

GetOrDefault<T>(String, T)

Gets the value of a single valued property with the specified key or returns a default value if the property does not exist.

GetOrThrow<T>(String)

Gets the value of a single valued property with the specified key or throws an exception if the property does not exist.

GetOrThrow<T>(String, T)

Gets the value of a single valued property with the specified key or throws an exception if the property does not exist. Uses a field to cache the value for better performance.

GetOrThrow<T>(String, T?)

Gets the value of a single valued property with the specified key or throws an exception if the property does not exist. Uses a field to cache the value for better performance.

GetOrThrow<T>(String, Func<Exception>)

Gets the value of a single valued property with the specified key or throws an exception if the property does not exist.

GetOrThrow<T>(String, T, Func<Exception>)

Gets the value of a single valued property with the specified key or throws an exception if the property does not exist. Uses a field to cache the value for better performance.

GetOrThrow<T>(String, T?, Func<Exception>)

Gets the value of a single valued property with the specified key or throws an exception if the property does not exist. Uses a field to cache the value for better performance.

GetOrThrow<T>(String, Func<String, Exception>)

Gets the value of a single valued property with the specified key or throws an exception if the property does not exist.

GetOrThrow<T>(String, T, Func<String, Exception>)

Gets the value of a single valued property with the specified key or throws an exception if the property does not exist. Uses a field to cache the value for better performance.

GetOrThrow<T>(String, T?, Func<String, Exception>)

Gets the value of a single valued property with the specified key or throws an exception if the property does not exist. Uses a field to cache the value for better performance.

Set<T>(String, T)

Sets the value of a single valued property with the specified key.

Set<T>(String, T, T)

Sets the value of a single valued property with the specified key. Uses a field to cache the value for better performance.

Set<T>(String, T, T?)

Sets the value of a single valued property with the specified key. Uses a field to cache the value for better performance.

SetMultiple<T>(String, IEnumerable<T>)

Sets the values of a multiple valued property with the specified key. Any existing values are replaced.

TryAddToMultiple<T>(String, T, IEqualityComparer<T>)

Tries to add a value to a multiple valued property with the specified key. If the value already exists in the multiple then it is not added.

TryGet<T>(String, T)

Tries to get the value of a single valued property with the specified key.

Last modified: 09 September 2024