Skip to content

Additional context in initialization functions. #29

Description

@Jabronironi

It would be very helpful if the initialization functions had some additional context that could get passed in that provided data on where in the property graph this current initialization is occuring. Example:

new Dictionary<Type, Func<context, object, object>>();
var clone = source.GetClone(initializers);

In the initializer, if I could then do something like:

string[] currentPath = context.Path;

And have it return an array of strings that represent the current location of the initialization (aka: ["ObjectA", "PropertyA", "Index[0]"])

I know something like this would affect initialization performance, but I don't think it would necessarily affect "second time through" performance. What do you think?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions