Beispiel #1
0
        public SplittedUploadStream(string destinationPath, Cloud cloud, long size, Action fileStreamSent, Action serverFileProcessed, bool checkHash = true, CryptInfo cryptInfo = null)
        {
            _destinationPath = destinationPath;
            _cloud           = cloud;
            _size            = size;
            _checkHash       = checkHash;
            _cryptInfo       = cryptInfo;

            FileStreamSent      = fileStreamSent;
            ServerFileProcessed = serverFileProcessed;

            _maxFileSize = _cloud.Account.Info.FileSizeLimit > 0
                ? _cloud.Account.Info.FileSizeLimit - 1024
                : long.MaxValue - 1024;

            Initialize();
        }
Beispiel #2
0
        public SplittedUploadStream(string destinationPath, MailRuCloud cloud, long size, bool checkHash = true, CryptInfo cryptInfo = null)
        {
            _destinationPath = destinationPath;
            _cloud           = cloud;
            _size            = size;
            _checkHash       = checkHash;
            _cryptInfo       = cryptInfo;

            _maxFileSize = _cloud.Account.Info.FileSizeLimit > 0
                ? _cloud.Account.Info.FileSizeLimit - 1024
                : long.MaxValue - 1024;

            Initialize();
        }