├── uhttpsharp
├── .gitignore
├── Controllers
│ ├── IController.cs
│ ├── IRequestParameter.cs
│ ├── IErrorContainer.cs
│ ├── IPipeline.cs
│ ├── ErrorContainer.cs
│ └── IControllerResponse.cs
├── IHttpMethodProvider.cs
├── packages.config
├── Listeners
│ ├── IHttpListener.cs
│ ├── TcpListenerAdapter.cs
│ └── SslListenerDecorator.cs
├── Handlers
│ ├── IResponseProvider.cs
│ ├── Compression
│ │ ├── GZipCompressor.cs
│ │ ├── DeflateCompressor.cs
│ │ ├── ICompressor.cs
│ │ ├── CompressionHandler.cs
│ │ └── CompressedResponse.cs
│ ├── JsonResponseProvider.cs
│ ├── IView.cs
│ ├── IRestController.cs
│ ├── HttpRouter.cs
│ ├── FileHandler.cs
│ ├── RestHandler.cs
│ ├── GZipHandler.cs~RF51dd35.TMP
│ ├── ClassRouter.cs
│ └── ControllerHandler.cs
├── Headers
│ ├── IHttpHeaders.cs
│ ├── EmptyHttpHeaders.cs
│ ├── HttpHeadersDebuggerProxy.cs
│ ├── HttpHeadersExtensions.cs
│ ├── QueryStringHttpHeaders.cs
│ ├── CompositeHttpHeaders.cs
│ └── HttpHeaders.cs
├── Clients
│ ├── IClient.cs
│ ├── TcpClientAdapter.cs
│ └── ClientSslDecoerator.cs
├── TaskFactoryExtensions.cs
├── Attributes
│ ├── NullableAttribute.cs
│ ├── HttpMethodAttribute.cs
│ └── IModelBinding.cs
├── RequestProviders
│ ├── IHttpRequestProvider.cs
│ ├── HttpRequestProviderMethodOverrideDecorator.cs
│ ├── HttpRequestMethodDecorator.cs
│ └── HttpRequestProvider.cs
├── HttpMethodProvider.cs
├── HttpMethodProviderCache.cs
├── HttpServerExtensions.cs
├── HttpRequestHandler.cs
├── ModelBinders
│ ├── IModelBinder.cs
│ ├── JsonModelBinder.cs
│ └── ModelBinder.cs
├── HttpContext.cs
├── Properties
│ └── AssemblyInfo.cs
├── HttpMethods.cs
├── HttpResponseCode.cs
├── IHttpContext.cs
├── HttpServer.cs
├── LimitedStream.cs
├── HttpRequest.cs
├── uhttpsharp.csproj
├── HttpClient.cs
└── HttpResponse.cs
├── uhttpsharp-demo
├── .gitignore
├── packages.config
├── HttpException.cs
├── Handlers
│ ├── TimingHandler.cs
│ ├── ExceptionHandler.cs
│ ├── ErrorHandler.cs
│ ├── AboutHandler.cs
│ └── IndexHandler.cs
├── app.config
├── Properties
│ └── AssemblyInfo.cs
├── SomeRestController.cs
├── StringsRestController.cs
├── Controllers
│ └── DemoController.cs
├── uhttpsharp.Demo.csproj
└── Program.cs
├── renovate.json
├── .nuget
├── NuGet.exe
├── NuGet.Config
└── NuGet.targets
├── AssemblyCommon.cs
├── .gitignore
├── uhttpsharp.Tests
├── packages.config
├── HttpMethodProviderTests.cs
├── Properties
│ └── AssemblyInfo.cs
├── HttpMethodProviderCacheTests.cs
└── uhttpsharp.Tests.csproj
├── .ci
└── RunTests.sh
├── .gitattributes
├── .travis.yml
├── uhttpsharp.dll.nuspec
├── LICENSE
├── uhttpsharp.sln
├── README.md
└── uhttpsharp.6.0.ReSharper
/uhttpsharp/.gitignore:
--------------------------------------------------------------------------------
1 | /bin/
2 | /obj/
3 |
--------------------------------------------------------------------------------
/uhttpsharp-demo/.gitignore:
--------------------------------------------------------------------------------
1 | /bin/
2 | /obj/
3 |
--------------------------------------------------------------------------------
/renovate.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": [
3 | "config:base"
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/.nuget/NuGet.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonesoul/uhttpsharp/HEAD/.nuget/NuGet.exe
--------------------------------------------------------------------------------
/AssemblyCommon.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bonesoul/uhttpsharp/HEAD/AssemblyCommon.cs
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /_ReSharper.uhttpsharp/
2 | /*.6.0.ReSharper.user
3 | /*.suo
4 | /packages/*
5 | */bin/*
6 | */obj/*
7 | *.psess
8 | *.vsp
9 | *.nupkg
--------------------------------------------------------------------------------
/uhttpsharp/Controllers/IController.cs:
--------------------------------------------------------------------------------
1 | namespace uhttpsharp.Controllers
2 | {
3 | public interface IController
4 | {
5 | IPipeline Pipeline { get; }
6 | }
7 | }
--------------------------------------------------------------------------------
/uhttpsharp/IHttpMethodProvider.cs:
--------------------------------------------------------------------------------
1 | namespace uhttpsharp
2 | {
3 | public interface IHttpMethodProvider
4 | {
5 | HttpMethods Provide(string name);
6 | }
7 | }
--------------------------------------------------------------------------------
/.nuget/NuGet.Config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/uhttpsharp/Controllers/IRequestParameter.cs:
--------------------------------------------------------------------------------
1 | namespace uhttpsharp.Controllers
2 | {
3 | public interface IValidate
4 | {
5 |
6 | void Validate(IErrorContainer container);
7 |
8 | }
9 | }
--------------------------------------------------------------------------------
/uhttpsharp.Tests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/uhttpsharp/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/uhttpsharp-demo/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/uhttpsharp/Listeners/IHttpListener.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading.Tasks;
3 | using uhttpsharp.Clients;
4 |
5 | namespace uhttpsharp.Listeners
6 | {
7 | public interface IHttpListener : IDisposable
8 | {
9 |
10 | Task GetClient();
11 |
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/uhttpsharp/Handlers/IResponseProvider.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 |
3 | namespace uhttpsharp.Handlers
4 | {
5 | public interface IResponseProvider
6 | {
7 |
8 | Task Provide(object value, HttpResponseCode responseCode = HttpResponseCode.Ok);
9 |
10 | }
11 | }
--------------------------------------------------------------------------------
/uhttpsharp/Headers/IHttpHeaders.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace uhttpsharp.Headers
4 | {
5 | public interface IHttpHeaders : IEnumerable>
6 | {
7 |
8 | string GetByName(string name);
9 |
10 | bool TryGetByName(string name, out string value);
11 |
12 | }
13 | }
--------------------------------------------------------------------------------
/uhttpsharp/Clients/IClient.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using System.Net;
3 |
4 | namespace uhttpsharp.Clients
5 | {
6 | public interface IClient
7 | {
8 |
9 | Stream Stream { get; }
10 |
11 | bool Connected { get; }
12 |
13 | void Close();
14 |
15 | EndPoint RemoteEndPoint { get; }
16 |
17 |
18 |
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/uhttpsharp/TaskFactoryExtensions.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 |
3 | namespace uhttpsharp
4 | {
5 | public static class TaskFactoryExtensions
6 | {
7 | private static readonly Task CompletedTask = Task.FromResult