Amss.Boilerplate.Api.Configuration.ApiContainerExtension.HttpErrorExceptionHandler.HttpErrorExceptionHandler C# (CSharp) Method

HttpErrorExceptionHandler() public method

public HttpErrorExceptionHandler ( NameValueCollection collection ) : System
collection System.Collections.Specialized.NameValueCollection
return System
            public HttpErrorExceptionHandler(NameValueCollection collection)
            {
                Contract.Assert(collection != null);
                if (collection.AllKeys.Contains(StatusCodeKey))
                {
                    this.statusCode = (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), collection[StatusCodeKey]);
                }

                if (collection.AllKeys.Contains(MessageKey))
                {
                    this.message = collection[MessageKey];
                }

                if (collection.AllKeys.Contains(ErrorCodeKey))
                {
                    this.errorCode = collection[ErrorCodeKey];
                }

                if (collection.AllKeys.Contains(AppendHandlingIdKey))
                {
                    this.appendHandlingId = bool.Parse(collection[AppendHandlingIdKey]);
                }
            }
ApiContainerExtension.HttpErrorExceptionHandler