Class DictionaryExtensions
- Namespace
- FoundationaLLM.Common.Extensions
- Assembly
- FoundationaLLM.Common.dll
Provides extension methods for Dictionary<TKey, TValue>.
public static class DictionaryExtensions
- Inheritance
-
DictionaryExtensions
- Inherited Members
Methods
ToObject<T>(Dictionary<string, object>, Dictionary<string, object>?)
Converts a dictionary to an object of type T
with optional overrides.
public static T ToObject<T>(this Dictionary<string, object> source, Dictionary<string, object>? overrides = null) where T : new()
Parameters
source
Dictionary<string, object>The source properties for the returned object.
overrides
Dictionary<string, object>Optional overrides to apply to the returned object parameters.
Returns
- T
Type Parameters
T
The type of the object to which you want to convert from a source dictionary.