Skip to content

Commit

Permalink
updated sample 3 to use nuget packages instead of project references
Browse files Browse the repository at this point in the history
  • Loading branch information
mizrael committed Aug 30, 2022
1 parent 6f96336 commit ae1ba4c
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.1" NoWarn="NU1605" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="6.0.1" NoWarn="NU1605" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
</ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.8" NoWarn="NU1605" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="6.0.8" NoWarn="NU1605" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />

<ItemGroup>
<ProjectReference Include="..\..\..\src\OpenSleigh.Core\OpenSleigh.Core.csproj" />
<ProjectReference Include="..\..\..\src\OpenSleigh.Persistence.SQLServer\OpenSleigh.Persistence.SQLServer.csproj" />
<ProjectReference Include="..\..\..\src\OpenSleigh.Transport.RabbitMQ\OpenSleigh.Transport.RabbitMQ.csproj" />
<ProjectReference Include="..\OpenSleigh.Samples.Sample3.Common\OpenSleigh.Samples.Sample3.Common.csproj" />
<PackageReference Include="OpenSleigh.Persistence.SQL" Version="2.0.1" />
<PackageReference Include="OpenSleigh.Persistence.SQLServer" Version="2.0.1" />
<PackageReference Include="OpenSleigh.Transport.RabbitMQ" Version="2.0.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\OpenSleigh.Samples.Sample3.Common\OpenSleigh.Samples.Sample3.Common.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\src\OpenSleigh.Core\OpenSleigh.Core.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="OpenSleigh.Core" Version="2.0.2" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.14.0" />

<PackageReference Include="OpenSleigh.Persistence.SQL" Version="2.0.1" />
<PackageReference Include="OpenSleigh.Persistence.SQLServer" Version="2.0.1" />
<PackageReference Include="OpenSleigh.Transport.RabbitMQ" Version="2.0.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\src\OpenSleigh.Core\OpenSleigh.Core.csproj" />
<ProjectReference Include="..\..\..\src\OpenSleigh.Persistence.SQLServer\OpenSleigh.Persistence.SQLServer.csproj" />
<ProjectReference Include="..\..\..\src\OpenSleigh.Transport.RabbitMQ\OpenSleigh.Transport.RabbitMQ.csproj" />
<ProjectReference Include="..\OpenSleigh.Samples.Sample3.Common\OpenSleigh.Samples.Sample3.Common.csproj" />
</ItemGroup>

Expand Down
6 changes: 5 additions & 1 deletion samples/Sample3/OpenSleigh.Samples.Sample3.Worker/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Threading.Tasks;
using System;
using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
Expand All @@ -9,6 +10,7 @@
using OpenSleigh.Samples.Sample3.Common.Messages;
using OpenSleigh.Samples.Sample3.Worker.Sagas;
using OpenSleigh.Transport.RabbitMQ;
using OpenSleigh.Core;

namespace OpenSleigh.Samples.Sample3.Worker
{
Expand Down Expand Up @@ -52,6 +54,8 @@ static IHostBuilder CreateHostBuilder(string[] args) =>
new QueueReferences("child", "child.process", "child.process", "child.dead", "child.dead.process"));
})
.UseSqlServerPersistence(sqlConfig);

Core.SagaState state = new SimpleSagaState(Guid.NewGuid());

cfg.AddSaga<SimpleSaga, SimpleSagaState>()
.UseStateFactory<StartSimpleSaga>(msg => new SimpleSagaState(msg.CorrelationId))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using OpenSleigh.Core;
using OpenSleigh.Core.Messaging;
using OpenSleigh.Samples.Sample3.Common.Messages;
using OpenSleigh.Samples.Sample3.Worker.Sagas;

namespace OpenSleigh.Samples.Sample3.Worker.Sagas
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

namespace OpenSleigh.Samples.Sample3.Worker.Sagas
{
public record SimpleSagaState : SagaState{
public record SimpleSagaState : SagaState
{
public SimpleSagaState(Guid id) : base(id){}
}

Expand Down
36 changes: 2 additions & 34 deletions samples/Sample3/Sample3.sln
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30804.86
# Visual Studio Version 17
VisualStudioVersion = 17.2.32802.462
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSleigh.Samples.Sample3.API", "OpenSleigh.Samples.Sample3.API\OpenSleigh.Samples.Sample3.API.csproj", "{A94C718C-3B49-4E67-BACB-4B6615C97839}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "library", "library", "{179EFC5F-B0C8-4649-BF7C-24E9EBDFBBA8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSleigh.Core", "..\..\src\OpenSleigh.Core\OpenSleigh.Core.csproj", "{CE375B34-1590-4544-9B33-70EF4C25D54C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSleigh.Transport.RabbitMQ", "..\..\src\OpenSleigh.Transport.RabbitMQ\OpenSleigh.Transport.RabbitMQ.csproj", "{31E2559D-4E5C-4110-AA42-99F46DDCE7B3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSleigh.Samples.Sample3.Worker", "OpenSleigh.Samples.Sample3.Worker\OpenSleigh.Samples.Sample3.Worker.csproj", "{3CCAD730-A162-42BC-BF64-307A964010DF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSleigh.Samples.Sample3.Common", "OpenSleigh.Samples.Sample3.Common\OpenSleigh.Samples.Sample3.Common.csproj", "{42152DFE-AA8D-480A-BD57-B2D31A0DEC32}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSleigh.Persistence.SQL", "..\..\src\OpenSleigh.Persistence.SQL\OpenSleigh.Persistence.SQL.csproj", "{5242977B-11A8-48F3-BE45-63892666C81E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenSleigh.Persistence.SQLServer", "..\..\src\OpenSleigh.Persistence.SQLServer\OpenSleigh.Persistence.SQLServer.csproj", "{924DA7FF-5A89-4840-80AA-EBA266B3FD5B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -29,14 +19,6 @@ Global
{A94C718C-3B49-4E67-BACB-4B6615C97839}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A94C718C-3B49-4E67-BACB-4B6615C97839}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A94C718C-3B49-4E67-BACB-4B6615C97839}.Release|Any CPU.Build.0 = Release|Any CPU
{CE375B34-1590-4544-9B33-70EF4C25D54C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CE375B34-1590-4544-9B33-70EF4C25D54C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CE375B34-1590-4544-9B33-70EF4C25D54C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CE375B34-1590-4544-9B33-70EF4C25D54C}.Release|Any CPU.Build.0 = Release|Any CPU
{31E2559D-4E5C-4110-AA42-99F46DDCE7B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{31E2559D-4E5C-4110-AA42-99F46DDCE7B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{31E2559D-4E5C-4110-AA42-99F46DDCE7B3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{31E2559D-4E5C-4110-AA42-99F46DDCE7B3}.Release|Any CPU.Build.0 = Release|Any CPU
{3CCAD730-A162-42BC-BF64-307A964010DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3CCAD730-A162-42BC-BF64-307A964010DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3CCAD730-A162-42BC-BF64-307A964010DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -45,24 +27,10 @@ Global
{42152DFE-AA8D-480A-BD57-B2D31A0DEC32}.Debug|Any CPU.Build.0 = Debug|Any CPU
{42152DFE-AA8D-480A-BD57-B2D31A0DEC32}.Release|Any CPU.ActiveCfg = Release|Any CPU
{42152DFE-AA8D-480A-BD57-B2D31A0DEC32}.Release|Any CPU.Build.0 = Release|Any CPU
{5242977B-11A8-48F3-BE45-63892666C81E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5242977B-11A8-48F3-BE45-63892666C81E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5242977B-11A8-48F3-BE45-63892666C81E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5242977B-11A8-48F3-BE45-63892666C81E}.Release|Any CPU.Build.0 = Release|Any CPU
{924DA7FF-5A89-4840-80AA-EBA266B3FD5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{924DA7FF-5A89-4840-80AA-EBA266B3FD5B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{924DA7FF-5A89-4840-80AA-EBA266B3FD5B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{924DA7FF-5A89-4840-80AA-EBA266B3FD5B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{CE375B34-1590-4544-9B33-70EF4C25D54C} = {179EFC5F-B0C8-4649-BF7C-24E9EBDFBBA8}
{31E2559D-4E5C-4110-AA42-99F46DDCE7B3} = {179EFC5F-B0C8-4649-BF7C-24E9EBDFBBA8}
{5242977B-11A8-48F3-BE45-63892666C81E} = {179EFC5F-B0C8-4649-BF7C-24E9EBDFBBA8}
{924DA7FF-5A89-4840-80AA-EBA266B3FD5B} = {179EFC5F-B0C8-4649-BF7C-24E9EBDFBBA8}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BC78DE5A-D1CC-46D6-ADDA-3A8F41324E03}
EndGlobalSection
Expand Down

0 comments on commit ae1ba4c

Please sign in to comment.