Add command line interface and change solution structure (#26)

This commit is contained in:
Alexey Golub
2018-01-12 20:28:36 +01:00
committed by GitHub
parent 7da82f9ef4
commit 8515efe11b
73 changed files with 489 additions and 199 deletions

View File

@@ -0,0 +1,23 @@
using System.IO;
using System.Reflection;
using System.Resources;
namespace DiscordChatExporter.Core.Internal
{
internal static class AssemblyHelper
{
public static string GetResourceString(string resourcePath)
{
var assembly = Assembly.GetExecutingAssembly();
var stream = assembly.GetManifestResourceStream(resourcePath);
if (stream == null)
throw new MissingManifestResourceException($"Could not find resource [{resourcePath}].");
using (stream)
using (var reader = new StreamReader(stream))
{
return reader.ReadToEnd();
}
}
}
}