mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 18:19:40 +00:00
Rename Microsoft.AspNet.* packages folders to Microsoft.AspNetCore.*
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Microsoft.AspNet.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)) {
|
||||
return sr.ReadToEnd();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user