public ProjectResourceLocator(string resourcesPath, ProjectResources projectResources)
 {
     ResourcesPath         = resourcesPath ?? string.Empty;
     this.projectResources = projectResources;
 }
 public static List <Resource <TResource> > LocateProjectResources(string path, ProjectResources projectResources)
 {
     return(projectResources.ResourcePaths.LocateResourcePathsAtFolder(path).Select(p => new Resource <TResource>(p)).ToList());
 }
Beispiel #3
0
 public static List <Folder> LocateProjectFolders(string path, ProjectResources projectResources)
 {
     return(projectResources.ResourcePaths.LocateFolderPathsAtFolder(path).Select(p => new Folder(p)).ToList());
 }
 public ProjectResourceProvider(string rootPath = null)
 {
     projectResources = ProjectResources.Get();
     redirectors      = new Dictionary <Type, TypeRedirector>();
     RootPath         = rootPath;
 }
 public ProjectResourceLocator(IResourceProvider provider, string resourcesPath,
                               ProjectResources projectResources) : base(provider, resourcesPath ?? string.Empty)
 {
     this.projectResources = projectResources;
 }
 public static IEnumerable <string> LocateProjectResources(string path, ProjectResources projectResources)
 {
     return(projectResources.ResourcePaths.LocateResourcePathsAtFolder(path));
 }
Beispiel #7
0
        public static IEnumerable <string> LocateProjectResources(string rootPath, string resourcesPath, ProjectResources projectResources)
        {
            var path   = string.IsNullOrEmpty(rootPath) ? resourcesPath : string.IsNullOrEmpty(resourcesPath) ? rootPath : $"{rootPath}/{resourcesPath}";
            var result = projectResources.ResourcePaths.LocateResourcePathsAtFolder(path);

            if (!string.IsNullOrEmpty(rootPath))
            {
                return(result.Select(p => p.GetAfterFirst(rootPath + "/")));
            }
            return(result);
        }
 public ProjectResourceProvider()
 {
     projectResources = ProjectResources.Get();
     redirectors      = new Dictionary <Type, TypeRedirector>();
 }
Beispiel #9
0
        public static List <Folder> LocateProjectFolders(string rootPath, string resourcesPath, ProjectResources projectResources)
        {
            var path = string.IsNullOrEmpty(rootPath) ? resourcesPath : string.IsNullOrEmpty(resourcesPath) ? rootPath : $"{rootPath}/{resourcesPath}";

            return(projectResources.ResourcePaths.LocateFolderPathsAtFolder(path)
                   .Select(p => new Folder(string.IsNullOrEmpty(rootPath) ? p : p.GetAfterFirst(rootPath + "/"))).ToList());
        }
Beispiel #10
0
 public ProjectFolderLocator(IResourceProvider provider, string rootPath, string resourcesPath, ProjectResources projectResources)
     : base(provider, resourcesPath ?? string.Empty)
 {
     RootPath = rootPath;
     this.projectResources = projectResources;
 }
Beispiel #11
0
 public ProjectResourceProvider()
 {
     projectResources = ProjectResources.Get();
 }