Esempio n. 1
0
        public DatabaseFileSystemStream(FileSystemItem file, DatabaseFileSystem fileSys, ISession session, int chunkSize)
        {
            if (file == null) throw new Exception("attachedTo must not be null");
            if (fileSys == null) throw new Exception("fileSys most not be null");

            this.file = file;
            this.fs = fileSys;
            this.session = session;
            this.chunkSize = chunkSize;

            Position = 0;
        }
        public DatabaseFileSystemStream(FileSystemItem file, DatabaseFileSystem fileSys, ISession session, int chunkSize)
        {
            if (file == null)
            {
                throw new Exception("attachedTo must not be null");
            }
            if (fileSys == null)
            {
                throw new Exception("fileSys most not be null");
            }

            this.file      = file;
            this.fs        = fileSys;
            this.session   = session;
            this.chunkSize = chunkSize;

            Position = 0;
        }
Esempio n. 3
0
            public DatabaseFileSystemStream(FileSystemItem attachedTo, DatabaseFileSystem fileSys, byte [] data)
            {
                if(attachedTo==null) throw new Exception("attachedTo must not be null");
                if(fileSys == null) throw new Exception("fileSys most not be null");

                this.attachedTo = attachedTo;
                this.fileSys = fileSys;

                base.Write(data, 0, data.Length);
                Position = 0;
            }