1
0
mirror of https://github.com/chylex/Code-Statistics.git synced 2024-11-22 07:42:46 +01:00
Code-Statistics/Resources/Embedded.cs

15 lines
581 B
C#

using System;
using System.IO;
namespace CodeStatistics.Resources{
static class Embedded{
private static Lazy<Stream> Get(string name){
return new Lazy<Stream>(() => typeof(Embedded).Assembly.GetManifestResourceStream($"CodeStatistics.Resources.{name.Replace('/', '.')}") ?? throw new ArgumentException($"Embedded resource not found: {name}"));
}
private static readonly Lazy<Stream> DefaultConfigurationLazy = Get("default.codestatistics");
public static Stream DefaultConfiguration => DefaultConfigurationLazy.Value;
}
}