本文整理汇总了C#中IWebHelper.MapPath方法的典型用法代码示例。如果您正苦于以下问题:C# IWebHelper.MapPath方法的具体用法?C# IWebHelper.MapPath怎么用?C# IWebHelper.MapPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IWebHelper
的用法示例。
在下文中一共展示了IWebHelper.MapPath方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ImageCache
public ImageCache(MediaSettings mediaSettings, IWebHelper webHelper)
{
this._mediaSettings = mediaSettings;
this._webHelper = webHelper;
_cacheRootDir = new DirectoryInfo(_webHelper.MapPath("~/Media/Thumbs"));
}
示例2: ImageCache
public ImageCache(MediaSettings mediaSettings, IWebHelper webHelper, IStoreContext storeContext, HttpContextBase httpContext)
{
this._mediaSettings = mediaSettings;
this._webHelper = webHelper;
this._storeContext = storeContext;
this._httpContext = httpContext;
_cacheRootDir = new DirectoryInfo(_webHelper.MapPath("~/Media/Thumbs"));
}
示例3: FileSystemStorageProvider
public FileSystemStorageProvider(FileSystemSettings settings, IWebHelper webHelper)
{
var mediaPath = webHelper.MapPath("~/Media/");
_storagePath = Path.Combine(mediaPath, settings.DirectoryName);
var appPath = "";
if (HostingEnvironment.IsHosted) {
appPath = HostingEnvironment.ApplicationVirtualPath;
}
if (!appPath.EndsWith("/"))
appPath = appPath + '/';
if (!appPath.StartsWith("/"))
appPath = '/' + appPath;
_publicPath = appPath + "Media/" + settings.DirectoryName + "/";
}
示例4: ThemeProvider
public ThemeProvider(NopConfig nopConfig, IWebHelper webHelper)
{
basePath = webHelper.MapPath(nopConfig.ThemeBasePath);
LoadConfigurations();
}
示例5: GetFilesWrite
/// <summary>
/// Gets a list of files (physical paths) which require write permission
/// </summary>
/// <param name="webHelper">Web helper</param>
/// <returns>Result</returns>
public static IEnumerable<string> GetFilesWrite(IWebHelper webHelper)
{
string rootDir = webHelper.MapPath("~/");
var filesToCheck = new List<string>();
filesToCheck.Add(Path.Combine(rootDir, "Global.asax"));
filesToCheck.Add(Path.Combine(rootDir, "web.config"));
filesToCheck.Add(Path.Combine(rootDir,"App_Data\\InstalledPlugins.txt"));
filesToCheck.Add(Path.Combine(rootDir, "App_Data\\Settings.txt"));
return filesToCheck;
}
示例6: GetDirectoriesWrite
/// <summary>
/// Gets a list of directories (physical paths) which require write permission
/// </summary>
/// <param name="webHelper">Web helper</param>
/// <returns>Result</returns>
public static IEnumerable<string> GetDirectoriesWrite(IWebHelper webHelper)
{
string rootDir = webHelper.MapPath("~/");
var dirsToCheck = new List<string>();
//dirsToCheck.Add(rootDir);
dirsToCheck.Add(Path.Combine(rootDir, "App_Data"));
dirsToCheck.Add(Path.Combine(rootDir, "bin"));
dirsToCheck.Add(Path.Combine(rootDir, "content"));
dirsToCheck.Add(Path.Combine(rootDir, "content\\images"));
dirsToCheck.Add(Path.Combine(rootDir, "content\\images\\thumbs"));
dirsToCheck.Add(Path.Combine(rootDir, "content\\images\\uploaded"));
dirsToCheck.Add(Path.Combine(rootDir, "content\\files\\exportimport"));
dirsToCheck.Add(Path.Combine(rootDir, "plugins"));
dirsToCheck.Add(Path.Combine(rootDir, "plugins\\bin"));
return dirsToCheck;
}
示例7: ThemeProvider
public ThemeProvider(AgileEAPConfigure configure, IWebHelper webHelper)
{
basePath = webHelper.MapPath(configure.ThemeBasePath);
LoadConfigurations();
}
示例8: ThemeProvider
public ThemeProvider(IWebHelper webHelper)
{
basePath = webHelper.MapPath("~/Themes");
LoadConfigurations();
}
示例9: ThemeProvider
public ThemeProvider(SiteConfig siteConfig, IWebHelper webHelper)
{
basePath = webHelper.MapPath(siteConfig.ThemeBasePath);
LoadConfigurations();
}