Class ObjectJsonExtensions
Provides object extension methods.
Inheritance
System.Object
Namespace: Umbraco.Extensions
Assembly: Umbraco.Infrastructure.dll
Syntax
public static class ObjectJsonExtensions
Methods
View SourceToObjectDictionary<T>(T, Nullable<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. |
System.Nullable<Func<System.Reflection.PropertyInfo, System.String>> | namer | A property namer function. |
Returns
Type | Description |
---|---|
Dictionary<System.String, System.Object> | A dictionary containing each properties. |
Type Parameters
Name | Description |
---|---|
T |