예제 #1
0
        /// <summary> Creation of task object </summary>
        /// <returns> Created object </returns>
        public GZipTask Create(FilePaths pathParams, TaskSynchronizationParams syncParams,
                               FileChunk chunk, IOperation operation)
        {
            Guard.NotNull(pathParams, $"{nameof(pathParams)}");
            Guard.NotNull(syncParams, $"{nameof(syncParams)}");
            Guard.NotNull(chunk, $"{nameof(chunk)}");
            Guard.NotNull(operation, $"{nameof(operation)}");

            return(new GZipTask(pathParams, syncParams, chunk, operation));
        }
예제 #2
0
파일: GZipTask.cs 프로젝트: a5hub/GZip
        /// <summary> Compression task logic implementation </summary>
        /// <param name="filePaths"> Input and output file paths </param>
        /// <param name="taskSynchronizationParams"> Parameters needed to organize thread task synchronization </param>
        /// <param name="fileChunk"> Contains parameters needed during compression logic </param>
        /// <param name="operation"> Process operation type </param>
        public GZipTask(FilePaths filePaths,
                        TaskSynchronizationParams taskSynchronizationParams,
                        FileChunk fileChunk,
                        IOperation operation)
        {
            Guard.NotNull(filePaths, $"{nameof(filePaths)}");
            Guard.NotNull(taskSynchronizationParams, $"{nameof(taskSynchronizationParams)}");
            Guard.NotNull(fileChunk, $"{nameof(fileChunk)}");
            Guard.NotNull(operation, $"{nameof(operation)}");

            FilePathParams            = filePaths;
            TaskSynchronizationParams = taskSynchronizationParams;
            FileChunk = fileChunk;
            Operation = operation;
        }