mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2026-01-19 00:06:04 -08:00
Add title
This commit is contained in:
16
70_Poetry/csharp/Resources/Resource.cs
Normal file
16
70_Poetry/csharp/Resources/Resource.cs
Normal 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}'.");
|
||||
}
|
||||
Reference in New Issue
Block a user