Method Locate(IRouteContext?, TextSource, string, string)
Pins a that names a file by a relative path to the file the context
can actually see: the registered first (a package keeps
its resources where only the resolver knows), then baseDirectory, which is
what the consuming package was configured with. Inline text, an embedded resource and an
absolute path are returned untouched.
The returned source names the resolved file, so a compile cache keyed by it distinguishes two
packages that ship the same relative name — a hot-reloaded module must not render the previous
version's text.
public static TextSource Locate(IRouteContext? context, TextSource source, string baseDirectory, string what)