Bloom.BloomFileLocator.GetBrowserFile C# (CSharp) Method

GetBrowserFile() public static method

public static GetBrowserFile ( ) : string
return string
        public static string GetBrowserFile(params string[] parts)
        {
            parts[0] = Path.Combine(BrowserRoot,parts[0]);
            return FileLocator.GetFileDistributedWithApplication(false, parts);
        }

Usage Example

Esempio n. 1
0
 /// <summary>
 /// Gets a file in the specified branding folder
 /// </summary>
 /// <param name="brandingNameOrFolderPath"> Normally, the branding is just a name, which we look up in the official branding folder
 //  but unit tests can instead provide a path to the folder.
 /// </param>
 /// <param name="fileName"></param>
 /// <returns></returns>
 public static string GetOptionalBrandingFile(string brandingNameOrFolderPath, string fileName)
 {
     if (Path.IsPathRooted(brandingNameOrFolderPath))            //if it looks like a path
     {
         var path = Path.Combine(brandingNameOrFolderPath, fileName);
         if (RobustFile.Exists(path))
         {
             return(path);
         }
         return(null);
     }
     if (Path.IsPathRooted(fileName) && RobustFile.Exists(fileName))             // also just for unit tests
     {
         return(fileName);
     }
     return(BloomFileLocator.GetBrowserFile(true, "branding", brandingNameOrFolderPath, fileName));
 }
All Usage Examples Of Bloom.BloomFileLocator::GetBrowserFile