Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Expose path of currently executing view #1940

Closed
DamianEdwards opened this issue Feb 2, 2015 · 1 comment
Closed

Expose path of currently executing view #1940

DamianEdwards opened this issue Feb 2, 2015 · 1 comment

Comments

@DamianEdwards
Copy link
Member

The path of the currently executing view would be extremely helpful when tracing information RE view rendering, e.g. from Tag Helpers.

It will likely not work on ViewContext as that flows down to things like partial views. Perhaps a new type is needed, e.g. ViewExecutionContext, on which we make it available. We could investigate making the entire tree of view execution available, e.g. view -> layout -> partial view -> etc.

@yishaigalatzer
Copy link
Contributor

We should consider doing something special for templates (as templates are similar to partial views, but they have a different context), so perhaps some indication of the type of view that the code is executing in (enum? or set of well known strings?).

We had a quick discussion with @pranavkm and we think ViewContext should work.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants