Upgraded project to DotNet 6, increased package version to 1.1.0

This commit is contained in:
2022-07-21 09:56:23 -07:00
parent 37356667d9
commit 3e190641a0
6 changed files with 24 additions and 117 deletions

View File

@@ -1,7 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>library</OutputType>
<TargetFramework>net472</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>disable</Nullable>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Authors>MontoyaTech</Authors>
<Company>MontoyaTech</Company>
@@ -14,22 +17,12 @@
<AssemblyName>MontoyaTech.Rest.Net</AssemblyName>
<RootNamespace>MontoyaTech.Rest.Net</RootNamespace>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<Version>1.0.9</Version>
<Version>1.1.0</Version>
<PackageReleaseNotes>Optimized and fixed bugs within the route matcher. Changed argument matching to support segments after the argument for more complex routes.</PackageReleaseNotes>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json">
<Version>13.0.1</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>
</Project>

View File

@@ -101,9 +101,10 @@ namespace MontoyaTech.Rest.Net
{
ThreadPool.QueueUserWorkItem((o) =>
{
try
while (this.HttpListener.IsListening)
{
while (this.HttpListener.IsListening)
//Try catch around the thread pool, don't allow it to die.
try
{
ThreadPool.QueueUserWorkItem((item) =>
{
@@ -137,7 +138,7 @@ namespace MontoyaTech.Rest.Net
{
this.Routes[i].Invoke(context, arguments);
}
catch
catch
{
ctx.Response.WithStatus(HttpStatusCode.InternalServerError);
}
@@ -167,8 +168,8 @@ namespace MontoyaTech.Rest.Net
}
}, this.HttpListener.GetContext());
}
catch { }
}
catch { }
});
}