public FolderNodeProvider(IFileSystem fs, IPersister persister, IDependencyInjector dependencyInjector) { UploadFolderPaths = new FolderPair[0]; this.fs = fs; this.persister = persister; this.dependencyInjector = dependencyInjector; }
private Directory CreateDirectory(FolderPair pair) { var dd = fs.GetDirectoryOrVirtual(pair.FolderPath); var parent = persister.Get(pair.ParentID); var dir = Directory.New(dd, parent, dependencyInjector); dir.Title = pair.Path.Substring(pair.ParentPath.Length).Trim('/'); dir.Name = dir.Title; return(dir); }
private Directory CreateDirectory(FolderPair pair) { var dd = fs.GetDirectory(pair.FolderPath); var parent = persister.Get(pair.ParentID); var dir = new Directory(dd, parent); dir.Set(fs); dir.Title = pair.Path.Substring(pair.ParentPath.Length).Trim('/'); dir.Name = dir.Title; return(dir); }
private FolderPair[] GetUploadFolderPaths() { var paths = new List <FolderPair>(); // configured folders to the root node foreach (var folder in folderSource.GetUploadFoldersForAllSites()) { var parent = persister.Get(folder.GetParentID()); var pair = new FolderPair(parent.ID, parent.Path, parent.Path + folder.GetName() + "/", folder); paths.Add(pair); } return(paths.ToArray()); }
private FolderPair[] GetUploadFolderPaths() { var paths = new List <FolderPair>(); // configured folders to the root node foreach (FolderElement folder in folders) { var root = persister.Get(host.DefaultSite.RootItemID); var pair = new FolderPair(root.ID, root.Path, folder.Path.TrimStart('~'), folder.Path); paths.Add(pair); } // site-upload folders to their respective nodes paths.AddRange(UploadFoldersForSite(host.DefaultSite)); foreach (var site in host.Sites) { paths.AddRange(UploadFoldersForSite(site)); } return(paths.ToArray()); }
private FolderPair[] GetUploadFolderPaths() { var paths = new List<FolderPair>(); // configured folders to the root node foreach (FolderElement folder in folders) { var root = persister.Get(host.DefaultSite.RootItemID); var pair = new FolderPair(root.ID, root.Path, folder.Path.TrimStart('~'), folder.Path); paths.Add(pair); } // site-upload folders to their respective nodes paths.AddRange(UploadFoldersForSite(host.DefaultSite)); foreach (var site in host.Sites) { paths.AddRange(UploadFoldersForSite(site)); } return paths.ToArray(); }
private Directory CreateDirectory(FolderPair pair) { return(CreateDirectory(pair.Folder, fs, repository, dependencyInjector)); }
private FolderPair[] GetUploadFolderPaths() { var paths = new List<FolderPair>(); if (folderSource == null) throw new NullReferenceException("folderSource is null"); //return new FolderPair[0]; var gpp = new List<FileSystemRoot>(folderSource.GetUploadFoldersForAllSites()); // non-lazy easier to debug :-) if (gpp == null) throw new NullReferenceException("folderSource.GetUploadFoldersForAllSites() returned null"); // configured folders to the root node foreach (var folder in gpp) { var parent = persister.Get(folder.GetParentID()); if (parent == null) break; var pair = new FolderPair(parent.ID, parent.Path, parent.Path + folder.GetName() + "/", folder); paths.Add(pair); } return paths.ToArray(); }
private Directory CreateDirectory(FolderPair pair) { return CreateDirectory(pair.Folder, fs, repository, dependencyInjector); }
private Directory CreateDirectory(FolderPair pair) { var dd = fs.GetDirectory(pair.FolderPath); var parent = persister.Get(pair.ParentID); var dir = Directory.New(dd, parent, fs, imageSizes); dir.Title = pair.Path.Substring(pair.ParentPath.Length).Trim('/'); dir.Name = dir.Title; return dir; }
public FolderNodeProvider(IFileSystem fs, IPersister persister, ImageSizeCache imageSizes) { UploadFolderPaths = new FolderPair[0]; this.fs = fs; this.persister = persister; this.imageSizes = imageSizes; }
private FolderPair[] GetUploadFolderPaths() { var paths = new List<FolderPair>(); // configured folders to the root node foreach (var folder in folderSource.GetUploadFoldersForAllSites()) { var parent = persister.Get(folder.GetParentID()); if (parent == null) break; var pair = new FolderPair(parent.ID, parent.Path, parent.Path + folder.GetName() + "/", folder); paths.Add(pair); } return paths.ToArray(); }
private Directory CreateDirectory(FolderPair pair) { return(CreateDirectory(pair.Folder, fs, persister, dependencyInjector)); }
public FolderNodeProvider(IFileSystem fs, IPersister persister) { UploadFolderPaths = new FolderPair[0]; this.fs = fs; this.persister = persister; }
private Directory CreateDirectory(FolderPair pair) { return CreateDirectory(pair.Folder, fs, persister, dependencyInjector); }
private Directory CreateDirectory(FolderPair pair) { var dd = fs.GetDirectoryOrVirtual(pair.FolderPath); var parent = persister.Get(pair.ParentID); var dir = Directory.New(dd, parent, dependencyInjector); dir.Title = pair.Path.Substring(pair.ParentPath.Length).Trim('/'); dir.Name = dir.Title; return dir; }