I want to do something similar to what HtmlHelpers does in ASP.NET MVC. Take the following:
@Html.EditorFor(model => model.SomeProperty.SomeInnerProperty)
HtmlHelper can explicitly get not only a value for SomeInnerProperty, but also knows what I call the "path" to this property, because it creates the corresponding HTML element with the attribute:
name="SomeProperty.SomeInnerProperty"
I want to make a way to create a method that can receive both a value and a "path", similar to how HtmlHelpers does it. I was thinking a bit about the existing HtmlHelpers, and it was like a rabbit hole. I was able to create a method that consumes it like this:
MyCustomMethod(model => model.SomeProperty.SomeInnerProperty);
private void MyCustomMethod(Expression<Func<object, object>> expression)
{
}
"", , , , , . , , ; - .
?