Method GetFieldPath
GetFieldPath<TType, TValue>(Expression<Func<TType, TValue>>)
Returns a string path from an expression. This is mostly used to retrieve serialized properties without hardcoding the field path as a string and thus allowing proper refactoring features.
Declaration
public static string GetFieldPath<TType, TValue>(Expression<Func<TType, TValue>> expr)
Parameters
Type | Name | Description |
---|---|---|
Expression<Func<TType, TValue>> | expr | An expression path fo the member |
Returns
Type | Description |
---|---|
string | A string representation of the expression path |
Type Parameters
Name | Description |
---|---|
TType | The class type where the member is defined |
TValue | The member type |