Exemplo n.º 1
0
 public void InjectJavaScript(Assembly resourceAssembly, string resourceName)
 {
     CustomEmbeddedResources[resourceName] = new EmbeddedResource(
         resourceAssembly,
         resourceName,
         "text/javascript");
     InjectedScriptPaths.Add(resourceName);
 }
Exemplo n.º 2
0
 public void InjectStylesheet(Assembly resourceAssembly, string resourceName)
 {
     CustomEmbeddedResources[resourceName] = new EmbeddedResource(
         resourceAssembly,
         resourceName,
         "text/css");
     InjectedStylesheetPaths.Add(resourceName);
 }
Exemplo n.º 3
0
        private HttpContent ContentFor(HttpRequestMessage request, EmbeddedResource embeddedResource)
        {
            var stream = embeddedResource.GetStream();
            var content = embeddedResource.MediaType.StartsWith("text/")
                ? new StreamContent(ApplyConfigExpressions(stream, request))
                : new StreamContent(stream);

            content.Headers.ContentType = new MediaTypeHeaderValue(embeddedResource.MediaType);
            return content;
        }
Exemplo n.º 4
0
 public void CustomRoute(string uiPath, Assembly resourceAssembly, string resourceName)
 {
     CustomEmbeddedResources[uiPath] = new EmbeddedResource(resourceAssembly, resourceName);
 }
Exemplo n.º 5
0
 public void CustomRoute(string uiPath, Assembly resourceAssembly, string resourceName)
 {
     CustomEmbeddedResources[uiPath] = new EmbeddedResource(resourceAssembly, resourceName);
 }