示例#1
0
        /// <summary> Compress or decompress file </summary>
        /// <param name="pathParams"> Paths for input and output files </param>
        /// <param name="operationType"> Process operation type </param>
        public void ProcessFile(FilePaths pathParams, OperationType operationType)
        {
            Guard.NotNull(pathParams, $"{nameof(FilePaths)}");
            Guard.DefinedEnumValue(operationType);
            Guard.True(operationType != OperationType.Default,
                       Resources.UnexpectedOperationException);

            var operation = _operationFactory.Create(operationType);

            _taskManager.CreateTasks(pathParams, operation);
            _threadManager.ExecuteInParallel(_taskManager, UnexpectedTerminationProc);
        }