Headless.HttpResult.HttpResult C# (CSharp) Method

HttpResult() public method

Initializes a new instance of the HttpResult class.
/// The parameter is null. ///
public HttpResult ( IEnumerable outcomes ) : System
outcomes IEnumerable /// The http request outcomes. ///
return System
        public HttpResult(IEnumerable<HttpOutcome> outcomes)
        {
            if (outcomes == null)
            {
                throw new ArgumentNullException("outcomes");
            }

            var httpOutcomes = outcomes.ToList();

            if (httpOutcomes.Count == 0)
            {
                throw new ArgumentException(Resources.HttpResult_NoHttpOutcomeProvided);
            }

            _outcomes = new ReadOnlyCollection<HttpOutcome>(httpOutcomes);
        }
HttpResult