// /// <summary> /// Inits the upload and download transfer services. /// </summary> protected void InitTransferServices() { // ReSharper disable UseObjectOrCollectionInitializer var config = new ZipTransferConfig // ReSharper restore UseObjectOrCollectionInitializer { Provider = this, FileSystemConfiguration = Configuration, FileResolverFunc = ResolveFileResourcePathInternal2, ClaimsResolverFunc = fi => Security.GetFileClaims(fi), FolderClaimsResolverFunc = fi => Security.GetFolderClaims(fi), LockResolverFunc = (fi, lockType) => RequestChainedLockGuard(fi, lockType), Repository = NodeRepository }; config.FileParentResolverFunc = (fi, context) => { //delegate resolving of the parent path string parentFolderPath = fi.ResourceInfo.ParentFolderPath; //get the parent info return ResolveFolderResourcePathInternal2(parentFolderPath, true, context); }; //init stores DownloadHandler = new ZipDownloadHandler(config, Configuration.DownloadStore); UploadHandler = new ZipUploadHandler(config, Configuration.UploadStore); }
// /// <summary> /// Inits the upload and download transfer services. /// </summary> protected void InitTransferServices() { // ReSharper disable UseObjectOrCollectionInitializer var config = new ZipTransferConfig // ReSharper restore UseObjectOrCollectionInitializer { Provider = this, FileSystemConfiguration = Configuration, FileResolverFunc = ResolveFileResourcePathInternal2, ClaimsResolverFunc = fi => Security.GetFileClaims(fi), FolderClaimsResolverFunc = fi => Security.GetFolderClaims(fi), LockResolverFunc = (fi, lockType) => RequestChainedLockGuard(fi, lockType), Repository = NodeRepository }; config.FileParentResolverFunc = (fi, context) => { //delegate resolving of the parent path string parentFolderPath = fi.ResourceInfo.ParentFolderPath; //get the parent info return(ResolveFolderResourcePathInternal2(parentFolderPath, true, context)); }; //init stores DownloadHandler = new ZipDownloadHandler(config, Configuration.DownloadStore); UploadHandler = new ZipUploadHandler(config, Configuration.UploadStore); }