mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-25 12:25:10 -08:00
17 lines
559 B
C#
17 lines
559 B
C#
using System.Reflection;
|
|
using System.Runtime.CompilerServices;
|
|
|
|
namespace Poker.Resources;
|
|
|
|
internal static class Resource
|
|
{
|
|
internal static class Streams
|
|
{
|
|
public static Stream Instructions => GetStream();
|
|
public static Stream Title => GetStream();
|
|
}
|
|
|
|
private static Stream GetStream([CallerMemberName] string? name = null)
|
|
=> Assembly.GetExecutingAssembly().GetManifestResourceStream($"Poker.Resources.{name}.txt")
|
|
?? throw new ArgumentException($"Resource stream {name} does not exist", nameof(name));
|
|
} |