Пример #1
0
        public DeleteAction(string path, IFileSystem fileSystem, IRecycleBin recycleBin,
                            Action <string> notifyAct = null, Action <string> notifyRevert = null)
        {
            if (path == null)
            {
                throw new ArgumentNullException(nameof(path));
            }
            if (fileSystem == null)
            {
                throw new ArgumentNullException(nameof(fileSystem));
            }
            if (recycleBin == null)
            {
                throw new ArgumentNullException(nameof(recycleBin));
            }
            if (!fileSystem.FileExists(path))
            {
                throw new FileNotFoundException(null, path);
            }

            this.notifyAct    = notifyAct;
            this.notifyRevert = notifyRevert;

            oldPath         = path;
            this.recycleBin = recycleBin;
        }
Пример #2
0
 public DeleteOperationBase(IConsoleOutput output, IFileSystem fs, IRecycleBin recycleBin, ILogger logger)
     : base(output)
 {
     FileSystem  = fs;
     _recycleBin = recycleBin;
     _logger     = logger;
 }
Пример #3
0
 public RecycleBinController(
     IRecycleBin recycleBin,
     IBlobStore blobStore
     )
 {
     _recycleBin = recycleBin;
     _blobStore  = blobStore;
 }
 public RecycleBinController(
         IRecycleBin recycleBin,
         IBlobStore blobStore
     )
 {
     _recycleBin = recycleBin;
     _blobStore = blobStore;
 }
Пример #5
0
 public RecycleBinProjection(
     IRecycleBin recycleBin,
     IDocumentWriter documentWriter,
     IReader <DocumentDescriptorReadModel, DocumentDescriptorId> documentsDescriptorReader)
 {
     _recycleBin                = recycleBin;
     _documentWriter            = documentWriter;
     _documentsDescriptorReader = documentsDescriptorReader;
 }
 public RecycleBinController(IAuthorizer authorizer, IContentManager contentManager, INotifier notifier, IOrchardServices services, IRecycleBin recycleBin) {
     _authorizer = authorizer;
     _contentManager = contentManager;
     _notifier = notifier;
     _services = services;
     _recycleBin = recycleBin;
     T = NullLocalizer.Instance;
     Logger = NullLogger.Instance;
 }
 public RecycleBinController(IAuthorizer authorizer, IContentManager contentManager, INotifier notifier, IOrchardServices services, IRecycleBin recycleBin)
 {
     _authorizer     = authorizer;
     _contentManager = contentManager;
     _notifier       = notifier;
     _services       = services;
     _recycleBin     = recycleBin;
     T      = NullLocalizer.Instance;
     Logger = NullLogger.Instance;
 }
 public DeleteOrphanMorphFilesOperation(IConsoleOutput output, IFileSystem fs, IRecycleBin recycleBin, ILogger logger)
     : base(output, fs, recycleBin, logger)
 {
 }
Пример #9
0
 public CleanupJob(IRecycleBin recycleBin, IBlobStore blobStore)
 {
     RecycleBin = recycleBin;
     BlobStore = blobStore;
     Logger = NullLogger.Instance;
 }
 public RecycleCollection(IRecycleBin <T> recycleBin, ICollection <T> underlyingCollection)
 {
     _recycleBin           = recycleBin;
     _underlyingCollection = underlyingCollection;
 }
 public CleanupJob(IRecycleBin recycleBin, IBlobStore blobStore)
 {
     RecycleBin = recycleBin;
     BlobStore  = blobStore;
     Logger     = NullLogger.Instance;
 }