Class ReferenceExtensions
Helper extension methods.
Namespace: Evergine.Framework.Graphics.Effects.Analyzer
Assembly: Evergine.Framework.dll
Syntax
public static class ReferenceExtensions
Methods
FindCycles<T, TValueList>(IDictionary<T, TValueList>)
Finds cycles in the dictionary.
Declaration
public static List<List<T>> FindCycles<T, TValueList>(this IDictionary<T, TValueList> listDictionary) where TValueList : class, IEnumerable<T>
Parameters
| Type | Name | Description |
|---|---|---|
| IDictionary<T, TValueList> | listDictionary | The dictionary containing the lists. |
Returns
| Type | Description |
|---|---|
| List<List<T>> | The detected cycles. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the key. |
| TValueList | The type of the value list. |
ValueOrDefault<TKey, TValue>(IDictionary<TKey, TValue>, TKey, TValue)
Gets the value of the given key if it exists, otherwise returns the specified default value.
Declaration
public static TValue ValueOrDefault<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key, TValue defaultValue)
Parameters
| Type | Name | Description |
|---|---|---|
| IDictionary<TKey, TValue> | dictionary | The dictionary. |
| TKey | key | The key. |
| TValue | defaultValue | The default value. |
Returns
| Type | Description |
|---|---|
| TValue | The value of the given key if it exists, otherwise returns the specified default value. |
Type Parameters
| Name | Description |
|---|---|
| TKey | The type of the key. |
| TValue | The type of the value. |