Class ObjectJsonExtensions
Provides object extension methods.
Inheritance
object
Namespace: Umbraco.Extensions
Assembly: Umbraco.Infrastructure.dll
Syntax
public static class ObjectJsonExtensions
Methods
View SourceToObjectDictionary<T>(T, Func<PropertyInfo, string>?)
Converts an object's properties into a dictionary.
Declaration
public static Dictionary<string, object> ToObjectDictionary<T>(T obj, Func<PropertyInfo, string>? namer = null)
Parameters
| Type | Name | Description |
|---|---|---|
| T | obj | The object to convert. |
| Func<PropertyInfo, string> | namer | A property namer function. |
Returns
| Type | Description |
|---|---|
| Dictionary<string, object> | A dictionary containing each properties. |
Type Parameters
| Name | Description |
|---|---|
| T |