1 Star 2 Fork 2

Flash/MVCFrameworkSolution

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
AppContext.cs 1.09 KB
一键复制 编辑 原始数据 按行查看 历史
Flash 提交于 2016-07-15 10:37 +08:00 . 添加项目文件。
using System;
using System.Configuration;
namespace MvcSolution
{
public class AppContext
{
/// <summary>
/// D:\wwws\www.MvcSolution.com
/// </summary>
public static string RootFolder { get; }
static AppContext()
{
RootFolder = ConfigurationManager.AppSettings["RootFolder"];
}
public const int LoginExpireDays = 365;
public const string Md5Key = "MvcSolution";
/// <summary>
/// returns /_storage/image originals/{userid}/{year}-{month}/
/// </summary>
public static string GetImageOriginalFolder(Guid? userId)
{
return $"/_storage/image originals/{(userId == null ? "_system" : userId.ToString())}/{DateTime.Now.Year}-{DateTime.Now.Month}/";
}
/// <summary>
/// returns /_storage/image sized/{year}-{month}/{imageId}/
/// </summary>
public static string GetSizedImageFolder(Guid imageId)
{
return $"/_storage/image sized/{DateTime.Now.Year}-{DateTime.Now.Month}/{imageId}/";
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/echobean/MVCFrameworkSolution.git
git@gitee.com:echobean/MVCFrameworkSolution.git
echobean
MVCFrameworkSolution
MVCFrameworkSolution
master

搜索帮助