2022-02-06 21:14:36 -08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Net;
|
|
|
|
|
|
|
|
|
|
namespace MontoyaTech.Rest.Net
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2023-01-26 10:08:56 -08:00
|
|
|
|
/// An outline of a Listener Context which includes
|
|
|
|
|
/// the given request and a resposne.
|
2022-02-06 21:14:36 -08:00
|
|
|
|
/// </summary>
|
2023-01-26 11:48:56 -08:00
|
|
|
|
public class RouteListenerContext
|
2022-02-06 21:14:36 -08:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The Http Request that requested this route.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public HttpListenerRequest Request = null;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The Http Response for this route.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public HttpListenerResponse Response = null;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2023-01-26 10:08:56 -08:00
|
|
|
|
/// Creates a new ListenerContext with a given request and response.
|
2022-02-06 21:14:36 -08:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="request"></param>
|
|
|
|
|
/// <param name="response"></param>
|
2023-01-26 11:48:56 -08:00
|
|
|
|
public RouteListenerContext(HttpListenerRequest request, HttpListenerResponse response)
|
2022-02-06 21:14:36 -08:00
|
|
|
|
{
|
|
|
|
|
this.Request = request;
|
|
|
|
|
this.Response = response;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|