/// <summary> /// Crear un nombre de archivo /// </summary> /// <param name="removeFolder">Folder to remove inclusive the last "\"</param> /// <param name="carpeta"></param> /// <param name="extension">extension del archivo</param> /// <returns></returns> public string creaNombreFile(string removeFolder, string carpeta, string extension) { archivos a = new archivos(); carpeta = ApplicationPath.Replace(removeFolder, "") + carpeta; string strRuta = a.creaNombreFile(carpeta, extension); a = null; return(strRuta); }
/// <summary> /// Maps the provided application relative path without using the HttpContext.Current.Server.MapPath function. /// </summary> /// <param name="applicationRelativePath"></param> /// <returns></returns> public string MapApplicationRelativePath(string applicationRelativePath) { if (applicationRelativePath == null || applicationRelativePath == String.Empty) { throw new ArgumentNullException("applicationRelativePath"); } if (ApplicationPath == null || ApplicationPath == String.Empty) { throw new InvalidOperationException("The ApplicationPath property has not been set on the MockFileMapper."); } string path = PhysicalRoot + Path.DirectorySeparatorChar + ApplicationPath.Replace("/", @"\").Trim('\\') + Path.DirectorySeparatorChar + applicationRelativePath.Replace("/", @"\").Trim('\\'); return(path); }