diff --git a/EventFlow.sln b/EventFlow.sln index 9e06b86fe..bfc5b4da5 100644 --- a/EventFlow.sln +++ b/EventFlow.sln @@ -1,215 +1,466 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.1.32210.238 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventFlow", "Source\EventFlow\EventFlow.csproj", "{11131251-778D-4D2E-BDD1-4844A789BCA9}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventFlow.Tests", "Source\EventFlow.Tests\EventFlow.Tests.csproj", "{7747E4A0-B378-46B6-837D-5E78C497B061}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventFlow.TestHelpers", "Source\EventFlow.TestHelpers\EventFlow.TestHelpers.csproj", "{571D291C-5E4C-43AF-855F-7C4E2F318F4C}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{673D0A1A-EFEA-4541-942B-6C1FE704EC56}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shipping", "Shipping", "{405C2850-2435-4C27-84BA-9DE3BC1DF68B}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventFlow.Examples.Shipping", "Source\EventFlow.Examples.Shipping\EventFlow.Examples.Shipping.csproj", "{8AF502A3-CF1D-4619-B169-517F157951DF}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventFlow.Examples.Shipping.Queries.InMemory", "Source\EventFlow.Examples.Shipping.Queries.InMemory\EventFlow.Examples.Shipping.Queries.InMemory.csproj", "{1C30C2E9-A3C4-41D5-B2A2-25C1DDE33F3A}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventFlow.Examples.Shipping.Tests", "Source\EventFlow.Examples.Shipping.Tests\EventFlow.Examples.Shipping.Tests.csproj", "{0EBEA705-79DC-497A-B4A2-FCCFB012EA65}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Extensions", "Extensions", "{5EE323DE-E69B-451A-8AC3-22DD6A004FBA}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SQL", "SQL", "{88359036-4F35-487C-BF2C-4F31C7BC92D8}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventFlow.Sql", "Source\EventFlow.Sql\EventFlow.Sql.csproj", "{983EFD08-2256-4361-A869-23EB872328CB}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventFlow.MsSql", "Source\EventFlow.MsSql\EventFlow.MsSql.csproj", "{96A39EA3-6772-409E-AF0B-C5A35A1A13CC}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventFlow.MsSql.Tests", "Source\EventFlow.MsSql.Tests\EventFlow.MsSql.Tests.csproj", "{CE19355C-6355-405F-A640-908AE4F83C2C}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PostgreSql", "PostgreSql", "{37ABC463-BAF5-4B5E-9A55-2BF12B0C144A}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventFlow.PostgreSql", "Source\EventFlow.PostgreSql\EventFlow.PostgreSql.csproj", "{B05E67FF-294D-4871-A5EF-8BA762951476}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventFlow.PostgreSql.Tests", "Source\EventFlow.PostgreSql.Tests\EventFlow.PostgreSql.Tests.csproj", "{87A29B00-48EB-40BC-B532-7EDC17604BB3}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MongoDB", "MongoDB", "{9B07B6E9-428A-42F7-AFB1-B23755A409EE}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventFlow.MongoDB", "Source\EventFlow.MongoDB\EventFlow.MongoDB.csproj", "{BF9A0D20-4F8E-443C-8F36-5DD854D188C2}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventFlow.MongoDB.Tests", "Source\EventFlow.MongoDB.Tests\EventFlow.MongoDB.Tests.csproj", "{9132960E-9496-4C77-BD80-A09A86814757}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MsSql", "MsSql", "{942CFA92-D15D-4CF8-87C9-0B9B727E5E22}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PostgreSql", "PostgreSql", "{3A68BD5F-FE8D-4CD4-A039-3EFBDEDE8865}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "RabbitMq", "RabbitMq", "{CE1D5F5A-B348-423E-9B5E-1A805BFB199F}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventFlow.RabbitMQ", "Source\EventFlow.RabbitMQ\EventFlow.RabbitMQ.csproj", "{9B807641-8566-4382-AF8B-445D074105AD}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventFlow.RabbitMQ.Tests", "Source\EventFlow.RabbitMQ.Tests\EventFlow.RabbitMQ.Tests.csproj", "{683BBF59-C81F-4E04-BE33-E8806B40F766}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Hangfire", "Hangfire", "{2E9CFB92-E8E5-4466-8410-CCB5BA5CB6D1}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventFlow.Hangfire", "Source\EventFlow.Hangfire\EventFlow.Hangfire.csproj", "{8BC99846-DDDB-40E7-B062-308BF8A1239F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventFlow.Hangfire.Tests", "Source\EventFlow.Hangfire.Tests\EventFlow.Hangfire.Tests.csproj", "{B4247230-5289-4D17-BB0F-CB2FDBABA988}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SQLite", "SQLite", "{74EFCDE2-CB0F-49B1-9CEC-BE748EB1FBF7}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventFlow.SQLite", "Source\EventFlow.SQLite\EventFlow.SQLite.csproj", "{D2B5B5CA-57C2-4354-ADB7-47A6D81AD521}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventFlow.SQLite.Tests", "Source\EventFlow.SQLite.Tests\EventFlow.SQLite.Tests.csproj", "{8FAC191C-340D-47C6-B8AE-3D57783749C4}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EntityFramework", "EntityFramework", "{21A29AA0-EF82-4717-89CE-729257C05C7D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventFlow.EntityFramework", "Source\EventFlow.EntityFramework\EventFlow.EntityFramework.csproj", "{ED4AA905-A208-4E67-8B40-CC8E1B8440B8}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventFlow.EntityFramework.Tests", "Source\EventFlow.EntityFramework.Tests\EventFlow.EntityFramework.Tests.csproj", "{02B1E8B4-CC53-4BAB-BC2C-AD0B06760AE2}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SourceGenerators", "SourceGenerators", "{91929C7C-D9AE-B5BA-2467-C9FCAEC69696}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventFlow.SourceGenerators", "Source\EventFlow.SourceGenerators\EventFlow.SourceGenerators.csproj", "{35098BEA-A0B8-4E63-8D71-35CE5297B459}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventFlow.SourceGenerators.Tests", "Source\EventFlow.SourceGenerators.Tests\EventFlow.SourceGenerators.Tests.csproj", "{D8317769-F140-4E5D-9041-19342A3A33BD}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {11131251-778D-4D2E-BDD1-4844A789BCA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {11131251-778D-4D2E-BDD1-4844A789BCA9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {11131251-778D-4D2E-BDD1-4844A789BCA9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {11131251-778D-4D2E-BDD1-4844A789BCA9}.Release|Any CPU.Build.0 = Release|Any CPU - {7747E4A0-B378-46B6-837D-5E78C497B061}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7747E4A0-B378-46B6-837D-5E78C497B061}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7747E4A0-B378-46B6-837D-5E78C497B061}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7747E4A0-B378-46B6-837D-5E78C497B061}.Release|Any CPU.Build.0 = Release|Any CPU - {571D291C-5E4C-43AF-855F-7C4E2F318F4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {571D291C-5E4C-43AF-855F-7C4E2F318F4C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {571D291C-5E4C-43AF-855F-7C4E2F318F4C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {571D291C-5E4C-43AF-855F-7C4E2F318F4C}.Release|Any CPU.Build.0 = Release|Any CPU - {8AF502A3-CF1D-4619-B169-517F157951DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8AF502A3-CF1D-4619-B169-517F157951DF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8AF502A3-CF1D-4619-B169-517F157951DF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8AF502A3-CF1D-4619-B169-517F157951DF}.Release|Any CPU.Build.0 = Release|Any CPU - {1C30C2E9-A3C4-41D5-B2A2-25C1DDE33F3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1C30C2E9-A3C4-41D5-B2A2-25C1DDE33F3A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1C30C2E9-A3C4-41D5-B2A2-25C1DDE33F3A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1C30C2E9-A3C4-41D5-B2A2-25C1DDE33F3A}.Release|Any CPU.Build.0 = Release|Any CPU - {0EBEA705-79DC-497A-B4A2-FCCFB012EA65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0EBEA705-79DC-497A-B4A2-FCCFB012EA65}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0EBEA705-79DC-497A-B4A2-FCCFB012EA65}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0EBEA705-79DC-497A-B4A2-FCCFB012EA65}.Release|Any CPU.Build.0 = Release|Any CPU - {983EFD08-2256-4361-A869-23EB872328CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {983EFD08-2256-4361-A869-23EB872328CB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {983EFD08-2256-4361-A869-23EB872328CB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {983EFD08-2256-4361-A869-23EB872328CB}.Release|Any CPU.Build.0 = Release|Any CPU - {96A39EA3-6772-409E-AF0B-C5A35A1A13CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {96A39EA3-6772-409E-AF0B-C5A35A1A13CC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {96A39EA3-6772-409E-AF0B-C5A35A1A13CC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {96A39EA3-6772-409E-AF0B-C5A35A1A13CC}.Release|Any CPU.Build.0 = Release|Any CPU - {CE19355C-6355-405F-A640-908AE4F83C2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CE19355C-6355-405F-A640-908AE4F83C2C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CE19355C-6355-405F-A640-908AE4F83C2C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CE19355C-6355-405F-A640-908AE4F83C2C}.Release|Any CPU.Build.0 = Release|Any CPU - {B05E67FF-294D-4871-A5EF-8BA762951476}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B05E67FF-294D-4871-A5EF-8BA762951476}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B05E67FF-294D-4871-A5EF-8BA762951476}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B05E67FF-294D-4871-A5EF-8BA762951476}.Release|Any CPU.Build.0 = Release|Any CPU - {87A29B00-48EB-40BC-B532-7EDC17604BB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {87A29B00-48EB-40BC-B532-7EDC17604BB3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {87A29B00-48EB-40BC-B532-7EDC17604BB3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {87A29B00-48EB-40BC-B532-7EDC17604BB3}.Release|Any CPU.Build.0 = Release|Any CPU - {BF9A0D20-4F8E-443C-8F36-5DD854D188C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BF9A0D20-4F8E-443C-8F36-5DD854D188C2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BF9A0D20-4F8E-443C-8F36-5DD854D188C2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BF9A0D20-4F8E-443C-8F36-5DD854D188C2}.Release|Any CPU.Build.0 = Release|Any CPU - {9132960E-9496-4C77-BD80-A09A86814757}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9132960E-9496-4C77-BD80-A09A86814757}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9132960E-9496-4C77-BD80-A09A86814757}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9132960E-9496-4C77-BD80-A09A86814757}.Release|Any CPU.Build.0 = Release|Any CPU - {9B807641-8566-4382-AF8B-445D074105AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9B807641-8566-4382-AF8B-445D074105AD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9B807641-8566-4382-AF8B-445D074105AD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9B807641-8566-4382-AF8B-445D074105AD}.Release|Any CPU.Build.0 = Release|Any CPU - {683BBF59-C81F-4E04-BE33-E8806B40F766}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {683BBF59-C81F-4E04-BE33-E8806B40F766}.Debug|Any CPU.Build.0 = Debug|Any CPU - {683BBF59-C81F-4E04-BE33-E8806B40F766}.Release|Any CPU.ActiveCfg = Release|Any CPU - {683BBF59-C81F-4E04-BE33-E8806B40F766}.Release|Any CPU.Build.0 = Release|Any CPU - {8BC99846-DDDB-40E7-B062-308BF8A1239F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8BC99846-DDDB-40E7-B062-308BF8A1239F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8BC99846-DDDB-40E7-B062-308BF8A1239F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8BC99846-DDDB-40E7-B062-308BF8A1239F}.Release|Any CPU.Build.0 = Release|Any CPU - {B4247230-5289-4D17-BB0F-CB2FDBABA988}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B4247230-5289-4D17-BB0F-CB2FDBABA988}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B4247230-5289-4D17-BB0F-CB2FDBABA988}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B4247230-5289-4D17-BB0F-CB2FDBABA988}.Release|Any CPU.Build.0 = Release|Any CPU - {D2B5B5CA-57C2-4354-ADB7-47A6D81AD521}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D2B5B5CA-57C2-4354-ADB7-47A6D81AD521}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D2B5B5CA-57C2-4354-ADB7-47A6D81AD521}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D2B5B5CA-57C2-4354-ADB7-47A6D81AD521}.Release|Any CPU.Build.0 = Release|Any CPU - {8FAC191C-340D-47C6-B8AE-3D57783749C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8FAC191C-340D-47C6-B8AE-3D57783749C4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8FAC191C-340D-47C6-B8AE-3D57783749C4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8FAC191C-340D-47C6-B8AE-3D57783749C4}.Release|Any CPU.Build.0 = Release|Any CPU - {ED4AA905-A208-4E67-8B40-CC8E1B8440B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {ED4AA905-A208-4E67-8B40-CC8E1B8440B8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {ED4AA905-A208-4E67-8B40-CC8E1B8440B8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {ED4AA905-A208-4E67-8B40-CC8E1B8440B8}.Release|Any CPU.Build.0 = Release|Any CPU - {02B1E8B4-CC53-4BAB-BC2C-AD0B06760AE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {02B1E8B4-CC53-4BAB-BC2C-AD0B06760AE2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {02B1E8B4-CC53-4BAB-BC2C-AD0B06760AE2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {02B1E8B4-CC53-4BAB-BC2C-AD0B06760AE2}.Release|Any CPU.Build.0 = Release|Any CPU - {35098BEA-A0B8-4E63-8D71-35CE5297B459}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {35098BEA-A0B8-4E63-8D71-35CE5297B459}.Debug|Any CPU.Build.0 = Debug|Any CPU - {35098BEA-A0B8-4E63-8D71-35CE5297B459}.Release|Any CPU.ActiveCfg = Release|Any CPU - {35098BEA-A0B8-4E63-8D71-35CE5297B459}.Release|Any CPU.Build.0 = Release|Any CPU - {D8317769-F140-4E5D-9041-19342A3A33BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D8317769-F140-4E5D-9041-19342A3A33BD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D8317769-F140-4E5D-9041-19342A3A33BD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D8317769-F140-4E5D-9041-19342A3A33BD}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {405C2850-2435-4C27-84BA-9DE3BC1DF68B} = {673D0A1A-EFEA-4541-942B-6C1FE704EC56} - {8AF502A3-CF1D-4619-B169-517F157951DF} = {405C2850-2435-4C27-84BA-9DE3BC1DF68B} - {1C30C2E9-A3C4-41D5-B2A2-25C1DDE33F3A} = {405C2850-2435-4C27-84BA-9DE3BC1DF68B} - {0EBEA705-79DC-497A-B4A2-FCCFB012EA65} = {405C2850-2435-4C27-84BA-9DE3BC1DF68B} - {88359036-4F35-487C-BF2C-4F31C7BC92D8} = {5EE323DE-E69B-451A-8AC3-22DD6A004FBA} - {983EFD08-2256-4361-A869-23EB872328CB} = {88359036-4F35-487C-BF2C-4F31C7BC92D8} - {96A39EA3-6772-409E-AF0B-C5A35A1A13CC} = {942CFA92-D15D-4CF8-87C9-0B9B727E5E22} - {CE19355C-6355-405F-A640-908AE4F83C2C} = {942CFA92-D15D-4CF8-87C9-0B9B727E5E22} - {37ABC463-BAF5-4B5E-9A55-2BF12B0C144A} = {3A68BD5F-FE8D-4CD4-A039-3EFBDEDE8865} - {B05E67FF-294D-4871-A5EF-8BA762951476} = {37ABC463-BAF5-4B5E-9A55-2BF12B0C144A} - {87A29B00-48EB-40BC-B532-7EDC17604BB3} = {37ABC463-BAF5-4B5E-9A55-2BF12B0C144A} - {9B07B6E9-428A-42F7-AFB1-B23755A409EE} = {5EE323DE-E69B-451A-8AC3-22DD6A004FBA} - {BF9A0D20-4F8E-443C-8F36-5DD854D188C2} = {9B07B6E9-428A-42F7-AFB1-B23755A409EE} - {9132960E-9496-4C77-BD80-A09A86814757} = {9B07B6E9-428A-42F7-AFB1-B23755A409EE} - {942CFA92-D15D-4CF8-87C9-0B9B727E5E22} = {88359036-4F35-487C-BF2C-4F31C7BC92D8} - {3A68BD5F-FE8D-4CD4-A039-3EFBDEDE8865} = {88359036-4F35-487C-BF2C-4F31C7BC92D8} - {CE1D5F5A-B348-423E-9B5E-1A805BFB199F} = {5EE323DE-E69B-451A-8AC3-22DD6A004FBA} - {9B807641-8566-4382-AF8B-445D074105AD} = {CE1D5F5A-B348-423E-9B5E-1A805BFB199F} - {683BBF59-C81F-4E04-BE33-E8806B40F766} = {CE1D5F5A-B348-423E-9B5E-1A805BFB199F} - {2E9CFB92-E8E5-4466-8410-CCB5BA5CB6D1} = {5EE323DE-E69B-451A-8AC3-22DD6A004FBA} - {8BC99846-DDDB-40E7-B062-308BF8A1239F} = {2E9CFB92-E8E5-4466-8410-CCB5BA5CB6D1} - {B4247230-5289-4D17-BB0F-CB2FDBABA988} = {2E9CFB92-E8E5-4466-8410-CCB5BA5CB6D1} - {74EFCDE2-CB0F-49B1-9CEC-BE748EB1FBF7} = {88359036-4F35-487C-BF2C-4F31C7BC92D8} - {D2B5B5CA-57C2-4354-ADB7-47A6D81AD521} = {74EFCDE2-CB0F-49B1-9CEC-BE748EB1FBF7} - {8FAC191C-340D-47C6-B8AE-3D57783749C4} = {74EFCDE2-CB0F-49B1-9CEC-BE748EB1FBF7} - {21A29AA0-EF82-4717-89CE-729257C05C7D} = {5EE323DE-E69B-451A-8AC3-22DD6A004FBA} - {ED4AA905-A208-4E67-8B40-CC8E1B8440B8} = {21A29AA0-EF82-4717-89CE-729257C05C7D} - {02B1E8B4-CC53-4BAB-BC2C-AD0B06760AE2} = {21A29AA0-EF82-4717-89CE-729257C05C7D} - {91929C7C-D9AE-B5BA-2467-C9FCAEC69696} = {5EE323DE-E69B-451A-8AC3-22DD6A004FBA} - {35098BEA-A0B8-4E63-8D71-35CE5297B459} = {91929C7C-D9AE-B5BA-2467-C9FCAEC69696} - {D8317769-F140-4E5D-9041-19342A3A33BD} = {91929C7C-D9AE-B5BA-2467-C9FCAEC69696} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {17607E2C-4E8E-45A2-85BD-0A5808E1C0F3} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.1.32210.238 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventFlow", "Source\EventFlow\EventFlow.csproj", "{11131251-778D-4D2E-BDD1-4844A789BCA9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventFlow.Tests", "Source\EventFlow.Tests\EventFlow.Tests.csproj", "{7747E4A0-B378-46B6-837D-5E78C497B061}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventFlow.TestHelpers", "Source\EventFlow.TestHelpers\EventFlow.TestHelpers.csproj", "{571D291C-5E4C-43AF-855F-7C4E2F318F4C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{673D0A1A-EFEA-4541-942B-6C1FE704EC56}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shipping", "Shipping", "{405C2850-2435-4C27-84BA-9DE3BC1DF68B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventFlow.Examples.Shipping", "Source\EventFlow.Examples.Shipping\EventFlow.Examples.Shipping.csproj", "{8AF502A3-CF1D-4619-B169-517F157951DF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventFlow.Examples.Shipping.Queries.InMemory", "Source\EventFlow.Examples.Shipping.Queries.InMemory\EventFlow.Examples.Shipping.Queries.InMemory.csproj", "{1C30C2E9-A3C4-41D5-B2A2-25C1DDE33F3A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventFlow.Examples.Shipping.Tests", "Source\EventFlow.Examples.Shipping.Tests\EventFlow.Examples.Shipping.Tests.csproj", "{0EBEA705-79DC-497A-B4A2-FCCFB012EA65}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Extensions", "Extensions", "{5EE323DE-E69B-451A-8AC3-22DD6A004FBA}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SQL", "SQL", "{88359036-4F35-487C-BF2C-4F31C7BC92D8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventFlow.Sql", "Source\EventFlow.Sql\EventFlow.Sql.csproj", "{983EFD08-2256-4361-A869-23EB872328CB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventFlow.MsSql", "Source\EventFlow.MsSql\EventFlow.MsSql.csproj", "{96A39EA3-6772-409E-AF0B-C5A35A1A13CC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventFlow.MsSql.Tests", "Source\EventFlow.MsSql.Tests\EventFlow.MsSql.Tests.csproj", "{CE19355C-6355-405F-A640-908AE4F83C2C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PostgreSql", "PostgreSql", "{37ABC463-BAF5-4B5E-9A55-2BF12B0C144A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventFlow.PostgreSql", "Source\EventFlow.PostgreSql\EventFlow.PostgreSql.csproj", "{B05E67FF-294D-4871-A5EF-8BA762951476}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventFlow.PostgreSql.Tests", "Source\EventFlow.PostgreSql.Tests\EventFlow.PostgreSql.Tests.csproj", "{87A29B00-48EB-40BC-B532-7EDC17604BB3}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MongoDB", "MongoDB", "{9B07B6E9-428A-42F7-AFB1-B23755A409EE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventFlow.MongoDB", "Source\EventFlow.MongoDB\EventFlow.MongoDB.csproj", "{BF9A0D20-4F8E-443C-8F36-5DD854D188C2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventFlow.MongoDB.Tests", "Source\EventFlow.MongoDB.Tests\EventFlow.MongoDB.Tests.csproj", "{9132960E-9496-4C77-BD80-A09A86814757}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MsSql", "MsSql", "{942CFA92-D15D-4CF8-87C9-0B9B727E5E22}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PostgreSql", "PostgreSql", "{3A68BD5F-FE8D-4CD4-A039-3EFBDEDE8865}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "RabbitMq", "RabbitMq", "{CE1D5F5A-B348-423E-9B5E-1A805BFB199F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventFlow.RabbitMQ", "Source\EventFlow.RabbitMQ\EventFlow.RabbitMQ.csproj", "{9B807641-8566-4382-AF8B-445D074105AD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventFlow.RabbitMQ.Tests", "Source\EventFlow.RabbitMQ.Tests\EventFlow.RabbitMQ.Tests.csproj", "{683BBF59-C81F-4E04-BE33-E8806B40F766}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Hangfire", "Hangfire", "{2E9CFB92-E8E5-4466-8410-CCB5BA5CB6D1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventFlow.Hangfire", "Source\EventFlow.Hangfire\EventFlow.Hangfire.csproj", "{8BC99846-DDDB-40E7-B062-308BF8A1239F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventFlow.Hangfire.Tests", "Source\EventFlow.Hangfire.Tests\EventFlow.Hangfire.Tests.csproj", "{B4247230-5289-4D17-BB0F-CB2FDBABA988}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SQLite", "SQLite", "{74EFCDE2-CB0F-49B1-9CEC-BE748EB1FBF7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventFlow.SQLite", "Source\EventFlow.SQLite\EventFlow.SQLite.csproj", "{D2B5B5CA-57C2-4354-ADB7-47A6D81AD521}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventFlow.SQLite.Tests", "Source\EventFlow.SQLite.Tests\EventFlow.SQLite.Tests.csproj", "{8FAC191C-340D-47C6-B8AE-3D57783749C4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EntityFramework", "EntityFramework", "{21A29AA0-EF82-4717-89CE-729257C05C7D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventFlow.EntityFramework", "Source\EventFlow.EntityFramework\EventFlow.EntityFramework.csproj", "{ED4AA905-A208-4E67-8B40-CC8E1B8440B8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventFlow.EntityFramework.Tests", "Source\EventFlow.EntityFramework.Tests\EventFlow.EntityFramework.Tests.csproj", "{02B1E8B4-CC53-4BAB-BC2C-AD0B06760AE2}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SourceGenerators", "SourceGenerators", "{91929C7C-D9AE-B5BA-2467-C9FCAEC69696}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventFlow.SourceGenerators", "Source\EventFlow.SourceGenerators\EventFlow.SourceGenerators.csproj", "{35098BEA-A0B8-4E63-8D71-35CE5297B459}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventFlow.SourceGenerators.Tests", "Source\EventFlow.SourceGenerators.Tests\EventFlow.SourceGenerators.Tests.csproj", "{D8317769-F140-4E5D-9041-19342A3A33BD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Source", "Source", "{B8EFCA5F-814F-285C-A8CB-F00F14650265}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventFlow.Serialization.NewtonsoftJson", "Source\EventFlow.Serialization.NewtonsoftJson\EventFlow.Serialization.NewtonsoftJson.csproj", "{EC640FE3-1973-4348-B52B-E174F4E68FC8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventFlow.Serialization.NewtonsoftJson.Tests", "Source\EventFlow.Serialization.NewtonsoftJson.Tests\EventFlow.Serialization.NewtonsoftJson.Tests.csproj", "{ECFB5F58-39CA-4C62-9F16-51D7CD5D38AA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventFlow.Serialization.SystemTextJson", "Source\EventFlow.Serialization.SystemTextJson\EventFlow.Serialization.SystemTextJson.csproj", "{1D887E40-DF88-4126-8202-8D7DA8EB48CE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventFlow.Serialization.SystemTextJson.Tests", "Source\EventFlow.Serialization.SystemTextJson.Tests\EventFlow.Serialization.SystemTextJson.Tests.csproj", "{64FB5D1D-A725-4148-ABE8-60EC93DF66E5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {11131251-778D-4D2E-BDD1-4844A789BCA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {11131251-778D-4D2E-BDD1-4844A789BCA9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {11131251-778D-4D2E-BDD1-4844A789BCA9}.Debug|x64.ActiveCfg = Debug|Any CPU + {11131251-778D-4D2E-BDD1-4844A789BCA9}.Debug|x64.Build.0 = Debug|Any CPU + {11131251-778D-4D2E-BDD1-4844A789BCA9}.Debug|x86.ActiveCfg = Debug|Any CPU + {11131251-778D-4D2E-BDD1-4844A789BCA9}.Debug|x86.Build.0 = Debug|Any CPU + {11131251-778D-4D2E-BDD1-4844A789BCA9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {11131251-778D-4D2E-BDD1-4844A789BCA9}.Release|Any CPU.Build.0 = Release|Any CPU + {11131251-778D-4D2E-BDD1-4844A789BCA9}.Release|x64.ActiveCfg = Release|Any CPU + {11131251-778D-4D2E-BDD1-4844A789BCA9}.Release|x64.Build.0 = Release|Any CPU + {11131251-778D-4D2E-BDD1-4844A789BCA9}.Release|x86.ActiveCfg = Release|Any CPU + {11131251-778D-4D2E-BDD1-4844A789BCA9}.Release|x86.Build.0 = Release|Any CPU + {7747E4A0-B378-46B6-837D-5E78C497B061}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7747E4A0-B378-46B6-837D-5E78C497B061}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7747E4A0-B378-46B6-837D-5E78C497B061}.Debug|x64.ActiveCfg = Debug|Any CPU + {7747E4A0-B378-46B6-837D-5E78C497B061}.Debug|x64.Build.0 = Debug|Any CPU + {7747E4A0-B378-46B6-837D-5E78C497B061}.Debug|x86.ActiveCfg = Debug|Any CPU + {7747E4A0-B378-46B6-837D-5E78C497B061}.Debug|x86.Build.0 = Debug|Any CPU + {7747E4A0-B378-46B6-837D-5E78C497B061}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7747E4A0-B378-46B6-837D-5E78C497B061}.Release|Any CPU.Build.0 = Release|Any CPU + {7747E4A0-B378-46B6-837D-5E78C497B061}.Release|x64.ActiveCfg = Release|Any CPU + {7747E4A0-B378-46B6-837D-5E78C497B061}.Release|x64.Build.0 = Release|Any CPU + {7747E4A0-B378-46B6-837D-5E78C497B061}.Release|x86.ActiveCfg = Release|Any CPU + {7747E4A0-B378-46B6-837D-5E78C497B061}.Release|x86.Build.0 = Release|Any CPU + {571D291C-5E4C-43AF-855F-7C4E2F318F4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {571D291C-5E4C-43AF-855F-7C4E2F318F4C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {571D291C-5E4C-43AF-855F-7C4E2F318F4C}.Debug|x64.ActiveCfg = Debug|Any CPU + {571D291C-5E4C-43AF-855F-7C4E2F318F4C}.Debug|x64.Build.0 = Debug|Any CPU + {571D291C-5E4C-43AF-855F-7C4E2F318F4C}.Debug|x86.ActiveCfg = Debug|Any CPU + {571D291C-5E4C-43AF-855F-7C4E2F318F4C}.Debug|x86.Build.0 = Debug|Any CPU + {571D291C-5E4C-43AF-855F-7C4E2F318F4C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {571D291C-5E4C-43AF-855F-7C4E2F318F4C}.Release|Any CPU.Build.0 = Release|Any CPU + {571D291C-5E4C-43AF-855F-7C4E2F318F4C}.Release|x64.ActiveCfg = Release|Any CPU + {571D291C-5E4C-43AF-855F-7C4E2F318F4C}.Release|x64.Build.0 = Release|Any CPU + {571D291C-5E4C-43AF-855F-7C4E2F318F4C}.Release|x86.ActiveCfg = Release|Any CPU + {571D291C-5E4C-43AF-855F-7C4E2F318F4C}.Release|x86.Build.0 = Release|Any CPU + {8AF502A3-CF1D-4619-B169-517F157951DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8AF502A3-CF1D-4619-B169-517F157951DF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8AF502A3-CF1D-4619-B169-517F157951DF}.Debug|x64.ActiveCfg = Debug|Any CPU + {8AF502A3-CF1D-4619-B169-517F157951DF}.Debug|x64.Build.0 = Debug|Any CPU + {8AF502A3-CF1D-4619-B169-517F157951DF}.Debug|x86.ActiveCfg = Debug|Any CPU + {8AF502A3-CF1D-4619-B169-517F157951DF}.Debug|x86.Build.0 = Debug|Any CPU + {8AF502A3-CF1D-4619-B169-517F157951DF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8AF502A3-CF1D-4619-B169-517F157951DF}.Release|Any CPU.Build.0 = Release|Any CPU + {8AF502A3-CF1D-4619-B169-517F157951DF}.Release|x64.ActiveCfg = Release|Any CPU + {8AF502A3-CF1D-4619-B169-517F157951DF}.Release|x64.Build.0 = Release|Any CPU + {8AF502A3-CF1D-4619-B169-517F157951DF}.Release|x86.ActiveCfg = Release|Any CPU + {8AF502A3-CF1D-4619-B169-517F157951DF}.Release|x86.Build.0 = Release|Any CPU + {1C30C2E9-A3C4-41D5-B2A2-25C1DDE33F3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1C30C2E9-A3C4-41D5-B2A2-25C1DDE33F3A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1C30C2E9-A3C4-41D5-B2A2-25C1DDE33F3A}.Debug|x64.ActiveCfg = Debug|Any CPU + {1C30C2E9-A3C4-41D5-B2A2-25C1DDE33F3A}.Debug|x64.Build.0 = Debug|Any CPU + {1C30C2E9-A3C4-41D5-B2A2-25C1DDE33F3A}.Debug|x86.ActiveCfg = Debug|Any CPU + {1C30C2E9-A3C4-41D5-B2A2-25C1DDE33F3A}.Debug|x86.Build.0 = Debug|Any CPU + {1C30C2E9-A3C4-41D5-B2A2-25C1DDE33F3A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1C30C2E9-A3C4-41D5-B2A2-25C1DDE33F3A}.Release|Any CPU.Build.0 = Release|Any CPU + {1C30C2E9-A3C4-41D5-B2A2-25C1DDE33F3A}.Release|x64.ActiveCfg = Release|Any CPU + {1C30C2E9-A3C4-41D5-B2A2-25C1DDE33F3A}.Release|x64.Build.0 = Release|Any CPU + {1C30C2E9-A3C4-41D5-B2A2-25C1DDE33F3A}.Release|x86.ActiveCfg = Release|Any CPU + {1C30C2E9-A3C4-41D5-B2A2-25C1DDE33F3A}.Release|x86.Build.0 = Release|Any CPU + {0EBEA705-79DC-497A-B4A2-FCCFB012EA65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0EBEA705-79DC-497A-B4A2-FCCFB012EA65}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0EBEA705-79DC-497A-B4A2-FCCFB012EA65}.Debug|x64.ActiveCfg = Debug|Any CPU + {0EBEA705-79DC-497A-B4A2-FCCFB012EA65}.Debug|x64.Build.0 = Debug|Any CPU + {0EBEA705-79DC-497A-B4A2-FCCFB012EA65}.Debug|x86.ActiveCfg = Debug|Any CPU + {0EBEA705-79DC-497A-B4A2-FCCFB012EA65}.Debug|x86.Build.0 = Debug|Any CPU + {0EBEA705-79DC-497A-B4A2-FCCFB012EA65}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0EBEA705-79DC-497A-B4A2-FCCFB012EA65}.Release|Any CPU.Build.0 = Release|Any CPU + {0EBEA705-79DC-497A-B4A2-FCCFB012EA65}.Release|x64.ActiveCfg = Release|Any CPU + {0EBEA705-79DC-497A-B4A2-FCCFB012EA65}.Release|x64.Build.0 = Release|Any CPU + {0EBEA705-79DC-497A-B4A2-FCCFB012EA65}.Release|x86.ActiveCfg = Release|Any CPU + {0EBEA705-79DC-497A-B4A2-FCCFB012EA65}.Release|x86.Build.0 = Release|Any CPU + {983EFD08-2256-4361-A869-23EB872328CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {983EFD08-2256-4361-A869-23EB872328CB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {983EFD08-2256-4361-A869-23EB872328CB}.Debug|x64.ActiveCfg = Debug|Any CPU + {983EFD08-2256-4361-A869-23EB872328CB}.Debug|x64.Build.0 = Debug|Any CPU + {983EFD08-2256-4361-A869-23EB872328CB}.Debug|x86.ActiveCfg = Debug|Any CPU + {983EFD08-2256-4361-A869-23EB872328CB}.Debug|x86.Build.0 = Debug|Any CPU + {983EFD08-2256-4361-A869-23EB872328CB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {983EFD08-2256-4361-A869-23EB872328CB}.Release|Any CPU.Build.0 = Release|Any CPU + {983EFD08-2256-4361-A869-23EB872328CB}.Release|x64.ActiveCfg = Release|Any CPU + {983EFD08-2256-4361-A869-23EB872328CB}.Release|x64.Build.0 = Release|Any CPU + {983EFD08-2256-4361-A869-23EB872328CB}.Release|x86.ActiveCfg = Release|Any CPU + {983EFD08-2256-4361-A869-23EB872328CB}.Release|x86.Build.0 = Release|Any CPU + {96A39EA3-6772-409E-AF0B-C5A35A1A13CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {96A39EA3-6772-409E-AF0B-C5A35A1A13CC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {96A39EA3-6772-409E-AF0B-C5A35A1A13CC}.Debug|x64.ActiveCfg = Debug|Any CPU + {96A39EA3-6772-409E-AF0B-C5A35A1A13CC}.Debug|x64.Build.0 = Debug|Any CPU + {96A39EA3-6772-409E-AF0B-C5A35A1A13CC}.Debug|x86.ActiveCfg = Debug|Any CPU + {96A39EA3-6772-409E-AF0B-C5A35A1A13CC}.Debug|x86.Build.0 = Debug|Any CPU + {96A39EA3-6772-409E-AF0B-C5A35A1A13CC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {96A39EA3-6772-409E-AF0B-C5A35A1A13CC}.Release|Any CPU.Build.0 = Release|Any CPU + {96A39EA3-6772-409E-AF0B-C5A35A1A13CC}.Release|x64.ActiveCfg = Release|Any CPU + {96A39EA3-6772-409E-AF0B-C5A35A1A13CC}.Release|x64.Build.0 = Release|Any CPU + {96A39EA3-6772-409E-AF0B-C5A35A1A13CC}.Release|x86.ActiveCfg = Release|Any CPU + {96A39EA3-6772-409E-AF0B-C5A35A1A13CC}.Release|x86.Build.0 = Release|Any CPU + {CE19355C-6355-405F-A640-908AE4F83C2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CE19355C-6355-405F-A640-908AE4F83C2C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CE19355C-6355-405F-A640-908AE4F83C2C}.Debug|x64.ActiveCfg = Debug|Any CPU + {CE19355C-6355-405F-A640-908AE4F83C2C}.Debug|x64.Build.0 = Debug|Any CPU + {CE19355C-6355-405F-A640-908AE4F83C2C}.Debug|x86.ActiveCfg = Debug|Any CPU + {CE19355C-6355-405F-A640-908AE4F83C2C}.Debug|x86.Build.0 = Debug|Any CPU + {CE19355C-6355-405F-A640-908AE4F83C2C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CE19355C-6355-405F-A640-908AE4F83C2C}.Release|Any CPU.Build.0 = Release|Any CPU + {CE19355C-6355-405F-A640-908AE4F83C2C}.Release|x64.ActiveCfg = Release|Any CPU + {CE19355C-6355-405F-A640-908AE4F83C2C}.Release|x64.Build.0 = Release|Any CPU + {CE19355C-6355-405F-A640-908AE4F83C2C}.Release|x86.ActiveCfg = Release|Any CPU + {CE19355C-6355-405F-A640-908AE4F83C2C}.Release|x86.Build.0 = Release|Any CPU + {B05E67FF-294D-4871-A5EF-8BA762951476}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B05E67FF-294D-4871-A5EF-8BA762951476}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B05E67FF-294D-4871-A5EF-8BA762951476}.Debug|x64.ActiveCfg = Debug|Any CPU + {B05E67FF-294D-4871-A5EF-8BA762951476}.Debug|x64.Build.0 = Debug|Any CPU + {B05E67FF-294D-4871-A5EF-8BA762951476}.Debug|x86.ActiveCfg = Debug|Any CPU + {B05E67FF-294D-4871-A5EF-8BA762951476}.Debug|x86.Build.0 = Debug|Any CPU + {B05E67FF-294D-4871-A5EF-8BA762951476}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B05E67FF-294D-4871-A5EF-8BA762951476}.Release|Any CPU.Build.0 = Release|Any CPU + {B05E67FF-294D-4871-A5EF-8BA762951476}.Release|x64.ActiveCfg = Release|Any CPU + {B05E67FF-294D-4871-A5EF-8BA762951476}.Release|x64.Build.0 = Release|Any CPU + {B05E67FF-294D-4871-A5EF-8BA762951476}.Release|x86.ActiveCfg = Release|Any CPU + {B05E67FF-294D-4871-A5EF-8BA762951476}.Release|x86.Build.0 = Release|Any CPU + {87A29B00-48EB-40BC-B532-7EDC17604BB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {87A29B00-48EB-40BC-B532-7EDC17604BB3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {87A29B00-48EB-40BC-B532-7EDC17604BB3}.Debug|x64.ActiveCfg = Debug|Any CPU + {87A29B00-48EB-40BC-B532-7EDC17604BB3}.Debug|x64.Build.0 = Debug|Any CPU + {87A29B00-48EB-40BC-B532-7EDC17604BB3}.Debug|x86.ActiveCfg = Debug|Any CPU + {87A29B00-48EB-40BC-B532-7EDC17604BB3}.Debug|x86.Build.0 = Debug|Any CPU + {87A29B00-48EB-40BC-B532-7EDC17604BB3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {87A29B00-48EB-40BC-B532-7EDC17604BB3}.Release|Any CPU.Build.0 = Release|Any CPU + {87A29B00-48EB-40BC-B532-7EDC17604BB3}.Release|x64.ActiveCfg = Release|Any CPU + {87A29B00-48EB-40BC-B532-7EDC17604BB3}.Release|x64.Build.0 = Release|Any CPU + {87A29B00-48EB-40BC-B532-7EDC17604BB3}.Release|x86.ActiveCfg = Release|Any CPU + {87A29B00-48EB-40BC-B532-7EDC17604BB3}.Release|x86.Build.0 = Release|Any CPU + {BF9A0D20-4F8E-443C-8F36-5DD854D188C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BF9A0D20-4F8E-443C-8F36-5DD854D188C2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BF9A0D20-4F8E-443C-8F36-5DD854D188C2}.Debug|x64.ActiveCfg = Debug|Any CPU + {BF9A0D20-4F8E-443C-8F36-5DD854D188C2}.Debug|x64.Build.0 = Debug|Any CPU + {BF9A0D20-4F8E-443C-8F36-5DD854D188C2}.Debug|x86.ActiveCfg = Debug|Any CPU + {BF9A0D20-4F8E-443C-8F36-5DD854D188C2}.Debug|x86.Build.0 = Debug|Any CPU + {BF9A0D20-4F8E-443C-8F36-5DD854D188C2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BF9A0D20-4F8E-443C-8F36-5DD854D188C2}.Release|Any CPU.Build.0 = Release|Any CPU + {BF9A0D20-4F8E-443C-8F36-5DD854D188C2}.Release|x64.ActiveCfg = Release|Any CPU + {BF9A0D20-4F8E-443C-8F36-5DD854D188C2}.Release|x64.Build.0 = Release|Any CPU + {BF9A0D20-4F8E-443C-8F36-5DD854D188C2}.Release|x86.ActiveCfg = Release|Any CPU + {BF9A0D20-4F8E-443C-8F36-5DD854D188C2}.Release|x86.Build.0 = Release|Any CPU + {9132960E-9496-4C77-BD80-A09A86814757}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9132960E-9496-4C77-BD80-A09A86814757}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9132960E-9496-4C77-BD80-A09A86814757}.Debug|x64.ActiveCfg = Debug|Any CPU + {9132960E-9496-4C77-BD80-A09A86814757}.Debug|x64.Build.0 = Debug|Any CPU + {9132960E-9496-4C77-BD80-A09A86814757}.Debug|x86.ActiveCfg = Debug|Any CPU + {9132960E-9496-4C77-BD80-A09A86814757}.Debug|x86.Build.0 = Debug|Any CPU + {9132960E-9496-4C77-BD80-A09A86814757}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9132960E-9496-4C77-BD80-A09A86814757}.Release|Any CPU.Build.0 = Release|Any CPU + {9132960E-9496-4C77-BD80-A09A86814757}.Release|x64.ActiveCfg = Release|Any CPU + {9132960E-9496-4C77-BD80-A09A86814757}.Release|x64.Build.0 = Release|Any CPU + {9132960E-9496-4C77-BD80-A09A86814757}.Release|x86.ActiveCfg = Release|Any CPU + {9132960E-9496-4C77-BD80-A09A86814757}.Release|x86.Build.0 = Release|Any CPU + {9B807641-8566-4382-AF8B-445D074105AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9B807641-8566-4382-AF8B-445D074105AD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9B807641-8566-4382-AF8B-445D074105AD}.Debug|x64.ActiveCfg = Debug|Any CPU + {9B807641-8566-4382-AF8B-445D074105AD}.Debug|x64.Build.0 = Debug|Any CPU + {9B807641-8566-4382-AF8B-445D074105AD}.Debug|x86.ActiveCfg = Debug|Any CPU + {9B807641-8566-4382-AF8B-445D074105AD}.Debug|x86.Build.0 = Debug|Any CPU + {9B807641-8566-4382-AF8B-445D074105AD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9B807641-8566-4382-AF8B-445D074105AD}.Release|Any CPU.Build.0 = Release|Any CPU + {9B807641-8566-4382-AF8B-445D074105AD}.Release|x64.ActiveCfg = Release|Any CPU + {9B807641-8566-4382-AF8B-445D074105AD}.Release|x64.Build.0 = Release|Any CPU + {9B807641-8566-4382-AF8B-445D074105AD}.Release|x86.ActiveCfg = Release|Any CPU + {9B807641-8566-4382-AF8B-445D074105AD}.Release|x86.Build.0 = Release|Any CPU + {683BBF59-C81F-4E04-BE33-E8806B40F766}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {683BBF59-C81F-4E04-BE33-E8806B40F766}.Debug|Any CPU.Build.0 = Debug|Any CPU + {683BBF59-C81F-4E04-BE33-E8806B40F766}.Debug|x64.ActiveCfg = Debug|Any CPU + {683BBF59-C81F-4E04-BE33-E8806B40F766}.Debug|x64.Build.0 = Debug|Any CPU + {683BBF59-C81F-4E04-BE33-E8806B40F766}.Debug|x86.ActiveCfg = Debug|Any CPU + {683BBF59-C81F-4E04-BE33-E8806B40F766}.Debug|x86.Build.0 = Debug|Any CPU + {683BBF59-C81F-4E04-BE33-E8806B40F766}.Release|Any CPU.ActiveCfg = Release|Any CPU + {683BBF59-C81F-4E04-BE33-E8806B40F766}.Release|Any CPU.Build.0 = Release|Any CPU + {683BBF59-C81F-4E04-BE33-E8806B40F766}.Release|x64.ActiveCfg = Release|Any CPU + {683BBF59-C81F-4E04-BE33-E8806B40F766}.Release|x64.Build.0 = Release|Any CPU + {683BBF59-C81F-4E04-BE33-E8806B40F766}.Release|x86.ActiveCfg = Release|Any CPU + {683BBF59-C81F-4E04-BE33-E8806B40F766}.Release|x86.Build.0 = Release|Any CPU + {8BC99846-DDDB-40E7-B062-308BF8A1239F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8BC99846-DDDB-40E7-B062-308BF8A1239F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8BC99846-DDDB-40E7-B062-308BF8A1239F}.Debug|x64.ActiveCfg = Debug|Any CPU + {8BC99846-DDDB-40E7-B062-308BF8A1239F}.Debug|x64.Build.0 = Debug|Any CPU + {8BC99846-DDDB-40E7-B062-308BF8A1239F}.Debug|x86.ActiveCfg = Debug|Any CPU + {8BC99846-DDDB-40E7-B062-308BF8A1239F}.Debug|x86.Build.0 = Debug|Any CPU + {8BC99846-DDDB-40E7-B062-308BF8A1239F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8BC99846-DDDB-40E7-B062-308BF8A1239F}.Release|Any CPU.Build.0 = Release|Any CPU + {8BC99846-DDDB-40E7-B062-308BF8A1239F}.Release|x64.ActiveCfg = Release|Any CPU + {8BC99846-DDDB-40E7-B062-308BF8A1239F}.Release|x64.Build.0 = Release|Any CPU + {8BC99846-DDDB-40E7-B062-308BF8A1239F}.Release|x86.ActiveCfg = Release|Any CPU + {8BC99846-DDDB-40E7-B062-308BF8A1239F}.Release|x86.Build.0 = Release|Any CPU + {B4247230-5289-4D17-BB0F-CB2FDBABA988}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B4247230-5289-4D17-BB0F-CB2FDBABA988}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B4247230-5289-4D17-BB0F-CB2FDBABA988}.Debug|x64.ActiveCfg = Debug|Any CPU + {B4247230-5289-4D17-BB0F-CB2FDBABA988}.Debug|x64.Build.0 = Debug|Any CPU + {B4247230-5289-4D17-BB0F-CB2FDBABA988}.Debug|x86.ActiveCfg = Debug|Any CPU + {B4247230-5289-4D17-BB0F-CB2FDBABA988}.Debug|x86.Build.0 = Debug|Any CPU + {B4247230-5289-4D17-BB0F-CB2FDBABA988}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B4247230-5289-4D17-BB0F-CB2FDBABA988}.Release|Any CPU.Build.0 = Release|Any CPU + {B4247230-5289-4D17-BB0F-CB2FDBABA988}.Release|x64.ActiveCfg = Release|Any CPU + {B4247230-5289-4D17-BB0F-CB2FDBABA988}.Release|x64.Build.0 = Release|Any CPU + {B4247230-5289-4D17-BB0F-CB2FDBABA988}.Release|x86.ActiveCfg = Release|Any CPU + {B4247230-5289-4D17-BB0F-CB2FDBABA988}.Release|x86.Build.0 = Release|Any CPU + {D2B5B5CA-57C2-4354-ADB7-47A6D81AD521}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D2B5B5CA-57C2-4354-ADB7-47A6D81AD521}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D2B5B5CA-57C2-4354-ADB7-47A6D81AD521}.Debug|x64.ActiveCfg = Debug|Any CPU + {D2B5B5CA-57C2-4354-ADB7-47A6D81AD521}.Debug|x64.Build.0 = Debug|Any CPU + {D2B5B5CA-57C2-4354-ADB7-47A6D81AD521}.Debug|x86.ActiveCfg = Debug|Any CPU + {D2B5B5CA-57C2-4354-ADB7-47A6D81AD521}.Debug|x86.Build.0 = Debug|Any CPU + {D2B5B5CA-57C2-4354-ADB7-47A6D81AD521}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D2B5B5CA-57C2-4354-ADB7-47A6D81AD521}.Release|Any CPU.Build.0 = Release|Any CPU + {D2B5B5CA-57C2-4354-ADB7-47A6D81AD521}.Release|x64.ActiveCfg = Release|Any CPU + {D2B5B5CA-57C2-4354-ADB7-47A6D81AD521}.Release|x64.Build.0 = Release|Any CPU + {D2B5B5CA-57C2-4354-ADB7-47A6D81AD521}.Release|x86.ActiveCfg = Release|Any CPU + {D2B5B5CA-57C2-4354-ADB7-47A6D81AD521}.Release|x86.Build.0 = Release|Any CPU + {8FAC191C-340D-47C6-B8AE-3D57783749C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8FAC191C-340D-47C6-B8AE-3D57783749C4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8FAC191C-340D-47C6-B8AE-3D57783749C4}.Debug|x64.ActiveCfg = Debug|Any CPU + {8FAC191C-340D-47C6-B8AE-3D57783749C4}.Debug|x64.Build.0 = Debug|Any CPU + {8FAC191C-340D-47C6-B8AE-3D57783749C4}.Debug|x86.ActiveCfg = Debug|Any CPU + {8FAC191C-340D-47C6-B8AE-3D57783749C4}.Debug|x86.Build.0 = Debug|Any CPU + {8FAC191C-340D-47C6-B8AE-3D57783749C4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8FAC191C-340D-47C6-B8AE-3D57783749C4}.Release|Any CPU.Build.0 = Release|Any CPU + {8FAC191C-340D-47C6-B8AE-3D57783749C4}.Release|x64.ActiveCfg = Release|Any CPU + {8FAC191C-340D-47C6-B8AE-3D57783749C4}.Release|x64.Build.0 = Release|Any CPU + {8FAC191C-340D-47C6-B8AE-3D57783749C4}.Release|x86.ActiveCfg = Release|Any CPU + {8FAC191C-340D-47C6-B8AE-3D57783749C4}.Release|x86.Build.0 = Release|Any CPU + {ED4AA905-A208-4E67-8B40-CC8E1B8440B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ED4AA905-A208-4E67-8B40-CC8E1B8440B8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ED4AA905-A208-4E67-8B40-CC8E1B8440B8}.Debug|x64.ActiveCfg = Debug|Any CPU + {ED4AA905-A208-4E67-8B40-CC8E1B8440B8}.Debug|x64.Build.0 = Debug|Any CPU + {ED4AA905-A208-4E67-8B40-CC8E1B8440B8}.Debug|x86.ActiveCfg = Debug|Any CPU + {ED4AA905-A208-4E67-8B40-CC8E1B8440B8}.Debug|x86.Build.0 = Debug|Any CPU + {ED4AA905-A208-4E67-8B40-CC8E1B8440B8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ED4AA905-A208-4E67-8B40-CC8E1B8440B8}.Release|Any CPU.Build.0 = Release|Any CPU + {ED4AA905-A208-4E67-8B40-CC8E1B8440B8}.Release|x64.ActiveCfg = Release|Any CPU + {ED4AA905-A208-4E67-8B40-CC8E1B8440B8}.Release|x64.Build.0 = Release|Any CPU + {ED4AA905-A208-4E67-8B40-CC8E1B8440B8}.Release|x86.ActiveCfg = Release|Any CPU + {ED4AA905-A208-4E67-8B40-CC8E1B8440B8}.Release|x86.Build.0 = Release|Any CPU + {02B1E8B4-CC53-4BAB-BC2C-AD0B06760AE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {02B1E8B4-CC53-4BAB-BC2C-AD0B06760AE2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {02B1E8B4-CC53-4BAB-BC2C-AD0B06760AE2}.Debug|x64.ActiveCfg = Debug|Any CPU + {02B1E8B4-CC53-4BAB-BC2C-AD0B06760AE2}.Debug|x64.Build.0 = Debug|Any CPU + {02B1E8B4-CC53-4BAB-BC2C-AD0B06760AE2}.Debug|x86.ActiveCfg = Debug|Any CPU + {02B1E8B4-CC53-4BAB-BC2C-AD0B06760AE2}.Debug|x86.Build.0 = Debug|Any CPU + {02B1E8B4-CC53-4BAB-BC2C-AD0B06760AE2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {02B1E8B4-CC53-4BAB-BC2C-AD0B06760AE2}.Release|Any CPU.Build.0 = Release|Any CPU + {02B1E8B4-CC53-4BAB-BC2C-AD0B06760AE2}.Release|x64.ActiveCfg = Release|Any CPU + {02B1E8B4-CC53-4BAB-BC2C-AD0B06760AE2}.Release|x64.Build.0 = Release|Any CPU + {02B1E8B4-CC53-4BAB-BC2C-AD0B06760AE2}.Release|x86.ActiveCfg = Release|Any CPU + {02B1E8B4-CC53-4BAB-BC2C-AD0B06760AE2}.Release|x86.Build.0 = Release|Any CPU + {35098BEA-A0B8-4E63-8D71-35CE5297B459}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {35098BEA-A0B8-4E63-8D71-35CE5297B459}.Debug|Any CPU.Build.0 = Debug|Any CPU + {35098BEA-A0B8-4E63-8D71-35CE5297B459}.Debug|x64.ActiveCfg = Debug|Any CPU + {35098BEA-A0B8-4E63-8D71-35CE5297B459}.Debug|x64.Build.0 = Debug|Any CPU + {35098BEA-A0B8-4E63-8D71-35CE5297B459}.Debug|x86.ActiveCfg = Debug|Any CPU + {35098BEA-A0B8-4E63-8D71-35CE5297B459}.Debug|x86.Build.0 = Debug|Any CPU + {35098BEA-A0B8-4E63-8D71-35CE5297B459}.Release|Any CPU.ActiveCfg = Release|Any CPU + {35098BEA-A0B8-4E63-8D71-35CE5297B459}.Release|Any CPU.Build.0 = Release|Any CPU + {35098BEA-A0B8-4E63-8D71-35CE5297B459}.Release|x64.ActiveCfg = Release|Any CPU + {35098BEA-A0B8-4E63-8D71-35CE5297B459}.Release|x64.Build.0 = Release|Any CPU + {35098BEA-A0B8-4E63-8D71-35CE5297B459}.Release|x86.ActiveCfg = Release|Any CPU + {35098BEA-A0B8-4E63-8D71-35CE5297B459}.Release|x86.Build.0 = Release|Any CPU + {D8317769-F140-4E5D-9041-19342A3A33BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D8317769-F140-4E5D-9041-19342A3A33BD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D8317769-F140-4E5D-9041-19342A3A33BD}.Debug|x64.ActiveCfg = Debug|Any CPU + {D8317769-F140-4E5D-9041-19342A3A33BD}.Debug|x64.Build.0 = Debug|Any CPU + {D8317769-F140-4E5D-9041-19342A3A33BD}.Debug|x86.ActiveCfg = Debug|Any CPU + {D8317769-F140-4E5D-9041-19342A3A33BD}.Debug|x86.Build.0 = Debug|Any CPU + {D8317769-F140-4E5D-9041-19342A3A33BD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D8317769-F140-4E5D-9041-19342A3A33BD}.Release|Any CPU.Build.0 = Release|Any CPU + {D8317769-F140-4E5D-9041-19342A3A33BD}.Release|x64.ActiveCfg = Release|Any CPU + {D8317769-F140-4E5D-9041-19342A3A33BD}.Release|x64.Build.0 = Release|Any CPU + {D8317769-F140-4E5D-9041-19342A3A33BD}.Release|x86.ActiveCfg = Release|Any CPU + {D8317769-F140-4E5D-9041-19342A3A33BD}.Release|x86.Build.0 = Release|Any CPU + {EC640FE3-1973-4348-B52B-E174F4E68FC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EC640FE3-1973-4348-B52B-E174F4E68FC8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EC640FE3-1973-4348-B52B-E174F4E68FC8}.Debug|x64.ActiveCfg = Debug|Any CPU + {EC640FE3-1973-4348-B52B-E174F4E68FC8}.Debug|x64.Build.0 = Debug|Any CPU + {EC640FE3-1973-4348-B52B-E174F4E68FC8}.Debug|x86.ActiveCfg = Debug|Any CPU + {EC640FE3-1973-4348-B52B-E174F4E68FC8}.Debug|x86.Build.0 = Debug|Any CPU + {EC640FE3-1973-4348-B52B-E174F4E68FC8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EC640FE3-1973-4348-B52B-E174F4E68FC8}.Release|Any CPU.Build.0 = Release|Any CPU + {EC640FE3-1973-4348-B52B-E174F4E68FC8}.Release|x64.ActiveCfg = Release|Any CPU + {EC640FE3-1973-4348-B52B-E174F4E68FC8}.Release|x64.Build.0 = Release|Any CPU + {EC640FE3-1973-4348-B52B-E174F4E68FC8}.Release|x86.ActiveCfg = Release|Any CPU + {EC640FE3-1973-4348-B52B-E174F4E68FC8}.Release|x86.Build.0 = Release|Any CPU + {ECFB5F58-39CA-4C62-9F16-51D7CD5D38AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ECFB5F58-39CA-4C62-9F16-51D7CD5D38AA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ECFB5F58-39CA-4C62-9F16-51D7CD5D38AA}.Debug|x64.ActiveCfg = Debug|Any CPU + {ECFB5F58-39CA-4C62-9F16-51D7CD5D38AA}.Debug|x64.Build.0 = Debug|Any CPU + {ECFB5F58-39CA-4C62-9F16-51D7CD5D38AA}.Debug|x86.ActiveCfg = Debug|Any CPU + {ECFB5F58-39CA-4C62-9F16-51D7CD5D38AA}.Debug|x86.Build.0 = Debug|Any CPU + {ECFB5F58-39CA-4C62-9F16-51D7CD5D38AA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ECFB5F58-39CA-4C62-9F16-51D7CD5D38AA}.Release|Any CPU.Build.0 = Release|Any CPU + {ECFB5F58-39CA-4C62-9F16-51D7CD5D38AA}.Release|x64.ActiveCfg = Release|Any CPU + {ECFB5F58-39CA-4C62-9F16-51D7CD5D38AA}.Release|x64.Build.0 = Release|Any CPU + {ECFB5F58-39CA-4C62-9F16-51D7CD5D38AA}.Release|x86.ActiveCfg = Release|Any CPU + {ECFB5F58-39CA-4C62-9F16-51D7CD5D38AA}.Release|x86.Build.0 = Release|Any CPU + {1D887E40-DF88-4126-8202-8D7DA8EB48CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1D887E40-DF88-4126-8202-8D7DA8EB48CE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1D887E40-DF88-4126-8202-8D7DA8EB48CE}.Debug|x64.ActiveCfg = Debug|Any CPU + {1D887E40-DF88-4126-8202-8D7DA8EB48CE}.Debug|x64.Build.0 = Debug|Any CPU + {1D887E40-DF88-4126-8202-8D7DA8EB48CE}.Debug|x86.ActiveCfg = Debug|Any CPU + {1D887E40-DF88-4126-8202-8D7DA8EB48CE}.Debug|x86.Build.0 = Debug|Any CPU + {1D887E40-DF88-4126-8202-8D7DA8EB48CE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1D887E40-DF88-4126-8202-8D7DA8EB48CE}.Release|Any CPU.Build.0 = Release|Any CPU + {1D887E40-DF88-4126-8202-8D7DA8EB48CE}.Release|x64.ActiveCfg = Release|Any CPU + {1D887E40-DF88-4126-8202-8D7DA8EB48CE}.Release|x64.Build.0 = Release|Any CPU + {1D887E40-DF88-4126-8202-8D7DA8EB48CE}.Release|x86.ActiveCfg = Release|Any CPU + {1D887E40-DF88-4126-8202-8D7DA8EB48CE}.Release|x86.Build.0 = Release|Any CPU + {64FB5D1D-A725-4148-ABE8-60EC93DF66E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {64FB5D1D-A725-4148-ABE8-60EC93DF66E5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {64FB5D1D-A725-4148-ABE8-60EC93DF66E5}.Debug|x64.ActiveCfg = Debug|Any CPU + {64FB5D1D-A725-4148-ABE8-60EC93DF66E5}.Debug|x64.Build.0 = Debug|Any CPU + {64FB5D1D-A725-4148-ABE8-60EC93DF66E5}.Debug|x86.ActiveCfg = Debug|Any CPU + {64FB5D1D-A725-4148-ABE8-60EC93DF66E5}.Debug|x86.Build.0 = Debug|Any CPU + {64FB5D1D-A725-4148-ABE8-60EC93DF66E5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {64FB5D1D-A725-4148-ABE8-60EC93DF66E5}.Release|Any CPU.Build.0 = Release|Any CPU + {64FB5D1D-A725-4148-ABE8-60EC93DF66E5}.Release|x64.ActiveCfg = Release|Any CPU + {64FB5D1D-A725-4148-ABE8-60EC93DF66E5}.Release|x64.Build.0 = Release|Any CPU + {64FB5D1D-A725-4148-ABE8-60EC93DF66E5}.Release|x86.ActiveCfg = Release|Any CPU + {64FB5D1D-A725-4148-ABE8-60EC93DF66E5}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {405C2850-2435-4C27-84BA-9DE3BC1DF68B} = {673D0A1A-EFEA-4541-942B-6C1FE704EC56} + {8AF502A3-CF1D-4619-B169-517F157951DF} = {405C2850-2435-4C27-84BA-9DE3BC1DF68B} + {1C30C2E9-A3C4-41D5-B2A2-25C1DDE33F3A} = {405C2850-2435-4C27-84BA-9DE3BC1DF68B} + {0EBEA705-79DC-497A-B4A2-FCCFB012EA65} = {405C2850-2435-4C27-84BA-9DE3BC1DF68B} + {88359036-4F35-487C-BF2C-4F31C7BC92D8} = {5EE323DE-E69B-451A-8AC3-22DD6A004FBA} + {983EFD08-2256-4361-A869-23EB872328CB} = {88359036-4F35-487C-BF2C-4F31C7BC92D8} + {96A39EA3-6772-409E-AF0B-C5A35A1A13CC} = {942CFA92-D15D-4CF8-87C9-0B9B727E5E22} + {CE19355C-6355-405F-A640-908AE4F83C2C} = {942CFA92-D15D-4CF8-87C9-0B9B727E5E22} + {37ABC463-BAF5-4B5E-9A55-2BF12B0C144A} = {3A68BD5F-FE8D-4CD4-A039-3EFBDEDE8865} + {B05E67FF-294D-4871-A5EF-8BA762951476} = {37ABC463-BAF5-4B5E-9A55-2BF12B0C144A} + {87A29B00-48EB-40BC-B532-7EDC17604BB3} = {37ABC463-BAF5-4B5E-9A55-2BF12B0C144A} + {9B07B6E9-428A-42F7-AFB1-B23755A409EE} = {5EE323DE-E69B-451A-8AC3-22DD6A004FBA} + {BF9A0D20-4F8E-443C-8F36-5DD854D188C2} = {9B07B6E9-428A-42F7-AFB1-B23755A409EE} + {9132960E-9496-4C77-BD80-A09A86814757} = {9B07B6E9-428A-42F7-AFB1-B23755A409EE} + {942CFA92-D15D-4CF8-87C9-0B9B727E5E22} = {88359036-4F35-487C-BF2C-4F31C7BC92D8} + {3A68BD5F-FE8D-4CD4-A039-3EFBDEDE8865} = {88359036-4F35-487C-BF2C-4F31C7BC92D8} + {CE1D5F5A-B348-423E-9B5E-1A805BFB199F} = {5EE323DE-E69B-451A-8AC3-22DD6A004FBA} + {9B807641-8566-4382-AF8B-445D074105AD} = {CE1D5F5A-B348-423E-9B5E-1A805BFB199F} + {683BBF59-C81F-4E04-BE33-E8806B40F766} = {CE1D5F5A-B348-423E-9B5E-1A805BFB199F} + {2E9CFB92-E8E5-4466-8410-CCB5BA5CB6D1} = {5EE323DE-E69B-451A-8AC3-22DD6A004FBA} + {8BC99846-DDDB-40E7-B062-308BF8A1239F} = {2E9CFB92-E8E5-4466-8410-CCB5BA5CB6D1} + {B4247230-5289-4D17-BB0F-CB2FDBABA988} = {2E9CFB92-E8E5-4466-8410-CCB5BA5CB6D1} + {74EFCDE2-CB0F-49B1-9CEC-BE748EB1FBF7} = {88359036-4F35-487C-BF2C-4F31C7BC92D8} + {D2B5B5CA-57C2-4354-ADB7-47A6D81AD521} = {74EFCDE2-CB0F-49B1-9CEC-BE748EB1FBF7} + {8FAC191C-340D-47C6-B8AE-3D57783749C4} = {74EFCDE2-CB0F-49B1-9CEC-BE748EB1FBF7} + {21A29AA0-EF82-4717-89CE-729257C05C7D} = {5EE323DE-E69B-451A-8AC3-22DD6A004FBA} + {ED4AA905-A208-4E67-8B40-CC8E1B8440B8} = {21A29AA0-EF82-4717-89CE-729257C05C7D} + {02B1E8B4-CC53-4BAB-BC2C-AD0B06760AE2} = {21A29AA0-EF82-4717-89CE-729257C05C7D} + {91929C7C-D9AE-B5BA-2467-C9FCAEC69696} = {5EE323DE-E69B-451A-8AC3-22DD6A004FBA} + {35098BEA-A0B8-4E63-8D71-35CE5297B459} = {91929C7C-D9AE-B5BA-2467-C9FCAEC69696} + {D8317769-F140-4E5D-9041-19342A3A33BD} = {91929C7C-D9AE-B5BA-2467-C9FCAEC69696} + {EC640FE3-1973-4348-B52B-E174F4E68FC8} = {B8EFCA5F-814F-285C-A8CB-F00F14650265} + {ECFB5F58-39CA-4C62-9F16-51D7CD5D38AA} = {B8EFCA5F-814F-285C-A8CB-F00F14650265} + {1D887E40-DF88-4126-8202-8D7DA8EB48CE} = {B8EFCA5F-814F-285C-A8CB-F00F14650265} + {64FB5D1D-A725-4148-ABE8-60EC93DF66E5} = {B8EFCA5F-814F-285C-A8CB-F00F14650265} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {17607E2C-4E8E-45A2-85BD-0A5808E1C0F3} + EndGlobalSection +EndGlobal diff --git a/Source/EventFlow.EntityFramework.Tests/EntityFrameworkTestExtensions.cs b/Source/EventFlow.EntityFramework.Tests/EntityFrameworkTestExtensions.cs index b7b77e57a..97327ba39 100644 --- a/Source/EventFlow.EntityFramework.Tests/EntityFrameworkTestExtensions.cs +++ b/Source/EventFlow.EntityFramework.Tests/EntityFrameworkTestExtensions.cs @@ -35,13 +35,15 @@ public static class EntityFrameworkTestExtensions public static IEventFlowOptions ConfigureForEventStoreTest(this IEventFlowOptions options) { return options - .UseEntityFrameworkEventStore(); + .UseEntityFrameworkEventStore() + .AddNewtonsoftJson(); } public static IEventFlowOptions ConfigureForSnapshotStoreTest(this IEventFlowOptions options) { return options - .UseEntityFrameworkSnapshotStore(); + .UseEntityFrameworkSnapshotStore() + .AddNewtonsoftJson(); } public static IEventFlowOptions ConfigureForReadStoreTest(this IEventFlowOptions options) @@ -53,14 +55,16 @@ public static IEventFlowOptions ConfigureForReadStoreTest(this IEventFlowOptions .AddQueryHandlers( typeof(EfThingyGetQueryHandler), typeof(EfThingyGetVersionQueryHandler), - typeof(EfThingyGetMessagesQueryHandler)); + typeof(EfThingyGetMessagesQueryHandler)) + .AddNewtonsoftJson(); } public static IEventFlowOptions ConfigureForReadStoreIncludeTest(this IEventFlowOptions options) { return options .UseEntityFrameworkReadModel(cfg => cfg.Include(x => x.Addresses)) - .AddQueryHandlers(typeof(PersonGetQueryHandler)); + .AddQueryHandlers(typeof(PersonGetQueryHandler)) + .AddNewtonsoftJson(); } } } \ No newline at end of file diff --git a/Source/EventFlow.Examples.Shipping.Queries.InMemory/EventFlow.Examples.Shipping.Queries.InMemory.csproj b/Source/EventFlow.Examples.Shipping.Queries.InMemory/EventFlow.Examples.Shipping.Queries.InMemory.csproj index 58454617d..201914c6f 100644 --- a/Source/EventFlow.Examples.Shipping.Queries.InMemory/EventFlow.Examples.Shipping.Queries.InMemory.csproj +++ b/Source/EventFlow.Examples.Shipping.Queries.InMemory/EventFlow.Examples.Shipping.Queries.InMemory.csproj @@ -5,5 +5,6 @@ + \ No newline at end of file diff --git a/Source/EventFlow.Examples.Shipping.Queries.InMemory/EventFlowExamplesShippingQueriesInMemory.cs b/Source/EventFlow.Examples.Shipping.Queries.InMemory/EventFlowExamplesShippingQueriesInMemory.cs index ff34739d8..4f7403fb8 100644 --- a/Source/EventFlow.Examples.Shipping.Queries.InMemory/EventFlowExamplesShippingQueriesInMemory.cs +++ b/Source/EventFlow.Examples.Shipping.Queries.InMemory/EventFlowExamplesShippingQueriesInMemory.cs @@ -37,7 +37,8 @@ public static IEventFlowOptions ConfigureShippingQueriesInMemory( return eventFlowOptions .AddQueryHandlers(Assembly) .UseInMemoryReadStoreFor() - .UseInMemoryReadStoreFor(); + .UseInMemoryReadStoreFor() + .AddNewtonsoftJson(); } } } \ No newline at end of file diff --git a/Source/EventFlow.Examples.Shipping/Domain/Model/CargoModel/CargoId.cs b/Source/EventFlow.Examples.Shipping/Domain/Model/CargoModel/CargoId.cs index c69f21c3c..feffe694d 100644 --- a/Source/EventFlow.Examples.Shipping/Domain/Model/CargoModel/CargoId.cs +++ b/Source/EventFlow.Examples.Shipping/Domain/Model/CargoModel/CargoId.cs @@ -22,11 +22,9 @@ using EventFlow.Core; using EventFlow.ValueObjects; -using Newtonsoft.Json; namespace EventFlow.Examples.Shipping.Domain.Model.CargoModel { - [JsonConverter(typeof(SingleValueObjectConverter))] public class CargoId : Identity { public CargoId(string value) : base(value) diff --git a/Source/EventFlow.Examples.Shipping/Domain/Model/CargoModel/Entities/TransportLegId.cs b/Source/EventFlow.Examples.Shipping/Domain/Model/CargoModel/Entities/TransportLegId.cs index aaa1f9adb..302fc2f00 100644 --- a/Source/EventFlow.Examples.Shipping/Domain/Model/CargoModel/Entities/TransportLegId.cs +++ b/Source/EventFlow.Examples.Shipping/Domain/Model/CargoModel/Entities/TransportLegId.cs @@ -22,11 +22,9 @@ using EventFlow.Core; using EventFlow.ValueObjects; -using Newtonsoft.Json; namespace EventFlow.Examples.Shipping.Domain.Model.CargoModel.Entities { - [JsonConverter(typeof(SingleValueObjectConverter))] public class TransportLegId : Identity { public TransportLegId(string value) : base(value) diff --git a/Source/EventFlow.Examples.Shipping/Domain/Model/LocationModel/LocationId.cs b/Source/EventFlow.Examples.Shipping/Domain/Model/LocationModel/LocationId.cs index ba46d4439..89c1b2d5b 100644 --- a/Source/EventFlow.Examples.Shipping/Domain/Model/LocationModel/LocationId.cs +++ b/Source/EventFlow.Examples.Shipping/Domain/Model/LocationModel/LocationId.cs @@ -24,11 +24,9 @@ using System.Text.RegularExpressions; using EventFlow.Core; using EventFlow.ValueObjects; -using Newtonsoft.Json; namespace EventFlow.Examples.Shipping.Domain.Model.LocationModel { - [JsonConverter(typeof(SingleValueObjectConverter))] public class LocationId : SingleValueObject, IIdentity { private static readonly Regex ValidValues = new Regex("[a-zA-Z]{2}[a-zA-Z2-9]{3}", RegexOptions.Compiled); diff --git a/Source/EventFlow.Examples.Shipping/Domain/Model/VoyageModel/VoyageId.cs b/Source/EventFlow.Examples.Shipping/Domain/Model/VoyageModel/VoyageId.cs index 4e0477dea..257917689 100644 --- a/Source/EventFlow.Examples.Shipping/Domain/Model/VoyageModel/VoyageId.cs +++ b/Source/EventFlow.Examples.Shipping/Domain/Model/VoyageModel/VoyageId.cs @@ -22,11 +22,9 @@ using EventFlow.Core; using EventFlow.ValueObjects; -using Newtonsoft.Json; namespace EventFlow.Examples.Shipping.Domain.Model.VoyageModel { - [JsonConverter(typeof(SingleValueObjectConverter))] public class VoyageId : SingleValueObject, IIdentity { public VoyageId(string value) : base(value) diff --git a/Source/EventFlow.MongoDB/ValueObjects/MongoDbEventDataModel.cs b/Source/EventFlow.MongoDB/ValueObjects/MongoDbEventDataModel.cs index 4eb4e4aab..576b05e8e 100644 --- a/Source/EventFlow.MongoDB/ValueObjects/MongoDbEventDataModel.cs +++ b/Source/EventFlow.MongoDB/ValueObjects/MongoDbEventDataModel.cs @@ -25,7 +25,6 @@ using EventFlow.ValueObjects; using MongoDB.Bson; using MongoDB.Bson.Serialization.Attributes; -using Newtonsoft.Json; namespace EventFlow.MongoDB.ValueObjects { @@ -34,25 +33,19 @@ public class MongoDbEventDataModel : ValueObject, ICommittedDomainEvent [BsonElement("_id")] public long _id { get; set; } - [JsonProperty("batchId")] [BsonGuidRepresentation(GuidRepresentation.Standard)] public Guid BatchId { get; set; } long? _version { get; set; } - [JsonProperty("aggregateId")] public string AggregateId { get; set; } - [JsonProperty("aggregateName")] public string AggregateName { get; set; } - [JsonProperty("aggregateSequenceNumber")] public int AggregateSequenceNumber { get; set; } - [JsonProperty("data")] public string Data { get; set; } - [JsonProperty("metaData")] public string Metadata { get; set; } } } diff --git a/Source/EventFlow.MongoDB/ValueObjects/MongoDbSnapshotDataModel.cs b/Source/EventFlow.MongoDB/ValueObjects/MongoDbSnapshotDataModel.cs index 50839c68d..9168caa4f 100644 --- a/Source/EventFlow.MongoDB/ValueObjects/MongoDbSnapshotDataModel.cs +++ b/Source/EventFlow.MongoDB/ValueObjects/MongoDbSnapshotDataModel.cs @@ -23,7 +23,6 @@ using EventFlow.ValueObjects; using MongoDB.Bson; using MongoDB.Bson.Serialization.Attributes; -using Newtonsoft.Json; namespace EventFlow.MongoDB.ValueObjects { @@ -32,15 +31,10 @@ public class MongoDbSnapshotDataModel : ValueObject [BsonElement("_id")] public ObjectId _id { get; set; } long? _version { get; set; } - [JsonProperty("aggregateId")] public string AggregateId { get; set; } - [JsonProperty("aggregateName")] public string AggregateName { get; set; } - [JsonProperty("aggregateSequenceNumber")] public int AggregateSequenceNumber { get; set; } - [JsonProperty("data")] public string Data { get; set; } - [JsonProperty("metaData")] public string Metadata { get; set; } } } diff --git a/Source/EventFlow.MsSql.Tests/IntegrationTests/ReadStores/ReadModels/MultipleMsSqlDatabasesTests.cs b/Source/EventFlow.MsSql.Tests/IntegrationTests/ReadStores/ReadModels/MultipleMsSqlDatabasesTests.cs index 1f0879522..55024df48 100644 --- a/Source/EventFlow.MsSql.Tests/IntegrationTests/ReadStores/ReadModels/MultipleMsSqlDatabasesTests.cs +++ b/Source/EventFlow.MsSql.Tests/IntegrationTests/ReadStores/ReadModels/MultipleMsSqlDatabasesTests.cs @@ -74,6 +74,7 @@ [MagicId] ASC )"); _serviceProvider = EventFlowOptions.New() + .AddNewtonsoftJson() .AddEvents(new []{typeof(MagicEvent)}) .AddCommands(new []{typeof(MagicCommand)}) .AddCommandHandlers(typeof(MagicCommandHandler)) diff --git a/Source/EventFlow.RabbitMQ.Tests/Integration/RabbitMqTests.cs b/Source/EventFlow.RabbitMQ.Tests/Integration/RabbitMqTests.cs index aef439d1c..9e83b00df 100644 --- a/Source/EventFlow.RabbitMQ.Tests/Integration/RabbitMqTests.cs +++ b/Source/EventFlow.RabbitMQ.Tests/Integration/RabbitMqTests.cs @@ -157,7 +157,8 @@ private IServiceProvider BuildProvider(Exchange exchange, Func c.AddTransient())); + .RegisterServices(c => c.AddTransient())) + .AddNewtonsoftJson(); return eventFlowOptions.ServiceCollection.BuildServiceProvider(); } diff --git a/Source/EventFlow.Serialization.NewtonsoftJson.Tests/EventFlow.Serialization.NewtonsoftJson.Tests.csproj b/Source/EventFlow.Serialization.NewtonsoftJson.Tests/EventFlow.Serialization.NewtonsoftJson.Tests.csproj new file mode 100644 index 000000000..5de979e20 --- /dev/null +++ b/Source/EventFlow.Serialization.NewtonsoftJson.Tests/EventFlow.Serialization.NewtonsoftJson.Tests.csproj @@ -0,0 +1,15 @@ + + + netcoreapp3.1;net6.0;net8.0;net10.0 + False + + + + + + + + + + + diff --git a/Source/EventFlow.Serialization.NewtonsoftJson.Tests/NewtonsoftJsonSerializerTests.cs b/Source/EventFlow.Serialization.NewtonsoftJson.Tests/NewtonsoftJsonSerializerTests.cs new file mode 100644 index 000000000..c37a097da --- /dev/null +++ b/Source/EventFlow.Serialization.NewtonsoftJson.Tests/NewtonsoftJsonSerializerTests.cs @@ -0,0 +1,92 @@ +// The MIT License (MIT) +// +// Copyright (c) 2015-2025 Rasmus Mikkelsen +// https://github.com/eventflow/EventFlow +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal in +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +// the Software, and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +using EventFlow.Core; +using EventFlow.TestHelpers.Suites; +using Newtonsoft.Json; +using NUnit.Framework; +using Shouldly; + +namespace EventFlow.Serialization.NewtonsoftJson.Tests +{ + [TestFixture] + public class NewtonsoftJsonSerializerTests : TestSuiteForJsonSerializer + { + protected override IJsonSerializer CreateSerializer() + { + return new NewtonsoftJsonSerializer(); + } + + [Test] + public void JsonProperty_RenamesPropertyOnSerialize() + { + var sut = CreateSerializer(); + + var json = sut.Serialize(new WithAttributes {Renamed = "value"}); + + json.ShouldContain("\"custom_name\""); + json.ShouldNotContain(nameof(WithAttributes.Renamed)); + } + + [Test] + public void JsonProperty_RenamedPropertyRoundTrips() + { + var sut = CreateSerializer(); + + var json = sut.Serialize(new WithAttributes {Renamed = "value"}); + var result = sut.Deserialize(json); + + result.Renamed.ShouldBe("value"); + } + + [Test] + public void JsonIgnore_OmitsPropertyOnSerialize() + { + var sut = CreateSerializer(); + + var json = sut.Serialize(new WithAttributes {Ignored = "secret"}); + + json.ShouldNotContain("secret"); + json.ShouldNotContain(nameof(WithAttributes.Ignored)); + } + + [Test] + public void JsonIgnore_IgnoredPropertyIsNotRestoredOnDeserialize() + { + var sut = CreateSerializer(); + + var json = sut.Serialize(new WithAttributes {Ignored = "secret"}); + var result = sut.Deserialize(json); + + result.Ignored.ShouldBeNull(); + } + + public class WithAttributes + { + [JsonProperty("custom_name")] + public string Renamed { get; set; } + + [JsonIgnore] + public string Ignored { get; set; } + } + } +} diff --git a/Source/EventFlow.Tests/UnitTests/ValueObjects/SingleValueObjectConverterTests.cs b/Source/EventFlow.Serialization.NewtonsoftJson.Tests/SingleValueObjectConverterTests.cs similarity index 98% rename from Source/EventFlow.Tests/UnitTests/ValueObjects/SingleValueObjectConverterTests.cs rename to Source/EventFlow.Serialization.NewtonsoftJson.Tests/SingleValueObjectConverterTests.cs index 26c742cc6..130d2b7dd 100644 --- a/Source/EventFlow.Tests/UnitTests/ValueObjects/SingleValueObjectConverterTests.cs +++ b/Source/EventFlow.Serialization.NewtonsoftJson.Tests/SingleValueObjectConverterTests.cs @@ -26,7 +26,7 @@ using NUnit.Framework; using Shouldly; -namespace EventFlow.Tests.UnitTests.ValueObjects +namespace EventFlow.Serialization.NewtonsoftJson.Tests { [Category(Categories.Unit)] public class SingleValueObjectConverterTests diff --git a/Source/EventFlow.Serialization.NewtonsoftJson/EventFlow.Serialization.NewtonsoftJson.csproj b/Source/EventFlow.Serialization.NewtonsoftJson/EventFlow.Serialization.NewtonsoftJson.csproj new file mode 100644 index 000000000..03792e7e2 --- /dev/null +++ b/Source/EventFlow.Serialization.NewtonsoftJson/EventFlow.Serialization.NewtonsoftJson.csproj @@ -0,0 +1,22 @@ + + + netstandard2.1;netcoreapp3.1;net6.0;net8.0;net10.0 + EventFlow.Serialization.NewtonsoftJson + Newtonsoft.Json based JSON serializer for EventFlow - https://docs.geteventflow.net/ + CQRS ES event sourcing json newtonsoft + UPDATED BY BUILD + bin\$(Configuration)\$(TargetFramework)\EventFlow.Serialization.NewtonsoftJson.xml + true + + + + + + + + + + + + + diff --git a/Source/EventFlow/Extensions/EventFlowOptionsJsonConfigurationExtensions.cs b/Source/EventFlow.Serialization.NewtonsoftJson/Extensions/EventFlowOptionsNewtonsoftJsonExtensions.cs similarity index 73% rename from Source/EventFlow/Extensions/EventFlowOptionsJsonConfigurationExtensions.cs rename to Source/EventFlow.Serialization.NewtonsoftJson/Extensions/EventFlowOptionsNewtonsoftJsonExtensions.cs index eb9651b96..99767f7e1 100644 --- a/Source/EventFlow/Extensions/EventFlowOptionsJsonConfigurationExtensions.cs +++ b/Source/EventFlow.Serialization.NewtonsoftJson/Extensions/EventFlowOptionsNewtonsoftJsonExtensions.cs @@ -1,18 +1,18 @@ // The MIT License (MIT) -// +// // Copyright (c) 2015-2025 Rasmus Mikkelsen // https://github.com/eventflow/EventFlow -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of // the Software, and to permit persons to whom the Software is furnished to do so, // subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR @@ -21,25 +21,22 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. using System; -using EventFlow.Configuration.Serialization; +using EventFlow.Core; +using EventFlow.Serialization.NewtonsoftJson; using Microsoft.Extensions.DependencyInjection; +using Newtonsoft.Json; namespace EventFlow.Extensions { - public static class EventFlowOptionsJsonConfigurationExtensions + public static class EventFlowOptionsNewtonsoftJsonExtensions { - public static IEventFlowOptions ConfigureJson( + public static IEventFlowOptions AddNewtonsoftJson( this IEventFlowOptions eventFlowOptions, - Func configure) + Action configure = null) { - if (configure == null) - { - throw new ArgumentNullException(nameof(configure)); - } - - var config = configure(JsonOptions.New); - eventFlowOptions.ServiceCollection.AddTransient(_ => config); + eventFlowOptions.ServiceCollection + .AddSingleton(_ => new NewtonsoftJsonSerializer(configure)); return eventFlowOptions; } } -} \ No newline at end of file +} diff --git a/Source/EventFlow/Core/JsonSerializer.cs b/Source/EventFlow.Serialization.NewtonsoftJson/NewtonsoftJsonSerializer.cs similarity index 72% rename from Source/EventFlow/Core/JsonSerializer.cs rename to Source/EventFlow.Serialization.NewtonsoftJson/NewtonsoftJsonSerializer.cs index d81c7cd6f..ea6fef290 100644 --- a/Source/EventFlow/Core/JsonSerializer.cs +++ b/Source/EventFlow.Serialization.NewtonsoftJson/NewtonsoftJsonSerializer.cs @@ -1,18 +1,18 @@ // The MIT License (MIT) -// +// // Copyright (c) 2015-2025 Rasmus Mikkelsen // https://github.com/eventflow/EventFlow -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of // the Software, and to permit persons to whom the Software is furnished to do so, // subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR @@ -21,23 +21,28 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. using System; -using EventFlow.Configuration.Serialization; +using EventFlow.Core; using Newtonsoft.Json; -namespace EventFlow.Core +namespace EventFlow.Serialization.NewtonsoftJson { - public class JsonSerializer : IJsonSerializer + public class NewtonsoftJsonSerializer : IJsonSerializer { - private readonly JsonSerializerSettings _settingsNotIndented = new JsonSerializerSettings(); - private readonly JsonSerializerSettings _settingsIndented = new JsonSerializerSettings(); + private readonly JsonSerializerSettings _settingsIndented; + private readonly JsonSerializerSettings _settingsNotIndented; - public JsonSerializer(IJsonOptions options = null) + public NewtonsoftJsonSerializer(Action configure = null) { - options?.Apply(_settingsIndented); - options?.Apply(_settingsNotIndented); + _settingsIndented = CreateSettings(configure, Formatting.Indented); + _settingsNotIndented = CreateSettings(configure, Formatting.None); + } - _settingsIndented.Formatting = Formatting.Indented; - _settingsNotIndented.Formatting = Formatting.None; + private static JsonSerializerSettings CreateSettings(Action configure, Formatting formatting) + { + var settings = new JsonSerializerSettings(); + configure?.Invoke(settings); + settings.Formatting = formatting; + return settings; } public string Serialize(object obj, bool indented = false) @@ -56,4 +61,4 @@ public T Deserialize(string json) return JsonConvert.DeserializeObject(json, _settingsNotIndented); } } -} \ No newline at end of file +} diff --git a/Source/EventFlow/ValueObjects/SingleValueObjectConverter.cs b/Source/EventFlow.Serialization.NewtonsoftJson/SingleValueObjectConverter.cs similarity index 92% rename from Source/EventFlow/ValueObjects/SingleValueObjectConverter.cs rename to Source/EventFlow.Serialization.NewtonsoftJson/SingleValueObjectConverter.cs index 856283d52..eadd5e217 100644 --- a/Source/EventFlow/ValueObjects/SingleValueObjectConverter.cs +++ b/Source/EventFlow.Serialization.NewtonsoftJson/SingleValueObjectConverter.cs @@ -1,18 +1,18 @@ // The MIT License (MIT) -// +// // Copyright (c) 2015-2025 Rasmus Mikkelsen // https://github.com/eventflow/EventFlow -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of // the Software, and to permit persons to whom the Software is furnished to do so, // subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR @@ -24,15 +24,16 @@ using System.Collections.Concurrent; using System.Linq; using System.Reflection; +using EventFlow.ValueObjects; using Newtonsoft.Json; -namespace EventFlow.ValueObjects +namespace EventFlow.Serialization.NewtonsoftJson { public class SingleValueObjectConverter : JsonConverter { private static readonly ConcurrentDictionary ConstructorArgumentTypes = new ConcurrentDictionary(); - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + public override void WriteJson(JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer) { if (!(value is ISingleValueObject singleValueObject)) { @@ -42,7 +43,7 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s serializer.Serialize(writer, singleValueObject.GetValue()); } - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer) { if (reader.Value == null) { @@ -68,4 +69,4 @@ public override bool CanConvert(Type objectType) return typeof(ISingleValueObject).GetTypeInfo().IsAssignableFrom(objectType); } } -} \ No newline at end of file +} diff --git a/Source/EventFlow.Serialization.SystemTextJson.Tests/EventFlow.Serialization.SystemTextJson.Tests.csproj b/Source/EventFlow.Serialization.SystemTextJson.Tests/EventFlow.Serialization.SystemTextJson.Tests.csproj new file mode 100644 index 000000000..247f49990 --- /dev/null +++ b/Source/EventFlow.Serialization.SystemTextJson.Tests/EventFlow.Serialization.SystemTextJson.Tests.csproj @@ -0,0 +1,15 @@ + + + netcoreapp3.1;net6.0;net8.0;net10.0 + False + + + + + + + + + + + diff --git a/Source/EventFlow.Serialization.SystemTextJson.Tests/SystemTextJsonSerializerTests.cs b/Source/EventFlow.Serialization.SystemTextJson.Tests/SystemTextJsonSerializerTests.cs new file mode 100644 index 000000000..876a6dbfe --- /dev/null +++ b/Source/EventFlow.Serialization.SystemTextJson.Tests/SystemTextJsonSerializerTests.cs @@ -0,0 +1,92 @@ +// The MIT License (MIT) +// +// Copyright (c) 2015-2025 Rasmus Mikkelsen +// https://github.com/eventflow/EventFlow +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal in +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +// the Software, and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +using System.Text.Json.Serialization; +using EventFlow.Core; +using EventFlow.TestHelpers.Suites; +using NUnit.Framework; +using Shouldly; + +namespace EventFlow.Serialization.SystemTextJson.Tests +{ + [TestFixture] + public class SystemTextJsonSerializerTests : TestSuiteForJsonSerializer + { + protected override IJsonSerializer CreateSerializer() + { + return new SystemTextJsonSerializer(); + } + + [Test] + public void JsonPropertyName_RenamesPropertyOnSerialize() + { + var sut = CreateSerializer(); + + var json = sut.Serialize(new WithAttributes {Renamed = "value"}); + + json.ShouldContain("\"custom_name\""); + json.ShouldNotContain(nameof(WithAttributes.Renamed)); + } + + [Test] + public void JsonPropertyName_RenamedPropertyRoundTrips() + { + var sut = CreateSerializer(); + + var json = sut.Serialize(new WithAttributes {Renamed = "value"}); + var result = sut.Deserialize(json); + + result.Renamed.ShouldBe("value"); + } + + [Test] + public void JsonIgnore_OmitsPropertyOnSerialize() + { + var sut = CreateSerializer(); + + var json = sut.Serialize(new WithAttributes {Ignored = "secret"}); + + json.ShouldNotContain("secret"); + json.ShouldNotContain(nameof(WithAttributes.Ignored)); + } + + [Test] + public void JsonIgnore_IgnoredPropertyIsNotRestoredOnDeserialize() + { + var sut = CreateSerializer(); + + var json = sut.Serialize(new WithAttributes {Ignored = "secret"}); + var result = sut.Deserialize(json); + + result.Ignored.ShouldBeNull(); + } + + public class WithAttributes + { + [JsonPropertyName("custom_name")] + public string Renamed { get; set; } + + [JsonIgnore] + public string Ignored { get; set; } + } + } +} diff --git a/Source/EventFlow.Serialization.SystemTextJson/EventFlow.Serialization.SystemTextJson.csproj b/Source/EventFlow.Serialization.SystemTextJson/EventFlow.Serialization.SystemTextJson.csproj new file mode 100644 index 000000000..050e88ae4 --- /dev/null +++ b/Source/EventFlow.Serialization.SystemTextJson/EventFlow.Serialization.SystemTextJson.csproj @@ -0,0 +1,25 @@ + + + netstandard2.1;netcoreapp3.1;net6.0;net8.0;net10.0 + EventFlow.Serialization.SystemTextJson + System.Text.Json based JSON serializer for EventFlow - https://docs.geteventflow.net/ + CQRS ES event sourcing json system.text.json + UPDATED BY BUILD + bin\$(Configuration)\$(TargetFramework)\EventFlow.Serialization.SystemTextJson.xml + true + + + + + + + + + + + + + + + + diff --git a/Source/EventFlow/Configuration/Serialization/ChainedJsonOptions.cs b/Source/EventFlow.Serialization.SystemTextJson/Extensions/EventFlowOptionsSystemTextJsonExtensions.cs similarity index 67% rename from Source/EventFlow/Configuration/Serialization/ChainedJsonOptions.cs rename to Source/EventFlow.Serialization.SystemTextJson/Extensions/EventFlowOptionsSystemTextJsonExtensions.cs index 26005ebb5..01f52a4de 100644 --- a/Source/EventFlow/Configuration/Serialization/ChainedJsonOptions.cs +++ b/Source/EventFlow.Serialization.SystemTextJson/Extensions/EventFlowOptionsSystemTextJsonExtensions.cs @@ -1,18 +1,18 @@ // The MIT License (MIT) -// +// // Copyright (c) 2015-2025 Rasmus Mikkelsen // https://github.com/eventflow/EventFlow -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of // the Software, and to permit persons to whom the Software is furnished to do so, // subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR @@ -21,25 +21,22 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. using System; -using Newtonsoft.Json; +using System.Text.Json; +using EventFlow.Core; +using EventFlow.Serialization.SystemTextJson; +using Microsoft.Extensions.DependencyInjection; -namespace EventFlow.Configuration.Serialization +namespace EventFlow.Extensions { - public class ChainedJsonOptions : IJsonOptions + public static class EventFlowOptionsSystemTextJsonExtensions { - private readonly Action _action; - private readonly IJsonOptions _parent; - - public ChainedJsonOptions(IJsonOptions parent, Action action) - { - _parent = parent; - _action = action; - } - - void IJsonOptions.Apply(JsonSerializerSettings settings) + public static IEventFlowOptions AddSystemTextJson( + this IEventFlowOptions eventFlowOptions, + Action configure = null) { - _parent.Apply(settings); - _action.Invoke(settings); + eventFlowOptions.ServiceCollection + .AddSingleton(_ => new SystemTextJsonSerializer(configure)); + return eventFlowOptions; } } } diff --git a/Source/EventFlow.Serialization.SystemTextJson/SingleValueObjectConverterFactory.cs b/Source/EventFlow.Serialization.SystemTextJson/SingleValueObjectConverterFactory.cs new file mode 100644 index 000000000..57e427e7d --- /dev/null +++ b/Source/EventFlow.Serialization.SystemTextJson/SingleValueObjectConverterFactory.cs @@ -0,0 +1,78 @@ +// The MIT License (MIT) +// +// Copyright (c) 2015-2025 Rasmus Mikkelsen +// https://github.com/eventflow/EventFlow +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal in +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +// the Software, and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +using System; +using System.Collections.Concurrent; +using System.Linq; +using System.Reflection; +using System.Text.Json; +using System.Text.Json.Serialization; +using EventFlow.ValueObjects; + +namespace EventFlow.Serialization.SystemTextJson +{ + public class SingleValueObjectConverterFactory : JsonConverterFactory + { + private static readonly ConcurrentDictionary Converters = + new ConcurrentDictionary(); + + public override bool CanConvert(Type typeToConvert) + { + return typeof(ISingleValueObject).IsAssignableFrom(typeToConvert); + } + + public override JsonConverter CreateConverter(Type typeToConvert, JsonSerializerOptions options) + { + return Converters.GetOrAdd(typeToConvert, CreateConverterFor); + } + + private static JsonConverter CreateConverterFor(Type typeToConvert) + { + var constructorInfo = typeToConvert + .GetConstructors(BindingFlags.Public | BindingFlags.Instance) + .Single(); + var valueType = constructorInfo.GetParameters().Single().ParameterType; + var converterType = typeof(SingleValueObjectConverter<,>).MakeGenericType(typeToConvert, valueType); + return (JsonConverter) Activator.CreateInstance(converterType); + } + } + + internal class SingleValueObjectConverter : JsonConverter + where T : ISingleValueObject + { + public override T Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + if (reader.TokenType == JsonTokenType.Null) + { + return default; + } + + var value = JsonSerializer.Deserialize(ref reader, options); + return (T) Activator.CreateInstance(typeToConvert, value); + } + + public override void Write(Utf8JsonWriter writer, T value, JsonSerializerOptions options) + { + JsonSerializer.Serialize(writer, (TValue) value.GetValue(), options); + } + } +} diff --git a/Source/EventFlow.Serialization.SystemTextJson/SystemTextJsonSerializer.cs b/Source/EventFlow.Serialization.SystemTextJson/SystemTextJsonSerializer.cs new file mode 100644 index 000000000..3eb337bfb --- /dev/null +++ b/Source/EventFlow.Serialization.SystemTextJson/SystemTextJsonSerializer.cs @@ -0,0 +1,64 @@ +// The MIT License (MIT) +// +// Copyright (c) 2015-2025 Rasmus Mikkelsen +// https://github.com/eventflow/EventFlow +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal in +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +// the Software, and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +using System; +using System.Text.Json; +using EventFlow.Core; + +namespace EventFlow.Serialization.SystemTextJson +{ + public class SystemTextJsonSerializer : IJsonSerializer + { + private readonly JsonSerializerOptions _optionsIndented; + private readonly JsonSerializerOptions _optionsNotIndented; + + public SystemTextJsonSerializer(Action configure = null) + { + _optionsNotIndented = CreateOptions(configure, false); + _optionsIndented = CreateOptions(configure, true); + } + + private static JsonSerializerOptions CreateOptions(Action configure, bool indented) + { + var options = new JsonSerializerOptions(); + configure?.Invoke(options); + options.WriteIndented = indented; + return options; + } + + public string Serialize(object obj, bool indented = false) + { + var options = indented ? _optionsIndented : _optionsNotIndented; + return System.Text.Json.JsonSerializer.Serialize(obj, obj?.GetType() ?? typeof(object), options); + } + + public object Deserialize(string json, Type type) + { + return System.Text.Json.JsonSerializer.Deserialize(json, type, _optionsNotIndented); + } + + public T Deserialize(string json) + { + return System.Text.Json.JsonSerializer.Deserialize(json, _optionsNotIndented); + } + } +} diff --git a/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj b/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj index 0de96c53d..8d4e37d18 100644 --- a/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj +++ b/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj @@ -28,6 +28,7 @@ + diff --git a/Source/EventFlow.TestHelpers/IntegrationTest.cs b/Source/EventFlow.TestHelpers/IntegrationTest.cs index 3e410f9f8..5347497fb 100644 --- a/Source/EventFlow.TestHelpers/IntegrationTest.cs +++ b/Source/EventFlow.TestHelpers/IntegrationTest.cs @@ -63,7 +63,7 @@ public abstract class IntegrationTest: Test [SetUp] public void SetUpIntegrationTest() { - var eventFlowOptions = Options(EventFlowOptions.New()) + var eventFlowOptions = Options(EventFlowOptions.New().AddNewtonsoftJson()) .RegisterServices(c => c.AddTransient()) .AddQueryHandler() .AddDefaults(EventFlowTestHelpers.Assembly, diff --git a/Source/EventFlow.TestHelpers/Suites/TestSuiteForJsonSerializer.cs b/Source/EventFlow.TestHelpers/Suites/TestSuiteForJsonSerializer.cs new file mode 100644 index 000000000..ad0bb76fe --- /dev/null +++ b/Source/EventFlow.TestHelpers/Suites/TestSuiteForJsonSerializer.cs @@ -0,0 +1,183 @@ +// The MIT License (MIT) +// +// Copyright (c) 2015-2025 Rasmus Mikkelsen +// https://github.com/eventflow/EventFlow +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal in +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +// the Software, and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +using EventFlow.Aggregates; +using EventFlow.Core; +using EventFlow.Snapshots; +using EventFlow.ValueObjects; +using NUnit.Framework; +using Shouldly; + +namespace EventFlow.TestHelpers.Suites +{ + /// + /// Provider-agnostic conformance suite that every + /// implementation must satisfy. Concrete test fixtures supply the serializer under + /// test by overriding . + /// + [Category(Categories.Unit)] + public abstract class TestSuiteForJsonSerializer + { + protected abstract IJsonSerializer CreateSerializer(); + + private IJsonSerializer _sut; + + [SetUp] + public void SetUp() + { + _sut = CreateSerializer(); + } + + [Test] + public void SingleValueObject_String_RoundTrips() + { + var json = _sut.Serialize(new StringSvo("abc")); + + var result = _sut.Deserialize(json); + + result.Value.ShouldBe("abc"); + } + + [Test] + public void SingleValueObject_Int_RoundTrips() + { + var json = _sut.Serialize(new IntSvo(42)); + + var result = _sut.Deserialize(json); + + result.Value.ShouldBe(42); + } + + [Test] + public void Deserialize_NonGeneric_ReturnsTypedInstance() + { + var json = _sut.Serialize(new IntSvo(7)); + + var result = _sut.Deserialize(json, typeof(IntSvo)); + + result.ShouldBeOfType(); + ((IntSvo) result).Value.ShouldBe(7); + } + + [Test] + public void Metadata_RoundTripsTypedAccessors() + { + var metadata = new Metadata + { + AggregateName = "ThingyAggregate", + AggregateSequenceNumber = 3, + }; + + var json = _sut.Serialize(metadata); + var result = _sut.Deserialize(json); + + result.AggregateName.ShouldBe("ThingyAggregate"); + result.AggregateSequenceNumber.ShouldBe(3); + } + + [Test] + public void Metadata_SerializesUnderlyingKeysNotComputedProperties() + { + var metadata = new Metadata + { + AggregateName = "ThingyAggregate", + }; + + var json = _sut.Serialize(metadata); + + // The container is a dictionary; the metadata key is emitted, not the CLR + // accessor name "AggregateName". + json.ShouldContain(MetadataKeys.AggregateName); + json.ShouldNotContain(nameof(Metadata.AggregateName)); + } + + [Test] + public void SnapshotMetadata_RoundTripsTypedAccessors() + { + var metadata = new SnapshotMetadata + { + AggregateName = "ThingyAggregate", + AggregateSequenceNumber = 3, + SnapshotName = "ThingySnapshot", + SnapshotVersion = 2, + }; + + var json = _sut.Serialize(metadata); + var result = _sut.Deserialize(json); + + result.AggregateName.ShouldBe("ThingyAggregate"); + result.AggregateSequenceNumber.ShouldBe(3); + result.SnapshotName.ShouldBe("ThingySnapshot"); + result.SnapshotVersion.ShouldBe(2); + } + + [Test] + public void SnapshotMetadata_SerializesUnderlyingKeysNotComputedProperties() + { + var metadata = new SnapshotMetadata + { + AggregateName = "ThingyAggregate", + SnapshotName = "ThingySnapshot", + }; + + var json = _sut.Serialize(metadata); + + // The container is a dictionary; the snapshot metadata keys are emitted, not + // the CLR accessor names. The [JsonIgnore] attributes that used to sit on the + // computed properties were inert under the dictionary contract, so removing + // them preserves this behavior. + json.ShouldContain(SnapshotMetadataKeys.AggregateName); + json.ShouldContain(SnapshotMetadataKeys.SnapshotName); + json.ShouldNotContain(nameof(SnapshotMetadata.AggregateName)); + json.ShouldNotContain(nameof(SnapshotMetadata.SnapshotName)); + } + + [Test] + public void Serialize_Indented_DiffersFromCompact() + { + var value = new ComplexValue {Name = "a", Number = 1}; + + var compact = _sut.Serialize(value); + var indented = _sut.Serialize(value, indented: true); + + indented.ShouldNotBe(compact); + indented.ShouldContain("\n"); + compact.ShouldNotContain("\n"); + } + + public class StringSvo : SingleValueObject + { + public StringSvo(string value) : base(value) { } + } + + public class IntSvo : SingleValueObject + { + public IntSvo(int value) : base(value) { } + } + + public class ComplexValue + { + public string Name { get; set; } + public int Number { get; set; } + } + } +} diff --git a/Source/EventFlow.Tests/Exploration/CustomAggregateIdExplorationTest.cs b/Source/EventFlow.Tests/Exploration/CustomAggregateIdExplorationTest.cs index bca593b27..2fd191162 100644 --- a/Source/EventFlow.Tests/Exploration/CustomAggregateIdExplorationTest.cs +++ b/Source/EventFlow.Tests/Exploration/CustomAggregateIdExplorationTest.cs @@ -24,6 +24,7 @@ using System.Threading.Tasks; using EventFlow.Aggregates; using EventFlow.Core; +using EventFlow.Extensions; using EventFlow.TestHelpers; using Microsoft.Extensions.DependencyInjection; using NUnit.Framework; @@ -37,7 +38,7 @@ public class CustomAggregateIdExplorationTest : Test [Test] public async Task AggregatesCanHaveCustomImplementedIdentity() { - using (var serviceProvider = EventFlowOptions.New() + using (var serviceProvider = EventFlowOptions.New().AddNewtonsoftJson() .ServiceCollection.BuildServiceProvider()) { // Arrange diff --git a/Source/EventFlow.Tests/Exploration/EventUpgradeExplorationTest.cs b/Source/EventFlow.Tests/Exploration/EventUpgradeExplorationTest.cs index 6b035fc7c..6f41ec2ed 100644 --- a/Source/EventFlow.Tests/Exploration/EventUpgradeExplorationTest.cs +++ b/Source/EventFlow.Tests/Exploration/EventUpgradeExplorationTest.cs @@ -43,7 +43,7 @@ public class EventUpgradeExplorationTest [SetUp] public void SetUp() { - _serviceProvider = EventFlowOptions.New() + _serviceProvider = EventFlowOptions.New().AddNewtonsoftJson() .AddEvents(new []{ typeof(UpgradeEventV1), typeof(UpgradeEventV2) }) .AddEventUpgraders(typeof(UpgradeV1ToV2)) .ServiceCollection.BuildServiceProvider(); diff --git a/Source/EventFlow.Tests/Exploration/ReadModelRepopulateExplorationTest.cs b/Source/EventFlow.Tests/Exploration/ReadModelRepopulateExplorationTest.cs index 585f64f16..709167b63 100644 --- a/Source/EventFlow.Tests/Exploration/ReadModelRepopulateExplorationTest.cs +++ b/Source/EventFlow.Tests/Exploration/ReadModelRepopulateExplorationTest.cs @@ -42,7 +42,7 @@ public class ReadModelRepopulateExplorationTest [SetUp] public void SetUp() { - _serviceProvider = EventFlowOptions.New() + _serviceProvider = EventFlowOptions.New().AddNewtonsoftJson() .AddEvents(new[] { typeof(EventV1), typeof(EventV2) }) .AddEventUpgraders(typeof(BrokenUpgradeV1ToV2)) .UseInMemoryReadStoreFor() diff --git a/Source/EventFlow.Tests/Exploration/RegisterSubscribersExplorationTests.cs b/Source/EventFlow.Tests/Exploration/RegisterSubscribersExplorationTests.cs index 920f5a856..263b12eb9 100644 --- a/Source/EventFlow.Tests/Exploration/RegisterSubscribersExplorationTests.cs +++ b/Source/EventFlow.Tests/Exploration/RegisterSubscribersExplorationTests.cs @@ -50,7 +50,7 @@ public async Task TestRegisterAsynchronousSubscribersAsync(Func wasHandled = true; using (new DisposableAction(() => TestSubscriber.OnHandleAction = null)) - using (var serviceProvider = register(EventFlowOptions.New()) + using (var serviceProvider = register(EventFlowOptions.New().AddNewtonsoftJson()) .AddCommands(typeof(ThingyPingCommand)) .AddCommandHandlers(typeof(ThingyPingCommandHandler)) .RegisterServices(sr => sr.AddScoped()) diff --git a/Source/EventFlow.Tests/IntegrationTests/Aggregates/AggregateFactoryTests.cs b/Source/EventFlow.Tests/IntegrationTests/Aggregates/AggregateFactoryTests.cs index bd4f76601..9abaa59c6 100644 --- a/Source/EventFlow.Tests/IntegrationTests/Aggregates/AggregateFactoryTests.cs +++ b/Source/EventFlow.Tests/IntegrationTests/Aggregates/AggregateFactoryTests.cs @@ -40,7 +40,7 @@ public class AggregateFactoryTests public async Task CreatesNewAggregateWithIdParameter() { // Arrange - using (var serviceProvider = EventFlowOptions.New().ServiceCollection.BuildServiceProvider()) + using (var serviceProvider = EventFlowOptions.New().AddNewtonsoftJson().ServiceCollection.BuildServiceProvider()) { var id = ThingyId.New; var sut = serviceProvider.GetRequiredService(); @@ -57,7 +57,7 @@ public async Task CreatesNewAggregateWithIdParameter() public async Task CreatesNewAggregateWithIdAndInterfaceParameters() { // Arrange - using (var serviceProvider = EventFlowOptions.New().ServiceCollection.BuildServiceProvider()) + using (var serviceProvider = EventFlowOptions.New().AddNewtonsoftJson().ServiceCollection.BuildServiceProvider()) { var sut = serviceProvider.GetRequiredService(); @@ -73,7 +73,7 @@ public async Task CreatesNewAggregateWithIdAndInterfaceParameters() public async Task CreatesNewAggregateWithIdAndTypeParameters() { // Arrange - using (var serviceProvider = EventFlowOptions.New() + using (var serviceProvider = EventFlowOptions.New().AddNewtonsoftJson() .RegisterServices(f => f.AddTransient(typeof(Pinger))) .ServiceCollection.BuildServiceProvider()) { diff --git a/Source/EventFlow.Tests/IntegrationTests/BackwardCompatibilityTests.cs b/Source/EventFlow.Tests/IntegrationTests/BackwardCompatibilityTests.cs index 5f0dcda65..b94a5af5e 100644 --- a/Source/EventFlow.Tests/IntegrationTests/BackwardCompatibilityTests.cs +++ b/Source/EventFlow.Tests/IntegrationTests/BackwardCompatibilityTests.cs @@ -53,7 +53,7 @@ public void SetUp() var codeBase = ReflectionHelper.GetCodeBase(GetType().Assembly); var filesEventStoreDirectory = Path.GetFullPath(Path.Combine(codeBase, "..", "..", "..", "TestData", "FilesEventStore")); - _serviceProvider = EventFlowOptions.New() + _serviceProvider = EventFlowOptions.New().AddNewtonsoftJson() .UseFilesEventPersistence(FilesEventStoreConfiguration.Create(filesEventStoreDirectory)) .AddEvents(EventFlowTestHelpers.Assembly) .AddCommandHandlers(EventFlowTestHelpers.Assembly) diff --git a/Source/EventFlow.Tests/IntegrationTests/BasicTests.cs b/Source/EventFlow.Tests/IntegrationTests/BasicTests.cs index 28bdb467a..7aed817b1 100644 --- a/Source/EventFlow.Tests/IntegrationTests/BasicTests.cs +++ b/Source/EventFlow.Tests/IntegrationTests/BasicTests.cs @@ -135,7 +135,7 @@ public async Task BasicFlow(IEventFlowOptions eventFlowOptions) public static IEnumerable TestCases() { - yield return EventFlowOptions.New(); + yield return EventFlowOptions.New().AddNewtonsoftJson(); } } } \ No newline at end of file diff --git a/Source/EventFlow.Tests/IntegrationTests/CancellationTests.cs b/Source/EventFlow.Tests/IntegrationTests/CancellationTests.cs index 1d166af68..549c30aa7 100644 --- a/Source/EventFlow.Tests/IntegrationTests/CancellationTests.cs +++ b/Source/EventFlow.Tests/IntegrationTests/CancellationTests.cs @@ -177,7 +177,7 @@ private void Configure(CancellationBoundary testBoundary) _commandHandler = new ManualCommandHandler(); _subscriber = new ManualSubscriber(); - var resolver = EventFlowOptions.New() + var resolver = EventFlowOptions.New().AddNewtonsoftJson() .AddCommands(typeof(ThingyPingCommand)) .AddEvents(typeof(ThingyPingEvent)) .UseInMemoryReadStoreFor() diff --git a/Source/EventFlow.Tests/IntegrationTests/CommandResultTests.cs b/Source/EventFlow.Tests/IntegrationTests/CommandResultTests.cs index 79a06cdf0..474e790f7 100644 --- a/Source/EventFlow.Tests/IntegrationTests/CommandResultTests.cs +++ b/Source/EventFlow.Tests/IntegrationTests/CommandResultTests.cs @@ -93,7 +93,7 @@ public override Task ExecuteCommandAsync( [Test] public async Task CommandResult() { - using (var resolver = EventFlowOptions.New() + using (var resolver = EventFlowOptions.New().AddNewtonsoftJson() .AddCommandHandlers( typeof(TestSuccessResultCommandHandler), typeof(TestFailedResultCommandHandler)) diff --git a/Source/EventFlow.Tests/IntegrationTests/Sagas/AlternativeSagaStoreTests.cs b/Source/EventFlow.Tests/IntegrationTests/Sagas/AlternativeSagaStoreTests.cs index f040a2bc2..e461edd08 100644 --- a/Source/EventFlow.Tests/IntegrationTests/Sagas/AlternativeSagaStoreTests.cs +++ b/Source/EventFlow.Tests/IntegrationTests/Sagas/AlternativeSagaStoreTests.cs @@ -44,7 +44,7 @@ public class AlternativeSagaStoreTests [SetUp] public void SetUp() { - _serviceProvider = EventFlowOptions.New() + _serviceProvider = EventFlowOptions.New().AddNewtonsoftJson() .AddSagas(typeof(AlternativeSagaStoreTestClasses.TestSaga)) .AddCommandHandlers( typeof(AlternativeSagaStoreTestClasses.SagaTestACommandHandler), diff --git a/Source/EventFlow.Tests/IntegrationTests/SeparationTests.cs b/Source/EventFlow.Tests/IntegrationTests/SeparationTests.cs index 6d138cb16..e1c59bae5 100644 --- a/Source/EventFlow.Tests/IntegrationTests/SeparationTests.cs +++ b/Source/EventFlow.Tests/IntegrationTests/SeparationTests.cs @@ -66,7 +66,7 @@ await resolver1.GetRequiredService().PublishAsync( private static ServiceProvider SetupEventFlow(Func configure = null) { - var eventFlowOptions = EventFlowOptions.New() + var eventFlowOptions = EventFlowOptions.New().AddNewtonsoftJson() .RegisterServices(sr => sr.AddScoped()) .AddDefaults(EventFlowTestHelpers.Assembly); diff --git a/Source/EventFlow.Tests/IntegrationTests/ServiceProviderTests.cs b/Source/EventFlow.Tests/IntegrationTests/ServiceProviderTests.cs index 673b0456e..cdfd2b41c 100644 --- a/Source/EventFlow.Tests/IntegrationTests/ServiceProviderTests.cs +++ b/Source/EventFlow.Tests/IntegrationTests/ServiceProviderTests.cs @@ -53,7 +53,7 @@ public ServiceDependentAggregate(ThingyId id, Service service) : base(id) [Test] public async Task ResolverAggregatesFactoryCanResolve() { - using (var serviceProvider = EventFlowOptions.New() + using (var serviceProvider = EventFlowOptions.New().AddNewtonsoftJson() .RegisterServices(sr => sr.AddTransient(typeof(Service))) .ServiceCollection.BuildServiceProvider()) { @@ -72,7 +72,7 @@ public async Task ResolverAggregatesFactoryCanResolve() [Test] public void RegistrationDoesntCauseStackOverflow() { - using (var serviceProvider = EventFlowOptions.New() + using (var serviceProvider = EventFlowOptions.New().AddNewtonsoftJson() .AddDefaults(EventFlowTestHelpers.Assembly) .RegisterServices(s => { diff --git a/Source/EventFlow.Tests/IntegrationTests/UnicodeTests.cs b/Source/EventFlow.Tests/IntegrationTests/UnicodeTests.cs index 0e8a420c6..cd6d1848e 100644 --- a/Source/EventFlow.Tests/IntegrationTests/UnicodeTests.cs +++ b/Source/EventFlow.Tests/IntegrationTests/UnicodeTests.cs @@ -108,7 +108,7 @@ public void UnicodeEvents() [Test] public async Task UnicodeIntegration() { - var resolver = EventFlowOptions.New() + var resolver = EventFlowOptions.New().AddNewtonsoftJson() .AddEvents(typeof(Püng1Event)) .AddCommands(typeof(Cömmand)) .AddCommandHandlers(typeof(CömmandHändler)) diff --git a/Source/EventFlow.Tests/ReadMeExamples.cs b/Source/EventFlow.Tests/ReadMeExamples.cs index 4159a145a..2fa6e1d75 100644 --- a/Source/EventFlow.Tests/ReadMeExamples.cs +++ b/Source/EventFlow.Tests/ReadMeExamples.cs @@ -46,6 +46,7 @@ public async Task Example() var serviceCollection = new ServiceCollection() .AddLogging() .AddEventFlow(o => o + .AddNewtonsoftJson() .AddEvents(typeof(ExampleEvent)) .AddCommands(typeof(ExampleCommand)) .AddCommandHandlers(typeof(ExampleCommandHandler)) diff --git a/Source/EventFlow.Tests/UnitTests/Configuration/Serialization/JsonOptionsTests.cs b/Source/EventFlow.Tests/UnitTests/Configuration/Serialization/JsonOptionsTests.cs deleted file mode 100644 index 38d447024..000000000 --- a/Source/EventFlow.Tests/UnitTests/Configuration/Serialization/JsonOptionsTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -// The MIT License (MIT) -// -// Copyright (c) 2015-2025 Rasmus Mikkelsen -// https://github.com/eventflow/EventFlow -// -// Permission is hereby granted, free of charge, to any person obtaining a copy of -// this software and associated documentation files (the "Software"), to deal in -// the Software without restriction, including without limitation the rights to -// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -// the Software, and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -using EventFlow.Configuration.Serialization; -using EventFlow.Extensions; -using EventFlow.TestHelpers; -using EventFlow.ValueObjects; -using Newtonsoft.Json; -using NUnit.Framework; -using System; -using Shouldly; - -namespace EventFlow.Tests.UnitTests.Configuration.Serialization -{ - [Category(Categories.Unit)] - public class JsonOptionsTests - { - private class MyClass - { - public DateTime DateTime { get; set; } - } - - private class MyClassConverter : JsonConverter - { - public override MyClass ReadJson(JsonReader reader, Type objectType, MyClass existingValue, bool hasExistingValue, JsonSerializer serializer) - { - return new MyClass() { DateTime = new DateTime((long)reader.Value) }; - } - - public override void WriteJson(JsonWriter writer, MyClass value, JsonSerializer serializer) - { - serializer.Serialize(writer, value.DateTime.Ticks); - } - } - - private class MySingleValueObject : SingleValueObject - { - public MySingleValueObject(DateTime value) : base(value) { } - } - - - [Test] - public void JsonOptionsCanBeUsedToConstructJsonSerializerSettings() - { - // Arrange - var jsonOptions = JsonOptions.New - .Use(() => new JsonSerializerSettings()) - .AddConverter(); - - var someJsonSerializerSettings = new JsonSerializerSettings(); - jsonOptions.Apply(someJsonSerializerSettings); - JsonConvert.DefaultSettings = () => someJsonSerializerSettings; - - // Act - var myClassSerialized = JsonConvert.SerializeObject(new MyClass() { DateTime = new DateTime(1000000) }); - var myClassDeserialized = JsonConvert.DeserializeObject(myClassSerialized); - var svoSerialized = JsonConvert.SerializeObject(new MySingleValueObject(new DateTime(1970, 1, 1))); - var svoDeserialized = JsonConvert.DeserializeObject(svoSerialized); - - // Assert - myClassSerialized.ShouldBe("1000000"); - myClassDeserialized.DateTime.Ticks.ShouldBe(1000000); - myClassDeserialized.DateTime.Ticks.ShouldNotBe(10); - svoDeserialized.ShouldBe(new MySingleValueObject(new DateTime(1970, 1, 1))); - svoDeserialized.ShouldNotBe(new MySingleValueObject(new DateTime(2001, 1, 1))); - } - } -} diff --git a/Source/EventFlow.Tests/UnitTests/EventStores/ConcurrentFilesEventPersistanceTests.cs b/Source/EventFlow.Tests/UnitTests/EventStores/ConcurrentFilesEventPersistanceTests.cs index 685aa11a6..e4580ed73 100644 --- a/Source/EventFlow.Tests/UnitTests/EventStores/ConcurrentFilesEventPersistanceTests.cs +++ b/Source/EventFlow.Tests/UnitTests/EventStores/ConcurrentFilesEventPersistanceTests.cs @@ -33,6 +33,7 @@ using EventFlow.Core; using EventFlow.EventStores; using EventFlow.EventStores.Files; +using EventFlow.Serialization.NewtonsoftJson; using EventFlow.Exceptions; using EventFlow.TestHelpers; using EventFlow.TestHelpers.Aggregates; @@ -68,7 +69,7 @@ public void SetUp() new NamespaceAndNameStrategy()); definitionService.Load(typeof(ThingyPingEvent)); - _serializer = new EventJsonSerializer(new JsonSerializer(), definitionService, factory); + _serializer = new EventJsonSerializer(new NewtonsoftJsonSerializer(), definitionService, factory); } [SetUp] @@ -148,7 +149,7 @@ private IFilesEventStoreConfiguration ConfigurePath(string storePath) private FilesEventPersistence CreatePersistence(string storePath = "") { - var serializer = new JsonSerializer(); + var serializer = new NewtonsoftJsonSerializer(); var config = ConfigurePath(storePath); var locator = new FilesEventLocator(config); return new FilesEventPersistence( diff --git a/Source/EventFlow.Tests/UnitTests/EventStores/ConcurrentInMemoryEventPersistanceTests.cs b/Source/EventFlow.Tests/UnitTests/EventStores/ConcurrentInMemoryEventPersistanceTests.cs index 03a654718..698a0acc4 100644 --- a/Source/EventFlow.Tests/UnitTests/EventStores/ConcurrentInMemoryEventPersistanceTests.cs +++ b/Source/EventFlow.Tests/UnitTests/EventStores/ConcurrentInMemoryEventPersistanceTests.cs @@ -33,6 +33,7 @@ using EventFlow.EventStores; using EventFlow.EventStores.InMemory; using EventFlow.Exceptions; +using EventFlow.Serialization.NewtonsoftJson; using EventFlow.Snapshots; using EventFlow.TestHelpers; using EventFlow.TestHelpers.Aggregates; @@ -85,11 +86,11 @@ private EventStoreBase CreateStore() var metadataProviders = Enumerable.Empty(); var snapshotStore = Mock(); var factory = new DomainEventFactory(); - var persistence = new InMemoryEventPersistence(Logger()); + var persistence = new InMemoryEventPersistence(Logger(), new NewtonsoftJsonSerializer()); var upgradeManager = new EventUpgradeManager(Logger(), serviceProvider, new EventUpgradeContextFactory()); var definitionService = new EventDefinitionService(Logger(), Mock(), new NamespaceAndClassNameStrategy()); definitionService.Load(typeof(ThingyPingEvent)); - var serializer = new EventJsonSerializer(new JsonSerializer(), definitionService, factory); + var serializer = new EventJsonSerializer(new NewtonsoftJsonSerializer(), definitionService, factory); var store = new EventStoreBase( Logger(), diff --git a/Source/EventFlow.Tests/UnitTests/Extensions/JsonSerializerExtensionTests.cs b/Source/EventFlow.Tests/UnitTests/Extensions/JsonSerializerExtensionTests.cs deleted file mode 100644 index 175dae12a..000000000 --- a/Source/EventFlow.Tests/UnitTests/Extensions/JsonSerializerExtensionTests.cs +++ /dev/null @@ -1,90 +0,0 @@ -// The MIT License (MIT) -// -// Copyright (c) 2015-2025 Rasmus Mikkelsen -// https://github.com/eventflow/EventFlow -// -// Permission is hereby granted, free of charge, to any person obtaining a copy of -// this software and associated documentation files (the "Software"), to deal in -// the Software without restriction, including without limitation the rights to -// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -// the Software, and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -using EventFlow.Core; -using EventFlow.Extensions; -using EventFlow.TestHelpers; -using EventFlow.ValueObjects; -using Newtonsoft.Json; -using NUnit.Framework; -using System; -using Microsoft.Extensions.DependencyInjection; -using Shouldly; - -namespace EventFlow.Tests.UnitTests.Extensions -{ - [Category(Categories.Unit)] - public class JsonSerializerExtensionTests - { - private class MyClass - { - public DateTime DateTime { get; set; } - } - - private class MyClassConverter : JsonConverter - { - public override MyClass ReadJson(JsonReader reader, Type objectType, MyClass existingValue, bool hasExistingValue, Newtonsoft.Json.JsonSerializer serializer) - { - return new MyClass() { DateTime = new DateTime((long)reader.Value) }; - } - - public override void WriteJson(JsonWriter writer, MyClass value, Newtonsoft.Json.JsonSerializer serializer) - { - serializer.Serialize(writer, value.DateTime.Ticks); - } - } - - private class MySingleValueObject : SingleValueObject - { - public MySingleValueObject(DateTime value) : base(value) { } - } - - - [Test] - public void JsonSerializerCanBeConfigured() - { - using (var serviceProvider = EventFlowOptions.New() - .ConfigureJson(json => json - .AddSingleValueObjects() - .AddConverter() - ) - .ServiceCollection.BuildServiceProvider()) - { - // Arrange - var serializer = serviceProvider.GetRequiredService(); - - // Act - var myClassSerialized = serializer.Serialize(new MyClass() { DateTime = new DateTime(1000000) }); - var myClassDeserialized = serializer.Deserialize(myClassSerialized); - var svoSerialized = serializer.Serialize(new MySingleValueObject(new DateTime(1970, 1, 1))); - var svoDeserialized = serializer.Deserialize(svoSerialized); - - // Assert - myClassSerialized.ShouldBe("1000000"); - myClassDeserialized.DateTime.Ticks.ShouldBe(1000000); - myClassDeserialized.DateTime.Ticks.ShouldNotBe(10); - svoDeserialized.ShouldBe(new MySingleValueObject(new DateTime(1970, 1, 1))); - svoDeserialized.ShouldNotBe(new MySingleValueObject(new DateTime(2001, 1, 1))); - } - } - } -} diff --git a/Source/EventFlow.Tests/UnitTests/ReadStores/ReadModelFactoryTests.cs b/Source/EventFlow.Tests/UnitTests/ReadStores/ReadModelFactoryTests.cs index 8614186a8..458a55527 100644 --- a/Source/EventFlow.Tests/UnitTests/ReadStores/ReadModelFactoryTests.cs +++ b/Source/EventFlow.Tests/UnitTests/ReadStores/ReadModelFactoryTests.cs @@ -47,7 +47,7 @@ public async Task ReadModelFactoryCanBeConfigured() const int expectedMagicNumberForReadModelC = 0; // Arrange - using (var resolver = EventFlowOptions.New() + using (var resolver = EventFlowOptions.New().AddNewtonsoftJson() .RegisterServices(sr => { sr.AddTransient>(r => new FancyReadModelFactory(expectedMagicNumberForReadModelA)); diff --git a/Source/EventFlow.Tests/UnitTests/ValueObjects/SingleValueObjectTests.cs b/Source/EventFlow.Tests/UnitTests/ValueObjects/SingleValueObjectTests.cs index 7376fc0cc..e39a29910 100644 --- a/Source/EventFlow.Tests/UnitTests/ValueObjects/SingleValueObjectTests.cs +++ b/Source/EventFlow.Tests/UnitTests/ValueObjects/SingleValueObjectTests.cs @@ -22,6 +22,7 @@ using System; using System.Linq; +using EventFlow.Serialization.NewtonsoftJson; using EventFlow.TestHelpers; using EventFlow.ValueObjects; using Newtonsoft.Json; diff --git a/Source/EventFlow/Aggregates/Metadata.cs b/Source/EventFlow/Aggregates/Metadata.cs index c33b2556d..334e7c1b3 100644 --- a/Source/EventFlow/Aggregates/Metadata.cs +++ b/Source/EventFlow/Aggregates/Metadata.cs @@ -25,7 +25,6 @@ using System.Linq; using EventFlow.Core; using EventFlow.Extensions; -using Newtonsoft.Json; namespace EventFlow.Aggregates { @@ -48,61 +47,52 @@ public static IMetadata With(IDictionary keyValuePairs) return new Metadata(keyValuePairs); } - [JsonIgnore] public ISourceId SourceId { get => GetMetadataValue(MetadataKeys.SourceId, v => new SourceId(v)); set => Add(MetadataKeys.SourceId, value.Value); } - [JsonIgnore] public string EventName { get => GetMetadataValue(MetadataKeys.EventName); set => Add(MetadataKeys.EventName, value); } - [JsonIgnore] public int EventVersion { get => GetMetadataValue(MetadataKeys.EventVersion, int.Parse); set => Add(MetadataKeys.EventVersion, value.ToString()); } - [JsonIgnore] public DateTimeOffset Timestamp { get => GetMetadataValue(MetadataKeys.Timestamp, DateTimeOffset.Parse); set => Add(MetadataKeys.Timestamp, value.ToString("O")); } - [JsonIgnore] public long TimestampEpoch => TryGetValue(MetadataKeys.TimestampEpoch, out var timestampEpoch) ? long.Parse(timestampEpoch) : Timestamp.ToUnixTime(); - [JsonIgnore] public int AggregateSequenceNumber { get => GetMetadataValue(MetadataKeys.AggregateSequenceNumber, int.Parse); set => Add(MetadataKeys.AggregateSequenceNumber, value.ToString()); } - [JsonIgnore] public string AggregateId { get => GetMetadataValue(MetadataKeys.AggregateId); set => Add(MetadataKeys.AggregateId, value); } - [JsonIgnore] public IEventId EventId { get => GetMetadataValue(MetadataKeys.EventId, Aggregates.EventId.With); set => Add(MetadataKeys.EventId, value.Value); } - [JsonIgnore] public string AggregateName { get => GetMetadataValue(MetadataKeys.AggregateName); diff --git a/Source/EventFlow/Configuration/Serialization/IJsonOptions.cs b/Source/EventFlow/Configuration/Serialization/IJsonOptions.cs deleted file mode 100644 index 067a2f7ee..000000000 --- a/Source/EventFlow/Configuration/Serialization/IJsonOptions.cs +++ /dev/null @@ -1,31 +0,0 @@ -// The MIT License (MIT) -// -// Copyright (c) 2015-2025 Rasmus Mikkelsen -// https://github.com/eventflow/EventFlow -// -// Permission is hereby granted, free of charge, to any person obtaining a copy of -// this software and associated documentation files (the "Software"), to deal in -// the Software without restriction, including without limitation the rights to -// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -// the Software, and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -using Newtonsoft.Json; - -namespace EventFlow.Configuration.Serialization -{ - public interface IJsonOptions - { - void Apply(JsonSerializerSettings settings); - } -} \ No newline at end of file diff --git a/Source/EventFlow/Configuration/Serialization/JsonOptions.cs b/Source/EventFlow/Configuration/Serialization/JsonOptions.cs deleted file mode 100644 index 164c7811d..000000000 --- a/Source/EventFlow/Configuration/Serialization/JsonOptions.cs +++ /dev/null @@ -1,35 +0,0 @@ -// The MIT License (MIT) -// -// Copyright (c) 2015-2025 Rasmus Mikkelsen -// https://github.com/eventflow/EventFlow -// -// Permission is hereby granted, free of charge, to any person obtaining a copy of -// this software and associated documentation files (the "Software"), to deal in -// the Software without restriction, including without limitation the rights to -// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -// the Software, and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -using Newtonsoft.Json; - -namespace EventFlow.Configuration.Serialization -{ - public class JsonOptions : IJsonOptions - { - public void Apply(JsonSerializerSettings settings) - { - } - - public static JsonOptions New => new JsonOptions(); - } -} \ No newline at end of file diff --git a/Source/EventFlow/Core/Caching/CacheKey.cs b/Source/EventFlow/Core/Caching/CacheKey.cs index c6d4de468..003d22bef 100644 --- a/Source/EventFlow/Core/Caching/CacheKey.cs +++ b/Source/EventFlow/Core/Caching/CacheKey.cs @@ -23,11 +23,9 @@ using System; using EventFlow.Extensions; using EventFlow.ValueObjects; -using Newtonsoft.Json; namespace EventFlow.Core.Caching { - [JsonConverter(typeof(SingleValueObjectConverter))] public class CacheKey : SingleValueObject { public const int MaxLength = 256; diff --git a/Source/EventFlow/Core/ThrowingJsonSerializer.cs b/Source/EventFlow/Core/ThrowingJsonSerializer.cs new file mode 100644 index 000000000..7039fbd2a --- /dev/null +++ b/Source/EventFlow/Core/ThrowingJsonSerializer.cs @@ -0,0 +1,49 @@ +// The MIT License (MIT) +// +// Copyright (c) 2015-2025 Rasmus Mikkelsen +// https://github.com/eventflow/EventFlow +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal in +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +// the Software, and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +using System; + +namespace EventFlow.Core +{ + /// + /// Default registered by EventFlow when no JSON + /// serializer has been configured. It throws on first use to fail fast with an + /// actionable message instead of producing an opaque dependency resolution error. + /// Install one of the serializer packages and register it during configuration: + /// AddNewtonsoftJson() (EventFlow.Serialization.NewtonsoftJson) or + /// AddSystemTextJson() (EventFlow.Serialization.SystemTextJson). + /// + public class ThrowingJsonSerializer : IJsonSerializer + { + private const string Message = + "No JSON serializer has been registered. Install one of the EventFlow serializer " + + "packages and register it during configuration, e.g. '.AddNewtonsoftJson()' " + + "(EventFlow.Serialization.NewtonsoftJson) or '.AddSystemTextJson()' " + + "(EventFlow.Serialization.SystemTextJson)."; + + public string Serialize(object obj, bool indented = false) => throw new InvalidOperationException(Message); + + public object Deserialize(string json, Type type) => throw new InvalidOperationException(Message); + + public T Deserialize(string json) => throw new InvalidOperationException(Message); + } +} diff --git a/Source/EventFlow/EventFlow.csproj b/Source/EventFlow/EventFlow.csproj index 22e862349..2a014191f 100644 --- a/Source/EventFlow/EventFlow.csproj +++ b/Source/EventFlow/EventFlow.csproj @@ -11,7 +11,6 @@ - diff --git a/Source/EventFlow/EventFlowOptions.cs b/Source/EventFlow/EventFlowOptions.cs index 437d16259..41c573fe0 100644 --- a/Source/EventFlow/EventFlowOptions.cs +++ b/Source/EventFlow/EventFlowOptions.cs @@ -29,7 +29,6 @@ using EventFlow.Configuration; using EventFlow.Configuration.Cancellation; using EventFlow.Configuration.EventNamingStrategy; -using EventFlow.Configuration.Serialization; using EventFlow.Core; using EventFlow.Core.RetryStrategies; using EventFlow.EventStores; @@ -193,8 +192,7 @@ private void RegisterDefaults(IServiceCollection serviceCollection) serviceCollection.TryAddTransient(); serviceCollection.TryAddTransient(); serviceCollection.TryAddTransient(); - serviceCollection.TryAddSingleton(); - serviceCollection.TryAddTransient(); + serviceCollection.TryAddSingleton(); serviceCollection.TryAddTransient(); serviceCollection.TryAddTransient(); serviceCollection.TryAddTransient(); diff --git a/Source/EventFlow/EventStores/InMemory/InMemoryEventPersistence.cs b/Source/EventFlow/EventStores/InMemory/InMemoryEventPersistence.cs index 16027957f..96e31fe49 100644 --- a/Source/EventFlow/EventStores/InMemory/InMemoryEventPersistence.cs +++ b/Source/EventFlow/EventStores/InMemory/InMemoryEventPersistence.cs @@ -33,13 +33,13 @@ using EventFlow.Exceptions; using EventFlow.Extensions; using Microsoft.Extensions.Logging; -using Newtonsoft.Json; namespace EventFlow.EventStores.InMemory { public class InMemoryEventPersistence : IEventPersistence, IDisposable { private readonly ILogger _logger; + private readonly IJsonSerializer _jsonSerializer; private readonly ConcurrentDictionary _eventStore = new ConcurrentDictionary(); @@ -54,6 +54,7 @@ private class InMemoryCommittedDomainEvent : ICommittedDomainEvent public string Data { get; set; } public string Metadata { get; set; } public int AggregateSequenceNumber { get; set; } + public IJsonSerializer JsonSerializer { private get; set; } public override string ToString() { @@ -67,12 +68,12 @@ public override string ToString() .ToString(); } - private static string PrettifyJson(string json) + private string PrettifyJson(string json) { try { - var obj = JsonConvert.DeserializeObject(json); - var prettyJson = JsonConvert.SerializeObject(obj, Formatting.Indented); + var obj = JsonSerializer.Deserialize(json, typeof(object)); + var prettyJson = JsonSerializer.Serialize(obj, true); return prettyJson; } catch (Exception) @@ -112,9 +113,11 @@ IEnumerator IEnumerable.GetEnumerator() } public InMemoryEventPersistence( - ILogger logger) + ILogger logger, + IJsonSerializer jsonSerializer) { _logger = logger; + _jsonSerializer = jsonSerializer; } public Task LoadAllCommittedEvents( @@ -165,6 +168,7 @@ public async Task> CommitEventsAsync( Data = e.SerializedData, Metadata = e.SerializedMetadata, GlobalSequenceNumber = globalCount + i + 1, + JsonSerializer = _jsonSerializer, }; _logger.LogTrace("Committing event {CommittedEvent}", committedDomainEvent); return committedDomainEvent; diff --git a/Source/EventFlow/Extensions/JsonOptionsExtensions.cs b/Source/EventFlow/Extensions/JsonOptionsExtensions.cs deleted file mode 100644 index 28810d630..000000000 --- a/Source/EventFlow/Extensions/JsonOptionsExtensions.cs +++ /dev/null @@ -1,99 +0,0 @@ -// The MIT License (MIT) -// -// Copyright (c) 2015-2025 Rasmus Mikkelsen -// https://github.com/eventflow/EventFlow -// -// Permission is hereby granted, free of charge, to any person obtaining a copy of -// this software and associated documentation files (the "Software"), to deal in -// the Software without restriction, including without limitation the rights to -// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -// the Software, and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -using System; -using System.Linq; -using EventFlow.Configuration.Serialization; -using EventFlow.ValueObjects; -using Newtonsoft.Json; - -namespace EventFlow.Extensions -{ - public static class JsonOptionsExtensions - { - public static IJsonOptions Configure(this IJsonOptions options, Action action) - { - if (action == null) throw new ArgumentNullException(nameof(action)); - return new ChainedJsonOptions(options, action); - } - - public static ChainedJsonOptions Use(this JsonOptions options, Func settingsFactory) - { - return new ChainedJsonOptions(options, target => - { - var source = settingsFactory(); - source.CopyTo(target); - }); - } - - public static IJsonOptions AddSingleValueObjects(this IJsonOptions options) - { - return options.AddConverter(); - } - - public static IJsonOptions AddConverter(this IJsonOptions options) - where T : JsonConverter, new() - { - return options.Configure(s => s.Converters.Insert(0, new T())); - } - - private static JsonSerializerSettings Clone(this JsonSerializerSettings settings) - { - var result = new JsonSerializerSettings(); - settings.CopyTo(result); - return result; - } - - private static void CopyTo(this JsonSerializerSettings settings, JsonSerializerSettings target) - { - target.CheckAdditionalContent = settings.CheckAdditionalContent; - target.ConstructorHandling = settings.ConstructorHandling; - target.Context = settings.Context; - target.ContractResolver = settings.ContractResolver; - target.Culture = settings.Culture; - target.DateFormatHandling = settings.DateFormatHandling; - target.DateFormatString = settings.DateFormatString; - target.DateParseHandling = settings.DateParseHandling; - target.DateTimeZoneHandling = settings.DateTimeZoneHandling; - target.DefaultValueHandling = settings.DefaultValueHandling; - target.EqualityComparer = settings.EqualityComparer; - target.Error = settings.Error; - target.FloatFormatHandling = settings.FloatFormatHandling; - target.FloatParseHandling = settings.FloatParseHandling; - target.Formatting = settings.Formatting; - target.MaxDepth = settings.MaxDepth; - target.MetadataPropertyHandling = settings.MetadataPropertyHandling; - target.MissingMemberHandling = settings.MissingMemberHandling; - target.NullValueHandling = settings.NullValueHandling; - target.ObjectCreationHandling = settings.ObjectCreationHandling; - target.PreserveReferencesHandling = settings.PreserveReferencesHandling; - target.ReferenceLoopHandling = settings.ReferenceLoopHandling; - target.ReferenceResolverProvider = settings.ReferenceResolverProvider; - target.SerializationBinder = settings.SerializationBinder; - target.StringEscapeHandling = settings.StringEscapeHandling; - target.TraceWriter = settings.TraceWriter; - target.TypeNameAssemblyFormatHandling = settings.TypeNameAssemblyFormatHandling; - target.TypeNameHandling = settings.TypeNameHandling; - target.Converters = settings.Converters.ToList(); - } - } -} diff --git a/Source/EventFlow/Snapshots/SnapshotMetadata.cs b/Source/EventFlow/Snapshots/SnapshotMetadata.cs index 501794798..001340cc1 100644 --- a/Source/EventFlow/Snapshots/SnapshotMetadata.cs +++ b/Source/EventFlow/Snapshots/SnapshotMetadata.cs @@ -25,7 +25,6 @@ using System.Globalization; using System.Linq; using EventFlow.Core; -using Newtonsoft.Json; namespace EventFlow.Snapshots { @@ -52,42 +51,36 @@ public SnapshotMetadata(params KeyValuePair[] keyValuePairs) { } - [JsonIgnore] public string AggregateId { get => GetMetadataValue(SnapshotMetadataKeys.AggregateId); set => Add(SnapshotMetadataKeys.AggregateId, value); } - [JsonIgnore] public string AggregateName { get => GetMetadataValue(SnapshotMetadataKeys.AggregateName); set => Add(SnapshotMetadataKeys.AggregateName, value); } - [JsonIgnore] public int AggregateSequenceNumber { get => GetMetadataValue(SnapshotMetadataKeys.AggregateSequenceNumber, int.Parse); set => Add(SnapshotMetadataKeys.AggregateSequenceNumber, value.ToString(CultureInfo.InvariantCulture)); } - [JsonIgnore] public string SnapshotName { get => GetMetadataValue(SnapshotMetadataKeys.SnapshotName); set => Add(SnapshotMetadataKeys.SnapshotName, value); } - [JsonIgnore] public int SnapshotVersion { get => GetMetadataValue(SnapshotMetadataKeys.SnapshotVersion, int.Parse); set => Add(SnapshotMetadataKeys.SnapshotVersion, value.ToString(CultureInfo.InvariantCulture)); } - [JsonIgnore] public IReadOnlyCollection PreviousSourceIds { get