protected void LoadEmbeddedResource(ResourceHandler resourceHandler, Uri url) { var stream = ResourcesManager.TryGetResource(url, true, out string extension); if (stream != null) { resourceHandler.RespondWith(stream, extension); } }
protected virtual void LoadEmbeddedResource(ResourceHandler resourceHandler, Uri url) { var resourceAssembly = ResolveResourceAssembly(url); var resourcePath = ResourceUrl.GetEmbeddedResourcePath(url); var extension = Path.GetExtension(resourcePath.Last()).ToLower(); var resourceStream = TryGetResourceWithFullPath(resourceAssembly, resourcePath); if (resourceStream != null) { resourceHandler.RespondWith(resourceStream, extension); } }