using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
namespace Apewer.Web
{
/// 程序集资源。
public static class Resources
{
static byte[] Bytes(string name)
{
var assembly = Assembly.GetExecutingAssembly();
using (var stream = assembly.GetManifestResourceStream(name)) return stream.Read();
}
static string Text(string name) => BytesUtility.WipeTextBom(Bytes(name)).Text();
/// 获取预置的 favicon.ico 文件,。
public static byte[] FavIcon() => Bytes("Apewer.FavIcon.ico");
/// 获取用于 .NET Framework 4.0 的 web.config 文件。
public static string WebConfig40() => Text("Apewer.WebConfig40.xml");
/// 获取用于 .NET Framework 4.6.1 的 web.config 文件。
public static string WebConfig461(bool netstandard = false) => Text(netstandard ? "Apewer.WebConfigStd.xml" : "Apewer.WebConfig461.xml");
}
}