Exemplo n.º 1
0
 public static void EnsureResponseInfo(this WebCallContext context)
 {
     if (context.Response == null)
     {
         context.Response = new ResponseInfo();
     }
 }
Exemplo n.º 2
0
 public static void SetResponse(this WebCallContext context, object body = null, string contentType = "text/plain",
                                HttpStatusCode?status = null)
 {
     context.EnsureResponseInfo();
     if (body != null)
     {
         context.Response.Body            = body;
         context.Response.BodyContentType = contentType;
     }
     if (status != null)
     {
         context.Response.HttpStatus = status.Value;
     }
 }
Exemplo n.º 3
0
 public static void MarkConfidential(this WebCallContext context)
 {
     context.Flags |= WebCallFlags.Confidential;
 }
Exemplo n.º 4
0
 public static void SetResponseHeader(this WebCallContext context, string name, string value)
 {
     context.EnsureResponseInfo();
     context.Response.Headers[name] = value;
 }