Add title

This commit is contained in:
Andrew Cooper
2022-10-03 21:29:34 +11:00
parent 617053b1f4
commit d16d72965f
5 changed files with 30 additions and 1 deletions

View File

@@ -0,0 +1,16 @@
using System.Reflection;
using System.Runtime.CompilerServices;
namespace Poetry.Resources;
internal static class Resource
{
internal static class Streams
{
public static Stream Title => GetStream();
}
private static Stream GetStream([CallerMemberName] string? name = null) =>
Assembly.GetExecutingAssembly().GetManifestResourceStream($"{typeof(Resource).Namespace}.{name}.txt")
?? throw new Exception($"Could not find embedded resource stream '{name}'.");
}