mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 18:19:40 +00:00
refactor: apply default vs transform to xproj
refactor(spa-services): clean code refactor(node-services): clean code, extract classes nto separate files refactor(angular-services): prime cache cleanup
This commit is contained in:
@@ -2,16 +2,20 @@ using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Microsoft.AspNetCore.NodeServices {
|
||||
public static class EmbeddedResourceReader {
|
||||
public static string Read(Type assemblyContainingType, string path) {
|
||||
namespace Microsoft.AspNetCore.NodeServices
|
||||
{
|
||||
public static class EmbeddedResourceReader
|
||||
{
|
||||
public static string Read(Type assemblyContainingType, string path)
|
||||
{
|
||||
var asm = assemblyContainingType.GetTypeInfo().Assembly;
|
||||
var embeddedResourceName = asm.GetName().Name + path.Replace("/", ".");
|
||||
|
||||
using (var stream = asm.GetManifestResourceStream(embeddedResourceName))
|
||||
using (var sr = new StreamReader(stream)) {
|
||||
using (var sr = new StreamReader(stream))
|
||||
{
|
||||
return sr.ReadToEnd();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user