コード例 #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;
 }
コード例 #4
0
 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;
 }
コード例 #6
0
 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;
 }
コード例 #7
0
 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;
 }
コード例 #8
0
 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;
 }
コード例 #10
0
 public RecycleCollection(IRecycleBin <T> recycleBin, ICollection <T> underlyingCollection)
 {
     _recycleBin           = recycleBin;
     _underlyingCollection = underlyingCollection;
 }
コード例 #11
0
 public CleanupJob(IRecycleBin recycleBin, IBlobStore blobStore)
 {
     RecycleBin = recycleBin;
     BlobStore  = blobStore;
     Logger     = NullLogger.Instance;
 }