Beispiel #1
0
        public DeleteFileOperation(InMemoryFilesSessionOperations sessionOperations, string path, Etag etag)
        {
            if (string.IsNullOrWhiteSpace(path))
                throw new ArgumentNullException("path", "The path cannot be null, empty or whitespace.");

            this.sessionOperations = sessionOperations;
            this.Filename = path;
            this.Etag = etag;
        }
Beispiel #2
0
        public DeleteFileOperation(InMemoryFilesSessionOperations sessionOperations, string path, Etag etag)
        {
            if (string.IsNullOrWhiteSpace(path))
            {
                throw new ArgumentNullException("path", "The path cannot be null, empty or whitespace.");
            }

            this.sessionOperations = sessionOperations;
            this.FileName          = path;
            this.Etag = etag;
        }
        private UploadFileOperation(InMemoryFilesSessionOperations sessionOperations, string path, RavenJObject metadata = null, Etag etag = null)
        {
            if (string.IsNullOrWhiteSpace(path))
                throw new ArgumentNullException("path", "The path cannot be null, empty or whitespace!");

            this.sessionOperations = sessionOperations;

            FileName = path;
            Metadata = metadata;
            Etag = etag;
        }
        public UpdateMetadataOperation(InMemoryFilesSessionOperations sessionOperations, FileHeader fileHeader, RavenJObject metadata)
        {
            if (fileHeader != null && string.IsNullOrWhiteSpace(fileHeader.FullPath))
                throw new ArgumentNullException("fileHeader", "The file cannot be null or have an empty or whitespace name.");

            this.sessionOperations = sessionOperations;

            this.FileHeader = fileHeader;
            this.Filename = fileHeader.FullPath;
            this.Metadata = metadata;
        }
Beispiel #5
0
        public RenameFileOperation(InMemoryFilesSessionOperations sessionOperations, string sourcePath, string destinationPath)
        {
            if (string.IsNullOrWhiteSpace(sourcePath))
                throw new ArgumentNullException("sourcePath", "The source path cannot be null, empty or whitespace.");

            if (string.IsNullOrWhiteSpace(destinationPath))
                throw new ArgumentNullException("destinationPath", "The destination path cannot be null, empty or whitespace.");

            this.sessionOperations = sessionOperations;
            this.Filename = sourcePath;
            this.Destination = destinationPath;
        }
        public UpdateMetadataOperation(InMemoryFilesSessionOperations sessionOperations, FileHeader fileHeader, RavenJObject metadata, Etag etag)
        {
            if (fileHeader == null || string.IsNullOrWhiteSpace(fileHeader.FullPath))
                throw new ArgumentNullException("fileHeader", "The file cannot be null or have an empty or whitespace name!");

            this.sessionOperations = sessionOperations;

            FileHeader = fileHeader;
            FileName = fileHeader.FullPath;
            Metadata = metadata;
            Etag = etag;
        }
Beispiel #7
0
        public UpdateMetadataOperation(InMemoryFilesSessionOperations sessionOperations, FileHeader fileHeader, RavenJObject metadata)
        {
            if (fileHeader != null && string.IsNullOrWhiteSpace(fileHeader.FullPath))
            {
                throw new ArgumentNullException("fileHeader", "The file cannot be null or have an empty or whitespace name.");
            }

            this.sessionOperations = sessionOperations;

            this.FileHeader = fileHeader;
            this.Filename   = fileHeader.FullPath;
            this.Metadata   = metadata;
        }
        private UploadFileOperation(InMemoryFilesSessionOperations sessionOperations, string path, RavenJObject metadata = null, long?etag = null)
        {
            if (string.IsNullOrWhiteSpace(path))
            {
                throw new ArgumentNullException("path", "The path cannot be null, empty or whitespace!");
            }

            this.sessionOperations = sessionOperations;

            FileName = path;
            Metadata = metadata;
            Etag     = etag;
        }
Beispiel #9
0
        public UploadFileOperation(InMemoryFilesSessionOperations sessionOperations, string path, long size, Action<Stream> stream, RavenJObject metadata = null, Etag etag = null)
        {
            if (string.IsNullOrWhiteSpace(path))
                throw new ArgumentNullException("path", "The path cannot be null, empty or whitespace.");

            this.sessionOperations = sessionOperations;

            this.Filename = path;
            this.Metadata = metadata;
            this.Etag = etag;

            this.StreamWriter = stream;
            this.Size = size;
        }
Beispiel #10
0
        public UpdateMetadataOperation(InMemoryFilesSessionOperations sessionOperations, FileHeader fileHeader, RavenJObject metadata, Etag etag)
        {
            if (fileHeader == null || string.IsNullOrWhiteSpace(fileHeader.FullPath))
            {
                throw new ArgumentNullException("fileHeader", "The file cannot be null or have an empty or whitespace name!");
            }

            this.sessionOperations = sessionOperations;

            FileHeader = fileHeader;
            FileName   = fileHeader.FullPath;
            Metadata   = metadata;
            Etag       = etag;
        }
Beispiel #11
0
        public UploadFileOperation(InMemoryFilesSessionOperations sessionOperations, string path, long size, Action <Stream> stream, RavenJObject metadata = null, Etag etag = null)
        {
            if (string.IsNullOrWhiteSpace(path))
            {
                throw new ArgumentNullException("path", "The path cannot be null, empty or whitespace.");
            }

            this.sessionOperations = sessionOperations;

            this.Filename = path;
            this.Metadata = metadata;
            this.Etag     = etag;

            this.StreamWriter = stream;
            this.Size         = size;
        }
Beispiel #12
0
        public RenameFileOperation(InMemoryFilesSessionOperations sessionOperations, string sourcePath, string destinationPath)
        {
            if (string.IsNullOrWhiteSpace(sourcePath))
            {
                throw new ArgumentNullException("sourcePath", "The source path cannot be null, empty or whitespace.");
            }

            if (string.IsNullOrWhiteSpace(destinationPath))
            {
                throw new ArgumentNullException("destinationPath", "The destination path cannot be null, empty or whitespace.");
            }

            this.sessionOperations = sessionOperations;
            this.Filename          = sourcePath;
            this.Destination       = destinationPath;
        }
 public UploadFileOperation(InMemoryFilesSessionOperations sessionOperations, string path, long size, Action <Stream> stream, RavenJObject metadata = null, long?etag = null)
     : this(sessionOperations, path, metadata, etag)
 {
     StreamWriter = stream;
     Size         = size;
 }
 public UploadFileOperation(InMemoryFilesSessionOperations sessionOperations, string path, Stream stream, RavenJObject metadata = null, long?etag = null)
     : this(sessionOperations, path, metadata, etag)
 {
     Stream = stream;
 }
Beispiel #15
0
 public UploadFileOperation(InMemoryFilesSessionOperations sessionOperations, string path, long size, Action<Stream> stream, RavenJObject metadata = null, Etag etag = null)
     : this(sessionOperations, path, metadata, etag)
 {
     StreamWriter = stream;
     Size = size;
 }
Beispiel #16
0
 public UploadFileOperation(InMemoryFilesSessionOperations sessionOperations, string path, Stream stream, RavenJObject metadata = null, Etag etag = null)
     : this(sessionOperations, path, metadata, etag)
 {
     Stream = stream;
 }