当前位置: 首页>>代码示例>>C#>>正文


C# IWebHelper.MapPath方法代码示例

本文整理汇总了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"));
        }
开发者ID:GloriousOnion,项目名称:SmartStoreNET,代码行数:7,代码来源:ImageCache.cs

示例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"));
        }
开发者ID:boatengfrankenstein,项目名称:SmartStoreNET,代码行数:9,代码来源:ImageCache.cs

示例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 + "/";
        }
开发者ID:vic0626,项目名称:nas-merk,代码行数:16,代码来源:FileSystemStorageProvider.cs

示例4: ThemeProvider

 public ThemeProvider(NopConfig nopConfig, IWebHelper webHelper)
 {
     basePath = webHelper.MapPath(nopConfig.ThemeBasePath);
     LoadConfigurations();
 }
开发者ID:btolbert,项目名称:test-commerce,代码行数:5,代码来源:ThemeProvider.cs

示例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;
 }
开发者ID:rajendra1809,项目名称:nopCommerce,代码行数:15,代码来源:FilePermissionHelper.cs

示例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;
 }
开发者ID:rajendra1809,项目名称:nopCommerce,代码行数:21,代码来源:FilePermissionHelper.cs

示例7: ThemeProvider

 public ThemeProvider(AgileEAPConfigure configure, IWebHelper webHelper)
 {
     basePath = webHelper.MapPath(configure.ThemeBasePath);
     LoadConfigurations();
 }
开发者ID:AgileEAP,项目名称:AgileEAP-BPM,代码行数:5,代码来源:ThemeProvider.cs

示例8: ThemeProvider

 public ThemeProvider(IWebHelper webHelper)
 {
     basePath = webHelper.MapPath("~/Themes");
     LoadConfigurations();
 }
开发者ID:khiemnd777,项目名称:aaron-core,代码行数:5,代码来源:ThemeProvider.cs

示例9: ThemeProvider

 public ThemeProvider(SiteConfig siteConfig, IWebHelper webHelper)
 {
     basePath = webHelper.MapPath(siteConfig.ThemeBasePath);
     LoadConfigurations();
 }
开发者ID:netsouls,项目名称:eCentral,代码行数:5,代码来源:ThemeProvider.cs


注:本文中的IWebHelper.MapPath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。