├── .editorconfig ├── .github ├── ISSUE_TEMPLATE.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── dotnet-format-action.yml │ ├── dotnet-linux.yml │ ├── dotnet-macos.yml │ ├── dotnet-windows.yml │ ├── nuget-push-public.yml │ └── release.yml ├── .gitignore ├── .releaserc ├── LICENSE ├── README.md ├── Samples └── CSharp │ └── ASPCore │ └── WebAPISampleProject │ ├── Common │ ├── Common.csproj │ └── Models │ │ ├── Customer.cs │ │ └── Order.cs │ ├── WebAPISampleProject.BinaryGo │ ├── Controllers │ │ └── BinaryGoController.cs │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── WebAPISampleProject.BinaryGo.csproj │ ├── appsettings.Development.json │ └── appsettings.json │ ├── WebAPISampleProject.DependencyInjection │ ├── Controllers │ │ └── DIController.cs │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── WebAPISampleProject.DependencyInjection.csproj │ ├── appsettings.Development.json │ └── appsettings.json │ ├── WebAPISampleProject.MemoryPack │ ├── Controllers │ │ └── MemoryPackController.cs │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── WebAPISampleProject.MemoryPack.csproj │ ├── appsettings.Development.json │ └── appsettings.json │ ├── WebAPISampleProject.MessagePack │ ├── Controllers │ │ └── MessagePackController.cs │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── WebAPISampleProject.MessagePack.csproj │ ├── appsettings.Development.json │ └── appsettings.json │ ├── WebAPISampleProject.NewtonSoft.Json │ ├── Controllers │ │ └── NewtonSoftJsonController.cs │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── WebAPISampleProject.NewtonSoft.Json.csproj │ ├── appsettings.Development.json │ └── appsettings.json │ ├── WebAPISampleProject.System.Text.Json │ ├── Controllers │ │ ├── SystemTextJsonBinaryController.cs │ │ └── SystemTextJsonController.cs │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── WebAPISampleProject.System.Text.Json.csproj │ ├── appsettings.Development.json │ └── appsettings.json │ ├── WebAPISampleProject.System.Text.Xml │ ├── Controllers │ │ └── SystemTextXmlController.cs │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── WebAPISampleProject.System.Text.Xml.csproj │ ├── appsettings.Development.json │ └── appsettings.json │ ├── WebAPISampleProject.System.YamlDotNet │ ├── Controllers │ │ └── YamlDotNetController.cs │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── WebAPISampleProject.System.YamlDotNet.csproj │ ├── appsettings.Development.json │ └── appsettings.json │ └── WebAPISampleProject.sln └── src ├── CSharp ├── EasyMicroservices.Serialization-net6.0.sln ├── EasyMicroservices.Serialization-net7.0.sln ├── EasyMicroservices.Serialization-net8.0.sln ├── EasyMicroservices.Serialization.BinaryGo │ ├── BinaryGoExtensions.cs │ ├── EasyMicroservices.Serialization.BinaryGo.csproj │ └── Providers │ │ └── BinaryGoProvider.cs ├── EasyMicroservices.Serialization.DependencyInjection │ ├── EasyMicroservices.Serialization.DependencyInjection.csproj │ └── SerializationExtensions.cs ├── EasyMicroservices.Serialization.MemoryPack │ ├── EasyMicroservices.Serialization.MemoryPack.csproj │ ├── MemoryPackExtensions.cs │ └── Providers │ │ └── MemoryPackProvider.cs ├── EasyMicroservices.Serialization.MessagePack │ ├── EasyMicroservices.Serialization.MessagePack.csproj │ ├── MessagePackExtensions.cs │ └── Providers │ │ └── MessagePackProvider.cs ├── EasyMicroservices.Serialization.NewtonSoft.Json │ ├── EasyMicroservices.Serialization.Newtonsoft.Json.csproj │ ├── NewtonsoftJsonExtensions.cs │ └── Providers │ │ └── NewtonsoftJsonProvider.cs ├── EasyMicroservices.Serialization.System.Text.Json │ ├── EasyMicroservices.Serialization.System.Text.Json.csproj │ ├── Providers │ │ ├── SystemTextJsonBinaryProvider.cs │ │ └── SystemTextJsonProvider.cs │ └── SystemTextJsonExtensions.cs ├── EasyMicroservices.Serialization.System.Text.Xml │ ├── EasyMicroservices.Serialization.System.Text.Xml.csproj │ ├── Providers │ │ └── SystemTextXmlProvider.cs │ └── SystemTextXmlExtensions.cs ├── EasyMicroservices.Serialization.Tests │ ├── EasyMicroservices.Serialization.Tests.csproj │ └── Providers │ │ ├── BinarySerialization │ │ ├── BaseBinarySerializationTest.cs │ │ ├── BinaryGoSerializationTest.cs │ │ ├── MemoryPackSerializationTests.cs │ │ └── MessagePackSerializationTests.cs │ │ ├── Models │ │ ├── ClassToSerialize.cs │ │ └── Gender.cs │ │ └── TextSerialization │ │ ├── BaseTextSerializationTest.cs │ │ ├── NewtonsoftJsonSerializationTest.cs │ │ ├── SystemTextJsonSerializationTest.cs │ │ ├── SystemTextXmlSerializationTest.cs │ │ └── YamlDotNetSerializationTest.cs ├── EasyMicroservices.Serialization.YamlDotNet │ ├── EasyMicroservices.Serialization.YamlDotNet.csproj │ ├── Providers │ │ └── DotNetYamlProvider.cs │ └── YamlDotNetExtensions.cs ├── EasyMicroservices.Serialization.sln ├── EasyMicroservices.Serialization │ ├── EasyMicroservices.Serialization.csproj │ ├── Interfaces │ │ ├── IBaseSerializationProvider.cs │ │ ├── IBinarySerializationProvider.cs │ │ └── ITextSerializationProvider.cs │ ├── Options │ │ ├── SerializationOption.cs │ │ └── SerializationOptionBuilder.cs │ └── Providers │ │ ├── BaseProvider.cs │ │ ├── BinarySerializationBaseProvider.cs │ │ └── TextSerializationBaseProvider.cs ├── coverage-badge-branch.svg ├── coverage-badge-line.svg └── coverage.opencover.xml └── Golang ├── encodingjson ├── lib.go └── lib_test.go ├── go.mod ├── go.sum └── lib.go /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Default settings: 7 | # A newline ending every file 8 | # Use 4 spaces as indentation 9 | [*] 10 | insert_final_newline = true 11 | indent_style = space 12 | indent_size = 4 13 | trim_trailing_whitespace = true 14 | 15 | # Generated code 16 | [*{_AssemblyInfo.cs,.notsupported.cs,AsmOffsets.cs}] 17 | generated_code = true 18 | 19 | # C# files 20 | [*.cs] 21 | # New line preferences 22 | csharp_new_line_before_open_brace = all 23 | csharp_new_line_before_else = true 24 | csharp_new_line_before_catch = true 25 | csharp_new_line_before_finally = true 26 | csharp_new_line_before_members_in_object_initializers = true 27 | csharp_new_line_before_members_in_anonymous_types = true 28 | csharp_new_line_between_query_expression_clauses = true 29 | 30 | # Indentation preferences 31 | csharp_indent_block_contents = true 32 | csharp_indent_braces = false 33 | csharp_indent_case_contents = true 34 | csharp_indent_case_contents_when_block = true 35 | csharp_indent_switch_labels = true 36 | csharp_indent_labels = one_less_than_current 37 | 38 | # Modifier preferences 39 | csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion 40 | 41 | # avoid this. unless absolutely necessary 42 | dotnet_style_qualification_for_field = false:suggestion 43 | dotnet_style_qualification_for_property = false:suggestion 44 | dotnet_style_qualification_for_method = false:suggestion 45 | dotnet_style_qualification_for_event = false:suggestion 46 | 47 | # Types: use keywords instead of BCL types, and permit var only when the type is clear 48 | csharp_style_var_for_built_in_types = false:suggestion 49 | csharp_style_var_when_type_is_apparent = false:none 50 | csharp_style_var_elsewhere = false:suggestion 51 | dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion 52 | dotnet_style_predefined_type_for_member_access = true:suggestion 53 | 54 | # name all constant fields using PascalCase 55 | dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion 56 | dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields 57 | dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style 58 | dotnet_naming_symbols.constant_fields.applicable_kinds = field 59 | dotnet_naming_symbols.constant_fields.required_modifiers = const 60 | dotnet_naming_style.pascal_case_style.capitalization = pascal_case 61 | 62 | # static fields should have s_ prefix 63 | dotnet_naming_rule.static_fields_should_have_prefix.severity = suggestion 64 | dotnet_naming_rule.static_fields_should_have_prefix.symbols = static_fields 65 | dotnet_naming_rule.static_fields_should_have_prefix.style = static_prefix_style 66 | dotnet_naming_symbols.static_fields.applicable_kinds = field 67 | dotnet_naming_symbols.static_fields.required_modifiers = static 68 | dotnet_naming_symbols.static_fields.applicable_accessibilities = private, internal, private_protected 69 | dotnet_naming_style.static_prefix_style.required_prefix = s_ 70 | dotnet_naming_style.static_prefix_style.capitalization = camel_case 71 | 72 | # internal and private fields should be _camelCase 73 | dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion 74 | dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields 75 | dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style 76 | dotnet_naming_symbols.private_internal_fields.applicable_kinds = field 77 | dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal 78 | dotnet_naming_style.camel_case_underscore_style.required_prefix = _ 79 | dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case 80 | 81 | # Code style defaults 82 | csharp_using_directive_placement = outside_namespace:suggestion 83 | dotnet_sort_system_directives_first = true 84 | csharp_prefer_braces = true:silent 85 | csharp_preserve_single_line_blocks = true:none 86 | csharp_preserve_single_line_statements = false:none 87 | csharp_prefer_static_local_function = true:suggestion 88 | csharp_prefer_simple_using_statement = false:none 89 | csharp_style_prefer_switch_expression = true:suggestion 90 | dotnet_style_readonly_field = true:suggestion 91 | 92 | # Expression-level preferences 93 | dotnet_style_object_initializer = true:suggestion 94 | dotnet_style_collection_initializer = true:suggestion 95 | dotnet_style_explicit_tuple_names = true:suggestion 96 | dotnet_style_coalesce_expression = true:suggestion 97 | dotnet_style_null_propagation = true:suggestion 98 | dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion 99 | dotnet_style_prefer_inferred_tuple_names = true:suggestion 100 | dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion 101 | dotnet_style_prefer_auto_properties = true:suggestion 102 | dotnet_style_prefer_conditional_expression_over_assignment = true:silent 103 | dotnet_style_prefer_conditional_expression_over_return = true:silent 104 | csharp_prefer_simple_default_expression = true:suggestion 105 | 106 | # Expression-bodied members 107 | csharp_style_expression_bodied_methods = true:silent 108 | csharp_style_expression_bodied_constructors = true:silent 109 | csharp_style_expression_bodied_operators = true:silent 110 | csharp_style_expression_bodied_properties = true:silent 111 | csharp_style_expression_bodied_indexers = true:silent 112 | csharp_style_expression_bodied_accessors = true:silent 113 | csharp_style_expression_bodied_lambdas = true:silent 114 | csharp_style_expression_bodied_local_functions = true:silent 115 | 116 | # Pattern matching 117 | csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion 118 | csharp_style_pattern_matching_over_as_with_null_check = true:suggestion 119 | csharp_style_inlined_variable_declaration = true:suggestion 120 | 121 | # Null checking preferences 122 | csharp_style_throw_expression = true:suggestion 123 | csharp_style_conditional_delegate_call = true:suggestion 124 | 125 | # Other features 126 | csharp_style_prefer_index_operator = false:none 127 | csharp_style_prefer_range_operator = false:none 128 | csharp_style_pattern_local_over_anonymous_function = false:none 129 | 130 | # Space preferences 131 | csharp_space_after_cast = false 132 | csharp_space_after_colon_in_inheritance_clause = true 133 | csharp_space_after_comma = true 134 | csharp_space_after_dot = false 135 | csharp_space_after_keywords_in_control_flow_statements = true 136 | csharp_space_after_semicolon_in_for_statement = true 137 | csharp_space_around_binary_operators = before_and_after 138 | csharp_space_around_declaration_statements = do_not_ignore 139 | csharp_space_before_colon_in_inheritance_clause = true 140 | csharp_space_before_comma = false 141 | csharp_space_before_dot = false 142 | csharp_space_before_open_square_brackets = false 143 | csharp_space_before_semicolon_in_for_statement = false 144 | csharp_space_between_empty_square_brackets = false 145 | csharp_space_between_method_call_empty_parameter_list_parentheses = false 146 | csharp_space_between_method_call_name_and_opening_parenthesis = false 147 | csharp_space_between_method_call_parameter_list_parentheses = false 148 | csharp_space_between_method_declaration_empty_parameter_list_parentheses = false 149 | csharp_space_between_method_declaration_name_and_open_parenthesis = false 150 | csharp_space_between_method_declaration_parameter_list_parentheses = false 151 | csharp_space_between_parentheses = false 152 | csharp_space_between_square_brackets = false 153 | 154 | # License header 155 | file_header_template = Licensed to the .NET Foundation under one or more agreements.\nThe .NET Foundation licenses this file to you under the MIT license. 156 | 157 | # C++ Files 158 | [*.{cpp,h,in}] 159 | curly_bracket_next_line = true 160 | indent_brace_style = Allman 161 | 162 | # Xml project files 163 | [*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}] 164 | indent_size = 2 165 | 166 | [*.{csproj,vbproj,proj,nativeproj,locproj}] 167 | charset = utf-8 168 | 169 | # Xml build files 170 | [*.builds] 171 | indent_size = 2 172 | 173 | # Xml files 174 | [*.{xml,stylecop,resx,ruleset}] 175 | indent_size = 2 176 | 177 | # Xml config files 178 | [*.{props,targets,config,nuspec}] 179 | indent_size = 2 180 | 181 | # YAML config files 182 | [*.{yml,yaml}] 183 | indent_size = 2 184 | 185 | # Shell scripts 186 | [*.sh] 187 | end_of_line = lf 188 | [*.{cmd,bat}] 189 | end_of_line = crlf -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Title 2 | 3 | 4 | 5 | ## Description 6 | 7 | 8 | 9 | ### Checklist: 10 | 11 | - [ ] It's a bug report. 12 | - [ ] It's a feature request. 13 | - [ ] Related language label is selected. 14 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Description 2 | 3 | 4 | 5 | ### Related issue(s) 6 | 7 | 8 | 9 | ### Checklist: 10 | 11 | - [ ] It refers to an [Issue](https://github.com/EasyMicroservices/FileManager/issues). 12 | - [ ] It fixes a bug. 13 | - [ ] It's a new feature (non-breaking change which adds functionality) 14 | - [ ] It's a breaking (fix or feature that would cause existing functionality to change) 15 | - [ ] My code follows the code style of this project. 16 | - [ ] I have added tests to cover my changes. 17 | - [ ] All new and existing tests passed. 18 | - [ ] CHANGELOG is updated. 19 | - [ ] Related language label is selected. 20 | -------------------------------------------------------------------------------- /.github/workflows/dotnet-format-action.yml: -------------------------------------------------------------------------------- 1 | name: dotnet format 2 | on: 3 | push: 4 | branches: [develop] 5 | 6 | jobs: 7 | format: 8 | runs-on: ubuntu-latest 9 | 10 | steps: 11 | - uses: actions/checkout@v2 12 | - name: Setup .NET 13 | uses: actions/setup-dotnet@v3 14 | with: 15 | dotnet-version: | 16 | 3.1.x 17 | 5.0.x 18 | 6.0.x 19 | 7.0.x 20 | 8.0.x 21 | - name: Run dotnet format 22 | id: format 23 | uses: jfversluis/dotnet-format@v1.0.5 24 | with: 25 | repo-token: ${{ secrets.GITHUB_TOKEN }} 26 | action: "fix" 27 | workspace: "./src/CSharp/EasyMicroservices.Serialization-net6.0.sln" 28 | - name: Test 29 | run: dotnet test ./src/CSharp/EasyMicroservices.Serialization-net6.0.sln 30 | - name: Test to generate Code Coverage Report 31 | working-directory: ./src/CSharp 32 | run: | 33 | dotnet build ./EasyMicroservices.Serialization-net6.0.sln 34 | dotnet tool install --global coverlet.console 35 | coverlet EasyMicroservices.Serialization.Tests/bin/Debug/net6.0/EasyMicroservices.Serialization.Tests.dll --target "dotnet" --targetargs "test EasyMicroservices.Serialization.Tests/bin/Debug/net6.0/EasyMicroservices.Serialization.Tests.dll --no-build" -f opencover 36 | - name: OpenCover Badge Generator 37 | uses: danpetitt/open-cover-badge-generator-action@v1.0.9 38 | with: 39 | path-to-opencover-xml: ./src/CSharp/coverage.opencover.xml 40 | path-to-badges: ./src/CSharp 41 | minimum-coverage: 50 42 | repo-token: ${{ secrets.GITHUB_TOKEN }} 43 | - name: Commit files 44 | if: steps.format.outputs.has-changes == 'true' 45 | uses: EndBug/add-and-commit@v4.1.0 46 | with: 47 | author_name: Github Actions 48 | author_email: actions@github.com 49 | message: "chore: Automated dotnet-format update" 50 | ref: ${{ github.head_ref }} 51 | env: 52 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 53 | -------------------------------------------------------------------------------- /.github/workflows/dotnet-linux.yml: -------------------------------------------------------------------------------- 1 | name: Linux (dotnet build and test) 2 | 3 | on: 4 | push: 5 | branches: [develop] 6 | pull_request: 7 | branches: [develop] 8 | 9 | jobs: 10 | os-tests: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v3 14 | - name: Setup .NET 15 | uses: actions/setup-dotnet@v3 16 | with: 17 | dotnet-version: | 18 | 3.1.x 19 | 5.0.x 20 | 6.0.x 21 | 7.0.x 22 | 8.0.x 23 | - name: Restore dependencies 24 | run: | 25 | dotnet restore ./src/CSharp/EasyMicroservices.Serialization-net6.0.sln 26 | dotnet restore ./src/CSharp/EasyMicroservices.Serialization-net7.0.sln 27 | - name: Build 28 | run: | 29 | dotnet build ./src/CSharp/EasyMicroservices.Serialization-net6.0.sln --no-restore 30 | dotnet build ./src/CSharp/EasyMicroservices.Serialization-net7.0.sln --no-restore 31 | - name: Test 32 | run: | 33 | dotnet test ./src/CSharp/EasyMicroservices.Serialization-net6.0.sln --no-build --verbosity normal 34 | dotnet test ./src/CSharp/EasyMicroservices.Serialization-net7.0.sln --no-build --verbosity normal 35 | -------------------------------------------------------------------------------- /.github/workflows/dotnet-macos.yml: -------------------------------------------------------------------------------- 1 | name: MacOS (dotnet build and test) 2 | 3 | on: 4 | push: 5 | branches: [develop] 6 | pull_request: 7 | branches: [develop] 8 | 9 | jobs: 10 | os-tests: 11 | runs-on: macos-latest 12 | steps: 13 | - uses: actions/checkout@v3 14 | - name: Setup .NET 15 | uses: actions/setup-dotnet@v3 16 | with: 17 | dotnet-version: | 18 | 3.1.x 19 | 5.0.x 20 | 6.0.x 21 | 7.0.x 22 | 8.0.x 23 | - name: Restore dependencies 24 | run: | 25 | dotnet restore ./src/CSharp/EasyMicroservices.Serialization-net6.0.sln 26 | dotnet restore ./src/CSharp/EasyMicroservices.Serialization-net7.0.sln 27 | - name: Build 28 | run: | 29 | dotnet build ./src/CSharp/EasyMicroservices.Serialization-net6.0.sln --no-restore 30 | dotnet build ./src/CSharp/EasyMicroservices.Serialization-net7.0.sln --no-restore 31 | - name: Test 32 | run: | 33 | dotnet test ./src/CSharp/EasyMicroservices.Serialization-net6.0.sln --no-build --verbosity normal 34 | dotnet test ./src/CSharp/EasyMicroservices.Serialization-net7.0.sln --no-build --verbosity normal 35 | -------------------------------------------------------------------------------- /.github/workflows/dotnet-windows.yml: -------------------------------------------------------------------------------- 1 | name: Windows (dotnet build and test) 2 | 3 | on: 4 | push: 5 | branches: [develop] 6 | pull_request: 7 | branches: [develop] 8 | 9 | jobs: 10 | os-tests: 11 | runs-on: windows-latest 12 | steps: 13 | - uses: actions/checkout@v3 14 | - name: Setup .NET 15 | uses: actions/setup-dotnet@v3 16 | with: 17 | dotnet-version: | 18 | 3.1.x 19 | 5.0.x 20 | 6.0.x 21 | 7.0.x 22 | 8.0.x 23 | - name: Restore dependencies 24 | run: dotnet restore ./src/CSharp/EasyMicroservices.Serialization.sln 25 | - name: Build 26 | run: dotnet build ./src/CSharp/EasyMicroservices.Serialization.sln --no-restore 27 | - name: Test 28 | run: dotnet test ./src/CSharp/EasyMicroservices.Serialization.sln --no-build --verbosity normal 29 | -------------------------------------------------------------------------------- /.github/workflows/nuget-push-public.yml: -------------------------------------------------------------------------------- 1 | name: NuGet Push Public 2 | 3 | on: [workflow_dispatch] 4 | 5 | jobs: 6 | build-test-prep-push: 7 | runs-on: windows-latest 8 | steps: 9 | - uses: actions/checkout@v2 10 | - uses: actions/setup-dotnet@v3 11 | with: 12 | dotnet-version: | 13 | 3.1.x 14 | 5.0.x 15 | 6.0.x 16 | 7.0.x 17 | 8.0.x 18 | env: 19 | DOTNET_INSTALL_DIR: /usr/share/dotnet 20 | - name: Restore dependencies 21 | run: | 22 | dotnet restore ./src/CSharp/EasyMicroservices.Serialization-net6.0.sln 23 | dotnet restore ./src/CSharp/EasyMicroservices.Serialization-net7.0.sln 24 | dotnet restore ./src/CSharp/EasyMicroservices.Serialization-net8.0.sln 25 | - name: Build 26 | run: | 27 | dotnet build ./src/CSharp/EasyMicroservices.Serialization-net6.0.sln --no-restore 28 | dotnet build ./src/CSharp/EasyMicroservices.Serialization-net7.0.sln --no-restore 29 | dotnet build ./src/CSharp/EasyMicroservices.Serialization-net8.0.sln --no-restore 30 | - name: Test 31 | run: | 32 | dotnet test ./src/CSharp/EasyMicroservices.Serialization-net6.0.sln --no-build --verbosity normal 33 | dotnet test ./src/CSharp/EasyMicroservices.Serialization-net7.0.sln --no-build --verbosity normal 34 | dotnet test ./src/CSharp/EasyMicroservices.Serialization-net8.0.sln --no-build --verbosity normal 35 | - name: Create the package 36 | run: dotnet pack ./src/CSharp/EasyMicroservices.Serialization.sln --output nupkgs 37 | - name: Publish the package to NuGet.org 38 | run: dotnet nuget push nupkgs\*.nupkg -k ${{secrets.NUGET_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate 39 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: [workflow_dispatch] 4 | 5 | jobs: 6 | build-test-prep-release: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v2 10 | - uses: actions/setup-dotnet@v1 11 | with: 12 | dotnet-version: | 13 | 3.1.x 14 | 5.0.x 15 | 6.0.x 16 | 7.0.x 17 | 8.0.x 18 | env: 19 | DOTNET_INSTALL_DIR: /usr/share/dotnet 20 | - name: build and test 21 | run: | 22 | dotnet restore ./src/CSharp/EasyMicroservices.Serialization-net6.0.sln 23 | dotnet restore ./src/CSharp/EasyMicroservices.Serialization-net7.0.sln 24 | dotnet restore ./src/CSharp/EasyMicroservices.Serialization-net8.0.sln 25 | dotnet build ./src/CSharp/EasyMicroservices.Serialization-net6.0.sln --no-restore 26 | dotnet build ./src/CSharp/EasyMicroservices.Serialization-net7.0.sln --no-restore 27 | dotnet build ./src/CSharp/EasyMicroservices.Serialization-net8.0.sln --no-restore 28 | dotnet test ./src/CSharp/EasyMicroservices.Serialization-net6.0.sln --no-build 29 | dotnet test ./src/CSharp/EasyMicroservices.Serialization-net7.0.sln --no-build 30 | dotnet test ./src/CSharp/EasyMicroservices.Serialization-net8.0.sln --no-build 31 | - name: setup semantic-release 32 | run: | 33 | npm install -D semantic-release 34 | npm install -D @semantic-release/git 35 | npm install -D @semantic-release/changelog 36 | npm install -D @semantic-release/exec 37 | npm install -D semantic-release-dotnet 38 | npm install -D conventional-changelog-conventionalcommits 39 | - name: run semantic-release 40 | env: 41 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 42 | run: npx semantic-release 43 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Aa][Rr][Mm]/ 27 | [Aa][Rr][Mm]64/ 28 | bld/ 29 | [Bb]in/ 30 | [Oo]bj/ 31 | [Ll]og/ 32 | [Ll]ogs/ 33 | 34 | # Visual Studio 2015/2017 cache/options directory 35 | .vs/ 36 | # Uncomment if you have tasks that create the project's static files in wwwroot 37 | #wwwroot/ 38 | 39 | # Visual Studio 2017 auto generated files 40 | Generated\ Files/ 41 | 42 | # MSTest test Results 43 | [Tt]est[Rr]esult*/ 44 | [Bb]uild[Ll]og.* 45 | 46 | # NUnit 47 | *.VisualState.xml 48 | TestResult.xml 49 | nunit-*.xml 50 | 51 | # Build Results of an ATL Project 52 | [Dd]ebugPS/ 53 | [Rr]eleasePS/ 54 | dlldata.c 55 | 56 | # Benchmark Results 57 | BenchmarkDotNet.Artifacts/ 58 | 59 | # .NET Core 60 | project.lock.json 61 | project.fragment.lock.json 62 | artifacts/ 63 | 64 | # StyleCop 65 | StyleCopReport.xml 66 | 67 | # Files built by Visual Studio 68 | *_i.c 69 | *_p.c 70 | *_h.h 71 | *.ilk 72 | *.meta 73 | *.obj 74 | *.iobj 75 | *.pch 76 | *.pdb 77 | *.ipdb 78 | *.pgc 79 | *.pgd 80 | *.rsp 81 | *.sbr 82 | *.tlb 83 | *.tli 84 | *.tlh 85 | *.tmp 86 | *.tmp_proj 87 | *_wpftmp.csproj 88 | *.log 89 | *.vspscc 90 | *.vssscc 91 | .builds 92 | *.pidb 93 | *.svclog 94 | *.scc 95 | 96 | # Chutzpah Test files 97 | _Chutzpah* 98 | 99 | # Visual C++ cache files 100 | ipch/ 101 | *.aps 102 | *.ncb 103 | *.opendb 104 | *.opensdf 105 | *.sdf 106 | *.cachefile 107 | *.VC.db 108 | *.VC.VC.opendb 109 | 110 | # Visual Studio profiler 111 | *.psess 112 | *.vsp 113 | *.vspx 114 | *.sap 115 | 116 | # Visual Studio Trace Files 117 | *.e2e 118 | 119 | # TFS 2012 Local Workspace 120 | $tf/ 121 | 122 | # Guidance Automation Toolkit 123 | *.gpState 124 | 125 | # ReSharper is a .NET coding add-in 126 | _ReSharper*/ 127 | *.[Rr]e[Ss]harper 128 | *.DotSettings.user 129 | 130 | # TeamCity is a build add-in 131 | _TeamCity* 132 | 133 | # DotCover is a Code Coverage Tool 134 | *.dotCover 135 | 136 | # AxoCover is a Code Coverage Tool 137 | .axoCover/* 138 | !.axoCover/settings.json 139 | 140 | # Visual Studio code coverage results 141 | *.coverage 142 | *.coveragexml 143 | 144 | # NCrunch 145 | _NCrunch_* 146 | .*crunch*.local.xml 147 | nCrunchTemp_* 148 | 149 | # MightyMoose 150 | *.mm.* 151 | AutoTest.Net/ 152 | 153 | # Web workbench (sass) 154 | .sass-cache/ 155 | 156 | # Installshield output folder 157 | [Ee]xpress/ 158 | 159 | # DocProject is a documentation generator add-in 160 | DocProject/buildhelp/ 161 | DocProject/Help/*.HxT 162 | DocProject/Help/*.HxC 163 | DocProject/Help/*.hhc 164 | DocProject/Help/*.hhk 165 | DocProject/Help/*.hhp 166 | DocProject/Help/Html2 167 | DocProject/Help/html 168 | 169 | # Click-Once directory 170 | publish/ 171 | 172 | # Publish Web Output 173 | *.[Pp]ublish.xml 174 | *.azurePubxml 175 | # Note: Comment the next line if you want to checkin your web deploy settings, 176 | # but database connection strings (with potential passwords) will be unencrypted 177 | *.pubxml 178 | *.publishproj 179 | 180 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 181 | # checkin your Azure Web App publish settings, but sensitive information contained 182 | # in these scripts will be unencrypted 183 | PublishScripts/ 184 | 185 | # NuGet Packages 186 | *.nupkg 187 | # NuGet Symbol Packages 188 | *.snupkg 189 | # The packages folder can be ignored because of Package Restore 190 | **/[Pp]ackages/* 191 | # except build/, which is used as an MSBuild target. 192 | !**/[Pp]ackages/build/ 193 | # Uncomment if necessary however generally it will be regenerated when needed 194 | #!**/[Pp]ackages/repositories.config 195 | # NuGet v3's project.json files produces more ignorable files 196 | *.nuget.props 197 | *.nuget.targets 198 | 199 | # Microsoft Azure Build Output 200 | csx/ 201 | *.build.csdef 202 | 203 | # Microsoft Azure Emulator 204 | ecf/ 205 | rcf/ 206 | 207 | # Windows Store app package directories and files 208 | AppPackages/ 209 | BundleArtifacts/ 210 | Package.StoreAssociation.xml 211 | _pkginfo.txt 212 | *.appx 213 | *.appxbundle 214 | *.appxupload 215 | 216 | # Visual Studio cache files 217 | # files ending in .cache can be ignored 218 | *.[Cc]ache 219 | # but keep track of directories ending in .cache 220 | !?*.[Cc]ache/ 221 | 222 | # Others 223 | ClientBin/ 224 | ~$* 225 | *~ 226 | *.dbmdl 227 | *.dbproj.schemaview 228 | *.jfm 229 | *.pfx 230 | *.publishsettings 231 | orleans.codegen.cs 232 | 233 | # Including strong name files can present a security risk 234 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 235 | #*.snk 236 | 237 | # Since there are multiple workflows, uncomment next line to ignore bower_components 238 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 239 | #bower_components/ 240 | 241 | # RIA/Silverlight projects 242 | Generated_Code/ 243 | 244 | # Backup & report files from converting an old project file 245 | # to a newer Visual Studio version. Backup files are not needed, 246 | # because we have git ;-) 247 | _UpgradeReport_Files/ 248 | Backup*/ 249 | UpgradeLog*.XML 250 | UpgradeLog*.htm 251 | ServiceFabricBackup/ 252 | *.rptproj.bak 253 | 254 | # SQL Server files 255 | *.mdf 256 | *.ldf 257 | *.ndf 258 | 259 | # Business Intelligence projects 260 | *.rdl.data 261 | *.bim.layout 262 | *.bim_*.settings 263 | *.rptproj.rsuser 264 | *- [Bb]ackup.rdl 265 | *- [Bb]ackup ([0-9]).rdl 266 | *- [Bb]ackup ([0-9][0-9]).rdl 267 | 268 | # Microsoft Fakes 269 | FakesAssemblies/ 270 | 271 | # GhostDoc plugin setting file 272 | *.GhostDoc.xml 273 | 274 | # Node.js Tools for Visual Studio 275 | .ntvs_analysis.dat 276 | node_modules/ 277 | 278 | # Visual Studio 6 build log 279 | *.plg 280 | 281 | # Visual Studio 6 workspace options file 282 | *.opt 283 | 284 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 285 | *.vbw 286 | 287 | # Visual Studio LightSwitch build output 288 | **/*.HTMLClient/GeneratedArtifacts 289 | **/*.DesktopClient/GeneratedArtifacts 290 | **/*.DesktopClient/ModelManifest.xml 291 | **/*.Server/GeneratedArtifacts 292 | **/*.Server/ModelManifest.xml 293 | _Pvt_Extensions 294 | 295 | # Paket dependency manager 296 | .paket/paket.exe 297 | paket-files/ 298 | 299 | # FAKE - F# Make 300 | .fake/ 301 | 302 | # CodeRush personal settings 303 | .cr/personal 304 | 305 | # Python Tools for Visual Studio (PTVS) 306 | __pycache__/ 307 | *.pyc 308 | 309 | # Cake - Uncomment if you are using it 310 | # tools/** 311 | # !tools/packages.config 312 | 313 | # Tabs Studio 314 | *.tss 315 | 316 | # Telerik's JustMock configuration file 317 | *.jmconfig 318 | 319 | # BizTalk build output 320 | *.btp.cs 321 | *.btm.cs 322 | *.odx.cs 323 | *.xsd.cs 324 | 325 | # OpenCover UI analysis results 326 | OpenCover/ 327 | 328 | # Azure Stream Analytics local run output 329 | ASALocalRun/ 330 | 331 | # MSBuild Binary and Structured Log 332 | *.binlog 333 | 334 | # NVidia Nsight GPU debugger configuration file 335 | *.nvuser 336 | 337 | # MFractors (Xamarin productivity tool) working folder 338 | .mfractor/ 339 | 340 | # Local History for Visual Studio 341 | .localhistory/ 342 | 343 | # BeatPulse healthcheck temp database 344 | healthchecksdb 345 | 346 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 347 | MigrationBackup/ 348 | 349 | # Ionide (cross platform F# VS Code tools) working folder 350 | .ionide/ 351 | 352 | ## For golang 353 | # If you prefer the allow list template instead of the deny list, see community template: 354 | # https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore 355 | # 356 | # Binaries for programs and plugins 357 | *.exe 358 | *.exe~ 359 | *.dll 360 | *.so 361 | *.dylib 362 | 363 | # Test binary, built with `go test -c` 364 | *.test 365 | 366 | # Output of the go coverage tool, specifically when used with LiteIDE 367 | *.out 368 | 369 | # Dependency directories (remove the comment below to include it) 370 | # vendor/ 371 | 372 | # Idea dirs 373 | .idea/ 374 | .vscode/ 375 | -------------------------------------------------------------------------------- /.releaserc: -------------------------------------------------------------------------------- 1 | { 2 | "branches": [ 3 | "develop" 4 | ], 5 | "plugins": [ 6 | [ 7 | "@semantic-release/commit-analyzer", 8 | { 9 | "preset": "conventionalcommits" 10 | } 11 | ], 12 | [ 13 | "@semantic-release/release-notes-generator", 14 | { 15 | "preset": "conventionalcommits" 16 | } 17 | ], 18 | "@semantic-release/github", 19 | "@semantic-release/changelog", 20 | [ 21 | "semantic-release-dotnet", 22 | { 23 | "paths": [ 24 | "Directory.Build.props" 25 | ], 26 | } 27 | ], 28 | [ 29 | "@semantic-release/git", 30 | { 31 | "assets": [ 32 | "Directory.Build.props", 33 | "*.md", 34 | "docs" 35 | ], 36 | "message": "chore: ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" 37 | } 38 | ] 39 | ] 40 | } 41 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Easy-Microservise 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Line Coverage Status](./src/CSharp/coverage-badge-line.svg)](https://github.com/danpetitt/open-cover-badge-generator-action/) 2 | 3 | Introduction 4 | ------------- 5 | 6 | In the increasingly digitized realm of software development, the need for efficient serialization mechanisms is paramount for applications that transmit data across different systems or persist data to storage mediums. Serialization is the process of converting an object into a format that can be stored or transmitted and reconstructed later. The interfaces "ITextSerializationProvider" and "IBinarySerializationProvider" serve critical roles in this context by defining contracts for serialization and deserialization of objects into textual and binary formats, respectively. 7 | 8 | These interfaces are essential because different use cases and environments require diverse serialization formats. Textual serialization, often used for human-readable formats like JSON, XML, and YAML, is necessary for configurations, web communications, and more, where readability and standardization are beneficial. Binary serialization, conversely, is optimized for performance-critical contexts, where compactness and speed are essential, such as in high-performance computing, real-time systems, and large-scale data processing. 9 | 10 | Summary 11 | -------- 12 | 13 | The "ITextSerializationProvider" and "IBinarySerializationProvider" interfaces extend "IBaseSerializationProvider" with two primary methods: Serialize and Deserialize. For ITextSerializationProvider, Serialize converts an object to a string, whereas Deserialize reconstructs the object from the string format. This pattern is primarily used for formats like JSON, XML, and YAML. 14 | 15 | On the other hand, the "IBinarySerializationProvider" leverages the efficiency of byte arrays for its operations, making it more suitable for performance-intensive use-cases. Serialize converts the object into a ReadOnlySpan, facilitating a low-allocation environment, while Deserialize builds the object back from the byte array. 16 | 17 | Several packages have been implemented for these interfaces, catering to different serialization needs: 18 | 19 | - BinaryGo, MemoryPack, and MessagePack offer binary serialization. 20 | - Newtonsoft.Json, System.Text.Json, and System.Text.Xml provide textual serialization specifically for JSON and XML. 21 | - YamlDotNet is dedicated to YAML serialization. 22 | 23 | By utilizing the Serialization.DependencyInjection package and integrating it into an ASP.NET Core application's startup configuration, users can seamlessly plug in their preferred serialization method, ensuring that their applications can easily interchange data representations as needed. 24 | 25 | Details 26 | ------- 27 | 28 | ### Textual Serialization 29 | 30 | - **ITextSerializationProvider Interface**: This interface encapsulates the functionality for handling text-serialization tasks. It ensures that any class implementing this interface provides mechanisms to serialize objects into string representations and vice versa, aiming to support various text-based formats. 31 | 32 | ### Binary Serialization 33 | 34 | - **IBinarySerializationProvider Interface**: Contrast to textual serialization, this interface is strictly for handling serialization in binary formats, designed to work directly with byte arrays for high performance and efficiency. 35 | 36 | ### Implementation Packages 37 | 38 | Each of the following packages implements the interfaces to support a specific format: 39 | 40 | - **BinaryGo**, **MemoryPack**, **MessagePack**: These packages provide binary serialization techniques useful in scenarios where the serialized object's footprint needs to be as small as possible. 41 | 42 | - **Newtonsoft.Json**, **System.Text.Json**: These libraries are geared towards JSON serialization, with System.Text.Json being the newer, high-performance package directly supported by Microsoft. 43 | 44 | - **System.Text.Xml**: Reserved for XML serialization, it offers integration with .NET's System.Text mechanisms, aiming to align with modern runtime optimizations. 45 | 46 | - **YamlDotNet**: Specializes in the YAML format, frequently used for configuration files due to its human-friendly syntax. 47 | 48 | ### ASP.NET Core Integration 49 | 50 | - The `Startup` class demonstrates how an ASP.NET Core application can incorporate these serialization providers. By invoking `AddSerialization` within the `ConfigureServices` method and specifying the desired packages like `o.UseBinaryGo()` or `o.UseNewtonsoftJson()`, developers can quickly hook up the required serialization methods to their application's dependency injection container. 51 | 52 | This document elaborates on each interface's purpose and the comprehensive use of the serialization packages, offering developers insight and guidance on effectively managing data persistence and transmission in their applications. Through these interfaces and their relevant packages, developers can cater to various serialization requirements, ensuring that their software is up to the task in a multitude of scenarios ranging from simple web APIs to complex, distributed systems. 53 | 54 | 55 | Install packages: 56 | 57 | 1. Core package: 58 | 59 | [![NuGet](https://img.shields.io/badge/EasyMicroservices-Serialization-orange.svg)](https://www.nuget.org/packages/EasyMicroservices.Serialization.DependencyInjection/) 60 | 61 | 62 | 2. Use package: 63 | 64 | [![NuGet](https://img.shields.io/badge/EasyMicroservicesSerialization-BinaryGo-orange.svg)](https://www.nuget.org/packages/EasyMicroservices.Serialization.BinaryGo/) ![Badge](https://img.shields.io/badge/Binary-8A2BE2) 65 | 66 | [![NuGet](https://img.shields.io/badge/EasyMicroservicesSerialization-MemoryPack-orange.svg)](https://www.nuget.org/packages/EasyMicroservices.Serialization.MemoryPack/) ![Badge](https://img.shields.io/badge/Binary-8A2BE2) 67 | 68 | [![NuGet](https://img.shields.io/badge/EasyMicroservicesSerialization-MessagePack-orange.svg)](https://www.nuget.org/packages/EasyMicroservices.Serialization.MessagePack/) ![Badge](https://img.shields.io/badge/Binary-8A2BE2) 69 | 70 | [![NuGet](https://img.shields.io/badge/EasyMicroservicesSerialization-NewtonsoftJson-orange.svg)](https://www.nuget.org/packages/EasyMicroservices.Serialization.Newtonsoft.Json/) ![Badge](https://img.shields.io/badge/Text-8A2BE2) 71 | 72 | [![NuGet](https://img.shields.io/badge/EasyMicroservicesSerialization-SystemTextJson-orange.svg)](https://www.nuget.org/packages/EasyMicroservices.Serialization.System.Text.Json/) ![Badge](https://img.shields.io/badge/Text-8A2BE2) ![Badge](https://img.shields.io/badge/Binary-8A2BE2) 73 | 74 | [![NuGet](https://img.shields.io/badge/EasyMicroservicesSerialization-SystemTextXml-orange.svg)](https://www.nuget.org/packages/EasyMicroservices.Serialization.System.Text.Xml/) ![Badge](https://img.shields.io/badge/Text-8A2BE2) 75 | 76 | [![NuGet](https://img.shields.io/badge/EasyMicroservicesSerialization-YamlDotNet-orange.svg)](https://www.nuget.org/packages/EasyMicroservices.Serialization.YamlDotNet/) ![Badge](https://img.shields.io/badge/Text-8A2BE2) 77 | 78 | 3. ِDependency injection package: 79 | 80 | [![NuGet](https://img.shields.io/badge/EasyMicroservicesSerialization-DependencyInjection-orange.svg)](https://www.nuget.org/packages/EasyMicroservices.Serialization.DependencyInjection/) 81 | 82 | Example: 83 | 84 | ```csharp 85 | public class Startup 86 | { 87 | //... 88 | 89 | public void ConfigureServices(IServiceCollection services) 90 | { 91 | //configuration 92 | services.AddSerialization(o => 93 | { 94 | o.UseBinaryGo(); 95 | o.UseNewtonsoftJson(); 96 | //etc 97 | }); 98 | } 99 | } 100 | ``` 101 | Usage: 102 | 103 | ```csharp 104 | 105 | using Common.Models; 106 | using EasyMicroservices.Serialization.Interfaces; 107 | using Microsoft.AspNetCore.Mvc; 108 | 109 | [Route("api/[controller]")] 110 | [ApiController] 111 | public class DIController : ControllerBase 112 | { 113 | private readonly IBinarySerializationProvider _binarySerialization; 114 | private readonly ITextSerializationProvider _textSerialization; 115 | 116 | public DIController(IBinarySerializationProvider binarySerialization, ITextSerializationProvider textSerialization) 117 | { 118 | _binarySerialization = binarySerialization; 119 | _textSerialization = textSerialization; 120 | } 121 | 122 | [Route("Serialize")] 123 | [HttpGet] 124 | public IActionResult Serialize() 125 | { 126 | Customer model = new Customer() { Age = 51, FirstName = "Elon", LastName = "Musk" }; 127 | //for json or any text 128 | var result = _textSerialization.Serialize(model); 129 | // or for binary: 130 | var binary = _binarySerialization.Serialize(model); 131 | return Ok(result); 132 | } 133 | } 134 | ``` 135 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/Common/Common.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/Common/Models/Customer.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | using MessagePack; 5 | //using MemoryPack; 6 | 7 | namespace Common.Models; 8 | 9 | [MessagePackObject] 10 | //[MemoryPackable] 11 | public partial class Customer 12 | { 13 | [Key(0)] 14 | public string FirstName { get; set; } 15 | [Key(1)] 16 | public string LastName { get; set; } 17 | [Key(2)] 18 | public int Age { get; set; } 19 | 20 | public Address Address { get; set; } 21 | } 22 | 23 | //[MemoryPackable] 24 | public partial class Address 25 | { 26 | public string street { get; set; } 27 | public string city { get; set; } 28 | public string state { get; set; } 29 | } 30 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/Common/Models/Order.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | namespace Common.Models; 5 | 6 | public class Order 7 | { 8 | public List Items { get; set; } 9 | public DateTime OrderDate { get; set; } 10 | public Customer Customer { get; set; } 11 | } 12 | 13 | public class Item 14 | { 15 | public string description { get; set; } 16 | public decimal price { get; set; } 17 | public int quantity { get; set; } 18 | } 19 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.BinaryGo/Controllers/BinaryGoController.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | using Common.Models; 5 | using EasyMicroservices.Serialization.Interfaces; 6 | using Microsoft.AspNetCore.Mvc; 7 | 8 | 9 | namespace WebAPISampleProject.BinaryGo.Controllers; 10 | 11 | [Route("api/[controller]")] 12 | [ApiController] 13 | public class BinaryGoController : ControllerBase 14 | { 15 | private readonly IBinarySerializationProvider _binarySerialization; 16 | 17 | public BinaryGoController(IBinarySerializationProvider binarySerialization) 18 | { 19 | _binarySerialization = binarySerialization; 20 | } 21 | 22 | [Route("Serialize")] 23 | [HttpGet] 24 | public IActionResult Serialize() 25 | { 26 | Customer model = new Customer() { Age = 51, FirstName = "Elon", LastName = "Musk" }; 27 | var result = _binarySerialization.Serialize(model); 28 | return Ok(result.ToArray()); 29 | } 30 | 31 | [Route("Deserialize")] 32 | [HttpPost] 33 | public IActionResult Deserialize(byte[] input) 34 | { 35 | var result = _binarySerialization.Deserialize(input); 36 | return Ok(result); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.BinaryGo/Program.cs: -------------------------------------------------------------------------------- 1 | using EasyMicroservices.Serialization.BinaryGo.Providers; 2 | using EasyMicroservices.Serialization.Interfaces; 3 | 4 | var builder = WebApplication.CreateBuilder(args); 5 | 6 | // Add services to the container. 7 | 8 | builder.Services.AddControllers(); 9 | // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle 10 | builder.Services.AddEndpointsApiExplorer(); 11 | builder.Services.AddSwaggerGen(); 12 | builder.Services.AddScoped(); 13 | 14 | var app = builder.Build(); 15 | 16 | // Configure the HTTP request pipeline. 17 | if (app.Environment.IsDevelopment()) 18 | { 19 | app.UseSwagger(); 20 | app.UseSwaggerUI(); 21 | } 22 | 23 | app.UseHttpsRedirection(); 24 | 25 | app.UseAuthorization(); 26 | 27 | app.MapControllers(); 28 | 29 | 30 | app.Run(); 31 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.BinaryGo/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:51545", 8 | "sslPort": 44394 9 | } 10 | }, 11 | "profiles": { 12 | "WebAPISampleProject.BinaryGo": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "launchUrl": "swagger", 17 | "applicationUrl": "https://localhost:7244;http://localhost:5287", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | }, 22 | "IIS Express": { 23 | "commandName": "IISExpress", 24 | "launchBrowser": true, 25 | "launchUrl": "swagger", 26 | "environmentVariables": { 27 | "ASPNETCORE_ENVIRONMENT": "Development" 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.BinaryGo/WebAPISampleProject.BinaryGo.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.BinaryGo/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.BinaryGo/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.DependencyInjection/Controllers/DIController.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | using Common.Models; 5 | using EasyMicroservices.Serialization.Interfaces; 6 | using Microsoft.AspNetCore.Mvc; 7 | 8 | 9 | namespace WebAPISampleProject.BinaryGo.Controllers; 10 | 11 | [Route("api/[controller]")] 12 | [ApiController] 13 | public class DIController : ControllerBase 14 | { 15 | private readonly IBinarySerializationProvider _binarySerialization; 16 | private readonly ITextSerializationProvider _textSerialization; 17 | 18 | public DIController(IBinarySerializationProvider binarySerialization, ITextSerializationProvider textSerialization) 19 | { 20 | _binarySerialization = binarySerialization; 21 | _textSerialization = textSerialization; 22 | } 23 | 24 | [Route("Serialize")] 25 | [HttpGet] 26 | public IActionResult Serialize() 27 | { 28 | Customer model = new Customer() { Age = 51, FirstName = "Elon", LastName = "Musk" }; 29 | var result = _textSerialization.Serialize(model); 30 | var binary = _binarySerialization.Serialize(model); 31 | return Ok(result); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.DependencyInjection/Program.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | namespace WebAPISampleProject.DependencyInjection 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | 11 | var builder = WebApplication.CreateBuilder(args); 12 | 13 | // Add services to the container. 14 | 15 | builder.Services.AddControllers(); 16 | // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle 17 | builder.Services.AddEndpointsApiExplorer(); 18 | builder.Services.AddSwaggerGen(); 19 | builder.Services.AddSerialization(o => 20 | { 21 | o.UseBinaryGo(); 22 | o.UseNewtonsoftJson(); 23 | }); 24 | 25 | var app = builder.Build(); 26 | 27 | // Configure the HTTP request pipeline. 28 | if (app.Environment.IsDevelopment()) 29 | { 30 | app.UseSwagger(); 31 | app.UseSwaggerUI(); 32 | } 33 | 34 | app.UseHttpsRedirection(); 35 | 36 | app.UseAuthorization(); 37 | 38 | app.MapControllers(); 39 | 40 | 41 | app.Run(); 42 | 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.DependencyInjection/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:41852", 8 | "sslPort": 0 9 | } 10 | }, 11 | "profiles": { 12 | "http": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "launchUrl": "swagger/index.html", 17 | "applicationUrl": "http://localhost:5223", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | }, 22 | "IIS Express": { 23 | "commandName": "IISExpress", 24 | "launchBrowser": true, 25 | "launchUrl": "swagger/index.html", 26 | "environmentVariables": { 27 | "ASPNETCORE_ENVIRONMENT": "Development" 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.DependencyInjection/WebAPISampleProject.DependencyInjection.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | enable 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.DependencyInjection/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.DependencyInjection/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.MemoryPack/Controllers/MemoryPackController.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | using Common.Models; 5 | using Microsoft.AspNetCore.Http; 6 | using Microsoft.AspNetCore.Mvc; 7 | //using MemoryPack; 8 | 9 | namespace WebAPISampleProject.MemoryPack.Controllers 10 | { 11 | [Route("api/[controller]")] 12 | [ApiController] 13 | public class MemoryPackController : ControllerBase 14 | { 15 | 16 | /* [Route("Serialize")] 17 | [HttpGet] 18 | public IActionResult Serialize() 19 | { 20 | Customer model = new Customer() { Age = 51, FirstName = "Elon", LastName = "Musk" }; 21 | var result = MemoryPackSerializer.Serialize(model); 22 | return Ok(result); 23 | }*/ 24 | 25 | } 26 | 27 | 28 | 29 | 30 | } 31 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.MemoryPack/Program.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | 5 | var builder = WebApplication.CreateBuilder(args); 6 | 7 | // Add services to the container. 8 | 9 | builder.Services.AddControllers(); 10 | // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle 11 | builder.Services.AddEndpointsApiExplorer(); 12 | builder.Services.AddSwaggerGen(); 13 | 14 | 15 | var app = builder.Build(); 16 | 17 | // Configure the HTTP request pipeline. 18 | if (app.Environment.IsDevelopment()) 19 | { 20 | app.UseSwagger(); 21 | app.UseSwaggerUI(); 22 | } 23 | app.UseHttpsRedirection(); 24 | 25 | app.UseAuthorization(); 26 | 27 | app.MapControllers(); 28 | 29 | app.Run(); 30 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.MemoryPack/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:35283", 8 | "sslPort": 44324 9 | } 10 | }, 11 | "profiles": { 12 | "WebAPISampleProject.MemoryPack": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "launchUrl": "swagger", 17 | "applicationUrl": "https://localhost:7230;http://localhost:5064", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | }, 22 | "IIS Express": { 23 | "commandName": "IISExpress", 24 | "launchBrowser": true, 25 | "launchUrl": "swagger", 26 | "environmentVariables": { 27 | "ASPNETCORE_ENVIRONMENT": "Development" 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.MemoryPack/WebAPISampleProject.MemoryPack.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.MemoryPack/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.MemoryPack/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.MessagePack/Controllers/MessagePackController.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | using Common.Models; 5 | using EasyMicroservices.Serialization.Interfaces; 6 | using Microsoft.AspNetCore.Mvc; 7 | 8 | 9 | namespace WebAPISampleProject.MessagePack.Controllers; 10 | 11 | 12 | [Route("api/[controller]")] 13 | [ApiController] 14 | public class MessagePackController : ControllerBase 15 | { 16 | private readonly IBinarySerialization _binarySerialization; 17 | 18 | public MessagePackController(IBinarySerialization binarySerialization) 19 | { 20 | _binarySerialization = binarySerialization; 21 | 22 | } 23 | 24 | [Route("Serialize")] 25 | [HttpGet] 26 | public IActionResult Serialize() 27 | { 28 | Customer model = new Customer() { Age = 51, FirstName = "Elon", LastName = "Musk" }; 29 | var result= _binarySerialization.Serialize(model); 30 | return Ok(result.ToArray()); 31 | } 32 | 33 | [Route("Deserialize")] 34 | [HttpPost] 35 | public IActionResult Deserialize( byte[] input) 36 | { 37 | var result = _binarySerialization.Deserialize(input); 38 | return Ok(result); 39 | } 40 | 41 | 42 | } 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.MessagePack/Program.cs: -------------------------------------------------------------------------------- 1 | using EasyMicroservices.Serialization.Interfaces; 2 | using EasyMicroservices.Serialization.MessagePack.Providers; 3 | 4 | var builder = WebApplication.CreateBuilder(args); 5 | 6 | // Add services to the container. 7 | 8 | builder.Services.AddControllers(); 9 | // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle 10 | builder.Services.AddEndpointsApiExplorer(); 11 | builder.Services.AddSwaggerGen(); 12 | builder.Services.AddScoped(); 13 | var app = builder.Build(); 14 | 15 | // Configure the HTTP request pipeline. 16 | if (app.Environment.IsDevelopment()) 17 | { 18 | app.UseSwagger(); 19 | app.UseSwaggerUI(); 20 | } 21 | 22 | app.UseHttpsRedirection(); 23 | 24 | app.UseAuthorization(); 25 | 26 | app.MapControllers(); 27 | 28 | app.Run(); 29 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.MessagePack/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:35086", 8 | "sslPort": 44335 9 | } 10 | }, 11 | "profiles": { 12 | "WebAPISampleProject.MessagePack": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "launchUrl": "swagger", 17 | "applicationUrl": "https://localhost:7121;http://localhost:5166", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | }, 22 | "IIS Express": { 23 | "commandName": "IISExpress", 24 | "launchBrowser": true, 25 | "launchUrl": "swagger", 26 | "environmentVariables": { 27 | "ASPNETCORE_ENVIRONMENT": "Development" 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.MessagePack/WebAPISampleProject.MessagePack.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.MessagePack/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.MessagePack/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.NewtonSoft.Json/Controllers/NewtonSoftJsonController.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | using Common.Models; 5 | using EasyMicroservices.Serialization.Interfaces; 6 | using Microsoft.AspNetCore.Http; 7 | using Microsoft.AspNetCore.Mvc; 8 | 9 | namespace WebAPISampleProject.NewtonSoft.Json.Controllers 10 | { 11 | [Route("api/[controller]")] 12 | [ApiController] 13 | public class NewtonSoftJsonController : ControllerBase 14 | { 15 | private readonly ITextSerializationProvider _textSerialization; 16 | 17 | public NewtonSoftJsonController(ITextSerializationProvider textSerialization) 18 | { 19 | _textSerialization = textSerialization; 20 | } 21 | 22 | [Route("Serialize")] 23 | [HttpGet] 24 | public IActionResult Serialize() 25 | { 26 | Customer model = new Customer() { Age = 51, FirstName = "Elon", LastName = "Musk" }; 27 | var result = _textSerialization.Serialize(model); 28 | return Ok(result); 29 | } 30 | 31 | [Route("Deserialize")] 32 | [HttpPost] 33 | public IActionResult Deserialize(string input) 34 | { 35 | var result = _textSerialization.Deserialize(input); 36 | return Ok(result); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.NewtonSoft.Json/Program.cs: -------------------------------------------------------------------------------- 1 | using EasyMicroservices.Serialization.Interfaces; 2 | using EasyMicroservices.Serialization.Newtonsoft.Json.Providers; 3 | 4 | var builder = WebApplication.CreateBuilder(args); 5 | 6 | // Add services to the container. 7 | 8 | builder.Services.AddControllers(); 9 | // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle 10 | builder.Services.AddEndpointsApiExplorer(); 11 | builder.Services.AddSwaggerGen(); 12 | builder.Services.AddScoped(); 13 | 14 | var app = builder.Build(); 15 | 16 | // Configure the HTTP request pipeline. 17 | if (app.Environment.IsDevelopment()) 18 | { 19 | app.UseSwagger(); 20 | app.UseSwaggerUI(); 21 | } 22 | 23 | app.UseHttpsRedirection(); 24 | 25 | app.UseAuthorization(); 26 | 27 | app.MapControllers(); 28 | 29 | app.Run(); 30 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.NewtonSoft.Json/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:61752", 8 | "sslPort": 44300 9 | } 10 | }, 11 | "profiles": { 12 | "WebAPISampleProject.NewtonSoft.Json": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "launchUrl": "swagger", 17 | "applicationUrl": "https://localhost:7167;http://localhost:5200", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | }, 22 | "IIS Express": { 23 | "commandName": "IISExpress", 24 | "launchBrowser": true, 25 | "launchUrl": "swagger", 26 | "environmentVariables": { 27 | "ASPNETCORE_ENVIRONMENT": "Development" 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.NewtonSoft.Json/WebAPISampleProject.NewtonSoft.Json.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.NewtonSoft.Json/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.NewtonSoft.Json/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.System.Text.Json/Controllers/SystemTextJsonBinaryController.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | using Common.Models; 5 | using EasyMicroservices.Serialization.Interfaces; 6 | using Microsoft.AspNetCore.Http; 7 | using Microsoft.AspNetCore.Mvc; 8 | 9 | namespace WebAPISampleProject.System.Text.Json.Controllers 10 | { 11 | [Route("api/[controller]")] 12 | [ApiController] 13 | public class SystemTextJsonBinaryController : ControllerBase 14 | { 15 | private readonly IBinarySerialization _binarySerialization; 16 | 17 | public SystemTextJsonBinaryController(IBinarySerialization binarySerialization) 18 | { 19 | _binarySerialization = binarySerialization; 20 | } 21 | 22 | [Route("Serialize")] 23 | [HttpGet] 24 | public IActionResult Serialize() 25 | { 26 | Customer model = new Customer() { Age = 51, FirstName = "Elon", LastName = "Musk" }; 27 | var result = _binarySerialization.Serialize(model); 28 | return Ok(result.ToArray()); 29 | } 30 | 31 | [Route("Deserialize")] 32 | [HttpPost] 33 | public IActionResult Deserialize(byte[] input) 34 | { 35 | var result = _binarySerialization.Deserialize(input); 36 | return Ok(result); 37 | } 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.System.Text.Json/Controllers/SystemTextJsonController.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | using Common.Models; 5 | using EasyMicroservices.Serialization.Interfaces; 6 | using Microsoft.AspNetCore.Http; 7 | using Microsoft.AspNetCore.Mvc; 8 | 9 | namespace WebAPISampleProject.System.Text.Json.Controllers 10 | { 11 | [Route("api/[controller]")] 12 | [ApiController] 13 | public class SystemTextJsonController : ControllerBase 14 | { 15 | private readonly ITextSerialization _textSerialization; 16 | 17 | public SystemTextJsonController(ITextSerialization textSerialization) 18 | { 19 | _textSerialization = textSerialization; 20 | } 21 | 22 | 23 | [Route("Serialize")] 24 | [HttpGet] 25 | public IActionResult Serialize() 26 | { 27 | Customer model = new Customer() { Age = 51, FirstName = "Elon", LastName = "Musk" }; 28 | var result = _textSerialization.Serialize(model); 29 | return Ok(result); 30 | } 31 | 32 | [Route("Deserialize")] 33 | [HttpPost] 34 | public IActionResult Deserialize(string input) 35 | { 36 | var result = _textSerialization.Deserialize(input); 37 | return Ok(result); 38 | } 39 | 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.System.Text.Json/Program.cs: -------------------------------------------------------------------------------- 1 | using EasyMicroservices.Serialization.Interfaces; 2 | using EasyMicroservices.Serialization.System.Text.Json.Providers; 3 | var builder = WebApplication.CreateBuilder(args); 4 | 5 | // Add services to the container. 6 | 7 | builder.Services.AddControllers(); 8 | // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle 9 | builder.Services.AddEndpointsApiExplorer(); 10 | builder.Services.AddSwaggerGen(); 11 | builder.Services.AddScoped(); 12 | builder.Services.AddScoped(); 13 | 14 | var app = builder.Build(); 15 | 16 | // Configure the HTTP request pipeline. 17 | if (app.Environment.IsDevelopment()) 18 | { 19 | app.UseSwagger(); 20 | app.UseSwaggerUI(); 21 | } 22 | 23 | app.UseHttpsRedirection(); 24 | 25 | app.UseAuthorization(); 26 | 27 | app.MapControllers(); 28 | 29 | app.Run(); 30 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.System.Text.Json/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:33117", 8 | "sslPort": 44350 9 | } 10 | }, 11 | "profiles": { 12 | "WebAPISampleProject.System.Text.Json": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "launchUrl": "swagger", 17 | "applicationUrl": "https://localhost:7188;http://localhost:5006", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | }, 22 | "IIS Express": { 23 | "commandName": "IISExpress", 24 | "launchBrowser": true, 25 | "launchUrl": "swagger", 26 | "environmentVariables": { 27 | "ASPNETCORE_ENVIRONMENT": "Development" 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.System.Text.Json/WebAPISampleProject.System.Text.Json.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.System.Text.Json/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.System.Text.Json/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.System.Text.Xml/Controllers/SystemTextXmlController.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | using Common.Models; 5 | using EasyMicroservices.Serialization.Interfaces; 6 | using Microsoft.AspNetCore.Mvc; 7 | 8 | namespace WebAPISampleProject.System.Text.Xml.Controllers; 9 | 10 | [Route("api/[controller]")] 11 | [ApiController] 12 | public class SystemTextXmlController : ControllerBase 13 | { 14 | private readonly ITextSerialization _textSerialization; 15 | 16 | public SystemTextXmlController(ITextSerialization textSerialization) 17 | { 18 | _textSerialization = textSerialization; 19 | } 20 | [Route("Serialize")] 21 | [HttpGet] 22 | public IActionResult Serialize() 23 | { 24 | Customer model = new Customer() { Age = 51, FirstName = "Elon", LastName = "Musk" }; 25 | var result = _textSerialization.Serialize(model); 26 | return Ok(result); 27 | } 28 | 29 | [Route("Deserialize")] 30 | [HttpPost] 31 | public IActionResult Deserialize(string input) 32 | { 33 | var result = _textSerialization.Deserialize(input); 34 | return Ok(result); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.System.Text.Xml/Program.cs: -------------------------------------------------------------------------------- 1 | using EasyMicroservices.Serialization.Interfaces; 2 | using EasyMicroservices.Serialization.System.Text.Xml.Providers; 3 | 4 | var builder = WebApplication.CreateBuilder(args); 5 | 6 | // Add services to the container. 7 | 8 | builder.Services.AddControllers(); 9 | // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle 10 | builder.Services.AddEndpointsApiExplorer(); 11 | builder.Services.AddSwaggerGen(); 12 | builder.Services.AddScoped(); 13 | 14 | var app = builder.Build(); 15 | 16 | // Configure the HTTP request pipeline. 17 | if (app.Environment.IsDevelopment()) 18 | { 19 | app.UseSwagger(); 20 | app.UseSwaggerUI(); 21 | } 22 | 23 | app.UseHttpsRedirection(); 24 | 25 | app.UseAuthorization(); 26 | 27 | app.MapControllers(); 28 | 29 | app.Run(); 30 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.System.Text.Xml/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:12933", 8 | "sslPort": 44394 9 | } 10 | }, 11 | "profiles": { 12 | "WebAPISampleProject.System.Text.Xml": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "launchUrl": "swagger", 17 | "applicationUrl": "https://localhost:7286;http://localhost:5219", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | }, 22 | "IIS Express": { 23 | "commandName": "IISExpress", 24 | "launchBrowser": true, 25 | "launchUrl": "swagger", 26 | "environmentVariables": { 27 | "ASPNETCORE_ENVIRONMENT": "Development" 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.System.Text.Xml/WebAPISampleProject.System.Text.Xml.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.System.Text.Xml/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.System.Text.Xml/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.System.YamlDotNet/Controllers/YamlDotNetController.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | using Common.Models; 5 | using EasyMicroservices.Serialization.Interfaces; 6 | using Microsoft.AspNetCore.Mvc; 7 | 8 | namespace WebAPISampleProject.System.YamlDotNet.Controllers; 9 | 10 | [ApiController] 11 | [Route("api/[controller]")] 12 | public class YamlDotNetController : ControllerBase 13 | { 14 | private readonly ITextSerialization _textSerialization; 15 | 16 | public YamlDotNetController(ITextSerialization textSerialization) 17 | { 18 | _textSerialization = textSerialization; 19 | } 20 | 21 | [Route("Serialize")] 22 | [HttpGet] 23 | public IActionResult Serialize() 24 | { 25 | var model = Get_Sample_Data(); 26 | var result = _textSerialization.Serialize(model); 27 | return Ok(result); 28 | } 29 | 30 | [Route("Deserialize")] 31 | [HttpPost] 32 | public IActionResult Deserialize(string input) 33 | { 34 | var result = _textSerialization.Deserialize(input); 35 | return Ok(result); 36 | } 37 | 38 | [Route("Get_Sample_Data")] 39 | [HttpGet] 40 | public Order Get_Sample_Data() 41 | { 42 | var order = new Order() 43 | { 44 | Customer = new Customer() 45 | { 46 | Age = 51, FirstName = "Elon", LastName = "Musk" , 47 | Address = new Address() 48 | { 49 | city = "Robert Robertson" , 50 | street = "St. Robert", 51 | state = "M" 52 | } 53 | }, 54 | Items = new List() 55 | { 56 | new Item() { description = "SampleItem1", price = 1000, quantity = 5 }, 57 | new Item() { description = "SampleItem2", price = 2000, quantity = 25 }, 58 | new Item() { description = "SampleItem3", price = 300, quantity = 50 } 59 | }, 60 | OrderDate = DateTime.Now 61 | 62 | }; 63 | 64 | return order; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.System.YamlDotNet/Program.cs: -------------------------------------------------------------------------------- 1 | using EasyMicroservices.Serialization.Interfaces; 2 | using EasyMicroservices.Serialization.YamlDotNet.Providers; 3 | 4 | var builder = WebApplication.CreateBuilder(args); 5 | 6 | // Add services to the container. 7 | 8 | builder.Services.AddControllers(); 9 | // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle 10 | builder.Services.AddEndpointsApiExplorer(); 11 | builder.Services.AddSwaggerGen(); 12 | builder.Services.AddScoped(); 13 | 14 | var app = builder.Build(); 15 | 16 | // Configure the HTTP request pipeline. 17 | if (app.Environment.IsDevelopment()) 18 | { 19 | app.UseSwagger(); 20 | app.UseSwaggerUI(); 21 | } 22 | 23 | app.UseHttpsRedirection(); 24 | 25 | app.UseAuthorization(); 26 | 27 | app.MapControllers(); 28 | 29 | app.Run(); 30 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.System.YamlDotNet/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:29704", 8 | "sslPort": 44355 9 | } 10 | }, 11 | "profiles": { 12 | "WebAPISampleProject.System.YamlDotNet": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "launchUrl": "swagger", 17 | "applicationUrl": "https://localhost:7106;http://localhost:5061", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | }, 22 | "IIS Express": { 23 | "commandName": "IISExpress", 24 | "launchBrowser": true, 25 | "launchUrl": "swagger", 26 | "environmentVariables": { 27 | "ASPNETCORE_ENVIRONMENT": "Development" 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.System.YamlDotNet/WebAPISampleProject.System.YamlDotNet.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.System.YamlDotNet/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.System.YamlDotNet/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /Samples/CSharp/ASPCore/WebAPISampleProject/WebAPISampleProject.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.7.34018.315 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebAPISampleProject.BinaryGo", "WebAPISampleProject.BinaryGo\WebAPISampleProject.BinaryGo.csproj", "{F603C96F-5577-4B8C-A306-549E0CA7152B}" 7 | EndProject 8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebAPISampleProject.MessagePack", "WebAPISampleProject.MessagePack\WebAPISampleProject.MessagePack.csproj", "{A1CC73D8-23BF-4827-AC4E-82C86AF591EF}" 9 | EndProject 10 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common", "Common\Common.csproj", "{F7966FE8-0D7C-4F72-9096-BFC51CCBC37F}" 11 | EndProject 12 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebAPISampleProject.MemoryPack", "WebAPISampleProject.MemoryPack\WebAPISampleProject.MemoryPack.csproj", "{1A5784AC-360B-4125-AB44-7731CE42FC4D}" 13 | EndProject 14 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebAPISampleProject.NewtonSoft.Json", "WebAPISampleProject.NewtonSoft.Json\WebAPISampleProject.NewtonSoft.Json.csproj", "{5C52E3C0-A61F-46FF-8058-7BBB9E305175}" 15 | EndProject 16 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebAPISampleProject.System.Text.Json", "WebAPISampleProject.System.Text.Json\WebAPISampleProject.System.Text.Json.csproj", "{A22533D2-41D5-4790-AAF3-DAA9A980CF1F}" 17 | EndProject 18 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebAPISampleProject.System.Text.Xml", "WebAPISampleProject.System.Text.Xml\WebAPISampleProject.System.Text.Xml.csproj", "{0BBD61EB-BD84-4AA1-B451-9E9043A1EBC4}" 19 | EndProject 20 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebAPISampleProject.System.YamlDotNet", "WebAPISampleProject.System.YamlDotNet\WebAPISampleProject.System.YamlDotNet.csproj", "{3425E080-5DF6-45D8-9538-B74E1E8A8C39}" 21 | EndProject 22 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebAPISampleProject.DependencyInjection", "WebAPISampleProject.DependencyInjection\WebAPISampleProject.DependencyInjection.csproj", "{BAE024EF-23E4-4CBE-99E3-A25CBDB955D1}" 23 | EndProject 24 | Global 25 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 26 | Debug|Any CPU = Debug|Any CPU 27 | Release|Any CPU = Release|Any CPU 28 | EndGlobalSection 29 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 30 | {F603C96F-5577-4B8C-A306-549E0CA7152B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 31 | {F603C96F-5577-4B8C-A306-549E0CA7152B}.Debug|Any CPU.Build.0 = Debug|Any CPU 32 | {F603C96F-5577-4B8C-A306-549E0CA7152B}.Release|Any CPU.ActiveCfg = Release|Any CPU 33 | {F603C96F-5577-4B8C-A306-549E0CA7152B}.Release|Any CPU.Build.0 = Release|Any CPU 34 | {A1CC73D8-23BF-4827-AC4E-82C86AF591EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 35 | {A1CC73D8-23BF-4827-AC4E-82C86AF591EF}.Debug|Any CPU.Build.0 = Debug|Any CPU 36 | {A1CC73D8-23BF-4827-AC4E-82C86AF591EF}.Release|Any CPU.ActiveCfg = Release|Any CPU 37 | {A1CC73D8-23BF-4827-AC4E-82C86AF591EF}.Release|Any CPU.Build.0 = Release|Any CPU 38 | {F7966FE8-0D7C-4F72-9096-BFC51CCBC37F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 39 | {F7966FE8-0D7C-4F72-9096-BFC51CCBC37F}.Debug|Any CPU.Build.0 = Debug|Any CPU 40 | {F7966FE8-0D7C-4F72-9096-BFC51CCBC37F}.Release|Any CPU.ActiveCfg = Release|Any CPU 41 | {F7966FE8-0D7C-4F72-9096-BFC51CCBC37F}.Release|Any CPU.Build.0 = Release|Any CPU 42 | {1A5784AC-360B-4125-AB44-7731CE42FC4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 43 | {1A5784AC-360B-4125-AB44-7731CE42FC4D}.Debug|Any CPU.Build.0 = Debug|Any CPU 44 | {1A5784AC-360B-4125-AB44-7731CE42FC4D}.Release|Any CPU.ActiveCfg = Release|Any CPU 45 | {1A5784AC-360B-4125-AB44-7731CE42FC4D}.Release|Any CPU.Build.0 = Release|Any CPU 46 | {5C52E3C0-A61F-46FF-8058-7BBB9E305175}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 47 | {5C52E3C0-A61F-46FF-8058-7BBB9E305175}.Debug|Any CPU.Build.0 = Debug|Any CPU 48 | {5C52E3C0-A61F-46FF-8058-7BBB9E305175}.Release|Any CPU.ActiveCfg = Release|Any CPU 49 | {5C52E3C0-A61F-46FF-8058-7BBB9E305175}.Release|Any CPU.Build.0 = Release|Any CPU 50 | {A22533D2-41D5-4790-AAF3-DAA9A980CF1F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 51 | {A22533D2-41D5-4790-AAF3-DAA9A980CF1F}.Debug|Any CPU.Build.0 = Debug|Any CPU 52 | {A22533D2-41D5-4790-AAF3-DAA9A980CF1F}.Release|Any CPU.ActiveCfg = Release|Any CPU 53 | {A22533D2-41D5-4790-AAF3-DAA9A980CF1F}.Release|Any CPU.Build.0 = Release|Any CPU 54 | {0BBD61EB-BD84-4AA1-B451-9E9043A1EBC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 55 | {0BBD61EB-BD84-4AA1-B451-9E9043A1EBC4}.Debug|Any CPU.Build.0 = Debug|Any CPU 56 | {0BBD61EB-BD84-4AA1-B451-9E9043A1EBC4}.Release|Any CPU.ActiveCfg = Release|Any CPU 57 | {0BBD61EB-BD84-4AA1-B451-9E9043A1EBC4}.Release|Any CPU.Build.0 = Release|Any CPU 58 | {3425E080-5DF6-45D8-9538-B74E1E8A8C39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 59 | {3425E080-5DF6-45D8-9538-B74E1E8A8C39}.Debug|Any CPU.Build.0 = Debug|Any CPU 60 | {3425E080-5DF6-45D8-9538-B74E1E8A8C39}.Release|Any CPU.ActiveCfg = Release|Any CPU 61 | {3425E080-5DF6-45D8-9538-B74E1E8A8C39}.Release|Any CPU.Build.0 = Release|Any CPU 62 | {BAE024EF-23E4-4CBE-99E3-A25CBDB955D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 63 | {BAE024EF-23E4-4CBE-99E3-A25CBDB955D1}.Debug|Any CPU.Build.0 = Debug|Any CPU 64 | {BAE024EF-23E4-4CBE-99E3-A25CBDB955D1}.Release|Any CPU.ActiveCfg = Release|Any CPU 65 | {BAE024EF-23E4-4CBE-99E3-A25CBDB955D1}.Release|Any CPU.Build.0 = Release|Any CPU 66 | EndGlobalSection 67 | GlobalSection(SolutionProperties) = preSolution 68 | HideSolutionNode = FALSE 69 | EndGlobalSection 70 | EndGlobal 71 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization-net6.0.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.0.31912.275 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.Serialization", "EasyMicroservices.Serialization\EasyMicroservices.Serialization.csproj", "{E100639B-3CFE-4F7D-992C-AF1F9B5044B0}" 7 | EndProject 8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.Serialization.Tests", "EasyMicroservices.Serialization.Tests\EasyMicroservices.Serialization.Tests.csproj", "{0D486E0E-E883-485F-A2C7-D0AFAD752A9D}" 9 | EndProject 10 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.Serialization.BinaryGo", "EasyMicroservices.Serialization.BinaryGo\EasyMicroservices.Serialization.BinaryGo.csproj", "{442A163A-BC10-4F1C-8590-AE6E50771D90}" 11 | EndProject 12 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.Serialization.Newtonsoft.Json", "EasyMicroservices.Serialization.NewtonSoft.Json\EasyMicroservices.Serialization.Newtonsoft.Json.csproj", "{6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}" 13 | EndProject 14 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.Serialization.System.Text.Json", "EasyMicroservices.Serialization.System.Text.Json\EasyMicroservices.Serialization.System.Text.Json.csproj", "{BCEB9E2F-36C5-4000-80C7-C3E3726531D0}" 15 | EndProject 16 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.Serialization.YamlDotNet", "EasyMicroservices.Serialization.YamlDotNet\EasyMicroservices.Serialization.YamlDotNet.csproj", "{36C17046-6AE8-44A0-8283-63E392183A61}" 17 | EndProject 18 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.Serialization.MessagePack", "EasyMicroservices.Serialization.MessagePack\EasyMicroservices.Serialization.MessagePack.csproj", "{75632461-F3EC-4737-87EC-287CF0B09DD1}" 19 | EndProject 20 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.Serialization.System.Text.Xml", "EasyMicroservices.Serialization.System.Text.Xml\EasyMicroservices.Serialization.System.Text.Xml.csproj", "{1BB18979-2455-46BF-98BE-6BD96E93C666}" 21 | EndProject 22 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.Serialization.MemoryPack", "EasyMicroservices.Serialization.MemoryPack\EasyMicroservices.Serialization.MemoryPack.csproj", "{579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}" 23 | EndProject 24 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "App", "App", "{C6B3890B-46C3-4A90-AC7C-EE4A311BA3E7}" 25 | EndProject 26 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Abstractions", "Abstractions", "{98415CB1-FAFF-44FD-ABE1-F5590975ED30}" 27 | EndProject 28 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Implementations", "Implementations", "{4C1D8DFB-8E24-48E8-BC98-84998830070B}" 29 | EndProject 30 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{976EEFD4-BC34-4649-867C-E707CD427F92}" 31 | EndProject 32 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Application", "Application", "{865CD240-06DC-42CA-BAE9-D28A2EE4B10A}" 33 | EndProject 34 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.Serialization.DependencyInjection", "EasyMicroservices.Serialization.DependencyInjection\EasyMicroservices.Serialization.DependencyInjection.csproj", "{B6BF8207-3A9E-4366-8BA8-D30F1118392D}" 35 | EndProject 36 | Global 37 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 38 | Debug|Any CPU = Debug|Any CPU 39 | Debug|x64 = Debug|x64 40 | Debug|x86 = Debug|x86 41 | Release|Any CPU = Release|Any CPU 42 | Release|x64 = Release|x64 43 | Release|x86 = Release|x86 44 | EndGlobalSection 45 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 46 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 47 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Debug|Any CPU.Build.0 = Debug|Any CPU 48 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Debug|x64.ActiveCfg = Debug|x64 49 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Debug|x64.Build.0 = Debug|x64 50 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Debug|x86.ActiveCfg = Debug|x86 51 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Debug|x86.Build.0 = Debug|x86 52 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Release|Any CPU.ActiveCfg = Release|Any CPU 53 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Release|Any CPU.Build.0 = Release|Any CPU 54 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Release|x64.ActiveCfg = Release|x64 55 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Release|x64.Build.0 = Release|x64 56 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Release|x86.ActiveCfg = Release|x86 57 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Release|x86.Build.0 = Release|x86 58 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 59 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Debug|Any CPU.Build.0 = Debug|Any CPU 60 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Debug|x64.ActiveCfg = Debug|Any CPU 61 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Debug|x64.Build.0 = Debug|Any CPU 62 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Debug|x86.ActiveCfg = Debug|Any CPU 63 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Debug|x86.Build.0 = Debug|Any CPU 64 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Release|Any CPU.ActiveCfg = Release|Any CPU 65 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Release|Any CPU.Build.0 = Release|Any CPU 66 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Release|x64.ActiveCfg = Release|Any CPU 67 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Release|x64.Build.0 = Release|Any CPU 68 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Release|x86.ActiveCfg = Release|Any CPU 69 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Release|x86.Build.0 = Release|Any CPU 70 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 71 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Debug|Any CPU.Build.0 = Debug|Any CPU 72 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Debug|x64.ActiveCfg = Debug|x64 73 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Debug|x64.Build.0 = Debug|x64 74 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Debug|x86.ActiveCfg = Debug|x86 75 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Debug|x86.Build.0 = Debug|x86 76 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Release|Any CPU.ActiveCfg = Release|Any CPU 77 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Release|Any CPU.Build.0 = Release|Any CPU 78 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Release|x64.ActiveCfg = Release|x64 79 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Release|x64.Build.0 = Release|x64 80 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Release|x86.ActiveCfg = Release|x86 81 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Release|x86.Build.0 = Release|x86 82 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 83 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Debug|Any CPU.Build.0 = Debug|Any CPU 84 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Debug|x64.ActiveCfg = Debug|x64 85 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Debug|x64.Build.0 = Debug|x64 86 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Debug|x86.ActiveCfg = Debug|x86 87 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Debug|x86.Build.0 = Debug|x86 88 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Release|Any CPU.ActiveCfg = Release|Any CPU 89 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Release|Any CPU.Build.0 = Release|Any CPU 90 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Release|x64.ActiveCfg = Release|x64 91 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Release|x64.Build.0 = Release|x64 92 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Release|x86.ActiveCfg = Release|x86 93 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Release|x86.Build.0 = Release|x86 94 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 95 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Debug|Any CPU.Build.0 = Debug|Any CPU 96 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Debug|x64.ActiveCfg = Debug|x64 97 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Debug|x64.Build.0 = Debug|x64 98 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Debug|x86.ActiveCfg = Debug|x86 99 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Debug|x86.Build.0 = Debug|x86 100 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Release|Any CPU.ActiveCfg = Release|Any CPU 101 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Release|Any CPU.Build.0 = Release|Any CPU 102 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Release|x64.ActiveCfg = Release|x64 103 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Release|x64.Build.0 = Release|x64 104 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Release|x86.ActiveCfg = Release|x86 105 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Release|x86.Build.0 = Release|x86 106 | {36C17046-6AE8-44A0-8283-63E392183A61}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 107 | {36C17046-6AE8-44A0-8283-63E392183A61}.Debug|Any CPU.Build.0 = Debug|Any CPU 108 | {36C17046-6AE8-44A0-8283-63E392183A61}.Debug|x64.ActiveCfg = Debug|x64 109 | {36C17046-6AE8-44A0-8283-63E392183A61}.Debug|x64.Build.0 = Debug|x64 110 | {36C17046-6AE8-44A0-8283-63E392183A61}.Debug|x86.ActiveCfg = Debug|x86 111 | {36C17046-6AE8-44A0-8283-63E392183A61}.Debug|x86.Build.0 = Debug|x86 112 | {36C17046-6AE8-44A0-8283-63E392183A61}.Release|Any CPU.ActiveCfg = Release|Any CPU 113 | {36C17046-6AE8-44A0-8283-63E392183A61}.Release|Any CPU.Build.0 = Release|Any CPU 114 | {36C17046-6AE8-44A0-8283-63E392183A61}.Release|x64.ActiveCfg = Release|x64 115 | {36C17046-6AE8-44A0-8283-63E392183A61}.Release|x64.Build.0 = Release|x64 116 | {36C17046-6AE8-44A0-8283-63E392183A61}.Release|x86.ActiveCfg = Release|x86 117 | {36C17046-6AE8-44A0-8283-63E392183A61}.Release|x86.Build.0 = Release|x86 118 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 119 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Debug|Any CPU.Build.0 = Debug|Any CPU 120 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Debug|x64.ActiveCfg = Debug|x64 121 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Debug|x64.Build.0 = Debug|x64 122 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Debug|x86.ActiveCfg = Debug|x86 123 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Debug|x86.Build.0 = Debug|x86 124 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Release|Any CPU.ActiveCfg = Release|Any CPU 125 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Release|Any CPU.Build.0 = Release|Any CPU 126 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Release|x64.ActiveCfg = Release|x64 127 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Release|x64.Build.0 = Release|x64 128 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Release|x86.ActiveCfg = Release|x86 129 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Release|x86.Build.0 = Release|x86 130 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 131 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Debug|Any CPU.Build.0 = Debug|Any CPU 132 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Debug|x64.ActiveCfg = Debug|x64 133 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Debug|x64.Build.0 = Debug|x64 134 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Debug|x86.ActiveCfg = Debug|x86 135 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Debug|x86.Build.0 = Debug|x86 136 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Release|Any CPU.ActiveCfg = Release|Any CPU 137 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Release|Any CPU.Build.0 = Release|Any CPU 138 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Release|x64.ActiveCfg = Release|x64 139 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Release|x64.Build.0 = Release|x64 140 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Release|x86.ActiveCfg = Release|x86 141 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Release|x86.Build.0 = Release|x86 142 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 143 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Debug|Any CPU.Build.0 = Debug|Any CPU 144 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Debug|x64.ActiveCfg = Debug|Any CPU 145 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Debug|x64.Build.0 = Debug|Any CPU 146 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Debug|x86.ActiveCfg = Debug|Any CPU 147 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Debug|x86.Build.0 = Debug|Any CPU 148 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Release|Any CPU.ActiveCfg = Release|Any CPU 149 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Release|Any CPU.Build.0 = Release|Any CPU 150 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Release|x64.ActiveCfg = Release|Any CPU 151 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Release|x64.Build.0 = Release|Any CPU 152 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Release|x86.ActiveCfg = Release|Any CPU 153 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Release|x86.Build.0 = Release|Any CPU 154 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 155 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Debug|Any CPU.Build.0 = Debug|Any CPU 156 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Debug|x64.ActiveCfg = Debug|x64 157 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Debug|x64.Build.0 = Debug|x64 158 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Debug|x86.ActiveCfg = Debug|x86 159 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Debug|x86.Build.0 = Debug|x86 160 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Release|Any CPU.ActiveCfg = Release|Any CPU 161 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Release|Any CPU.Build.0 = Release|Any CPU 162 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Release|x64.ActiveCfg = Release|x64 163 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Release|x64.Build.0 = Release|x64 164 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Release|x86.ActiveCfg = Release|x86 165 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Release|x86.Build.0 = Release|x86 166 | EndGlobalSection 167 | GlobalSection(SolutionProperties) = preSolution 168 | HideSolutionNode = FALSE 169 | EndGlobalSection 170 | GlobalSection(NestedProjects) = preSolution 171 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0} = {98415CB1-FAFF-44FD-ABE1-F5590975ED30} 172 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D} = {976EEFD4-BC34-4649-867C-E707CD427F92} 173 | {442A163A-BC10-4F1C-8590-AE6E50771D90} = {4C1D8DFB-8E24-48E8-BC98-84998830070B} 174 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686} = {4C1D8DFB-8E24-48E8-BC98-84998830070B} 175 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0} = {4C1D8DFB-8E24-48E8-BC98-84998830070B} 176 | {36C17046-6AE8-44A0-8283-63E392183A61} = {4C1D8DFB-8E24-48E8-BC98-84998830070B} 177 | {75632461-F3EC-4737-87EC-287CF0B09DD1} = {4C1D8DFB-8E24-48E8-BC98-84998830070B} 178 | {1BB18979-2455-46BF-98BE-6BD96E93C666} = {4C1D8DFB-8E24-48E8-BC98-84998830070B} 179 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3} = {4C1D8DFB-8E24-48E8-BC98-84998830070B} 180 | {98415CB1-FAFF-44FD-ABE1-F5590975ED30} = {C6B3890B-46C3-4A90-AC7C-EE4A311BA3E7} 181 | {4C1D8DFB-8E24-48E8-BC98-84998830070B} = {C6B3890B-46C3-4A90-AC7C-EE4A311BA3E7} 182 | {976EEFD4-BC34-4649-867C-E707CD427F92} = {C6B3890B-46C3-4A90-AC7C-EE4A311BA3E7} 183 | {865CD240-06DC-42CA-BAE9-D28A2EE4B10A} = {C6B3890B-46C3-4A90-AC7C-EE4A311BA3E7} 184 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D} = {865CD240-06DC-42CA-BAE9-D28A2EE4B10A} 185 | EndGlobalSection 186 | GlobalSection(ExtensibilityGlobals) = postSolution 187 | SolutionGuid = {7FB83286-A3A3-43D1-BCA1-593F9665E2A7} 188 | EndGlobalSection 189 | EndGlobal 190 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization-net7.0.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.0.31912.275 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.Serialization", "EasyMicroservices.Serialization\EasyMicroservices.Serialization.csproj", "{E100639B-3CFE-4F7D-992C-AF1F9B5044B0}" 7 | EndProject 8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.Serialization.Tests", "EasyMicroservices.Serialization.Tests\EasyMicroservices.Serialization.Tests.csproj", "{0D486E0E-E883-485F-A2C7-D0AFAD752A9D}" 9 | EndProject 10 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.Serialization.BinaryGo", "EasyMicroservices.Serialization.BinaryGo\EasyMicroservices.Serialization.BinaryGo.csproj", "{442A163A-BC10-4F1C-8590-AE6E50771D90}" 11 | EndProject 12 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.Serialization.Newtonsoft.Json", "EasyMicroservices.Serialization.NewtonSoft.Json\EasyMicroservices.Serialization.Newtonsoft.Json.csproj", "{6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}" 13 | EndProject 14 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.Serialization.System.Text.Json", "EasyMicroservices.Serialization.System.Text.Json\EasyMicroservices.Serialization.System.Text.Json.csproj", "{BCEB9E2F-36C5-4000-80C7-C3E3726531D0}" 15 | EndProject 16 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.Serialization.YamlDotNet", "EasyMicroservices.Serialization.YamlDotNet\EasyMicroservices.Serialization.YamlDotNet.csproj", "{36C17046-6AE8-44A0-8283-63E392183A61}" 17 | EndProject 18 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.Serialization.MessagePack", "EasyMicroservices.Serialization.MessagePack\EasyMicroservices.Serialization.MessagePack.csproj", "{75632461-F3EC-4737-87EC-287CF0B09DD1}" 19 | EndProject 20 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.Serialization.System.Text.Xml", "EasyMicroservices.Serialization.System.Text.Xml\EasyMicroservices.Serialization.System.Text.Xml.csproj", "{1BB18979-2455-46BF-98BE-6BD96E93C666}" 21 | EndProject 22 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.Serialization.MemoryPack", "EasyMicroservices.Serialization.MemoryPack\EasyMicroservices.Serialization.MemoryPack.csproj", "{579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}" 23 | EndProject 24 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "App", "App", "{C6B3890B-46C3-4A90-AC7C-EE4A311BA3E7}" 25 | EndProject 26 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Abstractions", "Abstractions", "{98415CB1-FAFF-44FD-ABE1-F5590975ED30}" 27 | EndProject 28 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Implementations", "Implementations", "{4C1D8DFB-8E24-48E8-BC98-84998830070B}" 29 | EndProject 30 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{976EEFD4-BC34-4649-867C-E707CD427F92}" 31 | EndProject 32 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Application", "Application", "{865CD240-06DC-42CA-BAE9-D28A2EE4B10A}" 33 | EndProject 34 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.Serialization.DependencyInjection", "EasyMicroservices.Serialization.DependencyInjection\EasyMicroservices.Serialization.DependencyInjection.csproj", "{B6BF8207-3A9E-4366-8BA8-D30F1118392D}" 35 | EndProject 36 | Global 37 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 38 | Debug|Any CPU = Debug|Any CPU 39 | Debug|x64 = Debug|x64 40 | Debug|x86 = Debug|x86 41 | Release|Any CPU = Release|Any CPU 42 | Release|x64 = Release|x64 43 | Release|x86 = Release|x86 44 | EndGlobalSection 45 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 46 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 47 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Debug|Any CPU.Build.0 = Debug|Any CPU 48 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Debug|x64.ActiveCfg = Debug|x64 49 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Debug|x64.Build.0 = Debug|x64 50 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Debug|x86.ActiveCfg = Debug|x86 51 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Debug|x86.Build.0 = Debug|x86 52 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Release|Any CPU.ActiveCfg = Release|Any CPU 53 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Release|Any CPU.Build.0 = Release|Any CPU 54 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Release|x64.ActiveCfg = Release|x64 55 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Release|x64.Build.0 = Release|x64 56 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Release|x86.ActiveCfg = Release|x86 57 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Release|x86.Build.0 = Release|x86 58 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 59 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Debug|Any CPU.Build.0 = Debug|Any CPU 60 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Debug|x64.ActiveCfg = Debug|Any CPU 61 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Debug|x64.Build.0 = Debug|Any CPU 62 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Debug|x86.ActiveCfg = Debug|Any CPU 63 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Debug|x86.Build.0 = Debug|Any CPU 64 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Release|Any CPU.ActiveCfg = Release|Any CPU 65 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Release|Any CPU.Build.0 = Release|Any CPU 66 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Release|x64.ActiveCfg = Release|Any CPU 67 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Release|x64.Build.0 = Release|Any CPU 68 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Release|x86.ActiveCfg = Release|Any CPU 69 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Release|x86.Build.0 = Release|Any CPU 70 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 71 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Debug|Any CPU.Build.0 = Debug|Any CPU 72 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Debug|x64.ActiveCfg = Debug|x64 73 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Debug|x64.Build.0 = Debug|x64 74 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Debug|x86.ActiveCfg = Debug|x86 75 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Debug|x86.Build.0 = Debug|x86 76 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Release|Any CPU.ActiveCfg = Release|Any CPU 77 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Release|Any CPU.Build.0 = Release|Any CPU 78 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Release|x64.ActiveCfg = Release|x64 79 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Release|x64.Build.0 = Release|x64 80 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Release|x86.ActiveCfg = Release|x86 81 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Release|x86.Build.0 = Release|x86 82 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 83 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Debug|Any CPU.Build.0 = Debug|Any CPU 84 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Debug|x64.ActiveCfg = Debug|x64 85 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Debug|x64.Build.0 = Debug|x64 86 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Debug|x86.ActiveCfg = Debug|x86 87 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Debug|x86.Build.0 = Debug|x86 88 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Release|Any CPU.ActiveCfg = Release|Any CPU 89 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Release|Any CPU.Build.0 = Release|Any CPU 90 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Release|x64.ActiveCfg = Release|x64 91 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Release|x64.Build.0 = Release|x64 92 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Release|x86.ActiveCfg = Release|x86 93 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Release|x86.Build.0 = Release|x86 94 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 95 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Debug|Any CPU.Build.0 = Debug|Any CPU 96 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Debug|x64.ActiveCfg = Debug|x64 97 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Debug|x64.Build.0 = Debug|x64 98 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Debug|x86.ActiveCfg = Debug|x86 99 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Debug|x86.Build.0 = Debug|x86 100 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Release|Any CPU.ActiveCfg = Release|Any CPU 101 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Release|Any CPU.Build.0 = Release|Any CPU 102 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Release|x64.ActiveCfg = Release|x64 103 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Release|x64.Build.0 = Release|x64 104 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Release|x86.ActiveCfg = Release|x86 105 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Release|x86.Build.0 = Release|x86 106 | {36C17046-6AE8-44A0-8283-63E392183A61}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 107 | {36C17046-6AE8-44A0-8283-63E392183A61}.Debug|Any CPU.Build.0 = Debug|Any CPU 108 | {36C17046-6AE8-44A0-8283-63E392183A61}.Debug|x64.ActiveCfg = Debug|x64 109 | {36C17046-6AE8-44A0-8283-63E392183A61}.Debug|x64.Build.0 = Debug|x64 110 | {36C17046-6AE8-44A0-8283-63E392183A61}.Debug|x86.ActiveCfg = Debug|x86 111 | {36C17046-6AE8-44A0-8283-63E392183A61}.Debug|x86.Build.0 = Debug|x86 112 | {36C17046-6AE8-44A0-8283-63E392183A61}.Release|Any CPU.ActiveCfg = Release|Any CPU 113 | {36C17046-6AE8-44A0-8283-63E392183A61}.Release|Any CPU.Build.0 = Release|Any CPU 114 | {36C17046-6AE8-44A0-8283-63E392183A61}.Release|x64.ActiveCfg = Release|x64 115 | {36C17046-6AE8-44A0-8283-63E392183A61}.Release|x64.Build.0 = Release|x64 116 | {36C17046-6AE8-44A0-8283-63E392183A61}.Release|x86.ActiveCfg = Release|x86 117 | {36C17046-6AE8-44A0-8283-63E392183A61}.Release|x86.Build.0 = Release|x86 118 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 119 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Debug|Any CPU.Build.0 = Debug|Any CPU 120 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Debug|x64.ActiveCfg = Debug|x64 121 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Debug|x64.Build.0 = Debug|x64 122 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Debug|x86.ActiveCfg = Debug|x86 123 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Debug|x86.Build.0 = Debug|x86 124 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Release|Any CPU.ActiveCfg = Release|Any CPU 125 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Release|Any CPU.Build.0 = Release|Any CPU 126 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Release|x64.ActiveCfg = Release|x64 127 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Release|x64.Build.0 = Release|x64 128 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Release|x86.ActiveCfg = Release|x86 129 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Release|x86.Build.0 = Release|x86 130 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 131 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Debug|Any CPU.Build.0 = Debug|Any CPU 132 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Debug|x64.ActiveCfg = Debug|x64 133 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Debug|x64.Build.0 = Debug|x64 134 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Debug|x86.ActiveCfg = Debug|x86 135 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Debug|x86.Build.0 = Debug|x86 136 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Release|Any CPU.ActiveCfg = Release|Any CPU 137 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Release|Any CPU.Build.0 = Release|Any CPU 138 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Release|x64.ActiveCfg = Release|x64 139 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Release|x64.Build.0 = Release|x64 140 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Release|x86.ActiveCfg = Release|x86 141 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Release|x86.Build.0 = Release|x86 142 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 143 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Debug|Any CPU.Build.0 = Debug|Any CPU 144 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Debug|x64.ActiveCfg = Debug|Any CPU 145 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Debug|x64.Build.0 = Debug|Any CPU 146 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Debug|x86.ActiveCfg = Debug|Any CPU 147 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Debug|x86.Build.0 = Debug|Any CPU 148 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Release|Any CPU.ActiveCfg = Release|Any CPU 149 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Release|Any CPU.Build.0 = Release|Any CPU 150 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Release|x64.ActiveCfg = Release|Any CPU 151 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Release|x64.Build.0 = Release|Any CPU 152 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Release|x86.ActiveCfg = Release|Any CPU 153 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Release|x86.Build.0 = Release|Any CPU 154 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 155 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Debug|Any CPU.Build.0 = Debug|Any CPU 156 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Debug|x64.ActiveCfg = Debug|x64 157 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Debug|x64.Build.0 = Debug|x64 158 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Debug|x86.ActiveCfg = Debug|x86 159 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Debug|x86.Build.0 = Debug|x86 160 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Release|Any CPU.ActiveCfg = Release|Any CPU 161 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Release|Any CPU.Build.0 = Release|Any CPU 162 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Release|x64.ActiveCfg = Release|x64 163 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Release|x64.Build.0 = Release|x64 164 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Release|x86.ActiveCfg = Release|x86 165 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Release|x86.Build.0 = Release|x86 166 | EndGlobalSection 167 | GlobalSection(SolutionProperties) = preSolution 168 | HideSolutionNode = FALSE 169 | EndGlobalSection 170 | GlobalSection(NestedProjects) = preSolution 171 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0} = {98415CB1-FAFF-44FD-ABE1-F5590975ED30} 172 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D} = {976EEFD4-BC34-4649-867C-E707CD427F92} 173 | {442A163A-BC10-4F1C-8590-AE6E50771D90} = {4C1D8DFB-8E24-48E8-BC98-84998830070B} 174 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686} = {4C1D8DFB-8E24-48E8-BC98-84998830070B} 175 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0} = {4C1D8DFB-8E24-48E8-BC98-84998830070B} 176 | {36C17046-6AE8-44A0-8283-63E392183A61} = {4C1D8DFB-8E24-48E8-BC98-84998830070B} 177 | {75632461-F3EC-4737-87EC-287CF0B09DD1} = {4C1D8DFB-8E24-48E8-BC98-84998830070B} 178 | {1BB18979-2455-46BF-98BE-6BD96E93C666} = {4C1D8DFB-8E24-48E8-BC98-84998830070B} 179 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3} = {4C1D8DFB-8E24-48E8-BC98-84998830070B} 180 | {98415CB1-FAFF-44FD-ABE1-F5590975ED30} = {C6B3890B-46C3-4A90-AC7C-EE4A311BA3E7} 181 | {4C1D8DFB-8E24-48E8-BC98-84998830070B} = {C6B3890B-46C3-4A90-AC7C-EE4A311BA3E7} 182 | {976EEFD4-BC34-4649-867C-E707CD427F92} = {C6B3890B-46C3-4A90-AC7C-EE4A311BA3E7} 183 | {865CD240-06DC-42CA-BAE9-D28A2EE4B10A} = {C6B3890B-46C3-4A90-AC7C-EE4A311BA3E7} 184 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D} = {865CD240-06DC-42CA-BAE9-D28A2EE4B10A} 185 | EndGlobalSection 186 | GlobalSection(ExtensibilityGlobals) = postSolution 187 | SolutionGuid = {7FB83286-A3A3-43D1-BCA1-593F9665E2A7} 188 | EndGlobalSection 189 | EndGlobal 190 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization-net8.0.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.0.31912.275 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.Serialization", "EasyMicroservices.Serialization\EasyMicroservices.Serialization.csproj", "{E100639B-3CFE-4F7D-992C-AF1F9B5044B0}" 7 | EndProject 8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.Serialization.Tests", "EasyMicroservices.Serialization.Tests\EasyMicroservices.Serialization.Tests.csproj", "{0D486E0E-E883-485F-A2C7-D0AFAD752A9D}" 9 | EndProject 10 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.Serialization.BinaryGo", "EasyMicroservices.Serialization.BinaryGo\EasyMicroservices.Serialization.BinaryGo.csproj", "{442A163A-BC10-4F1C-8590-AE6E50771D90}" 11 | EndProject 12 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.Serialization.Newtonsoft.Json", "EasyMicroservices.Serialization.NewtonSoft.Json\EasyMicroservices.Serialization.Newtonsoft.Json.csproj", "{6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}" 13 | EndProject 14 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.Serialization.System.Text.Json", "EasyMicroservices.Serialization.System.Text.Json\EasyMicroservices.Serialization.System.Text.Json.csproj", "{BCEB9E2F-36C5-4000-80C7-C3E3726531D0}" 15 | EndProject 16 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.Serialization.YamlDotNet", "EasyMicroservices.Serialization.YamlDotNet\EasyMicroservices.Serialization.YamlDotNet.csproj", "{36C17046-6AE8-44A0-8283-63E392183A61}" 17 | EndProject 18 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.Serialization.MessagePack", "EasyMicroservices.Serialization.MessagePack\EasyMicroservices.Serialization.MessagePack.csproj", "{75632461-F3EC-4737-87EC-287CF0B09DD1}" 19 | EndProject 20 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.Serialization.System.Text.Xml", "EasyMicroservices.Serialization.System.Text.Xml\EasyMicroservices.Serialization.System.Text.Xml.csproj", "{1BB18979-2455-46BF-98BE-6BD96E93C666}" 21 | EndProject 22 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.Serialization.MemoryPack", "EasyMicroservices.Serialization.MemoryPack\EasyMicroservices.Serialization.MemoryPack.csproj", "{579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}" 23 | EndProject 24 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "App", "App", "{C6B3890B-46C3-4A90-AC7C-EE4A311BA3E7}" 25 | EndProject 26 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Abstractions", "Abstractions", "{98415CB1-FAFF-44FD-ABE1-F5590975ED30}" 27 | EndProject 28 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Implementations", "Implementations", "{4C1D8DFB-8E24-48E8-BC98-84998830070B}" 29 | EndProject 30 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{976EEFD4-BC34-4649-867C-E707CD427F92}" 31 | EndProject 32 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Application", "Application", "{865CD240-06DC-42CA-BAE9-D28A2EE4B10A}" 33 | EndProject 34 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.Serialization.DependencyInjection", "EasyMicroservices.Serialization.DependencyInjection\EasyMicroservices.Serialization.DependencyInjection.csproj", "{B6BF8207-3A9E-4366-8BA8-D30F1118392D}" 35 | EndProject 36 | Global 37 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 38 | Debug|Any CPU = Debug|Any CPU 39 | Debug|x64 = Debug|x64 40 | Debug|x86 = Debug|x86 41 | Release|Any CPU = Release|Any CPU 42 | Release|x64 = Release|x64 43 | Release|x86 = Release|x86 44 | EndGlobalSection 45 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 46 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 47 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Debug|Any CPU.Build.0 = Debug|Any CPU 48 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Debug|x64.ActiveCfg = Debug|x64 49 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Debug|x64.Build.0 = Debug|x64 50 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Debug|x86.ActiveCfg = Debug|x86 51 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Debug|x86.Build.0 = Debug|x86 52 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Release|Any CPU.ActiveCfg = Release|Any CPU 53 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Release|Any CPU.Build.0 = Release|Any CPU 54 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Release|x64.ActiveCfg = Release|x64 55 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Release|x64.Build.0 = Release|x64 56 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Release|x86.ActiveCfg = Release|x86 57 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0}.Release|x86.Build.0 = Release|x86 58 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 59 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Debug|Any CPU.Build.0 = Debug|Any CPU 60 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Debug|x64.ActiveCfg = Debug|Any CPU 61 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Debug|x64.Build.0 = Debug|Any CPU 62 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Debug|x86.ActiveCfg = Debug|Any CPU 63 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Debug|x86.Build.0 = Debug|Any CPU 64 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Release|Any CPU.ActiveCfg = Release|Any CPU 65 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Release|Any CPU.Build.0 = Release|Any CPU 66 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Release|x64.ActiveCfg = Release|Any CPU 67 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Release|x64.Build.0 = Release|Any CPU 68 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Release|x86.ActiveCfg = Release|Any CPU 69 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D}.Release|x86.Build.0 = Release|Any CPU 70 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 71 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Debug|Any CPU.Build.0 = Debug|Any CPU 72 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Debug|x64.ActiveCfg = Debug|x64 73 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Debug|x64.Build.0 = Debug|x64 74 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Debug|x86.ActiveCfg = Debug|x86 75 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Debug|x86.Build.0 = Debug|x86 76 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Release|Any CPU.ActiveCfg = Release|Any CPU 77 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Release|Any CPU.Build.0 = Release|Any CPU 78 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Release|x64.ActiveCfg = Release|x64 79 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Release|x64.Build.0 = Release|x64 80 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Release|x86.ActiveCfg = Release|x86 81 | {442A163A-BC10-4F1C-8590-AE6E50771D90}.Release|x86.Build.0 = Release|x86 82 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 83 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Debug|Any CPU.Build.0 = Debug|Any CPU 84 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Debug|x64.ActiveCfg = Debug|x64 85 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Debug|x64.Build.0 = Debug|x64 86 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Debug|x86.ActiveCfg = Debug|x86 87 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Debug|x86.Build.0 = Debug|x86 88 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Release|Any CPU.ActiveCfg = Release|Any CPU 89 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Release|Any CPU.Build.0 = Release|Any CPU 90 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Release|x64.ActiveCfg = Release|x64 91 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Release|x64.Build.0 = Release|x64 92 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Release|x86.ActiveCfg = Release|x86 93 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686}.Release|x86.Build.0 = Release|x86 94 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 95 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Debug|Any CPU.Build.0 = Debug|Any CPU 96 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Debug|x64.ActiveCfg = Debug|x64 97 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Debug|x64.Build.0 = Debug|x64 98 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Debug|x86.ActiveCfg = Debug|x86 99 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Debug|x86.Build.0 = Debug|x86 100 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Release|Any CPU.ActiveCfg = Release|Any CPU 101 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Release|Any CPU.Build.0 = Release|Any CPU 102 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Release|x64.ActiveCfg = Release|x64 103 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Release|x64.Build.0 = Release|x64 104 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Release|x86.ActiveCfg = Release|x86 105 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0}.Release|x86.Build.0 = Release|x86 106 | {36C17046-6AE8-44A0-8283-63E392183A61}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 107 | {36C17046-6AE8-44A0-8283-63E392183A61}.Debug|Any CPU.Build.0 = Debug|Any CPU 108 | {36C17046-6AE8-44A0-8283-63E392183A61}.Debug|x64.ActiveCfg = Debug|x64 109 | {36C17046-6AE8-44A0-8283-63E392183A61}.Debug|x64.Build.0 = Debug|x64 110 | {36C17046-6AE8-44A0-8283-63E392183A61}.Debug|x86.ActiveCfg = Debug|x86 111 | {36C17046-6AE8-44A0-8283-63E392183A61}.Debug|x86.Build.0 = Debug|x86 112 | {36C17046-6AE8-44A0-8283-63E392183A61}.Release|Any CPU.ActiveCfg = Release|Any CPU 113 | {36C17046-6AE8-44A0-8283-63E392183A61}.Release|Any CPU.Build.0 = Release|Any CPU 114 | {36C17046-6AE8-44A0-8283-63E392183A61}.Release|x64.ActiveCfg = Release|x64 115 | {36C17046-6AE8-44A0-8283-63E392183A61}.Release|x64.Build.0 = Release|x64 116 | {36C17046-6AE8-44A0-8283-63E392183A61}.Release|x86.ActiveCfg = Release|x86 117 | {36C17046-6AE8-44A0-8283-63E392183A61}.Release|x86.Build.0 = Release|x86 118 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 119 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Debug|Any CPU.Build.0 = Debug|Any CPU 120 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Debug|x64.ActiveCfg = Debug|x64 121 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Debug|x64.Build.0 = Debug|x64 122 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Debug|x86.ActiveCfg = Debug|x86 123 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Debug|x86.Build.0 = Debug|x86 124 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Release|Any CPU.ActiveCfg = Release|Any CPU 125 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Release|Any CPU.Build.0 = Release|Any CPU 126 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Release|x64.ActiveCfg = Release|x64 127 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Release|x64.Build.0 = Release|x64 128 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Release|x86.ActiveCfg = Release|x86 129 | {75632461-F3EC-4737-87EC-287CF0B09DD1}.Release|x86.Build.0 = Release|x86 130 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 131 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Debug|Any CPU.Build.0 = Debug|Any CPU 132 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Debug|x64.ActiveCfg = Debug|x64 133 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Debug|x64.Build.0 = Debug|x64 134 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Debug|x86.ActiveCfg = Debug|x86 135 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Debug|x86.Build.0 = Debug|x86 136 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Release|Any CPU.ActiveCfg = Release|Any CPU 137 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Release|Any CPU.Build.0 = Release|Any CPU 138 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Release|x64.ActiveCfg = Release|x64 139 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Release|x64.Build.0 = Release|x64 140 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Release|x86.ActiveCfg = Release|x86 141 | {1BB18979-2455-46BF-98BE-6BD96E93C666}.Release|x86.Build.0 = Release|x86 142 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 143 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Debug|Any CPU.Build.0 = Debug|Any CPU 144 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Debug|x64.ActiveCfg = Debug|Any CPU 145 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Debug|x64.Build.0 = Debug|Any CPU 146 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Debug|x86.ActiveCfg = Debug|Any CPU 147 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Debug|x86.Build.0 = Debug|Any CPU 148 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Release|Any CPU.ActiveCfg = Release|Any CPU 149 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Release|Any CPU.Build.0 = Release|Any CPU 150 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Release|x64.ActiveCfg = Release|Any CPU 151 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Release|x64.Build.0 = Release|Any CPU 152 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Release|x86.ActiveCfg = Release|Any CPU 153 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3}.Release|x86.Build.0 = Release|Any CPU 154 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 155 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Debug|Any CPU.Build.0 = Debug|Any CPU 156 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Debug|x64.ActiveCfg = Debug|x64 157 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Debug|x64.Build.0 = Debug|x64 158 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Debug|x86.ActiveCfg = Debug|x86 159 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Debug|x86.Build.0 = Debug|x86 160 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Release|Any CPU.ActiveCfg = Release|Any CPU 161 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Release|Any CPU.Build.0 = Release|Any CPU 162 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Release|x64.ActiveCfg = Release|x64 163 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Release|x64.Build.0 = Release|x64 164 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Release|x86.ActiveCfg = Release|x86 165 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D}.Release|x86.Build.0 = Release|x86 166 | EndGlobalSection 167 | GlobalSection(SolutionProperties) = preSolution 168 | HideSolutionNode = FALSE 169 | EndGlobalSection 170 | GlobalSection(NestedProjects) = preSolution 171 | {E100639B-3CFE-4F7D-992C-AF1F9B5044B0} = {98415CB1-FAFF-44FD-ABE1-F5590975ED30} 172 | {0D486E0E-E883-485F-A2C7-D0AFAD752A9D} = {976EEFD4-BC34-4649-867C-E707CD427F92} 173 | {442A163A-BC10-4F1C-8590-AE6E50771D90} = {4C1D8DFB-8E24-48E8-BC98-84998830070B} 174 | {6CA7DFEE-6B4F-4747-9CF8-DB7E2F371686} = {4C1D8DFB-8E24-48E8-BC98-84998830070B} 175 | {BCEB9E2F-36C5-4000-80C7-C3E3726531D0} = {4C1D8DFB-8E24-48E8-BC98-84998830070B} 176 | {36C17046-6AE8-44A0-8283-63E392183A61} = {4C1D8DFB-8E24-48E8-BC98-84998830070B} 177 | {75632461-F3EC-4737-87EC-287CF0B09DD1} = {4C1D8DFB-8E24-48E8-BC98-84998830070B} 178 | {1BB18979-2455-46BF-98BE-6BD96E93C666} = {4C1D8DFB-8E24-48E8-BC98-84998830070B} 179 | {579B42BC-8F4C-495C-9B53-5A5CBF86EAE3} = {4C1D8DFB-8E24-48E8-BC98-84998830070B} 180 | {98415CB1-FAFF-44FD-ABE1-F5590975ED30} = {C6B3890B-46C3-4A90-AC7C-EE4A311BA3E7} 181 | {4C1D8DFB-8E24-48E8-BC98-84998830070B} = {C6B3890B-46C3-4A90-AC7C-EE4A311BA3E7} 182 | {976EEFD4-BC34-4649-867C-E707CD427F92} = {C6B3890B-46C3-4A90-AC7C-EE4A311BA3E7} 183 | {865CD240-06DC-42CA-BAE9-D28A2EE4B10A} = {C6B3890B-46C3-4A90-AC7C-EE4A311BA3E7} 184 | {B6BF8207-3A9E-4366-8BA8-D30F1118392D} = {865CD240-06DC-42CA-BAE9-D28A2EE4B10A} 185 | EndGlobalSection 186 | GlobalSection(ExtensibilityGlobals) = postSolution 187 | SolutionGuid = {7FB83286-A3A3-43D1-BCA1-593F9665E2A7} 188 | EndGlobalSection 189 | EndGlobal 190 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.BinaryGo/BinaryGoExtensions.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | using System; 5 | using EasyMicroservices.Serialization.BinaryGo.Providers; 6 | using EasyMicroservices.Serialization.Options; 7 | 8 | namespace Microsoft.Extensions.DependencyInjection 9 | { 10 | /// 11 | /// 12 | /// 13 | public static class BinaryGoExtensions 14 | { 15 | /// 16 | /// 17 | /// 18 | /// 19 | /// 20 | public static SerializationOption UseBinaryGo(this SerializationOption options) 21 | { 22 | options.ThrowIfNull(nameof(options)); 23 | SerializationOptionBuilder.UseBinarySerialization(() => new BinaryGoProvider()); 24 | return options; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.BinaryGo/EasyMicroservices.Serialization.BinaryGo.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | $(SolutionFileName.Split('-')[1].Replace('.sln','')) 7 | 8 | 9 | 10 | 11 | netstandard2.0;netstandard2.1;netcoreapp3.1;net6.0;net48;net45;net7.0;net8.0 12 | 13 | 14 | 15 | 16 | 17 | AnyCPU;x64;x86 18 | EasyMicroservices 19 | true 20 | 0.0.0.9 21 | Serialize and deserialize wrapper 22 | EasyMicroservices@gmail.com 23 | Serialize,deserialize 24 | https://github.com/EasyMicroservices/Serialization 25 | latest 26 | true 27 | .\bin\$(Configuration)\$(TargetFramework)\EasyMicroservice.Serialization.BinaryGo.xml 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.BinaryGo/Providers/BinaryGoProvider.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | using System; 5 | using BinaryGo.Binary; 6 | using BinaryGo.Binary.Deserialize; 7 | using EasyMicroservices.Serialization.Providers; 8 | 9 | namespace EasyMicroservices.Serialization.BinaryGo.Providers 10 | { 11 | /// 12 | /// use binary go package as binary serialization provider 13 | /// 14 | public class BinaryGoProvider : BinarySerializationBaseProvider 15 | { 16 | /// 17 | /// Deserialize from byte 18 | /// 19 | /// 20 | /// 21 | /// 22 | public override T Deserialize(ReadOnlySpan reader) 23 | { 24 | var goSerializer = new BinaryDeserializer(); 25 | goSerializer.Options = new global::BinaryGo.Helpers.BaseOptionInfo(); 26 | return goSerializer.Deserialize(reader); 27 | } 28 | 29 | /// 30 | /// Serialize to byte 31 | /// 32 | /// 33 | /// 34 | public override ReadOnlySpan Serialize(T value) 35 | { 36 | var goSerializer = new BinarySerializer(); 37 | goSerializer.Options = new global::BinaryGo.Helpers.BaseOptionInfo(); 38 | return goSerializer.Serialize(value); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.DependencyInjection/EasyMicroservices.Serialization.DependencyInjection.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | $(SolutionFileName.Split('-')[1].Replace('.sln','')) 7 | 8 | 9 | 10 | 11 | netstandard2.0;netstandard2.1;netcoreapp3.1;net6.0;net48;net7.0;net8.0 12 | 13 | 14 | 15 | 16 | 17 | AnyCPU;x64;x86 18 | EasyMicroservices 19 | true 20 | 0.0.0.9 21 | Serialize and deserialize wrapper 22 | EasyMicroservices@gmail.com 23 | Serialize,deserialize 24 | https://github.com/EasyMicroservices/Serialization 25 | latest 26 | true 27 | .\bin\$(Configuration)\$(TargetFramework)\EasyMicroservices.Serialization.DependencyInjection.xml 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.DependencyInjection/SerializationExtensions.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | using System; 5 | using EasyMicroservices.Serialization.Interfaces; 6 | using EasyMicroservices.Serialization.Options; 7 | 8 | namespace Microsoft.Extensions.DependencyInjection 9 | { 10 | /// 11 | /// 12 | /// 13 | public static class SerializationExtensions 14 | { 15 | /// 16 | /// 17 | /// 18 | /// 19 | /// 20 | /// 21 | public static IServiceCollection AddSerialization(this IServiceCollection services, Action options) 22 | { 23 | return AddSerializationTransient(services, options); 24 | } 25 | 26 | /// 27 | /// 28 | /// 29 | /// 30 | /// 31 | /// 32 | public static IServiceCollection AddSerializationTransient(this IServiceCollection services, Action options) 33 | { 34 | options.ThrowIfNull(nameof(options)); 35 | options(new SerializationOption()); 36 | services.AddTransient(service => SerializationOptionBuilder.GetTextSerialization()); 37 | services.AddTransient(service => SerializationOptionBuilder.GetBinarySerialization()); 38 | return services; 39 | } 40 | 41 | /// 42 | /// 43 | /// 44 | /// 45 | /// 46 | /// 47 | public static IServiceCollection AddSerializationScoped(this IServiceCollection services, Action options) 48 | { 49 | options.ThrowIfNull(nameof(options)); 50 | options(new SerializationOption()); 51 | services.AddScoped(service => SerializationOptionBuilder.GetTextSerialization()); 52 | services.AddScoped(service => SerializationOptionBuilder.GetBinarySerialization()); 53 | return services; 54 | } 55 | 56 | /// 57 | /// 58 | /// 59 | /// 60 | /// 61 | /// 62 | public static IServiceCollection AddSerializationSingleton(this IServiceCollection services, Action options) 63 | { 64 | options.ThrowIfNull(nameof(options)); 65 | options(new SerializationOption()); 66 | services.AddSingleton(service => SerializationOptionBuilder.GetTextSerialization()); 67 | services.AddSingleton(service => SerializationOptionBuilder.GetBinarySerialization()); 68 | return services; 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.MemoryPack/EasyMicroservices.Serialization.MemoryPack.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | $(SolutionFileName.Split('-')[1].Replace('.sln','')) 7 | 8 | 9 | 10 | 11 | net7.0;net8.0 12 | 13 | 14 | 15 | 16 | 17 | AnyCPU;x64;x86 18 | EasyMicroservices 19 | true 20 | 0.0.0.9 21 | Serialize and deserialize wrapper 22 | EasyMicroservice@gmail.com 23 | Serialize,deserialize 24 | https://github.com/EasyMicroservices/Serialization 25 | latest 26 | true 27 | .\bin\$(Configuration)\$(TargetFramework)\EasyMicroservices.Serialization.MemoryPack.xml 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.MemoryPack/MemoryPackExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using EasyMicroservices.Serialization.MemoryPack.Providers; 3 | using EasyMicroservices.Serialization.Options; 4 | 5 | namespace Microsoft.Extensions.DependencyInjection 6 | { 7 | /// 8 | /// 9 | /// 10 | public static class MemoryPackExtensions 11 | { 12 | /// 13 | /// 14 | /// 15 | /// 16 | /// 17 | public static SerializationOption UseMemoryPack(this SerializationOption options) 18 | { 19 | options.ThrowIfNull(nameof(options)); 20 | SerializationOptionBuilder.UseBinarySerialization(() => new MemoryPackProvider()); 21 | return options; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.MemoryPack/Providers/MemoryPackProvider.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | using System; 5 | using EasyMicroservices.Serialization.Providers; 6 | using MemoryPack; 7 | 8 | namespace EasyMicroservices.Serialization.MemoryPack.Providers 9 | { 10 | /// 11 | /// use memory pack package for fastest Serialization and deserialization 12 | /// 13 | /// 14 | /// read more about memory pack 15 | ///
16 | /// https://neuecc.medium.com/how-to-make-the-fastest-net-serializer-with-net-7-c-11-case-of-memorypack-ad28c0366516 17 | ///
18 | public class MemoryPackProvider : BinarySerializationBaseProvider 19 | { 20 | /// 21 | /// 22 | /// 23 | /// 24 | /// 25 | /// 26 | public override T Deserialize(ReadOnlySpan reader) 27 | { 28 | return (T)MemoryPackSerializer.Deserialize(typeof(T), reader); 29 | } 30 | /// 31 | /// 32 | /// 33 | /// 34 | /// 35 | /// 36 | public override ReadOnlySpan Serialize(T value) 37 | { 38 | return MemoryPackSerializer.Serialize(value); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.MessagePack/EasyMicroservices.Serialization.MessagePack.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | $(SolutionFileName.Split('-')[1].Replace('.sln','')) 7 | 8 | 9 | 10 | 11 | netstandard2.0;netstandard2.1;netcoreapp3.1;net6.0;net48;net7.0;net8.0 12 | 13 | 14 | 15 | 16 | 17 | AnyCPU;x64;x86 18 | EasyMicroservices 19 | true 20 | 0.0.0.9 21 | Serilize and deserilize wrapper 22 | EasyMicroservices@gmail.com 23 | Serilize,deserilize 24 | https://github.com/EasyMicroservices/Serialization 25 | latest 26 | true 27 | .\bin\$(Configuration)\$(TargetFramework)\EasyMicroservice.Serialization.MessagePack.xml 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.MessagePack/MessagePackExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using EasyMicroservices.Serialization.MessagePack.Providers; 3 | using EasyMicroservices.Serialization.Options; 4 | 5 | namespace Microsoft.Extensions.DependencyInjection 6 | { 7 | /// 8 | /// 9 | /// 10 | public static class MessagePackExtensions 11 | { 12 | /// 13 | /// 14 | /// 15 | /// 16 | /// 17 | public static SerializationOption UseMessagePack(this SerializationOption options) 18 | { 19 | options.ThrowIfNull(nameof(options)); 20 | SerializationOptionBuilder.UseBinarySerialization(() => new MessagePackProvider()); 21 | return options; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.MessagePack/Providers/MessagePackProvider.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | using System; 5 | using EasyMicroservices.Serialization.Providers; 6 | using MessagePack; 7 | using MessagePack.Resolvers; 8 | 9 | namespace EasyMicroservices.Serialization.MessagePack.Providers 10 | { 11 | /// 12 | /// use MessagePack package as binary serialization provider 13 | /// 14 | public class MessagePackProvider : BinarySerializationBaseProvider 15 | { 16 | /// 17 | /// Deserialize from byte 18 | /// 19 | /// 20 | /// 21 | /// 22 | public override T Deserialize(ReadOnlySpan reader) 23 | { 24 | return MessagePackSerializer.Deserialize(reader.ToArray(), ContractlessStandardResolver.Options); 25 | } 26 | 27 | 28 | /// 29 | /// serilize T to byte array. 30 | /// 31 | /// 32 | /// 33 | /// 34 | public override ReadOnlySpan Serialize(T value) 35 | { 36 | return MessagePackSerializer.Serialize(value, ContractlessStandardResolver.Options); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.NewtonSoft.Json/EasyMicroservices.Serialization.Newtonsoft.Json.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | $(SolutionFileName.Split('-')[1].Replace('.sln','')) 7 | 8 | 9 | 10 | 11 | netstandard2.0;netstandard2.1;netcoreapp3.1;net6.0;net48;net452;net7.0;net8.0 12 | 13 | 14 | 15 | 16 | 17 | AnyCPU;x64;x86 18 | EasyMicroservices 19 | true 20 | 0.0.0.9 21 | Serialize and deserialize wrapper 22 | EasyMicroservices@gmail.com 23 | Serialize,deserialize 24 | https://github.com/EasyMicroservices/Serialization 25 | latest 26 | true 27 | .\bin\$(Configuration)\$(TargetFramework)\EasyMicroservice.Serialization.Newtonsoft.Json.xml 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.NewtonSoft.Json/NewtonsoftJsonExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using EasyMicroservices.Serialization.Newtonsoft.Json.Providers; 3 | using EasyMicroservices.Serialization.Options; 4 | 5 | namespace Microsoft.Extensions.DependencyInjection 6 | { 7 | /// 8 | /// 9 | /// 10 | public static class NewtonsoftJsonExtensions 11 | { 12 | /// 13 | /// 14 | /// 15 | /// 16 | /// 17 | public static SerializationOption UseNewtonsoftJson(this SerializationOption options) 18 | { 19 | options.ThrowIfNull(nameof(options)); 20 | SerializationOptionBuilder.UseTextSerialization(() => new NewtonsoftJsonProvider()); 21 | return options; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.NewtonSoft.Json/Providers/NewtonsoftJsonProvider.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | using System; 5 | using EasyMicroservices.Serialization.Providers; 6 | using Newtonsoft.Json; 7 | 8 | namespace EasyMicroservices.Serialization.Newtonsoft.Json.Providers 9 | { 10 | /// 11 | /// use NewtonsoftJson package as text serialization provider 12 | /// 13 | public class NewtonsoftJsonProvider : TextSerializationBaseProvider 14 | { 15 | private readonly JsonSerializerSettings _options; 16 | /// 17 | /// 18 | /// 19 | /// 20 | public NewtonsoftJsonProvider(JsonSerializerSettings options) 21 | { 22 | _options = options; 23 | } 24 | 25 | /// 26 | /// 27 | /// 28 | public NewtonsoftJsonProvider() 29 | { 30 | } 31 | 32 | /// 33 | /// Deserialize from string 34 | /// 35 | /// 36 | /// 37 | /// 38 | public override T Deserialize(string value) 39 | { 40 | return JsonConvert.DeserializeObject(value, _options); 41 | } 42 | /// 43 | /// Serialize to string 44 | /// 45 | /// 46 | /// 47 | /// 48 | public override string Serialize(T value) 49 | { 50 | return JsonConvert.SerializeObject(value, _options); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.System.Text.Json/EasyMicroservices.Serialization.System.Text.Json.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | $(SolutionFileName.Split('-')[1].Replace('.sln','')) 7 | 8 | 9 | 10 | 11 | netstandard2.0;netstandard2.1;netcoreapp3.1;net6.0;net7.0;net8.0;net48 12 | 13 | 14 | 15 | 16 | 17 | AnyCPU;x64;x86 18 | EasyMicroservices 19 | true 20 | 0.0.0.9 21 | Serialize and deserialize wrapper 22 | EasyMicroservice@gmail.com 23 | Serialize,deserialize 24 | https://github.com/EasyMicroservices/Serialization 25 | latest 26 | true 27 | .\bin\$(Configuration)\$(TargetFramework)\EasyMicroservice.Serialization.System.Text.json.xml 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.System.Text.Json/Providers/SystemTextJsonBinaryProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text.Json; 3 | using EasyMicroservices.Serialization.Providers; 4 | 5 | namespace EasyMicroservices.Serialization.System.Text.Json.Providers 6 | { 7 | /// 8 | /// use mocrosoft SystemTextJson package as binary serialization provider 9 | /// 10 | 11 | public class SystemTextJsonBinaryProvider : BinarySerializationBaseProvider 12 | { 13 | private readonly JsonSerializerOptions _options; 14 | /// 15 | /// 16 | /// 17 | /// 18 | public SystemTextJsonBinaryProvider(JsonSerializerOptions options) 19 | { 20 | _options = options; 21 | } 22 | /// 23 | /// 24 | /// 25 | public SystemTextJsonBinaryProvider() 26 | { 27 | } 28 | 29 | /// 30 | /// Deserialize from byte 31 | /// 32 | /// 33 | /// 34 | /// 35 | /// 36 | public override T Deserialize(ReadOnlySpan reader) 37 | { 38 | return JsonSerializer.Deserialize(reader, _options); 39 | } 40 | /// 41 | /// Serialize to byte 42 | /// 43 | /// 44 | /// 45 | /// 46 | public override ReadOnlySpan Serialize(T value) 47 | { 48 | return JsonSerializer.SerializeToUtf8Bytes(value, _options); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.System.Text.Json/Providers/SystemTextJsonProvider.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | using System; 5 | using System.Text.Json; 6 | using EasyMicroservices.Serialization.Providers; 7 | 8 | namespace EasyMicroservices.Serialization.System.Text.Json.Providers 9 | { 10 | /// 11 | /// use mocrosoft SystemTextJson package as text serialization provider 12 | /// 13 | public class SystemTextJsonProvider : TextSerializationBaseProvider 14 | { 15 | private readonly JsonSerializerOptions _options; 16 | /// 17 | /// 18 | /// 19 | /// 20 | public SystemTextJsonProvider(JsonSerializerOptions options) 21 | { 22 | _options = options; 23 | } 24 | 25 | /// 26 | /// 27 | /// 28 | public SystemTextJsonProvider() 29 | { 30 | } 31 | 32 | /// 33 | /// Deserialize from string /// 34 | /// 35 | /// 36 | /// 37 | /// 38 | public override T Deserialize(string value) 39 | { 40 | return JsonSerializer.Deserialize(value, _options); 41 | } 42 | /// 43 | /// Serialize to string 44 | /// 45 | /// 46 | /// 47 | /// 48 | public override string Serialize(T value) 49 | { 50 | return JsonSerializer.Serialize(value, _options); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.System.Text.Json/SystemTextJsonExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using EasyMicroservices.Serialization.Options; 3 | using EasyMicroservices.Serialization.System.Text.Json.Providers; 4 | 5 | namespace Microsoft.Extensions.DependencyInjection 6 | { 7 | /// 8 | /// 9 | /// 10 | public static class SystemTextJsonExtensions 11 | { 12 | /// 13 | /// 14 | /// 15 | /// 16 | /// 17 | public static SerializationOption UseSystemTextJson(this SerializationOption options) 18 | { 19 | options.ThrowIfNull(nameof(options)); 20 | SerializationOptionBuilder.UseTextSerialization(() => new SystemTextJsonProvider()); 21 | return options; 22 | } 23 | 24 | /// 25 | /// 26 | /// 27 | /// 28 | /// 29 | public static SerializationOption UseSystemTextJsonBinary(this SerializationOption options) 30 | { 31 | options.ThrowIfNull(nameof(options)); 32 | SerializationOptionBuilder.UseBinarySerialization(() => new SystemTextJsonBinaryProvider()); 33 | return options; 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.System.Text.Xml/EasyMicroservices.Serialization.System.Text.Xml.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | $(SolutionFileName.Split('-')[1].Replace('.sln','')) 7 | 8 | 9 | 10 | 11 | netstandard2.0;netstandard2.1;netcoreapp3.1;net6.0;net48;net452;net7.0;net8.0 12 | 13 | 14 | 15 | 16 | 17 | AnyCPU;x64;x86 18 | EasyMicroservices 19 | true 20 | 0.0.0.9 21 | Serialize and deserialize wrapper 22 | EasyMicroservice@gmail.com 23 | Serialize,deserialize 24 | https://github.com/EasyMicroservices/Serialization 25 | latest 26 | true 27 | .\bin\$(Configuration)\$(TargetFramework)\EasyMicroservices.Serialization.System.Text.Xml.xml 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.System.Text.Xml/Providers/SystemTextXmlProvider.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Xml; 3 | using System.Xml.Serialization; 4 | using EasyMicroservices.Serialization.Providers; 5 | 6 | namespace EasyMicroservices.Serialization.System.Text.Xml.Providers 7 | { 8 | /// 9 | /// use mocrosoft SystemTextJson package as text serialization provider 10 | /// 11 | public class SystemTextXmlProvider : TextSerializationBaseProvider 12 | { 13 | /// 14 | /// Deserialize from string /// 15 | /// 16 | /// 17 | /// 18 | public override T Deserialize(string value) 19 | { 20 | var xmlSerializer = new XmlSerializer(typeof(T)); 21 | return (T)xmlSerializer.Deserialize(new StringReader(value)); 22 | } 23 | /// 24 | /// Serialize to string 25 | /// 26 | /// 27 | /// 28 | public override string Serialize(T value) 29 | { 30 | XmlSerializer xsSubmit = new XmlSerializer(value.GetType()); 31 | using (var sww = new StringWriter()) 32 | { 33 | using (XmlTextWriter writer = new XmlTextWriter(sww)) 34 | { 35 | xsSubmit.Serialize(writer, value); 36 | return sww.ToString(); 37 | } 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.System.Text.Xml/SystemTextXmlExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using EasyMicroservices.Serialization.Options; 3 | using EasyMicroservices.Serialization.System.Text.Xml.Providers; 4 | 5 | namespace Microsoft.Extensions.DependencyInjection 6 | { 7 | /// 8 | /// 9 | /// 10 | public static class SystemTextXmlExtensions 11 | { 12 | /// 13 | /// 14 | /// 15 | /// 16 | /// 17 | public static SerializationOption UseSystemTextXml(this SerializationOption options) 18 | { 19 | options.ThrowIfNull(nameof(options)); 20 | SerializationOptionBuilder.UseTextSerialization(() => new SystemTextXmlProvider()); 21 | return options; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.Tests/EasyMicroservices.Serialization.Tests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | $(SolutionFileName.Split('-')[1].Replace('.sln','')) 7 | 8 | 9 | 10 | 11 | net6.0;net48;net452;net8.0;net7.0 12 | 13 | 14 | 15 | 16 | 17 | false 18 | latest 19 | |net452| 20 | False 21 | 22 | 23 | 24 | 25 | 26 | 27 | runtime; build; native; contentfiles; analyzers; buildtransitive 28 | all 29 | 30 | 31 | 32 | 33 | 34 | 35 | runtime; build; native; contentfiles; analyzers; buildtransitive 36 | all 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.Tests/Providers/BinarySerialization/BaseBinarySerializationTest.cs: -------------------------------------------------------------------------------- 1 | using System.Buffers; 2 | using System.Linq; 3 | using EasyMicroservices.Serialization.Interfaces; 4 | using EasyMicroservices.Serialization.Tests.Providers.Models; 5 | using Xunit; 6 | 7 | namespace EasyMicroservices.Serialization.Tests.Providers.BinarySerialization 8 | { 9 | public abstract class BaseBinarySerializationTest 10 | { 11 | /// 12 | /// binary serilaze provider 13 | /// 14 | public IBinarySerializationProvider _provider { get; } 15 | /// 16 | /// 17 | /// 18 | /// 19 | public BaseBinarySerializationTest(IBinarySerializationProvider provider) 20 | { 21 | _provider = provider; 22 | } 23 | 24 | /// 25 | /// 26 | /// 27 | /// 28 | /// 29 | /// 30 | /// 31 | public virtual void Serialize(string name, int age, Gender gender) 32 | { 33 | //Arrange 34 | var request = new ClassToSerialize() 35 | { 36 | Name = name, 37 | Age = age, 38 | Gender = gender 39 | }; 40 | 41 | //Act 42 | var result = _provider.Serialize(request); 43 | 44 | //Assert 45 | Assert.NotEqual(0, result.Length); 46 | 47 | var deserializedBytes = _provider.Deserialize(result); 48 | 49 | Assert.Equal(request.Age, deserializedBytes.Age); 50 | Assert.Equal(request.Name, deserializedBytes.Name); 51 | Assert.Equal(request.Gender, deserializedBytes.Gender); 52 | 53 | } 54 | 55 | /// 56 | /// 57 | /// 58 | /// 59 | public virtual void DeserializeSimpleByteArray(int arrayLength) 60 | { 61 | //Arange 62 | var sourceBytes = Enumerable.Range(0, arrayLength).Select(i => unchecked((byte)i)).ToArray(); // long byte array 63 | var request = _provider.Serialize(sourceBytes); 64 | 65 | //Act 66 | var deserializedBytes = _provider.Deserialize(request); 67 | 68 | //Assert 69 | Assert.NotNull(deserializedBytes); 70 | Assert.Equal(sourceBytes.Length, deserializedBytes.Length); 71 | Assert.Equal(sourceBytes, deserializedBytes); 72 | } 73 | 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.Tests/Providers/BinarySerialization/BinaryGoSerializationTest.cs: -------------------------------------------------------------------------------- 1 | using EasyMicroservices.Serialization.BinaryGo.Providers; 2 | using EasyMicroservices.Serialization.Tests.Providers.Models; 3 | using Xunit; 4 | 5 | namespace EasyMicroservices.Serialization.Tests.Providers.BinarySerialization 6 | { 7 | public class BinaryGoSerializationTest : BaseBinarySerializationTest 8 | { 9 | public BinaryGoSerializationTest() : base(new BinaryGoProvider()) 10 | { 11 | } 12 | [Theory] 13 | [InlineData("Mahdi", 30, Gender.Male)] 14 | [InlineData("Maryam", 15, Gender.Female)] 15 | [InlineData("ali", 15, Gender.None)] 16 | public override void Serialize(string name, int age, Gender gender) 17 | { 18 | base.Serialize(name, age, gender); 19 | } 20 | [Theory] 21 | [InlineData(10)] // fixstr 22 | [InlineData(1000)] // str 16 23 | [InlineData(100000)] // str 32 24 | public override void DeserializeSimpleByteArray(int arrayLength) 25 | { 26 | base.DeserializeSimpleByteArray(arrayLength); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.Tests/Providers/BinarySerialization/MemoryPackSerializationTests.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | #if (NET7_0) 5 | using System; 6 | using EasyMicroservices.Serialization.MemoryPack.Providers; 7 | using EasyMicroservices.Serialization.Tests.Providers.Models; 8 | using MemoryPack; 9 | using MemoryPack.Formatters; 10 | using Xunit; 11 | 12 | namespace EasyMicroservices.Serialization.Tests.Providers.BinarySerialization 13 | { 14 | public class MemoryPackSerializationTests : BaseBinarySerializationTest 15 | { 16 | public MemoryPackSerializationTests() : base(new MemoryPackProvider()) 17 | { 18 | 19 | } 20 | 21 | [Theory] 22 | [InlineData("Mahdi", 30, Gender.Male)] 23 | [InlineData("Maryam", 15, Gender.Female)] 24 | [InlineData("ali", 15, Gender.None)] 25 | public void Serialize_RightClass_ShouldBeSuccess(string name, int age, Gender gender) 26 | { 27 | base.Serialize(name, age, gender); 28 | } 29 | 30 | [Theory] 31 | [InlineData(10)] // fixstr 32 | [InlineData(1000)] // str 16 33 | [InlineData(100000)] // str 32 34 | public void Deserialize_SimpleByteArray_ShoulBeSuccess(int arrayLength) 35 | { 36 | base.DeserializeSimpleByteArray(arrayLength); 37 | } 38 | 39 | [Theory] 40 | [InlineData(typeof(BadClassWithoutObjectAttribute))] 41 | public void Serilize_ClassWithoutAttributeObject_ShouldThrowException(Type badClassType) 42 | { 43 | //Arrange 44 | var obj = Activator.CreateInstance(badClassType); 45 | 46 | //Act 47 | //Assert 48 | 49 | Assert.Throws(() => _provider.Serialize(obj)); 50 | } 51 | 52 | public class BadClassWithoutObjectAttribute 53 | { 54 | 55 | } 56 | 57 | } 58 | } 59 | #endif 60 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.Tests/Providers/BinarySerialization/MessagePackSerializationTests.cs: -------------------------------------------------------------------------------- 1 | #if (!NET452) 2 | using System; 3 | using System.Diagnostics.Contracts; 4 | using EasyMicroservices.Serialization.MessagePack.Providers; 5 | using EasyMicroservices.Serialization.Tests.Providers.Models; 6 | using MessagePack; 7 | using Xunit; 8 | 9 | namespace EasyMicroservices.Serialization.Tests.Providers.BinarySerialization 10 | { 11 | public class MessagePackSerializationTests : BaseBinarySerializationTest 12 | { 13 | public MessagePackSerializationTests() : base(new MessagePackProvider()) 14 | { 15 | } 16 | 17 | [Theory] 18 | [InlineData("Mahdi", 30, Gender.Male)] 19 | [InlineData("Maryam", 15, Gender.Female)] 20 | [InlineData("ali", 15, Gender.None)] 21 | public void Serialize_RightClass_ShouldBeSuccess(string name, int age, Gender gender) 22 | { 23 | base.Serialize(name, age, gender); 24 | } 25 | 26 | [Theory] 27 | [InlineData(10)] // fixstr 28 | [InlineData(1000)] // str 16 29 | [InlineData(100000)] // str 32 30 | public void Deserialize_SimpleByteArray_ShoulBeSuccess(int arrayLength) 31 | { 32 | base.DeserializeSimpleByteArray(arrayLength); 33 | } 34 | 35 | [Theory] 36 | [InlineData(typeof(BadClassWithoutObjectAttribute))] 37 | [InlineData(typeof(BadClassWithoutAnyPropertyAttribute))] 38 | public void Serilize_ClassWithoutAttributeObject_ShouldThrowException(Type badClassType) 39 | { 40 | //Arrange 41 | var obj = Activator.CreateInstance(badClassType); 42 | 43 | //Act 44 | //Assert 45 | _provider.Serialize(obj); 46 | //with contractless feature it will not throw exception 47 | //Assert.Throws(() => _provider.Serialize(obj)); 48 | } 49 | 50 | public class BadClassWithoutObjectAttribute 51 | { 52 | } 53 | 54 | public class BadClassWithoutAnyPropertyAttribute 55 | { 56 | public int MyProperty { get; set; } 57 | } 58 | 59 | } 60 | } 61 | #endif 62 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.Tests/Providers/Models/ClassToSerialize.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | namespace EasyMicroservices.Serialization.Tests.Providers.Models 5 | { 6 | #if (NET7_0) 7 | [global::MemoryPack.MemoryPackable] 8 | #endif 9 | public partial class ClassToSerialize 10 | { 11 | public string Name { get; set; } 12 | public int Age { get; set; } 13 | public Gender Gender { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.Tests/Providers/Models/Gender.cs: -------------------------------------------------------------------------------- 1 | namespace EasyMicroservices.Serialization.Tests.Providers.Models 2 | { 3 | public enum Gender : byte 4 | { 5 | None = 0, 6 | Male = 1, 7 | Female = 2 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.Tests/Providers/TextSerialization/BaseTextSerializationTest.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | using System.Threading.Tasks; 5 | using EasyMicroservices.Serialization.Interfaces; 6 | using EasyMicroservices.Serialization.Tests.Providers.Models; 7 | using Xunit; 8 | 9 | namespace EasyMicroservices.Serialization.Tests.Providers.TextSerialization 10 | { 11 | /// 12 | /// base class for test 13 | /// 14 | public abstract class BaseTextSerializationTest 15 | { 16 | /// 17 | /// text serilaze provider 18 | /// 19 | public ITextSerializationProvider _provider { get; } 20 | /// 21 | /// 22 | /// 23 | /// 24 | public BaseTextSerializationTest(ITextSerializationProvider provider) 25 | { 26 | _provider = provider; 27 | } 28 | /// 29 | /// 30 | /// 31 | /// 32 | /// 33 | /// 34 | /// 35 | /// 36 | public virtual Task Serialize(string name, int age, Gender gender, string expected) 37 | { 38 | var request = new ClassToSerialize() 39 | { 40 | Name = name, 41 | Age = age, 42 | Gender = gender 43 | }; 44 | var result = _provider.Serialize(request); 45 | 46 | Assert.Equal(expected, result); 47 | return TaskHelper.GetCompletedTask(); 48 | } 49 | 50 | /// 51 | /// 52 | /// 53 | /// 54 | /// 55 | /// 56 | /// 57 | /// 58 | public virtual Task Deserialize(string json, string name, int age, Gender gender) 59 | { 60 | var result = _provider.Deserialize(json); 61 | 62 | Assert.True(result.Name == name && result.Age == age && result.Gender == gender); 63 | return TaskHelper.GetCompletedTask(); 64 | } 65 | 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.Tests/Providers/TextSerialization/NewtonsoftJsonSerializationTest.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using EasyMicroservices.Serialization.Newtonsoft.Json.Providers; 3 | using EasyMicroservices.Serialization.Tests.Providers.Models; 4 | using Xunit; 5 | 6 | namespace EasyMicroservices.Serialization.Tests.Providers.TextSerialization 7 | { 8 | public class NewtonsoftJsonSerializationTest : BaseTextSerializationTest 9 | { 10 | public NewtonsoftJsonSerializationTest() : base(new NewtonsoftJsonProvider()) 11 | { 12 | } 13 | 14 | [Theory] 15 | [InlineData("Mahdi", 30, Gender.Male, "{\"Name\":\"Mahdi\",\"Age\":30,\"Gender\":1}")] 16 | [InlineData("Maryam", 15, Gender.Female, "{\"Name\":\"Maryam\",\"Age\":15,\"Gender\":2}")] 17 | [InlineData("ali", 15, Gender.None, "{\"Name\":\"ali\",\"Age\":15,\"Gender\":0}")] 18 | public override Task Serialize(string name, int age, Gender gender, string expected) 19 | { 20 | return base.Serialize(name, age, gender, expected); 21 | } 22 | [InlineData("{\"Name\":\"Mahdi\",\"Age\":30,\"Gender\":1}", "Mahdi", 30, Gender.Male)] 23 | [InlineData("{\"Name\":\"Maryam\",\"Age\":15,\"Gender\":2}", "Maryam", 15, Gender.Female)] 24 | [InlineData("{\"Name\":\"ali\",\"Age\":15,\"Gender\":0}", "ali", 15, Gender.None)] 25 | [Theory] 26 | public override Task Deserialize(string json, string name, int age, Gender gender) 27 | { 28 | return base.Deserialize(json, name, age, gender); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.Tests/Providers/TextSerialization/SystemTextJsonSerializationTest.cs: -------------------------------------------------------------------------------- 1 | #if (!NET452) 2 | 3 | using System.Threading.Tasks; 4 | using EasyMicroservices.Serialization.System.Text.Json.Providers; 5 | using EasyMicroservices.Serialization.Tests.Providers.Models; 6 | using Xunit; 7 | 8 | namespace EasyMicroservices.Serialization.Tests.Providers.TextSerialization 9 | { 10 | public class SystemTextJsonSerializationTest : BaseTextSerializationTest 11 | { 12 | public SystemTextJsonSerializationTest() : base(new SystemTextJsonProvider()) 13 | { 14 | } 15 | [Theory] 16 | [InlineData("Mahdi", 30, Gender.Male, "{\"Name\":\"Mahdi\",\"Age\":30,\"Gender\":1}")] 17 | [InlineData("Maryam", 15, Gender.Female, "{\"Name\":\"Maryam\",\"Age\":15,\"Gender\":2}")] 18 | [InlineData("ali", 15, Gender.None, "{\"Name\":\"ali\",\"Age\":15,\"Gender\":0}")] 19 | public override Task Serialize(string name, int age, Gender gender, string expected) 20 | { 21 | return base.Serialize(name, age, gender, expected); 22 | } 23 | [InlineData("{\"Name\":\"Mahdi\",\"Age\":30,\"Gender\":1}", "Mahdi", 30, Gender.Male)] 24 | [InlineData("{\"Name\":\"Maryam\",\"Age\":15,\"Gender\":2}", "Maryam", 15, Gender.Female)] 25 | [InlineData("{\"Name\":\"ali\",\"Age\":15,\"Gender\":0}", "ali", 15, Gender.None)] 26 | [Theory] 27 | public override Task Deserialize(string json, string name, int age, Gender gender) 28 | { 29 | return base.Deserialize(json, name, age, gender); 30 | } 31 | } 32 | } 33 | #endif 34 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.Tests/Providers/TextSerialization/SystemTextXmlSerializationTest.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using EasyMicroservices.Serialization.System.Text.Xml.Providers; 9 | using EasyMicroservices.Serialization.Tests.Providers.Models; 10 | using Xunit; 11 | 12 | namespace EasyMicroservices.Serialization.Tests.Providers.TextSerialization 13 | { 14 | public class SystemTextXmlSerializationTest : BaseTextSerializationTest 15 | { 16 | public SystemTextXmlSerializationTest() : base(new SystemTextXmlProvider()) 17 | { 18 | } 19 | 20 | #if(NETCOREAPP2_1_OR_GREATER) 21 | [InlineData("Mahdi", 30, Gender.Male, "Mahdi30Male")] 22 | [InlineData("Maryam", 15, Gender.Female, "Maryam15Female")] 23 | [InlineData("ali", 15, Gender.None, "ali15None")] 24 | #else 25 | [InlineData("Mahdi", 30, Gender.Male, "Mahdi30Male")] 26 | [InlineData("Maryam", 15, Gender.Female, "Maryam15Female")] 27 | [InlineData("ali", 15, Gender.None, "ali15None")] 28 | #endif 29 | [Theory] 30 | public override Task Serialize(string name, int age, Gender gender, string expected) 31 | { 32 | return base.Serialize(name, age, gender, expected); 33 | } 34 | 35 | [InlineData("Mahdi30Male", "Mahdi", 30, Gender.Male)] 36 | [InlineData("Maryam15Female", "Maryam", 15, Gender.Female)] 37 | [InlineData("ali15None", "ali", 15, Gender.None)] 38 | [Theory] 39 | public override Task Deserialize(string xml, string name, int age, Gender gender) 40 | { 41 | return base.Deserialize(xml, name, age, gender); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.Tests/Providers/TextSerialization/YamlDotNetSerializationTest.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | using System; 5 | using System.Collections; 6 | using System.Collections.Generic; 7 | using System.Threading.Tasks; 8 | using EasyMicroservices.Serialization.Tests.Providers.Models; 9 | using EasyMicroservices.Serialization.YamlDotNet.Providers; 10 | using Xunit; 11 | 12 | namespace EasyMicroservices.Serialization.Tests.Providers.TextSerialization 13 | { 14 | public class YamlDotNetSerializationTest : BaseTextSerializationTest 15 | { 16 | public YamlDotNetSerializationTest() : base(new YamlDotNetProvider()) 17 | { 18 | } 19 | /// 20 | /// yml output format is different from json format 21 | /// 22 | /// 23 | /// 24 | /// 25 | /// 26 | /// 27 | [Theory] 28 | [ClassData(typeof(YamlDotNetSerializeDataTest))] 29 | public override Task Serialize(string name, int age, Gender gender, string expected) 30 | { 31 | return base.Serialize(name, age, gender, expected); 32 | } 33 | /// 34 | /// yml support json format for deserialization 35 | /// 36 | /// 37 | /// 38 | /// 39 | /// 40 | /// 41 | [Theory] 42 | [ClassData(typeof(YamlDotNetDeserializeDataTest))] 43 | public override Task Deserialize(string json, string name, int age, Gender gender) 44 | { 45 | return base.Deserialize(json, name, age, gender); 46 | } 47 | } 48 | /// 49 | /// data for test Serialize in yml 50 | /// 51 | public class YamlDotNetSerializeDataTest : IEnumerable 52 | { 53 | 54 | public IEnumerator GetEnumerator() 55 | { 56 | yield return new object[] { "Mahdi", 30, Gender.Male, $"Name: Mahdi{Environment.NewLine}Age: 30{Environment.NewLine}Gender: Male{Environment.NewLine}" }; 57 | yield return new object[] { "Maryam", 15, Gender.Female, $"Name: Maryam{Environment.NewLine}Age: 15{Environment.NewLine}Gender: Female{Environment.NewLine}" }; 58 | yield return new object[] { "ali", 15, Gender.None, $"Name: ali{Environment.NewLine}Age: 15{Environment.NewLine}Gender: None{Environment.NewLine}" }; 59 | } 60 | 61 | IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); 62 | } 63 | /// 64 | /// data for test Deserialize in yml 65 | /// 66 | public class YamlDotNetDeserializeDataTest : IEnumerable 67 | { 68 | 69 | public IEnumerator GetEnumerator() 70 | { 71 | /// yml format 72 | yield return new object[] { $"Name: Mahdi{Environment.NewLine}Age: 30{Environment.NewLine}Gender: Male{Environment.NewLine}", "Mahdi", 30, Gender.Male }; 73 | yield return new object[] { $"Name: Maryam{Environment.NewLine}Age: 15{Environment.NewLine}Gender: Female{Environment.NewLine}", "Maryam", 15, Gender.Female }; 74 | yield return new object[] { $"Name: ali{Environment.NewLine}Age: 15{Environment.NewLine}Gender: None{Environment.NewLine}", "ali", 15, Gender.None }; 75 | /// json format 76 | yield return new object[] { "{\"Name\":\"Mahdi\",\"Age\":30,\"Gender\":1}", "Mahdi", 30, Gender.Male }; 77 | yield return new object[] { "{\"Name\":\"Maryam\",\"Age\":15,\"Gender\":2}", "Maryam", 15, Gender.Female }; 78 | yield return new object[] { "{\"Name\":\"ali\",\"Age\":15,\"Gender\":0}", "ali", 15, Gender.None }; 79 | } 80 | 81 | IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.YamlDotNet/EasyMicroservices.Serialization.YamlDotNet.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | $(SolutionFileName.Split('-')[1].Replace('.sln','')) 7 | 8 | 9 | 10 | 11 | netstandard2.0;netstandard2.1;netcoreapp3.1;net6.0;net48;net452;net7.0;net8.0 12 | 13 | 14 | 15 | 16 | 17 | AnyCPU;x64;x86 18 | EasyMicroservices 19 | true 20 | 0.0.0.9 21 | Serialize and deserialize wrapper 22 | EasyMicroservices@gmail.com 23 | Serialize,deserialize 24 | https://github.com/EasyMicroservices/Serialization 25 | latest 26 | true 27 | .\bin\$(Configuration)\$(TargetFramework)\EasyMicroservice.Serialization.YamlDotNet.xml 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.YamlDotNet/Providers/DotNetYamlProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using EasyMicroservices.Serialization.Providers; 3 | using YamlDotNet.Serialization; 4 | using YamlDotNet.Serialization.NamingConventions; 5 | 6 | namespace EasyMicroservices.Serialization.YamlDotNet.Providers 7 | { 8 | /// 9 | /// use YamlDotNet as text serialization provider 10 | /// 11 | public class YamlDotNetProvider : TextSerializationBaseProvider 12 | { 13 | /// 14 | /// Deserialize from string 15 | /// 16 | /// 17 | /// 18 | /// 19 | /// 20 | public override T Deserialize(string value) 21 | { 22 | var deserializer = new DeserializerBuilder() 23 | //.WithNamingConvention(PascalCaseNamingConvention.Instance) 24 | .Build(); 25 | 26 | return deserializer.Deserialize(value); 27 | } 28 | /// 29 | /// Serialize to string 30 | /// 31 | /// 32 | /// 33 | /// 34 | public override string Serialize(T value) 35 | { 36 | var serializer = new SerializerBuilder() 37 | //.WithNamingConvention(CamelCaseNamingConvention.Instance) 38 | .Build(); 39 | 40 | return serializer.Serialize(value); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization.YamlDotNet/YamlDotNetExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using EasyMicroservices.Serialization.Options; 3 | using EasyMicroservices.Serialization.YamlDotNet.Providers; 4 | 5 | namespace Microsoft.Extensions.DependencyInjection 6 | { 7 | /// 8 | /// 9 | /// 10 | public static class YamlDotNetExtensions 11 | { 12 | /// 13 | /// 14 | /// 15 | /// 16 | /// 17 | public static SerializationOption UseYamlDotNet(this SerializationOption options) 18 | { 19 | options.ThrowIfNull(nameof(options)); 20 | SerializationOptionBuilder.UseTextSerialization(() => new YamlDotNetProvider()); 21 | return options; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization/EasyMicroservices.Serialization.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | $(SolutionFileName.Split('-')[1].Replace('.sln','')) 7 | 8 | 9 | 10 | 11 | netstandard2.0;netstandard2.1;net6.0;net45;net7.0;net8.0 12 | 13 | 14 | 15 | 16 | 17 | AnyCPU;x64;x86 18 | EasyMicroservices 19 | true 20 | 0.0.0.9 21 | Serialize and deserialize wrapper 22 | EasyMicroservices@gmail.com 23 | Serialize,deserialize 24 | https://github.com/EasyMicroservices/Serialization 25 | latest 26 | true 27 | .\bin\$(Configuration)\$(TargetFramework)\EasyMicroservice.Serialization.xml 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization/Interfaces/IBaseSerializationProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyMicroservices.Serialization.Interfaces 4 | { 5 | /// 6 | /// general serialization method defines here 7 | /// 8 | public interface IBaseSerializationProvider 9 | { 10 | /// 11 | /// can convert check which type is supported for serialization 12 | /// 13 | /// 14 | /// 15 | bool CanConvert(Type objectType); 16 | /// 17 | /// 18 | /// 19 | /// 20 | /// 21 | ReadOnlySpan SerializeToBytes(T value); 22 | /// 23 | /// 24 | /// 25 | /// 26 | /// 27 | /// 28 | T DeserializeFromBytes(ReadOnlySpan bytes); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization/Interfaces/IBinarySerializationProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | namespace EasyMicroservices.Serialization.Interfaces 3 | { 4 | /// 5 | /// serializa to byte and visa versa 6 | /// 7 | public interface IBinarySerializationProvider : IBaseSerializationProvider 8 | { 9 | /// 10 | /// serializa to byte array 11 | /// 12 | /// 13 | /// 14 | ReadOnlySpan Serialize(T value); 15 | /// 16 | /// Deserialize from byte 17 | /// 18 | /// 19 | /// 20 | /// 21 | T Deserialize(ReadOnlySpan reader); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization/Interfaces/ITextSerializationProvider.cs: -------------------------------------------------------------------------------- 1 | namespace EasyMicroservices.Serialization.Interfaces 2 | { 3 | /// 4 | /// serialize to string and visa versa 5 | /// 6 | public interface ITextSerializationProvider : IBaseSerializationProvider 7 | { 8 | /// 9 | /// Serialize to string 10 | /// 11 | /// 12 | /// 13 | string Serialize(T value); 14 | /// 15 | /// Deserialize from string 16 | /// 17 | /// 18 | /// 19 | /// 20 | T Deserialize(string value); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization/Options/SerializationOption.cs: -------------------------------------------------------------------------------- 1 | namespace EasyMicroservices.Serialization.Options 2 | { 3 | /// 4 | /// 5 | /// 6 | public class SerializationOption 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization/Options/SerializationOptionBuilder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using EasyMicroservices.Serialization.Interfaces; 3 | 4 | namespace EasyMicroservices.Serialization.Options 5 | { 6 | /// 7 | /// 8 | /// 9 | public static class SerializationOptionBuilder 10 | { 11 | private static Func _binarySerializationFunc; 12 | private static Func _textSerializationFunc; 13 | 14 | /// 15 | /// 16 | /// 17 | /// 18 | public static void UseTextSerialization(Func func) 19 | { 20 | if (_textSerializationFunc != null) 21 | throw new Exception("You set UseTextSerialization once."); 22 | _textSerializationFunc = func; 23 | } 24 | 25 | /// 26 | /// 27 | /// 28 | /// 29 | public static void UseBinarySerialization(Func func) 30 | { 31 | if (_binarySerializationFunc != null) 32 | throw new Exception("You set UseBinarySerialization once."); 33 | _binarySerializationFunc = func; 34 | } 35 | 36 | 37 | /// 38 | /// 39 | /// 40 | /// 41 | /// 42 | public static ITextSerializationProvider GetTextSerialization() 43 | { 44 | if (_textSerializationFunc == null) 45 | throw new Exception("You did not set UseTextSerialization."); 46 | return _textSerializationFunc(); 47 | } 48 | 49 | /// 50 | /// 51 | /// 52 | /// 53 | /// 54 | public static IBinarySerializationProvider GetBinarySerialization() 55 | { 56 | if (_binarySerializationFunc == null) 57 | throw new Exception("You did not set UseBinarySerialization."); 58 | return _binarySerializationFunc(); 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization/Providers/BaseProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using EasyMicroservices.Serialization.Interfaces; 4 | 5 | namespace EasyMicroservices.Serialization.Providers 6 | { 7 | /// 8 | /// general serialization method defines here 9 | /// 10 | public abstract class BaseProvider : IBaseSerializationProvider 11 | { 12 | /// 13 | /// can convert check which type is supported for serialization 14 | /// 15 | /// 16 | /// 17 | public virtual bool CanConvert(Type objectType) 18 | { 19 | return true; 20 | } 21 | 22 | static Dictionary ReplacedWithARuntimeType { get; set; } = new Dictionary(); 23 | 24 | /// 25 | /// get replaced Type 26 | /// 27 | /// 28 | /// 29 | protected Type GetReplacedType(Type type) 30 | { 31 | if (ReplacedWithARuntimeType.TryGetValue(type, out Type replacedType)) 32 | return replacedType ?? type; 33 | if (CanReplaceType(type)) 34 | { 35 | replacedType = ReplaceType(type); 36 | ReplacedWithARuntimeType.Add(type, replacedType); 37 | return replacedType; 38 | } 39 | ReplacedWithARuntimeType.Add(type, null); 40 | return type; 41 | } 42 | 43 | /// 44 | /// Check if type needs replace 45 | /// 46 | /// 47 | protected virtual bool CanReplaceType(Type type) 48 | { 49 | return false; 50 | } 51 | 52 | /// 53 | /// replace a type to a proxy type 54 | /// 55 | /// 56 | /// 57 | protected virtual Type ReplaceType(Type type) 58 | { 59 | return type; 60 | } 61 | 62 | /// 63 | /// 64 | /// 65 | /// 66 | /// 67 | /// 68 | public abstract ReadOnlySpan SerializeToBytes(T value); 69 | 70 | /// 71 | /// 72 | /// 73 | /// 74 | /// 75 | /// 76 | public abstract T DeserializeFromBytes(ReadOnlySpan bytes); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization/Providers/BinarySerializationBaseProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using EasyMicroservices.Serialization.Interfaces; 3 | 4 | namespace EasyMicroservices.Serialization.Providers 5 | { 6 | /// 7 | /// base binary implimentaion 8 | /// 9 | public abstract class BinarySerializationBaseProvider : BaseProvider, IBinarySerializationProvider 10 | { 11 | /// 12 | /// Deserialize from byte 13 | /// 14 | /// 15 | /// 16 | /// 17 | public abstract T Deserialize(ReadOnlySpan reader); 18 | /// 19 | /// Serialize to byte 20 | /// 21 | /// 22 | /// 23 | public abstract ReadOnlySpan Serialize(T value); 24 | 25 | /// 26 | /// 27 | /// 28 | /// 29 | /// 30 | /// 31 | public override ReadOnlySpan SerializeToBytes(T value) 32 | { 33 | return Serialize(value); 34 | } 35 | 36 | /// 37 | /// 38 | /// 39 | /// 40 | /// 41 | /// 42 | public override T DeserializeFromBytes(ReadOnlySpan bytes) 43 | { 44 | return Deserialize(bytes); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/CSharp/EasyMicroservices.Serialization/Providers/TextSerializationBaseProvider.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | 4 | using System; 5 | using System.Text; 6 | using EasyMicroservices.Serialization.Interfaces; 7 | 8 | namespace EasyMicroservices.Serialization.Providers 9 | { 10 | /// 11 | /// base string implimentaion 12 | /// 13 | public abstract class TextSerializationBaseProvider : BaseProvider, ITextSerializationProvider 14 | { 15 | 16 | /// 17 | /// Deserialize from string 18 | /// 19 | /// 20 | /// 21 | /// 22 | /// 23 | public abstract T Deserialize(string value); 24 | /// 25 | /// Serialize to string 26 | /// 27 | /// 28 | /// 29 | /// 30 | public abstract string Serialize(T value); 31 | /// 32 | /// 33 | /// 34 | /// 35 | /// 36 | /// 37 | public override ReadOnlySpan SerializeToBytes(T value) 38 | { 39 | return Encoding.UTF8.GetBytes(Serialize(value)); 40 | } 41 | 42 | /// 43 | /// 44 | /// 45 | /// 46 | /// 47 | /// 48 | public override T DeserializeFromBytes(ReadOnlySpan bytes) 49 | { 50 | return Deserialize(Encoding.UTF8.GetString(bytes.ToArray())); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/CSharp/coverage-badge-branch.svg: -------------------------------------------------------------------------------- 1 | coverage: branchcoverage: branch0%0% -------------------------------------------------------------------------------- /src/CSharp/coverage-badge-line.svg: -------------------------------------------------------------------------------- 1 | coverage: linecoverage: line35.11%35.11% -------------------------------------------------------------------------------- /src/Golang/encodingjson/lib.go: -------------------------------------------------------------------------------- 1 | package encodingjson 2 | 3 | import "encoding/json" 4 | 5 | // JsonSerializer is a string serializer which uses encoding/json package. 6 | type JsonSerializer struct { 7 | } 8 | 9 | // Serialize is implementation of serialize method from StringSerializer interface. 10 | func (j JsonSerializer) Serialize(value any) (string, error) { 11 | res, err := json.Marshal(value) 12 | 13 | if err != nil { 14 | return "", err 15 | } 16 | return string(res), nil 17 | } 18 | 19 | // Deserialize is implementation of deserialize method from StringSerializer interface. 20 | func (j JsonSerializer) Deserialize(s string, v any) error { 21 | return json.Unmarshal([]byte(s), v) 22 | } 23 | -------------------------------------------------------------------------------- /src/Golang/encodingjson/lib_test.go: -------------------------------------------------------------------------------- 1 | package encodingjson_test 2 | 3 | import ( 4 | serialization "github.com/EasyMicroservices/Serialization" 5 | "github.com/EasyMicroservices/Serialization/encodingjson" 6 | "github.com/stretchr/testify/assert" 7 | "testing" 8 | ) 9 | 10 | type TestStruct struct { 11 | Int int `json:"int"` 12 | Float float32 `json:"float"` 13 | Str string `json:"str"` 14 | Boolean bool `json:"boolean"` 15 | Array []int `json:"array"` 16 | } 17 | 18 | func TestStrSerializeWithEncodingJson(t *testing.T) { 19 | ts := TestStruct{ 20 | Int: 1, 21 | Float: 3.2, 22 | Str: "test str", 23 | Boolean: false, 24 | Array: []int{1, 2, 3}, 25 | } 26 | expectedJson := "{\"int\":1,\"float\":3.2,\"str\":\"test str\",\"boolean\":false,\"array\":[1,2,3]}" 27 | 28 | serialized, err := serialization.StrSerialize[TestStruct](ts, new(encodingjson.JsonSerializer)) 29 | assert.Nil(t, err) 30 | assert.Equal(t, expectedJson, serialized) 31 | } 32 | 33 | func TestStrDeserializeWithEncodingJson(t *testing.T) { 34 | jsonStr := "{\"int\":1,\"float\":3.2,\"str\":\"test str\",\"boolean\":false,\"array\":[1,2,3]}" 35 | expectedValue := TestStruct{ 36 | Int: 1, 37 | Float: 3.2, 38 | Str: "test str", 39 | Boolean: false, 40 | Array: []int{1, 2, 3}, 41 | } 42 | 43 | deserialized, err := serialization.StrDeserialize[TestStruct](jsonStr, new(encodingjson.JsonSerializer)) 44 | assert.Nil(t, err) 45 | assert.Equal(t, expectedValue, deserialized) 46 | } 47 | -------------------------------------------------------------------------------- /src/Golang/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/EasyMicroservices/Serialization 2 | 3 | go 1.19 4 | 5 | require github.com/stretchr/testify v1.8.1 6 | 7 | require ( 8 | github.com/davecgh/go-spew v1.1.1 // indirect 9 | github.com/pmezard/go-difflib v1.0.0 // indirect 10 | gopkg.in/yaml.v3 v3.0.1 // indirect 11 | ) 12 | -------------------------------------------------------------------------------- /src/Golang/go.sum: -------------------------------------------------------------------------------- 1 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 2 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 3 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 4 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 5 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 6 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 7 | github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= 8 | github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= 9 | github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 10 | github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= 11 | github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= 12 | github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= 13 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= 14 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 15 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 16 | gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= 17 | gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 18 | -------------------------------------------------------------------------------- /src/Golang/lib.go: -------------------------------------------------------------------------------- 1 | package serialization 2 | 3 | // Serializer is base interface for all serializers. 4 | type Serializer interface { 5 | } 6 | 7 | // StringSerializer is an interface that all string serializers should implement it. 8 | type StringSerializer interface { 9 | Serializer 10 | Serialize(value any) (string, error) 11 | Deserialize(s string, v any) error 12 | } 13 | 14 | // StrSerialize serializes value to string using given serializer. 15 | func StrSerialize[T any](value T, serializer StringSerializer) (string, error) { 16 | return serializer.Serialize(value) 17 | } 18 | 19 | // StrDeserialize deserializes string to given type using serializer. 20 | func StrDeserialize[T any](s string, serializer StringSerializer) (T, error) { 21 | v := new(T) 22 | err := serializer.Deserialize(s, v) 23 | return *v, err 24 | } 25 | --------------------------------------------------------------------------------