Example #1
0
        /// <summary>
        /// Creates a new diffresult result as en error.
        /// </summary>
        public DiffResultResult(string message, DiffResultStatus status)
        {
            if (status == DiffResultStatus.BestEffortOK || status == DiffResultStatus.OK)
            {
                throw new ArgumentOutOfRangeException("Cannot create an error-result with an ok status.");
            }

            this.Message = message;
            this.Result  = null;
            this.Status  = status;
        }
Example #2
0
        /// <summary>
        /// Creates a new diffresult result.
        /// </summary>
        public DiffResultResult(DiffResult result,
                                DiffResultStatus status)
        {
            if (result == null)
            {
                throw new ArgumentNullException("result");
            }
            if (status != DiffResultStatus.BestEffortOK && status != DiffResultStatus.OK)
            {
                throw new ArgumentOutOfRangeException("Cannot create an ok-result with a non-ok status.");
            }

            this.Status = status;
            this.Result = result;
        }