예제 #1
0
        protected virtual IEnumerable <FolderReference> GetUploadFolderPaths()
        {
            var paths = new List <FolderReference>();

            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 FolderReference(parent.ID, parent.Path, parent.Path + folder.GetName() + "/", folder);
                paths.Add(pair);
            }

            return(paths);
        }
		private Directory CreateDirectory(FolderReference pair)
		{
			return CreateDirectory(pair.Folder, fs, repository, dependencyInjector);
		}
		protected virtual IEnumerable<FolderReference> GetUploadFolderPaths()
		{
			var paths = new List<FolderReference>();

			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 FolderReference(parent.ID, parent.Path, parent.Path + folder.GetName() + "/", folder);
				paths.Add(pair);
			}

			return paths;
		}
예제 #4
0
 private Directory CreateDirectory(FolderReference pair)
 {
     return(CreateDirectory(pair.Folder, fs, repository, dependencyInjector));
 }