Skip to content

Commit

Permalink
NuGet v6.0.1, change references, dep updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jchristn committed Nov 2, 2023
1 parent 44a272e commit 39d430c
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 2,122 deletions.
32 changes: 16 additions & 16 deletions src/Test.HostBuilder/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,39 +41,39 @@ public static void Main(string[] args)
.MapContentRoute("/preauth/content", false, false)
.MapStaticRoute(HttpMethod.GET, "/preauth/static", async (HttpContextBase ctx) =>
{
Console.WriteLine("Responding from pre-authentication static route /preauth/static");
Console.WriteLine("| Responding from pre-authentication static route /preauth/static");
await ctx.Response.Send();
return;
}, false)
.MapParameteRoute(HttpMethod.GET, "/preauth/parameter/{id}", async (HttpContextBase ctx) =>
{
Console.WriteLine("Responding from pre-authentication parameter route /preauth/parameter/" + ctx.Request.Url.Parameters["id"]);
Console.WriteLine("| Responding from pre-authentication parameter route /preauth/parameter/" + ctx.Request.Url.Parameters["id"]);
await ctx.Response.Send();
return;
}, false)
.MapDynamicRoute(HttpMethod.GET, new Regex("^/preauth/dynamic/\\d+$"), async (HttpContextBase ctx) =>
{
Console.WriteLine("Responding from pre-authentication dynamic route /preauth/dynamic");
Console.WriteLine("| Responding from pre-authentication dynamic route /preauth/dynamic");
await ctx.Response.Send();
return;
}, false)
.MapAuthenticationRoute(AuthenticationRoute)
.MapContentRoute("/postauth/content", false, true)
.MapStaticRoute(HttpMethod.GET, "/postauth/static", async (HttpContextBase ctx) =>
{
Console.WriteLine("Responding from post-authentication static route /postauth/static");
Console.WriteLine("| Responding from post-authentication static route /postauth/static");
await ctx.Response.Send();
return;
}, false)
.MapParameteRoute(HttpMethod.GET, "/postauth/parameter/{id}", async (HttpContextBase ctx) =>
{
Console.WriteLine("Responding from post-authentication parameter route /postauth/parameter/" + ctx.Request.Url.Parameters["id"]);
Console.WriteLine("| Responding from post-authentication parameter route /postauth/parameter/" + ctx.Request.Url.Parameters["id"]);
await ctx.Response.Send();
return;
}, false)
.MapDynamicRoute(HttpMethod.GET, new Regex("^/postauth/dynamic/\\d+$"), async (HttpContextBase ctx) =>
{
Console.WriteLine("Responding from post-authentication dynamic route /postauth/dynamic");
Console.WriteLine("| Responding from post-authentication dynamic route /postauth/dynamic");
await ctx.Response.Send();
return;
}, false)
Expand All @@ -88,39 +88,39 @@ public static void Main(string[] args)
.MapContentRoute("/preauth/content", false, false)
.MapStaticRoute(HttpMethod.GET, "/preauth/static", async (HttpContextBase ctx) =>
{
Console.WriteLine("Responding from pre-authentication static route /preauth/static");
Console.WriteLine("| Responding from pre-authentication static route /preauth/static");
await ctx.Response.Send();
return;
}, false)
.MapParameteRoute(HttpMethod.GET, "/preauth/parameter/{id}", async (HttpContextBase ctx) =>
{
Console.WriteLine("Responding from pre-authentication parameter route /preauth/parameter/" + ctx.Request.Url.Parameters["id"]);
Console.WriteLine("| Responding from pre-authentication parameter route /preauth/parameter/" + ctx.Request.Url.Parameters["id"]);
await ctx.Response.Send();
return;
}, false)
.MapDynamicRoute(HttpMethod.GET, new Regex("^/preauth/dynamic/\\d+$"), async (HttpContextBase ctx) =>
{
Console.WriteLine("Responding from pre-authentication dynamic route /preauth/dynamic");
Console.WriteLine("| Responding from pre-authentication dynamic route /preauth/dynamic");
await ctx.Response.Send();
return;
}, false)
.MapAuthenticationRoute(AuthenticationRoute)
.MapContentRoute("/postauth/content", false, true)
.MapStaticRoute(HttpMethod.GET, "/postauth/static", async (HttpContextBase ctx) =>
{
Console.WriteLine("Responding from post-authentication static route /postauth/static");
Console.WriteLine("| Responding from post-authentication static route /postauth/static");
await ctx.Response.Send();
return;
}, false)
.MapParameteRoute(HttpMethod.GET, "/postauth/parameter/{id}", async (HttpContextBase ctx) =>
{
Console.WriteLine("Responding from post-authentication parameter route /postauth/parameter/" + ctx.Request.Url.Parameters["id"]);
Console.WriteLine("| Responding from post-authentication parameter route /postauth/parameter/" + ctx.Request.Url.Parameters["id"]);
await ctx.Response.Send();
return;
}, false)
.MapDynamicRoute(HttpMethod.GET, new Regex("^/postauth/dynamic/\\d+$"), async (HttpContextBase ctx) =>
{
Console.WriteLine("Responding from post-authentication dynamic route /postauth/dynamic");
Console.WriteLine("| Responding from post-authentication dynamic route /postauth/dynamic");
await ctx.Response.Send();
return;
}, false)
Expand Down Expand Up @@ -159,14 +159,15 @@ public static void Main(string[] args)
using (RestResponse resp = req.Send())
{
Console.WriteLine("Received response: " + resp.StatusCode);
Task.Delay(1000).Wait();
}
}
}
}

private static async Task AuthenticationRoute(HttpContextBase @base)
{
Console.WriteLine("In authentication");
Console.WriteLine("| In authentication");
}

static void ExceptionEncountered(object sender, ExceptionEventArgs args)
Expand All @@ -193,17 +194,16 @@ static async Task DefaultRoute(HttpContextBase ctx)
{
try
{
Console.WriteLine("Responding from the default route");
Console.WriteLine("| Responding from the default route");
ctx.Response.Headers.Add("Connection", "close");
ctx.Response.StatusCode = 200;
ctx.Response.ContentType = "text/plain";
await ctx.Response.Send("Default route");
_Server.Events.Logger(_Server.Serializer.SerializeJson(ctx, true));
return;
}
catch (Exception e)
{
Console.WriteLine(_Server.Serializer.SerializeJson(e, true));
Console.WriteLine(e.ToString());
ctx.Response.StatusCode = 500;
await ctx.Response.Send();
return;
Expand Down
35 changes: 23 additions & 12 deletions src/WatsonWebserver.Core/WatsonWebserver.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.1;net462;net48;net6.0;net7.0</TargetFrameworks>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\WatsonWebserver.snk</AssemblyOriginatorKeyFile>
<PackageId>Watson.Core</PackageId>
<PackageId>Watson.WebserverCore</PackageId>
<Title>Watson Webserver Core</Title>
<Company>Joel Christner</Company>
<Product>Watson.Core</Product>
Expand All @@ -21,48 +21,55 @@
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
<IncludeSymbols>True</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netstandard2.1|AnyCPU'">
<DocumentationFile>WatsonWebserver.Core.xml</DocumentationFile>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|netstandard2.1|AnyCPU'">
<DocumentationFile>WatsonWebserver.xml</DocumentationFile>
<DocumentationFile>WatsonWebserver.Core.xml</DocumentationFile>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net462|AnyCPU'">
<DocumentationFile>WatsonWebserver.xml</DocumentationFile>
<DocumentationFile>WatsonWebserver.Core.xml</DocumentationFile>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net462|AnyCPU'">
<DocumentationFile>WatsonWebserver.xml</DocumentationFile>
<DocumentationFile>WatsonWebserver.Core.xml</DocumentationFile>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net48|AnyCPU'">
<DocumentationFile>WatsonWebserver.xml</DocumentationFile>
<DocumentationFile>WatsonWebserver.Core.xml</DocumentationFile>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net48|AnyCPU'">
<DocumentationFile>WatsonWebserver.xml</DocumentationFile>
<DocumentationFile>WatsonWebserver.Core.xml</DocumentationFile>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net6.0|AnyCPU'">
<DocumentationFile>WatsonWebserver.xml</DocumentationFile>
<DocumentationFile>WatsonWebserver.Core.xml</DocumentationFile>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net6.0|AnyCPU'">
<DocumentationFile>WatsonWebserver.xml</DocumentationFile>
<DocumentationFile>WatsonWebserver.Core.xml</DocumentationFile>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net7.0|AnyCPU'">
<DocumentationFile>WatsonWebserver.xml</DocumentationFile>
<DocumentationFile>WatsonWebserver.Core.xml</DocumentationFile>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net7.0|AnyCPU'">
<DocumentationFile>WatsonWebserver.xml</DocumentationFile>
<DocumentationFile>WatsonWebserver.Core.xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
<Content Include="Assets\watson.ico">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>

<ItemGroup>
<None Include="..\..\LICENSE.md">
<Pack>True</Pack>
Expand All @@ -83,9 +90,13 @@
</ItemGroup>

<ItemGroup>
<None Update="Assets\watson.png">
<None Include="Assets\watson.png">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="WatsonWebserver.Core.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

Expand Down
Loading

0 comments on commit 39d430c

Please sign in to comment.