You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.
I want to implement a custom IViewLocationProvider to put in a library. I want to set up some custom view locations for use with a custom view engine, and fall back to the default strategy when it doesn't match. This is because I want my library to coexist happily with other view engines.
However it looks like NancyInternalConfiguration only allows for a single ViewLocationProvider to be configured; it's a Type and not an IEnumerable<Type> or anything like that. My next thought was to wrap an existing IViewLocationProvider in my object and delegate to it, but there doesn't seem to be a clean way of getting hold of the default provider (it'll have been overridden by my custom one!)
NB I don't want to hard-code FileSystemViewLocationProvider as the fallback. The fallback strategy should be configurable.
Any tips?
The text was updated successfully, but these errors were encountered:
I'm looking for exactly the same thing, but don't mind writing my own IViewLocationProvider to do it. How would you go about using FileSystemViewLocationProvider by default and falling back to ResourceViewLocationProvider?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I want to implement a custom
IViewLocationProvider
to put in a library. I want to set up some custom view locations for use with a custom view engine, and fall back to the default strategy when it doesn't match. This is because I want my library to coexist happily with other view engines.However it looks like
NancyInternalConfiguration
only allows for a singleViewLocationProvider
to be configured; it's aType
and not anIEnumerable<Type>
or anything like that. My next thought was to wrap an existingIViewLocationProvider
in my object and delegate to it, but there doesn't seem to be a clean way of getting hold of the default provider (it'll have been overridden by my custom one!)NB I don't want to hard-code
FileSystemViewLocationProvider
as the fallback. The fallback strategy should be configurable.Any tips?
The text was updated successfully, but these errors were encountered: