Skip to content

Instantly share code, notes, and snippets.

@anand374
Created April 12, 2021 19:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anand374/b0e55138a5321abf24a5457546dd385e to your computer and use it in GitHub Desktop.
Save anand374/b0e55138a5321abf24a5457546dd385e to your computer and use it in GitHub Desktop.
WCF Error Response Entity
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
namespace TokenValidator
{
internal class WcfErrorResponseData
{
public WcfErrorResponseData(HttpStatusCode status) : this(status, string.Empty, new KeyValuePair<string, string>[0]) { }
public WcfErrorResponseData(HttpStatusCode status, string body) : this(status, body, new KeyValuePair<string, string>[0]) { }
public WcfErrorResponseData(HttpStatusCode status, string body, params KeyValuePair<string, string>[] headers)
{
StatusCode = status;
Body = body;
Headers = headers;
}
public HttpStatusCode StatusCode
{
private set;
get;
}
public string Body
{
private set;
get;
}
public IList<KeyValuePair<string, string>> Headers
{
private set;
get;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment