public TwitchVideoDownload(
            string id,
            DownloadParameters downloadParams,
            DownloadState downloadState,
            string log,
            double progress,
            string status,
            bool isIndeterminate)
        {
            Id              = id;
            DownloadParams  = downloadParams;
            DownloadState   = downloadState;
            Progress        = progress;
            Status          = status;
            IsIndeterminate = isIndeterminate;

            _log = new StringBuilder();

            _downloadStateLockObject   = new object();
            _logLockObject             = new object();
            _progressLockObject        = new object();
            _statusLockObject          = new object();
            _isIndeterminateLockObject = new object();

            AppendLog(log);
        }
        public TwitchVideoDownload(DownloadParameters downloadParams, string id = null)
        {
            Id             = !string.IsNullOrWhiteSpace(id) ? id : Guid.NewGuid().ToString();
            DownloadParams = downloadParams ?? throw new ArgumentNullException(nameof(downloadParams));

            _log = new StringBuilder();

            _downloadStateLockObject   = new object();
            _logLockObject             = new object();
            _progressLockObject        = new object();
            _statusLockObject          = new object();
            _isIndeterminateLockObject = new object();
        }
Esempio n. 3
0
        public TwitchVideoDownload(DownloadParameters downloadParams)
        {
            this.Id             = Guid.NewGuid().ToString();
            this.DownloadParams = downloadParams ?? throw new ArgumentNullException(nameof(downloadParams));

            this._log = new StringBuilder();

            this._downloadStateLockObject   = new Object();
            this._logLockObject             = new Object();
            this._progressLockObject        = new Object();
            this._statusLockObject          = new Object();
            this._isIndeterminateLockObject = new Object();
        }
Esempio n. 4
0
        public TwitchVideoDownload(DownloadParameters downloadParams)
        {
            _id             = Guid.NewGuid().ToString();
            _downloadParams = downloadParams ?? throw new ArgumentNullException(nameof(downloadParams));

            _log = new StringBuilder();

            _downloadStatusLockObject = new object();
            _logLockObject            = new object();
            _progressLockObject       = new object();
            _statusLockObject         = new object();
            _isProcessingLockObject   = new object();
        }
Esempio n. 5
0
        public TwitchVideoDownload(DownloadParameters downloadParams)
        {
            if (downloadParams == null)
            {
                throw new ArgumentNullException(nameof(downloadParams));
            }

            this.downloadParams = downloadParams;

            this.log = new StringBuilder();

            this.logLockObject = new object();
        }
        public TwitchVideoDownload(DownloadParameters downloadParams)
        {
            if (downloadParams == null)
            {
                throw new ArgumentNullException(nameof(downloadParams));
            }

            this.id             = Guid.NewGuid().ToString();
            this.downloadParams = downloadParams;

            this.log = new StringBuilder();

            this.downloadStatusLockObject = new object();
            this.logLockObject            = new object();
            this.progressLockObject       = new object();
            this.statusLockObject         = new object();
            this.isEncodingLockObject     = new object();
        }