Hishop.Plugins/Utils.cs
(完整代码) 1KBnamespace Hishop.Plugins
{
using System;
using System.IO;
using System.Reflection;
using System.Web;
public static class Utils
{
public static string GetResourceContent(string sFileName)
{
string str2;
try
{
string str = "";
using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(sFileName))
{
using (StreamReader reader = new StreamReader(stream))
{
str = reader.ReadToEnd();
}
}
str2 = str;
}
catch (Exception exception)
{
throw new Exception(string.Concat(new object[] { "Could not read resource \"", sFileName, "\": ", exception }));
}
return str2;
}
public static string ApplicationPath
{
get
{
string applicationPath = "/";
if (HttpContext.Current != null)
{
applicationPath = HttpContext.Current.Request.ApplicationPath;
}
if (applicationPath == "/")
{
return string.Empty;
}
return applicationPath;
}
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
