Pārlūkot izejas kodu

remove base middleware

master
Savorboard pirms 7 gadiem
vecāks
revīzija
2b7ed6b967
1 mainītis faili ar 0 papildinājumiem un 39 dzēšanām
  1. +0
    -39
      src/DotNetCore.CAP/Dashboard/GatewayProxy/GatewayProxyMiddlewareBase.cs

+ 0
- 39
src/DotNetCore.CAP/Dashboard/GatewayProxy/GatewayProxyMiddlewareBase.cs Parādīt failu

@@ -1,39 +0,0 @@
using System.Net.Http;

namespace DotNetCore.CAP.Dashboard.GatewayProxy
{
public abstract class GatewayProxyMiddlewareBase
{
protected IRequestScopedDataRepository _requestScopedDataRepository;

protected GatewayProxyMiddlewareBase()
{
MiddlewareName = this.GetType().Name;
}

public string MiddlewareName { get; }

//public DownstreamRoute DownstreamRoute => _requestScopedDataRepository.Get<DownstreamRoute>("DownstreamRoute");

public HttpRequestMessage Request => _requestScopedDataRepository.Get<HttpRequestMessage>("Request");

public HttpRequestMessage DownstreamRequest => _requestScopedDataRepository.Get<HttpRequestMessage>("DownstreamRequest");

public HttpResponseMessage HttpResponseMessage => _requestScopedDataRepository.Get<HttpResponseMessage>("HttpResponseMessage");

public void SetUpstreamRequestForThisRequest(HttpRequestMessage request)
{
_requestScopedDataRepository.Add("Request", request);
}

public void SetDownstreamRequest(HttpRequestMessage request)
{
_requestScopedDataRepository.Add("DownstreamRequest", request);
}

public void SetHttpResponseMessageThisRequest(HttpResponseMessage responseMessage)
{
_requestScopedDataRepository.Add("HttpResponseMessage", responseMessage);
}
}
}

Notiek ielāde…
Atcelt
Saglabāt