Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/aspnet/MessagePack-CSharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Bunting <6431421+dougbu@users.noreply.github.com>2022-08-22 22:00:36 +0300
committerGitHub <noreply@github.com>2022-08-22 22:00:36 +0300
commitfe9fa0834d18492eb229ff2923024af2c87553f8 (patch)
treeaa041fcc52477e05bebc0df58154151d0673c916
parent6caf2996c82d2b91528fad41e9c78e09770e73d4 (diff)
parent3d1b75b8a33c65eadf6a6d72a4c26cc2d91a87ec (diff)
Merge pull request #2 from gllebede/masterHEADmaster
MessagePack update
-rw-r--r--Directory.Build.props10
-rw-r--r--Directory.Build.rsp16
-rw-r--r--MessagePack.sln122
-rw-r--r--README.md156
-rw-r--r--azure-pipelines.yml14
-rw-r--r--azure-pipelines/Get-TempToolsPath.ps16
-rw-r--r--azure-pipelines/Get-nbgv.ps16
-rw-r--r--azure-pipelines/build.yml10
-rw-r--r--azure-pipelines/build_nonWindows.yml16
-rw-r--r--azure-pipelines/install-dependencies.yml6
-rw-r--r--azure-pipelines/release.yml5
-rw-r--r--azure-pipelines/variables/_pipelines.ps19
-rw-r--r--benchmark/ExperimentalBenchmark/ExperimentalBenchmark.csproj1
-rw-r--r--benchmark/SerializerBenchmark/BenchmarkConfig.cs92
-rw-r--r--benchmark/SerializerBenchmark/OdinSerializer.dllbin0 -> 268288 bytes
-rw-r--r--benchmark/SerializerBenchmark/Program.cs6
-rw-r--r--benchmark/SerializerBenchmark/SerializerBenchmark.cs62
-rw-r--r--benchmark/SerializerBenchmark/SerializerBenchmark.csproj7
-rw-r--r--benchmark/SerializerBenchmark/Serializers/BinaryFormatter.cs29
-rw-r--r--benchmark/SerializerBenchmark/Serializers/BinaryFormatterSerializer.cs34
-rw-r--r--benchmark/SerializerBenchmark/Serializers/BsonNetSerializer.cs51
-rw-r--r--benchmark/SerializerBenchmark/Serializers/CerasSerializer.cs30
-rw-r--r--benchmark/SerializerBenchmark/Serializers/DataContractSerializer.cs34
-rw-r--r--benchmark/SerializerBenchmark/Serializers/FsPicklerSerializer.cs37
-rw-r--r--benchmark/SerializerBenchmark/Serializers/HyperionSerializer.cs37
-rw-r--r--benchmark/SerializerBenchmark/Serializers/JilSerializer.cs25
-rw-r--r--benchmark/SerializerBenchmark/Serializers/JsonNetSerializer.cs45
-rw-r--r--benchmark/SerializerBenchmark/Serializers/MessagePackSerializer.cs277
-rw-r--r--benchmark/SerializerBenchmark/Serializers/MsgPackCliSerializer.cs26
-rw-r--r--benchmark/SerializerBenchmark/Serializers/OdinSerializer.cs29
-rw-r--r--benchmark/SerializerBenchmark/Serializers/ProtobufNetSerializer.cs33
-rw-r--r--benchmark/SerializerBenchmark/Serializers/ProtobufSerializer.cs29
-rw-r--r--benchmark/SerializerBenchmark/Serializers/SpanJsonSerializer.cs26
-rw-r--r--benchmark/SerializerBenchmark/Serializers/SystemTextJsonSerializer.cs28
-rw-r--r--benchmark/SerializerBenchmark/Serializers/Utf8JsonSerializer.cs26
-rw-r--r--doc/consume_ci.md17
-rw-r--r--global.json2
-rw-r--r--init.cmd16
-rwxr-xr-xinit.ps137
-rw-r--r--prepare_release.ps114
-rw-r--r--sandbox/DynamicCodeDumper/DynamicCodeDumper.csproj8
-rw-r--r--sandbox/DynamicCodeDumper/Program.cs1
-rw-r--r--sandbox/MessagePack.Internal/MessagePack.Internal.csproj2
-rw-r--r--sandbox/PerfBenchmarkDotNet/DeserializeBenchmark.cs8
-rw-r--r--sandbox/PerfBenchmarkDotNet/MessagePackWriterBenchmark.cs17
-rw-r--r--sandbox/PerfBenchmarkDotNet/PerfBenchmarkDotNet.csproj4
-rw-r--r--sandbox/PerfBenchmarkDotNet/SerializeBenchmark.cs8
-rw-r--r--sandbox/PerfNetFramework/PerfNetFramework.csproj4
-rw-r--r--sandbox/Sandbox/Generated.cs1984
-rw-r--r--sandbox/Sandbox/Sandbox.csproj4
-rw-r--r--sandbox/Sandbox/codegen.ps12
-rw-r--r--sandbox/TestData2/A.cs15
-rw-r--r--sandbox/TestData2/B.cs17
-rw-r--r--sandbox/TestData2/C.cs16
-rw-r--r--sandbox/TestData2/Generated.cs270
-rw-r--r--sandbox/TestData2/Record.cs10
-rw-r--r--sandbox/TestData2/TestData2.csproj6
-rw-r--r--sandbox/TestData2/codegen.ps12
-rw-r--r--src/MessagePack.AspNetCoreMvcFormatter/MessagePack.AspNetCoreMvcFormatter.csproj6
-rw-r--r--src/MessagePack.AspNetCoreMvcFormatter/MessagePackInputFormatter.cs9
-rw-r--r--src/MessagePack.AspNetCoreMvcFormatter/MessagePackOutputFormatter.cs34
-rw-r--r--src/MessagePack.Generator/MessagePack.Generator.csproj15
-rw-r--r--src/MessagePack.Generator/PseudoCompilation.cs2
-rw-r--r--src/MessagePack.GeneratorCore/CodeAnalysis/Definitions.cs170
-rw-r--r--src/MessagePack.GeneratorCore/CodeAnalysis/TypeCollector.cs531
-rw-r--r--src/MessagePack.GeneratorCore/CodeGenerator.cs317
-rw-r--r--src/MessagePack.GeneratorCore/Generator/EnumTemplate.cs26
-rw-r--r--src/MessagePack.GeneratorCore/Generator/EnumTemplate.tt12
-rw-r--r--src/MessagePack.GeneratorCore/Generator/FormatterTemplate.cs159
-rw-r--r--src/MessagePack.GeneratorCore/Generator/FormatterTemplate.tt112
-rw-r--r--src/MessagePack.GeneratorCore/Generator/IFormatterTemplate.cs4
-rw-r--r--src/MessagePack.GeneratorCore/Generator/ResolverTemplate.cs17
-rw-r--r--src/MessagePack.GeneratorCore/Generator/ResolverTemplate.tt15
-rw-r--r--src/MessagePack.GeneratorCore/Generator/StringKey/StringKeyFormatterDeserializeHelper.cs65
-rw-r--r--src/MessagePack.GeneratorCore/Generator/StringKey/StringKeyFormatterTemplate.cs235
-rw-r--r--src/MessagePack.GeneratorCore/Generator/StringKey/StringKeyFormatterTemplate.tt211
-rw-r--r--src/MessagePack.GeneratorCore/Generator/TemplatePartials.cs56
-rw-r--r--src/MessagePack.GeneratorCore/Generator/UnionTemplate.cs41
-rw-r--r--src/MessagePack.GeneratorCore/Generator/UnionTemplate.tt26
-rw-r--r--src/MessagePack.GeneratorCore/MessagePack.GeneratorCore.csproj8
-rw-r--r--src/MessagePack.GeneratorCore/Utils/RoslynExtensions.cs118
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/CollectionFormatter.cs45
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/DateTimeFormatters.cs46
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/DictionaryFormatter.cs19
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/StandardClassLibraryFormatter.cs59
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/StringInterningFormatter.cs61
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/StringInterningFormatter.cs.meta11
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/TypelessFormatter.cs2
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/HashCode.cs2
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/IFormatterResolver.cs7
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Internal/DynamicAssembly.cs2
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Internal/ReflectionExtensions.cs7
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Internal/Sequence`1.cs120
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Internal/TinyJsonReader.cs7
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePack.asmdef3
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackCompression.cs4
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSecurity.cs8
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSerializer.Json.cs31
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSerializer.NonGeneric.cs45
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSerializer.cs61
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSerializerOptions.cs100
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackStreamReader.cs42
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Nil.cs5
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Resolvers/AttributeFormatterResolver.cs13
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Resolvers/BuiltinResolver.cs10
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Resolvers/DynamicGenericResolver.cs44
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Resolvers/DynamicObjectResolver.cs1394
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Resolvers/ResolverUtilities.cs45
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Resolvers/ResolverUtilities.cs.meta11
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/SafeBitConverter.cs12
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/SequencePool.cs40
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Utilities.cs4
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/MessagePack/package.json9
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/Tests/Class1.cs109
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/AllowPrivateTest.cs61
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/CollectionTest.cs194
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/ContractlessStandardResolverTest.cs22
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/DataContractTest.cs125
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/DynamicObjectFallbackTest.cs2
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/DynamicObjectResolverConstructorTest.cs36
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/DynamicObjectResolverTests.cs319
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/ExpandoObjectTests.cs4
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/FormatterTest.cs11
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/MessagePackFormatterPerFieldTest.cs135
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/MessagePackSerializerOptionsTests.cs42
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/MessagePackWriterTests.cs3
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/StandardClassLibraryFormatterTests.cs107
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/StringInterningTests.cs107
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/StringInterningTests.cs.meta11
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/TestUtilities.cs2
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/Tests/Shims/XUnit.cs18
-rw-r--r--src/MessagePack.UnityClient/Assets/Scripts/Tests/Tests.asmdef29
-rw-r--r--src/MessagePack.UnityClient/copy_assets.bat1
-rwxr-xr-xsrc/MessagePack.UnityClient/copy_assets.sh1
-rw-r--r--src/MessagePack/MessagePack.csproj23
-rw-r--r--src/MessagePack/MessagePackStreamReader.Arrays.cs28
-rw-r--r--src/MessagePack/MessagePackStreamReader.Maps.cs62
-rw-r--r--src/MessagePack/PublicAPI.Unshipped.txt127
-rw-r--r--src/MessagePack/net5.0/PublicAPI.Shipped.txt1180
-rw-r--r--src/MessagePack/net5.0/PublicAPI.Unshipped.txt6
-rw-r--r--src/MessagePack/net6.0/PublicAPI.Shipped.txt1180
-rw-r--r--src/MessagePack/net6.0/PublicAPI.Unshipped.txt16
-rw-r--r--src/MessagePack/netcoreapp3.1/PublicAPI.Shipped.txt (renamed from src/MessagePack/PublicAPI.Shipped.txt)151
-rw-r--r--src/MessagePack/netcoreapp3.1/PublicAPI.Unshipped.txt8
-rw-r--r--src/MessagePack/netstandard2.0/PublicAPI.Shipped.txt1174
-rw-r--r--src/MessagePack/netstandard2.0/PublicAPI.Unshipped.txt8
-rw-r--r--src/MessagePackAnalyzer.Vsix/MessagePackAnalyzer.Vsix.csproj91
-rw-r--r--src/MessagePackAnalyzer.Vsix/source.extension.vsixmanifest19
-rw-r--r--src/MessagePackAnalyzer/MessagePackAnalyzer.cs14
-rw-r--r--src/MessagePackAnalyzer/MessagePackAnalyzer.csproj1
-rw-r--r--src/MessagePackAnalyzer/ReferenceSymbols.cs22
-rw-r--r--src/MessagePackAnalyzer/TypeCollector.cs16
-rw-r--r--tests/MessagePack.AspNetCoreMvcFormatter.Tests/AspNetCoreMvcFormatterTest.cs14
-rw-r--r--tests/MessagePack.AspNetCoreMvcFormatter.Tests/MessagePack.AspNetCoreMvcFormatter.Tests.csproj3
-rw-r--r--tests/MessagePack.GeneratedCode.Tests/MessagePack.GeneratedCode.Tests.csproj21
-rw-r--r--tests/MessagePack.GeneratedCode.Tests/MissingPropertiesTest.cs105
-rw-r--r--tests/MessagePack.Generator.Tests/GenerateEnumFormatterTest.cs2
-rw-r--r--tests/MessagePack.Generator.Tests/GenerateGenericsFormatterTest.cs105
-rw-r--r--tests/MessagePack.Generator.Tests/GenerateKeyedFormatterTest.cs164
-rw-r--r--tests/MessagePack.Generator.Tests/GenerateMessagePackFormatterAttrTest.cs2
-rw-r--r--tests/MessagePack.Generator.Tests/GenerateStringKeyedFormatterTest.cs867
-rw-r--r--tests/MessagePack.Generator.Tests/MessagePack.Generator.Tests.csproj3
-rw-r--r--tests/MessagePack.Generator.Tests/TemporaryProjectWorkarea.cs116
-rw-r--r--tests/MessagePack.Generator.Tests/TestUtilities.cs22
-rw-r--r--tests/MessagePack.Internal.Tests/MessagePack.Internal.Tests.csproj2
-rw-r--r--tests/MessagePack.Tests/DynamicObjectResolverRecordsTests.cs101
-rw-r--r--tests/MessagePack.Tests/IsExternalInit.cs18
-rw-r--r--tests/MessagePack.Tests/MessagePack.Tests.csproj6
-rw-r--r--tests/MessagePack.Tests/MessagePackStreamReaderArrayTests.cs13
-rw-r--r--tests/MessagePack.Tests/MessagePackStreamReaderMapTests.cs48
-rw-r--r--tests/MessagePackAnalyzer.Tests/MessagePackAnalyzerTests.cs63
-rw-r--r--tools/Check-DotNetRuntime.ps141
-rw-r--r--tools/Check-DotNetSdk.ps137
-rwxr-xr-xtools/Install-DotNetSdk.ps1139
-rw-r--r--tools/Install-NuGetCredProvider.ps18
-rw-r--r--tools/Set-EnvVars.ps1 (renamed from azure-pipelines/Set-EnvVars.ps1)24
-rw-r--r--version.json2
177 files changed, 11736 insertions, 3917 deletions
diff --git a/Directory.Build.props b/Directory.Build.props
index b6fc8cf1..fc7c5f0f 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -28,11 +28,11 @@
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json" Visible="false" />
</ItemGroup>
<ItemGroup>
- <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
- <PackageReference Include="Nerdbank.GitVersioning" Version="3.2.7-beta" PrivateAssets="all" />
- <PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="16.5.124-alpha" PrivateAssets="All" />
- <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
- <PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.164" PrivateAssets="all" />
+ <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="All" />
+ <PackageReference Include="Nerdbank.GitVersioning" Version="3.4.244" PrivateAssets="all" />
+ <PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.0.64" PrivateAssets="All" />
+ <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
+ <PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.261" PrivateAssets="all" />
</ItemGroup>
<Target Name="PrepareReleaseNotes" BeforeTargets="GenerateNuspec" DependsOnTargets="GetBuildVersion">
diff --git a/Directory.Build.rsp b/Directory.Build.rsp
new file mode 100644
index 00000000..9a833a03
--- /dev/null
+++ b/Directory.Build.rsp
@@ -0,0 +1,16 @@
+#------------------------------------------------------------------------------
+# This file contains command-line options that MSBuild will process as part of
+# every build, unless the "/noautoresponse" switch is specified.
+#
+# MSBuild processes the options in this file first, before processing the
+# options on the command line. As a result, options on the command line can
+# override the options in this file. However, depending on the options being
+# set, the overriding can also result in conflicts.
+#
+# NOTE: The "/noautoresponse" switch cannot be specified in this file, nor in
+# any response file that is referenced by this file.
+#------------------------------------------------------------------------------
+/nr:false
+/m
+/verbosity:minimal
+/clp:Summary;ForceNoAlign
diff --git a/MessagePack.sln b/MessagePack.sln
index 6157da34..77d762b8 100644
--- a/MessagePack.sln
+++ b/MessagePack.sln
@@ -34,8 +34,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MessagePack.ImmutableCollec
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MessagePackAnalyzer", "src\MessagePackAnalyzer\MessagePackAnalyzer.csproj", "{2F9A6E0C-DE95-4460-96B7-EB72BBEAEE9E}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MessagePackAnalyzer.Vsix", "src\MessagePackAnalyzer.Vsix\MessagePackAnalyzer.Vsix.csproj", "{09B87BEB-D9A3-4EEB-B56A-ED53D27DF1A3}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PerfNetFramework", "sandbox\PerfNetFramework\PerfNetFramework.csproj", "{014A3DCE-50A6-4774-A4C1-C66EEAB67133}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MessagePack.AspNetCoreMvcFormatter", "src\MessagePack.AspNetCoreMvcFormatter\MessagePack.AspNetCoreMvcFormatter.csproj", "{17831017-C29C-4A48-B159-849BCE5079FB}"
@@ -88,228 +86,122 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MessagePack.Experimental",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MessagePack.Experimental.Tests", "tests\MessagePack.Experimental.Tests\MessagePack.Experimental.Tests.csproj", "{8AB40D1C-1134-4D77-B39A-19AEDC729450}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MessagePack.GeneratedCode.Tests", "tests\MessagePack.GeneratedCode.Tests\MessagePack.GeneratedCode.Tests.csproj", "{D4CE7347-CEBE-46E5-BD12-1319573B6C5E}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
- Debug|NoVSIX = Debug|NoVSIX
Release|Any CPU = Release|Any CPU
- Release|NoVSIX = Release|NoVSIX
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7ABB33EE-A2F1-492B-8DAF-5DF89F0F0B79}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7ABB33EE-A2F1-492B-8DAF-5DF89F0F0B79}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7ABB33EE-A2F1-492B-8DAF-5DF89F0F0B79}.Debug|NoVSIX.ActiveCfg = Debug|Any CPU
- {7ABB33EE-A2F1-492B-8DAF-5DF89F0F0B79}.Debug|NoVSIX.Build.0 = Debug|Any CPU
{7ABB33EE-A2F1-492B-8DAF-5DF89F0F0B79}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7ABB33EE-A2F1-492B-8DAF-5DF89F0F0B79}.Release|Any CPU.Build.0 = Release|Any CPU
- {7ABB33EE-A2F1-492B-8DAF-5DF89F0F0B79}.Release|NoVSIX.ActiveCfg = Release|Any CPU
- {7ABB33EE-A2F1-492B-8DAF-5DF89F0F0B79}.Release|NoVSIX.Build.0 = Release|Any CPU
{9E1A55CA-711D-4F58-A332-735960E3434C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9E1A55CA-711D-4F58-A332-735960E3434C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {9E1A55CA-711D-4F58-A332-735960E3434C}.Debug|NoVSIX.ActiveCfg = Debug|Any CPU
- {9E1A55CA-711D-4F58-A332-735960E3434C}.Debug|NoVSIX.Build.0 = Debug|Any CPU
{9E1A55CA-711D-4F58-A332-735960E3434C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9E1A55CA-711D-4F58-A332-735960E3434C}.Release|Any CPU.Build.0 = Release|Any CPU
- {9E1A55CA-711D-4F58-A332-735960E3434C}.Release|NoVSIX.ActiveCfg = Release|Any CPU
- {9E1A55CA-711D-4F58-A332-735960E3434C}.Release|NoVSIX.Build.0 = Release|Any CPU
{ED43BDA5-947C-4769-A47A-F07D3C6142AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ED43BDA5-947C-4769-A47A-F07D3C6142AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {ED43BDA5-947C-4769-A47A-F07D3C6142AE}.Debug|NoVSIX.ActiveCfg = Debug|Any CPU
- {ED43BDA5-947C-4769-A47A-F07D3C6142AE}.Debug|NoVSIX.Build.0 = Debug|Any CPU
{ED43BDA5-947C-4769-A47A-F07D3C6142AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ED43BDA5-947C-4769-A47A-F07D3C6142AE}.Release|Any CPU.Build.0 = Release|Any CPU
- {ED43BDA5-947C-4769-A47A-F07D3C6142AE}.Release|NoVSIX.ActiveCfg = Release|Any CPU
- {ED43BDA5-947C-4769-A47A-F07D3C6142AE}.Release|NoVSIX.Build.0 = Release|Any CPU
{8E511130-F838-4B47-842B-0FB27AD175B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8E511130-F838-4B47-842B-0FB27AD175B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {8E511130-F838-4B47-842B-0FB27AD175B5}.Debug|NoVSIX.ActiveCfg = Debug|Any CPU
- {8E511130-F838-4B47-842B-0FB27AD175B5}.Debug|NoVSIX.Build.0 = Debug|Any CPU
{8E511130-F838-4B47-842B-0FB27AD175B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8E511130-F838-4B47-842B-0FB27AD175B5}.Release|Any CPU.Build.0 = Release|Any CPU
- {8E511130-F838-4B47-842B-0FB27AD175B5}.Release|NoVSIX.ActiveCfg = Release|Any CPU
- {8E511130-F838-4B47-842B-0FB27AD175B5}.Release|NoVSIX.Build.0 = Release|Any CPU
{3ABC5C4C-2CE4-459E-8666-F2B181C3DEF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3ABC5C4C-2CE4-459E-8666-F2B181C3DEF3}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {3ABC5C4C-2CE4-459E-8666-F2B181C3DEF3}.Debug|NoVSIX.ActiveCfg = Debug|Any CPU
- {3ABC5C4C-2CE4-459E-8666-F2B181C3DEF3}.Debug|NoVSIX.Build.0 = Debug|Any CPU
{3ABC5C4C-2CE4-459E-8666-F2B181C3DEF3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3ABC5C4C-2CE4-459E-8666-F2B181C3DEF3}.Release|Any CPU.Build.0 = Release|Any CPU
- {3ABC5C4C-2CE4-459E-8666-F2B181C3DEF3}.Release|NoVSIX.ActiveCfg = Release|Any CPU
- {3ABC5C4C-2CE4-459E-8666-F2B181C3DEF3}.Release|NoVSIX.Build.0 = Release|Any CPU
{C01E1407-7FEC-4C1D-B0B4-74D95A317AA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C01E1407-7FEC-4C1D-B0B4-74D95A317AA6}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C01E1407-7FEC-4C1D-B0B4-74D95A317AA6}.Debug|NoVSIX.ActiveCfg = Debug|Any CPU
- {C01E1407-7FEC-4C1D-B0B4-74D95A317AA6}.Debug|NoVSIX.Build.0 = Debug|Any CPU
{C01E1407-7FEC-4C1D-B0B4-74D95A317AA6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C01E1407-7FEC-4C1D-B0B4-74D95A317AA6}.Release|Any CPU.Build.0 = Release|Any CPU
- {C01E1407-7FEC-4C1D-B0B4-74D95A317AA6}.Release|NoVSIX.ActiveCfg = Release|Any CPU
- {C01E1407-7FEC-4C1D-B0B4-74D95A317AA6}.Release|NoVSIX.Build.0 = Release|Any CPU
{166A16C0-B89F-41AF-956A-235C6CA62C25}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{166A16C0-B89F-41AF-956A-235C6CA62C25}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {166A16C0-B89F-41AF-956A-235C6CA62C25}.Debug|NoVSIX.ActiveCfg = Debug|Any CPU
- {166A16C0-B89F-41AF-956A-235C6CA62C25}.Debug|NoVSIX.Build.0 = Debug|Any CPU
{166A16C0-B89F-41AF-956A-235C6CA62C25}.Release|Any CPU.ActiveCfg = Release|Any CPU
{166A16C0-B89F-41AF-956A-235C6CA62C25}.Release|Any CPU.Build.0 = Release|Any CPU
- {166A16C0-B89F-41AF-956A-235C6CA62C25}.Release|NoVSIX.ActiveCfg = Release|Any CPU
- {166A16C0-B89F-41AF-956A-235C6CA62C25}.Release|NoVSIX.Build.0 = Release|Any CPU
{E066F547-7261-4561-AEFC-E64DBFD874F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E066F547-7261-4561-AEFC-E64DBFD874F8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {E066F547-7261-4561-AEFC-E64DBFD874F8}.Debug|NoVSIX.ActiveCfg = Debug|Any CPU
- {E066F547-7261-4561-AEFC-E64DBFD874F8}.Debug|NoVSIX.Build.0 = Debug|Any CPU
{E066F547-7261-4561-AEFC-E64DBFD874F8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E066F547-7261-4561-AEFC-E64DBFD874F8}.Release|Any CPU.Build.0 = Release|Any CPU
- {E066F547-7261-4561-AEFC-E64DBFD874F8}.Release|NoVSIX.ActiveCfg = Release|Any CPU
- {E066F547-7261-4561-AEFC-E64DBFD874F8}.Release|NoVSIX.Build.0 = Release|Any CPU
{2F9A6E0C-DE95-4460-96B7-EB72BBEAEE9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2F9A6E0C-DE95-4460-96B7-EB72BBEAEE9E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {2F9A6E0C-DE95-4460-96B7-EB72BBEAEE9E}.Debug|NoVSIX.ActiveCfg = Debug|Any CPU
- {2F9A6E0C-DE95-4460-96B7-EB72BBEAEE9E}.Debug|NoVSIX.Build.0 = Debug|Any CPU
{2F9A6E0C-DE95-4460-96B7-EB72BBEAEE9E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2F9A6E0C-DE95-4460-96B7-EB72BBEAEE9E}.Release|Any CPU.Build.0 = Release|Any CPU
- {2F9A6E0C-DE95-4460-96B7-EB72BBEAEE9E}.Release|NoVSIX.ActiveCfg = Release|Any CPU
- {2F9A6E0C-DE95-4460-96B7-EB72BBEAEE9E}.Release|NoVSIX.Build.0 = Release|Any CPU
- {09B87BEB-D9A3-4EEB-B56A-ED53D27DF1A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {09B87BEB-D9A3-4EEB-B56A-ED53D27DF1A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {09B87BEB-D9A3-4EEB-B56A-ED53D27DF1A3}.Debug|NoVSIX.ActiveCfg = Debug|Any CPU
- {09B87BEB-D9A3-4EEB-B56A-ED53D27DF1A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {09B87BEB-D9A3-4EEB-B56A-ED53D27DF1A3}.Release|Any CPU.Build.0 = Release|Any CPU
- {09B87BEB-D9A3-4EEB-B56A-ED53D27DF1A3}.Release|NoVSIX.ActiveCfg = Release|Any CPU
{014A3DCE-50A6-4774-A4C1-C66EEAB67133}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{014A3DCE-50A6-4774-A4C1-C66EEAB67133}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {014A3DCE-50A6-4774-A4C1-C66EEAB67133}.Debug|NoVSIX.ActiveCfg = Debug|Any CPU
- {014A3DCE-50A6-4774-A4C1-C66EEAB67133}.Debug|NoVSIX.Build.0 = Debug|Any CPU
{014A3DCE-50A6-4774-A4C1-C66EEAB67133}.Release|Any CPU.ActiveCfg = Release|Any CPU
{014A3DCE-50A6-4774-A4C1-C66EEAB67133}.Release|Any CPU.Build.0 = Release|Any CPU
- {014A3DCE-50A6-4774-A4C1-C66EEAB67133}.Release|NoVSIX.ActiveCfg = Release|Any CPU
- {014A3DCE-50A6-4774-A4C1-C66EEAB67133}.Release|NoVSIX.Build.0 = Release|Any CPU
{17831017-C29C-4A48-B159-849BCE5079FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{17831017-C29C-4A48-B159-849BCE5079FB}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {17831017-C29C-4A48-B159-849BCE5079FB}.Debug|NoVSIX.ActiveCfg = Debug|Any CPU
- {17831017-C29C-4A48-B159-849BCE5079FB}.Debug|NoVSIX.Build.0 = Debug|Any CPU
{17831017-C29C-4A48-B159-849BCE5079FB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{17831017-C29C-4A48-B159-849BCE5079FB}.Release|Any CPU.Build.0 = Release|Any CPU
- {17831017-C29C-4A48-B159-849BCE5079FB}.Release|NoVSIX.ActiveCfg = Release|Any CPU
- {17831017-C29C-4A48-B159-849BCE5079FB}.Release|NoVSIX.Build.0 = Release|Any CPU
{814F94D6-1413-4ACB-B1B5-A3488CAA1E6B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{814F94D6-1413-4ACB-B1B5-A3488CAA1E6B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {814F94D6-1413-4ACB-B1B5-A3488CAA1E6B}.Debug|NoVSIX.ActiveCfg = Debug|Any CPU
- {814F94D6-1413-4ACB-B1B5-A3488CAA1E6B}.Debug|NoVSIX.Build.0 = Debug|Any CPU
{814F94D6-1413-4ACB-B1B5-A3488CAA1E6B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{814F94D6-1413-4ACB-B1B5-A3488CAA1E6B}.Release|Any CPU.Build.0 = Release|Any CPU
- {814F94D6-1413-4ACB-B1B5-A3488CAA1E6B}.Release|NoVSIX.ActiveCfg = Release|Any CPU
- {814F94D6-1413-4ACB-B1B5-A3488CAA1E6B}.Release|NoVSIX.Build.0 = Release|Any CPU
{2A32A538-BA26-4D89-85D0-E4249AFA0837}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2A32A538-BA26-4D89-85D0-E4249AFA0837}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {2A32A538-BA26-4D89-85D0-E4249AFA0837}.Debug|NoVSIX.ActiveCfg = Debug|Any CPU
- {2A32A538-BA26-4D89-85D0-E4249AFA0837}.Debug|NoVSIX.Build.0 = Debug|Any CPU
{2A32A538-BA26-4D89-85D0-E4249AFA0837}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2A32A538-BA26-4D89-85D0-E4249AFA0837}.Release|Any CPU.Build.0 = Release|Any CPU
- {2A32A538-BA26-4D89-85D0-E4249AFA0837}.Release|NoVSIX.ActiveCfg = Release|Any CPU
- {2A32A538-BA26-4D89-85D0-E4249AFA0837}.Release|NoVSIX.Build.0 = Release|Any CPU
{79C2B2CB-872A-4BA9-82DC-60F6DD77F940}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{79C2B2CB-872A-4BA9-82DC-60F6DD77F940}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {79C2B2CB-872A-4BA9-82DC-60F6DD77F940}.Debug|NoVSIX.ActiveCfg = Debug|Any CPU
- {79C2B2CB-872A-4BA9-82DC-60F6DD77F940}.Debug|NoVSIX.Build.0 = Debug|Any CPU
{79C2B2CB-872A-4BA9-82DC-60F6DD77F940}.Release|Any CPU.ActiveCfg = Release|Any CPU
{79C2B2CB-872A-4BA9-82DC-60F6DD77F940}.Release|Any CPU.Build.0 = Release|Any CPU
- {79C2B2CB-872A-4BA9-82DC-60F6DD77F940}.Release|NoVSIX.ActiveCfg = Release|Any CPU
- {79C2B2CB-872A-4BA9-82DC-60F6DD77F940}.Release|NoVSIX.Build.0 = Release|Any CPU
{85763F30-7733-44AB-89AB-D1B64F6E0D93}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{85763F30-7733-44AB-89AB-D1B64F6E0D93}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {85763F30-7733-44AB-89AB-D1B64F6E0D93}.Debug|NoVSIX.ActiveCfg = Debug|Any CPU
- {85763F30-7733-44AB-89AB-D1B64F6E0D93}.Debug|NoVSIX.Build.0 = Debug|Any CPU
{85763F30-7733-44AB-89AB-D1B64F6E0D93}.Release|Any CPU.ActiveCfg = Release|Any CPU
{85763F30-7733-44AB-89AB-D1B64F6E0D93}.Release|Any CPU.Build.0 = Release|Any CPU
- {85763F30-7733-44AB-89AB-D1B64F6E0D93}.Release|NoVSIX.ActiveCfg = Release|Any CPU
- {85763F30-7733-44AB-89AB-D1B64F6E0D93}.Release|NoVSIX.Build.0 = Release|Any CPU
{4142EA80-FEF4-44A5-8553-1AE84BEBAFED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4142EA80-FEF4-44A5-8553-1AE84BEBAFED}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4142EA80-FEF4-44A5-8553-1AE84BEBAFED}.Debug|NoVSIX.ActiveCfg = Debug|Any CPU
- {4142EA80-FEF4-44A5-8553-1AE84BEBAFED}.Debug|NoVSIX.Build.0 = Debug|Any CPU
{4142EA80-FEF4-44A5-8553-1AE84BEBAFED}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4142EA80-FEF4-44A5-8553-1AE84BEBAFED}.Release|Any CPU.Build.0 = Release|Any CPU
- {4142EA80-FEF4-44A5-8553-1AE84BEBAFED}.Release|NoVSIX.ActiveCfg = Release|Any CPU
- {4142EA80-FEF4-44A5-8553-1AE84BEBAFED}.Release|NoVSIX.Build.0 = Release|Any CPU
{C100FBA6-4164-4D6A-A532-5984D2B8DCB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C100FBA6-4164-4D6A-A532-5984D2B8DCB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C100FBA6-4164-4D6A-A532-5984D2B8DCB0}.Debug|NoVSIX.ActiveCfg = Debug|Any CPU
- {C100FBA6-4164-4D6A-A532-5984D2B8DCB0}.Debug|NoVSIX.Build.0 = Debug|Any CPU
{C100FBA6-4164-4D6A-A532-5984D2B8DCB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C100FBA6-4164-4D6A-A532-5984D2B8DCB0}.Release|Any CPU.Build.0 = Release|Any CPU
- {C100FBA6-4164-4D6A-A532-5984D2B8DCB0}.Release|NoVSIX.ActiveCfg = Release|Any CPU
- {C100FBA6-4164-4D6A-A532-5984D2B8DCB0}.Release|NoVSIX.Build.0 = Release|Any CPU
{8D9FD130-7905-47D8-A25C-7FDEE28EA0E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8D9FD130-7905-47D8-A25C-7FDEE28EA0E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {8D9FD130-7905-47D8-A25C-7FDEE28EA0E8}.Debug|NoVSIX.ActiveCfg = Debug|Any CPU
- {8D9FD130-7905-47D8-A25C-7FDEE28EA0E8}.Debug|NoVSIX.Build.0 = Debug|Any CPU
{8D9FD130-7905-47D8-A25C-7FDEE28EA0E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8D9FD130-7905-47D8-A25C-7FDEE28EA0E8}.Release|Any CPU.Build.0 = Release|Any CPU
- {8D9FD130-7905-47D8-A25C-7FDEE28EA0E8}.Release|NoVSIX.ActiveCfg = Release|Any CPU
- {8D9FD130-7905-47D8-A25C-7FDEE28EA0E8}.Release|NoVSIX.Build.0 = Release|Any CPU
{9962132D-A271-4E68-ACC1-18FA93462552}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9962132D-A271-4E68-ACC1-18FA93462552}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {9962132D-A271-4E68-ACC1-18FA93462552}.Debug|NoVSIX.ActiveCfg = Debug|Any CPU
- {9962132D-A271-4E68-ACC1-18FA93462552}.Debug|NoVSIX.Build.0 = Debug|Any CPU
{9962132D-A271-4E68-ACC1-18FA93462552}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9962132D-A271-4E68-ACC1-18FA93462552}.Release|Any CPU.Build.0 = Release|Any CPU
- {9962132D-A271-4E68-ACC1-18FA93462552}.Release|NoVSIX.ActiveCfg = Release|Any CPU
- {9962132D-A271-4E68-ACC1-18FA93462552}.Release|NoVSIX.Build.0 = Release|Any CPU
{32C91908-5CAD-4C95-B240-ACBBACAC9476}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{32C91908-5CAD-4C95-B240-ACBBACAC9476}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {32C91908-5CAD-4C95-B240-ACBBACAC9476}.Debug|NoVSIX.ActiveCfg = Debug|Any CPU
- {32C91908-5CAD-4C95-B240-ACBBACAC9476}.Debug|NoVSIX.Build.0 = Debug|Any CPU
{32C91908-5CAD-4C95-B240-ACBBACAC9476}.Release|Any CPU.ActiveCfg = Release|Any CPU
{32C91908-5CAD-4C95-B240-ACBBACAC9476}.Release|Any CPU.Build.0 = Release|Any CPU
- {32C91908-5CAD-4C95-B240-ACBBACAC9476}.Release|NoVSIX.ActiveCfg = Release|Any CPU
- {32C91908-5CAD-4C95-B240-ACBBACAC9476}.Release|NoVSIX.Build.0 = Release|Any CPU
{8DB135F5-A6FE-44E4-9853-7B48ED21F21B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8DB135F5-A6FE-44E4-9853-7B48ED21F21B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {8DB135F5-A6FE-44E4-9853-7B48ED21F21B}.Debug|NoVSIX.ActiveCfg = Debug|Any CPU
- {8DB135F5-A6FE-44E4-9853-7B48ED21F21B}.Debug|NoVSIX.Build.0 = Debug|Any CPU
{8DB135F5-A6FE-44E4-9853-7B48ED21F21B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8DB135F5-A6FE-44E4-9853-7B48ED21F21B}.Release|Any CPU.Build.0 = Release|Any CPU
- {8DB135F5-A6FE-44E4-9853-7B48ED21F21B}.Release|NoVSIX.ActiveCfg = Release|Any CPU
- {8DB135F5-A6FE-44E4-9853-7B48ED21F21B}.Release|NoVSIX.Build.0 = Release|Any CPU
{7E5FB4B9-A0F5-4B10-A1F3-03AC0BC8265A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7E5FB4B9-A0F5-4B10-A1F3-03AC0BC8265A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7E5FB4B9-A0F5-4B10-A1F3-03AC0BC8265A}.Debug|NoVSIX.ActiveCfg = Debug|Any CPU
- {7E5FB4B9-A0F5-4B10-A1F3-03AC0BC8265A}.Debug|NoVSIX.Build.0 = Debug|Any CPU
{7E5FB4B9-A0F5-4B10-A1F3-03AC0BC8265A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7E5FB4B9-A0F5-4B10-A1F3-03AC0BC8265A}.Release|Any CPU.Build.0 = Release|Any CPU
- {7E5FB4B9-A0F5-4B10-A1F3-03AC0BC8265A}.Release|NoVSIX.ActiveCfg = Release|Any CPU
- {7E5FB4B9-A0F5-4B10-A1F3-03AC0BC8265A}.Release|NoVSIX.Build.0 = Release|Any CPU
{6AC51E68-4681-463A-B4B6-BD53517244B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6AC51E68-4681-463A-B4B6-BD53517244B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {6AC51E68-4681-463A-B4B6-BD53517244B2}.Debug|NoVSIX.ActiveCfg = Debug|Any CPU
- {6AC51E68-4681-463A-B4B6-BD53517244B2}.Debug|NoVSIX.Build.0 = Debug|Any CPU
{6AC51E68-4681-463A-B4B6-BD53517244B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6AC51E68-4681-463A-B4B6-BD53517244B2}.Release|Any CPU.Build.0 = Release|Any CPU
- {6AC51E68-4681-463A-B4B6-BD53517244B2}.Release|NoVSIX.ActiveCfg = Release|Any CPU
- {6AC51E68-4681-463A-B4B6-BD53517244B2}.Release|NoVSIX.Build.0 = Release|Any CPU
{4C9BB260-62D8-49CD-9F9C-9AA6A8BFC637}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4C9BB260-62D8-49CD-9F9C-9AA6A8BFC637}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4C9BB260-62D8-49CD-9F9C-9AA6A8BFC637}.Debug|NoVSIX.ActiveCfg = Debug|Any CPU
- {4C9BB260-62D8-49CD-9F9C-9AA6A8BFC637}.Debug|NoVSIX.Build.0 = Debug|Any CPU
{4C9BB260-62D8-49CD-9F9C-9AA6A8BFC637}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4C9BB260-62D8-49CD-9F9C-9AA6A8BFC637}.Release|Any CPU.Build.0 = Release|Any CPU
- {4C9BB260-62D8-49CD-9F9C-9AA6A8BFC637}.Release|NoVSIX.ActiveCfg = Release|Any CPU
- {4C9BB260-62D8-49CD-9F9C-9AA6A8BFC637}.Release|NoVSIX.Build.0 = Release|Any CPU
{AC2503A7-736D-4AE6-9355-CF35D9DF6139}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AC2503A7-736D-4AE6-9355-CF35D9DF6139}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {AC2503A7-736D-4AE6-9355-CF35D9DF6139}.Debug|NoVSIX.ActiveCfg = Debug|Any CPU
- {AC2503A7-736D-4AE6-9355-CF35D9DF6139}.Debug|NoVSIX.Build.0 = Debug|Any CPU
{AC2503A7-736D-4AE6-9355-CF35D9DF6139}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AC2503A7-736D-4AE6-9355-CF35D9DF6139}.Release|Any CPU.Build.0 = Release|Any CPU
- {AC2503A7-736D-4AE6-9355-CF35D9DF6139}.Release|NoVSIX.ActiveCfg = Release|Any CPU
- {AC2503A7-736D-4AE6-9355-CF35D9DF6139}.Release|NoVSIX.Build.0 = Release|Any CPU
{8AB40D1C-1134-4D77-B39A-19AEDC729450}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8AB40D1C-1134-4D77-B39A-19AEDC729450}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {8AB40D1C-1134-4D77-B39A-19AEDC729450}.Debug|NoVSIX.ActiveCfg = Debug|Any CPU
- {8AB40D1C-1134-4D77-B39A-19AEDC729450}.Debug|NoVSIX.Build.0 = Debug|Any CPU
{8AB40D1C-1134-4D77-B39A-19AEDC729450}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8AB40D1C-1134-4D77-B39A-19AEDC729450}.Release|Any CPU.Build.0 = Release|Any CPU
- {8AB40D1C-1134-4D77-B39A-19AEDC729450}.Release|NoVSIX.ActiveCfg = Release|Any CPU
- {8AB40D1C-1134-4D77-B39A-19AEDC729450}.Release|NoVSIX.Build.0 = Release|Any CPU
+ {D4CE7347-CEBE-46E5-BD12-1319573B6C5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D4CE7347-CEBE-46E5-BD12-1319573B6C5E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D4CE7347-CEBE-46E5-BD12-1319573B6C5E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D4CE7347-CEBE-46E5-BD12-1319573B6C5E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -324,7 +216,6 @@ Global
{166A16C0-B89F-41AF-956A-235C6CA62C25} = {86309CF6-0054-4CE3-BFD3-CA0AA7DB17BC}
{E066F547-7261-4561-AEFC-E64DBFD874F8} = {86309CF6-0054-4CE3-BFD3-CA0AA7DB17BC}
{2F9A6E0C-DE95-4460-96B7-EB72BBEAEE9E} = {86309CF6-0054-4CE3-BFD3-CA0AA7DB17BC}
- {09B87BEB-D9A3-4EEB-B56A-ED53D27DF1A3} = {86309CF6-0054-4CE3-BFD3-CA0AA7DB17BC}
{014A3DCE-50A6-4774-A4C1-C66EEAB67133} = {BF4C4202-5015-4FBD-80E6-D0F36A06F700}
{17831017-C29C-4A48-B159-849BCE5079FB} = {86309CF6-0054-4CE3-BFD3-CA0AA7DB17BC}
{814F94D6-1413-4ACB-B1B5-A3488CAA1E6B} = {BF4C4202-5015-4FBD-80E6-D0F36A06F700}
@@ -342,6 +233,7 @@ Global
{4C9BB260-62D8-49CD-9F9C-9AA6A8BFC637} = {51A614B0-E583-4DD2-AC7D-6A65634582E0}
{AC2503A7-736D-4AE6-9355-CF35D9DF6139} = {86309CF6-0054-4CE3-BFD3-CA0AA7DB17BC}
{8AB40D1C-1134-4D77-B39A-19AEDC729450} = {19FE674A-AC94-4E7E-B24C-2285D1D04CDE}
+ {D4CE7347-CEBE-46E5-BD12-1319573B6C5E} = {19FE674A-AC94-4E7E-B24C-2285D1D04CDE}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B3911209-2DBF-47F8-98F6-BBC0EDFE63DE}
diff --git a/README.md b/README.md
index 87d4c0f3..27af11f5 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@
[![Releases](https://img.shields.io/github/release/neuecc/MessagePack-CSharp.svg)][Releases]
[![Join the chat at https://gitter.im/MessagePack-CSharp/Lobby](https://badges.gitter.im/MessagePack-CSharp/Lobby.svg)](https://gitter.im/MessagePack-CSharp/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-[![Build Status](https://dev.azure.com/ils0086/MessagePack-CSharp/_apis/build/status/MessagePack-CSharp-CI)](https://dev.azure.com/ils0086/MessagePack-CSharp/_build/latest?definitionId=2)
+[![Build Status](https://dev.azure.com/ils0086/MessagePack-CSharp/_apis/build/status/MessagePack-CSharp-CI?branchName=master)](https://dev.azure.com/ils0086/MessagePack-CSharp/_build/latest?definitionId=2&branchName=master)
The extremely fast [MessagePack](http://msgpack.org/) serializer for C#.
It is 10x faster than [MsgPack-Cli](https://github.com/msgpack/msgpack-cli) and outperforms other C# serializers. MessagePack for C# also ships with built-in support for LZ4 compression - an extremely fast compression algorithm. Performance is important, particularly in applications like games, distributed computing, microservices, or data caches.
@@ -34,6 +34,7 @@ MessagePack has a compact binary size and a full set of general purpose expressi
- [Security](#security)
- [Performance](#performance)
- [Deserialization Performance for different options](#deserialization-performance-for-different-options)
+ - [String interning](#string-interning)
- [LZ4 Compression](#lz4-compression)
- [Attributions](#attributions)
- [Comparison with protobuf, JSON, ZeroFormatter](#comparison-with-protobuf-json-zeroformatter)
@@ -184,7 +185,7 @@ These types can serialize by default:
* Primitives (`int`, `string`, etc...), `Enum`s, `Nullable<>`, `Lazy<>`
* `TimeSpan`, `DateTime`, `DateTimeOffset`
* `Guid`, `Uri`, `Version`, `StringBuilder`
-* `BigInteger`, `Complex`
+* `BigInteger`, `Complex`, `Half`
* `Array[]`, `Array[,]`, `Array[,,]`, `Array[,,,]`, `ArraySegment<>`, `BitArray`
* `KeyValuePair<,>`, `Tuple<,...>`, `ValueTuple<,...>`
* `ArrayList`, `Hashtable`
@@ -404,6 +405,8 @@ public struct Point
}
```
+### C# 9 `record` types
+
C# 9.0 record with primary constructor is similar immutable object, also supports serialize/deserialize.
```csharp
@@ -412,8 +415,26 @@ C# 9.0 record with primary constructor is similar immutable object, also support
// use property: to set KeyAttribute
[MessagePackObject] public record Point([property:Key(0)] int X, [property: Key(1)] int Y);
+
+// Or use explicit properties
+[MessagePackObject]
+public record Person
+{
+ [Key(0)]
+ public string FirstName { get; init; }
+
+ [Key(1)]
+ public string LastName { get; init; }
+}
```
+### C# 9 `init` property setter limitations
+
+When using `init` property setters in _generic_ classes, [a CLR bug](https://github.com/neuecc/MessagePack-CSharp/issues/1134) prevents our most efficient code generation from invoking the property setter.
+As a result, you should avoid using `init` on property setters in generic classes when using the public-only `DynamicObjectResolver`/`StandardResolver`.
+
+When using the `DynamicObjectResolverAllowPrivate`/`StandardResolverAllowPrivate` resolver the bug does not apply and you may use `init` without restriction.
+
## Serialization Callback
Objects implementing the `IMessagePackSerializationCallbackReceiver` interface will received `OnBeforeSerialize` and `OnAfterDeserialize` calls during serialization/deserialization.
@@ -679,7 +700,7 @@ Benchmarks comparing MessagePack For C# to other serializers were run on `Window
* Avoid string key decoding for lookup maps (string key and use automata based name lookup with inlined IL code generation, see: [AutomataDictionary](https://github.com/neuecc/MessagePack-CSharp/blob/bcedbce3fd98cb294210d6b4a22bdc4c75ccd916/src/MessagePack/Internal/AutomataDictionary.cs)
* To encode string keys, use pre-generated member name bytes and fixed sized byte array copies in IL, see: [UnsafeMemory.cs](https://github.com/neuecc/MessagePack-CSharp/blob/f17ddc5d107d3a2f66f60398b214ef87919ff892/src/MessagePack/Internal/UnsafeMemory.cs)
-Before creating this library, I implemented a fast fast serializer with [ZeroFormatter#Performance](https://github.com/neuecc/ZeroFormatter#performance). This is a further evolved implementation. MessagePack for C# is always fast and optimized for all types (primitive, small struct, large object, any collections).
+Before creating this library, I implemented a fast serializer with [ZeroFormatter#Performance](https://github.com/neuecc/ZeroFormatter#performance). This is a further evolved implementation. MessagePack for C# is always fast and optimized for all types (primitive, small struct, large object, any collections).
### <a name="deserialize-performance"></a>Deserialization Performance for different options
@@ -738,6 +759,49 @@ Extra note, this is serialization benchmark result.
Of course, `IntKey` is fastest but `StringKey` also performs reasonably well.
+### <a name="string-interning"></a>String interning
+
+The msgpack format does not provide for reusing strings in the data stream.
+This naturally leads the deserializer to create a new `string` object for every string encountered,
+even if it is equal to another string previously encountered.
+
+When deserializing data that may contain the same strings repeatedly it can be worthwhile
+to have the deserializer take a little extra time to check whether it has seen a given string before
+and reuse it if it has.
+
+To enable string interning on *all* string values, use a resolver that specifies `StringInterningFormatter`
+before any of the standard ones, like this:
+
+```cs
+var options = MessagePackSerializerOptions.Standard.WithResolver(
+ CompositeResolver.Create(
+ new IMessagePackFormatter[] { new StringInterningFormatter() },
+ new IFormatterResolver[] { StandardResolver.Instance }));
+
+MessagePackSerializer.Deserialize<ClassOfStrings>(data, options);
+```
+
+If you know which fields of a particular type are likely to contain duplicate strings,
+you can apply the string interning formatter to just those fields so the deserializer only pays
+for the interned string check where it matters most.
+Note that this technique requires a `[MessagePackObject]` or `[DataContract]` class.
+
+```cs
+[MessagePackObject]
+public class ClassOfStrings
+{
+ [Key(0)]
+ [MessagePackFormatter(typeof(StringInterningFormatter))]
+ public string InternedString { get; set; }
+
+ [Key(1)]
+ public string OrdinaryString { get; set; }
+}
+```
+
+If you are writing your own formatter for some type that contains strings,
+you can call on the `StringInterningFormatter` directly from your formatter as well for the strings.
+
## LZ4 Compression
MessagePack is a fast and *compact* format but it is not compression. [LZ4](https://github.com/lz4/lz4) is an extremely fast compression algorithm, and using it MessagePack for C# can achieve extremely fast performance as well as extremely compact binary sizes!
@@ -1068,7 +1132,7 @@ Here is an example of such a custom formatter implementation. Note its use of th
```csharp
/// <summary>Serializes a <see cref="FileInfo" /> by its full path as a string.</summary>
-public class FileInfoFormatter<T> : IMessagePackFormatter<FileInfo>
+public class FileInfoFormatter : IMessagePackFormatter<FileInfo>
{
public void Serialize(
ref MessagePackWriter writer, FileInfo value, MessagePackSerializerOptions options)
@@ -1111,7 +1175,7 @@ you must precede it with a map or array header. You must read the entire map/arr
For example:
```csharp
-public class MySpecialObjectFormatter<T> : IMessagePackFormatter<MySpecialObject>
+public class MySpecialObjectFormatter : IMessagePackFormatter<MySpecialObject>
{
public void Serialize(
ref MessagePackWriter writer, MySpecialObject value, MessagePackSerializerOptions options)
@@ -1149,15 +1213,18 @@ public class MySpecialObjectFormatter<T> : IMessagePackFormatter<MySpecialObject
int count = reader.ReadArrayHeader();
for (int i = 0; i < count; i++)
{
- case 0:
- fullName = reader.ReadString();
- break;
- case 1:
- age = reader.ReadInt32();
- break;
- default:
- reader.Skip();
- break;
+ switch (i)
+ {
+ case 0:
+ fullName = reader.ReadString();
+ break;
+ case 1:
+ age = reader.ReadInt32();
+ break;
+ default:
+ reader.Skip();
+ break;
+ }
}
reader.Depth--;
@@ -1342,12 +1409,6 @@ internal static class SampleCustomResolverGetFormatterHelper
return formatter;
}
- // If target type is generics, use MakeGenericType.
- if (t.IsGenericParameter && t.GetGenericTypeDefinition() == typeof(ValueTuple<,>))
- {
- return Activator.CreateInstance(typeof(ValueTupleFormatter<,>).MakeGenericType(t.GenericTypeArguments));
- }
-
// If type can not get, must return null for fallback mechanism.
return null;
}
@@ -1435,30 +1496,44 @@ var resolver = MessagePack.Resolvers.CompositeResolver.Create(
## Reserved Extension Types
-MessagePack for C# already used some MessagePack extension type codes, be careful to use same ext code.
+MessagePack for C# already used some MessagePack extension type codes, be careful to avoid using the same ext code for other purposes.
+
+Range | Reserved for
+--|--
+\[-128, -1\] | Reserved by the msgpack spec for predefined types
+\[30, 120) | Reserved for this library's use to support common types in .NET
+
+This leaves the following ranges for your use:
+
+- \[0, 30)
+- \[120, 127]
+
+Within the *reserved* ranges, this library defines or implements extensions that use these type codes:
| Code | Type | Use by |
-| --- | --- | --- |
-| -1 | DateTime | MessagePack-spec reserved for timestamp |
-| 30 | Vector2[] | for Unity, UnsafeBlitFormatter |
-| 31 | Vector3[] | for Unity, UnsafeBlitFormatter |
-| 32 | Vector4[] | for Unity, UnsafeBlitFormatter |
-| 33 | Quaternion[] | for Unity, UnsafeBlitFormatter |
-| 34 | Color[] | for Unity, UnsafeBlitFormatter |
-| 35 | Bounds[] | for Unity, UnsafeBlitFormatter |
-| 36 | Rect[] | for Unity, UnsafeBlitFormatter |
-| 37 | Int[] | for Unity, UnsafeBlitFormatter |
-| 38 | Float[] | for Unity, UnsafeBlitFormatter |
-| 39 | Double[] | for Unity, UnsafeBlitFormatter |
-| 98 | All | MessagePackCompression.Lz4BlockArray |
-| 99 | All | MessagePackCompression.Lz4Block |
-| 100 | object | TypelessFormatter |
+| ---- | ---- | --- |
+| -1 | DateTime | MessagePack-spec reserved for timestamp |
+| 30 | Vector2[] | for Unity, UnsafeBlitFormatter |
+| 31 | Vector3[] | for Unity, UnsafeBlitFormatter |
+| 32 | Vector4[] | for Unity, UnsafeBlitFormatter |
+| 33 | Quaternion[] | for Unity, UnsafeBlitFormatter |
+| 34 | Color[] | for Unity, UnsafeBlitFormatter |
+| 35 | Bounds[] | for Unity, UnsafeBlitFormatter |
+| 36 | Rect[] | for Unity, UnsafeBlitFormatter |
+| 37 | Int[] | for Unity, UnsafeBlitFormatter |
+| 38 | Float[] | for Unity, UnsafeBlitFormatter |
+| 39 | Double[] | for Unity, UnsafeBlitFormatter |
+| 98 | All | MessagePackCompression.Lz4BlockArray |
+| 99 | All | MessagePackCompression.Lz4Block |
+| 100 | object | TypelessFormatter |
## Unity support
Unity lowest supported version is `2018.3`, API Compatibility Level supports both `.NET 4.x` and `.NET Standard 2.0`.
-You can install the `unitypackage` from the [releases][Releases] page. If your build targets PC, you can use it as is, but if your build targets IL2CPP, you can not use `Dynamic***Resolver`, so it is required to use pre-code generation. Please see [pre-code generation section](#aot).
+You can install the `unitypackage` from the [releases][Releases] page.
+If your build targets .NET Framework 4.x and runs on mono, you can use it as is.
+But if your build targets IL2CPP, you can not use `Dynamic***Resolver`, so it is required to use pre-code generation. Please see [pre-code generation section](#aot).
MessagePack for C# includes some additional `System.*.dll` libraries that originally provides in NuGet. They are located under `Plugins`. If other packages use these libraries (e.g. Unity Collections package using `System.Runtime.CompilerServices.Unsafe.dll`), to avoid conflicts, please delete the DLL under `Plugins`.
@@ -1504,7 +1579,8 @@ If you want to share a class between Unity and a server, you can use `SharedProj
By default, MessagePack for C# serializes custom objects by [generating IL](https://msdn.microsoft.com/en-us/library/system.reflection.emit.ilgenerator.aspx) on the fly at runtime to create custom, highly tuned formatters for each type. This code generation has a minor upfront performance cost.
Because strict-AOT environments such as Xamarin and Unity IL2CPP forbid runtime code generation, MessagePack provides a way for you to run a code generator ahead of time as well.
-> Note: When Unity targets the PC it allows dynamic code generation, so AOT is not required.
+> Note: When using Unity, dynamic code generation only works when targeting .NET Framework 4.x + mono runtime.
+For all other Unity targets, AOT is required.
If you want to avoid the upfront dynamic generation cost or you need to run on Xamarin or Unity, you need AOT code generation. `mpc` (MessagePackCompiler) is the code generator of MessagePack for C#. mpc uses [Roslyn](https://github.com/dotnet/roslyn) to analyze source code.
@@ -1526,7 +1602,7 @@ Check in your `.config\dotnet-tools.json` file. On another machine you can "rest
Once you have the tool installed, simply invoke using `dotnet mpc` within your repo:
```
-dotnet mpc -h
+dotnet mpc --help
```
Alternatively, you can download mpc from the [releases][Releases] page, that includes platform native binaries (that don't require a separate dotnet runtime).
@@ -1535,7 +1611,7 @@ Alternatively, you can download mpc from the [releases][Releases] page, that inc
Usage: mpc [options...]
Options:
- -i, -input <String> Input path of analyze csproj or directory, if input multiple csproj split with ','. (Required)
+ -i, -input <String> Input path to MSBuild project file or the directory containing Unity source files. (Required)
-o, -output <String> Output file path(.cs) or directory(multiple generate file). (Required)
-c, -conditionalSymbol <String> Conditional compiler symbols, split with ','. (Default: null)
-r, -resolverName <String> Set resolver name. (Default: GeneratedResolver)
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index a3206040..d18997c3 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -19,7 +19,7 @@ stages:
jobs:
- job: Windows
pool:
- vmImage: windows-2019
+ vmImage: windows-2022
steps:
- checkout: self
clean: true
@@ -33,7 +33,9 @@ stages:
- job: Unity
pool:
name: CustomAgents
- demands: UNITYHUB_EDITORS_FOLDER_LOCATION
+ demands:
+ - UNITYHUB_EDITORS_FOLDER_LOCATION
+ - UNITYVERSION -equals 2019.1
steps:
- checkout: self
clean: true
@@ -42,7 +44,7 @@ stages:
- job: Linux
pool:
- vmImage: Ubuntu 16.04
+ vmImage: ubuntu-20.04
steps:
- checkout: self
clean: true
@@ -51,7 +53,7 @@ stages:
- job: macOS
pool:
- vmImage: macOS-10.15
+ vmImage: macOS-11
steps:
- checkout: self
clean: true
@@ -62,7 +64,7 @@ stages:
# It also helps exercise mpc so bugs don't go unnoticed.
- job: codegen_diff
pool:
- vmImage: ubuntu-latest
+ vmImage: ubuntu-20.04
steps:
- checkout: self
clean: true
@@ -82,7 +84,7 @@ stages:
jobs:
- job: push
pool:
- vmImage: ubuntu-latest
+ vmImage: ubuntu-20.04
steps:
- download: current
artifact: nuget
diff --git a/azure-pipelines/Get-TempToolsPath.ps1 b/azure-pipelines/Get-TempToolsPath.ps1
index 97c552c0..bb3da8e3 100644
--- a/azure-pipelines/Get-TempToolsPath.ps1
+++ b/azure-pipelines/Get-TempToolsPath.ps1
@@ -1,7 +1,7 @@
-if ($env:AGENT_TOOLSDIRECTORY) {
- $path = "$env:AGENT_TOOLSDIRECTORY\vs-platform\tools"
+if ($env:AGENT_TEMPDIRECTORY) {
+ $path = "$env:AGENT_TEMPDIRECTORY\$env:BUILD_BUILDID"
} elseif ($env:localappdata) {
- $path = "$env:localappdata\vs-platform\tools"
+ $path = "$env:localappdata\gitrepos\tools"
} else {
$path = "$PSScriptRoot\..\obj\tools"
}
diff --git a/azure-pipelines/Get-nbgv.ps1 b/azure-pipelines/Get-nbgv.ps1
index 925eecdd..a5be2cf7 100644
--- a/azure-pipelines/Get-nbgv.ps1
+++ b/azure-pipelines/Get-nbgv.ps1
@@ -10,11 +10,7 @@ if ($existingTool) {
return $existingTool.Path
}
-if ($env:AGENT_TEMPDIRECTORY) {
- $toolInstallDir = "$env:AGENT_TEMPDIRECTORY/$env:BUILD_BUILDID"
-} else {
- $toolInstallDir = "$PSScriptRoot/../obj/tools"
-}
+$toolInstallDir = & "$PSScriptRoot/Get-TempToolsPath.ps1"
$toolPath = "$toolInstallDir/nbgv"
if (!(Test-Path $toolInstallDir)) { New-Item -Path $toolInstallDir -ItemType Directory | Out-Null }
diff --git a/azure-pipelines/build.yml b/azure-pipelines/build.yml
index 7a26369d..99f5524d 100644
--- a/azure-pipelines/build.yml
+++ b/azure-pipelines/build.yml
@@ -1,12 +1,8 @@
steps:
-# Use VSBuild to pack because `dotnet pack` can't build VSIX projects.
-- task: VSBuild@1
+- task: DotNetCoreCLI@2
inputs:
- vsVersion: 16.0
- solution: MessagePack.sln
- msbuildArgs: /t:build,pack /m /v:m /bl:"$(Build.ArtifactStagingDirectory)/build_logs/msbuild.binlog"
- platform: $(BuildPlatform)
- configuration: $(BuildConfiguration)
+ command: build
+ arguments: --configuration $(BuildConfiguration) /t:build,pack /m /v:m /bl:"$(Build.ArtifactStagingDirectory)/build_logs/msbuild.binlog"
displayName: Build MessagePack.sln
- task: DotNetCoreCLI@2
diff --git a/azure-pipelines/build_nonWindows.yml b/azure-pipelines/build_nonWindows.yml
index af79463e..cf3f51d7 100644
--- a/azure-pipelines/build_nonWindows.yml
+++ b/azure-pipelines/build_nonWindows.yml
@@ -3,15 +3,23 @@ steps:
displayName: Build MessagePack.sln
inputs:
command: build
- arguments: --no-restore /p:platform=NoVSIX -c $(BuildConfiguration)
+ arguments: --no-restore -c $(BuildConfiguration)
- task: DotNetCoreCLI@2
- displayName: Run MessagePack.Tests (netcoreapp2.1)
+ displayName: Run MessagePack.Tests (netcoreapp3.1)
inputs:
command: test
projects: tests/MessagePack.Tests/MessagePack.Tests.csproj
- arguments: --no-build -c $(BuildConfiguration) -f netcoreapp2.1 -v n --settings "$(Build.Repository.LocalPath)/azure-pipelines/$(Agent.OS).runsettings"
- testRunTitle: netcoreapp2.1-$(Agent.JobName)
+ arguments: --no-build -c $(BuildConfiguration) -f netcoreapp3.1 -v n --settings "$(Build.Repository.LocalPath)/azure-pipelines/$(Agent.OS).runsettings"
+ testRunTitle: netcoreapp3.1-$(Agent.JobName)
+
+- task: DotNetCoreCLI@2
+ displayName: Run MessagePack.Tests (net6.0)
+ inputs:
+ command: test
+ projects: tests/MessagePack.Tests/MessagePack.Tests.csproj
+ arguments: --no-build -c $(BuildConfiguration) -f net6.0 -v n --settings "$(Build.Repository.LocalPath)/azure-pipelines/$(Agent.OS).runsettings"
+ testRunTitle: net6.0-$(Agent.JobName)
- bash: mono ~/.nuget/packages/xunit.runner.console/2.4.1/tools/net472/xunit.console.exe bin/MessagePack.Tests/$(BuildConfiguration)/net472/MessagePack.Tests.dll -html $(BUILD.ARTIFACTSTAGINGDIRECTORY)/build_logs/mono_testrun.html
displayName: Run MessagePack.Tests (mono)
diff --git a/azure-pipelines/install-dependencies.yml b/azure-pipelines/install-dependencies.yml
index 5b1ac4af..7563bc1f 100644
--- a/azure-pipelines/install-dependencies.yml
+++ b/azure-pipelines/install-dependencies.yml
@@ -7,8 +7,14 @@ steps:
$AccessToken = '$(System.AccessToken)' # Avoid specifying the access token directly on the init.ps1 command line to avoid it showing up in errors
.\init.ps1 -AccessToken $AccessToken ${{ parameters['initArgs'] }} -UpgradePrerequisites
dotnet --info
+
+ # Print mono version if it is present.
+ if (Get-Command mono -ErrorAction SilentlyContinue) {
+ mono --version
+ }
displayName: Install prerequisites
- powershell: azure-pipelines/variables/_pipelines.ps1
failOnStderr: true
displayName: Set pipeline variables based on source
+ name: SetPipelineVariables
diff --git a/azure-pipelines/release.yml b/azure-pipelines/release.yml
index 4f6ebd82..83a6ab1a 100644
--- a/azure-pipelines/release.yml
+++ b/azure-pipelines/release.yml
@@ -21,15 +21,13 @@ stages:
runOnce:
deploy:
steps:
+ - download: none
- powershell: |
Write-Host "##vso[build.updatebuildnumber]$(resources.pipeline.CI.runName)"
displayName: Set pipeline name
- download: CI
artifact: unity
displayName: 'Downloading artifact: unity'
- - download: CI
- artifact: vsix
- displayName: 'Downloading artifact: vsix'
- task: GitHubRelease@1
displayName: GitHub release (create)
inputs:
@@ -41,7 +39,6 @@ stages:
title: v$(resources.pipeline.CI.runName)
assets: |
$(Pipeline.Workspace)/CI/unity/*.unitypackage
- $(Pipeline.Workspace)/CI/vsix/*
isDraft: true # After running this step, visit the new draft release, edit, and publish.
changeLogCompareToRelease: lastNonDraftRelease
changeLogType: issueBased
diff --git a/azure-pipelines/variables/_pipelines.ps1 b/azure-pipelines/variables/_pipelines.ps1
index 14d6ffc2..867b7fc8 100644
--- a/azure-pipelines/variables/_pipelines.ps1
+++ b/azure-pipelines/variables/_pipelines.ps1
@@ -8,13 +8,16 @@
# Always use ALL CAPS for env var names since Azure Pipelines converts variable names to all caps and on non-Windows OS, env vars are case sensitive.
$keyCaps = $_.Key.ToUpper()
if (Test-Path -Path "env:$keyCaps") {
- Write-Host "Skipping setting $keyCaps because variable is already set." -ForegroundColor Cyan
+ Write-Host "Skipping setting $keyCaps because variable is already set to '$(Get-Content env:$keyCaps)'." -ForegroundColor Cyan
} else {
Write-Host "$keyCaps=$($_.Value)" -ForegroundColor Yellow
if ($env:TF_BUILD) {
- Write-Host "##vso[task.setvariable variable=$keyCaps;]$($_.Value)"
+ # Create two variables: the first that can be used by its simple name and accessible only within this job.
+ Write-Host "##vso[task.setvariable variable=$keyCaps]$($_.Value)"
+ # and the second that works across jobs and stages but must be fully qualified when referenced.
+ Write-Host "##vso[task.setvariable variable=$keyCaps;isOutput=true]$($_.Value)"
} elseif ($env:GITHUB_ACTIONS) {
- Write-Host "::set-env name=$keyCaps::$($_.Value)"
+ Add-Content -Path $env:GITHUB_ENV -Value "$keyCaps=$($_.Value)"
}
Set-Item -Path "env:$keyCaps" -Value $_.Value
}
diff --git a/benchmark/ExperimentalBenchmark/ExperimentalBenchmark.csproj b/benchmark/ExperimentalBenchmark/ExperimentalBenchmark.csproj
index fb222f26..dbefafaf 100644
--- a/benchmark/ExperimentalBenchmark/ExperimentalBenchmark.csproj
+++ b/benchmark/ExperimentalBenchmark/ExperimentalBenchmark.csproj
@@ -6,6 +6,7 @@
<RootNamespace>Benchmark</RootNamespace>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
+ <NoWarn>$(NoWarn);MSB3243</NoWarn>
</PropertyGroup>
<ItemGroup>
diff --git a/benchmark/SerializerBenchmark/BenchmarkConfig.cs b/benchmark/SerializerBenchmark/BenchmarkConfig.cs
index c641d731..e6e7066c 100644
--- a/benchmark/SerializerBenchmark/BenchmarkConfig.cs
+++ b/benchmark/SerializerBenchmark/BenchmarkConfig.cs
@@ -27,13 +27,13 @@ namespace Benchmark
Job baseConfig = Job.ShortRun.WithIterationCount(1).WithWarmupCount(1);
// Add(baseConfig.With(Runtime.Clr).With(Jit.RyuJit).With(Platform.X64));
- this.Add(baseConfig.With(CoreRuntime.Core31).With(Jit.RyuJit).With(Platform.X64));
+ this.AddJob(baseConfig.WithRuntime(CoreRuntime.Core31).WithJit(Jit.RyuJit).WithPlatform(Platform.X64));
- this.Add(MarkdownExporter.GitHub);
- this.Add(CsvExporter.Default);
- this.Add(MemoryDiagnoser.Default);
+ this.AddExporter(MarkdownExporter.GitHub);
+ this.AddExporter(CsvExporter.Default);
+ this.AddDiagnoser(MemoryDiagnoser.Default);
- this.Add(new DataSizeColumn());
+ this.AddColumn(new DataSizeColumn());
this.Orderer = new CustomOrderer();
}
@@ -96,19 +96,24 @@ namespace Benchmark
public string GetValue(Summary summary, BenchmarkCase benchmarkCase, SummaryStyle style)
{
System.Reflection.MethodInfo mi = benchmarkCase.Descriptor.WorkloadMethod;
- if (mi.Name.Contains("Serialize"))
+ if (!mi.Name.Contains("Serialize"))
{
- var instance = Activator.CreateInstance(mi.DeclaringType);
- mi.DeclaringType.GetField("Serializer").SetValue(instance, benchmarkCase.Parameters[0].Value);
- mi.DeclaringType.GetMethod("Setup").Invoke(instance, null);
-
- var bytes = (byte[])mi.Invoke(instance, null);
- return ToHumanReadableSize(bytes.Length);
+ return "-";
}
- else
+
+ var instance = Activator.CreateInstance(mi.DeclaringType);
+ mi.DeclaringType.GetField("Serializer").SetValue(instance, benchmarkCase.Parameters[0].Value);
+ mi.DeclaringType.GetMethod("Setup").Invoke(instance, null);
+
+ var bytes = (byte[])mi.Invoke(instance, null);
+ var byteSize = bytes.Length;
+ var cultureInfo = summary.GetCultureInfo();
+ if (style.PrintUnitsInContent)
{
- return "-";
+ return SizeValue.FromBytes(byteSize).ToString(style.SizeUnit, cultureInfo);
}
+
+ return byteSize.ToString("0.##", cultureInfo);
}
public bool IsAvailable(Summary summary)
@@ -120,65 +125,6 @@ namespace Benchmark
{
return false;
}
-
- private static string ToHumanReadableSize(long size)
- {
- return ToHumanReadableSize(new long?(size));
- }
-
- private static string ToHumanReadableSize(long? size)
- {
- if (size == null)
- {
- return "NULL";
- }
-
- double bytes = size.Value;
-
- if (bytes <= 1024)
- {
- return bytes.ToString("f2") + " B";
- }
-
- bytes = bytes / 1024;
- if (bytes <= 1024)
- {
- return bytes.ToString("f2") + " KB";
- }
-
- bytes = bytes / 1024;
- if (bytes <= 1024)
- {
- return bytes.ToString("f2") + " MB";
- }
-
- bytes = bytes / 1024;
- if (bytes <= 1024)
- {
- return bytes.ToString("f2") + " GB";
- }
-
- bytes = bytes / 1024;
- if (bytes <= 1024)
- {
- return bytes.ToString("f2") + " TB";
- }
-
- bytes = bytes / 1024;
- if (bytes <= 1024)
- {
- return bytes.ToString("f2") + " PB";
- }
-
- bytes = bytes / 1024;
- if (bytes <= 1024)
- {
- return bytes.ToString("f2") + " EB";
- }
-
- bytes = bytes / 1024;
- return bytes + " ZB";
- }
}
}
}
diff --git a/benchmark/SerializerBenchmark/OdinSerializer.dll b/benchmark/SerializerBenchmark/OdinSerializer.dll
new file mode 100644
index 00000000..c46f5493
--- /dev/null
+++ b/benchmark/SerializerBenchmark/OdinSerializer.dll
Binary files differ
diff --git a/benchmark/SerializerBenchmark/Program.cs b/benchmark/SerializerBenchmark/Program.cs
index 8bc34aec..c0d23073 100644
--- a/benchmark/SerializerBenchmark/Program.cs
+++ b/benchmark/SerializerBenchmark/Program.cs
@@ -1,13 +1,11 @@
// Copyright (c) All contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using Benchmark;
-using Benchmark.Models;
using BenchmarkDotNet.Running;
-namespace ConsoleApp1
+namespace Benchmark
{
- internal class Program
+ internal static class Program
{
private static void Main(string[] args)
{
diff --git a/benchmark/SerializerBenchmark/SerializerBenchmark.cs b/benchmark/SerializerBenchmark/SerializerBenchmark.cs
index c2915538..71a95e20 100644
--- a/benchmark/SerializerBenchmark/SerializerBenchmark.cs
+++ b/benchmark/SerializerBenchmark/SerializerBenchmark.cs
@@ -21,7 +21,7 @@ namespace Benchmark
[ParamsSource(nameof(Serializers))]
public SerializerBase Serializer;
- // Currently BenchmarkdDotNet does not detect inherited ParamsSource so use copy and paste:)
+ // Currently BenchmarkDotNet does not detect inherited ParamsSource so use copy and paste:)
public IEnumerable<SerializerBase> Serializers => new SerializerBase[]
{
new MessagePack_v1(),
@@ -31,19 +31,20 @@ namespace Benchmark
new MsgPack_v2_opt(),
//new MsgPack_v2_string(),
//new MsgPack_v2_str_lz4(),
- new ProtobufNet(),
- new JsonNet(),
- new BsonNet(),
- new BinaryFormatter_(),
- new DataContract_(),
- new Hyperion_(),
- new Jil_(),
- new SpanJson_(),
- new Utf8Json_(),
- new SystemTextJson(),
- new MsgPackCli(),
- new FsPickler_(),
- new Ceras_(),
+ new ProtobufNetSerializer(),
+ new JsonNetSerializer(),
+ new BsonNetSerializer(),
+ new BinaryFormatterSerializer(),
+ new DataContractSerializer(),
+ new HyperionSerializer(),
+ new JilSerializer(),
+ new SpanJsonSerializer(),
+ new Utf8JsonSerializer(),
+ new SystemTextJsonSerializer(),
+ new MsgPackCliSerializer(),
+ new FsPicklerSerializer(),
+ new CerasSerializer(),
+ new OdinSerializer_(),
};
protected static readonly ExpressionTreeFixture ExpressionTreeFixture = new ExpressionTreeFixture();
@@ -568,7 +569,7 @@ namespace Benchmark
[ParamsSource(nameof(Serializers))]
public SerializerBase Serializer;
- // Currently BenchmarkdDotNet does not detect inherited ParamsSource so use copy and paste:)
+ // Currently BenchmarkDotNet does not detect inherited ParamsSource so use copy and paste:)
public IEnumerable<SerializerBase> Serializers => new SerializerBase[]
{
new MessagePack_v1(),
@@ -1099,7 +1100,7 @@ namespace Benchmark
private bool isContractless;
- // Currently BenchmarkdDotNet does not detect inherited ParamsSource so use copy and paste:)
+ // Currently BenchmarkDotNet does not detect inherited ParamsSource so use copy and paste:)
public IEnumerable<SerializerBase> Serializers => new SerializerBase[]
{
new MessagePack_v1(),
@@ -1111,19 +1112,20 @@ namespace Benchmark
new MsgPack_v2_string(),
new MsgPack_v1_str_lz4(),
new MsgPack_v2_str_lz4(),
- new ProtobufNet(),
- new JsonNet(),
- new BsonNet(),
- new BinaryFormatter_(),
- new DataContract_(),
- new Hyperion_(),
- new Jil_(),
- new SpanJson_(),
- new Utf8Json_(),
- new SystemTextJson(),
- new MsgPackCli(),
- new FsPickler_(),
- new Ceras_(),
+ new ProtobufNetSerializer(),
+ new JsonNetSerializer(),
+ new BsonNetSerializer(),
+ new BinaryFormatterSerializer(),
+ new DataContractSerializer(),
+ new HyperionSerializer(),
+ new JilSerializer(),
+ new SpanJsonSerializer(),
+ new Utf8JsonSerializer(),
+ new SystemTextJsonSerializer(),
+ new MsgPackCliSerializer(),
+ new FsPicklerSerializer(),
+ new CerasSerializer(),
+ new OdinSerializer_(),
};
protected static readonly ExpressionTreeFixture ExpressionTreeFixture = new ExpressionTreeFixture();
@@ -1197,7 +1199,7 @@ namespace Benchmark
[ParamsSource(nameof(Serializers))]
public SerializerBase Serializer;
- // Currently BenchmarkdDotNet does not detect inherited ParamsSource so use copy and paste:)
+ // Currently BenchmarkDotNet does not detect inherited ParamsSource so use copy and paste:)
public IEnumerable<SerializerBase> Serializers => new SerializerBase[]
{
new MessagePack_v1(),
diff --git a/benchmark/SerializerBenchmark/SerializerBenchmark.csproj b/benchmark/SerializerBenchmark/SerializerBenchmark.csproj
index b4912cc8..b6be2ea0 100644
--- a/benchmark/SerializerBenchmark/SerializerBenchmark.csproj
+++ b/benchmark/SerializerBenchmark/SerializerBenchmark.csproj
@@ -10,7 +10,7 @@
</PropertyGroup>
<ItemGroup>
- <PackageReference Include="BenchmarkDotNet" Version="0.12.0" />
+ <PackageReference Include="BenchmarkDotNet" Version="0.12.1" />
<PackageReference Include="Ceras" Version="4.1.7" />
<PackageReference Include="FsPickler" Version="5.2.2" />
<PackageReference Include="Hyperion" Version="0.9.11" />
@@ -20,7 +20,7 @@
<PackageReference Include="SpanJson" Version="3.0.1" />
<PackageReference Include="System.Text.Json" Version="4.6.0" />
<PackageReference Include="Utf8Json" Version="1.3.7" />
- <PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
+ <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Newtonsoft.Json.Bson" Version="1.0.2" />
</ItemGroup>
@@ -40,6 +40,7 @@
<Private>true</Private>
<SpecificVersion>false</SpecificVersion>
</Reference>
- </ItemGroup>
+ <Reference Include="OdinSerializer.dll" /> <!-- Odin is not available on NuGet -->
+ </ItemGroup>
</Project>
diff --git a/benchmark/SerializerBenchmark/Serializers/BinaryFormatter.cs b/benchmark/SerializerBenchmark/Serializers/BinaryFormatter.cs
deleted file mode 100644
index b3981a89..00000000
--- a/benchmark/SerializerBenchmark/Serializers/BinaryFormatter.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) All contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System.IO;
-using System.Runtime.Serialization.Formatters.Binary;
-using Benchmark.Serializers;
-
-#pragma warning disable SA1649 // File name should match first type name
-
-public class BinaryFormatter_ : SerializerBase
-{
- public override T Deserialize<T>(object input)
- {
- using (var ms = new MemoryStream((byte[])input))
- {
- return (T)new BinaryFormatter().Deserialize(ms);
- }
- }
-
- public override object Serialize<T>(T input)
- {
- using (var ms = new MemoryStream())
- {
- new BinaryFormatter().Serialize(ms, input);
- ms.Flush();
- return ms.ToArray();
- }
- }
-}
diff --git a/benchmark/SerializerBenchmark/Serializers/BinaryFormatterSerializer.cs b/benchmark/SerializerBenchmark/Serializers/BinaryFormatterSerializer.cs
new file mode 100644
index 00000000..c54b5487
--- /dev/null
+++ b/benchmark/SerializerBenchmark/Serializers/BinaryFormatterSerializer.cs
@@ -0,0 +1,34 @@
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System.IO;
+using System.Runtime.Serialization.Formatters.Binary;
+
+namespace Benchmark.Serializers
+{
+ public class BinaryFormatterSerializer : SerializerBase
+ {
+ public override T Deserialize<T>(object input)
+ {
+ using (var ms = new MemoryStream((byte[])input))
+ {
+ return (T)new BinaryFormatter().Deserialize(ms);
+ }
+ }
+
+ public override object Serialize<T>(T input)
+ {
+ using (var ms = new MemoryStream())
+ {
+ new BinaryFormatter().Serialize(ms, input);
+ ms.Flush();
+ return ms.ToArray();
+ }
+ }
+
+ public override string ToString()
+ {
+ return "BinaryFormatter";
+ }
+ }
+}
diff --git a/benchmark/SerializerBenchmark/Serializers/BsonNetSerializer.cs b/benchmark/SerializerBenchmark/Serializers/BsonNetSerializer.cs
index cd379a0f..68616af4 100644
--- a/benchmark/SerializerBenchmark/Serializers/BsonNetSerializer.cs
+++ b/benchmark/SerializerBenchmark/Serializers/BsonNetSerializer.cs
@@ -2,42 +2,47 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.IO;
-using Benchmark.Serializers;
using Newtonsoft.Json;
using Newtonsoft.Json.Bson;
-#pragma warning disable SA1649 // File name should match first type name
-
-public class BsonNet : SerializerBase
+namespace Benchmark.Serializers
{
- private static readonly JsonSerializer Serializer = new JsonSerializer();
-
- public override T Deserialize<T>(object input)
+ public class BsonNetSerializer : SerializerBase
{
- using (var ms = new MemoryStream((byte[])input))
- using (var jr = new BsonDataReader(ms))
- {
- return Serializer.Deserialize<T>(jr);
- }
- }
+ private static readonly JsonSerializer Serializer = new JsonSerializer();
- public override object Serialize<T>(T input)
- {
- object value = input;
- if (typeof(T).IsValueType)
+ public override T Deserialize<T>(object input)
{
- value = new[] { input };
+ using (var ms = new MemoryStream((byte[])input))
+ using (var jr = new BsonDataReader(ms))
+ {
+ return Serializer.Deserialize<T>(jr);
+ }
}
- using (var ms = new MemoryStream())
+ public override object Serialize<T>(T input)
{
- using (var jw = new BsonDataWriter(ms))
+ object value = input;
+ if (typeof(T).IsValueType)
{
- Serializer.Serialize(jw, value);
+ value = new[] { input };
}
- ms.Flush();
- return ms.ToArray();
+ using (var ms = new MemoryStream())
+ {
+ using (var jw = new BsonDataWriter(ms))
+ {
+ Serializer.Serialize(jw, value);
+ }
+
+ ms.Flush();
+ return ms.ToArray();
+ }
+ }
+
+ public override string ToString()
+ {
+ return "BsonNet";
}
}
}
diff --git a/benchmark/SerializerBenchmark/Serializers/CerasSerializer.cs b/benchmark/SerializerBenchmark/Serializers/CerasSerializer.cs
index cfdd9be0..9521e4f2 100644
--- a/benchmark/SerializerBenchmark/Serializers/CerasSerializer.cs
+++ b/benchmark/SerializerBenchmark/Serializers/CerasSerializer.cs
@@ -1,21 +1,25 @@
// Copyright (c) All contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using Benchmark.Serializers;
-
-#pragma warning disable SA1649 // File name should match first type name
-
-public class Ceras_ : SerializerBase
+namespace Benchmark.Serializers
{
- private Ceras.CerasSerializer ceras = new Ceras.CerasSerializer();
-
- public override T Deserialize<T>(object input)
+ public class CerasSerializer : SerializerBase
{
- return this.ceras.Deserialize<T>((byte[])input);
- }
+ private Ceras.CerasSerializer ceras = new Ceras.CerasSerializer();
- public override object Serialize<T>(T input)
- {
- return this.ceras.Serialize(input);
+ public override T Deserialize<T>(object input)
+ {
+ return this.ceras.Deserialize<T>((byte[])input);
+ }
+
+ public override object Serialize<T>(T input)
+ {
+ return this.ceras.Serialize(input);
+ }
+
+ public override string ToString()
+ {
+ return "Ceras";
+ }
}
}
diff --git a/benchmark/SerializerBenchmark/Serializers/DataContractSerializer.cs b/benchmark/SerializerBenchmark/Serializers/DataContractSerializer.cs
index eae1431f..4425ed0e 100644
--- a/benchmark/SerializerBenchmark/Serializers/DataContractSerializer.cs
+++ b/benchmark/SerializerBenchmark/Serializers/DataContractSerializer.cs
@@ -2,28 +2,32 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.IO;
-using System.Runtime.Serialization;
-using Benchmark.Serializers;
-#pragma warning disable SA1649 // File name should match first type name
-
-public class DataContract_ : SerializerBase
+namespace Benchmark.Serializers
{
- public override T Deserialize<T>(object input)
+ public class DataContractSerializer : SerializerBase
{
- using (var ms = new MemoryStream((byte[])input))
+ public override T Deserialize<T>(object input)
{
- return (T)new DataContractSerializer(typeof(T)).ReadObject(ms);
+ using (var ms = new MemoryStream((byte[])input))
+ {
+ return (T)new System.Runtime.Serialization.DataContractSerializer(typeof(T)).ReadObject(ms);
+ }
}
- }
- public override object Serialize<T>(T input)
- {
- using (var ms = new MemoryStream())
+ public override object Serialize<T>(T input)
+ {
+ using (var ms = new MemoryStream())
+ {
+ new System.Runtime.Serialization.DataContractSerializer(typeof(T)).WriteObject(ms, input);
+ ms.Flush();
+ return ms.ToArray();
+ }
+ }
+
+ public override string ToString()
{
- new DataContractSerializer(typeof(T)).WriteObject(ms, input);
- ms.Flush();
- return ms.ToArray();
+ return "DataContract";
}
}
}
diff --git a/benchmark/SerializerBenchmark/Serializers/FsPicklerSerializer.cs b/benchmark/SerializerBenchmark/Serializers/FsPicklerSerializer.cs
index 18b1c88e..d0c8341f 100644
--- a/benchmark/SerializerBenchmark/Serializers/FsPicklerSerializer.cs
+++ b/benchmark/SerializerBenchmark/Serializers/FsPicklerSerializer.cs
@@ -2,30 +2,35 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.IO;
-using Benchmark.Serializers;
using MBrace.FsPickler;
-#pragma warning disable SA1649 // File name should match first type name
-
-public class FsPickler_ : SerializerBase
+namespace Benchmark.Serializers
{
- private static readonly BinarySerializer Serializer = MBrace.FsPickler.FsPickler.CreateBinarySerializer();
-
- public override T Deserialize<T>(object input)
+ public class FsPicklerSerializer : SerializerBase
{
- using (var ms = new MemoryStream((byte[])input))
+ private static readonly BinarySerializer Serializer = MBrace.FsPickler.FsPickler.CreateBinarySerializer();
+
+ public override T Deserialize<T>(object input)
{
- return Serializer.Deserialize<T>(ms);
+ using (var ms = new MemoryStream((byte[])input))
+ {
+ return Serializer.Deserialize<T>(ms);
+ }
}
- }
- public override object Serialize<T>(T input)
- {
- using (var ms = new MemoryStream())
+ public override object Serialize<T>(T input)
+ {
+ using (var ms = new MemoryStream())
+ {
+ Serializer.Serialize<T>(ms, input);
+ ms.Flush();
+ return ms.ToArray();
+ }
+ }
+
+ public override string ToString()
{
- Serializer.Serialize<T>(ms, input);
- ms.Flush();
- return ms.ToArray();
+ return "FsPickler";
}
}
}
diff --git a/benchmark/SerializerBenchmark/Serializers/HyperionSerializer.cs b/benchmark/SerializerBenchmark/Serializers/HyperionSerializer.cs
index b38ef949..0f5d5d84 100644
--- a/benchmark/SerializerBenchmark/Serializers/HyperionSerializer.cs
+++ b/benchmark/SerializerBenchmark/Serializers/HyperionSerializer.cs
@@ -2,30 +2,35 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.IO;
-using Benchmark.Serializers;
using Hyperion;
-#pragma warning disable SA1649 // File name should match first type name
-
-public class Hyperion_ : SerializerBase
+namespace Benchmark.Serializers
{
- private static readonly Serializer Serializer = new Hyperion.Serializer();
-
- public override T Deserialize<T>(object input)
+ public class HyperionSerializer : SerializerBase
{
- using (var ms = new MemoryStream((byte[])input))
+ private static readonly Serializer Serializer = new Hyperion.Serializer();
+
+ public override T Deserialize<T>(object input)
{
- return Serializer.Deserialize<T>(ms);
+ using (var ms = new MemoryStream((byte[])input))
+ {
+ return Serializer.Deserialize<T>(ms);
+ }
}
- }
- public override object Serialize<T>(T input)
- {
- using (var ms = new MemoryStream())
+ public override object Serialize<T>(T input)
+ {
+ using (var ms = new MemoryStream())
+ {
+ Serializer.Serialize(input, ms);
+ ms.Flush();
+ return ms.ToArray();
+ }
+ }
+
+ public override string ToString()
{
- Serializer.Serialize(input, ms);
- ms.Flush();
- return ms.ToArray();
+ return "Hyperion";
}
}
}
diff --git a/benchmark/SerializerBenchmark/Serializers/JilSerializer.cs b/benchmark/SerializerBenchmark/Serializers/JilSerializer.cs
index b68a0585..983e07d3 100644
--- a/benchmark/SerializerBenchmark/Serializers/JilSerializer.cs
+++ b/benchmark/SerializerBenchmark/Serializers/JilSerializer.cs
@@ -2,20 +2,25 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Text;
-using Benchmark.Serializers;
using Jil;
-#pragma warning disable SA1649 // File name should match first type name
-
-public class Jil_ : SerializerBase
+namespace Benchmark.Serializers
{
- public override object Serialize<T>(T input)
+ public class JilSerializer : SerializerBase
{
- return Encoding.UTF8.GetBytes(Jil.JSON.Serialize(input, Options.ISO8601));
- }
+ public override object Serialize<T>(T input)
+ {
+ return Encoding.UTF8.GetBytes(Jil.JSON.Serialize(input, Options.ISO8601));
+ }
- public override T Deserialize<T>(object input)
- {
- return Jil.JSON.Deserialize<T>(Encoding.UTF8.GetString((byte[])input), Options.ISO8601);
+ public override T Deserialize<T>(object input)
+ {
+ return Jil.JSON.Deserialize<T>(Encoding.UTF8.GetString((byte[])input), Options.ISO8601);
+ }
+
+ public override string ToString()
+ {
+ return "Jil";
+ }
}
}
diff --git a/benchmark/SerializerBenchmark/Serializers/JsonNetSerializer.cs b/benchmark/SerializerBenchmark/Serializers/JsonNetSerializer.cs
index 80761c6a..b85574dd 100644
--- a/benchmark/SerializerBenchmark/Serializers/JsonNetSerializer.cs
+++ b/benchmark/SerializerBenchmark/Serializers/JsonNetSerializer.cs
@@ -3,37 +3,42 @@
using System.IO;
using System.Text;
-using Benchmark.Serializers;
using Newtonsoft.Json;
-#pragma warning disable SA1649 // File name should match first type name
-
-public class JsonNet : SerializerBase
+namespace Benchmark.Serializers
{
- private static readonly JsonSerializer Serializer = new JsonSerializer();
-
- public override T Deserialize<T>(object input)
+ public class JsonNetSerializer : SerializerBase
{
- using (var ms = new MemoryStream((byte[])input))
- using (var sr = new StreamReader(ms, Encoding.UTF8))
- using (var jr = new JsonTextReader(sr))
+ private static readonly JsonSerializer Serializer = new JsonSerializer();
+
+ public override T Deserialize<T>(object input)
{
- return Serializer.Deserialize<T>(jr);
+ using (var ms = new MemoryStream((byte[])input))
+ using (var sr = new StreamReader(ms, Encoding.UTF8))
+ using (var jr = new JsonTextReader(sr))
+ {
+ return Serializer.Deserialize<T>(jr);
+ }
}
- }
- public override object Serialize<T>(T input)
- {
- using (var ms = new MemoryStream())
+ public override object Serialize<T>(T input)
{
- using (var sw = new StreamWriter(ms, Encoding.UTF8))
- using (var jw = new JsonTextWriter(sw))
+ using (var ms = new MemoryStream())
{
- Serializer.Serialize(jw, input);
+ using (var sw = new StreamWriter(ms, Encoding.UTF8))
+ using (var jw = new JsonTextWriter(sw))
+ {
+ Serializer.Serialize(jw, input);
+ }
+
+ ms.Flush();
+ return ms.ToArray();
}
+ }
- ms.Flush();
- return ms.ToArray();
+ public override string ToString()
+ {
+ return "JsonNet";
}
}
}
diff --git a/benchmark/SerializerBenchmark/Serializers/MessagePackSerializer.cs b/benchmark/SerializerBenchmark/Serializers/MessagePackSerializer.cs
index eb5901c9..7583e036 100644
--- a/benchmark/SerializerBenchmark/Serializers/MessagePackSerializer.cs
+++ b/benchmark/SerializerBenchmark/Serializers/MessagePackSerializer.cs
@@ -4,172 +4,221 @@
extern alias oldmsgpack;
extern alias newmsgpack;
-using Benchmark.Serializers;
-
#pragma warning disable SA1649 // File name should match first type name
-public class MessagePack_v1 : SerializerBase
+namespace Benchmark.Serializers
{
- public override T Deserialize<T>(object input)
+ public class MessagePack_v1 : SerializerBase
{
- return oldmsgpack::MessagePack.MessagePackSerializer.Deserialize<T>((byte[])input);
- }
+ public override T Deserialize<T>(object input)
+ {
+ return oldmsgpack::MessagePack.MessagePackSerializer.Deserialize<T>((byte[])input);
+ }
- public override object Serialize<T>(T input)
- {
- return oldmsgpack::MessagePack.MessagePackSerializer.Serialize<T>(input);
- }
-}
+ public override object Serialize<T>(T input)
+ {
+ return oldmsgpack::MessagePack.MessagePackSerializer.Serialize<T>(input);
+ }
-public class MessagePack_v2 : SerializerBase
-{
- public override T Deserialize<T>(object input)
- {
- return newmsgpack::MessagePack.MessagePackSerializer.Deserialize<T>((byte[])input);
+ public override string ToString()
+ {
+ return "MessagePack_v1";
+ }
}
- public override object Serialize<T>(T input)
+ public class MessagePack_v2 : SerializerBase
{
- return newmsgpack::MessagePack.MessagePackSerializer.Serialize<T>(input);
- }
-}
+ public override T Deserialize<T>(object input)
+ {
+ return newmsgpack::MessagePack.MessagePackSerializer.Deserialize<T>((byte[])input);
+ }
-public class MsgPack_v1_string : SerializerBase
-{
- public override T Deserialize<T>(object input)
- {
- return oldmsgpack::MessagePack.MessagePackSerializer.Deserialize<T>((byte[])input, oldmsgpack::MessagePack.Resolvers.ContractlessStandardResolver.Instance);
+ public override object Serialize<T>(T input)
+ {
+ return newmsgpack::MessagePack.MessagePackSerializer.Serialize<T>(input);
+ }
+
+ public override string ToString()
+ {
+ return "MessagePack_v2";
+ }
}
- public override object Serialize<T>(T input)
+ public class MsgPack_v1_string : SerializerBase
{
- return oldmsgpack::MessagePack.MessagePackSerializer.Serialize<T>(input, oldmsgpack::MessagePack.Resolvers.ContractlessStandardResolver.Instance);
- }
-}
+ public override T Deserialize<T>(object input)
+ {
+ return oldmsgpack::MessagePack.MessagePackSerializer.Deserialize<T>((byte[])input, oldmsgpack::MessagePack.Resolvers.ContractlessStandardResolver.Instance);
+ }
-public class MsgPack_v2_string : SerializerBase
-{
- private static readonly newmsgpack::MessagePack.MessagePackSerializerOptions Options = newmsgpack::MessagePack.MessagePackSerializerOptions.Standard.WithResolver(newmsgpack::MessagePack.Resolvers.ContractlessStandardResolver.Instance);
+ public override object Serialize<T>(T input)
+ {
+ return oldmsgpack::MessagePack.MessagePackSerializer.Serialize<T>(input, oldmsgpack::MessagePack.Resolvers.ContractlessStandardResolver.Instance);
+ }
- public override T Deserialize<T>(object input)
- {
- return newmsgpack::MessagePack.MessagePackSerializer.Deserialize<T>((byte[])input, options: Options);
+ public override string ToString()
+ {
+ return "MsgPack_v1_string";
+ }
}
- public override object Serialize<T>(T input)
+ public class MsgPack_v2_string : SerializerBase
{
- return newmsgpack::MessagePack.MessagePackSerializer.Serialize<T>(input, options: Options);
- }
-}
+ private static readonly newmsgpack::MessagePack.MessagePackSerializerOptions Options =
+ newmsgpack::MessagePack.MessagePackSerializerOptions.Standard.WithResolver(newmsgpack::MessagePack.Resolvers.ContractlessStandardResolver.Instance);
-public class MessagePackLz4_v1 : SerializerBase
-{
- public override T Deserialize<T>(object input)
- {
- return oldmsgpack::MessagePack.LZ4MessagePackSerializer.Deserialize<T>((byte[])input);
+ public override T Deserialize<T>(object input)
+ {
+ return newmsgpack::MessagePack.MessagePackSerializer.Deserialize<T>((byte[])input, options: Options);
+ }
+
+ public override object Serialize<T>(T input)
+ {
+ return newmsgpack::MessagePack.MessagePackSerializer.Serialize<T>(input, options: Options);
+ }
+
+ public override string ToString()
+ {
+ return "MsgPack_v2_string";
+ }
}
- public override object Serialize<T>(T input)
+ public class MessagePackLz4_v1 : SerializerBase
{
- return oldmsgpack::MessagePack.LZ4MessagePackSerializer.Serialize<T>(input);
- }
-}
+ public override T Deserialize<T>(object input)
+ {
+ return oldmsgpack::MessagePack.LZ4MessagePackSerializer.Deserialize<T>((byte[])input);
+ }
-public class MessagePackLz4_v2 : SerializerBase
-{
- private static readonly newmsgpack::MessagePack.MessagePackSerializerOptions LZ4BlockArray = newmsgpack::MessagePack.MessagePackSerializerOptions.Standard.WithCompression(newmsgpack::MessagePack.MessagePackCompression.Lz4BlockArray);
+ public override object Serialize<T>(T input)
+ {
+ return oldmsgpack::MessagePack.LZ4MessagePackSerializer.Serialize<T>(input);
+ }
- public override T Deserialize<T>(object input)
- {
- return newmsgpack::MessagePack.MessagePackSerializer.Deserialize<T>((byte[])input, LZ4BlockArray);
+ public override string ToString()
+ {
+ return "MessagePackLz4_v1";
+ }
}
- public override object Serialize<T>(T input)
+ public class MessagePackLz4_v2 : SerializerBase
{
- return newmsgpack::MessagePack.MessagePackSerializer.Serialize<T>(input, LZ4BlockArray);
- }
-}
+ private static readonly newmsgpack::MessagePack.MessagePackSerializerOptions LZ4BlockArray =
+ newmsgpack::MessagePack.MessagePackSerializerOptions.Standard.WithCompression(newmsgpack::MessagePack.MessagePackCompression.Lz4BlockArray);
-public class MsgPack_v1_str_lz4 : SerializerBase
-{
- public override T Deserialize<T>(object input)
- {
- return oldmsgpack::MessagePack.LZ4MessagePackSerializer.Deserialize<T>((byte[])input, oldmsgpack::MessagePack.Resolvers.ContractlessStandardResolver.Instance);
+ public override T Deserialize<T>(object input)
+ {
+ return newmsgpack::MessagePack.MessagePackSerializer.Deserialize<T>((byte[])input, LZ4BlockArray);
+ }
+
+ public override object Serialize<T>(T input)
+ {
+ return newmsgpack::MessagePack.MessagePackSerializer.Serialize<T>(input, LZ4BlockArray);
+ }
+
+ public override string ToString()
+ {
+ return "MessagePackLz4_v2";
+ }
}
- public override object Serialize<T>(T input)
+ public class MsgPack_v1_str_lz4 : SerializerBase
{
- return oldmsgpack::MessagePack.LZ4MessagePackSerializer.Serialize<T>(input, oldmsgpack::MessagePack.Resolvers.ContractlessStandardResolver.Instance);
- }
-}
+ public override T Deserialize<T>(object input)
+ {
+ return oldmsgpack::MessagePack.LZ4MessagePackSerializer.Deserialize<T>((byte[])input, oldmsgpack::MessagePack.Resolvers.ContractlessStandardResolver.Instance);
+ }
-public class MsgPack_v2_str_lz4 : SerializerBase
-{
- private static readonly newmsgpack::MessagePack.MessagePackSerializerOptions Options = newmsgpack::MessagePack.MessagePackSerializerOptions.Standard.WithResolver(newmsgpack::MessagePack.Resolvers.ContractlessStandardResolver.Instance).WithCompression(newmsgpack::MessagePack.MessagePackCompression.Lz4BlockArray);
+ public override object Serialize<T>(T input)
+ {
+ return oldmsgpack::MessagePack.LZ4MessagePackSerializer.Serialize<T>(input, oldmsgpack::MessagePack.Resolvers.ContractlessStandardResolver.Instance);
+ }
- public override T Deserialize<T>(object input)
- {
- return newmsgpack::MessagePack.MessagePackSerializer.Deserialize<T>((byte[])input, Options);
+ public override string ToString()
+ {
+ return "MsgPack_v1_str_lz4";
+ }
}
- public override object Serialize<T>(T input)
+ public class MsgPack_v2_str_lz4 : SerializerBase
{
- return newmsgpack::MessagePack.MessagePackSerializer.Serialize<T>(input, Options);
- }
-}
+ private static readonly newmsgpack::MessagePack.MessagePackSerializerOptions Options = newmsgpack::MessagePack.MessagePackSerializerOptions.Standard
+ .WithResolver(newmsgpack::MessagePack.Resolvers.ContractlessStandardResolver.Instance)
+ .WithCompression(newmsgpack::MessagePack.MessagePackCompression.Lz4BlockArray);
-public class MsgPack_v2_opt : SerializerBase
-{
- private static readonly newmsgpack::MessagePack.MessagePackSerializerOptions Options = newmsgpack::MessagePack.MessagePackSerializerOptions.Standard.WithResolver(OptimizedResolver.Instance);
+ public override T Deserialize<T>(object input)
+ {
+ return newmsgpack::MessagePack.MessagePackSerializer.Deserialize<T>((byte[])input, Options);
+ }
- public override T Deserialize<T>(object input)
- {
- return newmsgpack::MessagePack.MessagePackSerializer.Deserialize<T>((byte[])input, Options);
+ public override object Serialize<T>(T input)
+ {
+ return newmsgpack::MessagePack.MessagePackSerializer.Serialize<T>(input, Options);
+ }
+
+ public override string ToString()
+ {
+ return "MsgPack_v2_str_lz4";
+ }
}
- public override object Serialize<T>(T input)
+ public class MsgPack_v2_opt : SerializerBase
{
- return newmsgpack::MessagePack.MessagePackSerializer.Serialize<T>(input, Options);
- }
-}
+ private static readonly newmsgpack::MessagePack.MessagePackSerializerOptions Options =
+ newmsgpack::MessagePack.MessagePackSerializerOptions.Standard.WithResolver(OptimizedResolver.Instance);
-public class OptimizedResolver : newmsgpack::MessagePack.IFormatterResolver
-{
- public static readonly newmsgpack::MessagePack.IFormatterResolver Instance = new OptimizedResolver();
+ public override T Deserialize<T>(object input)
+ {
+ return newmsgpack::MessagePack.MessagePackSerializer.Deserialize<T>((byte[])input, Options);
+ }
- // configure your custom resolvers.
- private static readonly newmsgpack::MessagePack.IFormatterResolver[] Resolvers = new newmsgpack::MessagePack.IFormatterResolver[]
- {
- newmsgpack::MessagePack.Resolvers.NativeGuidResolver.Instance,
- newmsgpack::MessagePack.Resolvers.NativeDecimalResolver.Instance,
- newmsgpack::MessagePack.Resolvers.NativeDateTimeResolver.Instance,
- newmsgpack::MessagePack.Resolvers.StandardResolver.Instance,
- };
+ public override object Serialize<T>(T input)
+ {
+ return newmsgpack::MessagePack.MessagePackSerializer.Serialize<T>(input, Options);
+ }
- private OptimizedResolver()
- {
+ public override string ToString()
+ {
+ return "MsgPack_v2_opt";
+ }
}
- public newmsgpack::MessagePack.Formatters.IMessagePackFormatter<T> GetFormatter<T>()
+ public class OptimizedResolver : newmsgpack::MessagePack.IFormatterResolver
{
- return Cache<T>.Formatter;
- }
+ public static readonly newmsgpack::MessagePack.IFormatterResolver Instance = new OptimizedResolver();
- private static class Cache<T>
- {
-#pragma warning disable SA1401 // Fields should be private
- public static newmsgpack::MessagePack.Formatters.IMessagePackFormatter<T> Formatter;
-#pragma warning restore SA1401 // Fields should be private
+ // configure your custom resolvers.
+ private static readonly newmsgpack::MessagePack.IFormatterResolver[] Resolvers = new newmsgpack::MessagePack.IFormatterResolver[]
+ {
+ newmsgpack::MessagePack.Resolvers.NativeGuidResolver.Instance, newmsgpack::MessagePack.Resolvers.NativeDecimalResolver.Instance,
+ newmsgpack::MessagePack.Resolvers.NativeDateTimeResolver.Instance, newmsgpack::MessagePack.Resolvers.StandardResolver.Instance,
+ };
- static Cache()
+ private OptimizedResolver()
{
- foreach (var resolver in Resolvers)
+ }
+
+ public newmsgpack::MessagePack.Formatters.IMessagePackFormatter<T> GetFormatter<T>()
+ {
+ return Cache<T>.Formatter;
+ }
+
+ private static class Cache<T>
+ {
+ #pragma warning disable SA1401 // Fields should be private
+ public static newmsgpack::MessagePack.Formatters.IMessagePackFormatter<T> Formatter;
+ #pragma warning restore SA1401 // Fields should be private
+
+ static Cache()
{
- var f = resolver.GetFormatter<T>();
- if (f != null)
+ foreach (var resolver in Resolvers)
{
- Formatter = f;
- return;
+ var f = resolver.GetFormatter<T>();
+ if (f != null)
+ {
+ Formatter = f;
+ return;
+ }
}
}
}
diff --git a/benchmark/SerializerBenchmark/Serializers/MsgPackCliSerializer.cs b/benchmark/SerializerBenchmark/Serializers/MsgPackCliSerializer.cs
index a03127ae..f3238d55 100644
--- a/benchmark/SerializerBenchmark/Serializers/MsgPackCliSerializer.cs
+++ b/benchmark/SerializerBenchmark/Serializers/MsgPackCliSerializer.cs
@@ -1,19 +1,23 @@
// Copyright (c) All contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using Benchmark.Serializers;
-
-#pragma warning disable SA1649 // File name should match first type name
-
-public class MsgPackCli : SerializerBase
+namespace Benchmark.Serializers
{
- public override T Deserialize<T>(object input)
+ public class MsgPackCliSerializer : SerializerBase
{
- return MsgPack.Serialization.MessagePackSerializer.Get<T>().UnpackSingleObject((byte[])input);
- }
+ public override T Deserialize<T>(object input)
+ {
+ return MsgPack.Serialization.MessagePackSerializer.Get<T>().UnpackSingleObject((byte[])input);
+ }
- public override object Serialize<T>(T input)
- {
- return MsgPack.Serialization.MessagePackSerializer.Get<T>().PackSingleObject(input);
+ public override object Serialize<T>(T input)
+ {
+ return MsgPack.Serialization.MessagePackSerializer.Get<T>().PackSingleObject(input);
+ }
+
+ public override string ToString()
+ {
+ return "MsgPackCli";
+ }
}
}
diff --git a/benchmark/SerializerBenchmark/Serializers/OdinSerializer.cs b/benchmark/SerializerBenchmark/Serializers/OdinSerializer.cs
new file mode 100644
index 00000000..b35de1af
--- /dev/null
+++ b/benchmark/SerializerBenchmark/Serializers/OdinSerializer.cs
@@ -0,0 +1,29 @@
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using Benchmark.Serializers;
+using OdinSerializer;
+using OdinSerializer.Utilities;
+
+#pragma warning disable SA1649 // File name should match first type name
+
+public class OdinSerializer_ : SerializerBase
+{
+ public override object Serialize<T>(T input)
+ {
+ using (var ctx = Cache<SerializationContext>.Claim())
+ {
+ ctx.Value.Config.SerializationPolicy = SerializationPolicies.Everything;
+ return SerializationUtility.SerializeValue(input, DataFormat.Binary, ctx.Value);
+ }
+ }
+
+ public override T Deserialize<T>(object input)
+ {
+ using (var ctx = Cache<DeserializationContext>.Claim())
+ {
+ ctx.Value.Config.SerializationPolicy = SerializationPolicies.Everything;
+ return SerializationUtility.DeserializeValue<T>((byte[])input, DataFormat.Binary, ctx.Value);
+ }
+ }
+}
diff --git a/benchmark/SerializerBenchmark/Serializers/ProtobufNetSerializer.cs b/benchmark/SerializerBenchmark/Serializers/ProtobufNetSerializer.cs
new file mode 100644
index 00000000..7b44b5a7
--- /dev/null
+++ b/benchmark/SerializerBenchmark/Serializers/ProtobufNetSerializer.cs
@@ -0,0 +1,33 @@
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System.IO;
+using ProtoBuf;
+
+namespace Benchmark.Serializers
+{
+ public class ProtobufNetSerializer : SerializerBase
+ {
+ public override T Deserialize<T>(object input)
+ {
+ using (var ms = new MemoryStream((byte[])input))
+ {
+ return Serializer.Deserialize<T>(ms);
+ }
+ }
+
+ public override object Serialize<T>(T input)
+ {
+ using (var ms = new MemoryStream())
+ {
+ Serializer.Serialize(ms, input);
+ return ms.ToArray();
+ }
+ }
+
+ public override string ToString()
+ {
+ return "ProtobufNet";
+ }
+ }
+}
diff --git a/benchmark/SerializerBenchmark/Serializers/ProtobufSerializer.cs b/benchmark/SerializerBenchmark/Serializers/ProtobufSerializer.cs
deleted file mode 100644
index d0394065..00000000
--- a/benchmark/SerializerBenchmark/Serializers/ProtobufSerializer.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) All contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System.IO;
-using Benchmark.Serializers;
-using ProtoBuf;
-
-public class
-#pragma warning disable SA1649 // File name should match first type name
-
-ProtobufNet : SerializerBase
-{
- public override T Deserialize<T>(object input)
- {
- using (var ms = new MemoryStream((byte[])input))
- {
- return Serializer.Deserialize<T>(ms);
- }
- }
-
- public override object Serialize<T>(T input)
- {
- using (var ms = new MemoryStream())
- {
- Serializer.Serialize(ms, input);
- return ms.ToArray();
- }
- }
-}
diff --git a/benchmark/SerializerBenchmark/Serializers/SpanJsonSerializer.cs b/benchmark/SerializerBenchmark/Serializers/SpanJsonSerializer.cs
index a3a2f44d..33ccbd99 100644
--- a/benchmark/SerializerBenchmark/Serializers/SpanJsonSerializer.cs
+++ b/benchmark/SerializerBenchmark/Serializers/SpanJsonSerializer.cs
@@ -1,19 +1,23 @@
// Copyright (c) All contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using Benchmark.Serializers;
-
-#pragma warning disable SA1649 // File name should match first type name
-
-public class SpanJson_ : SerializerBase
+namespace Benchmark.Serializers
{
- public override object Serialize<T>(T input)
+ public class SpanJsonSerializer : SerializerBase
{
- return SpanJson.JsonSerializer.Generic.Utf8.Serialize(input);
- }
+ public override object Serialize<T>(T input)
+ {
+ return SpanJson.JsonSerializer.Generic.Utf8.Serialize(input);
+ }
- public override T Deserialize<T>(object input)
- {
- return SpanJson.JsonSerializer.Generic.Utf8.Deserialize<T>((byte[])input);
+ public override T Deserialize<T>(object input)
+ {
+ return SpanJson.JsonSerializer.Generic.Utf8.Deserialize<T>((byte[])input);
+ }
+
+ public override string ToString()
+ {
+ return "SpanJson";
+ }
}
}
diff --git a/benchmark/SerializerBenchmark/Serializers/SystemTextJsonSerializer.cs b/benchmark/SerializerBenchmark/Serializers/SystemTextJsonSerializer.cs
index f6358d15..baf143f9 100644
--- a/benchmark/SerializerBenchmark/Serializers/SystemTextJsonSerializer.cs
+++ b/benchmark/SerializerBenchmark/Serializers/SystemTextJsonSerializer.cs
@@ -1,20 +1,24 @@
// Copyright (c) All contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using Benchmark.Serializers;
-
-#pragma warning disable SA1649 // File name should match first type name
-
-public class SystemTextJson : SerializerBase
+namespace Benchmark.Serializers
{
- public override object Serialize<T>(T input)
+ public class SystemTextJsonSerializer : SerializerBase
{
- return System.Text.Json.JsonSerializer.SerializeToUtf8Bytes(input);
- }
+ public override object Serialize<T>(T input)
+ {
+ return System.Text.Json.JsonSerializer.SerializeToUtf8Bytes(input);
+ }
- public override T Deserialize<T>(object input)
- {
- var span = (byte[])input;
- return System.Text.Json.JsonSerializer.Deserialize<T>(span);
+ public override T Deserialize<T>(object input)
+ {
+ var span = (byte[])input;
+ return System.Text.Json.JsonSerializer.Deserialize<T>(span);
+ }
+
+ public override string ToString()
+ {
+ return "SystemTextJson";
+ }
}
}
diff --git a/benchmark/SerializerBenchmark/Serializers/Utf8JsonSerializer.cs b/benchmark/SerializerBenchmark/Serializers/Utf8JsonSerializer.cs
index f52b0d9b..fec69a81 100644
--- a/benchmark/SerializerBenchmark/Serializers/Utf8JsonSerializer.cs
+++ b/benchmark/SerializerBenchmark/Serializers/Utf8JsonSerializer.cs
@@ -1,19 +1,23 @@
// Copyright (c) All contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using Benchmark.Serializers;
-
-#pragma warning disable SA1649 // File name should match first type name
-
-public class Utf8Json_ : SerializerBase
+namespace Benchmark.Serializers
{
- public override object Serialize<T>(T input)
+ public class Utf8JsonSerializer : SerializerBase
{
- return Utf8Json.JsonSerializer.Serialize(input);
- }
+ public override object Serialize<T>(T input)
+ {
+ return Utf8Json.JsonSerializer.Serialize(input);
+ }
- public override T Deserialize<T>(object input)
- {
- return Utf8Json.JsonSerializer.Deserialize<T>((byte[])input);
+ public override T Deserialize<T>(object input)
+ {
+ return Utf8Json.JsonSerializer.Deserialize<T>((byte[])input);
+ }
+
+ public override string ToString()
+ {
+ return "UTF8Json";
+ }
}
}
diff --git a/doc/consume_ci.md b/doc/consume_ci.md
new file mode 100644
index 00000000..763f6f49
--- /dev/null
+++ b/doc/consume_ci.md
@@ -0,0 +1,17 @@
+# Testing fixes prior to release
+
+To help us test changes prior to their release to nuget.org, you can of course build from source.
+An easier approach may be to consume the built nuget packages from our CI/PR feed.
+
+Add this feed to your nuget.config file:
+
+```xml
+<add key="MessagePack-CI" value="https://pkgs.dev.azure.com/ils0086/MessagePack-CSharp/_packaging/MessagePack-CI/nuget/v3/index.json" />
+```
+
+Then you can add or update your package reference to some version recently built in our CI or PR build.
+PR builds always include a `-gCOMMITID` version suffix.
+CI builds lack this, but may include a standard pre-release identifier such as `-alpha`.
+
+If the change you seek is already merged, look for the latest version without the `-gCOMMITID` suffix.
+If the change you seek is in an open PR, navigate to the PR build to find the version of the built package (it will be the build number).
diff --git a/global.json b/global.json
index 11833de0..954a92e7 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,6 @@
{
"sdk": {
- "version": "3.1.301",
+ "version": "6.0.300",
"rollForward": "patch",
"allowPrerelease": false
}
diff --git a/init.cmd b/init.cmd
index 970285c2..667efabb 100644
--- a/init.cmd
+++ b/init.cmd
@@ -1,4 +1,20 @@
@echo off
SETLOCAL
set PS1UnderCmd=1
+
+:: Get the datetime in a format that can go in a filename.
+set _my_datetime=%date%_%time%
+set _my_datetime=%_my_datetime: =_%
+set _my_datetime=%_my_datetime::=%
+set _my_datetime=%_my_datetime:/=_%
+set _my_datetime=%_my_datetime:.=_%
+set CmdEnvScriptPath=%temp%\envvarscript_%_my_datetime%.cmd
+
powershell.exe -NoProfile -NoLogo -ExecutionPolicy bypass -Command "try { & '%~dpn0.ps1' %*; exit $LASTEXITCODE } catch { write-host $_; exit 1 }"
+
+:: Set environment variables in the parent cmd.exe process.
+IF EXIST "%CmdEnvScriptPath%" (
+ ENDLOCAL
+ CALL "%CmdEnvScriptPath%"
+ DEL "%CmdEnvScriptPath%"
+)
diff --git a/init.ps1 b/init.ps1
index 72d68b5f..e5aad5bf 100755
--- a/init.ps1
+++ b/init.ps1
@@ -2,28 +2,31 @@
<#
.SYNOPSIS
-Installs dependencies required to build and test the projects in this repository.
+ Installs dependencies required to build and test the projects in this repository.
.DESCRIPTION
-This MAY not require elevation, as the SDK and runtimes are installed to a per-user location,
-unless the `-InstallLocality` switch is specified directing to a per-repo or per-machine location.
-See detailed help on that switch for more information.
+ This MAY not require elevation, as the SDK and runtimes are installed to a per-user location,
+ unless the `-InstallLocality` switch is specified directing to a per-repo or per-machine location.
+ See detailed help on that switch for more information.
+
+ The CmdEnvScriptPath environment variable may be optionally set to a path to a cmd shell script to be created (or appended to if it already exists) that will set the environment variables in cmd.exe that are set within the PowerShell environment.
+ This is used by init.cmd in order to reapply any new environment variables to the parent cmd.exe process that were set in the powershell child process.
.PARAMETER InstallLocality
-A value indicating whether dependencies should be installed locally to the repo or at a per-user location.
-Per-user allows sharing the installed dependencies across repositories and allows use of a shared expanded package cache.
-Visual Studio will only notice and use these SDKs/runtimes if VS is launched from the environment that runs this script.
-Per-repo allows for high isolation, allowing for a more precise recreation of the environment within an Azure Pipelines build.
-When using 'repo', environment variables are set to cause the locally installed dotnet SDK to be used.
-Per-repo can lead to file locking issues when dotnet.exe is left running as a build server and can be mitigated by running `dotnet build-server shutdown`.
-Per-machine requires elevation and will download and install all SDKs and runtimes to machine-wide locations so all applications can find it.
+ A value indicating whether dependencies should be installed locally to the repo or at a per-user location.
+ Per-user allows sharing the installed dependencies across repositories and allows use of a shared expanded package cache.
+ Visual Studio will only notice and use these SDKs/runtimes if VS is launched from the environment that runs this script.
+ Per-repo allows for high isolation, allowing for a more precise recreation of the environment within an Azure Pipelines build.
+ When using 'repo', environment variables are set to cause the locally installed dotnet SDK to be used.
+ Per-repo can lead to file locking issues when dotnet.exe is left running as a build server and can be mitigated by running `dotnet build-server shutdown`.
+ Per-machine requires elevation and will download and install all SDKs and runtimes to machine-wide locations so all applications can find it.
.PARAMETER NoPrerequisites
-Skips the installation of prerequisite software (e.g. SDKs, tools).
+ Skips the installation of prerequisite software (e.g. SDKs, tools).
.PARAMETER UpgradePrerequisites
-Takes time to install prerequisites even if they are already present in case they need to be upgraded.
-No effect if -NoPrerequisites is specified.
+ Takes time to install prerequisites even if they are already present in case they need to be upgraded.
+ No effect if -NoPrerequisites is specified.
.PARAMETER NoRestore
-Skips the package restore step.
+ Skips the package restore step.
.PARAMETER AccessToken
-An optional access token for authenticating to Azure Artifacts authenticated feeds.
+ An optional access token for authenticating to Azure Artifacts authenticated feeds.
#>
[CmdletBinding(SupportsShouldProcess=$true)]
Param (
@@ -71,7 +74,7 @@ try {
}
}
- & "$PSScriptRoot\azure-pipelines\Set-EnvVars.ps1" -Variables $EnvVars | Out-Null
+ & "$PSScriptRoot/tools/Set-EnvVars.ps1" -Variables $EnvVars | Out-Null
}
catch {
Write-Error $error[0]
diff --git a/prepare_release.ps1 b/prepare_release.ps1
new file mode 100644
index 00000000..d5dc21d6
--- /dev/null
+++ b/prepare_release.ps1
@@ -0,0 +1,14 @@
+# Calculate the NPM package version, assuming the version change is in a new commit.
+git commit --allow-empty -m "Dummy commit" -q
+$NpmPackageVersion = (nbgv get-version -f json | ConvertFrom-Json).NpmPackageVersion
+git reset --mixed HEAD~ -q
+
+# Stamp the version into the package.json file and commit.
+pushd $PSScriptRoot/src/MessagePack.UnityClient/Assets/Scripts/MessagePack
+npm version $NpmPackageVersion --no-git-tag-version --allow-same-version
+git add package.json
+popd
+git commit -m "Stamp unity package version as $NpmPackageVersion"
+
+# Tag the release
+nbgv tag
diff --git a/sandbox/DynamicCodeDumper/DynamicCodeDumper.csproj b/sandbox/DynamicCodeDumper/DynamicCodeDumper.csproj
index 4ef220a0..0daf9da4 100644
--- a/sandbox/DynamicCodeDumper/DynamicCodeDumper.csproj
+++ b/sandbox/DynamicCodeDumper/DynamicCodeDumper.csproj
@@ -132,6 +132,9 @@
<Compile Include="..\..\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\Resolvers\DynamicUnionResolver.cs">
<Link>Code\DynamicUnionResolver.cs</Link>
</Compile>
+ <Compile Include="..\..\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\Resolvers\ResolverUtilities.cs">
+ <Link>Code\ResolverUtilities.cs</Link>
+ </Compile>
<Compile Include="..\..\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\StringEncoding.cs">
<Link>Code\StringEncoding.cs</Link>
</Compile>
@@ -140,8 +143,7 @@
</Compile>
</ItemGroup>
<ItemGroup>
- <PackageReference Include="Nerdbank.Streams" Version="2.4.48" />
- <PackageReference Include="System.Memory" Version="4.5.3" />
- <PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.5.2" />
+ <PackageReference Include="Nerdbank.Streams" Version="2.8.57" />
+ <PackageReference Include="Microsoft.NET.StringTools" Version="1.0.0" />
</ItemGroup>
</Project>
diff --git a/sandbox/DynamicCodeDumper/Program.cs b/sandbox/DynamicCodeDumper/Program.cs
index 14f6199e..0d74db48 100644
--- a/sandbox/DynamicCodeDumper/Program.cs
+++ b/sandbox/DynamicCodeDumper/Program.cs
@@ -44,6 +44,7 @@ namespace DynamicCodeDumper
////DynamicObjectResolver.Instance.GetFormatter<StringKeySerializerTarget>();
////DynamicObjectResolver.Instance.GetFormatter<LongestString>();
IMessagePackFormatter<MyClass> f = DynamicObjectResolverAllowPrivate.Instance.GetFormatter<MyClass>();
+ ////IMessagePackFormatter<MessagePackFormatterFieldUser> f = DynamicObjectResolver.Instance.GetFormatter<MessagePackFormatterFieldUser>();
////DynamicObjectResolver.Instance.GetFormatter<StringKeySerializerTargetBinary>();
////DynamicObjectResolver.Instance.GetFormatter<Callback1>();
////DynamicObjectResolver.Instance.GetFormatter<Callback1_2>();
diff --git a/sandbox/MessagePack.Internal/MessagePack.Internal.csproj b/sandbox/MessagePack.Internal/MessagePack.Internal.csproj
index d7e5caaa..28352480 100644
--- a/sandbox/MessagePack.Internal/MessagePack.Internal.csproj
+++ b/sandbox/MessagePack.Internal/MessagePack.Internal.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>netcoreapp2.2</TargetFrameworks>
+ <TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<DefineConstants>$(DefineConstants);SPAN_BUILTIN;MESSAGEPACK_INTERNAL</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
diff --git a/sandbox/PerfBenchmarkDotNet/DeserializeBenchmark.cs b/sandbox/PerfBenchmarkDotNet/DeserializeBenchmark.cs
index 3c0ef2f2..68af163a 100644
--- a/sandbox/PerfBenchmarkDotNet/DeserializeBenchmark.cs
+++ b/sandbox/PerfBenchmarkDotNet/DeserializeBenchmark.cs
@@ -1,4 +1,4 @@
-// Copyright (c) All contributors. All rights reserved.
+// Copyright (c) All contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
extern alias newmsgpack;
@@ -61,6 +61,12 @@ namespace PerfBenchmarkDotNet
}
[Benchmark]
+ public IntKeySerializerTarget IntKey_NonGeneric()
+ {
+ return (IntKeySerializerTarget)newmsgpack.MessagePack.MessagePackSerializer.Deserialize(typeof(IntKeySerializerTarget), intObj);
+ }
+
+ [Benchmark]
public StringKeySerializerTarget StringKey()
{
return newmsgpack.MessagePack.MessagePackSerializer.Deserialize<StringKeySerializerTarget>(stringKeyObj);
diff --git a/sandbox/PerfBenchmarkDotNet/MessagePackWriterBenchmark.cs b/sandbox/PerfBenchmarkDotNet/MessagePackWriterBenchmark.cs
index 0cff6334..64e7c89a 100644
--- a/sandbox/PerfBenchmarkDotNet/MessagePackWriterBenchmark.cs
+++ b/sandbox/PerfBenchmarkDotNet/MessagePackWriterBenchmark.cs
@@ -4,6 +4,7 @@
extern alias newmsgpack;
extern alias oldmsgpack;
+using System;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Configs;
using Nerdbank.Streams;
@@ -12,7 +13,7 @@ namespace PerfBenchmarkDotNet
{
[GroupBenchmarksBy(BenchmarkLogicalGroupRule.ByCategory)]
[CategoriesColumn]
- public class MessagePackWriterBenchmark
+ public class MessagePackWriterBenchmark : IDisposable
{
private const int RepsOverArray = 300 * 1024;
private readonly Sequence<byte> sequence = new Sequence<byte>();
@@ -148,5 +149,19 @@ namespace PerfBenchmarkDotNet
offset = 0;
}
}
+
+ public void Dispose()
+ {
+ this.Dispose(true);
+ GC.SuppressFinalize(this);
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+ if (disposing)
+ {
+ this.sequence.Dispose();
+ }
+ }
}
}
diff --git a/sandbox/PerfBenchmarkDotNet/PerfBenchmarkDotNet.csproj b/sandbox/PerfBenchmarkDotNet/PerfBenchmarkDotNet.csproj
index 53bb5949..6804253d 100644
--- a/sandbox/PerfBenchmarkDotNet/PerfBenchmarkDotNet.csproj
+++ b/sandbox/PerfBenchmarkDotNet/PerfBenchmarkDotNet.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
- <TargetFrameworks>net472;netcoreapp2.2</TargetFrameworks>
+ <TargetFrameworks>net472;net6.0</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
@@ -19,7 +19,7 @@
<PackageReference Include="Jil" version="2.15.4" />
<PackageReference Include="MessagePack" version="1.4.3" />
<PackageReference Include="MsgPack.Cli" version="0.9.0-rc1" />
- <PackageReference Include="Nerdbank.Streams" Version="2.4.48" />
+ <PackageReference Include="Nerdbank.Streams" Version="2.8.57" />
<PackageReference Include="Newtonsoft.Json" version="10.0.3" />
<PackageReference Include="protobuf-net" version="2.3.2" />
<PackageReference Include="RandomFixtureKit" Version="1.0.0" />
diff --git a/sandbox/PerfBenchmarkDotNet/SerializeBenchmark.cs b/sandbox/PerfBenchmarkDotNet/SerializeBenchmark.cs
index 0ed114b0..fc9a3a06 100644
--- a/sandbox/PerfBenchmarkDotNet/SerializeBenchmark.cs
+++ b/sandbox/PerfBenchmarkDotNet/SerializeBenchmark.cs
@@ -1,4 +1,4 @@
-// Copyright (c) All contributors. All rights reserved.
+// Copyright (c) All contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
extern alias newmsgpack;
@@ -36,6 +36,12 @@ namespace PerfBenchmarkDotNet
}
[Benchmark]
+ public byte[] IntKey_NonGeneric()
+ {
+ return newmsgpack.MessagePack.MessagePackSerializer.Serialize(typeof(IntKeySerializerTarget), intData);
+ }
+
+ [Benchmark]
public byte[] StringKey()
{
return newmsgpack.MessagePack.MessagePackSerializer.Serialize<StringKeySerializerTarget>(stringData);
diff --git a/sandbox/PerfNetFramework/PerfNetFramework.csproj b/sandbox/PerfNetFramework/PerfNetFramework.csproj
index a0416f99..57cbfd36 100644
--- a/sandbox/PerfNetFramework/PerfNetFramework.csproj
+++ b/sandbox/PerfNetFramework/PerfNetFramework.csproj
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
- <TargetFrameworks>net472;netcoreapp2.2</TargetFrameworks>
+ <TargetFrameworks>net472;net6.0</TargetFrameworks>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MsgPack.Cli" version="0.9.0-beta2" />
- <PackageReference Include="Nerdbank.Streams" Version="2.4.48" />
+ <PackageReference Include="Nerdbank.Streams" Version="2.8.57" />
<PackageReference Include="Newtonsoft.Json" version="10.0.3" />
<PackageReference Include="protobuf-net" version="2.1.0" />
<PackageReference Include="ZeroFormatter" version="1.6.4" />
diff --git a/sandbox/Sandbox/Generated.cs b/sandbox/Sandbox/Generated.cs
index 51a08d60..bc3bcd7a 100644
--- a/sandbox/Sandbox/Generated.cs
+++ b/sandbox/Sandbox/Generated.cs
@@ -6,15 +6,13 @@
#pragma warning disable 612
#pragma warning disable 414
#pragma warning disable 168
+#pragma warning disable CS1591 // document public APIs
-#pragma warning disable SA1200 // Using directives should be placed correctly
#pragma warning disable SA1312 // Variable names should begin with lower-case letter
#pragma warning disable SA1649 // File name should match first type name
namespace MessagePack.Resolvers
{
- using System;
-
public class GeneratedResolver : global::MessagePack.IFormatterResolver
{
public static readonly global::MessagePack.IFormatterResolver Instance = new GeneratedResolver();
@@ -45,11 +43,11 @@ namespace MessagePack.Resolvers
internal static class GeneratedResolverGetFormatterHelper
{
- private static readonly global::System.Collections.Generic.Dictionary<Type, int> lookup;
+ private static readonly global::System.Collections.Generic.Dictionary<global::System.Type, int> lookup;
static GeneratedResolverGetFormatterHelper()
{
- lookup = new global::System.Collections.Generic.Dictionary<Type, int>(65)
+ lookup = new global::System.Collections.Generic.Dictionary<global::System.Type, int>(72)
{
{ typeof(global::GlobalMyEnum[,]), 0 },
{ typeof(global::GlobalMyEnum[]), 1 },
@@ -72,54 +70,61 @@ namespace MessagePack.Resolvers
{ typeof(global::ComplexModel), 18 },
{ typeof(global::GlobalMan), 19 },
{ typeof(global::Message), 20 },
- { typeof(global::PerfBenchmarkDotNet.StringKeySerializerTarget), 21 },
- { typeof(global::QuestMessageBody), 22 },
- { typeof(global::SharedData.ArrayOptimizeClass), 23 },
- { typeof(global::SharedData.BarClass), 24 },
- { typeof(global::SharedData.Callback1), 25 },
- { typeof(global::SharedData.Callback1_2), 26 },
- { typeof(global::SharedData.Callback2), 27 },
- { typeof(global::SharedData.Callback2_2), 28 },
- { typeof(global::SharedData.Empty1), 29 },
- { typeof(global::SharedData.Empty2), 30 },
- { typeof(global::SharedData.EmptyClass), 31 },
- { typeof(global::SharedData.EmptyStruct), 32 },
- { typeof(global::SharedData.FirstSimpleData), 33 },
- { typeof(global::SharedData.FooClass), 34 },
- { typeof(global::SharedData.HolderV0), 35 },
- { typeof(global::SharedData.HolderV1), 36 },
- { typeof(global::SharedData.HolderV2), 37 },
- { typeof(global::SharedData.MyClass), 38 },
- { typeof(global::SharedData.MySubUnion1), 39 },
- { typeof(global::SharedData.MySubUnion2), 40 },
- { typeof(global::SharedData.MySubUnion3), 41 },
- { typeof(global::SharedData.MySubUnion4), 42 },
- { typeof(global::SharedData.NestParent.NestContract), 43 },
- { typeof(global::SharedData.NonEmpty1), 44 },
- { typeof(global::SharedData.NonEmpty2), 45 },
- { typeof(global::SharedData.SimpleIntKeyData), 46 },
- { typeof(global::SharedData.SimpleStringKeyData), 47 },
- { typeof(global::SharedData.SimpleStructIntKeyData), 48 },
- { typeof(global::SharedData.SimpleStructStringKeyData), 49 },
- { typeof(global::SharedData.SubUnionType1), 50 },
- { typeof(global::SharedData.SubUnionType2), 51 },
- { typeof(global::SharedData.UnVersionBlockTest), 52 },
- { typeof(global::SharedData.Vector2), 53 },
- { typeof(global::SharedData.Vector3Like), 54 },
- { typeof(global::SharedData.VectorLike2), 55 },
- { typeof(global::SharedData.Version0), 56 },
- { typeof(global::SharedData.Version1), 57 },
- { typeof(global::SharedData.Version2), 58 },
- { typeof(global::SharedData.VersionBlockTest), 59 },
- { typeof(global::SharedData.VersioningUnion), 60 },
- { typeof(global::SharedData.WithIndexer), 61 },
- { typeof(global::SimpleModel), 62 },
- { typeof(global::StampMessageBody), 63 },
- { typeof(global::TextMessageBody), 64 },
+ { typeof(global::MessagePackFormatterFieldUser), 21 },
+ { typeof(global::PerfBenchmarkDotNet.StringKeySerializerTarget), 22 },
+ { typeof(global::QuestMessageBody), 23 },
+ { typeof(global::SharedData.ArrayOptimizeClass), 24 },
+ { typeof(global::SharedData.BarClass), 25 },
+ { typeof(global::SharedData.Callback1), 26 },
+ { typeof(global::SharedData.Callback1_2), 27 },
+ { typeof(global::SharedData.Callback2), 28 },
+ { typeof(global::SharedData.Callback2_2), 29 },
+ { typeof(global::SharedData.DefaultValueIntKeyClassWithExplicitConstructor), 30 },
+ { typeof(global::SharedData.DefaultValueIntKeyClassWithoutExplicitConstructor), 31 },
+ { typeof(global::SharedData.DefaultValueIntKeyStructWithExplicitConstructor), 32 },
+ { typeof(global::SharedData.DefaultValueStringKeyClassWithExplicitConstructor), 33 },
+ { typeof(global::SharedData.DefaultValueStringKeyClassWithoutExplicitConstructor), 34 },
+ { typeof(global::SharedData.DefaultValueStringKeyStructWithExplicitConstructor), 35 },
+ { typeof(global::SharedData.Empty1), 36 },
+ { typeof(global::SharedData.Empty2), 37 },
+ { typeof(global::SharedData.EmptyClass), 38 },
+ { typeof(global::SharedData.EmptyStruct), 39 },
+ { typeof(global::SharedData.FirstSimpleData), 40 },
+ { typeof(global::SharedData.FooClass), 41 },
+ { typeof(global::SharedData.HolderV0), 42 },
+ { typeof(global::SharedData.HolderV1), 43 },
+ { typeof(global::SharedData.HolderV2), 44 },
+ { typeof(global::SharedData.MyClass), 45 },
+ { typeof(global::SharedData.MySubUnion1), 46 },
+ { typeof(global::SharedData.MySubUnion2), 47 },
+ { typeof(global::SharedData.MySubUnion3), 48 },
+ { typeof(global::SharedData.MySubUnion4), 49 },
+ { typeof(global::SharedData.NestParent.NestContract), 50 },
+ { typeof(global::SharedData.NonEmpty1), 51 },
+ { typeof(global::SharedData.NonEmpty2), 52 },
+ { typeof(global::SharedData.SimpleIntKeyData), 53 },
+ { typeof(global::SharedData.SimpleStringKeyData), 54 },
+ { typeof(global::SharedData.SimpleStructIntKeyData), 55 },
+ { typeof(global::SharedData.SimpleStructStringKeyData), 56 },
+ { typeof(global::SharedData.SubUnionType1), 57 },
+ { typeof(global::SharedData.SubUnionType2), 58 },
+ { typeof(global::SharedData.UnVersionBlockTest), 59 },
+ { typeof(global::SharedData.Vector2), 60 },
+ { typeof(global::SharedData.Vector3Like), 61 },
+ { typeof(global::SharedData.VectorLike2), 62 },
+ { typeof(global::SharedData.Version0), 63 },
+ { typeof(global::SharedData.Version1), 64 },
+ { typeof(global::SharedData.Version2), 65 },
+ { typeof(global::SharedData.VersionBlockTest), 66 },
+ { typeof(global::SharedData.VersioningUnion), 67 },
+ { typeof(global::SharedData.WithIndexer), 68 },
+ { typeof(global::SimpleModel), 69 },
+ { typeof(global::StampMessageBody), 70 },
+ { typeof(global::TextMessageBody), 71 },
};
}
- internal static object GetFormatter(Type t)
+ internal static object GetFormatter(global::System.Type t)
{
int key;
if (!lookup.TryGetValue(t, out key))
@@ -150,50 +155,57 @@ namespace MessagePack.Resolvers
case 18: return new MessagePack.Formatters.ComplexModelFormatter();
case 19: return new MessagePack.Formatters.GlobalManFormatter();
case 20: return new MessagePack.Formatters.MessageFormatter();
- case 21: return new MessagePack.Formatters.PerfBenchmarkDotNet.StringKeySerializerTargetFormatter();
- case 22: return new MessagePack.Formatters.QuestMessageBodyFormatter();
- case 23: return new MessagePack.Formatters.SharedData.ArrayOptimizeClassFormatter();
- case 24: return new MessagePack.Formatters.SharedData.BarClassFormatter();
- case 25: return new MessagePack.Formatters.SharedData.Callback1Formatter();
- case 26: return new MessagePack.Formatters.SharedData.Callback1_2Formatter();
- case 27: return new MessagePack.Formatters.SharedData.Callback2Formatter();
- case 28: return new MessagePack.Formatters.SharedData.Callback2_2Formatter();
- case 29: return new MessagePack.Formatters.SharedData.Empty1Formatter();
- case 30: return new MessagePack.Formatters.SharedData.Empty2Formatter();
- case 31: return new MessagePack.Formatters.SharedData.EmptyClassFormatter();
- case 32: return new MessagePack.Formatters.SharedData.EmptyStructFormatter();
- case 33: return new MessagePack.Formatters.SharedData.FirstSimpleDataFormatter();
- case 34: return new MessagePack.Formatters.SharedData.FooClassFormatter();
- case 35: return new MessagePack.Formatters.SharedData.HolderV0Formatter();
- case 36: return new MessagePack.Formatters.SharedData.HolderV1Formatter();
- case 37: return new MessagePack.Formatters.SharedData.HolderV2Formatter();
- case 38: return new MessagePack.Formatters.SharedData.MyClassFormatter();
- case 39: return new MessagePack.Formatters.SharedData.MySubUnion1Formatter();
- case 40: return new MessagePack.Formatters.SharedData.MySubUnion2Formatter();
- case 41: return new MessagePack.Formatters.SharedData.MySubUnion3Formatter();
- case 42: return new MessagePack.Formatters.SharedData.MySubUnion4Formatter();
- case 43: return new MessagePack.Formatters.SharedData.NestParent_NestContractFormatter();
- case 44: return new MessagePack.Formatters.SharedData.NonEmpty1Formatter();
- case 45: return new MessagePack.Formatters.SharedData.NonEmpty2Formatter();
- case 46: return new MessagePack.Formatters.SharedData.SimpleIntKeyDataFormatter();
- case 47: return new MessagePack.Formatters.SharedData.SimpleStringKeyDataFormatter();
- case 48: return new MessagePack.Formatters.SharedData.SimpleStructIntKeyDataFormatter();
- case 49: return new MessagePack.Formatters.SharedData.SimpleStructStringKeyDataFormatter();
- case 50: return new MessagePack.Formatters.SharedData.SubUnionType1Formatter();
- case 51: return new MessagePack.Formatters.SharedData.SubUnionType2Formatter();
- case 52: return new MessagePack.Formatters.SharedData.UnVersionBlockTestFormatter();
- case 53: return new MessagePack.Formatters.SharedData.Vector2Formatter();
- case 54: return new MessagePack.Formatters.SharedData.Vector3LikeFormatter();
- case 55: return new MessagePack.Formatters.SharedData.VectorLike2Formatter();
- case 56: return new MessagePack.Formatters.SharedData.Version0Formatter();
- case 57: return new MessagePack.Formatters.SharedData.Version1Formatter();
- case 58: return new MessagePack.Formatters.SharedData.Version2Formatter();
- case 59: return new MessagePack.Formatters.SharedData.VersionBlockTestFormatter();
- case 60: return new MessagePack.Formatters.SharedData.VersioningUnionFormatter();
- case 61: return new MessagePack.Formatters.SharedData.WithIndexerFormatter();
- case 62: return new MessagePack.Formatters.SimpleModelFormatter();
- case 63: return new MessagePack.Formatters.StampMessageBodyFormatter();
- case 64: return new MessagePack.Formatters.TextMessageBodyFormatter();
+ case 21: return new MessagePack.Formatters.MessagePackFormatterFieldUserFormatter();
+ case 22: return new MessagePack.Formatters.PerfBenchmarkDotNet.StringKeySerializerTargetFormatter();
+ case 23: return new MessagePack.Formatters.QuestMessageBodyFormatter();
+ case 24: return new MessagePack.Formatters.SharedData.ArrayOptimizeClassFormatter();
+ case 25: return new MessagePack.Formatters.SharedData.BarClassFormatter();
+ case 26: return new MessagePack.Formatters.SharedData.Callback1Formatter();
+ case 27: return new MessagePack.Formatters.SharedData.Callback1_2Formatter();
+ case 28: return new MessagePack.Formatters.SharedData.Callback2Formatter();
+ case 29: return new MessagePack.Formatters.SharedData.Callback2_2Formatter();
+ case 30: return new MessagePack.Formatters.SharedData.DefaultValueIntKeyClassWithExplicitConstructorFormatter();
+ case 31: return new MessagePack.Formatters.SharedData.DefaultValueIntKeyClassWithoutExplicitConstructorFormatter();
+ case 32: return new MessagePack.Formatters.SharedData.DefaultValueIntKeyStructWithExplicitConstructorFormatter();
+ case 33: return new MessagePack.Formatters.SharedData.DefaultValueStringKeyClassWithExplicitConstructorFormatter();
+ case 34: return new MessagePack.Formatters.SharedData.DefaultValueStringKeyClassWithoutExplicitConstructorFormatter();
+ case 35: return new MessagePack.Formatters.SharedData.DefaultValueStringKeyStructWithExplicitConstructorFormatter();
+ case 36: return new MessagePack.Formatters.SharedData.Empty1Formatter();
+ case 37: return new MessagePack.Formatters.SharedData.Empty2Formatter();
+ case 38: return new MessagePack.Formatters.SharedData.EmptyClassFormatter();
+ case 39: return new MessagePack.Formatters.SharedData.EmptyStructFormatter();
+ case 40: return new MessagePack.Formatters.SharedData.FirstSimpleDataFormatter();
+ case 41: return new MessagePack.Formatters.SharedData.FooClassFormatter();
+ case 42: return new MessagePack.Formatters.SharedData.HolderV0Formatter();
+ case 43: return new MessagePack.Formatters.SharedData.HolderV1Formatter();
+ case 44: return new MessagePack.Formatters.SharedData.HolderV2Formatter();
+ case 45: return new MessagePack.Formatters.SharedData.MyClassFormatter();
+ case 46: return new MessagePack.Formatters.SharedData.MySubUnion1Formatter();
+ case 47: return new MessagePack.Formatters.SharedData.MySubUnion2Formatter();
+ case 48: return new MessagePack.Formatters.SharedData.MySubUnion3Formatter();
+ case 49: return new MessagePack.Formatters.SharedData.MySubUnion4Formatter();
+ case 50: return new MessagePack.Formatters.SharedData.NestParent_NestContractFormatter();
+ case 51: return new MessagePack.Formatters.SharedData.NonEmpty1Formatter();
+ case 52: return new MessagePack.Formatters.SharedData.NonEmpty2Formatter();
+ case 53: return new MessagePack.Formatters.SharedData.SimpleIntKeyDataFormatter();
+ case 54: return new MessagePack.Formatters.SharedData.SimpleStringKeyDataFormatter();
+ case 55: return new MessagePack.Formatters.SharedData.SimpleStructIntKeyDataFormatter();
+ case 56: return new MessagePack.Formatters.SharedData.SimpleStructStringKeyDataFormatter();
+ case 57: return new MessagePack.Formatters.SharedData.SubUnionType1Formatter();
+ case 58: return new MessagePack.Formatters.SharedData.SubUnionType2Formatter();
+ case 59: return new MessagePack.Formatters.SharedData.UnVersionBlockTestFormatter();
+ case 60: return new MessagePack.Formatters.SharedData.Vector2Formatter();
+ case 61: return new MessagePack.Formatters.SharedData.Vector3LikeFormatter();
+ case 62: return new MessagePack.Formatters.SharedData.VectorLike2Formatter();
+ case 63: return new MessagePack.Formatters.SharedData.Version0Formatter();
+ case 64: return new MessagePack.Formatters.SharedData.Version1Formatter();
+ case 65: return new MessagePack.Formatters.SharedData.Version2Formatter();
+ case 66: return new MessagePack.Formatters.SharedData.VersionBlockTestFormatter();
+ case 67: return new MessagePack.Formatters.SharedData.VersioningUnionFormatter();
+ case 68: return new MessagePack.Formatters.SharedData.WithIndexerFormatter();
+ case 69: return new MessagePack.Formatters.SimpleModelFormatter();
+ case 70: return new MessagePack.Formatters.StampMessageBodyFormatter();
+ case 71: return new MessagePack.Formatters.TextMessageBodyFormatter();
default: return null;
}
}
@@ -206,7 +218,6 @@ namespace MessagePack.Resolvers
#pragma warning restore 612
#pragma warning restore SA1312 // Variable names should begin with lower-case letter
-#pragma warning restore SA1200 // Using directives should be placed correctly
#pragma warning restore SA1649 // File name should match first type name
@@ -218,25 +229,22 @@ namespace MessagePack.Resolvers
#pragma warning disable 612
#pragma warning disable 414
#pragma warning disable 168
+#pragma warning disable CS1591 // document public APIs
-#pragma warning disable SA1200 // Using directives should be placed correctly
#pragma warning disable SA1403 // File may only contain a single namespace
#pragma warning disable SA1649 // File name should match first type name
namespace MessagePack.Formatters
{
- using System;
- using System.Buffers;
- using MessagePack;
public sealed class GlobalMyEnumFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::GlobalMyEnum>
{
- public void Serialize(ref MessagePackWriter writer, global::GlobalMyEnum value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::GlobalMyEnum value, global::MessagePack.MessagePackSerializerOptions options)
{
- writer.Write((Int32)value);
+ writer.Write((global::System.Int32)value);
}
- public global::GlobalMyEnum Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::GlobalMyEnum Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
return (global::GlobalMyEnum)reader.ReadInt32();
}
@@ -248,7 +256,6 @@ namespace MessagePack.Formatters
#pragma warning restore 618
#pragma warning restore 612
-#pragma warning restore SA1200 // Using directives should be placed correctly
#pragma warning restore SA1403 // File may only contain a single namespace
#pragma warning restore SA1649 // File name should match first type name
@@ -260,25 +267,22 @@ namespace MessagePack.Formatters
#pragma warning disable 612
#pragma warning disable 414
#pragma warning disable 168
+#pragma warning disable CS1591 // document public APIs
-#pragma warning disable SA1200 // Using directives should be placed correctly
#pragma warning disable SA1403 // File may only contain a single namespace
#pragma warning disable SA1649 // File name should match first type name
namespace MessagePack.Formatters.SharedData
{
- using System;
- using System.Buffers;
- using MessagePack;
public sealed class ByteEnumFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.ByteEnum>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.ByteEnum value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.ByteEnum value, global::MessagePack.MessagePackSerializerOptions options)
{
- writer.Write((Byte)value);
+ writer.Write((global::System.Byte)value);
}
- public global::SharedData.ByteEnum Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.ByteEnum Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
return (global::SharedData.ByteEnum)reader.ReadByte();
}
@@ -290,7 +294,6 @@ namespace MessagePack.Formatters.SharedData
#pragma warning restore 618
#pragma warning restore 612
-#pragma warning restore SA1200 // Using directives should be placed correctly
#pragma warning restore SA1403 // File may only contain a single namespace
#pragma warning restore SA1649 // File name should match first type name
@@ -303,32 +306,27 @@ namespace MessagePack.Formatters.SharedData
#pragma warning disable 612
#pragma warning disable 414
#pragma warning disable 168
+#pragma warning disable CS1591 // document public APIs
-#pragma warning disable SA1200 // Using directives should be placed correctly
#pragma warning disable SA1403 // File may only contain a single namespace
#pragma warning disable SA1649 // File name should match first type name
namespace MessagePack.Formatters
{
- using System;
- using System.Buffers;
- using System.Collections.Generic;
- using MessagePack;
-
public sealed class IMessageBodyFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::IMessageBody>
{
- private readonly Dictionary<RuntimeTypeHandle, KeyValuePair<int, int>> typeToKeyAndJumpMap;
- private readonly Dictionary<int, int> keyToJumpMap;
+ private readonly global::System.Collections.Generic.Dictionary<global::System.RuntimeTypeHandle, global::System.Collections.Generic.KeyValuePair<int, int>> typeToKeyAndJumpMap;
+ private readonly global::System.Collections.Generic.Dictionary<int, int> keyToJumpMap;
public IMessageBodyFormatter()
{
- this.typeToKeyAndJumpMap = new Dictionary<RuntimeTypeHandle, KeyValuePair<int, int>>(3, global::MessagePack.Internal.RuntimeTypeHandleEqualityComparer.Default)
+ this.typeToKeyAndJumpMap = new global::System.Collections.Generic.Dictionary<global::System.RuntimeTypeHandle, global::System.Collections.Generic.KeyValuePair<int, int>>(3, global::MessagePack.Internal.RuntimeTypeHandleEqualityComparer.Default)
{
- { typeof(global::TextMessageBody).TypeHandle, new KeyValuePair<int, int>(10, 0) },
- { typeof(global::StampMessageBody).TypeHandle, new KeyValuePair<int, int>(14, 1) },
- { typeof(global::QuestMessageBody).TypeHandle, new KeyValuePair<int, int>(25, 2) },
+ { typeof(global::TextMessageBody).TypeHandle, new global::System.Collections.Generic.KeyValuePair<int, int>(10, 0) },
+ { typeof(global::StampMessageBody).TypeHandle, new global::System.Collections.Generic.KeyValuePair<int, int>(14, 1) },
+ { typeof(global::QuestMessageBody).TypeHandle, new global::System.Collections.Generic.KeyValuePair<int, int>(25, 2) },
};
- this.keyToJumpMap = new Dictionary<int, int>(3)
+ this.keyToJumpMap = new global::System.Collections.Generic.Dictionary<int, int>(3)
{
{ 10, 0 },
{ 14, 1 },
@@ -336,9 +334,9 @@ namespace MessagePack.Formatters
};
}
- public void Serialize(ref MessagePackWriter writer, global::IMessageBody value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::IMessageBody value, global::MessagePack.MessagePackSerializerOptions options)
{
- KeyValuePair<int, int> keyValuePair;
+ global::System.Collections.Generic.KeyValuePair<int, int> keyValuePair;
if (value != null && this.typeToKeyAndJumpMap.TryGetValue(value.GetType().TypeHandle, out keyValuePair))
{
writer.WriteArrayHeader(2);
@@ -364,7 +362,7 @@ namespace MessagePack.Formatters
writer.WriteNil();
}
- public global::IMessageBody Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::IMessageBody Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -373,7 +371,7 @@ namespace MessagePack.Formatters
if (reader.ReadArrayHeader() != 2)
{
- throw new InvalidOperationException("Invalid Union data was detected. Type:global::IMessageBody");
+ throw new global::System.InvalidOperationException("Invalid Union data was detected. Type:global::IMessageBody");
}
options.Security.DepthStep(ref reader);
@@ -414,7 +412,6 @@ namespace MessagePack.Formatters
#pragma warning restore 618
#pragma warning restore 612
-#pragma warning restore SA1200 // Using directives should be placed correctly
#pragma warning restore SA1403 // File may only contain a single namespace
#pragma warning restore SA1649 // File name should match first type name
@@ -426,38 +423,33 @@ namespace MessagePack.Formatters
#pragma warning disable 612
#pragma warning disable 414
#pragma warning disable 168
+#pragma warning disable CS1591 // document public APIs
-#pragma warning disable SA1200 // Using directives should be placed correctly
#pragma warning disable SA1403 // File may only contain a single namespace
#pragma warning disable SA1649 // File name should match first type name
namespace MessagePack.Formatters.SharedData
{
- using System;
- using System.Buffers;
- using System.Collections.Generic;
- using MessagePack;
-
public sealed class IIVersioningUnionFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.IIVersioningUnion>
{
- private readonly Dictionary<RuntimeTypeHandle, KeyValuePair<int, int>> typeToKeyAndJumpMap;
- private readonly Dictionary<int, int> keyToJumpMap;
+ private readonly global::System.Collections.Generic.Dictionary<global::System.RuntimeTypeHandle, global::System.Collections.Generic.KeyValuePair<int, int>> typeToKeyAndJumpMap;
+ private readonly global::System.Collections.Generic.Dictionary<int, int> keyToJumpMap;
public IIVersioningUnionFormatter()
{
- this.typeToKeyAndJumpMap = new Dictionary<RuntimeTypeHandle, KeyValuePair<int, int>>(1, global::MessagePack.Internal.RuntimeTypeHandleEqualityComparer.Default)
+ this.typeToKeyAndJumpMap = new global::System.Collections.Generic.Dictionary<global::System.RuntimeTypeHandle, global::System.Collections.Generic.KeyValuePair<int, int>>(1, global::MessagePack.Internal.RuntimeTypeHandleEqualityComparer.Default)
{
- { typeof(global::SharedData.MySubUnion1).TypeHandle, new KeyValuePair<int, int>(0, 0) },
+ { typeof(global::SharedData.MySubUnion1).TypeHandle, new global::System.Collections.Generic.KeyValuePair<int, int>(0, 0) },
};
- this.keyToJumpMap = new Dictionary<int, int>(1)
+ this.keyToJumpMap = new global::System.Collections.Generic.Dictionary<int, int>(1)
{
{ 0, 0 },
};
}
- public void Serialize(ref MessagePackWriter writer, global::SharedData.IIVersioningUnion value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.IIVersioningUnion value, global::MessagePack.MessagePackSerializerOptions options)
{
- KeyValuePair<int, int> keyValuePair;
+ global::System.Collections.Generic.KeyValuePair<int, int> keyValuePair;
if (value != null && this.typeToKeyAndJumpMap.TryGetValue(value.GetType().TypeHandle, out keyValuePair))
{
writer.WriteArrayHeader(2);
@@ -477,7 +469,7 @@ namespace MessagePack.Formatters.SharedData
writer.WriteNil();
}
- public global::SharedData.IIVersioningUnion Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.IIVersioningUnion Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -486,7 +478,7 @@ namespace MessagePack.Formatters.SharedData
if (reader.ReadArrayHeader() != 2)
{
- throw new InvalidOperationException("Invalid Union data was detected. Type:global::SharedData.IIVersioningUnion");
+ throw new global::System.InvalidOperationException("Invalid Union data was detected. Type:global::SharedData.IIVersioningUnion");
}
options.Security.DepthStep(ref reader);
@@ -515,19 +507,19 @@ namespace MessagePack.Formatters.SharedData
public sealed class IUnionCheckerFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.IUnionChecker>
{
- private readonly Dictionary<RuntimeTypeHandle, KeyValuePair<int, int>> typeToKeyAndJumpMap;
- private readonly Dictionary<int, int> keyToJumpMap;
+ private readonly global::System.Collections.Generic.Dictionary<global::System.RuntimeTypeHandle, global::System.Collections.Generic.KeyValuePair<int, int>> typeToKeyAndJumpMap;
+ private readonly global::System.Collections.Generic.Dictionary<int, int> keyToJumpMap;
public IUnionCheckerFormatter()
{
- this.typeToKeyAndJumpMap = new Dictionary<RuntimeTypeHandle, KeyValuePair<int, int>>(4, global::MessagePack.Internal.RuntimeTypeHandleEqualityComparer.Default)
+ this.typeToKeyAndJumpMap = new global::System.Collections.Generic.Dictionary<global::System.RuntimeTypeHandle, global::System.Collections.Generic.KeyValuePair<int, int>>(4, global::MessagePack.Internal.RuntimeTypeHandleEqualityComparer.Default)
{
- { typeof(global::SharedData.MySubUnion1).TypeHandle, new KeyValuePair<int, int>(0, 0) },
- { typeof(global::SharedData.MySubUnion2).TypeHandle, new KeyValuePair<int, int>(1, 1) },
- { typeof(global::SharedData.MySubUnion3).TypeHandle, new KeyValuePair<int, int>(2, 2) },
- { typeof(global::SharedData.MySubUnion4).TypeHandle, new KeyValuePair<int, int>(3, 3) },
+ { typeof(global::SharedData.MySubUnion1).TypeHandle, new global::System.Collections.Generic.KeyValuePair<int, int>(0, 0) },
+ { typeof(global::SharedData.MySubUnion2).TypeHandle, new global::System.Collections.Generic.KeyValuePair<int, int>(1, 1) },
+ { typeof(global::SharedData.MySubUnion3).TypeHandle, new global::System.Collections.Generic.KeyValuePair<int, int>(2, 2) },
+ { typeof(global::SharedData.MySubUnion4).TypeHandle, new global::System.Collections.Generic.KeyValuePair<int, int>(3, 3) },
};
- this.keyToJumpMap = new Dictionary<int, int>(4)
+ this.keyToJumpMap = new global::System.Collections.Generic.Dictionary<int, int>(4)
{
{ 0, 0 },
{ 1, 1 },
@@ -536,9 +528,9 @@ namespace MessagePack.Formatters.SharedData
};
}
- public void Serialize(ref MessagePackWriter writer, global::SharedData.IUnionChecker value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.IUnionChecker value, global::MessagePack.MessagePackSerializerOptions options)
{
- KeyValuePair<int, int> keyValuePair;
+ global::System.Collections.Generic.KeyValuePair<int, int> keyValuePair;
if (value != null && this.typeToKeyAndJumpMap.TryGetValue(value.GetType().TypeHandle, out keyValuePair))
{
writer.WriteArrayHeader(2);
@@ -567,7 +559,7 @@ namespace MessagePack.Formatters.SharedData
writer.WriteNil();
}
- public global::SharedData.IUnionChecker Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.IUnionChecker Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -576,7 +568,7 @@ namespace MessagePack.Formatters.SharedData
if (reader.ReadArrayHeader() != 2)
{
- throw new InvalidOperationException("Invalid Union data was detected. Type:global::SharedData.IUnionChecker");
+ throw new global::System.InvalidOperationException("Invalid Union data was detected. Type:global::SharedData.IUnionChecker");
}
options.Security.DepthStep(ref reader);
@@ -614,19 +606,19 @@ namespace MessagePack.Formatters.SharedData
public sealed class IUnionChecker2Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.IUnionChecker2>
{
- private readonly Dictionary<RuntimeTypeHandle, KeyValuePair<int, int>> typeToKeyAndJumpMap;
- private readonly Dictionary<int, int> keyToJumpMap;
+ private readonly global::System.Collections.Generic.Dictionary<global::System.RuntimeTypeHandle, global::System.Collections.Generic.KeyValuePair<int, int>> typeToKeyAndJumpMap;
+ private readonly global::System.Collections.Generic.Dictionary<int, int> keyToJumpMap;
public IUnionChecker2Formatter()
{
- this.typeToKeyAndJumpMap = new Dictionary<RuntimeTypeHandle, KeyValuePair<int, int>>(4, global::MessagePack.Internal.RuntimeTypeHandleEqualityComparer.Default)
+ this.typeToKeyAndJumpMap = new global::System.Collections.Generic.Dictionary<global::System.RuntimeTypeHandle, global::System.Collections.Generic.KeyValuePair<int, int>>(4, global::MessagePack.Internal.RuntimeTypeHandleEqualityComparer.Default)
{
- { typeof(global::SharedData.MySubUnion2).TypeHandle, new KeyValuePair<int, int>(31, 0) },
- { typeof(global::SharedData.MySubUnion3).TypeHandle, new KeyValuePair<int, int>(42, 1) },
- { typeof(global::SharedData.MySubUnion4).TypeHandle, new KeyValuePair<int, int>(63, 2) },
- { typeof(global::SharedData.MySubUnion1).TypeHandle, new KeyValuePair<int, int>(120, 3) },
+ { typeof(global::SharedData.MySubUnion2).TypeHandle, new global::System.Collections.Generic.KeyValuePair<int, int>(31, 0) },
+ { typeof(global::SharedData.MySubUnion3).TypeHandle, new global::System.Collections.Generic.KeyValuePair<int, int>(42, 1) },
+ { typeof(global::SharedData.MySubUnion4).TypeHandle, new global::System.Collections.Generic.KeyValuePair<int, int>(63, 2) },
+ { typeof(global::SharedData.MySubUnion1).TypeHandle, new global::System.Collections.Generic.KeyValuePair<int, int>(120, 3) },
};
- this.keyToJumpMap = new Dictionary<int, int>(4)
+ this.keyToJumpMap = new global::System.Collections.Generic.Dictionary<int, int>(4)
{
{ 31, 0 },
{ 42, 1 },
@@ -635,9 +627,9 @@ namespace MessagePack.Formatters.SharedData
};
}
- public void Serialize(ref MessagePackWriter writer, global::SharedData.IUnionChecker2 value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.IUnionChecker2 value, global::MessagePack.MessagePackSerializerOptions options)
{
- KeyValuePair<int, int> keyValuePair;
+ global::System.Collections.Generic.KeyValuePair<int, int> keyValuePair;
if (value != null && this.typeToKeyAndJumpMap.TryGetValue(value.GetType().TypeHandle, out keyValuePair))
{
writer.WriteArrayHeader(2);
@@ -666,7 +658,7 @@ namespace MessagePack.Formatters.SharedData
writer.WriteNil();
}
- public global::SharedData.IUnionChecker2 Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.IUnionChecker2 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -675,7 +667,7 @@ namespace MessagePack.Formatters.SharedData
if (reader.ReadArrayHeader() != 2)
{
- throw new InvalidOperationException("Invalid Union data was detected. Type:global::SharedData.IUnionChecker2");
+ throw new global::System.InvalidOperationException("Invalid Union data was detected. Type:global::SharedData.IUnionChecker2");
}
options.Security.DepthStep(ref reader);
@@ -713,26 +705,26 @@ namespace MessagePack.Formatters.SharedData
public sealed class IUnionSampleFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.IUnionSample>
{
- private readonly Dictionary<RuntimeTypeHandle, KeyValuePair<int, int>> typeToKeyAndJumpMap;
- private readonly Dictionary<int, int> keyToJumpMap;
+ private readonly global::System.Collections.Generic.Dictionary<global::System.RuntimeTypeHandle, global::System.Collections.Generic.KeyValuePair<int, int>> typeToKeyAndJumpMap;
+ private readonly global::System.Collections.Generic.Dictionary<int, int> keyToJumpMap;
public IUnionSampleFormatter()
{
- this.typeToKeyAndJumpMap = new Dictionary<RuntimeTypeHandle, KeyValuePair<int, int>>(2, global::MessagePack.Internal.RuntimeTypeHandleEqualityComparer.Default)
+ this.typeToKeyAndJumpMap = new global::System.Collections.Generic.Dictionary<global::System.RuntimeTypeHandle, global::System.Collections.Generic.KeyValuePair<int, int>>(2, global::MessagePack.Internal.RuntimeTypeHandleEqualityComparer.Default)
{
- { typeof(global::SharedData.FooClass).TypeHandle, new KeyValuePair<int, int>(0, 0) },
- { typeof(global::SharedData.BarClass).TypeHandle, new KeyValuePair<int, int>(100, 1) },
+ { typeof(global::SharedData.FooClass).TypeHandle, new global::System.Collections.Generic.KeyValuePair<int, int>(0, 0) },
+ { typeof(global::SharedData.BarClass).TypeHandle, new global::System.Collections.Generic.KeyValuePair<int, int>(100, 1) },
};
- this.keyToJumpMap = new Dictionary<int, int>(2)
+ this.keyToJumpMap = new global::System.Collections.Generic.Dictionary<int, int>(2)
{
{ 0, 0 },
{ 100, 1 },
};
}
- public void Serialize(ref MessagePackWriter writer, global::SharedData.IUnionSample value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.IUnionSample value, global::MessagePack.MessagePackSerializerOptions options)
{
- KeyValuePair<int, int> keyValuePair;
+ global::System.Collections.Generic.KeyValuePair<int, int> keyValuePair;
if (value != null && this.typeToKeyAndJumpMap.TryGetValue(value.GetType().TypeHandle, out keyValuePair))
{
writer.WriteArrayHeader(2);
@@ -755,7 +747,7 @@ namespace MessagePack.Formatters.SharedData
writer.WriteNil();
}
- public global::SharedData.IUnionSample Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.IUnionSample Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -764,7 +756,7 @@ namespace MessagePack.Formatters.SharedData
if (reader.ReadArrayHeader() != 2)
{
- throw new InvalidOperationException("Invalid Union data was detected. Type:global::SharedData.IUnionSample");
+ throw new global::System.InvalidOperationException("Invalid Union data was detected. Type:global::SharedData.IUnionSample");
}
options.Security.DepthStep(ref reader);
@@ -796,26 +788,26 @@ namespace MessagePack.Formatters.SharedData
public sealed class RootUnionTypeFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.RootUnionType>
{
- private readonly Dictionary<RuntimeTypeHandle, KeyValuePair<int, int>> typeToKeyAndJumpMap;
- private readonly Dictionary<int, int> keyToJumpMap;
+ private readonly global::System.Collections.Generic.Dictionary<global::System.RuntimeTypeHandle, global::System.Collections.Generic.KeyValuePair<int, int>> typeToKeyAndJumpMap;
+ private readonly global::System.Collections.Generic.Dictionary<int, int> keyToJumpMap;
public RootUnionTypeFormatter()
{
- this.typeToKeyAndJumpMap = new Dictionary<RuntimeTypeHandle, KeyValuePair<int, int>>(2, global::MessagePack.Internal.RuntimeTypeHandleEqualityComparer.Default)
+ this.typeToKeyAndJumpMap = new global::System.Collections.Generic.Dictionary<global::System.RuntimeTypeHandle, global::System.Collections.Generic.KeyValuePair<int, int>>(2, global::MessagePack.Internal.RuntimeTypeHandleEqualityComparer.Default)
{
- { typeof(global::SharedData.SubUnionType1).TypeHandle, new KeyValuePair<int, int>(0, 0) },
- { typeof(global::SharedData.SubUnionType2).TypeHandle, new KeyValuePair<int, int>(1, 1) },
+ { typeof(global::SharedData.SubUnionType1).TypeHandle, new global::System.Collections.Generic.KeyValuePair<int, int>(0, 0) },
+ { typeof(global::SharedData.SubUnionType2).TypeHandle, new global::System.Collections.Generic.KeyValuePair<int, int>(1, 1) },
};
- this.keyToJumpMap = new Dictionary<int, int>(2)
+ this.keyToJumpMap = new global::System.Collections.Generic.Dictionary<int, int>(2)
{
{ 0, 0 },
{ 1, 1 },
};
}
- public void Serialize(ref MessagePackWriter writer, global::SharedData.RootUnionType value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.RootUnionType value, global::MessagePack.MessagePackSerializerOptions options)
{
- KeyValuePair<int, int> keyValuePair;
+ global::System.Collections.Generic.KeyValuePair<int, int> keyValuePair;
if (value != null && this.typeToKeyAndJumpMap.TryGetValue(value.GetType().TypeHandle, out keyValuePair))
{
writer.WriteArrayHeader(2);
@@ -838,7 +830,7 @@ namespace MessagePack.Formatters.SharedData
writer.WriteNil();
}
- public global::SharedData.RootUnionType Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.RootUnionType Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -847,7 +839,7 @@ namespace MessagePack.Formatters.SharedData
if (reader.ReadArrayHeader() != 2)
{
- throw new InvalidOperationException("Invalid Union data was detected. Type:global::SharedData.RootUnionType");
+ throw new global::System.InvalidOperationException("Invalid Union data was detected. Type:global::SharedData.RootUnionType");
}
options.Security.DepthStep(ref reader);
@@ -885,7 +877,6 @@ namespace MessagePack.Formatters.SharedData
#pragma warning restore 618
#pragma warning restore 612
-#pragma warning restore SA1200 // Using directives should be placed correctly
#pragma warning restore SA1403 // File may only contain a single namespace
#pragma warning restore SA1649 // File name should match first type name
@@ -898,9 +889,9 @@ namespace MessagePack.Formatters.SharedData
#pragma warning disable 612
#pragma warning disable 414
#pragma warning disable 168
+#pragma warning disable CS1591 // document public APIs
#pragma warning disable SA1129 // Do not use default value type constructor
-#pragma warning disable SA1200 // Using directives should be placed correctly
#pragma warning disable SA1309 // Field names should not begin with underscore
#pragma warning disable SA1312 // Variable names should begin with lower-case letter
#pragma warning disable SA1403 // File may only contain a single namespace
@@ -908,14 +899,10 @@ namespace MessagePack.Formatters.SharedData
namespace MessagePack.Formatters.Abcdefg.Efcdigjl.Ateatatea.Hgfagfafgad
{
- using System;
- using System.Buffers;
- using MessagePack;
-
public sealed class TnonodsfarnoiuAtatqagaFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::Abcdefg.Efcdigjl.Ateatatea.Hgfagfafgad.TnonodsfarnoiuAtatqaga>
{
- public void Serialize(ref MessagePackWriter writer, global::Abcdefg.Efcdigjl.Ateatatea.Hgfagfafgad.TnonodsfarnoiuAtatqaga value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::Abcdefg.Efcdigjl.Ateatatea.Hgfagfafgad.TnonodsfarnoiuAtatqaga value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -927,7 +914,7 @@ namespace MessagePack.Formatters.Abcdefg.Efcdigjl.Ateatatea.Hgfagfafgad
writer.Write(value.MyProperty);
}
- public global::Abcdefg.Efcdigjl.Ateatatea.Hgfagfafgad.TnonodsfarnoiuAtatqaga Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::Abcdefg.Efcdigjl.Ateatatea.Hgfagfafgad.TnonodsfarnoiuAtatqaga Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -936,14 +923,14 @@ namespace MessagePack.Formatters.Abcdefg.Efcdigjl.Ateatatea.Hgfagfafgad
options.Security.DepthStep(ref reader);
var length = reader.ReadArrayHeader();
- var __MyProperty__ = default(int);
+ var ____result = new global::Abcdefg.Efcdigjl.Ateatatea.Hgfagfafgad.TnonodsfarnoiuAtatqaga();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
- __MyProperty__ = reader.ReadInt32();
+ ____result.MyProperty = reader.ReadInt32();
break;
default:
reader.Skip();
@@ -951,12 +938,11 @@ namespace MessagePack.Formatters.Abcdefg.Efcdigjl.Ateatatea.Hgfagfafgad
}
}
- var ____result = new global::Abcdefg.Efcdigjl.Ateatatea.Hgfagfafgad.TnonodsfarnoiuAtatqaga();
- ____result.MyProperty = __MyProperty__;
reader.Depth--;
return ____result;
}
}
+
}
#pragma warning restore 168
@@ -965,7 +951,6 @@ namespace MessagePack.Formatters.Abcdefg.Efcdigjl.Ateatatea.Hgfagfafgad
#pragma warning restore 612
#pragma warning restore SA1129 // Do not use default value type constructor
-#pragma warning restore SA1200 // Using directives should be placed correctly
#pragma warning restore SA1309 // Field names should not begin with underscore
#pragma warning restore SA1312 // Variable names should begin with lower-case letter
#pragma warning restore SA1403 // File may only contain a single namespace
@@ -979,9 +964,9 @@ namespace MessagePack.Formatters.Abcdefg.Efcdigjl.Ateatatea.Hgfagfafgad
#pragma warning disable 612
#pragma warning disable 414
#pragma warning disable 168
+#pragma warning disable CS1591 // document public APIs
#pragma warning disable SA1129 // Do not use default value type constructor
-#pragma warning disable SA1200 // Using directives should be placed correctly
#pragma warning disable SA1309 // Field names should not begin with underscore
#pragma warning disable SA1312 // Variable names should begin with lower-case letter
#pragma warning disable SA1403 // File may only contain a single namespace
@@ -989,14 +974,10 @@ namespace MessagePack.Formatters.Abcdefg.Efcdigjl.Ateatatea.Hgfagfafgad
namespace MessagePack.Formatters
{
- using System;
- using System.Buffers;
- using MessagePack;
-
public sealed class ArrayTestTestFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::ArrayTestTest>
{
- public void Serialize(ref MessagePackWriter writer, global::ArrayTestTest value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::ArrayTestTest value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -1004,18 +985,18 @@ namespace MessagePack.Formatters
return;
}
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
writer.WriteArrayHeader(7);
- formatterResolver.GetFormatterWithVerify<int[]>().Serialize(ref writer, value.MyProperty0, options);
- formatterResolver.GetFormatterWithVerify<int[,]>().Serialize(ref writer, value.MyProperty1, options);
- formatterResolver.GetFormatterWithVerify<global::GlobalMyEnum[,]>().Serialize(ref writer, value.MyProperty2, options);
- formatterResolver.GetFormatterWithVerify<int[,,]>().Serialize(ref writer, value.MyProperty3, options);
- formatterResolver.GetFormatterWithVerify<int[,,,]>().Serialize(ref writer, value.MyProperty4, options);
- formatterResolver.GetFormatterWithVerify<global::GlobalMyEnum[]>().Serialize(ref writer, value.MyProperty5, options);
- formatterResolver.GetFormatterWithVerify<global::QuestMessageBody[]>().Serialize(ref writer, value.MyProperty6, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<int[]>(formatterResolver).Serialize(ref writer, value.MyProperty0, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<int[,]>(formatterResolver).Serialize(ref writer, value.MyProperty1, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::GlobalMyEnum[,]>(formatterResolver).Serialize(ref writer, value.MyProperty2, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<int[,,]>(formatterResolver).Serialize(ref writer, value.MyProperty3, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<int[,,,]>(formatterResolver).Serialize(ref writer, value.MyProperty4, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::GlobalMyEnum[]>(formatterResolver).Serialize(ref writer, value.MyProperty5, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::QuestMessageBody[]>(formatterResolver).Serialize(ref writer, value.MyProperty6, options);
}
- public global::ArrayTestTest Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::ArrayTestTest Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -1023,40 +1004,34 @@ namespace MessagePack.Formatters
}
options.Security.DepthStep(ref reader);
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
var length = reader.ReadArrayHeader();
- var __MyProperty0__ = default(int[]);
- var __MyProperty1__ = default(int[,]);
- var __MyProperty2__ = default(global::GlobalMyEnum[,]);
- var __MyProperty3__ = default(int[,,]);
- var __MyProperty4__ = default(int[,,,]);
- var __MyProperty5__ = default(global::GlobalMyEnum[]);
- var __MyProperty6__ = default(global::QuestMessageBody[]);
+ var ____result = new global::ArrayTestTest();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
- __MyProperty0__ = formatterResolver.GetFormatterWithVerify<int[]>().Deserialize(ref reader, options);
+ ____result.MyProperty0 = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<int[]>(formatterResolver).Deserialize(ref reader, options);
break;
case 1:
- __MyProperty1__ = formatterResolver.GetFormatterWithVerify<int[,]>().Deserialize(ref reader, options);
+ ____result.MyProperty1 = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<int[,]>(formatterResolver).Deserialize(ref reader, options);
break;
case 2:
- __MyProperty2__ = formatterResolver.GetFormatterWithVerify<global::GlobalMyEnum[,]>().Deserialize(ref reader, options);
+ ____result.MyProperty2 = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::GlobalMyEnum[,]>(formatterResolver).Deserialize(ref reader, options);
break;
case 3:
- __MyProperty3__ = formatterResolver.GetFormatterWithVerify<int[,,]>().Deserialize(ref reader, options);
+ ____result.MyProperty3 = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<int[,,]>(formatterResolver).Deserialize(ref reader, options);
break;
case 4:
- __MyProperty4__ = formatterResolver.GetFormatterWithVerify<int[,,,]>().Deserialize(ref reader, options);
+ ____result.MyProperty4 = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<int[,,,]>(formatterResolver).Deserialize(ref reader, options);
break;
case 5:
- __MyProperty5__ = formatterResolver.GetFormatterWithVerify<global::GlobalMyEnum[]>().Deserialize(ref reader, options);
+ ____result.MyProperty5 = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::GlobalMyEnum[]>(formatterResolver).Deserialize(ref reader, options);
break;
case 6:
- __MyProperty6__ = formatterResolver.GetFormatterWithVerify<global::QuestMessageBody[]>().Deserialize(ref reader, options);
+ ____result.MyProperty6 = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::QuestMessageBody[]>(formatterResolver).Deserialize(ref reader, options);
break;
default:
reader.Skip();
@@ -1064,14 +1039,6 @@ namespace MessagePack.Formatters
}
}
- var ____result = new global::ArrayTestTest();
- ____result.MyProperty0 = __MyProperty0__;
- ____result.MyProperty1 = __MyProperty1__;
- ____result.MyProperty2 = __MyProperty2__;
- ____result.MyProperty3 = __MyProperty3__;
- ____result.MyProperty4 = __MyProperty4__;
- ____result.MyProperty5 = __MyProperty5__;
- ____result.MyProperty6 = __MyProperty6__;
reader.Depth--;
return ____result;
}
@@ -1080,7 +1047,7 @@ namespace MessagePack.Formatters
public sealed class GlobalManFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::GlobalMan>
{
- public void Serialize(ref MessagePackWriter writer, global::GlobalMan value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::GlobalMan value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -1092,7 +1059,7 @@ namespace MessagePack.Formatters
writer.Write(value.MyProperty);
}
- public global::GlobalMan Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::GlobalMan Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -1101,14 +1068,14 @@ namespace MessagePack.Formatters
options.Security.DepthStep(ref reader);
var length = reader.ReadArrayHeader();
- var __MyProperty__ = default(int);
+ var ____result = new global::GlobalMan();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
- __MyProperty__ = reader.ReadInt32();
+ ____result.MyProperty = reader.ReadInt32();
break;
default:
reader.Skip();
@@ -1116,8 +1083,6 @@ namespace MessagePack.Formatters
}
}
- var ____result = new global::GlobalMan();
- ____result.MyProperty = __MyProperty__;
reader.Depth--;
return ____result;
}
@@ -1126,7 +1091,7 @@ namespace MessagePack.Formatters
public sealed class MessageFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::Message>
{
- public void Serialize(ref MessagePackWriter writer, global::Message value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::Message value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -1134,15 +1099,15 @@ namespace MessagePack.Formatters
return;
}
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
writer.WriteArrayHeader(4);
writer.Write(value.UserId);
writer.Write(value.RoomId);
- formatterResolver.GetFormatterWithVerify<global::System.DateTime>().Serialize(ref writer, value.PostTime, options);
- formatterResolver.GetFormatterWithVerify<global::IMessageBody>().Serialize(ref writer, value.Body, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::System.DateTime>(formatterResolver).Serialize(ref writer, value.PostTime, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::IMessageBody>(formatterResolver).Serialize(ref writer, value.Body, options);
}
- public global::Message Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::Message Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -1150,28 +1115,70 @@ namespace MessagePack.Formatters
}
options.Security.DepthStep(ref reader);
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
var length = reader.ReadArrayHeader();
- var __UserId__ = default(int);
- var __RoomId__ = default(int);
- var __PostTime__ = default(global::System.DateTime);
- var __Body__ = default(global::IMessageBody);
+ var ____result = new global::Message();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
- __UserId__ = reader.ReadInt32();
+ ____result.UserId = reader.ReadInt32();
break;
case 1:
- __RoomId__ = reader.ReadInt32();
+ ____result.RoomId = reader.ReadInt32();
break;
case 2:
- __PostTime__ = formatterResolver.GetFormatterWithVerify<global::System.DateTime>().Deserialize(ref reader, options);
+ ____result.PostTime = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::System.DateTime>(formatterResolver).Deserialize(ref reader, options);
break;
case 3:
- __Body__ = formatterResolver.GetFormatterWithVerify<global::IMessageBody>().Deserialize(ref reader, options);
+ ____result.Body = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::IMessageBody>(formatterResolver).Deserialize(ref reader, options);
+ break;
+ default:
+ reader.Skip();
+ break;
+ }
+ }
+
+ reader.Depth--;
+ return ____result;
+ }
+ }
+
+ public sealed class MessagePackFormatterFieldUserFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::MessagePackFormatterFieldUser>
+ {
+ private readonly global::MessagePack.Formatters.NativeDateTimeFormatter __TimestampCustomFormatter__ = new global::MessagePack.Formatters.NativeDateTimeFormatter();
+
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::MessagePackFormatterFieldUser value, global::MessagePack.MessagePackSerializerOptions options)
+ {
+ if (value == null)
+ {
+ writer.WriteNil();
+ return;
+ }
+
+ writer.WriteArrayHeader(1);
+ this.__TimestampCustomFormatter__.Serialize(ref writer, value.Timestamp, options);
+ }
+
+ public global::MessagePackFormatterFieldUser Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ {
+ if (reader.TryReadNil())
+ {
+ return null;
+ }
+
+ options.Security.DepthStep(ref reader);
+ var length = reader.ReadArrayHeader();
+ var ____result = new global::MessagePackFormatterFieldUser();
+
+ for (int i = 0; i < length; i++)
+ {
+ switch (i)
+ {
+ case 0:
+ ____result.Timestamp = this.__TimestampCustomFormatter__.Deserialize(ref reader, options);
break;
default:
reader.Skip();
@@ -1179,11 +1186,6 @@ namespace MessagePack.Formatters
}
}
- var ____result = new global::Message();
- ____result.UserId = __UserId__;
- ____result.RoomId = __RoomId__;
- ____result.PostTime = __PostTime__;
- ____result.Body = __Body__;
reader.Depth--;
return ____result;
}
@@ -1192,7 +1194,7 @@ namespace MessagePack.Formatters
public sealed class QuestMessageBodyFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::QuestMessageBody>
{
- public void Serialize(ref MessagePackWriter writer, global::QuestMessageBody value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::QuestMessageBody value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -1200,13 +1202,13 @@ namespace MessagePack.Formatters
return;
}
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
writer.WriteArrayHeader(2);
writer.Write(value.QuestId);
- formatterResolver.GetFormatterWithVerify<string>().Serialize(ref writer, value.Text, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Serialize(ref writer, value.Text, options);
}
- public global::QuestMessageBody Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::QuestMessageBody Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -1214,20 +1216,19 @@ namespace MessagePack.Formatters
}
options.Security.DepthStep(ref reader);
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
var length = reader.ReadArrayHeader();
- var __QuestId__ = default(int);
- var __Text__ = default(string);
+ var ____result = new global::QuestMessageBody();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
- __QuestId__ = reader.ReadInt32();
+ ____result.QuestId = reader.ReadInt32();
break;
case 1:
- __Text__ = formatterResolver.GetFormatterWithVerify<string>().Deserialize(ref reader, options);
+ ____result.Text = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Deserialize(ref reader, options);
break;
default:
reader.Skip();
@@ -1235,9 +1236,6 @@ namespace MessagePack.Formatters
}
}
- var ____result = new global::QuestMessageBody();
- ____result.QuestId = __QuestId__;
- ____result.Text = __Text__;
reader.Depth--;
return ____result;
}
@@ -1246,7 +1244,7 @@ namespace MessagePack.Formatters
public sealed class StampMessageBodyFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::StampMessageBody>
{
- public void Serialize(ref MessagePackWriter writer, global::StampMessageBody value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::StampMessageBody value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -1258,7 +1256,7 @@ namespace MessagePack.Formatters
writer.Write(value.StampId);
}
- public global::StampMessageBody Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::StampMessageBody Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -1267,14 +1265,14 @@ namespace MessagePack.Formatters
options.Security.DepthStep(ref reader);
var length = reader.ReadArrayHeader();
- var __StampId__ = default(int);
+ var ____result = new global::StampMessageBody();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
- __StampId__ = reader.ReadInt32();
+ ____result.StampId = reader.ReadInt32();
break;
default:
reader.Skip();
@@ -1282,8 +1280,6 @@ namespace MessagePack.Formatters
}
}
- var ____result = new global::StampMessageBody();
- ____result.StampId = __StampId__;
reader.Depth--;
return ____result;
}
@@ -1292,7 +1288,7 @@ namespace MessagePack.Formatters
public sealed class TextMessageBodyFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::TextMessageBody>
{
- public void Serialize(ref MessagePackWriter writer, global::TextMessageBody value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::TextMessageBody value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -1300,12 +1296,12 @@ namespace MessagePack.Formatters
return;
}
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
writer.WriteArrayHeader(1);
- formatterResolver.GetFormatterWithVerify<string>().Serialize(ref writer, value.Text, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Serialize(ref writer, value.Text, options);
}
- public global::TextMessageBody Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::TextMessageBody Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -1313,16 +1309,16 @@ namespace MessagePack.Formatters
}
options.Security.DepthStep(ref reader);
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
var length = reader.ReadArrayHeader();
- var __Text__ = default(string);
+ var ____result = new global::TextMessageBody();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
- __Text__ = formatterResolver.GetFormatterWithVerify<string>().Deserialize(ref reader, options);
+ ____result.Text = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Deserialize(ref reader, options);
break;
default:
reader.Skip();
@@ -1330,12 +1326,11 @@ namespace MessagePack.Formatters
}
}
- var ____result = new global::TextMessageBody();
- ____result.Text = __Text__;
reader.Depth--;
return ____result;
}
}
+
}
#pragma warning restore 168
@@ -1344,7 +1339,6 @@ namespace MessagePack.Formatters
#pragma warning restore 612
#pragma warning restore SA1129 // Do not use default value type constructor
-#pragma warning restore SA1200 // Using directives should be placed correctly
#pragma warning restore SA1309 // Field names should not begin with underscore
#pragma warning restore SA1312 // Variable names should begin with lower-case letter
#pragma warning restore SA1403 // File may only contain a single namespace
@@ -1358,9 +1352,9 @@ namespace MessagePack.Formatters
#pragma warning disable 612
#pragma warning disable 414
#pragma warning disable 168
+#pragma warning disable CS1591 // document public APIs
#pragma warning disable SA1129 // Do not use default value type constructor
-#pragma warning disable SA1200 // Using directives should be placed correctly
#pragma warning disable SA1309 // Field names should not begin with underscore
#pragma warning disable SA1312 // Variable names should begin with lower-case letter
#pragma warning disable SA1403 // File may only contain a single namespace
@@ -1368,11 +1362,6 @@ namespace MessagePack.Formatters
namespace MessagePack.Formatters
{
- using System;
- using System.Buffers;
- using System.Runtime.InteropServices;
- using MessagePack;
-
public sealed class ComplexModelFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::ComplexModel>
{
// AdditionalProperty
@@ -1396,20 +1385,20 @@ namespace MessagePack.Formatters
return;
}
- IFormatterResolver formatterResolver = options.Resolver;
+ var formatterResolver = options.Resolver;
writer.WriteMapHeader(6);
writer.WriteRaw(GetSpan_AdditionalProperty());
- formatterResolver.GetFormatterWithVerify<global::System.Collections.Generic.IDictionary<string, string>>().Serialize(ref writer, value.AdditionalProperty, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::System.Collections.Generic.IDictionary<string, string>>(formatterResolver).Serialize(ref writer, value.AdditionalProperty, options);
writer.WriteRaw(GetSpan_CreatedOn());
- formatterResolver.GetFormatterWithVerify<global::System.DateTimeOffset>().Serialize(ref writer, value.CreatedOn, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::System.DateTimeOffset>(formatterResolver).Serialize(ref writer, value.CreatedOn, options);
writer.WriteRaw(GetSpan_Id());
- formatterResolver.GetFormatterWithVerify<global::System.Guid>().Serialize(ref writer, value.Id, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::System.Guid>(formatterResolver).Serialize(ref writer, value.Id, options);
writer.WriteRaw(GetSpan_Name());
- formatterResolver.GetFormatterWithVerify<string>().Serialize(ref writer, value.Name, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Serialize(ref writer, value.Name, options);
writer.WriteRaw(GetSpan_UpdatedOn());
- formatterResolver.GetFormatterWithVerify<global::System.DateTimeOffset>().Serialize(ref writer, value.UpdatedOn, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::System.DateTimeOffset>(formatterResolver).Serialize(ref writer, value.UpdatedOn, options);
writer.WriteRaw(GetSpan_SimpleModels());
- formatterResolver.GetFormatterWithVerify<global::System.Collections.Generic.IList<global::SimpleModel>>().Serialize(ref writer, value.SimpleModels, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::System.Collections.Generic.IList<global::SimpleModel>>(formatterResolver).Serialize(ref writer, value.SimpleModels, options);
}
public global::ComplexModel Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
@@ -1420,18 +1409,13 @@ namespace MessagePack.Formatters
}
options.Security.DepthStep(ref reader);
- IFormatterResolver formatterResolver = options.Resolver;
+ var formatterResolver = options.Resolver;
var length = reader.ReadMapHeader();
- var __AdditionalProperty__ = default(global::System.Collections.Generic.IDictionary<string, string>);
- var __CreatedOn__ = default(global::System.DateTimeOffset);
- var __Id__ = default(global::System.Guid);
- var __Name__ = default(string);
- var __UpdatedOn__ = default(global::System.DateTimeOffset);
- var __SimpleModels__ = default(global::System.Collections.Generic.IList<global::SimpleModel>);
+ var ____result = new global::ComplexModel();
for (int i = 0; i < length; i++)
{
- ReadOnlySpan<byte> stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
+ var stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
switch (stringKey.Length)
{
default:
@@ -1441,7 +1425,7 @@ namespace MessagePack.Formatters
case 18:
if (!global::System.MemoryExtensions.SequenceEqual(stringKey, GetSpan_AdditionalProperty().Slice(1))) { goto FAIL; }
- __AdditionalProperty__ = formatterResolver.GetFormatterWithVerify<global::System.Collections.Generic.IDictionary<string, string>>().Deserialize(ref reader, options);
+ reader.Skip();
continue;
case 9:
switch (global::MessagePack.Internal.AutomataKeyGen.GetKey(ref stringKey))
@@ -1450,43 +1434,35 @@ namespace MessagePack.Formatters
case 5720808977192022595UL:
if (stringKey[0] != 110) { goto FAIL; }
- __CreatedOn__ = formatterResolver.GetFormatterWithVerify<global::System.DateTimeOffset>().Deserialize(ref reader, options);
+ ____result.CreatedOn = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::System.DateTimeOffset>(formatterResolver).Deserialize(ref reader, options);
continue;
case 5720808977191956565UL:
if (stringKey[0] != 110) { goto FAIL; }
- __UpdatedOn__ = formatterResolver.GetFormatterWithVerify<global::System.DateTimeOffset>().Deserialize(ref reader, options);
+ ____result.UpdatedOn = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::System.DateTimeOffset>(formatterResolver).Deserialize(ref reader, options);
continue;
}
case 2:
if (global::MessagePack.Internal.AutomataKeyGen.GetKey(ref stringKey) != 25673UL) { goto FAIL; }
- __Id__ = formatterResolver.GetFormatterWithVerify<global::System.Guid>().Deserialize(ref reader, options);
+ ____result.Id = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::System.Guid>(formatterResolver).Deserialize(ref reader, options);
continue;
case 4:
if (global::MessagePack.Internal.AutomataKeyGen.GetKey(ref stringKey) != 1701667150UL) { goto FAIL; }
- __Name__ = formatterResolver.GetFormatterWithVerify<string>().Deserialize(ref reader, options);
+ ____result.Name = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Deserialize(ref reader, options);
continue;
case 12:
if (!global::System.MemoryExtensions.SequenceEqual(stringKey, GetSpan_SimpleModels().Slice(1))) { goto FAIL; }
- __SimpleModels__ = formatterResolver.GetFormatterWithVerify<global::System.Collections.Generic.IList<global::SimpleModel>>().Deserialize(ref reader, options);
+ reader.Skip();
continue;
}
}
- var ____result = new global::ComplexModel()
- {
- CreatedOn = __CreatedOn__,
- Id = __Id__,
- Name = __Name__,
- UpdatedOn = __UpdatedOn__,
- };
-
reader.Depth--;
return ____result;
}
@@ -1515,18 +1491,18 @@ namespace MessagePack.Formatters
return;
}
- IFormatterResolver formatterResolver = options.Resolver;
+ var formatterResolver = options.Resolver;
writer.WriteMapHeader(6);
writer.WriteRaw(GetSpan_Id());
writer.Write(value.Id);
writer.WriteRaw(GetSpan_Name());
- formatterResolver.GetFormatterWithVerify<string>().Serialize(ref writer, value.Name, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Serialize(ref writer, value.Name, options);
writer.WriteRaw(GetSpan_CreatedOn());
- formatterResolver.GetFormatterWithVerify<global::System.DateTime>().Serialize(ref writer, value.CreatedOn, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::System.DateTime>(formatterResolver).Serialize(ref writer, value.CreatedOn, options);
writer.WriteRaw(GetSpan_Precision());
writer.Write(value.Precision);
writer.WriteRaw(GetSpan_Money());
- formatterResolver.GetFormatterWithVerify<decimal>().Serialize(ref writer, value.Money, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<decimal>(formatterResolver).Serialize(ref writer, value.Money, options);
writer.WriteRaw(GetSpan_Amount());
writer.Write(value.Amount);
}
@@ -1539,18 +1515,13 @@ namespace MessagePack.Formatters
}
options.Security.DepthStep(ref reader);
- IFormatterResolver formatterResolver = options.Resolver;
+ var formatterResolver = options.Resolver;
var length = reader.ReadMapHeader();
- var __Id__ = default(int);
- var __Name__ = default(string);
- var __CreatedOn__ = default(global::System.DateTime);
- var __Precision__ = default(int);
- var __Money__ = default(decimal);
- var __Amount__ = default(long);
+ var ____result = new global::SimpleModel();
for (int i = 0; i < length; i++)
{
- ReadOnlySpan<byte> stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
+ var stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
switch (stringKey.Length)
{
default:
@@ -1560,12 +1531,12 @@ namespace MessagePack.Formatters
case 2:
if (global::MessagePack.Internal.AutomataKeyGen.GetKey(ref stringKey) != 25673UL) { goto FAIL; }
- __Id__ = reader.ReadInt32();
+ ____result.Id = reader.ReadInt32();
continue;
case 4:
if (global::MessagePack.Internal.AutomataKeyGen.GetKey(ref stringKey) != 1701667150UL) { goto FAIL; }
- __Name__ = formatterResolver.GetFormatterWithVerify<string>().Deserialize(ref reader, options);
+ ____result.Name = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Deserialize(ref reader, options);
continue;
case 9:
switch (global::MessagePack.Internal.AutomataKeyGen.GetKey(ref stringKey))
@@ -1574,45 +1545,48 @@ namespace MessagePack.Formatters
case 5720808977192022595UL:
if (stringKey[0] != 110) { goto FAIL; }
- __CreatedOn__ = formatterResolver.GetFormatterWithVerify<global::System.DateTime>().Deserialize(ref reader, options);
+ ____result.CreatedOn = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::System.DateTime>(formatterResolver).Deserialize(ref reader, options);
continue;
case 8028074707240972880UL:
if (stringKey[0] != 110) { goto FAIL; }
- __Precision__ = reader.ReadInt32();
+ ____result.Precision = reader.ReadInt32();
continue;
}
case 5:
if (global::MessagePack.Internal.AutomataKeyGen.GetKey(ref stringKey) != 521392779085UL) { goto FAIL; }
- __Money__ = formatterResolver.GetFormatterWithVerify<decimal>().Deserialize(ref reader, options);
+ ____result.Money = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<decimal>(formatterResolver).Deserialize(ref reader, options);
continue;
case 6:
if (global::MessagePack.Internal.AutomataKeyGen.GetKey(ref stringKey) != 128017765461313UL) { goto FAIL; }
- __Amount__ = reader.ReadInt64();
+ reader.Skip();
continue;
}
}
- var ____result = new global::SimpleModel()
- {
- Id = __Id__,
- Name = __Name__,
- CreatedOn = __CreatedOn__,
- Precision = __Precision__,
- Money = __Money__,
- };
-
reader.Depth--;
return ____result;
}
}
+
}
+#pragma warning restore 168
+#pragma warning restore 414
+#pragma warning restore 618
+#pragma warning restore 612
+
+#pragma warning restore SA1129 // Do not use default value type constructor
+#pragma warning restore SA1309 // Field names should not begin with underscore
+#pragma warning restore SA1312 // Variable names should begin with lower-case letter
+#pragma warning restore SA1403 // File may only contain a single namespace
+#pragma warning restore SA1649 // File name should match first type name
+
// <auto-generated>
// THIS (.cs) FILE IS GENERATED BY MPC(MessagePack-CSharp). DO NOT CHANGE IT.
// </auto-generated>
@@ -1621,9 +1595,9 @@ namespace MessagePack.Formatters
#pragma warning disable 612
#pragma warning disable 414
#pragma warning disable 168
+#pragma warning disable CS1591 // document public APIs
#pragma warning disable SA1129 // Do not use default value type constructor
-#pragma warning disable SA1200 // Using directives should be placed correctly
#pragma warning disable SA1309 // Field names should not begin with underscore
#pragma warning disable SA1312 // Variable names should begin with lower-case letter
#pragma warning disable SA1403 // File may only contain a single namespace
@@ -1631,11 +1605,6 @@ namespace MessagePack.Formatters
namespace MessagePack.Formatters.PerfBenchmarkDotNet
{
- using System;
- using System.Buffers;
- using System.Runtime.InteropServices;
- using MessagePack;
-
public sealed class StringKeySerializerTargetFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::PerfBenchmarkDotNet.StringKeySerializerTarget>
{
// MyProperty1
@@ -1695,19 +1664,11 @@ namespace MessagePack.Formatters.PerfBenchmarkDotNet
options.Security.DepthStep(ref reader);
var length = reader.ReadMapHeader();
- var __MyProperty1__ = default(int);
- var __MyProperty2__ = default(int);
- var __MyProperty3__ = default(int);
- var __MyProperty4__ = default(int);
- var __MyProperty5__ = default(int);
- var __MyProperty6__ = default(int);
- var __MyProperty7__ = default(int);
- var __MyProperty8__ = default(int);
- var __MyProperty9__ = default(int);
+ var ____result = new global::PerfBenchmarkDotNet.StringKeySerializerTarget();
for (int i = 0; i < length; i++)
{
- ReadOnlySpan<byte> stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
+ var stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
switch (stringKey.Length)
{
default:
@@ -1723,31 +1684,31 @@ namespace MessagePack.Formatters.PerfBenchmarkDotNet
{
default: goto FAIL;
case 3242356UL:
- __MyProperty1__ = reader.ReadInt32();
+ ____result.MyProperty1 = reader.ReadInt32();
continue;
case 3307892UL:
- __MyProperty2__ = reader.ReadInt32();
+ ____result.MyProperty2 = reader.ReadInt32();
continue;
case 3373428UL:
- __MyProperty3__ = reader.ReadInt32();
+ ____result.MyProperty3 = reader.ReadInt32();
continue;
case 3438964UL:
- __MyProperty4__ = reader.ReadInt32();
+ ____result.MyProperty4 = reader.ReadInt32();
continue;
case 3504500UL:
- __MyProperty5__ = reader.ReadInt32();
+ ____result.MyProperty5 = reader.ReadInt32();
continue;
case 3570036UL:
- __MyProperty6__ = reader.ReadInt32();
+ ____result.MyProperty6 = reader.ReadInt32();
continue;
case 3635572UL:
- __MyProperty7__ = reader.ReadInt32();
+ ____result.MyProperty7 = reader.ReadInt32();
continue;
case 3701108UL:
- __MyProperty8__ = reader.ReadInt32();
+ ____result.MyProperty8 = reader.ReadInt32();
continue;
case 3766644UL:
- __MyProperty9__ = reader.ReadInt32();
+ ____result.MyProperty9 = reader.ReadInt32();
continue;
}
@@ -1756,25 +1717,24 @@ namespace MessagePack.Formatters.PerfBenchmarkDotNet
}
}
- var ____result = new global::PerfBenchmarkDotNet.StringKeySerializerTarget()
- {
- MyProperty1 = __MyProperty1__,
- MyProperty2 = __MyProperty2__,
- MyProperty3 = __MyProperty3__,
- MyProperty4 = __MyProperty4__,
- MyProperty5 = __MyProperty5__,
- MyProperty6 = __MyProperty6__,
- MyProperty7 = __MyProperty7__,
- MyProperty8 = __MyProperty8__,
- MyProperty9 = __MyProperty9__,
- };
-
reader.Depth--;
return ____result;
}
}
+
}
+#pragma warning restore 168
+#pragma warning restore 414
+#pragma warning restore 618
+#pragma warning restore 612
+
+#pragma warning restore SA1129 // Do not use default value type constructor
+#pragma warning restore SA1309 // Field names should not begin with underscore
+#pragma warning restore SA1312 // Variable names should begin with lower-case letter
+#pragma warning restore SA1403 // File may only contain a single namespace
+#pragma warning restore SA1649 // File name should match first type name
+
// <auto-generated>
// THIS (.cs) FILE IS GENERATED BY MPC(MessagePack-CSharp). DO NOT CHANGE IT.
// </auto-generated>
@@ -1783,9 +1743,9 @@ namespace MessagePack.Formatters.PerfBenchmarkDotNet
#pragma warning disable 612
#pragma warning disable 414
#pragma warning disable 168
+#pragma warning disable CS1591 // document public APIs
#pragma warning disable SA1129 // Do not use default value type constructor
-#pragma warning disable SA1200 // Using directives should be placed correctly
#pragma warning disable SA1309 // Field names should not begin with underscore
#pragma warning disable SA1312 // Variable names should begin with lower-case letter
#pragma warning disable SA1403 // File may only contain a single namespace
@@ -1793,14 +1753,10 @@ namespace MessagePack.Formatters.PerfBenchmarkDotNet
namespace MessagePack.Formatters.SharedData
{
- using System;
- using System.Buffers;
- using MessagePack;
-
public sealed class ArrayOptimizeClassFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.ArrayOptimizeClass>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.ArrayOptimizeClass value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.ArrayOptimizeClass value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -1827,7 +1783,7 @@ namespace MessagePack.Formatters.SharedData
writer.Write(value.MyProperty15);
}
- public global::SharedData.ArrayOptimizeClass Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.ArrayOptimizeClass Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -1836,74 +1792,59 @@ namespace MessagePack.Formatters.SharedData
options.Security.DepthStep(ref reader);
var length = reader.ReadArrayHeader();
- var __MyProperty0__ = default(int);
- var __MyProperty1__ = default(int);
- var __MyProperty2__ = default(int);
- var __MyProperty3__ = default(int);
- var __MyProperty4__ = default(int);
- var __MyProperty5__ = default(int);
- var __MyProperty6__ = default(int);
- var __MyProperty7__ = default(int);
- var __MyProperty8__ = default(int);
- var __MyProvperty9__ = default(int);
- var __MyProperty10__ = default(int);
- var __MyProperty11__ = default(int);
- var __MyPropverty12__ = default(int);
- var __MyPropevrty13__ = default(int);
- var __MyProperty14__ = default(int);
- var __MyProperty15__ = default(int);
+ var ____result = new global::SharedData.ArrayOptimizeClass();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
- __MyProperty0__ = reader.ReadInt32();
+ ____result.MyProperty0 = reader.ReadInt32();
break;
case 1:
- __MyProperty1__ = reader.ReadInt32();
+ ____result.MyProperty1 = reader.ReadInt32();
break;
case 2:
- __MyProperty2__ = reader.ReadInt32();
+ ____result.MyProperty2 = reader.ReadInt32();
break;
case 3:
- __MyProperty3__ = reader.ReadInt32();
+ ____result.MyProperty3 = reader.ReadInt32();
break;
case 4:
- __MyProperty4__ = reader.ReadInt32();
+ ____result.MyProperty4 = reader.ReadInt32();
break;
case 5:
- __MyProperty5__ = reader.ReadInt32();
+ ____result.MyProperty5 = reader.ReadInt32();
break;
case 6:
- __MyProperty6__ = reader.ReadInt32();
+ ____result.MyProperty6 = reader.ReadInt32();
break;
case 7:
- __MyProperty7__ = reader.ReadInt32();
+ ____result.MyProperty7 = reader.ReadInt32();
break;
case 8:
- __MyProperty8__ = reader.ReadInt32();
+ ____result.MyProperty8 = reader.ReadInt32();
break;
case 9:
- __MyProvperty9__ = reader.ReadInt32();
+ ____result.MyProvperty9 = reader.ReadInt32();
break;
case 10:
- __MyProperty10__ = reader.ReadInt32();
+ ____result.MyProperty10 = reader.ReadInt32();
break;
case 11:
- __MyProperty11__ = reader.ReadInt32();
+ ____result.MyProperty11 = reader.ReadInt32();
break;
case 12:
- __MyPropverty12__ = reader.ReadInt32();
+ ____result.MyPropverty12 = reader.ReadInt32();
break;
case 13:
- __MyPropevrty13__ = reader.ReadInt32();
+ ____result.MyPropevrty13 = reader.ReadInt32();
break;
case 14:
- __MyProperty14__ = reader.ReadInt32();
+ ____result.MyProperty14 = reader.ReadInt32();
break;
case 15:
- __MyProperty15__ = reader.ReadInt32();
+ ____result.MyProperty15 = reader.ReadInt32();
break;
default:
reader.Skip();
@@ -1911,23 +1852,6 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.ArrayOptimizeClass();
- ____result.MyProperty0 = __MyProperty0__;
- ____result.MyProperty1 = __MyProperty1__;
- ____result.MyProperty2 = __MyProperty2__;
- ____result.MyProperty3 = __MyProperty3__;
- ____result.MyProperty4 = __MyProperty4__;
- ____result.MyProperty5 = __MyProperty5__;
- ____result.MyProperty6 = __MyProperty6__;
- ____result.MyProperty7 = __MyProperty7__;
- ____result.MyProperty8 = __MyProperty8__;
- ____result.MyProvperty9 = __MyProvperty9__;
- ____result.MyProperty10 = __MyProperty10__;
- ____result.MyProperty11 = __MyProperty11__;
- ____result.MyPropverty12 = __MyPropverty12__;
- ____result.MyPropevrty13 = __MyPropevrty13__;
- ____result.MyProperty14 = __MyProperty14__;
- ____result.MyProperty15 = __MyProperty15__;
reader.Depth--;
return ____result;
}
@@ -1936,7 +1860,7 @@ namespace MessagePack.Formatters.SharedData
public sealed class BarClassFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.BarClass>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.BarClass value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.BarClass value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -1944,12 +1868,12 @@ namespace MessagePack.Formatters.SharedData
return;
}
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
writer.WriteArrayHeader(1);
- formatterResolver.GetFormatterWithVerify<string>().Serialize(ref writer, value.OPQ, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Serialize(ref writer, value.OPQ, options);
}
- public global::SharedData.BarClass Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.BarClass Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -1957,16 +1881,16 @@ namespace MessagePack.Formatters.SharedData
}
options.Security.DepthStep(ref reader);
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
var length = reader.ReadArrayHeader();
- var __OPQ__ = default(string);
+ var ____result = new global::SharedData.BarClass();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
- __OPQ__ = formatterResolver.GetFormatterWithVerify<string>().Deserialize(ref reader, options);
+ ____result.OPQ = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Deserialize(ref reader, options);
break;
default:
reader.Skip();
@@ -1974,8 +1898,6 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.BarClass();
- ____result.OPQ = __OPQ__;
reader.Depth--;
return ____result;
}
@@ -1984,7 +1906,7 @@ namespace MessagePack.Formatters.SharedData
public sealed class Callback1Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.Callback1>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.Callback1 value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.Callback1 value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -1997,7 +1919,7 @@ namespace MessagePack.Formatters.SharedData
writer.Write(value.X);
}
- public global::SharedData.Callback1 Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.Callback1 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -2022,7 +1944,6 @@ namespace MessagePack.Formatters.SharedData
}
var ____result = new global::SharedData.Callback1(__X__);
- ____result.X = __X__;
____result.OnAfterDeserialize();
reader.Depth--;
return ____result;
@@ -2032,7 +1953,7 @@ namespace MessagePack.Formatters.SharedData
public sealed class Callback1_2Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.Callback1_2>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.Callback1_2 value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.Callback1_2 value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -2040,12 +1961,12 @@ namespace MessagePack.Formatters.SharedData
return;
}
- ((IMessagePackSerializationCallbackReceiver)value).OnBeforeSerialize();
+ ((global::MessagePack.IMessagePackSerializationCallbackReceiver)value).OnBeforeSerialize();
writer.WriteArrayHeader(1);
writer.Write(value.X);
}
- public global::SharedData.Callback1_2 Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.Callback1_2 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -2070,81 +1991,61 @@ namespace MessagePack.Formatters.SharedData
}
var ____result = new global::SharedData.Callback1_2(__X__);
- ____result.X = __X__;
- ((IMessagePackSerializationCallbackReceiver)____result).OnAfterDeserialize();
+ ((global::MessagePack.IMessagePackSerializationCallbackReceiver)____result).OnAfterDeserialize();
reader.Depth--;
return ____result;
}
}
- public sealed class DynamicArgumentTupleFormatter<T1,T2,T3,T4,T5,T6,T7,T8,T9> : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.DynamicArgumentTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>>
+ public sealed class DefaultValueIntKeyClassWithExplicitConstructorFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.DefaultValueIntKeyClassWithExplicitConstructor>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.DynamicArgumentTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9> value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.DefaultValueIntKeyClassWithExplicitConstructor value, global::MessagePack.MessagePackSerializerOptions options)
{
- IFormatterResolver formatterResolver = options.Resolver;
- writer.WriteArrayHeader(9);
- formatterResolver.GetFormatterWithVerify<T1>().Serialize(ref writer, value.Item1, options);
- formatterResolver.GetFormatterWithVerify<T2>().Serialize(ref writer, value.Item2, options);
- formatterResolver.GetFormatterWithVerify<T3>().Serialize(ref writer, value.Item3, options);
- formatterResolver.GetFormatterWithVerify<T4>().Serialize(ref writer, value.Item4, options);
- formatterResolver.GetFormatterWithVerify<T5>().Serialize(ref writer, value.Item5, options);
- formatterResolver.GetFormatterWithVerify<T6>().Serialize(ref writer, value.Item6, options);
- formatterResolver.GetFormatterWithVerify<T7>().Serialize(ref writer, value.Item7, options);
- formatterResolver.GetFormatterWithVerify<T8>().Serialize(ref writer, value.Item8, options);
- formatterResolver.GetFormatterWithVerify<T9>().Serialize(ref writer, value.Item9, options);
+ if (value == null)
+ {
+ writer.WriteNil();
+ return;
+ }
+
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
+ writer.WriteArrayHeader(4);
+ writer.Write(value.Prop1);
+ writer.Write(value.Prop2);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Serialize(ref writer, value.Prop3, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Serialize(ref writer, value.Prop4, options);
}
- public global::SharedData.DynamicArgumentTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9> Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.DefaultValueIntKeyClassWithExplicitConstructor Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
- throw new InvalidOperationException("typecode is null, struct not supported");
+ return null;
}
options.Security.DepthStep(ref reader);
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
var length = reader.ReadArrayHeader();
- var __Item1__ = default(T1);
- var __Item2__ = default(T2);
- var __Item3__ = default(T3);
- var __Item4__ = default(T4);
- var __Item5__ = default(T5);
- var __Item6__ = default(T6);
- var __Item7__ = default(T7);
- var __Item8__ = default(T8);
- var __Item9__ = default(T9);
+ var __Prop1__ = default(int);
+ var __Prop2__ = default(int);
+ var __Prop3__ = default(string);
+ var __Prop4__ = default(string);
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
- __Item1__ = formatterResolver.GetFormatterWithVerify<T1>().Deserialize(ref reader, options);
+ __Prop1__ = reader.ReadInt32();
break;
case 1:
- __Item2__ = formatterResolver.GetFormatterWithVerify<T2>().Deserialize(ref reader, options);
+ __Prop2__ = reader.ReadInt32();
break;
case 2:
- __Item3__ = formatterResolver.GetFormatterWithVerify<T3>().Deserialize(ref reader, options);
+ __Prop3__ = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Deserialize(ref reader, options);
break;
case 3:
- __Item4__ = formatterResolver.GetFormatterWithVerify<T4>().Deserialize(ref reader, options);
- break;
- case 4:
- __Item5__ = formatterResolver.GetFormatterWithVerify<T5>().Deserialize(ref reader, options);
- break;
- case 5:
- __Item6__ = formatterResolver.GetFormatterWithVerify<T6>().Deserialize(ref reader, options);
- break;
- case 6:
- __Item7__ = formatterResolver.GetFormatterWithVerify<T7>().Deserialize(ref reader, options);
- break;
- case 7:
- __Item8__ = formatterResolver.GetFormatterWithVerify<T8>().Deserialize(ref reader, options);
- break;
- case 8:
- __Item9__ = formatterResolver.GetFormatterWithVerify<T9>().Deserialize(ref reader, options);
+ __Prop4__ = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Deserialize(ref reader, options);
break;
default:
reader.Skip();
@@ -2152,16 +2053,36 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.DynamicArgumentTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>(__Item1__, __Item2__, __Item3__, __Item4__, __Item5__, __Item6__, __Item7__, __Item8__, __Item9__);
+ var ____result = new global::SharedData.DefaultValueIntKeyClassWithExplicitConstructor(__Prop1__);
+ if (length <= 1)
+ {
+ goto MEMBER_ASSIGNMENT_END;
+ }
+
+ ____result.Prop2 = __Prop2__;
+ if (length <= 2)
+ {
+ goto MEMBER_ASSIGNMENT_END;
+ }
+
+ ____result.Prop3 = __Prop3__;
+ if (length <= 3)
+ {
+ goto MEMBER_ASSIGNMENT_END;
+ }
+
+ ____result.Prop4 = __Prop4__;
+
+ MEMBER_ASSIGNMENT_END:
reader.Depth--;
return ____result;
}
}
- public sealed class Empty1Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.Empty1>
+ public sealed class DefaultValueIntKeyClassWithoutExplicitConstructorFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.DefaultValueIntKeyClassWithoutExplicitConstructor>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.Empty1 value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.DefaultValueIntKeyClassWithoutExplicitConstructor value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -2169,10 +2090,12 @@ namespace MessagePack.Formatters.SharedData
return;
}
- writer.WriteArrayHeader(0);
+ writer.WriteArrayHeader(2);
+ writer.Write(value.Prop1);
+ writer.Write(value.Prop2);
}
- public global::SharedData.Empty1 Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.DefaultValueIntKeyClassWithoutExplicitConstructor Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -2181,101 +2104,238 @@ namespace MessagePack.Formatters.SharedData
options.Security.DepthStep(ref reader);
var length = reader.ReadArrayHeader();
+ var ____result = new global::SharedData.DefaultValueIntKeyClassWithoutExplicitConstructor();
for (int i = 0; i < length; i++)
{
switch (i)
{
+ case 0:
+ ____result.Prop1 = reader.ReadInt32();
+ break;
+ case 1:
+ ____result.Prop2 = reader.ReadInt32();
+ break;
default:
reader.Skip();
break;
}
}
- var ____result = new global::SharedData.Empty1();
reader.Depth--;
return ____result;
}
}
- public sealed class EmptyClassFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.EmptyClass>
+ public sealed class DefaultValueIntKeyStructWithExplicitConstructorFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.DefaultValueIntKeyStructWithExplicitConstructor>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.EmptyClass value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.DefaultValueIntKeyStructWithExplicitConstructor value, global::MessagePack.MessagePackSerializerOptions options)
{
- if (value == null)
- {
- writer.WriteNil();
- return;
- }
-
- writer.WriteArrayHeader(0);
+ writer.WriteArrayHeader(2);
+ writer.Write(value.Prop1);
+ writer.Write(value.Prop2);
}
- public global::SharedData.EmptyClass Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.DefaultValueIntKeyStructWithExplicitConstructor Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
- return null;
+ throw new global::System.InvalidOperationException("typecode is null, struct not supported");
}
options.Security.DepthStep(ref reader);
var length = reader.ReadArrayHeader();
+ var __Prop1__ = default(int);
+ var __Prop2__ = default(int);
for (int i = 0; i < length; i++)
{
switch (i)
{
+ case 0:
+ __Prop1__ = reader.ReadInt32();
+ break;
+ case 1:
+ __Prop2__ = reader.ReadInt32();
+ break;
default:
reader.Skip();
break;
}
}
- var ____result = new global::SharedData.EmptyClass();
+ var ____result = new global::SharedData.DefaultValueIntKeyStructWithExplicitConstructor(__Prop1__);
+ if (length <= 1)
+ {
+ goto MEMBER_ASSIGNMENT_END;
+ }
+
+ ____result.Prop2 = __Prop2__;
+
+ MEMBER_ASSIGNMENT_END:
reader.Depth--;
return ____result;
}
}
- public sealed class EmptyStructFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.EmptyStruct>
+ public sealed class DynamicArgumentTupleFormatter<T1, T2, T3, T4, T5, T6, T7, T8, T9> : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.DynamicArgumentTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.EmptyStruct value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.DynamicArgumentTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9> value, global::MessagePack.MessagePackSerializerOptions options)
{
- writer.WriteArrayHeader(0);
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
+ writer.WriteArrayHeader(9);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T1>(formatterResolver).Serialize(ref writer, value.Item1, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T2>(formatterResolver).Serialize(ref writer, value.Item2, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T3>(formatterResolver).Serialize(ref writer, value.Item3, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T4>(formatterResolver).Serialize(ref writer, value.Item4, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T5>(formatterResolver).Serialize(ref writer, value.Item5, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T6>(formatterResolver).Serialize(ref writer, value.Item6, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T7>(formatterResolver).Serialize(ref writer, value.Item7, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T8>(formatterResolver).Serialize(ref writer, value.Item8, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T9>(formatterResolver).Serialize(ref writer, value.Item9, options);
}
- public global::SharedData.EmptyStruct Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.DynamicArgumentTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9> Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
- throw new InvalidOperationException("typecode is null, struct not supported");
+ throw new global::System.InvalidOperationException("typecode is null, struct not supported");
}
options.Security.DepthStep(ref reader);
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
var length = reader.ReadArrayHeader();
+ var __Item1__ = default(T1);
+ var __Item2__ = default(T2);
+ var __Item3__ = default(T3);
+ var __Item4__ = default(T4);
+ var __Item5__ = default(T5);
+ var __Item6__ = default(T6);
+ var __Item7__ = default(T7);
+ var __Item8__ = default(T8);
+ var __Item9__ = default(T9);
for (int i = 0; i < length; i++)
{
switch (i)
{
+ case 0:
+ __Item1__ = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T1>(formatterResolver).Deserialize(ref reader, options);
+ break;
+ case 1:
+ __Item2__ = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T2>(formatterResolver).Deserialize(ref reader, options);
+ break;
+ case 2:
+ __Item3__ = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T3>(formatterResolver).Deserialize(ref reader, options);
+ break;
+ case 3:
+ __Item4__ = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T4>(formatterResolver).Deserialize(ref reader, options);
+ break;
+ case 4:
+ __Item5__ = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T5>(formatterResolver).Deserialize(ref reader, options);
+ break;
+ case 5:
+ __Item6__ = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T6>(formatterResolver).Deserialize(ref reader, options);
+ break;
+ case 6:
+ __Item7__ = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T7>(formatterResolver).Deserialize(ref reader, options);
+ break;
+ case 7:
+ __Item8__ = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T8>(formatterResolver).Deserialize(ref reader, options);
+ break;
+ case 8:
+ __Item9__ = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T9>(formatterResolver).Deserialize(ref reader, options);
+ break;
default:
reader.Skip();
break;
}
}
- var ____result = new global::SharedData.EmptyStruct();
+ var ____result = new global::SharedData.DynamicArgumentTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>(__Item1__, __Item2__, __Item3__, __Item4__, __Item5__, __Item6__, __Item7__, __Item8__, __Item9__);
reader.Depth--;
return ____result;
}
}
+ public sealed class Empty1Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.Empty1>
+ {
+
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.Empty1 value, global::MessagePack.MessagePackSerializerOptions options)
+ {
+ if (value == null)
+ {
+ writer.WriteNil();
+ return;
+ }
+
+ writer.WriteArrayHeader(0);
+ }
+
+ public global::SharedData.Empty1 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ {
+ if (reader.TryReadNil())
+ {
+ return null;
+ }
+
+ reader.Skip();
+ return new global::SharedData.Empty1();
+ }
+ }
+
+ public sealed class EmptyClassFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.EmptyClass>
+ {
+
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.EmptyClass value, global::MessagePack.MessagePackSerializerOptions options)
+ {
+ if (value == null)
+ {
+ writer.WriteNil();
+ return;
+ }
+
+ writer.WriteArrayHeader(0);
+ }
+
+ public global::SharedData.EmptyClass Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ {
+ if (reader.TryReadNil())
+ {
+ return null;
+ }
+
+ reader.Skip();
+ return new global::SharedData.EmptyClass();
+ }
+ }
+
+ public sealed class EmptyStructFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.EmptyStruct>
+ {
+
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.EmptyStruct value, global::MessagePack.MessagePackSerializerOptions options)
+ {
+ writer.WriteArrayHeader(0);
+ }
+
+ public global::SharedData.EmptyStruct Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ {
+ if (reader.TryReadNil())
+ {
+ throw new global::System.InvalidOperationException("typecode is null, struct not supported");
+ }
+
+ reader.Skip();
+ return new global::SharedData.EmptyStruct();
+ }
+ }
+
public sealed class FirstSimpleDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.FirstSimpleData>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.FirstSimpleData value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.FirstSimpleData value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -2283,14 +2343,14 @@ namespace MessagePack.Formatters.SharedData
return;
}
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
writer.WriteArrayHeader(3);
writer.Write(value.Prop1);
- formatterResolver.GetFormatterWithVerify<string>().Serialize(ref writer, value.Prop2, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Serialize(ref writer, value.Prop2, options);
writer.Write(value.Prop3);
}
- public global::SharedData.FirstSimpleData Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.FirstSimpleData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -2298,24 +2358,22 @@ namespace MessagePack.Formatters.SharedData
}
options.Security.DepthStep(ref reader);
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
var length = reader.ReadArrayHeader();
- var __Prop1__ = default(int);
- var __Prop2__ = default(string);
- var __Prop3__ = default(int);
+ var ____result = new global::SharedData.FirstSimpleData();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
- __Prop1__ = reader.ReadInt32();
+ ____result.Prop1 = reader.ReadInt32();
break;
case 1:
- __Prop2__ = formatterResolver.GetFormatterWithVerify<string>().Deserialize(ref reader, options);
+ ____result.Prop2 = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Deserialize(ref reader, options);
break;
case 2:
- __Prop3__ = reader.ReadInt32();
+ ____result.Prop3 = reader.ReadInt32();
break;
default:
reader.Skip();
@@ -2323,10 +2381,6 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.FirstSimpleData();
- ____result.Prop1 = __Prop1__;
- ____result.Prop2 = __Prop2__;
- ____result.Prop3 = __Prop3__;
reader.Depth--;
return ____result;
}
@@ -2335,7 +2389,7 @@ namespace MessagePack.Formatters.SharedData
public sealed class FooClassFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.FooClass>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.FooClass value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.FooClass value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -2347,7 +2401,7 @@ namespace MessagePack.Formatters.SharedData
writer.Write(value.XYZ);
}
- public global::SharedData.FooClass Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.FooClass Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -2356,14 +2410,14 @@ namespace MessagePack.Formatters.SharedData
options.Security.DepthStep(ref reader);
var length = reader.ReadArrayHeader();
- var __XYZ__ = default(int);
+ var ____result = new global::SharedData.FooClass();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
- __XYZ__ = reader.ReadInt32();
+ ____result.XYZ = reader.ReadInt32();
break;
default:
reader.Skip();
@@ -2371,17 +2425,15 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.FooClass();
- ____result.XYZ = __XYZ__;
reader.Depth--;
return ____result;
}
}
- public sealed class GenericClassFormatter<T1,T2> : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.GenericClass<T1, T2>>
+ public sealed class GenericClassFormatter<T1, T2> : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.GenericClass<T1, T2>>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.GenericClass<T1, T2> value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.GenericClass<T1, T2> value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -2389,13 +2441,13 @@ namespace MessagePack.Formatters.SharedData
return;
}
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
writer.WriteArrayHeader(2);
- formatterResolver.GetFormatterWithVerify<T1>().Serialize(ref writer, value.MyProperty0, options);
- formatterResolver.GetFormatterWithVerify<T2>().Serialize(ref writer, value.MyProperty1, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T1>(formatterResolver).Serialize(ref writer, value.MyProperty0, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T2>(formatterResolver).Serialize(ref writer, value.MyProperty1, options);
}
- public global::SharedData.GenericClass<T1, T2> Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.GenericClass<T1, T2> Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -2403,20 +2455,19 @@ namespace MessagePack.Formatters.SharedData
}
options.Security.DepthStep(ref reader);
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
var length = reader.ReadArrayHeader();
- var __MyProperty0__ = default(T1);
- var __MyProperty1__ = default(T2);
+ var ____result = new global::SharedData.GenericClass<T1, T2>();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
- __MyProperty0__ = formatterResolver.GetFormatterWithVerify<T1>().Deserialize(ref reader, options);
+ ____result.MyProperty0 = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T1>(formatterResolver).Deserialize(ref reader, options);
break;
case 1:
- __MyProperty1__ = formatterResolver.GetFormatterWithVerify<T2>().Deserialize(ref reader, options);
+ ____result.MyProperty1 = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T2>(formatterResolver).Deserialize(ref reader, options);
break;
default:
reader.Skip();
@@ -2424,20 +2475,17 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.GenericClass<T1, T2>();
- ____result.MyProperty0 = __MyProperty0__;
- ____result.MyProperty1 = __MyProperty1__;
reader.Depth--;
return ____result;
}
}
- public sealed class GenericConstrainedClassIntKeyFormatter<T1,T2> : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.GenericConstrainedClassIntKey<T1, T2>>
+ public sealed class GenericConstrainedClassIntKeyFormatter<T1, T2> : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.GenericConstrainedClassIntKey<T1, T2>>
where T1 : class
where T2 : class, global::System.Collections.Generic.IEqualityComparer<T1>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.GenericConstrainedClassIntKey<T1, T2> value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.GenericConstrainedClassIntKey<T1, T2> value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -2445,13 +2493,13 @@ namespace MessagePack.Formatters.SharedData
return;
}
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
writer.WriteArrayHeader(2);
- formatterResolver.GetFormatterWithVerify<T1>().Serialize(ref writer, value.MyProperty0, options);
- formatterResolver.GetFormatterWithVerify<T2>().Serialize(ref writer, value.Comparer, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T1>(formatterResolver).Serialize(ref writer, value.MyProperty0, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T2>(formatterResolver).Serialize(ref writer, value.Comparer, options);
}
- public global::SharedData.GenericConstrainedClassIntKey<T1, T2> Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.GenericConstrainedClassIntKey<T1, T2> Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -2459,20 +2507,19 @@ namespace MessagePack.Formatters.SharedData
}
options.Security.DepthStep(ref reader);
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
var length = reader.ReadArrayHeader();
- var __MyProperty0__ = default(T1);
- var __Comparer__ = default(T2);
+ var ____result = new global::SharedData.GenericConstrainedClassIntKey<T1, T2>();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
- __MyProperty0__ = formatterResolver.GetFormatterWithVerify<T1>().Deserialize(ref reader, options);
+ ____result.MyProperty0 = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T1>(formatterResolver).Deserialize(ref reader, options);
break;
case 1:
- __Comparer__ = formatterResolver.GetFormatterWithVerify<T2>().Deserialize(ref reader, options);
+ ____result.Comparer = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T2>(formatterResolver).Deserialize(ref reader, options);
break;
default:
reader.Skip();
@@ -2480,49 +2527,45 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.GenericConstrainedClassIntKey<T1, T2>();
- ____result.MyProperty0 = __MyProperty0__;
- ____result.Comparer = __Comparer__;
reader.Depth--;
return ____result;
}
}
- public sealed class GenericConstrainedStructIntKeyFormatter<T1,T2> : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.GenericConstrainedStructIntKey<T1, T2>>
+ public sealed class GenericConstrainedStructIntKeyFormatter<T1, T2> : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.GenericConstrainedStructIntKey<T1, T2>>
where T1 : unmanaged
where T2 : unmanaged, global::System.Collections.Generic.IEqualityComparer<T1>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.GenericConstrainedStructIntKey<T1, T2> value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.GenericConstrainedStructIntKey<T1, T2> value, global::MessagePack.MessagePackSerializerOptions options)
{
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
writer.WriteArrayHeader(2);
- formatterResolver.GetFormatterWithVerify<T1>().Serialize(ref writer, value.MyProperty0, options);
- formatterResolver.GetFormatterWithVerify<T2>().Serialize(ref writer, value.Comparer, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T1>(formatterResolver).Serialize(ref writer, value.MyProperty0, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T2>(formatterResolver).Serialize(ref writer, value.Comparer, options);
}
- public global::SharedData.GenericConstrainedStructIntKey<T1, T2> Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.GenericConstrainedStructIntKey<T1, T2> Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
- throw new InvalidOperationException("typecode is null, struct not supported");
+ throw new global::System.InvalidOperationException("typecode is null, struct not supported");
}
options.Security.DepthStep(ref reader);
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
var length = reader.ReadArrayHeader();
- var __MyProperty0__ = default(T1);
- var __Comparer__ = default(T2);
+ var ____result = new global::SharedData.GenericConstrainedStructIntKey<T1, T2>();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
- __MyProperty0__ = formatterResolver.GetFormatterWithVerify<T1>().Deserialize(ref reader, options);
+ ____result.MyProperty0 = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T1>(formatterResolver).Deserialize(ref reader, options);
break;
case 1:
- __Comparer__ = formatterResolver.GetFormatterWithVerify<T2>().Deserialize(ref reader, options);
+ ____result.Comparer = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T2>(formatterResolver).Deserialize(ref reader, options);
break;
default:
reader.Skip();
@@ -2530,47 +2573,43 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.GenericConstrainedStructIntKey<T1, T2>();
- ____result.MyProperty0 = __MyProperty0__;
- ____result.Comparer = __Comparer__;
reader.Depth--;
return ____result;
}
}
- public sealed class GenericStructFormatter<T1,T2> : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.GenericStruct<T1, T2>>
+ public sealed class GenericStructFormatter<T1, T2> : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.GenericStruct<T1, T2>>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.GenericStruct<T1, T2> value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.GenericStruct<T1, T2> value, global::MessagePack.MessagePackSerializerOptions options)
{
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
writer.WriteArrayHeader(2);
- formatterResolver.GetFormatterWithVerify<T1>().Serialize(ref writer, value.MyProperty0, options);
- formatterResolver.GetFormatterWithVerify<T2>().Serialize(ref writer, value.MyProperty1, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T1>(formatterResolver).Serialize(ref writer, value.MyProperty0, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T2>(formatterResolver).Serialize(ref writer, value.MyProperty1, options);
}
- public global::SharedData.GenericStruct<T1, T2> Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.GenericStruct<T1, T2> Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
- throw new InvalidOperationException("typecode is null, struct not supported");
+ throw new global::System.InvalidOperationException("typecode is null, struct not supported");
}
options.Security.DepthStep(ref reader);
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
var length = reader.ReadArrayHeader();
- var __MyProperty0__ = default(T1);
- var __MyProperty1__ = default(T2);
+ var ____result = new global::SharedData.GenericStruct<T1, T2>();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
- __MyProperty0__ = formatterResolver.GetFormatterWithVerify<T1>().Deserialize(ref reader, options);
+ ____result.MyProperty0 = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T1>(formatterResolver).Deserialize(ref reader, options);
break;
case 1:
- __MyProperty1__ = formatterResolver.GetFormatterWithVerify<T2>().Deserialize(ref reader, options);
+ ____result.MyProperty1 = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T2>(formatterResolver).Deserialize(ref reader, options);
break;
default:
reader.Skip();
@@ -2578,9 +2617,6 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.GenericStruct<T1, T2>();
- ____result.MyProperty0 = __MyProperty0__;
- ____result.MyProperty1 = __MyProperty1__;
reader.Depth--;
return ____result;
}
@@ -2589,7 +2625,7 @@ namespace MessagePack.Formatters.SharedData
public sealed class HolderV0Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.HolderV0>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.HolderV0 value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.HolderV0 value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -2597,13 +2633,13 @@ namespace MessagePack.Formatters.SharedData
return;
}
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
writer.WriteArrayHeader(2);
- formatterResolver.GetFormatterWithVerify<global::SharedData.Version0>().Serialize(ref writer, value.MyProperty1, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::SharedData.Version0>(formatterResolver).Serialize(ref writer, value.MyProperty1, options);
writer.Write(value.After);
}
- public global::SharedData.HolderV0 Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.HolderV0 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -2611,20 +2647,19 @@ namespace MessagePack.Formatters.SharedData
}
options.Security.DepthStep(ref reader);
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
var length = reader.ReadArrayHeader();
- var __MyProperty1__ = default(global::SharedData.Version0);
- var __After__ = default(int);
+ var ____result = new global::SharedData.HolderV0();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
- __MyProperty1__ = formatterResolver.GetFormatterWithVerify<global::SharedData.Version0>().Deserialize(ref reader, options);
+ ____result.MyProperty1 = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::SharedData.Version0>(formatterResolver).Deserialize(ref reader, options);
break;
case 1:
- __After__ = reader.ReadInt32();
+ ____result.After = reader.ReadInt32();
break;
default:
reader.Skip();
@@ -2632,9 +2667,6 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.HolderV0();
- ____result.MyProperty1 = __MyProperty1__;
- ____result.After = __After__;
reader.Depth--;
return ____result;
}
@@ -2643,7 +2675,7 @@ namespace MessagePack.Formatters.SharedData
public sealed class HolderV1Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.HolderV1>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.HolderV1 value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.HolderV1 value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -2651,13 +2683,13 @@ namespace MessagePack.Formatters.SharedData
return;
}
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
writer.WriteArrayHeader(2);
- formatterResolver.GetFormatterWithVerify<global::SharedData.Version1>().Serialize(ref writer, value.MyProperty1, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::SharedData.Version1>(formatterResolver).Serialize(ref writer, value.MyProperty1, options);
writer.Write(value.After);
}
- public global::SharedData.HolderV1 Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.HolderV1 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -2665,20 +2697,19 @@ namespace MessagePack.Formatters.SharedData
}
options.Security.DepthStep(ref reader);
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
var length = reader.ReadArrayHeader();
- var __MyProperty1__ = default(global::SharedData.Version1);
- var __After__ = default(int);
+ var ____result = new global::SharedData.HolderV1();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
- __MyProperty1__ = formatterResolver.GetFormatterWithVerify<global::SharedData.Version1>().Deserialize(ref reader, options);
+ ____result.MyProperty1 = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::SharedData.Version1>(formatterResolver).Deserialize(ref reader, options);
break;
case 1:
- __After__ = reader.ReadInt32();
+ ____result.After = reader.ReadInt32();
break;
default:
reader.Skip();
@@ -2686,9 +2717,6 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.HolderV1();
- ____result.MyProperty1 = __MyProperty1__;
- ____result.After = __After__;
reader.Depth--;
return ____result;
}
@@ -2697,7 +2725,7 @@ namespace MessagePack.Formatters.SharedData
public sealed class HolderV2Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.HolderV2>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.HolderV2 value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.HolderV2 value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -2705,13 +2733,13 @@ namespace MessagePack.Formatters.SharedData
return;
}
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
writer.WriteArrayHeader(2);
- formatterResolver.GetFormatterWithVerify<global::SharedData.Version2>().Serialize(ref writer, value.MyProperty1, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::SharedData.Version2>(formatterResolver).Serialize(ref writer, value.MyProperty1, options);
writer.Write(value.After);
}
- public global::SharedData.HolderV2 Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.HolderV2 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -2719,20 +2747,19 @@ namespace MessagePack.Formatters.SharedData
}
options.Security.DepthStep(ref reader);
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
var length = reader.ReadArrayHeader();
- var __MyProperty1__ = default(global::SharedData.Version2);
- var __After__ = default(int);
+ var ____result = new global::SharedData.HolderV2();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
- __MyProperty1__ = formatterResolver.GetFormatterWithVerify<global::SharedData.Version2>().Deserialize(ref reader, options);
+ ____result.MyProperty1 = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::SharedData.Version2>(formatterResolver).Deserialize(ref reader, options);
break;
case 1:
- __After__ = reader.ReadInt32();
+ ____result.After = reader.ReadInt32();
break;
default:
reader.Skip();
@@ -2740,9 +2767,6 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.HolderV2();
- ____result.MyProperty1 = __MyProperty1__;
- ____result.After = __After__;
reader.Depth--;
return ____result;
}
@@ -2751,7 +2775,7 @@ namespace MessagePack.Formatters.SharedData
public sealed class MyClassFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.MyClass>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.MyClass value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.MyClass value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -2765,7 +2789,7 @@ namespace MessagePack.Formatters.SharedData
writer.Write(value.MyProperty3);
}
- public global::SharedData.MyClass Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.MyClass Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -2774,22 +2798,20 @@ namespace MessagePack.Formatters.SharedData
options.Security.DepthStep(ref reader);
var length = reader.ReadArrayHeader();
- var __MyProperty1__ = default(int);
- var __MyProperty2__ = default(int);
- var __MyProperty3__ = default(int);
+ var ____result = new global::SharedData.MyClass();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
- __MyProperty1__ = reader.ReadInt32();
+ ____result.MyProperty1 = reader.ReadInt32();
break;
case 1:
- __MyProperty2__ = reader.ReadInt32();
+ ____result.MyProperty2 = reader.ReadInt32();
break;
case 2:
- __MyProperty3__ = reader.ReadInt32();
+ ____result.MyProperty3 = reader.ReadInt32();
break;
default:
reader.Skip();
@@ -2797,10 +2819,6 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.MyClass();
- ____result.MyProperty1 = __MyProperty1__;
- ____result.MyProperty2 = __MyProperty2__;
- ____result.MyProperty3 = __MyProperty3__;
reader.Depth--;
return ____result;
}
@@ -2809,7 +2827,7 @@ namespace MessagePack.Formatters.SharedData
public sealed class MySubUnion1Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.MySubUnion1>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.MySubUnion1 value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.MySubUnion1 value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -2824,7 +2842,7 @@ namespace MessagePack.Formatters.SharedData
writer.Write(value.One);
}
- public global::SharedData.MySubUnion1 Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.MySubUnion1 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -2833,14 +2851,14 @@ namespace MessagePack.Formatters.SharedData
options.Security.DepthStep(ref reader);
var length = reader.ReadArrayHeader();
- var __One__ = default(int);
+ var ____result = new global::SharedData.MySubUnion1();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 3:
- __One__ = reader.ReadInt32();
+ ____result.One = reader.ReadInt32();
break;
default:
reader.Skip();
@@ -2848,8 +2866,6 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.MySubUnion1();
- ____result.One = __One__;
reader.Depth--;
return ____result;
}
@@ -2858,7 +2874,7 @@ namespace MessagePack.Formatters.SharedData
public sealed class MySubUnion2Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.MySubUnion2>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.MySubUnion2 value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.MySubUnion2 value, global::MessagePack.MessagePackSerializerOptions options)
{
writer.WriteArrayHeader(6);
writer.WriteNil();
@@ -2869,23 +2885,23 @@ namespace MessagePack.Formatters.SharedData
writer.Write(value.Two);
}
- public global::SharedData.MySubUnion2 Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.MySubUnion2 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
- throw new InvalidOperationException("typecode is null, struct not supported");
+ throw new global::System.InvalidOperationException("typecode is null, struct not supported");
}
options.Security.DepthStep(ref reader);
var length = reader.ReadArrayHeader();
- var __Two__ = default(int);
+ var ____result = new global::SharedData.MySubUnion2();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 5:
- __Two__ = reader.ReadInt32();
+ ____result.Two = reader.ReadInt32();
break;
default:
reader.Skip();
@@ -2893,8 +2909,6 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.MySubUnion2();
- ____result.Two = __Two__;
reader.Depth--;
return ____result;
}
@@ -2903,7 +2917,7 @@ namespace MessagePack.Formatters.SharedData
public sealed class MySubUnion3Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.MySubUnion3>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.MySubUnion3 value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.MySubUnion3 value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -2917,7 +2931,7 @@ namespace MessagePack.Formatters.SharedData
writer.Write(value.Three);
}
- public global::SharedData.MySubUnion3 Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.MySubUnion3 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -2926,14 +2940,14 @@ namespace MessagePack.Formatters.SharedData
options.Security.DepthStep(ref reader);
var length = reader.ReadArrayHeader();
- var __Three__ = default(int);
+ var ____result = new global::SharedData.MySubUnion3();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 2:
- __Three__ = reader.ReadInt32();
+ ____result.Three = reader.ReadInt32();
break;
default:
reader.Skip();
@@ -2941,8 +2955,6 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.MySubUnion3();
- ____result.Three = __Three__;
reader.Depth--;
return ____result;
}
@@ -2951,7 +2963,7 @@ namespace MessagePack.Formatters.SharedData
public sealed class MySubUnion4Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.MySubUnion4>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.MySubUnion4 value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.MySubUnion4 value, global::MessagePack.MessagePackSerializerOptions options)
{
writer.WriteArrayHeader(8);
writer.WriteNil();
@@ -2964,23 +2976,23 @@ namespace MessagePack.Formatters.SharedData
writer.Write(value.Four);
}
- public global::SharedData.MySubUnion4 Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.MySubUnion4 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
- throw new InvalidOperationException("typecode is null, struct not supported");
+ throw new global::System.InvalidOperationException("typecode is null, struct not supported");
}
options.Security.DepthStep(ref reader);
var length = reader.ReadArrayHeader();
- var __Four__ = default(int);
+ var ____result = new global::SharedData.MySubUnion4();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 7:
- __Four__ = reader.ReadInt32();
+ ____result.Four = reader.ReadInt32();
break;
default:
reader.Skip();
@@ -2988,8 +3000,6 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.MySubUnion4();
- ____result.Four = __Four__;
reader.Depth--;
return ____result;
}
@@ -2998,7 +3008,7 @@ namespace MessagePack.Formatters.SharedData
public sealed class NestParent_NestContractFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.NestParent.NestContract>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.NestParent.NestContract value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.NestParent.NestContract value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -3010,7 +3020,7 @@ namespace MessagePack.Formatters.SharedData
writer.Write(value.MyProperty);
}
- public global::SharedData.NestParent.NestContract Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.NestParent.NestContract Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -3019,14 +3029,14 @@ namespace MessagePack.Formatters.SharedData
options.Security.DepthStep(ref reader);
var length = reader.ReadArrayHeader();
- var __MyProperty__ = default(int);
+ var ____result = new global::SharedData.NestParent.NestContract();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
- __MyProperty__ = reader.ReadInt32();
+ ____result.MyProperty = reader.ReadInt32();
break;
default:
reader.Skip();
@@ -3034,8 +3044,6 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.NestParent.NestContract();
- ____result.MyProperty = __MyProperty__;
reader.Depth--;
return ____result;
}
@@ -3044,7 +3052,7 @@ namespace MessagePack.Formatters.SharedData
public sealed class NonEmpty1Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.NonEmpty1>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.NonEmpty1 value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.NonEmpty1 value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -3056,7 +3064,7 @@ namespace MessagePack.Formatters.SharedData
writer.Write(value.MyProperty);
}
- public global::SharedData.NonEmpty1 Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.NonEmpty1 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -3065,14 +3073,14 @@ namespace MessagePack.Formatters.SharedData
options.Security.DepthStep(ref reader);
var length = reader.ReadArrayHeader();
- var __MyProperty__ = default(int);
+ var ____result = new global::SharedData.NonEmpty1();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
- __MyProperty__ = reader.ReadInt32();
+ ____result.MyProperty = reader.ReadInt32();
break;
default:
reader.Skip();
@@ -3080,8 +3088,6 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.NonEmpty1();
- ____result.MyProperty = __MyProperty__;
reader.Depth--;
return ____result;
}
@@ -3090,7 +3096,7 @@ namespace MessagePack.Formatters.SharedData
public sealed class SimpleIntKeyDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.SimpleIntKeyData>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.SimpleIntKeyData value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.SimpleIntKeyData value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -3098,18 +3104,18 @@ namespace MessagePack.Formatters.SharedData
return;
}
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
writer.WriteArrayHeader(7);
writer.Write(value.Prop1);
- formatterResolver.GetFormatterWithVerify<global::SharedData.ByteEnum>().Serialize(ref writer, value.Prop2, options);
- formatterResolver.GetFormatterWithVerify<string>().Serialize(ref writer, value.Prop3, options);
- formatterResolver.GetFormatterWithVerify<global::SharedData.SimpleStringKeyData>().Serialize(ref writer, value.Prop4, options);
- formatterResolver.GetFormatterWithVerify<global::SharedData.SimpleStructIntKeyData>().Serialize(ref writer, value.Prop5, options);
- formatterResolver.GetFormatterWithVerify<global::SharedData.SimpleStructStringKeyData>().Serialize(ref writer, value.Prop6, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::SharedData.ByteEnum>(formatterResolver).Serialize(ref writer, value.Prop2, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Serialize(ref writer, value.Prop3, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::SharedData.SimpleStringKeyData>(formatterResolver).Serialize(ref writer, value.Prop4, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::SharedData.SimpleStructIntKeyData>(formatterResolver).Serialize(ref writer, value.Prop5, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::SharedData.SimpleStructStringKeyData>(formatterResolver).Serialize(ref writer, value.Prop6, options);
writer.Write(value.BytesSpecial);
}
- public global::SharedData.SimpleIntKeyData Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.SimpleIntKeyData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -3117,40 +3123,34 @@ namespace MessagePack.Formatters.SharedData
}
options.Security.DepthStep(ref reader);
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
var length = reader.ReadArrayHeader();
- var __Prop1__ = default(int);
- var __Prop2__ = default(global::SharedData.ByteEnum);
- var __Prop3__ = default(string);
- var __Prop4__ = default(global::SharedData.SimpleStringKeyData);
- var __Prop5__ = default(global::SharedData.SimpleStructIntKeyData);
- var __Prop6__ = default(global::SharedData.SimpleStructStringKeyData);
- var __BytesSpecial__ = default(byte[]);
+ var ____result = new global::SharedData.SimpleIntKeyData();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
- __Prop1__ = reader.ReadInt32();
+ ____result.Prop1 = reader.ReadInt32();
break;
case 1:
- __Prop2__ = formatterResolver.GetFormatterWithVerify<global::SharedData.ByteEnum>().Deserialize(ref reader, options);
+ ____result.Prop2 = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::SharedData.ByteEnum>(formatterResolver).Deserialize(ref reader, options);
break;
case 2:
- __Prop3__ = formatterResolver.GetFormatterWithVerify<string>().Deserialize(ref reader, options);
+ ____result.Prop3 = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Deserialize(ref reader, options);
break;
case 3:
- __Prop4__ = formatterResolver.GetFormatterWithVerify<global::SharedData.SimpleStringKeyData>().Deserialize(ref reader, options);
+ ____result.Prop4 = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::SharedData.SimpleStringKeyData>(formatterResolver).Deserialize(ref reader, options);
break;
case 4:
- __Prop5__ = formatterResolver.GetFormatterWithVerify<global::SharedData.SimpleStructIntKeyData>().Deserialize(ref reader, options);
+ ____result.Prop5 = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::SharedData.SimpleStructIntKeyData>(formatterResolver).Deserialize(ref reader, options);
break;
case 5:
- __Prop6__ = formatterResolver.GetFormatterWithVerify<global::SharedData.SimpleStructStringKeyData>().Deserialize(ref reader, options);
+ ____result.Prop6 = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::SharedData.SimpleStructStringKeyData>(formatterResolver).Deserialize(ref reader, options);
break;
case 6:
- __BytesSpecial__ = reader.ReadBytes()?.ToArray();
+ ____result.BytesSpecial = global::MessagePack.Internal.CodeGenHelpers.GetArrayFromNullableSequence(reader.ReadBytes());
break;
default:
reader.Skip();
@@ -3158,14 +3158,6 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.SimpleIntKeyData();
- ____result.Prop1 = __Prop1__;
- ____result.Prop2 = __Prop2__;
- ____result.Prop3 = __Prop3__;
- ____result.Prop4 = __Prop4__;
- ____result.Prop5 = __Prop5__;
- ____result.Prop6 = __Prop6__;
- ____result.BytesSpecial = __BytesSpecial__;
reader.Depth--;
return ____result;
}
@@ -3174,7 +3166,7 @@ namespace MessagePack.Formatters.SharedData
public sealed class SimpleStructIntKeyDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.SimpleStructIntKeyData>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.SimpleStructIntKeyData value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.SimpleStructIntKeyData value, global::MessagePack.MessagePackSerializerOptions options)
{
writer.WriteArrayHeader(3);
writer.Write(value.X);
@@ -3182,31 +3174,29 @@ namespace MessagePack.Formatters.SharedData
writer.Write(value.BytesSpecial);
}
- public global::SharedData.SimpleStructIntKeyData Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.SimpleStructIntKeyData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
- throw new InvalidOperationException("typecode is null, struct not supported");
+ throw new global::System.InvalidOperationException("typecode is null, struct not supported");
}
options.Security.DepthStep(ref reader);
var length = reader.ReadArrayHeader();
- var __X__ = default(int);
- var __Y__ = default(int);
- var __BytesSpecial__ = default(byte[]);
+ var ____result = new global::SharedData.SimpleStructIntKeyData();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
- __X__ = reader.ReadInt32();
+ ____result.X = reader.ReadInt32();
break;
case 1:
- __Y__ = reader.ReadInt32();
+ ____result.Y = reader.ReadInt32();
break;
case 2:
- __BytesSpecial__ = reader.ReadBytes()?.ToArray();
+ ____result.BytesSpecial = global::MessagePack.Internal.CodeGenHelpers.GetArrayFromNullableSequence(reader.ReadBytes());
break;
default:
reader.Skip();
@@ -3214,10 +3204,6 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.SimpleStructIntKeyData();
- ____result.X = __X__;
- ____result.Y = __Y__;
- ____result.BytesSpecial = __BytesSpecial__;
reader.Depth--;
return ____result;
}
@@ -3226,7 +3212,7 @@ namespace MessagePack.Formatters.SharedData
public sealed class SubUnionType1Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.SubUnionType1>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.SubUnionType1 value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.SubUnionType1 value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -3239,7 +3225,7 @@ namespace MessagePack.Formatters.SharedData
writer.Write(value.MyProperty1);
}
- public global::SharedData.SubUnionType1 Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.SubUnionType1 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -3248,18 +3234,17 @@ namespace MessagePack.Formatters.SharedData
options.Security.DepthStep(ref reader);
var length = reader.ReadArrayHeader();
- var __MyProperty1__ = default(int);
- var __MyProperty__ = default(int);
+ var ____result = new global::SharedData.SubUnionType1();
for (int i = 0; i < length; i++)
{
switch (i)
{
- case 1:
- __MyProperty1__ = reader.ReadInt32();
- break;
case 0:
- __MyProperty__ = reader.ReadInt32();
+ ____result.MyProperty = reader.ReadInt32();
+ break;
+ case 1:
+ ____result.MyProperty1 = reader.ReadInt32();
break;
default:
reader.Skip();
@@ -3267,9 +3252,6 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.SubUnionType1();
- ____result.MyProperty1 = __MyProperty1__;
- ____result.MyProperty = __MyProperty__;
reader.Depth--;
return ____result;
}
@@ -3278,7 +3260,7 @@ namespace MessagePack.Formatters.SharedData
public sealed class SubUnionType2Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.SubUnionType2>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.SubUnionType2 value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.SubUnionType2 value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -3291,7 +3273,7 @@ namespace MessagePack.Formatters.SharedData
writer.Write(value.MyProperty2);
}
- public global::SharedData.SubUnionType2 Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.SubUnionType2 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -3300,18 +3282,17 @@ namespace MessagePack.Formatters.SharedData
options.Security.DepthStep(ref reader);
var length = reader.ReadArrayHeader();
- var __MyProperty2__ = default(int);
- var __MyProperty__ = default(int);
+ var ____result = new global::SharedData.SubUnionType2();
for (int i = 0; i < length; i++)
{
switch (i)
{
- case 1:
- __MyProperty2__ = reader.ReadInt32();
- break;
case 0:
- __MyProperty__ = reader.ReadInt32();
+ ____result.MyProperty = reader.ReadInt32();
+ break;
+ case 1:
+ ____result.MyProperty2 = reader.ReadInt32();
break;
default:
reader.Skip();
@@ -3319,9 +3300,6 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.SubUnionType2();
- ____result.MyProperty2 = __MyProperty2__;
- ____result.MyProperty = __MyProperty__;
reader.Depth--;
return ____result;
}
@@ -3330,7 +3308,7 @@ namespace MessagePack.Formatters.SharedData
public sealed class UnVersionBlockTestFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.UnVersionBlockTest>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.UnVersionBlockTest value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.UnVersionBlockTest value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -3344,7 +3322,7 @@ namespace MessagePack.Formatters.SharedData
writer.Write(value.MyProperty2);
}
- public global::SharedData.UnVersionBlockTest Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.UnVersionBlockTest Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -3353,18 +3331,17 @@ namespace MessagePack.Formatters.SharedData
options.Security.DepthStep(ref reader);
var length = reader.ReadArrayHeader();
- var __MyProperty__ = default(int);
- var __MyProperty2__ = default(int);
+ var ____result = new global::SharedData.UnVersionBlockTest();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
- __MyProperty__ = reader.ReadInt32();
+ ____result.MyProperty = reader.ReadInt32();
break;
case 2:
- __MyProperty2__ = reader.ReadInt32();
+ ____result.MyProperty2 = reader.ReadInt32();
break;
default:
reader.Skip();
@@ -3372,9 +3349,6 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.UnVersionBlockTest();
- ____result.MyProperty = __MyProperty__;
- ____result.MyProperty2 = __MyProperty2__;
reader.Depth--;
return ____result;
}
@@ -3383,18 +3357,18 @@ namespace MessagePack.Formatters.SharedData
public sealed class Vector2Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.Vector2>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.Vector2 value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.Vector2 value, global::MessagePack.MessagePackSerializerOptions options)
{
writer.WriteArrayHeader(2);
writer.Write(value.X);
writer.Write(value.Y);
}
- public global::SharedData.Vector2 Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.Vector2 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
- throw new InvalidOperationException("typecode is null, struct not supported");
+ throw new global::System.InvalidOperationException("typecode is null, struct not supported");
}
options.Security.DepthStep(ref reader);
@@ -3427,7 +3401,7 @@ namespace MessagePack.Formatters.SharedData
public sealed class Vector3LikeFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.Vector3Like>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.Vector3Like value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.Vector3Like value, global::MessagePack.MessagePackSerializerOptions options)
{
writer.WriteArrayHeader(3);
writer.Write(value.x);
@@ -3435,11 +3409,11 @@ namespace MessagePack.Formatters.SharedData
writer.Write(value.z);
}
- public global::SharedData.Vector3Like Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.Vector3Like Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
- throw new InvalidOperationException("typecode is null, struct not supported");
+ throw new global::System.InvalidOperationException("typecode is null, struct not supported");
}
options.Security.DepthStep(ref reader);
@@ -3468,9 +3442,6 @@ namespace MessagePack.Formatters.SharedData
}
var ____result = new global::SharedData.Vector3Like(__x__, __y__, __z__);
- ____result.x = __x__;
- ____result.y = __y__;
- ____result.z = __z__;
reader.Depth--;
return ____result;
}
@@ -3479,18 +3450,18 @@ namespace MessagePack.Formatters.SharedData
public sealed class VectorLike2Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.VectorLike2>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.VectorLike2 value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.VectorLike2 value, global::MessagePack.MessagePackSerializerOptions options)
{
writer.WriteArrayHeader(2);
writer.Write(value.x);
writer.Write(value.y);
}
- public global::SharedData.VectorLike2 Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.VectorLike2 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
- throw new InvalidOperationException("typecode is null, struct not supported");
+ throw new global::System.InvalidOperationException("typecode is null, struct not supported");
}
options.Security.DepthStep(ref reader);
@@ -3515,8 +3486,6 @@ namespace MessagePack.Formatters.SharedData
}
var ____result = new global::SharedData.VectorLike2(__x__, __y__);
- ____result.x = __x__;
- ____result.y = __y__;
reader.Depth--;
return ____result;
}
@@ -3525,7 +3494,7 @@ namespace MessagePack.Formatters.SharedData
public sealed class Version0Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.Version0>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.Version0 value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.Version0 value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -3540,7 +3509,7 @@ namespace MessagePack.Formatters.SharedData
writer.Write(value.MyProperty1);
}
- public global::SharedData.Version0 Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.Version0 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -3549,14 +3518,14 @@ namespace MessagePack.Formatters.SharedData
options.Security.DepthStep(ref reader);
var length = reader.ReadArrayHeader();
- var __MyProperty1__ = default(int);
+ var ____result = new global::SharedData.Version0();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 3:
- __MyProperty1__ = reader.ReadInt32();
+ ____result.MyProperty1 = reader.ReadInt32();
break;
default:
reader.Skip();
@@ -3564,8 +3533,6 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.Version0();
- ____result.MyProperty1 = __MyProperty1__;
reader.Depth--;
return ____result;
}
@@ -3574,7 +3541,7 @@ namespace MessagePack.Formatters.SharedData
public sealed class Version1Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.Version1>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.Version1 value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.Version1 value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -3591,7 +3558,7 @@ namespace MessagePack.Formatters.SharedData
writer.Write(value.MyProperty3);
}
- public global::SharedData.Version1 Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.Version1 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -3600,22 +3567,20 @@ namespace MessagePack.Formatters.SharedData
options.Security.DepthStep(ref reader);
var length = reader.ReadArrayHeader();
- var __MyProperty1__ = default(int);
- var __MyProperty2__ = default(int);
- var __MyProperty3__ = default(int);
+ var ____result = new global::SharedData.Version1();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 3:
- __MyProperty1__ = reader.ReadInt32();
+ ____result.MyProperty1 = reader.ReadInt32();
break;
case 4:
- __MyProperty2__ = reader.ReadInt32();
+ ____result.MyProperty2 = reader.ReadInt32();
break;
case 5:
- __MyProperty3__ = reader.ReadInt32();
+ ____result.MyProperty3 = reader.ReadInt32();
break;
default:
reader.Skip();
@@ -3623,10 +3588,6 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.Version1();
- ____result.MyProperty1 = __MyProperty1__;
- ____result.MyProperty2 = __MyProperty2__;
- ____result.MyProperty3 = __MyProperty3__;
reader.Depth--;
return ____result;
}
@@ -3635,7 +3596,7 @@ namespace MessagePack.Formatters.SharedData
public sealed class Version2Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.Version2>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.Version2 value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.Version2 value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -3654,7 +3615,7 @@ namespace MessagePack.Formatters.SharedData
writer.Write(value.MyProperty5);
}
- public global::SharedData.Version2 Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.Version2 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -3663,26 +3624,23 @@ namespace MessagePack.Formatters.SharedData
options.Security.DepthStep(ref reader);
var length = reader.ReadArrayHeader();
- var __MyProperty1__ = default(int);
- var __MyProperty2__ = default(int);
- var __MyProperty3__ = default(int);
- var __MyProperty5__ = default(int);
+ var ____result = new global::SharedData.Version2();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 3:
- __MyProperty1__ = reader.ReadInt32();
+ ____result.MyProperty1 = reader.ReadInt32();
break;
case 4:
- __MyProperty2__ = reader.ReadInt32();
+ ____result.MyProperty2 = reader.ReadInt32();
break;
case 5:
- __MyProperty3__ = reader.ReadInt32();
+ ____result.MyProperty3 = reader.ReadInt32();
break;
case 7:
- __MyProperty5__ = reader.ReadInt32();
+ ____result.MyProperty5 = reader.ReadInt32();
break;
default:
reader.Skip();
@@ -3690,11 +3648,6 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.Version2();
- ____result.MyProperty1 = __MyProperty1__;
- ____result.MyProperty2 = __MyProperty2__;
- ____result.MyProperty3 = __MyProperty3__;
- ____result.MyProperty5 = __MyProperty5__;
reader.Depth--;
return ____result;
}
@@ -3703,7 +3656,7 @@ namespace MessagePack.Formatters.SharedData
public sealed class VersionBlockTestFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.VersionBlockTest>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.VersionBlockTest value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.VersionBlockTest value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -3711,14 +3664,14 @@ namespace MessagePack.Formatters.SharedData
return;
}
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
writer.WriteArrayHeader(3);
writer.Write(value.MyProperty);
- formatterResolver.GetFormatterWithVerify<global::SharedData.MyClass>().Serialize(ref writer, value.UnknownBlock, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::SharedData.MyClass>(formatterResolver).Serialize(ref writer, value.UnknownBlock, options);
writer.Write(value.MyProperty2);
}
- public global::SharedData.VersionBlockTest Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.VersionBlockTest Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -3726,24 +3679,22 @@ namespace MessagePack.Formatters.SharedData
}
options.Security.DepthStep(ref reader);
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
var length = reader.ReadArrayHeader();
- var __MyProperty__ = default(int);
- var __UnknownBlock__ = default(global::SharedData.MyClass);
- var __MyProperty2__ = default(int);
+ var ____result = new global::SharedData.VersionBlockTest();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
- __MyProperty__ = reader.ReadInt32();
+ ____result.MyProperty = reader.ReadInt32();
break;
case 1:
- __UnknownBlock__ = formatterResolver.GetFormatterWithVerify<global::SharedData.MyClass>().Deserialize(ref reader, options);
+ ____result.UnknownBlock = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::SharedData.MyClass>(formatterResolver).Deserialize(ref reader, options);
break;
case 2:
- __MyProperty2__ = reader.ReadInt32();
+ ____result.MyProperty2 = reader.ReadInt32();
break;
default:
reader.Skip();
@@ -3751,10 +3702,6 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.VersionBlockTest();
- ____result.MyProperty = __MyProperty__;
- ____result.UnknownBlock = __UnknownBlock__;
- ____result.MyProperty2 = __MyProperty2__;
reader.Depth--;
return ____result;
}
@@ -3763,7 +3710,7 @@ namespace MessagePack.Formatters.SharedData
public sealed class VersioningUnionFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.VersioningUnion>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.VersioningUnion value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.VersioningUnion value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -3782,7 +3729,7 @@ namespace MessagePack.Formatters.SharedData
writer.Write(value.FV);
}
- public global::SharedData.VersioningUnion Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.VersioningUnion Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -3791,14 +3738,14 @@ namespace MessagePack.Formatters.SharedData
options.Security.DepthStep(ref reader);
var length = reader.ReadArrayHeader();
- var __FV__ = default(int);
+ var ____result = new global::SharedData.VersioningUnion();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 7:
- __FV__ = reader.ReadInt32();
+ ____result.FV = reader.ReadInt32();
break;
default:
reader.Skip();
@@ -3806,8 +3753,6 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.VersioningUnion();
- ____result.FV = __FV__;
reader.Depth--;
return ____result;
}
@@ -3816,7 +3761,7 @@ namespace MessagePack.Formatters.SharedData
public sealed class WithIndexerFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.WithIndexer>
{
- public void Serialize(ref MessagePackWriter writer, global::SharedData.WithIndexer value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.WithIndexer value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
@@ -3824,13 +3769,13 @@ namespace MessagePack.Formatters.SharedData
return;
}
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
writer.WriteArrayHeader(2);
writer.Write(value.Data1);
- formatterResolver.GetFormatterWithVerify<string>().Serialize(ref writer, value.Data2, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Serialize(ref writer, value.Data2, options);
}
- public global::SharedData.WithIndexer Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::SharedData.WithIndexer Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -3838,20 +3783,19 @@ namespace MessagePack.Formatters.SharedData
}
options.Security.DepthStep(ref reader);
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
var length = reader.ReadArrayHeader();
- var __Data1__ = default(int);
- var __Data2__ = default(string);
+ var ____result = new global::SharedData.WithIndexer();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
- __Data1__ = reader.ReadInt32();
+ ____result.Data1 = reader.ReadInt32();
break;
case 1:
- __Data2__ = formatterResolver.GetFormatterWithVerify<string>().Deserialize(ref reader, options);
+ ____result.Data2 = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Deserialize(ref reader, options);
break;
default:
reader.Skip();
@@ -3859,13 +3803,11 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.WithIndexer();
- ____result.Data1 = __Data1__;
- ____result.Data2 = __Data2__;
reader.Depth--;
return ____result;
}
}
+
}
#pragma warning restore 168
@@ -3874,7 +3816,6 @@ namespace MessagePack.Formatters.SharedData
#pragma warning restore 612
#pragma warning restore SA1129 // Do not use default value type constructor
-#pragma warning restore SA1200 // Using directives should be placed correctly
#pragma warning restore SA1309 // Field names should not begin with underscore
#pragma warning restore SA1312 // Variable names should begin with lower-case letter
#pragma warning restore SA1403 // File may only contain a single namespace
@@ -3888,9 +3829,9 @@ namespace MessagePack.Formatters.SharedData
#pragma warning disable 612
#pragma warning disable 414
#pragma warning disable 168
+#pragma warning disable CS1591 // document public APIs
#pragma warning disable SA1129 // Do not use default value type constructor
-#pragma warning disable SA1200 // Using directives should be placed correctly
#pragma warning disable SA1309 // Field names should not begin with underscore
#pragma warning disable SA1312 // Variable names should begin with lower-case letter
#pragma warning disable SA1403 // File may only contain a single namespace
@@ -3898,11 +3839,6 @@ namespace MessagePack.Formatters.SharedData
namespace MessagePack.Formatters.SharedData
{
- using System;
- using System.Buffers;
- using System.Runtime.InteropServices;
- using MessagePack;
-
public sealed class Callback2Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.Callback2>
{
// X
@@ -3929,7 +3865,7 @@ namespace MessagePack.Formatters.SharedData
for (int i = 0; i < length; i++)
{
- ReadOnlySpan<byte> stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
+ var stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
switch (stringKey.Length)
{
default:
@@ -3945,11 +3881,7 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.Callback2(__X__)
- {
- X = __X__,
- };
-
+ var ____result = new global::SharedData.Callback2(__X__);
____result.OnAfterDeserialize();
reader.Depth--;
return ____result;
@@ -3982,7 +3914,7 @@ namespace MessagePack.Formatters.SharedData
for (int i = 0; i < length; i++)
{
- ReadOnlySpan<byte> stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
+ var stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
switch (stringKey.Length)
{
default:
@@ -3998,20 +3930,213 @@ namespace MessagePack.Formatters.SharedData
}
}
- var ____result = new global::SharedData.Callback2_2(__X__)
+ var ____result = new global::SharedData.Callback2_2(__X__);
+ ((global::MessagePack.IMessagePackSerializationCallbackReceiver)____result).OnAfterDeserialize();
+ reader.Depth--;
+ return ____result;
+ }
+ }
+
+ public sealed class DefaultValueStringKeyClassWithExplicitConstructorFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.DefaultValueStringKeyClassWithExplicitConstructor>
+ {
+ // Prop1
+ private static global::System.ReadOnlySpan<byte> GetSpan_Prop1() => new byte[1 + 5] { 165, 80, 114, 111, 112, 49 };
+ // Prop2
+ private static global::System.ReadOnlySpan<byte> GetSpan_Prop2() => new byte[1 + 5] { 165, 80, 114, 111, 112, 50 };
+
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.DefaultValueStringKeyClassWithExplicitConstructor value, global::MessagePack.MessagePackSerializerOptions options)
+ {
+ if (value is null)
{
- X = __X__,
- };
+ writer.WriteNil();
+ return;
+ }
+
+ writer.WriteMapHeader(2);
+ writer.WriteRaw(GetSpan_Prop1());
+ writer.Write(value.Prop1);
+ writer.WriteRaw(GetSpan_Prop2());
+ writer.Write(value.Prop2);
+ }
+
+ public global::SharedData.DefaultValueStringKeyClassWithExplicitConstructor Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ {
+ if (reader.TryReadNil())
+ {
+ return null;
+ }
+
+ options.Security.DepthStep(ref reader);
+ var length = reader.ReadMapHeader();
+ var __Prop1__ = default(int);
+ var __Prop2__IsInitialized = false;
+ var __Prop2__ = default(int);
+
+ for (int i = 0; i < length; i++)
+ {
+ var stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
+ switch (stringKey.Length)
+ {
+ default:
+ FAIL:
+ reader.Skip();
+ continue;
+ case 5:
+ switch (global::MessagePack.Internal.AutomataKeyGen.GetKey(ref stringKey))
+ {
+ default: goto FAIL;
+ case 212339749456UL:
+ __Prop1__ = reader.ReadInt32();
+ continue;
+ case 216634716752UL:
+ __Prop2__IsInitialized = true;
+ __Prop2__ = reader.ReadInt32();
+ continue;
+ }
+
+ }
+ }
+
+ var ____result = new global::SharedData.DefaultValueStringKeyClassWithExplicitConstructor(__Prop1__);
+ if (__Prop2__IsInitialized)
+ {
+ ____result.Prop2 = __Prop2__;
+ }
- ((global::MessagePack.IMessagePackSerializationCallbackReceiver)____result).OnAfterDeserialize();
reader.Depth--;
return ____result;
}
}
- public sealed class Empty2Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.Empty2>
+ public sealed class DefaultValueStringKeyClassWithoutExplicitConstructorFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.DefaultValueStringKeyClassWithoutExplicitConstructor>
+ {
+ // Prop1
+ private static global::System.ReadOnlySpan<byte> GetSpan_Prop1() => new byte[1 + 5] { 165, 80, 114, 111, 112, 49 };
+ // Prop2
+ private static global::System.ReadOnlySpan<byte> GetSpan_Prop2() => new byte[1 + 5] { 165, 80, 114, 111, 112, 50 };
+
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.DefaultValueStringKeyClassWithoutExplicitConstructor value, global::MessagePack.MessagePackSerializerOptions options)
+ {
+ if (value is null)
+ {
+ writer.WriteNil();
+ return;
+ }
+
+ writer.WriteMapHeader(2);
+ writer.WriteRaw(GetSpan_Prop1());
+ writer.Write(value.Prop1);
+ writer.WriteRaw(GetSpan_Prop2());
+ writer.Write(value.Prop2);
+ }
+
+ public global::SharedData.DefaultValueStringKeyClassWithoutExplicitConstructor Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ {
+ if (reader.TryReadNil())
+ {
+ return null;
+ }
+
+ options.Security.DepthStep(ref reader);
+ var length = reader.ReadMapHeader();
+ var ____result = new global::SharedData.DefaultValueStringKeyClassWithoutExplicitConstructor();
+
+ for (int i = 0; i < length; i++)
+ {
+ var stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
+ switch (stringKey.Length)
+ {
+ default:
+ FAIL:
+ reader.Skip();
+ continue;
+ case 5:
+ switch (global::MessagePack.Internal.AutomataKeyGen.GetKey(ref stringKey))
+ {
+ default: goto FAIL;
+ case 212339749456UL:
+ ____result.Prop1 = reader.ReadInt32();
+ continue;
+ case 216634716752UL:
+ ____result.Prop2 = reader.ReadInt32();
+ continue;
+ }
+
+ }
+ }
+
+ reader.Depth--;
+ return ____result;
+ }
+ }
+
+ public sealed class DefaultValueStringKeyStructWithExplicitConstructorFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.DefaultValueStringKeyStructWithExplicitConstructor>
{
+ // Prop1
+ private static global::System.ReadOnlySpan<byte> GetSpan_Prop1() => new byte[1 + 5] { 165, 80, 114, 111, 112, 49 };
+ // Prop2
+ private static global::System.ReadOnlySpan<byte> GetSpan_Prop2() => new byte[1 + 5] { 165, 80, 114, 111, 112, 50 };
+
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.DefaultValueStringKeyStructWithExplicitConstructor value, global::MessagePack.MessagePackSerializerOptions options)
+ {
+ writer.WriteMapHeader(2);
+ writer.WriteRaw(GetSpan_Prop1());
+ writer.Write(value.Prop1);
+ writer.WriteRaw(GetSpan_Prop2());
+ writer.Write(value.Prop2);
+ }
+
+ public global::SharedData.DefaultValueStringKeyStructWithExplicitConstructor Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ {
+ if (reader.TryReadNil())
+ {
+ throw new global::System.InvalidOperationException("typecode is null, struct not supported");
+ }
+
+ options.Security.DepthStep(ref reader);
+ var length = reader.ReadMapHeader();
+ var __Prop1__ = default(int);
+ var __Prop2__IsInitialized = false;
+ var __Prop2__ = default(int);
+
+ for (int i = 0; i < length; i++)
+ {
+ var stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
+ switch (stringKey.Length)
+ {
+ default:
+ FAIL:
+ reader.Skip();
+ continue;
+ case 5:
+ switch (global::MessagePack.Internal.AutomataKeyGen.GetKey(ref stringKey))
+ {
+ default: goto FAIL;
+ case 212339749456UL:
+ __Prop1__ = reader.ReadInt32();
+ continue;
+ case 216634716752UL:
+ __Prop2__IsInitialized = true;
+ __Prop2__ = reader.ReadInt32();
+ continue;
+ }
+
+ }
+ }
+
+ var ____result = new global::SharedData.DefaultValueStringKeyStructWithExplicitConstructor(__Prop1__);
+ if (__Prop2__IsInitialized)
+ {
+ ____result.Prop2 = __Prop2__;
+ }
+
+ reader.Depth--;
+ return ____result;
+ }
+ }
+ public sealed class Empty2Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::SharedData.Empty2>
+ {
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.Empty2 value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value is null)
@@ -4053,12 +4178,12 @@ namespace MessagePack.Formatters.SharedData
return;
}
- IFormatterResolver formatterResolver = options.Resolver;
+ var formatterResolver = options.Resolver;
writer.WriteMapHeader(2);
writer.WriteRaw(GetSpan_MyProperty0());
- formatterResolver.GetFormatterWithVerify<T1>().Serialize(ref writer, value.MyProperty0, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T1>(formatterResolver).Serialize(ref writer, value.MyProperty0, options);
writer.WriteRaw(GetSpan_Comparer());
- formatterResolver.GetFormatterWithVerify<T2>().Serialize(ref writer, value.Comparer, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T2>(formatterResolver).Serialize(ref writer, value.Comparer, options);
}
public global::SharedData.GenericConstrainedClassStringKey<T1, T2> Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
@@ -4069,14 +4194,13 @@ namespace MessagePack.Formatters.SharedData
}
options.Security.DepthStep(ref reader);
- IFormatterResolver formatterResolver = options.Resolver;
+ var formatterResolver = options.Resolver;
var length = reader.ReadMapHeader();
- var __MyProperty0__ = default(T1);
- var __Comparer__ = default(T2);
+ var ____result = new global::SharedData.GenericConstrainedClassStringKey<T1, T2>();
for (int i = 0; i < length; i++)
{
- ReadOnlySpan<byte> stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
+ var stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
switch (stringKey.Length)
{
default:
@@ -4086,23 +4210,17 @@ namespace MessagePack.Formatters.SharedData
case 11:
if (!global::System.MemoryExtensions.SequenceEqual(stringKey, GetSpan_MyProperty0().Slice(1))) { goto FAIL; }
- __MyProperty0__ = formatterResolver.GetFormatterWithVerify<T1>().Deserialize(ref reader, options);
+ ____result.MyProperty0 = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T1>(formatterResolver).Deserialize(ref reader, options);
continue;
case 8:
if (global::MessagePack.Internal.AutomataKeyGen.GetKey(ref stringKey) != 8243120455795175235UL) { goto FAIL; }
- __Comparer__ = formatterResolver.GetFormatterWithVerify<T2>().Deserialize(ref reader, options);
+ ____result.Comparer = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T2>(formatterResolver).Deserialize(ref reader, options);
continue;
}
}
- var ____result = new global::SharedData.GenericConstrainedClassStringKey<T1, T2>()
- {
- MyProperty0 = __MyProperty0__,
- Comparer = __Comparer__,
- };
-
reader.Depth--;
return ____result;
}
@@ -4119,12 +4237,12 @@ namespace MessagePack.Formatters.SharedData
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.GenericConstrainedStructStringKey<T1, T2> value, global::MessagePack.MessagePackSerializerOptions options)
{
- IFormatterResolver formatterResolver = options.Resolver;
+ var formatterResolver = options.Resolver;
writer.WriteMapHeader(2);
writer.WriteRaw(GetSpan_MyProperty0());
- formatterResolver.GetFormatterWithVerify<T1>().Serialize(ref writer, value.MyProperty0, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T1>(formatterResolver).Serialize(ref writer, value.MyProperty0, options);
writer.WriteRaw(GetSpan_Comparer());
- formatterResolver.GetFormatterWithVerify<T2>().Serialize(ref writer, value.Comparer, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T2>(formatterResolver).Serialize(ref writer, value.Comparer, options);
}
public global::SharedData.GenericConstrainedStructStringKey<T1, T2> Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
@@ -4135,14 +4253,13 @@ namespace MessagePack.Formatters.SharedData
}
options.Security.DepthStep(ref reader);
- IFormatterResolver formatterResolver = options.Resolver;
+ var formatterResolver = options.Resolver;
var length = reader.ReadMapHeader();
- var __MyProperty0__ = default(T1);
- var __Comparer__ = default(T2);
+ var ____result = new global::SharedData.GenericConstrainedStructStringKey<T1, T2>();
for (int i = 0; i < length; i++)
{
- ReadOnlySpan<byte> stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
+ var stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
switch (stringKey.Length)
{
default:
@@ -4152,23 +4269,17 @@ namespace MessagePack.Formatters.SharedData
case 11:
if (!global::System.MemoryExtensions.SequenceEqual(stringKey, GetSpan_MyProperty0().Slice(1))) { goto FAIL; }
- __MyProperty0__ = formatterResolver.GetFormatterWithVerify<T1>().Deserialize(ref reader, options);
+ ____result.MyProperty0 = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T1>(formatterResolver).Deserialize(ref reader, options);
continue;
case 8:
if (global::MessagePack.Internal.AutomataKeyGen.GetKey(ref stringKey) != 8243120455795175235UL) { goto FAIL; }
- __Comparer__ = formatterResolver.GetFormatterWithVerify<T2>().Deserialize(ref reader, options);
+ ____result.Comparer = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T2>(formatterResolver).Deserialize(ref reader, options);
continue;
}
}
- var ____result = new global::SharedData.GenericConstrainedStructStringKey<T1, T2>()
- {
- MyProperty0 = __MyProperty0__,
- Comparer = __Comparer__,
- };
-
reader.Depth--;
return ____result;
}
@@ -4201,11 +4312,11 @@ namespace MessagePack.Formatters.SharedData
options.Security.DepthStep(ref reader);
var length = reader.ReadMapHeader();
- var __MyProperty__ = default(int);
+ var ____result = new global::SharedData.NonEmpty2();
for (int i = 0; i < length; i++)
{
- ReadOnlySpan<byte> stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
+ var stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
switch (stringKey.Length)
{
default:
@@ -4215,17 +4326,12 @@ namespace MessagePack.Formatters.SharedData
case 10:
if (!global::System.MemoryExtensions.SequenceEqual(stringKey, GetSpan_MyProperty().Slice(1))) { goto FAIL; }
- __MyProperty__ = reader.ReadInt32();
+ ____result.MyProperty = reader.ReadInt32();
continue;
}
}
- var ____result = new global::SharedData.NonEmpty2()
- {
- MyProperty = __MyProperty__,
- };
-
reader.Depth--;
return ____result;
}
@@ -4248,12 +4354,12 @@ namespace MessagePack.Formatters.SharedData
return;
}
- IFormatterResolver formatterResolver = options.Resolver;
+ var formatterResolver = options.Resolver;
writer.WriteMapHeader(3);
writer.WriteRaw(GetSpan_Prop1());
writer.Write(value.Prop1);
writer.WriteRaw(GetSpan_Prop2());
- formatterResolver.GetFormatterWithVerify<global::SharedData.ByteEnum>().Serialize(ref writer, value.Prop2, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::SharedData.ByteEnum>(formatterResolver).Serialize(ref writer, value.Prop2, options);
writer.WriteRaw(GetSpan_Prop3());
writer.Write(value.Prop3);
}
@@ -4266,15 +4372,13 @@ namespace MessagePack.Formatters.SharedData
}
options.Security.DepthStep(ref reader);
- IFormatterResolver formatterResolver = options.Resolver;
+ var formatterResolver = options.Resolver;
var length = reader.ReadMapHeader();
- var __Prop1__ = default(int);
- var __Prop2__ = default(global::SharedData.ByteEnum);
- var __Prop3__ = default(int);
+ var ____result = new global::SharedData.SimpleStringKeyData();
for (int i = 0; i < length; i++)
{
- ReadOnlySpan<byte> stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
+ var stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
switch (stringKey.Length)
{
default:
@@ -4286,26 +4390,19 @@ namespace MessagePack.Formatters.SharedData
{
default: goto FAIL;
case 212339749456UL:
- __Prop1__ = reader.ReadInt32();
+ ____result.Prop1 = reader.ReadInt32();
continue;
case 216634716752UL:
- __Prop2__ = formatterResolver.GetFormatterWithVerify<global::SharedData.ByteEnum>().Deserialize(ref reader, options);
+ ____result.Prop2 = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::SharedData.ByteEnum>(formatterResolver).Deserialize(ref reader, options);
continue;
case 220929684048UL:
- __Prop3__ = reader.ReadInt32();
+ ____result.Prop3 = reader.ReadInt32();
continue;
}
}
}
- var ____result = new global::SharedData.SimpleStringKeyData()
- {
- Prop1 = __Prop1__,
- Prop2 = __Prop2__,
- Prop3 = __Prop3__,
- };
-
reader.Depth--;
return ____result;
}
@@ -4320,12 +4417,12 @@ namespace MessagePack.Formatters.SharedData
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::SharedData.SimpleStructStringKeyData value, global::MessagePack.MessagePackSerializerOptions options)
{
- IFormatterResolver formatterResolver = options.Resolver;
+ var formatterResolver = options.Resolver;
writer.WriteMapHeader(2);
writer.WriteRaw(GetSpan_X());
writer.Write(value.X);
writer.WriteRaw(GetSpan_Y());
- formatterResolver.GetFormatterWithVerify<int[]>().Serialize(ref writer, value.Y, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<int[]>(formatterResolver).Serialize(ref writer, value.Y, options);
}
public global::SharedData.SimpleStructStringKeyData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
@@ -4336,14 +4433,13 @@ namespace MessagePack.Formatters.SharedData
}
options.Security.DepthStep(ref reader);
- IFormatterResolver formatterResolver = options.Resolver;
+ var formatterResolver = options.Resolver;
var length = reader.ReadMapHeader();
- var __X__ = default(int);
- var __Y__ = default(int[]);
+ var ____result = new global::SharedData.SimpleStructStringKeyData();
for (int i = 0; i < length; i++)
{
- ReadOnlySpan<byte> stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
+ var stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
switch (stringKey.Length)
{
default:
@@ -4355,25 +4451,31 @@ namespace MessagePack.Formatters.SharedData
{
default: goto FAIL;
case 378720052587UL:
- __X__ = reader.ReadInt32();
+ ____result.X = reader.ReadInt32();
continue;
case 383015019883UL:
- __Y__ = formatterResolver.GetFormatterWithVerify<int[]>().Deserialize(ref reader, options);
+ ____result.Y = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<int[]>(formatterResolver).Deserialize(ref reader, options);
continue;
}
}
}
- var ____result = new global::SharedData.SimpleStructStringKeyData()
- {
- X = __X__,
- Y = __Y__,
- };
-
reader.Depth--;
return ____result;
}
}
+
}
+#pragma warning restore 168
+#pragma warning restore 414
+#pragma warning restore 618
+#pragma warning restore 612
+
+#pragma warning restore SA1129 // Do not use default value type constructor
+#pragma warning restore SA1309 // Field names should not begin with underscore
+#pragma warning restore SA1312 // Variable names should begin with lower-case letter
+#pragma warning restore SA1403 // File may only contain a single namespace
+#pragma warning restore SA1649 // File name should match first type name
+
diff --git a/sandbox/Sandbox/Sandbox.csproj b/sandbox/Sandbox/Sandbox.csproj
index 489425ec..17da2db3 100644
--- a/sandbox/Sandbox/Sandbox.csproj
+++ b/sandbox/Sandbox/Sandbox.csproj
@@ -2,14 +2,14 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
- <TargetFramework>netcoreapp2.1</TargetFramework>
+ <TargetFramework>netcoreapp3.1</TargetFramework>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.Portable.Compatibility" Version="1.0.1" />
<PackageReference Include="MsgPack.Cli" Version="0.7.1" />
- <PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
+ <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="protobuf-net" Version="2.1.0" />
<PackageReference Include="ZeroFormatter" Version="1.6.4" />
</ItemGroup>
diff --git a/sandbox/Sandbox/codegen.ps1 b/sandbox/Sandbox/codegen.ps1
index 6dd4f233..279718f6 100644
--- a/sandbox/Sandbox/codegen.ps1
+++ b/sandbox/Sandbox/codegen.ps1
@@ -1 +1 @@
-dotnet run -p "$PSScriptRoot/../../src/MessagePack.Generator/MessagePack.Generator.csproj" -- -i "$PSScriptRoot/../SharedData/SharedData.csproj" -o "$PSScriptRoot/Generated.cs"
+dotnet run -f "net6.0" --project "$PSScriptRoot/../../src/MessagePack.Generator/MessagePack.Generator.csproj" -- -i "$PSScriptRoot/../SharedData/SharedData.csproj" -o "$PSScriptRoot/Generated.cs"
diff --git a/sandbox/TestData2/A.cs b/sandbox/TestData2/A.cs
index 44b0a47f..a7eeef9d 100644
--- a/sandbox/TestData2/A.cs
+++ b/sandbox/TestData2/A.cs
@@ -1,17 +1,14 @@
// Copyright (c) All contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using System.Collections.Generic;
-using MessagePack;
-
#pragma warning disable SA1307 // Accessible fields should begin with upper-case letter
#pragma warning disable SA1401 // Fields should be private
+#nullable enable
+
+namespace TestData2;
-namespace TestData2
+[MessagePackObject(true)]
+public class A
{
- [MessagePackObject(true)]
- public class A
- {
- public int a; public List<B> bs; public C c;
- }
+ public int a; public List<B?>? bs; public C? c;
}
diff --git a/sandbox/TestData2/B.cs b/sandbox/TestData2/B.cs
index 769c0e1c..d9c4029e 100644
--- a/sandbox/TestData2/B.cs
+++ b/sandbox/TestData2/B.cs
@@ -1,17 +1,14 @@
-// Copyright (c) All contributors. All rights reserved.
+// Copyright (c) All contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using System.Collections.Generic;
-using MessagePack;
-
#pragma warning disable SA1307 // Accessible fields should begin with upper-case letter
#pragma warning disable SA1401 // Fields should be private
+#nullable enable
+
+namespace TestData2;
-namespace TestData2
+[MessagePackObject(true)]
+public class B
{
- [MessagePackObject(true)]
- public class B
- {
- public List<A> ass; public C c; public int a;
- }
+ public List<A?>? ass; public C? c; public int a;
}
diff --git a/sandbox/TestData2/C.cs b/sandbox/TestData2/C.cs
index 079c171e..741517ff 100644
--- a/sandbox/TestData2/C.cs
+++ b/sandbox/TestData2/C.cs
@@ -1,16 +1,14 @@
-// Copyright (c) All contributors. All rights reserved.
+// Copyright (c) All contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using MessagePack;
-
#pragma warning disable SA1307 // Accessible fields should begin with upper-case letter
#pragma warning disable SA1401 // Fields should be private
+#nullable enable
+
+namespace TestData2;
-namespace TestData2
+[MessagePackObject(true)]
+public class C
{
- [MessagePackObject(true)]
- public class C
- {
- public B b; public int a;
- }
+ public B? b; public int a;
}
diff --git a/sandbox/TestData2/Generated.cs b/sandbox/TestData2/Generated.cs
index 0d6025a9..1e65486d 100644
--- a/sandbox/TestData2/Generated.cs
+++ b/sandbox/TestData2/Generated.cs
@@ -6,15 +6,13 @@
#pragma warning disable 612
#pragma warning disable 414
#pragma warning disable 168
+#pragma warning disable CS1591 // document public APIs
-#pragma warning disable SA1200 // Using directives should be placed correctly
#pragma warning disable SA1312 // Variable names should begin with lower-case letter
#pragma warning disable SA1649 // File name should match first type name
namespace MessagePack.Resolvers
{
- using System;
-
public class GeneratedResolver : global::MessagePack.IFormatterResolver
{
public static readonly global::MessagePack.IFormatterResolver Instance = new GeneratedResolver();
@@ -45,11 +43,11 @@ namespace MessagePack.Resolvers
internal static class GeneratedResolverGetFormatterHelper
{
- private static readonly global::System.Collections.Generic.Dictionary<Type, int> lookup;
+ private static readonly global::System.Collections.Generic.Dictionary<global::System.Type, int> lookup;
static GeneratedResolverGetFormatterHelper()
{
- lookup = new global::System.Collections.Generic.Dictionary<Type, int>(13)
+ lookup = new global::System.Collections.Generic.Dictionary<global::System.Type, int>(14)
{
{ typeof(global::System.Collections.Generic.List<global::TestData2.A>), 0 },
{ typeof(global::System.Collections.Generic.List<global::TestData2.B>), 1 },
@@ -64,10 +62,11 @@ namespace MessagePack.Resolvers
{ typeof(global::TestData2.Nest2.IdType), 10 },
{ typeof(global::TestData2.PropNameCheck1), 11 },
{ typeof(global::TestData2.PropNameCheck2), 12 },
+ { typeof(global::TestData2.Record), 13 },
};
}
- internal static object GetFormatter(Type t)
+ internal static object GetFormatter(global::System.Type t)
{
int key;
if (!lookup.TryGetValue(t, out key))
@@ -90,6 +89,7 @@ namespace MessagePack.Resolvers
case 10: return new MessagePack.Formatters.TestData2.Nest2_IdTypeFormatter();
case 11: return new MessagePack.Formatters.TestData2.PropNameCheck1Formatter();
case 12: return new MessagePack.Formatters.TestData2.PropNameCheck2Formatter();
+ case 13: return new MessagePack.Formatters.TestData2.RecordFormatter();
default: return null;
}
}
@@ -102,7 +102,6 @@ namespace MessagePack.Resolvers
#pragma warning restore 612
#pragma warning restore SA1312 // Variable names should begin with lower-case letter
-#pragma warning restore SA1200 // Using directives should be placed correctly
#pragma warning restore SA1649 // File name should match first type name
@@ -114,25 +113,22 @@ namespace MessagePack.Resolvers
#pragma warning disable 612
#pragma warning disable 414
#pragma warning disable 168
+#pragma warning disable CS1591 // document public APIs
-#pragma warning disable SA1200 // Using directives should be placed correctly
#pragma warning disable SA1403 // File may only contain a single namespace
#pragma warning disable SA1649 // File name should match first type name
namespace MessagePack.Formatters.TestData2
{
- using System;
- using System.Buffers;
- using MessagePack;
public sealed class Nest1_IdFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::TestData2.Nest1.Id>
{
- public void Serialize(ref MessagePackWriter writer, global::TestData2.Nest1.Id value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::TestData2.Nest1.Id value, global::MessagePack.MessagePackSerializerOptions options)
{
- writer.Write((Int32)value);
+ writer.Write((global::System.Int32)value);
}
- public global::TestData2.Nest1.Id Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::TestData2.Nest1.Id Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
return (global::TestData2.Nest1.Id)reader.ReadInt32();
}
@@ -140,12 +136,12 @@ namespace MessagePack.Formatters.TestData2
public sealed class Nest2_IdFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::TestData2.Nest2.Id>
{
- public void Serialize(ref MessagePackWriter writer, global::TestData2.Nest2.Id value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::TestData2.Nest2.Id value, global::MessagePack.MessagePackSerializerOptions options)
{
- writer.Write((Int32)value);
+ writer.Write((global::System.Int32)value);
}
- public global::TestData2.Nest2.Id Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public global::TestData2.Nest2.Id Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
return (global::TestData2.Nest2.Id)reader.ReadInt32();
}
@@ -157,7 +153,6 @@ namespace MessagePack.Formatters.TestData2
#pragma warning restore 618
#pragma warning restore 612
-#pragma warning restore SA1200 // Using directives should be placed correctly
#pragma warning restore SA1403 // File may only contain a single namespace
#pragma warning restore SA1649 // File name should match first type name
@@ -171,9 +166,9 @@ namespace MessagePack.Formatters.TestData2
#pragma warning disable 612
#pragma warning disable 414
#pragma warning disable 168
+#pragma warning disable CS1591 // document public APIs
#pragma warning disable SA1129 // Do not use default value type constructor
-#pragma warning disable SA1200 // Using directives should be placed correctly
#pragma warning disable SA1309 // Field names should not begin with underscore
#pragma warning disable SA1312 // Variable names should begin with lower-case letter
#pragma warning disable SA1403 // File may only contain a single namespace
@@ -181,11 +176,6 @@ namespace MessagePack.Formatters.TestData2
namespace MessagePack.Formatters.TestData2
{
- using System;
- using System.Buffers;
- using System.Runtime.InteropServices;
- using MessagePack;
-
public sealed class AFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::TestData2.A>
{
// a
@@ -203,14 +193,14 @@ namespace MessagePack.Formatters.TestData2
return;
}
- IFormatterResolver formatterResolver = options.Resolver;
+ var formatterResolver = options.Resolver;
writer.WriteMapHeader(3);
writer.WriteRaw(GetSpan_a());
writer.Write(value.a);
writer.WriteRaw(GetSpan_bs());
- formatterResolver.GetFormatterWithVerify<global::System.Collections.Generic.List<global::TestData2.B>>().Serialize(ref writer, value.bs, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::System.Collections.Generic.List<global::TestData2.B>>(formatterResolver).Serialize(ref writer, value.bs, options);
writer.WriteRaw(GetSpan_c());
- formatterResolver.GetFormatterWithVerify<global::TestData2.C>().Serialize(ref writer, value.c, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::TestData2.C>(formatterResolver).Serialize(ref writer, value.c, options);
}
public global::TestData2.A Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
@@ -221,15 +211,13 @@ namespace MessagePack.Formatters.TestData2
}
options.Security.DepthStep(ref reader);
- IFormatterResolver formatterResolver = options.Resolver;
+ var formatterResolver = options.Resolver;
var length = reader.ReadMapHeader();
- var __a__ = default(int);
- var __bs__ = default(global::System.Collections.Generic.List<global::TestData2.B>);
- var __c__ = default(global::TestData2.C);
+ var ____result = new global::TestData2.A();
for (int i = 0; i < length; i++)
{
- ReadOnlySpan<byte> stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
+ var stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
switch (stringKey.Length)
{
default:
@@ -241,28 +229,21 @@ namespace MessagePack.Formatters.TestData2
{
default: goto FAIL;
case 97UL:
- __a__ = reader.ReadInt32();
+ ____result.a = reader.ReadInt32();
continue;
case 99UL:
- __c__ = formatterResolver.GetFormatterWithVerify<global::TestData2.C>().Deserialize(ref reader, options);
+ ____result.c = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::TestData2.C>(formatterResolver).Deserialize(ref reader, options);
continue;
}
case 2:
if (global::MessagePack.Internal.AutomataKeyGen.GetKey(ref stringKey) != 29538UL) { goto FAIL; }
- __bs__ = formatterResolver.GetFormatterWithVerify<global::System.Collections.Generic.List<global::TestData2.B>>().Deserialize(ref reader, options);
+ ____result.bs = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::System.Collections.Generic.List<global::TestData2.B>>(formatterResolver).Deserialize(ref reader, options);
continue;
}
}
- var ____result = new global::TestData2.A()
- {
- a = __a__,
- bs = __bs__,
- c = __c__,
- };
-
reader.Depth--;
return ____result;
}
@@ -285,12 +266,12 @@ namespace MessagePack.Formatters.TestData2
return;
}
- IFormatterResolver formatterResolver = options.Resolver;
+ var formatterResolver = options.Resolver;
writer.WriteMapHeader(3);
writer.WriteRaw(GetSpan_ass());
- formatterResolver.GetFormatterWithVerify<global::System.Collections.Generic.List<global::TestData2.A>>().Serialize(ref writer, value.ass, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::System.Collections.Generic.List<global::TestData2.A>>(formatterResolver).Serialize(ref writer, value.ass, options);
writer.WriteRaw(GetSpan_c());
- formatterResolver.GetFormatterWithVerify<global::TestData2.C>().Serialize(ref writer, value.c, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::TestData2.C>(formatterResolver).Serialize(ref writer, value.c, options);
writer.WriteRaw(GetSpan_a());
writer.Write(value.a);
}
@@ -303,15 +284,13 @@ namespace MessagePack.Formatters.TestData2
}
options.Security.DepthStep(ref reader);
- IFormatterResolver formatterResolver = options.Resolver;
+ var formatterResolver = options.Resolver;
var length = reader.ReadMapHeader();
- var __ass__ = default(global::System.Collections.Generic.List<global::TestData2.A>);
- var __c__ = default(global::TestData2.C);
- var __a__ = default(int);
+ var ____result = new global::TestData2.B();
for (int i = 0; i < length; i++)
{
- ReadOnlySpan<byte> stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
+ var stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
switch (stringKey.Length)
{
default:
@@ -321,30 +300,23 @@ namespace MessagePack.Formatters.TestData2
case 3:
if (global::MessagePack.Internal.AutomataKeyGen.GetKey(ref stringKey) != 7566177UL) { goto FAIL; }
- __ass__ = formatterResolver.GetFormatterWithVerify<global::System.Collections.Generic.List<global::TestData2.A>>().Deserialize(ref reader, options);
+ ____result.ass = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::System.Collections.Generic.List<global::TestData2.A>>(formatterResolver).Deserialize(ref reader, options);
continue;
case 1:
switch (global::MessagePack.Internal.AutomataKeyGen.GetKey(ref stringKey))
{
default: goto FAIL;
case 99UL:
- __c__ = formatterResolver.GetFormatterWithVerify<global::TestData2.C>().Deserialize(ref reader, options);
+ ____result.c = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::TestData2.C>(formatterResolver).Deserialize(ref reader, options);
continue;
case 97UL:
- __a__ = reader.ReadInt32();
+ ____result.a = reader.ReadInt32();
continue;
}
}
}
- var ____result = new global::TestData2.B()
- {
- ass = __ass__,
- c = __c__,
- a = __a__,
- };
-
reader.Depth--;
return ____result;
}
@@ -365,10 +337,10 @@ namespace MessagePack.Formatters.TestData2
return;
}
- IFormatterResolver formatterResolver = options.Resolver;
+ var formatterResolver = options.Resolver;
writer.WriteMapHeader(2);
writer.WriteRaw(GetSpan_b());
- formatterResolver.GetFormatterWithVerify<global::TestData2.B>().Serialize(ref writer, value.b, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::TestData2.B>(formatterResolver).Serialize(ref writer, value.b, options);
writer.WriteRaw(GetSpan_a());
writer.Write(value.a);
}
@@ -381,14 +353,13 @@ namespace MessagePack.Formatters.TestData2
}
options.Security.DepthStep(ref reader);
- IFormatterResolver formatterResolver = options.Resolver;
+ var formatterResolver = options.Resolver;
var length = reader.ReadMapHeader();
- var __b__ = default(global::TestData2.B);
- var __a__ = default(int);
+ var ____result = new global::TestData2.C();
for (int i = 0; i < length; i++)
{
- ReadOnlySpan<byte> stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
+ var stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
switch (stringKey.Length)
{
default:
@@ -400,22 +371,16 @@ namespace MessagePack.Formatters.TestData2
{
default: goto FAIL;
case 98UL:
- __b__ = formatterResolver.GetFormatterWithVerify<global::TestData2.B>().Deserialize(ref reader, options);
+ ____result.b = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::TestData2.B>(formatterResolver).Deserialize(ref reader, options);
continue;
case 97UL:
- __a__ = reader.ReadInt32();
+ ____result.a = reader.ReadInt32();
continue;
}
}
}
- var ____result = new global::TestData2.C()
- {
- b = __b__,
- a = __a__,
- };
-
reader.Depth--;
return ____result;
}
@@ -436,12 +401,12 @@ namespace MessagePack.Formatters.TestData2
return;
}
- IFormatterResolver formatterResolver = options.Resolver;
+ var formatterResolver = options.Resolver;
writer.WriteMapHeader(2);
writer.WriteRaw(GetSpan_EnumId());
- formatterResolver.GetFormatterWithVerify<global::TestData2.Nest1.Id>().Serialize(ref writer, value.EnumId, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::TestData2.Nest1.Id>(formatterResolver).Serialize(ref writer, value.EnumId, options);
writer.WriteRaw(GetSpan_ClassId());
- formatterResolver.GetFormatterWithVerify<global::TestData2.Nest1.IdType>().Serialize(ref writer, value.ClassId, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::TestData2.Nest1.IdType>(formatterResolver).Serialize(ref writer, value.ClassId, options);
}
public global::TestData2.Nest1 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
@@ -452,14 +417,13 @@ namespace MessagePack.Formatters.TestData2
}
options.Security.DepthStep(ref reader);
- IFormatterResolver formatterResolver = options.Resolver;
+ var formatterResolver = options.Resolver;
var length = reader.ReadMapHeader();
- var __EnumId__ = default(global::TestData2.Nest1.Id);
- var __ClassId__ = default(global::TestData2.Nest1.IdType);
+ var ____result = new global::TestData2.Nest1();
for (int i = 0; i < length; i++)
{
- ReadOnlySpan<byte> stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
+ var stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
switch (stringKey.Length)
{
default:
@@ -469,23 +433,17 @@ namespace MessagePack.Formatters.TestData2
case 6:
if (global::MessagePack.Internal.AutomataKeyGen.GetKey(ref stringKey) != 110266531802693UL) { goto FAIL; }
- __EnumId__ = formatterResolver.GetFormatterWithVerify<global::TestData2.Nest1.Id>().Deserialize(ref reader, options);
+ ____result.EnumId = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::TestData2.Nest1.Id>(formatterResolver).Deserialize(ref reader, options);
continue;
case 7:
if (global::MessagePack.Internal.AutomataKeyGen.GetKey(ref stringKey) != 28228257876896835UL) { goto FAIL; }
- __ClassId__ = formatterResolver.GetFormatterWithVerify<global::TestData2.Nest1.IdType>().Deserialize(ref reader, options);
+ ____result.ClassId = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::TestData2.Nest1.IdType>(formatterResolver).Deserialize(ref reader, options);
continue;
}
}
- var ____result = new global::TestData2.Nest1()
- {
- EnumId = __EnumId__,
- ClassId = __ClassId__,
- };
-
reader.Depth--;
return ____result;
}
@@ -493,7 +451,6 @@ namespace MessagePack.Formatters.TestData2
public sealed class Nest1_IdTypeFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::TestData2.Nest1.IdType>
{
-
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::TestData2.Nest1.IdType value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value is null)
@@ -533,12 +490,12 @@ namespace MessagePack.Formatters.TestData2
return;
}
- IFormatterResolver formatterResolver = options.Resolver;
+ var formatterResolver = options.Resolver;
writer.WriteMapHeader(2);
writer.WriteRaw(GetSpan_EnumId());
- formatterResolver.GetFormatterWithVerify<global::TestData2.Nest2.Id>().Serialize(ref writer, value.EnumId, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::TestData2.Nest2.Id>(formatterResolver).Serialize(ref writer, value.EnumId, options);
writer.WriteRaw(GetSpan_ClassId());
- formatterResolver.GetFormatterWithVerify<global::TestData2.Nest2.IdType>().Serialize(ref writer, value.ClassId, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::TestData2.Nest2.IdType>(formatterResolver).Serialize(ref writer, value.ClassId, options);
}
public global::TestData2.Nest2 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
@@ -549,14 +506,13 @@ namespace MessagePack.Formatters.TestData2
}
options.Security.DepthStep(ref reader);
- IFormatterResolver formatterResolver = options.Resolver;
+ var formatterResolver = options.Resolver;
var length = reader.ReadMapHeader();
- var __EnumId__ = default(global::TestData2.Nest2.Id);
- var __ClassId__ = default(global::TestData2.Nest2.IdType);
+ var ____result = new global::TestData2.Nest2();
for (int i = 0; i < length; i++)
{
- ReadOnlySpan<byte> stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
+ var stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
switch (stringKey.Length)
{
default:
@@ -566,23 +522,17 @@ namespace MessagePack.Formatters.TestData2
case 6:
if (global::MessagePack.Internal.AutomataKeyGen.GetKey(ref stringKey) != 110266531802693UL) { goto FAIL; }
- __EnumId__ = formatterResolver.GetFormatterWithVerify<global::TestData2.Nest2.Id>().Deserialize(ref reader, options);
+ ____result.EnumId = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::TestData2.Nest2.Id>(formatterResolver).Deserialize(ref reader, options);
continue;
case 7:
if (global::MessagePack.Internal.AutomataKeyGen.GetKey(ref stringKey) != 28228257876896835UL) { goto FAIL; }
- __ClassId__ = formatterResolver.GetFormatterWithVerify<global::TestData2.Nest2.IdType>().Deserialize(ref reader, options);
+ ____result.ClassId = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::TestData2.Nest2.IdType>(formatterResolver).Deserialize(ref reader, options);
continue;
}
}
- var ____result = new global::TestData2.Nest2()
- {
- EnumId = __EnumId__,
- ClassId = __ClassId__,
- };
-
reader.Depth--;
return ____result;
}
@@ -590,7 +540,6 @@ namespace MessagePack.Formatters.TestData2
public sealed class Nest2_IdTypeFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::TestData2.Nest2.IdType>
{
-
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::TestData2.Nest2.IdType value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value is null)
@@ -630,12 +579,12 @@ namespace MessagePack.Formatters.TestData2
return;
}
- IFormatterResolver formatterResolver = options.Resolver;
+ var formatterResolver = options.Resolver;
writer.WriteMapHeader(2);
writer.WriteRaw(GetSpan_MyProperty1());
- formatterResolver.GetFormatterWithVerify<string>().Serialize(ref writer, value.MyProperty1, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Serialize(ref writer, value.MyProperty1, options);
writer.WriteRaw(GetSpan_MyProperty2());
- formatterResolver.GetFormatterWithVerify<string>().Serialize(ref writer, value.MyProperty2, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Serialize(ref writer, value.MyProperty2, options);
}
public global::TestData2.PropNameCheck1 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
@@ -646,14 +595,13 @@ namespace MessagePack.Formatters.TestData2
}
options.Security.DepthStep(ref reader);
- IFormatterResolver formatterResolver = options.Resolver;
+ var formatterResolver = options.Resolver;
var length = reader.ReadMapHeader();
- var __MyProperty1__ = default(string);
- var __MyProperty2__ = default(string);
+ var ____result = new global::TestData2.PropNameCheck1();
for (int i = 0; i < length; i++)
{
- ReadOnlySpan<byte> stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
+ var stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
switch (stringKey.Length)
{
default:
@@ -669,10 +617,10 @@ namespace MessagePack.Formatters.TestData2
{
default: goto FAIL;
case 3242356UL:
- __MyProperty1__ = formatterResolver.GetFormatterWithVerify<string>().Deserialize(ref reader, options);
+ ____result.MyProperty1 = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Deserialize(ref reader, options);
continue;
case 3307892UL:
- __MyProperty2__ = formatterResolver.GetFormatterWithVerify<string>().Deserialize(ref reader, options);
+ ____result.MyProperty2 = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Deserialize(ref reader, options);
continue;
}
@@ -681,12 +629,6 @@ namespace MessagePack.Formatters.TestData2
}
}
- var ____result = new global::TestData2.PropNameCheck1()
- {
- MyProperty1 = __MyProperty1__,
- MyProperty2 = __MyProperty2__,
- };
-
reader.Depth--;
return ____result;
}
@@ -707,12 +649,12 @@ namespace MessagePack.Formatters.TestData2
return;
}
- IFormatterResolver formatterResolver = options.Resolver;
+ var formatterResolver = options.Resolver;
writer.WriteMapHeader(2);
writer.WriteRaw(GetSpan_MyProperty1());
- formatterResolver.GetFormatterWithVerify<string>().Serialize(ref writer, value.MyProperty1, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Serialize(ref writer, value.MyProperty1, options);
writer.WriteRaw(GetSpan_MyProperty2());
- formatterResolver.GetFormatterWithVerify<string>().Serialize(ref writer, value.MyProperty2, options);
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Serialize(ref writer, value.MyProperty2, options);
}
public global::TestData2.PropNameCheck2 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
@@ -723,14 +665,13 @@ namespace MessagePack.Formatters.TestData2
}
options.Security.DepthStep(ref reader);
- IFormatterResolver formatterResolver = options.Resolver;
+ var formatterResolver = options.Resolver;
var length = reader.ReadMapHeader();
- var __MyProperty1__ = default(string);
- var __MyProperty2__ = default(string);
+ var ____result = new global::TestData2.PropNameCheck2();
for (int i = 0; i < length; i++)
{
- ReadOnlySpan<byte> stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
+ var stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
switch (stringKey.Length)
{
default:
@@ -746,10 +687,10 @@ namespace MessagePack.Formatters.TestData2
{
default: goto FAIL;
case 3242356UL:
- __MyProperty1__ = formatterResolver.GetFormatterWithVerify<string>().Deserialize(ref reader, options);
+ ____result.MyProperty1 = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Deserialize(ref reader, options);
continue;
case 3307892UL:
- __MyProperty2__ = formatterResolver.GetFormatterWithVerify<string>().Deserialize(ref reader, options);
+ ____result.MyProperty2 = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Deserialize(ref reader, options);
continue;
}
@@ -758,15 +699,76 @@ namespace MessagePack.Formatters.TestData2
}
}
- var ____result = new global::TestData2.PropNameCheck2()
+ reader.Depth--;
+ return ____result;
+ }
+ }
+
+ public sealed class RecordFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::TestData2.Record>
+ {
+ // SomeProperty
+ private static global::System.ReadOnlySpan<byte> GetSpan_SomeProperty() => new byte[1 + 12] { 172, 83, 111, 109, 101, 80, 114, 111, 112, 101, 114, 116, 121 };
+
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::TestData2.Record value, global::MessagePack.MessagePackSerializerOptions options)
+ {
+ if (value is null)
{
- MyProperty1 = __MyProperty1__,
- MyProperty2 = __MyProperty2__,
- };
+ writer.WriteNil();
+ return;
+ }
+ var formatterResolver = options.Resolver;
+ writer.WriteMapHeader(1);
+ writer.WriteRaw(GetSpan_SomeProperty());
+ global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Serialize(ref writer, value.SomeProperty, options);
+ }
+
+ public global::TestData2.Record Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ {
+ if (reader.TryReadNil())
+ {
+ return null;
+ }
+
+ options.Security.DepthStep(ref reader);
+ var formatterResolver = options.Resolver;
+ var length = reader.ReadMapHeader();
+ var __SomeProperty__ = default(string);
+
+ for (int i = 0; i < length; i++)
+ {
+ var stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
+ switch (stringKey.Length)
+ {
+ default:
+ FAIL:
+ reader.Skip();
+ continue;
+ case 12:
+ if (!global::System.MemoryExtensions.SequenceEqual(stringKey, GetSpan_SomeProperty().Slice(1))) { goto FAIL; }
+
+ __SomeProperty__ = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Deserialize(ref reader, options);
+ continue;
+
+ }
+ }
+
+ var ____result = new global::TestData2.Record(__SomeProperty__);
reader.Depth--;
return ____result;
}
}
+
}
+#pragma warning restore 168
+#pragma warning restore 414
+#pragma warning restore 618
+#pragma warning restore 612
+
+#pragma warning restore SA1129 // Do not use default value type constructor
+#pragma warning restore SA1309 // Field names should not begin with underscore
+#pragma warning restore SA1312 // Variable names should begin with lower-case letter
+#pragma warning restore SA1403 // File may only contain a single namespace
+#pragma warning restore SA1649 // File name should match first type name
+
diff --git a/sandbox/TestData2/Record.cs b/sandbox/TestData2/Record.cs
new file mode 100644
index 00000000..b48bf693
--- /dev/null
+++ b/sandbox/TestData2/Record.cs
@@ -0,0 +1,10 @@
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using MessagePack;
+
+namespace TestData2
+{
+ [MessagePackObject]
+ public record Record([property: Key("SomeProperty")] string SomeProperty);
+}
diff --git a/sandbox/TestData2/TestData2.csproj b/sandbox/TestData2/TestData2.csproj
index 966e801d..a7313049 100644
--- a/sandbox/TestData2/TestData2.csproj
+++ b/sandbox/TestData2/TestData2.csproj
@@ -1,10 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
+ <LangVersion>10</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MessagePack" Version="2.1.90" />
+ <PackageReference Include="IsExternalInit" Version="1.0.1" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.3" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
</ItemGroup>
+ <ItemGroup>
+ <Using Include="System.Collections.Generic" />
+ <Using Include="MessagePack" />
+ </ItemGroup>
</Project>
diff --git a/sandbox/TestData2/codegen.ps1 b/sandbox/TestData2/codegen.ps1
index 17ec27b2..6781688e 100644
--- a/sandbox/TestData2/codegen.ps1
+++ b/sandbox/TestData2/codegen.ps1
@@ -1 +1 @@
-dotnet run -p "$PSScriptRoot/../../src/MessagePack.Generator/MessagePack.Generator.csproj" -- -i "$PSScriptRoot/TestData2.csproj" -o "$PSScriptRoot/Generated.cs"
+dotnet run -f "net6.0" --project "$PSScriptRoot/../../src/MessagePack.Generator/MessagePack.Generator.csproj" -- -i "$PSScriptRoot/TestData2.csproj" -o "$PSScriptRoot/Generated.cs"
diff --git a/src/MessagePack.AspNetCoreMvcFormatter/MessagePack.AspNetCoreMvcFormatter.csproj b/src/MessagePack.AspNetCoreMvcFormatter/MessagePack.AspNetCoreMvcFormatter.csproj
index 32229c1d..d68ddacd 100644
--- a/src/MessagePack.AspNetCoreMvcFormatter/MessagePack.AspNetCoreMvcFormatter.csproj
+++ b/src/MessagePack.AspNetCoreMvcFormatter/MessagePack.AspNetCoreMvcFormatter.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>netstandard2.0;netcoreapp3.0</TargetFrameworks>
+ <TargetFrameworks>netstandard2.0;netcoreapp3.1</TargetFrameworks>
<IsPackable>true</IsPackable>
<Title>ASP.NET Core MVC Input/Output MessagePack formatter</Title>
<Description>ASP.NET Core MVC Input/Output MessagePack formatter.</Description>
@@ -8,14 +8,14 @@
</PropertyGroup>
<Choose>
- <When Condition="'$(TargetFramework)'=='netcoreapp3.0'">
+ <When Condition="'$(TargetFramework)'=='netcoreapp3.1'">
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
- <PackageReference Include="Microsoft.AspNetCore.Mvc.Abstractions" Version="1.1.2" />
+ <PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.0" />
</ItemGroup>
</Otherwise>
</Choose>
diff --git a/src/MessagePack.AspNetCoreMvcFormatter/MessagePackInputFormatter.cs b/src/MessagePack.AspNetCoreMvcFormatter/MessagePackInputFormatter.cs
index 95edae0e..59c49a99 100644
--- a/src/MessagePack.AspNetCoreMvcFormatter/MessagePackInputFormatter.cs
+++ b/src/MessagePack.AspNetCoreMvcFormatter/MessagePackInputFormatter.cs
@@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Mvc.Formatters;
namespace MessagePack.AspNetCoreMvcFormatter
{
- public class MessagePackInputFormatter : IInputFormatter
+ public class MessagePackInputFormatter : InputFormatter
{
private const string ContentType = "application/x-msgpack";
private readonly MessagePackSerializerOptions options;
@@ -19,12 +19,11 @@ namespace MessagePack.AspNetCoreMvcFormatter
public MessagePackInputFormatter(MessagePackSerializerOptions options)
{
this.options = options;
- }
- public bool CanRead(InputFormatterContext context) =>
- context.HttpContext.Request.ContentType == ContentType;
+ SupportedMediaTypes.Add(ContentType);
+ }
- public async Task<InputFormatterResult> ReadAsync(InputFormatterContext context)
+ public override async Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
{
var request = context.HttpContext.Request;
var result = await MessagePackSerializer.DeserializeAsync(context.ModelType, request.Body, this.options, context.HttpContext.RequestAborted).ConfigureAwait(false);
diff --git a/src/MessagePack.AspNetCoreMvcFormatter/MessagePackOutputFormatter.cs b/src/MessagePack.AspNetCoreMvcFormatter/MessagePackOutputFormatter.cs
index ec9940c6..40998114 100644
--- a/src/MessagePack.AspNetCoreMvcFormatter/MessagePackOutputFormatter.cs
+++ b/src/MessagePack.AspNetCoreMvcFormatter/MessagePackOutputFormatter.cs
@@ -3,11 +3,10 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.Formatters;
-using Microsoft.Extensions.Primitives;
namespace MessagePack.AspNetCoreMvcFormatter
{
- public class MessagePackOutputFormatter : IOutputFormatter
+ public class MessagePackOutputFormatter : OutputFormatter
{
private const string ContentType = "application/x-msgpack";
private readonly MessagePackSerializerOptions options;
@@ -20,23 +19,12 @@ namespace MessagePack.AspNetCoreMvcFormatter
public MessagePackOutputFormatter(MessagePackSerializerOptions options)
{
this.options = options;
- }
-
- public bool CanWriteResult(OutputFormatterCanWriteContext context)
- {
- if (!context.ContentType.HasValue)
- {
- context.ContentType = new StringSegment(ContentType);
- return true;
- }
- return context.ContentType.Value == ContentType;
+ SupportedMediaTypes.Add(ContentType);
}
- public Task WriteAsync(OutputFormatterWriteContext context)
+ public override Task WriteResponseBodyAsync(OutputFormatterWriteContext context)
{
- context.HttpContext.Response.ContentType = ContentType;
-
if (context.ObjectType == typeof(object))
{
if (context.Object == null)
@@ -46,6 +34,12 @@ namespace MessagePack.AspNetCoreMvcFormatter
return Task.CompletedTask;
#else
var writer = context.HttpContext.Response.BodyWriter;
+ if (writer == null)
+ {
+ context.HttpContext.Response.Body.WriteByte(MessagePackCode.Nil);
+ return Task.CompletedTask;
+ }
+
var span = writer.GetSpan(1);
span[0] = MessagePackCode.Nil;
writer.Advance(1);
@@ -58,6 +52,11 @@ namespace MessagePack.AspNetCoreMvcFormatter
return MessagePackSerializer.SerializeAsync(context.Object.GetType(), context.HttpContext.Response.Body, context.Object, this.options, context.HttpContext.RequestAborted);
#else
var writer = context.HttpContext.Response.BodyWriter;
+ if (writer == null)
+ {
+ return MessagePackSerializer.SerializeAsync(context.Object.GetType(), context.HttpContext.Response.Body, context.Object, this.options, context.HttpContext.RequestAborted);
+ }
+
MessagePackSerializer.Serialize(context.Object.GetType(), writer, context.Object, this.options, context.HttpContext.RequestAborted);
return writer.FlushAsync().AsTask();
#endif
@@ -69,6 +68,11 @@ namespace MessagePack.AspNetCoreMvcFormatter
return MessagePackSerializer.SerializeAsync(context.ObjectType, context.HttpContext.Response.Body, context.Object, this.options, context.HttpContext.RequestAborted);
#else
var writer = context.HttpContext.Response.BodyWriter;
+ if (writer == null)
+ {
+ return MessagePackSerializer.SerializeAsync(context.ObjectType, context.HttpContext.Response.Body, context.Object, this.options, context.HttpContext.RequestAborted);
+ }
+
MessagePackSerializer.Serialize(context.ObjectType, writer, context.Object, this.options, context.HttpContext.RequestAborted);
return writer.FlushAsync().AsTask();
#endif
diff --git a/src/MessagePack.Generator/MessagePack.Generator.csproj b/src/MessagePack.Generator/MessagePack.Generator.csproj
index bde486a0..42b02f30 100644
--- a/src/MessagePack.Generator/MessagePack.Generator.csproj
+++ b/src/MessagePack.Generator/MessagePack.Generator.csproj
@@ -3,12 +3,13 @@
<PropertyGroup>
<AssemblyName>mpc</AssemblyName>
<OutputType>Exe</OutputType>
- <TargetFramework>netcoreapp3.1</TargetFramework>
- <LangVersion>8</LangVersion>
+ <TargetFrameworks>netcoreapp3.1;net6.0</TargetFrameworks>
+ <LangVersion>10</LangVersion>
<Nullable>enable</Nullable>
<IsPackable>true</IsPackable>
<PackAsTool>true</PackAsTool>
<ToolCommandName>mpc</ToolCommandName>
+ <RollForward>Major</RollForward>
<!-- NuGet Info -->
<PackageId>MessagePack.Generator</PackageId>
@@ -18,11 +19,11 @@
</PropertyGroup>
<ItemGroup>
- <PackageReference Include="ConsoleAppFramework" Version="2.0.0" />
- <PackageReference Include="Microsoft.Build.Locator" Version="1.2.6" />
- <PackageReference Include="Microsoft.Build.Framework" Version="16.0.461" ExcludeAssets="runtime" />
- <PackageReference Include="Microsoft.Build" Version="16.0.461" ExcludeAssets="runtime" />
- <PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="3.6.0" />
+ <PackageReference Include="ConsoleAppFramework" Version="3.3.2" />
+ <PackageReference Include="Microsoft.Build.Locator" Version="1.4.1" />
+ <PackageReference Include="Microsoft.Build.Framework" Version="16.5.0" ExcludeAssets="runtime" />
+ <PackageReference Include="Microsoft.Build" Version="16.5.0" ExcludeAssets="runtime" />
+ <PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="4.0.1" />
</ItemGroup>
<ItemGroup>
diff --git a/src/MessagePack.Generator/PseudoCompilation.cs b/src/MessagePack.Generator/PseudoCompilation.cs
index a8daeacb..80d5a1ed 100644
--- a/src/MessagePack.Generator/PseudoCompilation.cs
+++ b/src/MessagePack.Generator/PseudoCompilation.cs
@@ -91,7 +91,7 @@ namespace MessagePack.Generator
.Distinct()
.ToList();
- var dir = new FileInfo(typeof(object).Assembly.Location).Directory;
+ var dir = new FileInfo(typeof(object).Assembly.Location).Directory ?? throw new NullReferenceException("Assembly location directory not found!");
{
var path = Path.Combine(dir.FullName, "netstandard.dll");
if (File.Exists(path))
diff --git a/src/MessagePack.GeneratorCore/CodeAnalysis/Definitions.cs b/src/MessagePack.GeneratorCore/CodeAnalysis/Definitions.cs
index ab053442..30aaedb9 100644
--- a/src/MessagePack.GeneratorCore/CodeAnalysis/Definitions.cs
+++ b/src/MessagePack.GeneratorCore/CodeAnalysis/Definitions.cs
@@ -9,6 +9,11 @@ using System.Linq;
namespace MessagePackCompiler.CodeAnalysis
{
+ public interface INamespaceInfo
+ {
+ string? Namespace { get; }
+ }
+
public interface IResolverRegisterInfo
{
string FullName { get; }
@@ -16,43 +21,40 @@ namespace MessagePackCompiler.CodeAnalysis
string FormatterName { get; }
}
- public class ObjectSerializationInfo : IResolverRegisterInfo
+ public class ObjectSerializationInfo : IResolverRegisterInfo, INamespaceInfo
{
- public string Name { get; set; }
+ public string Name { get; }
- public string FullName { get; set; }
+ public string FullName { get; }
- public string Namespace { get; set; }
+ public string? Namespace { get; }
- public GenericTypeParameterInfo[] GenericTypeParameters { get; set; }
+ public GenericTypeParameterInfo[] GenericTypeParameters { get; }
- public bool IsOpenGenericType { get; set; }
+ public bool IsOpenGenericType { get; }
- public bool IsIntKey { get; set; }
+ public bool IsIntKey { get; }
public bool IsStringKey
{
get { return !this.IsIntKey; }
}
- public bool IsClass { get; set; }
+ public bool IsClass { get; }
- public bool IsStruct
- {
- get { return !this.IsClass; }
- }
+ public MemberSerializationInfo[] ConstructorParameters { get; }
- public MemberSerializationInfo[] ConstructorParameters { get; set; }
+ public MemberSerializationInfo[] Members { get; }
- public MemberSerializationInfo[] Members { get; set; }
+ public bool HasIMessagePackSerializationCallbackReceiver { get; }
- public bool HasIMessagePackSerializationCallbackReceiver { get; set; }
+ public bool NeedsCastOnBefore { get; }
- public bool NeedsCastOnBefore { get; set; }
+ public bool NeedsCastOnAfter { get; }
- public bool NeedsCastOnAfter { get; set; }
+ public string FormatterName => this.Namespace == null ? FormatterNameWithoutNameSpace : this.Namespace + "." + FormatterNameWithoutNameSpace;
- public string FormatterName => (this.Namespace == null ? this.Name : this.Namespace + "." + this.Name) + "Formatter" + (this.IsOpenGenericType ? $"<{string.Join(",", this.GenericTypeParameters.Select(x => x.Name))}>" : string.Empty);
+ public string FormatterNameWithoutNameSpace => this.Name + "Formatter" + (this.IsOpenGenericType ? $"<{string.Join(", ", this.GenericTypeParameters.Select(x => x.Name))}>" : string.Empty);
public int WriteCount
{
@@ -77,7 +79,7 @@ namespace MessagePackCompiler.CodeAnalysis
}
}
- public MemberSerializationInfo GetMember(int index)
+ public MemberSerializationInfo? GetMember(int index)
{
return this.Members.FirstOrDefault(x => x.IntKey == index);
}
@@ -87,6 +89,22 @@ namespace MessagePackCompiler.CodeAnalysis
var args = string.Join(", ", this.ConstructorParameters.Select(x => "__" + x.Name + "__"));
return $"{this.FullName}({args})";
}
+
+ public ObjectSerializationInfo(bool isClass, bool isOpenGenericType, GenericTypeParameterInfo[] genericTypeParameterInfos, MemberSerializationInfo[] constructorParameters, bool isIntKey, MemberSerializationInfo[] members, string name, string fullName, string? @namespace, bool hasSerializationConstructor, bool needsCastOnAfter, bool needsCastOnBefore)
+ {
+ IsClass = isClass;
+ IsOpenGenericType = isOpenGenericType;
+ GenericTypeParameters = genericTypeParameterInfos;
+ ConstructorParameters = constructorParameters;
+ IsIntKey = isIntKey;
+ Members = members;
+ Name = name;
+ FullName = fullName;
+ Namespace = @namespace;
+ HasIMessagePackSerializationCallbackReceiver = hasSerializationConstructor;
+ NeedsCastOnAfter = needsCastOnAfter;
+ NeedsCastOnBefore = needsCastOnBefore;
+ }
}
public class GenericTypeParameterInfo
@@ -101,33 +119,44 @@ namespace MessagePackCompiler.CodeAnalysis
{
Name = name ?? throw new ArgumentNullException(nameof(name));
Constraints = constraints ?? throw new ArgumentNullException(nameof(name));
- HasConstraints = !string.IsNullOrEmpty(constraints);
+ HasConstraints = constraints != string.Empty;
}
}
public class MemberSerializationInfo
{
- public bool IsProperty { get; set; }
+ public bool IsProperty { get; }
- public bool IsField { get; set; }
+ public bool IsWritable { get; }
- public bool IsWritable { get; set; }
+ public bool IsReadable { get; }
- public bool IsReadable { get; set; }
+ public int IntKey { get; }
- public int IntKey { get; set; }
+ public string StringKey { get; }
- public string StringKey { get; set; }
+ public string Type { get; }
- public string Type { get; set; }
+ public string Name { get; }
- public string Name { get; set; }
+ public string ShortTypeName { get; }
- public string ShortTypeName { get; set; }
+ public string? CustomFormatterTypeName { get; }
- public string CustomFormatterTypeName { get; set; }
+ private readonly HashSet<string> primitiveTypes = new(Generator.ShouldUseFormatterResolverHelper.PrimitiveTypes);
- private readonly HashSet<string> primitiveTypes = new HashSet<string>(Generator.ShouldUseFormatterResolverHelper.PrimitiveTypes);
+ public MemberSerializationInfo(bool isProperty, bool isWritable, bool isReadable, int intKey, string stringKey, string name, string type, string shortTypeName, string? customFormatterTypeName)
+ {
+ IsProperty = isProperty;
+ IsWritable = isWritable;
+ IsReadable = isReadable;
+ IntKey = intKey;
+ StringKey = stringKey;
+ Type = type;
+ Name = name;
+ ShortTypeName = shortTypeName;
+ CustomFormatterTypeName = customFormatterTypeName;
+ }
public string GetSerializeMethodString()
{
@@ -137,11 +166,11 @@ namespace MessagePackCompiler.CodeAnalysis
}
else if (this.primitiveTypes.Contains(this.Type))
{
- return $"writer.Write(value.{this.Name})";
+ return "writer.Write(value." + this.Name + ")";
}
else
{
- return $"formatterResolver.GetFormatterWithVerify<{this.Type}>().Serialize(ref writer, value.{this.Name}, options)";
+ return $"global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<{this.Type}>(formatterResolver).Serialize(ref writer, value.{this.Name}, options)";
}
}
@@ -153,65 +182,100 @@ namespace MessagePackCompiler.CodeAnalysis
}
else if (this.primitiveTypes.Contains(this.Type))
{
- string suffix = this.Type == "byte[]" ? "?.ToArray()" : string.Empty;
- return $"reader.Read{this.ShortTypeName.Replace("[]", "s")}()" + suffix;
+ if (this.Type == "byte[]")
+ {
+ return "global::MessagePack.Internal.CodeGenHelpers.GetArrayFromNullableSequence(reader.ReadBytes())";
+ }
+ else
+ {
+ return $"reader.Read{this.ShortTypeName!.Replace("[]", "s")}()";
+ }
}
else
{
- return $"formatterResolver.GetFormatterWithVerify<{this.Type}>().Deserialize(ref reader, options)";
+ return $"global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<{this.Type}>(formatterResolver).Deserialize(ref reader, options)";
}
}
}
- public class EnumSerializationInfo : IResolverRegisterInfo
+ public class EnumSerializationInfo : IResolverRegisterInfo, INamespaceInfo
{
- public string Namespace { get; set; }
+ public EnumSerializationInfo(string? @namespace, string name, string fullName, string underlyingType)
+ {
+ Namespace = @namespace;
+ Name = name;
+ FullName = fullName;
+ UnderlyingType = underlyingType;
+ }
+
+ public string? Namespace { get; }
- public string Name { get; set; }
+ public string Name { get; }
- public string FullName { get; set; }
+ public string FullName { get; }
- public string UnderlyingType { get; set; }
+ public string UnderlyingType { get; }
public string FormatterName => (this.Namespace == null ? this.Name : this.Namespace + "." + this.Name) + "Formatter";
}
public class GenericSerializationInfo : IResolverRegisterInfo, IEquatable<GenericSerializationInfo>
{
- public string FullName { get; set; }
+ public string FullName { get; }
- public string FormatterName { get; set; }
+ public string FormatterName { get; }
- public bool IsOpenGenericType { get; set; }
+ public bool IsOpenGenericType { get; }
- public bool Equals(GenericSerializationInfo other)
+ public bool Equals(GenericSerializationInfo? other)
{
- return this.FullName.Equals(other.FullName);
+ return this.FullName.Equals(other?.FullName);
}
public override int GetHashCode()
{
return this.FullName.GetHashCode();
}
+
+ public GenericSerializationInfo(string fullName, string formatterName, bool isOpenGenericType)
+ {
+ FullName = fullName;
+ FormatterName = formatterName;
+ IsOpenGenericType = isOpenGenericType;
+ }
}
- public class UnionSerializationInfo : IResolverRegisterInfo
+ public class UnionSerializationInfo : IResolverRegisterInfo, INamespaceInfo
{
- public string Namespace { get; set; }
+ public string? Namespace { get; }
- public string Name { get; set; }
+ public string Name { get; }
- public string FullName { get; set; }
+ public string FullName { get; }
public string FormatterName => (this.Namespace == null ? this.Name : this.Namespace + "." + this.Name) + "Formatter";
- public UnionSubTypeInfo[] SubTypes { get; set; }
+ public UnionSubTypeInfo[] SubTypes { get; }
+
+ public UnionSerializationInfo(string? @namespace, string name, string fullName, UnionSubTypeInfo[] subTypes)
+ {
+ Namespace = @namespace;
+ Name = name;
+ FullName = fullName;
+ SubTypes = subTypes;
+ }
}
public class UnionSubTypeInfo
{
- public string Type { get; set; }
+ public UnionSubTypeInfo(int key, string type)
+ {
+ Key = key;
+ Type = type;
+ }
+
+ public int Key { get; }
- public int Key { get; set; }
+ public string Type { get; }
}
}
diff --git a/src/MessagePack.GeneratorCore/CodeAnalysis/TypeCollector.cs b/src/MessagePack.GeneratorCore/CodeAnalysis/TypeCollector.cs
index b65a9f7d..eeedbdad 100644
--- a/src/MessagePack.GeneratorCore/CodeAnalysis/TypeCollector.cs
+++ b/src/MessagePack.GeneratorCore/CodeAnalysis/TypeCollector.cs
@@ -5,6 +5,7 @@
using System;
using System.Collections.Generic;
+using System.Collections.Immutable;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
@@ -23,14 +24,14 @@ namespace MessagePackCompiler.CodeAnalysis
internal class ReferenceSymbols
{
#pragma warning disable SA1401 // Fields should be private
- internal readonly INamedTypeSymbol Task;
- internal readonly INamedTypeSymbol TaskOfT;
+ internal readonly INamedTypeSymbol? Task;
+ internal readonly INamedTypeSymbol? TaskOfT;
internal readonly INamedTypeSymbol MessagePackObjectAttribute;
internal readonly INamedTypeSymbol UnionAttribute;
internal readonly INamedTypeSymbol SerializationConstructorAttribute;
internal readonly INamedTypeSymbol KeyAttribute;
internal readonly INamedTypeSymbol IgnoreAttribute;
- internal readonly INamedTypeSymbol IgnoreDataMemberAttribute;
+ internal readonly INamedTypeSymbol? IgnoreDataMemberAttribute;
internal readonly INamedTypeSymbol IMessagePackSerializationCallbackReceiver;
internal readonly INamedTypeSymbol MessagePackFormatterAttribute;
#pragma warning restore SA1401 // Fields should be private
@@ -49,35 +50,20 @@ namespace MessagePackCompiler.CodeAnalysis
logger("failed to get metadata of System.Threading.Tasks.Task");
}
- MessagePackObjectAttribute = compilation.GetTypeByMetadataName("MessagePack.MessagePackObjectAttribute");
- if (MessagePackObjectAttribute == null)
- {
- throw new InvalidOperationException("failed to get metadata of MessagePack.MessagePackObjectAttribute");
- }
+ MessagePackObjectAttribute = compilation.GetTypeByMetadataName("MessagePack.MessagePackObjectAttribute")
+ ?? throw new InvalidOperationException("failed to get metadata of MessagePack.MessagePackObjectAttribute");
- UnionAttribute = compilation.GetTypeByMetadataName("MessagePack.UnionAttribute");
- if (UnionAttribute == null)
- {
- throw new InvalidOperationException("failed to get metadata of MessagePack.UnionAttribute");
- }
+ UnionAttribute = compilation.GetTypeByMetadataName("MessagePack.UnionAttribute")
+ ?? throw new InvalidOperationException("failed to get metadata of MessagePack.UnionAttribute");
- SerializationConstructorAttribute = compilation.GetTypeByMetadataName("MessagePack.SerializationConstructorAttribute");
- if (SerializationConstructorAttribute == null)
- {
- throw new InvalidOperationException("failed to get metadata of MessagePack.SerializationConstructorAttribute");
- }
+ SerializationConstructorAttribute = compilation.GetTypeByMetadataName("MessagePack.SerializationConstructorAttribute")
+ ?? throw new InvalidOperationException("failed to get metadata of MessagePack.SerializationConstructorAttribute");
- KeyAttribute = compilation.GetTypeByMetadataName("MessagePack.KeyAttribute");
- if (KeyAttribute == null)
- {
- throw new InvalidOperationException("failed to get metadata of MessagePack.KeyAttribute");
- }
+ KeyAttribute = compilation.GetTypeByMetadataName("MessagePack.KeyAttribute")
+ ?? throw new InvalidOperationException("failed to get metadata of MessagePack.KeyAttribute");
- IgnoreAttribute = compilation.GetTypeByMetadataName("MessagePack.IgnoreMemberAttribute");
- if (IgnoreAttribute == null)
- {
- throw new InvalidOperationException("failed to get metadata of MessagePack.IgnoreMemberAttribute");
- }
+ IgnoreAttribute = compilation.GetTypeByMetadataName("MessagePack.IgnoreMemberAttribute")
+ ?? throw new InvalidOperationException("failed to get metadata of MessagePack.IgnoreMemberAttribute");
IgnoreDataMemberAttribute = compilation.GetTypeByMetadataName("System.Runtime.Serialization.IgnoreDataMemberAttribute");
if (IgnoreDataMemberAttribute == null)
@@ -85,24 +71,16 @@ namespace MessagePackCompiler.CodeAnalysis
logger("failed to get metadata of System.Runtime.Serialization.IgnoreDataMemberAttribute");
}
- IMessagePackSerializationCallbackReceiver = compilation.GetTypeByMetadataName("MessagePack.IMessagePackSerializationCallbackReceiver");
- if (IMessagePackSerializationCallbackReceiver == null)
- {
- throw new InvalidOperationException("failed to get metadata of MessagePack.IMessagePackSerializationCallbackReceiver");
- }
+ IMessagePackSerializationCallbackReceiver = compilation.GetTypeByMetadataName("MessagePack.IMessagePackSerializationCallbackReceiver")
+ ?? throw new InvalidOperationException("failed to get metadata of MessagePack.IMessagePackSerializationCallbackReceiver");
- MessagePackFormatterAttribute = compilation.GetTypeByMetadataName("MessagePack.MessagePackFormatterAttribute");
- if (MessagePackFormatterAttribute == null)
- {
- throw new InvalidOperationException("failed to get metadata of MessagePack.MessagePackFormatterAttribute");
- }
+ MessagePackFormatterAttribute = compilation.GetTypeByMetadataName("MessagePack.MessagePackFormatterAttribute")
+ ?? throw new InvalidOperationException("failed to get metadata of MessagePack.MessagePackFormatterAttribute");
}
}
public class TypeCollector
{
- private const string CodegeneratorOnlyPreprocessorSymbol = "INCLUDE_ONLY_CODE_GENERATION";
-
private static readonly SymbolDisplayFormat BinaryWriteFormat = new SymbolDisplayFormat(
genericsOptions: SymbolDisplayGenericsOptions.IncludeTypeParameters,
miscellaneousOptions: SymbolDisplayMiscellaneousOptions.ExpandNullable,
@@ -114,7 +92,7 @@ namespace MessagePackCompiler.CodeAnalysis
private readonly bool isForceUseMap;
private readonly ReferenceSymbols typeReferences;
private readonly INamedTypeSymbol[] targetTypes;
- private readonly HashSet<string> embeddedTypes = new HashSet<string>(new string[]
+ private readonly HashSet<string> embeddedTypes = new(new[]
{
"short",
"int",
@@ -185,7 +163,7 @@ namespace MessagePackCompiler.CodeAnalysis
"System.Reactive.Unit",
});
- private readonly Dictionary<string, string> knownGenericTypes = new Dictionary<string, string>
+ private readonly Dictionary<string, string> knownGenericTypes = new()
{
#pragma warning disable SA1509 // Opening braces should not be preceded by blank line
{ "System.Collections.Generic.List<>", "global::MessagePack.Formatters.ListFormatter<TREPLACE>" },
@@ -261,22 +239,21 @@ namespace MessagePackCompiler.CodeAnalysis
#pragma warning restore SA1509 // Opening braces should not be preceded by blank line
};
- private readonly Action<string> logger;
-
private readonly bool disallowInternal;
- private HashSet<string> externalIgnoreTypeNames;
+ private readonly HashSet<string> externalIgnoreTypeNames;
// visitor workspace:
- private HashSet<ITypeSymbol> alreadyCollected;
- private List<ObjectSerializationInfo> collectedObjectInfo;
- private List<EnumSerializationInfo> collectedEnumInfo;
- private List<GenericSerializationInfo> collectedGenericInfo;
- private List<UnionSerializationInfo> collectedUnionInfo;
-
- public TypeCollector(Compilation compilation, bool disallowInternal, bool isForceUseMap, string[] ignoreTypeNames, Action<string> logger)
+#pragma warning disable RS1024 // Compare symbols correctly (https://github.com/dotnet/roslyn-analyzers/issues/5246)
+ private readonly HashSet<ITypeSymbol> alreadyCollected = new(SymbolEqualityComparer.Default);
+#pragma warning restore RS1024 // Compare symbols correctly
+ private readonly List<ObjectSerializationInfo> collectedObjectInfo = new();
+ private readonly List<EnumSerializationInfo> collectedEnumInfo = new();
+ private readonly List<GenericSerializationInfo> collectedGenericInfo = new();
+ private readonly List<UnionSerializationInfo> collectedUnionInfo = new();
+
+ public TypeCollector(Compilation compilation, bool disallowInternal, bool isForceUseMap, string[]? ignoreTypeNames, Action<string> logger)
{
- this.logger = logger;
this.typeReferences = new ReferenceSymbols(compilation, logger);
this.disallowInternal = disallowInternal;
this.isForceUseMap = isForceUseMap;
@@ -307,11 +284,11 @@ namespace MessagePackCompiler.CodeAnalysis
private void ResetWorkspace()
{
- this.alreadyCollected = new HashSet<ITypeSymbol>();
- this.collectedObjectInfo = new List<ObjectSerializationInfo>();
- this.collectedEnumInfo = new List<EnumSerializationInfo>();
- this.collectedGenericInfo = new List<GenericSerializationInfo>();
- this.collectedUnionInfo = new List<UnionSerializationInfo>();
+ this.alreadyCollected.Clear();
+ this.collectedObjectInfo.Clear();
+ this.collectedEnumInfo.Clear();
+ this.collectedGenericInfo.Clear();
+ this.collectedUnionInfo.Clear();
}
// EntryPoint
@@ -339,19 +316,20 @@ namespace MessagePackCompiler.CodeAnalysis
return;
}
- if (this.embeddedTypes.Contains(typeSymbol.ToString()))
+ var typeSymbolString = typeSymbol.ToString() ?? throw new InvalidOperationException();
+ if (this.embeddedTypes.Contains(typeSymbolString))
{
return;
}
- if (this.externalIgnoreTypeNames.Contains(typeSymbol.ToString()))
+ if (this.externalIgnoreTypeNames.Contains(typeSymbolString))
{
return;
}
- if (typeSymbol.TypeKind == TypeKind.Array)
+ if (typeSymbol is IArrayTypeSymbol arrayTypeSymbol)
{
- this.CollectArray(typeSymbol as IArrayTypeSymbol);
+ this.CollectArray(arrayTypeSymbol);
return;
}
@@ -371,9 +349,9 @@ namespace MessagePackCompiler.CodeAnalysis
return;
}
- if (typeSymbol.TypeKind == TypeKind.Enum)
+ if (type.EnumUnderlyingType != null)
{
- this.CollectEnum(type);
+ this.CollectEnum(type, type.EnumUnderlyingType);
return;
}
@@ -401,62 +379,57 @@ namespace MessagePackCompiler.CodeAnalysis
}
this.CollectObject(type);
- return;
}
- private void CollectEnum(INamedTypeSymbol type)
+ private void CollectEnum(INamedTypeSymbol type, ISymbol enumUnderlyingType)
{
- var info = new EnumSerializationInfo
- {
- Name = type.ToDisplayString(ShortTypeNameFormat).Replace(".", "_"),
- Namespace = type.ContainingNamespace.IsGlobalNamespace ? null : type.ContainingNamespace.ToDisplayString(),
- FullName = type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat),
- UnderlyingType = type.EnumUnderlyingType.ToDisplayString(BinaryWriteFormat),
- };
-
+ var info = new EnumSerializationInfo(type.ContainingNamespace.IsGlobalNamespace ? null : type.ContainingNamespace.ToDisplayString(), type.ToDisplayString(ShortTypeNameFormat).Replace(".", "_"), type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat), enumUnderlyingType.ToDisplayString(BinaryWriteFormat));
this.collectedEnumInfo.Add(info);
}
private void CollectUnion(INamedTypeSymbol type)
{
- System.Collections.Immutable.ImmutableArray<TypedConstant>[] unionAttrs = type.GetAttributes().Where(x => x.AttributeClass.ApproximatelyEqual(this.typeReferences.UnionAttribute)).Select(x => x.ConstructorArguments).ToArray();
+ ImmutableArray<TypedConstant>[] unionAttrs = type.GetAttributes().Where(x => x.AttributeClass.ApproximatelyEqual(this.typeReferences.UnionAttribute)).Select(x => x.ConstructorArguments).ToArray();
if (unionAttrs.Length == 0)
{
throw new MessagePackGeneratorResolveFailedException("Serialization Type must mark UnionAttribute." + " type: " + type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat));
}
// 0, Int 1, SubType
- var info = new UnionSerializationInfo
+ UnionSubTypeInfo UnionSubTypeInfoSelector(ImmutableArray<TypedConstant> x)
{
- Name = type.Name,
- Namespace = type.ContainingNamespace.IsGlobalNamespace ? null : type.ContainingNamespace.ToDisplayString(),
- FullName = type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat),
- SubTypes = unionAttrs.Select(x => new UnionSubTypeInfo
+ if (!(x[0] is { Value: int key }) || !(x[1] is { Value: ITypeSymbol typeSymbol }))
{
- Key = (int)x[0].Value,
- Type = x[1].Value is ITypeSymbol typeSymbol ? typeSymbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat) : throw new NotSupportedException($"AOT code generation only supports UnionAttribute that uses a Type parameter, but the {type.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)} type uses an unsupported parameter."),
- }).OrderBy(x => x.Key).ToArray(),
- };
+ throw new NotSupportedException("AOT code generation only supports UnionAttribute that uses a Type parameter, but the " + type.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat) + " type uses an unsupported parameter.");
+ }
+
+ var typeName = typeSymbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
+ return new UnionSubTypeInfo(key, typeName);
+ }
+
+ var info = new UnionSerializationInfo(type.ContainingNamespace.IsGlobalNamespace ? null : type.ContainingNamespace.ToDisplayString(), type.Name, type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat), unionAttrs.Select(UnionSubTypeInfoSelector).OrderBy(x => x.Key).ToArray());
this.collectedUnionInfo.Add(info);
}
private void CollectGenericUnion(INamedTypeSymbol type)
{
- System.Collections.Immutable.ImmutableArray<TypedConstant>[] unionAttrs = type.GetAttributes().Where(x => x.AttributeClass.ApproximatelyEqual(this.typeReferences.UnionAttribute)).Select(x => x.ConstructorArguments).ToArray();
- if (unionAttrs.Length == 0)
+ var unionAttrs = type.GetAttributes().Where(x => x.AttributeClass.ApproximatelyEqual(this.typeReferences.UnionAttribute)).Select(x => x.ConstructorArguments);
+ using var enumerator = unionAttrs.GetEnumerator();
+ if (!enumerator.MoveNext())
{
return;
}
- var subTypes = unionAttrs.Select(x => x[1].Value).OfType<INamedTypeSymbol>().ToArray();
- foreach (var unionType in subTypes)
+ do
{
- if (alreadyCollected.Contains(unionType) == false)
+ var x = enumerator.Current;
+ if (x[1] is { Value: INamedTypeSymbol unionType } && alreadyCollected.Contains(unionType) == false)
{
CollectCore(unionType);
}
}
+ while (enumerator.MoveNext());
}
private void CollectArray(IArrayTypeSymbol array)
@@ -464,36 +437,26 @@ namespace MessagePackCompiler.CodeAnalysis
ITypeSymbol elemType = array.ElementType;
this.CollectCore(elemType);
- var info = new GenericSerializationInfo
- {
- FullName = array.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat),
- IsOpenGenericType = elemType is ITypeParameterSymbol,
- };
-
+ var fullName = array.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
+ var elementTypeDisplayName = elemType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
+ string formatterName;
if (array.IsSZArray)
{
- info.FormatterName = $"global::MessagePack.Formatters.ArrayFormatter<{elemType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)}>";
- }
- else if (array.Rank == 2)
- {
- info.FormatterName = $"global::MessagePack.Formatters.TwoDimensionalArrayFormatter<{elemType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)}>";
- }
- else if (array.Rank == 3)
- {
- info.FormatterName = $"global::MessagePack.Formatters.ThreeDimensionalArrayFormatter<{elemType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)}>";
- }
- else if (array.Rank == 4)
- {
- info.FormatterName = $"global::MessagePack.Formatters.FourDimensionalArrayFormatter<{elemType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)}>";
+ formatterName = "global::MessagePack.Formatters.ArrayFormatter<" + elementTypeDisplayName + ">";
}
else
{
- throw new InvalidOperationException("does not supports array dimension, " + info.FullName);
+ formatterName = array.Rank switch
+ {
+ 2 => "global::MessagePack.Formatters.TwoDimensionalArrayFormatter<" + elementTypeDisplayName + ">",
+ 3 => "global::MessagePack.Formatters.ThreeDimensionalArrayFormatter<" + elementTypeDisplayName + ">",
+ 4 => "global::MessagePack.Formatters.FourDimensionalArrayFormatter<" + elementTypeDisplayName + ">",
+ _ => throw new InvalidOperationException("does not supports array dimension, " + fullName),
+ };
}
+ var info = new GenericSerializationInfo(fullName, formatterName, elemType is ITypeParameterSymbol);
this.collectedGenericInfo.Add(info);
-
- return;
}
private void CollectGeneric(INamedTypeSymbol type)
@@ -512,20 +475,16 @@ namespace MessagePackCompiler.CodeAnalysis
// nullable
if (genericTypeString == "T?")
{
- this.CollectCore(type.TypeArguments[0]);
+ var firstTypeArgument = type.TypeArguments[0];
+ this.CollectCore(firstTypeArgument);
- if (!this.embeddedTypes.Contains(type.TypeArguments[0].ToString()))
+ if (this.embeddedTypes.Contains(firstTypeArgument.ToString()!))
{
- var info = new GenericSerializationInfo
- {
- FormatterName = $"global::MessagePack.Formatters.NullableFormatter<{type.TypeArguments[0].ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)}>",
- FullName = type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat),
- IsOpenGenericType = isOpenGenericType,
- };
-
- this.collectedGenericInfo.Add(info);
+ return;
}
+ var info = new GenericSerializationInfo(type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat), "global::MessagePack.Formatters.NullableFormatter<" + firstTypeArgument.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat) + ">", isOpenGenericType);
+ this.collectedGenericInfo.Add(info);
return;
}
@@ -540,43 +499,27 @@ namespace MessagePackCompiler.CodeAnalysis
var typeArgs = string.Join(", ", type.TypeArguments.Select(x => x.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)));
var f = formatter.Replace("TREPLACE", typeArgs);
- var info = new GenericSerializationInfo
- {
- FormatterName = f,
- FullName = type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat),
- IsOpenGenericType = isOpenGenericType,
- };
+ var info = new GenericSerializationInfo(type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat), f, isOpenGenericType);
this.collectedGenericInfo.Add(info);
- if (genericTypeString == "System.Linq.ILookup<,>")
+ if (genericTypeString != "System.Linq.ILookup<,>")
{
- formatter = this.knownGenericTypes["System.Linq.IGrouping<,>"];
- f = formatter.Replace("TREPLACE", typeArgs);
-
- var groupingInfo = new GenericSerializationInfo
- {
- FormatterName = f,
- FullName = $"global::System.Linq.IGrouping<{typeArgs}>",
- IsOpenGenericType = isOpenGenericType,
- };
-
- this.collectedGenericInfo.Add(groupingInfo);
+ return;
+ }
- formatter = this.knownGenericTypes["System.Collections.Generic.IEnumerable<>"];
- typeArgs = type.TypeArguments[1].ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
- f = formatter.Replace("TREPLACE", typeArgs);
+ formatter = this.knownGenericTypes["System.Linq.IGrouping<,>"];
+ f = formatter.Replace("TREPLACE", typeArgs);
- var enumerableInfo = new GenericSerializationInfo
- {
- FormatterName = f,
- FullName = $"global::System.Collections.Generic.IEnumerable<{typeArgs}>",
- IsOpenGenericType = isOpenGenericType,
- };
+ var groupingInfo = new GenericSerializationInfo("global::System.Linq.IGrouping<" + typeArgs + ">", f, isOpenGenericType);
+ this.collectedGenericInfo.Add(groupingInfo);
- this.collectedGenericInfo.Add(enumerableInfo);
- }
+ formatter = this.knownGenericTypes["System.Collections.Generic.IEnumerable<>"];
+ typeArgs = type.TypeArguments[1].ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
+ f = formatter.Replace("TREPLACE", typeArgs);
+ var enumerableInfo = new GenericSerializationInfo("global::System.Collections.Generic.IEnumerable<" + typeArgs + ">", f, isOpenGenericType);
+ this.collectedGenericInfo.Add(enumerableInfo);
return;
}
@@ -593,6 +536,9 @@ namespace MessagePackCompiler.CodeAnalysis
// NOTE: It is used to register formatters from nested generic type.
// However, closed generic types such as `Foo<string>` are not registered as a formatter.
GetObjectInfo(type);
+
+ // Collect generic type definition, that is not collected when it is defined outside target project.
+ CollectCore(type.OriginalDefinition);
}
// Collect substituted types for the type parameters (e.g. Bar in Foo<Bar>)
@@ -609,16 +555,23 @@ namespace MessagePackCompiler.CodeAnalysis
formatterBuilder.Append(type.Name);
formatterBuilder.Append("Formatter<");
- formatterBuilder.Append(string.Join(", ", type.TypeArguments.Select(x => x.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat))));
- formatterBuilder.Append(">");
-
- var genericSerializationInfo = new GenericSerializationInfo
+ var typeArgumentIterator = type.TypeArguments.GetEnumerator();
{
- FullName = type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat),
- FormatterName = formatterBuilder.ToString(),
- IsOpenGenericType = isOpenGenericType,
- };
+ if (typeArgumentIterator.MoveNext())
+ {
+ formatterBuilder.Append(typeArgumentIterator.Current.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat));
+ }
+
+ while (typeArgumentIterator.MoveNext())
+ {
+ formatterBuilder.Append(", ");
+ formatterBuilder.Append(typeArgumentIterator.Current.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat));
+ }
+ }
+ formatterBuilder.Append('>');
+
+ var genericSerializationInfo = new GenericSerializationInfo(type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat), formatterBuilder.ToString(), isOpenGenericType);
this.collectedGenericInfo.Add(genericSerializationInfo);
}
@@ -633,17 +586,14 @@ namespace MessagePackCompiler.CodeAnalysis
var isClass = !type.IsValueType;
var isOpenGenericType = type.IsGenericType;
- AttributeData contractAttr = type.GetAttributes().FirstOrDefault(x => x.AttributeClass.ApproximatelyEqual(this.typeReferences.MessagePackObjectAttribute));
- if (contractAttr == null)
- {
- throw new MessagePackGeneratorResolveFailedException("Serialization Object must mark MessagePackObjectAttribute." + " type: " + type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat));
- }
+ AttributeData contractAttr = type.GetAttributes().FirstOrDefault(x => x.AttributeClass.ApproximatelyEqual(this.typeReferences.MessagePackObjectAttribute))
+ ?? throw new MessagePackGeneratorResolveFailedException("Serialization Object must mark MessagePackObjectAttribute." + " type: " + type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat));
var isIntKey = true;
var intMembers = new Dictionary<int, MemberSerializationInfo>();
var stringMembers = new Dictionary<string, MemberSerializationInfo>();
- if (this.isForceUseMap || (bool)contractAttr.ConstructorArguments[0].Value)
+ if (this.isForceUseMap || (contractAttr.ConstructorArguments[0] is { Value: bool firstConstructorArgument } && firstConstructorArgument))
{
// All public members are serialize target except [Ignore] member.
isIntKey = false;
@@ -652,31 +602,20 @@ namespace MessagePackCompiler.CodeAnalysis
foreach (IPropertySymbol item in type.GetAllMembers().OfType<IPropertySymbol>().Where(x => !x.IsOverride))
{
- if (item.GetAttributes().Any(x => x.AttributeClass.ApproximatelyEqual(this.typeReferences.IgnoreAttribute) || x.AttributeClass.Name == this.typeReferences.IgnoreDataMemberAttribute.Name))
+ if (item.GetAttributes().Any(x => (x.AttributeClass.ApproximatelyEqual(this.typeReferences.IgnoreAttribute) || x.AttributeClass?.Name == this.typeReferences.IgnoreDataMemberAttribute?.Name)))
{
continue;
}
- var customFormatterAttr = item.GetAttributes().FirstOrDefault(x => x.AttributeClass.ApproximatelyEqual(this.typeReferences.MessagePackFormatterAttribute))?.ConstructorArguments[0].Value as INamedTypeSymbol;
-
- var member = new MemberSerializationInfo
- {
- IsReadable = (item.GetMethod != null) && item.GetMethod.DeclaredAccessibility == Accessibility.Public && !item.IsStatic,
- IsWritable = (item.SetMethod != null) && item.SetMethod.DeclaredAccessibility == Accessibility.Public && !item.IsStatic,
- StringKey = item.Name,
- IsProperty = true,
- IsField = false,
- Name = item.Name,
- Type = item.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat),
- ShortTypeName = item.Type.ToDisplayString(BinaryWriteFormat),
- CustomFormatterTypeName = customFormatterAttr?.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat),
- };
- if (!member.IsReadable && !member.IsWritable)
+ var isReadable = item.GetMethod != null && item.GetMethod.DeclaredAccessibility == Accessibility.Public && !item.IsStatic;
+ var isWritable = item.SetMethod != null && item.SetMethod.DeclaredAccessibility == Accessibility.Public && !item.IsStatic;
+ if (!isReadable && !isWritable)
{
continue;
}
- member.IntKey = hiddenIntKey++;
+ var customFormatterAttr = item.GetAttributes().FirstOrDefault(x => x.AttributeClass.ApproximatelyEqual(this.typeReferences.MessagePackFormatterAttribute))?.ConstructorArguments[0].Value as INamedTypeSymbol;
+ var member = new MemberSerializationInfo(true, isWritable, isReadable, hiddenIntKey++, item.Name, item.Name, item.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat), item.Type.ToDisplayString(BinaryWriteFormat), customFormatterAttr?.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat));
stringMembers.Add(member.StringKey, member);
this.CollectCore(item.Type); // recursive collect
@@ -684,7 +623,7 @@ namespace MessagePackCompiler.CodeAnalysis
foreach (IFieldSymbol item in type.GetAllMembers().OfType<IFieldSymbol>())
{
- if (item.GetAttributes().Any(x => x.AttributeClass.ApproximatelyEqual(this.typeReferences.IgnoreAttribute) || x.AttributeClass.Name == this.typeReferences.IgnoreDataMemberAttribute.Name))
+ if (item.GetAttributes().Any(x => (x.AttributeClass.ApproximatelyEqual(this.typeReferences.IgnoreAttribute) || x.AttributeClass?.Name == this.typeReferences.IgnoreDataMemberAttribute?.Name)))
{
continue;
}
@@ -694,26 +633,15 @@ namespace MessagePackCompiler.CodeAnalysis
continue;
}
- var customFormatterAttr = item.GetAttributes().FirstOrDefault(x => x.AttributeClass.ApproximatelyEqual(this.typeReferences.MessagePackFormatterAttribute))?.ConstructorArguments[0].Value as INamedTypeSymbol;
-
- var member = new MemberSerializationInfo
- {
- IsReadable = item.DeclaredAccessibility == Accessibility.Public && !item.IsStatic,
- IsWritable = item.DeclaredAccessibility == Accessibility.Public && !item.IsReadOnly && !item.IsStatic,
- StringKey = item.Name,
- IsProperty = false,
- IsField = true,
- Name = item.Name,
- Type = item.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat),
- ShortTypeName = item.Type.ToDisplayString(BinaryWriteFormat),
- CustomFormatterTypeName = customFormatterAttr?.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat),
- };
- if (!member.IsReadable && !member.IsWritable)
+ var isReadable = item.DeclaredAccessibility == Accessibility.Public && !item.IsStatic;
+ var isWritable = item.DeclaredAccessibility == Accessibility.Public && !item.IsReadOnly && !item.IsStatic;
+ if (!isReadable && !isWritable)
{
continue;
}
- member.IntKey = hiddenIntKey++;
+ var customFormatterAttr = item.GetAttributes().FirstOrDefault(x => x.AttributeClass.ApproximatelyEqual(this.typeReferences.MessagePackFormatterAttribute))?.ConstructorArguments[0].Value as INamedTypeSymbol;
+ var member = new MemberSerializationInfo(false, isWritable, isReadable, hiddenIntKey++, item.Name, item.Name, item.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat), item.Type.ToDisplayString(BinaryWriteFormat), customFormatterAttr?.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat));
stringMembers.Add(member.StringKey, member);
this.CollectCore(item.Type); // recursive collect
}
@@ -731,37 +659,28 @@ namespace MessagePackCompiler.CodeAnalysis
continue; // .tt files don't generate good code for this yet: https://github.com/neuecc/MessagePack-CSharp/issues/390
}
- if (item.GetAttributes().Any(x => x.AttributeClass.ApproximatelyEqual(this.typeReferences.IgnoreAttribute) || x.AttributeClass.ApproximatelyEqual(this.typeReferences.IgnoreDataMemberAttribute)))
+ if (item.GetAttributes().Any(x =>
+ {
+ var typeReferencesIgnoreDataMemberAttribute = this.typeReferences.IgnoreDataMemberAttribute;
+ return typeReferencesIgnoreDataMemberAttribute != null && (x.AttributeClass.ApproximatelyEqual(this.typeReferences.IgnoreAttribute) || x.AttributeClass.ApproximatelyEqual(typeReferencesIgnoreDataMemberAttribute));
+ }))
{
continue;
}
- var customFormatterAttr = item.GetAttributes().FirstOrDefault(x => x.AttributeClass.ApproximatelyEqual(this.typeReferences.MessagePackFormatterAttribute))?.ConstructorArguments[0].Value as INamedTypeSymbol;
-
- var member = new MemberSerializationInfo
- {
- IsReadable = (item.GetMethod != null) && item.GetMethod.DeclaredAccessibility == Accessibility.Public && !item.IsStatic,
- IsWritable = (item.SetMethod != null) && item.SetMethod.DeclaredAccessibility == Accessibility.Public && !item.IsStatic,
- IsProperty = true,
- IsField = false,
- Name = item.Name,
- Type = item.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat),
- ShortTypeName = item.Type.ToDisplayString(BinaryWriteFormat),
- CustomFormatterTypeName = customFormatterAttr?.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat),
- };
- if (!member.IsReadable && !member.IsWritable)
+ var isReadable = item.GetMethod != null && item.GetMethod.DeclaredAccessibility == Accessibility.Public && !item.IsStatic;
+ var isWritable = item.SetMethod != null && item.SetMethod.DeclaredAccessibility == Accessibility.Public && !item.IsStatic;
+ if (!isReadable && !isWritable)
{
continue;
}
- TypedConstant? key = item.GetAttributes().FirstOrDefault(x => x.AttributeClass.ApproximatelyEqual(this.typeReferences.KeyAttribute))?.ConstructorArguments[0];
- if (key == null)
- {
- throw new MessagePackGeneratorResolveFailedException("all public members must mark KeyAttribute or IgnoreMemberAttribute." + " type: " + type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat) + " member:" + item.Name);
- }
+ var customFormatterAttr = item.GetAttributes().FirstOrDefault(x => x.AttributeClass.ApproximatelyEqual(this.typeReferences.MessagePackFormatterAttribute))?.ConstructorArguments[0].Value as INamedTypeSymbol;
+ var key = item.GetAttributes().FirstOrDefault(x => x.AttributeClass.ApproximatelyEqual(this.typeReferences.KeyAttribute))?.ConstructorArguments[0]
+ ?? throw new MessagePackGeneratorResolveFailedException("all public members must mark KeyAttribute or IgnoreMemberAttribute." + " type: " + type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat) + " member:" + item.Name);
- var intKey = (key.Value.Value is int) ? (int)key.Value.Value : (int?)null;
- var stringKey = (key.Value.Value is string) ? (string)key.Value.Value : (string)null;
+ var intKey = key is { Value: int intKeyValue } ? intKeyValue : default(int?);
+ var stringKey = key is { Value: string stringKeyValue } ? stringKeyValue : default;
if (intKey == null && stringKey == null)
{
throw new MessagePackGeneratorResolveFailedException("both IntKey and StringKey are null." + " type: " + type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat) + " member:" + item.Name);
@@ -782,27 +701,31 @@ namespace MessagePackCompiler.CodeAnalysis
if (isIntKey)
{
- member.IntKey = (int)intKey;
- if (intMembers.ContainsKey(member.IntKey))
+ if (intMembers.ContainsKey(intKey!.Value))
{
throw new MessagePackGeneratorResolveFailedException("key is duplicated, all members key must be unique." + " type: " + type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat) + " member:" + item.Name);
}
+ var member = new MemberSerializationInfo(true, isWritable, isReadable, intKey!.Value, item.Name, item.Name, item.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat), item.Type.ToDisplayString(BinaryWriteFormat), customFormatterAttr?.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat));
intMembers.Add(member.IntKey, member);
}
else
{
- member.StringKey = (string)stringKey;
- if (stringMembers.ContainsKey(member.StringKey))
+ if (stringMembers.ContainsKey(stringKey!))
{
throw new MessagePackGeneratorResolveFailedException("key is duplicated, all members key must be unique." + " type: " + type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat) + " member:" + item.Name);
}
- member.IntKey = hiddenIntKey++;
+ var member = new MemberSerializationInfo(true, isWritable, isReadable, hiddenIntKey++, stringKey!, item.Name, item.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat), item.Type.ToDisplayString(BinaryWriteFormat), customFormatterAttr?.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat));
stringMembers.Add(member.StringKey, member);
}
- this.CollectCore(item.Type); // recursive collect
+ var messagePackFormatter = item.GetAttributes().FirstOrDefault(x => x.AttributeClass.ApproximatelyEqual(this.typeReferences.MessagePackFormatterAttribute))?.ConstructorArguments[0];
+
+ if (messagePackFormatter == null)
+ {
+ this.CollectCore(item.Type); // recursive collect
+ }
}
foreach (IFieldSymbol item in type.GetAllMembers().OfType<IFieldSymbol>())
@@ -817,32 +740,19 @@ namespace MessagePackCompiler.CodeAnalysis
continue;
}
- var customFormatterAttr = item.GetAttributes().FirstOrDefault(x => x.AttributeClass.ApproximatelyEqual(this.typeReferences.MessagePackFormatterAttribute))?.ConstructorArguments[0].Value as INamedTypeSymbol;
-
- var member = new MemberSerializationInfo
- {
- IsReadable = item.DeclaredAccessibility == Accessibility.Public && !item.IsStatic,
- IsWritable = item.DeclaredAccessibility == Accessibility.Public && !item.IsReadOnly && !item.IsStatic,
- IsProperty = true,
- IsField = false,
- Name = item.Name,
- Type = item.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat),
- ShortTypeName = item.Type.ToDisplayString(BinaryWriteFormat),
- CustomFormatterTypeName = customFormatterAttr?.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat),
- };
- if (!member.IsReadable && !member.IsWritable)
+ var isReadable = item.DeclaredAccessibility == Accessibility.Public && !item.IsStatic;
+ var isWritable = item.DeclaredAccessibility == Accessibility.Public && !item.IsReadOnly && !item.IsStatic;
+ if (!isReadable && !isWritable)
{
continue;
}
- TypedConstant? key = item.GetAttributes().FirstOrDefault(x => x.AttributeClass.ApproximatelyEqual(this.typeReferences.KeyAttribute))?.ConstructorArguments[0];
- if (key == null)
- {
- throw new MessagePackGeneratorResolveFailedException("all public members must mark KeyAttribute or IgnoreMemberAttribute." + " type: " + type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat) + " member:" + item.Name);
- }
+ var customFormatterAttr = item.GetAttributes().FirstOrDefault(x => x.AttributeClass.ApproximatelyEqual(this.typeReferences.MessagePackFormatterAttribute))?.ConstructorArguments[0].Value as INamedTypeSymbol;
+ var key = item.GetAttributes().FirstOrDefault(x => x.AttributeClass.ApproximatelyEqual(this.typeReferences.KeyAttribute))?.ConstructorArguments[0]
+ ?? throw new MessagePackGeneratorResolveFailedException("all public members must mark KeyAttribute or IgnoreMemberAttribute." + " type: " + type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat) + " member:" + item.Name);
- var intKey = (key.Value.Value is int) ? (int)key.Value.Value : (int?)null;
- var stringKey = (key.Value.Value is string) ? (string)key.Value.Value : (string)null;
+ var intKey = key is { Value: int intKeyValue } ? intKeyValue : default(int?);
+ var stringKey = key is { Value: string stringKeyValue } ? stringKeyValue : default;
if (intKey == null && stringKey == null)
{
throw new MessagePackGeneratorResolveFailedException("both IntKey and StringKey are null." + " type: " + type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat) + " member:" + item.Name);
@@ -863,23 +773,22 @@ namespace MessagePackCompiler.CodeAnalysis
if (isIntKey)
{
- member.IntKey = (int)intKey;
- if (intMembers.ContainsKey(member.IntKey))
+ if (intMembers.ContainsKey(intKey!.Value))
{
throw new MessagePackGeneratorResolveFailedException("key is duplicated, all members key must be unique." + " type: " + type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat) + " member:" + item.Name);
}
+ var member = new MemberSerializationInfo(true, isWritable, isReadable, intKey!.Value, item.Name, item.Name, item.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat), item.Type.ToDisplayString(BinaryWriteFormat), customFormatterAttr?.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat));
intMembers.Add(member.IntKey, member);
}
else
{
- member.StringKey = (string)stringKey;
- if (stringMembers.ContainsKey(member.StringKey))
+ if (stringMembers.ContainsKey(stringKey!))
{
throw new MessagePackGeneratorResolveFailedException("key is duplicated, all members key must be unique." + " type: " + type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat) + " member:" + item.Name);
}
- member.IntKey = hiddenIntKey++;
+ var member = new MemberSerializationInfo(true, isWritable, isReadable, hiddenIntKey++, stringKey!, item.Name, item.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat), item.Type.ToDisplayString(BinaryWriteFormat), customFormatterAttr?.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat));
stringMembers.Add(member.StringKey, member);
}
@@ -888,8 +797,8 @@ namespace MessagePackCompiler.CodeAnalysis
}
// GetConstructor
- IEnumerator<IMethodSymbol> ctorEnumerator = null;
- IMethodSymbol ctor = type.Constructors.Where(x => x.DeclaredAccessibility == Accessibility.Public).SingleOrDefault(x => x.GetAttributes().Any(y => y.AttributeClass.ApproximatelyEqual(this.typeReferences.SerializationConstructorAttribute)));
+ var ctorEnumerator = default(IEnumerator<IMethodSymbol>);
+ var ctor = type.Constructors.Where(x => x.DeclaredAccessibility == Accessibility.Public).SingleOrDefault(x => x.GetAttributes().Any(y => y.AttributeClass != null && y.AttributeClass.ApproximatelyEqual(this.typeReferences.SerializationConstructorAttribute)));
if (ctor == null)
{
ctorEnumerator = type.Constructors.Where(x => x.DeclaredAccessibility == Accessibility.Public).OrderByDescending(x => x.Parameters.Length).GetEnumerator();
@@ -909,17 +818,17 @@ namespace MessagePackCompiler.CodeAnalysis
var constructorParameters = new List<MemberSerializationInfo>();
if (ctor != null)
{
- ILookup<string, KeyValuePair<string, MemberSerializationInfo>> constructorLookupDictionary = stringMembers.ToLookup(x => x.Key, x => x, StringComparer.OrdinalIgnoreCase);
+ var constructorLookupDictionary = stringMembers.ToLookup(x => x.Key, x => x, StringComparer.OrdinalIgnoreCase);
do
{
constructorParameters.Clear();
var ctorParamIndex = 0;
- foreach (IParameterSymbol item in ctor.Parameters)
+ foreach (IParameterSymbol item in ctor!.Parameters)
{
MemberSerializationInfo paramMember;
if (isIntKey)
{
- if (intMembers.TryGetValue(ctorParamIndex, out paramMember))
+ if (intMembers.TryGetValue(ctorParamIndex, out paramMember!))
{
if (item.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat) == paramMember.Type && paramMember.IsReadable)
{
@@ -954,51 +863,46 @@ namespace MessagePackCompiler.CodeAnalysis
else
{
IEnumerable<KeyValuePair<string, MemberSerializationInfo>> hasKey = constructorLookupDictionary[item.Name];
- var len = hasKey.Count();
- if (len != 0)
+ using var enumerator = hasKey.GetEnumerator();
+ // hasKey.Count() == 0
+ if (!enumerator.MoveNext())
{
- if (len != 1)
+ if (ctorEnumerator == null)
{
- if (ctorEnumerator != null)
- {
- ctor = null;
- continue;
- }
- else
- {
- throw new MessagePackGeneratorResolveFailedException("duplicate matched constructor parameter name:" + type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat) + " parameterName:" + item.Name + " paramterType:" + item.Type.Name);
- }
+ throw new MessagePackGeneratorResolveFailedException("can't find matched constructor parameter, index not found. type:" + type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat) + " parameterName:" + item.Name);
}
- paramMember = hasKey.First().Value;
- if (item.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat) == paramMember.Type && paramMember.IsReadable)
- {
- constructorParameters.Add(paramMember);
- }
- else
+ ctor = null;
+ continue;
+ }
+
+ var first = enumerator.Current.Value;
+ // hasKey.Count() != 1
+ if (enumerator.MoveNext())
+ {
+ if (ctorEnumerator == null)
{
- if (ctorEnumerator != null)
- {
- ctor = null;
- continue;
- }
- else
- {
- throw new MessagePackGeneratorResolveFailedException("can't find matched constructor parameter, parameterType mismatch. type:" + type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat) + " parameterName:" + item.Name + " paramterType:" + item.Type.Name);
- }
+ throw new MessagePackGeneratorResolveFailedException("duplicate matched constructor parameter name:" + type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat) + " parameterName:" + item.Name + " paramterType:" + item.Type.Name);
}
+
+ ctor = null;
+ continue;
+ }
+
+ paramMember = first;
+ if (item.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat) == paramMember.Type && paramMember.IsReadable)
+ {
+ constructorParameters.Add(paramMember);
}
else
{
- if (ctorEnumerator != null)
+ if (ctorEnumerator == null)
{
- ctor = null;
- continue;
- }
- else
- {
- throw new MessagePackGeneratorResolveFailedException("can't find matched constructor parameter, index not found. type:" + type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat) + " parameterName:" + item.Name);
+ throw new MessagePackGeneratorResolveFailedException("can't find matched constructor parameter, parameterType mismatch. type:" + type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat) + " parameterName:" + item.Name + " paramterType:" + item.Type.Name);
}
+
+ ctor = null;
+ continue;
}
}
@@ -1022,23 +926,7 @@ namespace MessagePackCompiler.CodeAnalysis
needsCastOnAfter = !type.GetMembers("OnAfterDeserialize").Any();
}
- var info = new ObjectSerializationInfo
- {
- IsClass = isClass,
- IsOpenGenericType = isOpenGenericType,
- GenericTypeParameters = isOpenGenericType
- ? type.TypeParameters.Select(ToGenericTypeParameterInfo).ToArray()
- : Array.Empty<GenericTypeParameterInfo>(),
- ConstructorParameters = constructorParameters.ToArray(),
- IsIntKey = isIntKey,
- Members = isIntKey ? intMembers.Values.ToArray() : stringMembers.Values.ToArray(),
- Name = isOpenGenericType ? GetGenericFormatterClassName(type) : GetMinimallyQualifiedClassName(type),
- FullName = type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat),
- Namespace = type.ContainingNamespace.IsGlobalNamespace ? null : type.ContainingNamespace.ToDisplayString(),
- HasIMessagePackSerializationCallbackReceiver = hasSerializationConstructor,
- NeedsCastOnAfter = needsCastOnAfter,
- NeedsCastOnBefore = needsCastOnBefore,
- };
+ var info = new ObjectSerializationInfo(isClass, isOpenGenericType, isOpenGenericType ? type.TypeParameters.Select(ToGenericTypeParameterInfo).ToArray() : Array.Empty<GenericTypeParameterInfo>(), constructorParameters.ToArray(), isIntKey, isIntKey ? intMembers.Values.ToArray() : stringMembers.Values.ToArray(), isOpenGenericType ? GetGenericFormatterClassName(type) : GetMinimallyQualifiedClassName(type), type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat), type.ContainingNamespace.IsGlobalNamespace ? null : type.ContainingNamespace.ToDisplayString(), hasSerializationConstructor, needsCastOnAfter, needsCastOnBefore);
return info;
}
@@ -1055,26 +943,12 @@ namespace MessagePackCompiler.CodeAnalysis
if (typeParameter.HasReferenceTypeConstraint)
{
- if (typeParameter.ReferenceTypeConstraintNullableAnnotation == NullableAnnotation.Annotated)
- {
- constraints.Add("class?");
- }
- else
- {
- constraints.Add("class");
- }
+ constraints.Add(typeParameter.ReferenceTypeConstraintNullableAnnotation == NullableAnnotation.Annotated ? "class?" : "class");
}
if (typeParameter.HasValueTypeConstraint)
{
- if (typeParameter.HasUnmanagedTypeConstraint)
- {
- constraints.Add("unmanaged");
- }
- else
- {
- constraints.Add("struct");
- }
+ constraints.Add(typeParameter.HasUnmanagedTypeConstraint ? "unmanaged" : "struct");
}
// constraint types (IDisposable, IEnumerable ...)
@@ -1102,14 +976,15 @@ namespace MessagePackCompiler.CodeAnalysis
{
var name = type.ContainingType is object ? GetMinimallyQualifiedClassName(type.ContainingType) + "_" : string.Empty;
name += type.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat);
- name = name.Replace(".", "_");
- name = name.Replace("<", "_");
- name = name.Replace(">", "_");
+ name = name.Replace('.', '_');
+ name = name.Replace('<', '_');
+ name = name.Replace('>', '_');
name = Regex.Replace(name, @"\[([,])*\]", match => $"Array{match.Length - 1}");
+ name = name.Replace("?", string.Empty);
return name;
}
- private static bool TryGetNextConstructor(IEnumerator<IMethodSymbol> ctorEnumerator, ref IMethodSymbol ctor)
+ private static bool TryGetNextConstructor(IEnumerator<IMethodSymbol>? ctorEnumerator, ref IMethodSymbol? ctor)
{
if (ctorEnumerator == null || ctor != null)
{
diff --git a/src/MessagePack.GeneratorCore/CodeGenerator.cs b/src/MessagePack.GeneratorCore/CodeGenerator.cs
index f4dd3d35..1f48973e 100644
--- a/src/MessagePack.GeneratorCore/CodeGenerator.cs
+++ b/src/MessagePack.GeneratorCore/CodeGenerator.cs
@@ -2,6 +2,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
+using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
@@ -16,15 +17,15 @@ namespace MessagePackCompiler
{
public class CodeGenerator
{
+ private static readonly HashSet<char> InvalidFileCharSet = new(Path.GetInvalidFileNameChars());
+
private static readonly Encoding NoBomUtf8 = new UTF8Encoding(false);
- private Action<string> logger;
- private CancellationToken cancellationToken;
+ private readonly Action<string> logger;
public CodeGenerator(Action<string> logger, CancellationToken cancellationToken)
{
this.logger = logger;
- this.cancellationToken = cancellationToken;
}
/// <summary>
@@ -42,21 +43,21 @@ namespace MessagePackCompiler
Compilation compilation,
string output,
string resolverName,
- string @namespace,
+ string? @namespace,
bool useMapMode,
- string multipleIfDirectiveOutputSymbols,
- string[] externalIgnoreTypeNames)
+ string? multipleIfDirectiveOutputSymbols,
+ string[]? externalIgnoreTypeNames)
{
var namespaceDot = string.IsNullOrWhiteSpace(@namespace) ? string.Empty : @namespace + ".";
var multipleOutputSymbols = multipleIfDirectiveOutputSymbols?.Split(',') ?? Array.Empty<string>();
var sw = Stopwatch.StartNew();
- foreach (var multioutSymbol in multipleOutputSymbols.Length == 0 ? new[] { string.Empty } : multipleOutputSymbols)
+ foreach (var multiOutputSymbol in multipleOutputSymbols.Length == 0 ? new[] { string.Empty } : multipleOutputSymbols)
{
logger("Project Compilation Start:" + compilation.AssemblyName);
- var collector = new TypeCollector(compilation, true, useMapMode, externalIgnoreTypeNames, x => Console.WriteLine(x));
+ var collector = new TypeCollector(compilation, true, useMapMode, externalIgnoreTypeNames, Console.WriteLine);
logger("Project Compilation Complete:" + sw.Elapsed.ToString());
@@ -73,152 +74,220 @@ namespace MessagePackCompiler
if (Path.GetExtension(output) == ".cs")
{
// SingleFile Output
- var objectFormatterTemplates = objectInfo
- .GroupBy(x => (x.Namespace, x.IsStringKey))
- .Select(x =>
- {
- var (nameSpace, isStringKey) = x.Key;
- var objectSerializationInfos = x.ToArray();
- var template = isStringKey ? new StringKeyFormatterTemplate() : (IFormatterTemplate)new FormatterTemplate();
+ var fullGeneratedProgramText = GenerateSingleFileSync(resolverName, namespaceDot, objectInfo, enumInfo, unionInfo, genericInfo);
+ if (multiOutputSymbol == string.Empty)
+ {
+ await OutputAsync(output, fullGeneratedProgramText);
+ }
+ else
+ {
+ var fname = Path.GetFileNameWithoutExtension(output) + "." + MultiSymbolToSafeFilePath(multiOutputSymbol) + ".cs";
+ var text = $"#if {multiOutputSymbol}" + Environment.NewLine + fullGeneratedProgramText + Environment.NewLine + "#endif";
+ await OutputAsync(Path.Combine(Path.GetDirectoryName(output) ?? string.Empty, fname), text);
+ }
+ }
+ else
+ {
+ // Multiple File output
+ await GenerateMultipleFileAsync(output, resolverName, objectInfo, enumInfo, unionInfo, namespaceDot, multiOutputSymbol, genericInfo);
+ }
- template.Namespace = namespaceDot + "Formatters" + (nameSpace is null ? string.Empty : "." + nameSpace);
- template.ObjectSerializationInfos = objectSerializationInfos;
+ if (objectInfo.Length == 0 && enumInfo.Length == 0 && genericInfo.Length == 0 && unionInfo.Length == 0)
+ {
+ logger("Generated result is empty, unexpected result?");
+ }
+ }
- return template;
- })
- .ToArray();
+ logger("Output Generation Complete:" + sw.Elapsed.ToString());
+ }
- var enumFormatterTemplates = enumInfo
- .GroupBy(x => x.Namespace)
- .Select(x => new EnumTemplate()
- {
- Namespace = namespaceDot + "Formatters" + ((x.Key == null) ? string.Empty : "." + x.Key),
- EnumSerializationInfos = x.ToArray(),
- })
- .ToArray();
-
- var unionFormatterTemplates = unionInfo
- .GroupBy(x => x.Namespace)
- .Select(x => new UnionTemplate()
- {
- Namespace = namespaceDot + "Formatters" + ((x.Key == null) ? string.Empty : "." + x.Key),
- UnionSerializationInfos = x.ToArray(),
- })
- .ToArray();
+ /// <summary>
+ /// Generates the specialized resolver and formatters for the types that require serialization in a given compilation.
+ /// </summary>
+ /// <param name="resolverName">The resolver name.</param>
+ /// <param name="namespaceDot">The namespace for the generated type to be created in.</param>
+ /// <param name="objectInfo">The ObjectSerializationInfo array which TypeCollector.Collect returns.</param>
+ /// <param name="enumInfo">The EnumSerializationInfo array which TypeCollector.Collect returns.</param>
+ /// <param name="unionInfo">The UnionSerializationInfo array which TypeCollector.Collect returns.</param>
+ /// <param name="genericInfo">The GenericSerializationInfo array which TypeCollector.Collect returns.</param>
+ public static string GenerateSingleFileSync(string resolverName, string namespaceDot, ObjectSerializationInfo[] objectInfo, EnumSerializationInfo[] enumInfo, UnionSerializationInfo[] unionInfo, GenericSerializationInfo[] genericInfo)
+ {
+ var objectFormatterTemplates = objectInfo
+ .GroupBy(x => (x.Namespace, x.IsStringKey))
+ .Select(x =>
+ {
+ var (nameSpace, isStringKey) = x.Key;
+ var objectSerializationInfos = x.ToArray();
+ var ns = namespaceDot + "Formatters" + (nameSpace is null ? string.Empty : "." + nameSpace);
+ var template = isStringKey ? new StringKeyFormatterTemplate(ns, objectSerializationInfos) : (IFormatterTemplate)new FormatterTemplate(ns, objectSerializationInfos);
+ return template;
+ })
+ .ToArray();
+
+ string GetNamespace<T>(IGrouping<string?, T> x)
+ {
+ if (x.Key == null)
+ {
+ return namespaceDot + "Formatters";
+ }
- var resolverTemplate = new ResolverTemplate()
- {
- Namespace = namespaceDot + "Resolvers",
- FormatterNamespace = namespaceDot + "Formatters",
- ResolverName = resolverName,
- RegisterInfos = genericInfo.Where(x => !x.IsOpenGenericType).Cast<IResolverRegisterInfo>().Concat(enumInfo).Concat(unionInfo).Concat(objectInfo.Where(x => !x.IsOpenGenericType)).ToArray(),
- };
-
- var sb = new StringBuilder();
- sb.AppendLine(resolverTemplate.TransformText());
- sb.AppendLine();
- foreach (var item in enumFormatterTemplates)
- {
- var text = item.TransformText();
- sb.AppendLine(text);
- }
+ return namespaceDot + "Formatters." + x.Key;
+ }
- sb.AppendLine();
- foreach (var item in unionFormatterTemplates)
- {
- var text = item.TransformText();
- sb.AppendLine(text);
- }
+ var enumFormatterTemplates = enumInfo
+ .GroupBy(x => x.Namespace)
+ .Select(x => new EnumTemplate(GetNamespace(x), x.ToArray()))
+ .ToArray();
- sb.AppendLine();
- foreach (var item in objectFormatterTemplates)
- {
- var text = item.TransformText();
- sb.AppendLine(text);
- }
+ var unionFormatterTemplates = unionInfo
+ .GroupBy(x => x.Namespace)
+ .Select(x => new UnionTemplate(GetNamespace(x), x.ToArray()))
+ .ToArray();
- if (multioutSymbol == string.Empty)
- {
- await OutputAsync(output, sb.ToString(), cancellationToken);
- }
- else
+ var resolverTemplate = new ResolverTemplate(namespaceDot + "Resolvers", namespaceDot + "Formatters", resolverName, genericInfo.Where(x => !x.IsOpenGenericType).Cast<IResolverRegisterInfo>().Concat(enumInfo).Concat(unionInfo).Concat(objectInfo.Where(x => !x.IsOpenGenericType)).ToArray());
+
+ var sb = new StringBuilder();
+ sb.AppendLine(resolverTemplate.TransformText());
+ sb.AppendLine();
+ foreach (var item in enumFormatterTemplates)
+ {
+ var text = item.TransformText();
+ sb.AppendLine(text);
+ }
+
+ sb.AppendLine();
+ foreach (var item in unionFormatterTemplates)
+ {
+ var text = item.TransformText();
+ sb.AppendLine(text);
+ }
+
+ sb.AppendLine();
+ foreach (var item in objectFormatterTemplates)
+ {
+ var text = item.TransformText();
+ sb.AppendLine(text);
+ }
+
+ return sb.ToString();
+ }
+
+ private Task GenerateMultipleFileAsync(string output, string resolverName, ObjectSerializationInfo[] objectInfo, EnumSerializationInfo[] enumInfo, UnionSerializationInfo[] unionInfo, string namespaceDot, string multioutSymbol, GenericSerializationInfo[] genericInfo)
+ {
+ string GetNamespace(INamespaceInfo x)
+ {
+ if (x.Namespace == null)
+ {
+ return namespaceDot + "Formatters";
+ }
+
+ return namespaceDot + "Formatters." + x.Namespace;
+ }
+
+ var waitingTasks = new Task[objectInfo.Length + enumInfo.Length + unionInfo.Length + 1];
+ var waitingIndex = 0;
+ foreach (var x in objectInfo)
+ {
+ var ns = namespaceDot + "Formatters" + (x.Namespace is null ? string.Empty : "." + x.Namespace);
+ var template = x.IsStringKey ? new StringKeyFormatterTemplate(ns, new[] { x }) : (IFormatterTemplate)new FormatterTemplate(ns, new[] { x });
+ var text = template.TransformText();
+ waitingTasks[waitingIndex++] = OutputToDirAsync(output, template.Namespace, x.Name + "Formatter", multioutSymbol, text);
+ }
+
+ foreach (var x in enumInfo)
+ {
+ var template = new EnumTemplate(GetNamespace(x), new[] { x });
+ var text = template.TransformText();
+ waitingTasks[waitingIndex++] = OutputToDirAsync(output, template.Namespace, x.Name + "Formatter", multioutSymbol, text);
+ }
+
+ foreach (var x in unionInfo)
+ {
+ var template = new UnionTemplate(GetNamespace(x), new[] { x });
+ var text = template.TransformText();
+ waitingTasks[waitingIndex++] = OutputToDirAsync(output, template.Namespace, x.Name + "Formatter", multioutSymbol, text);
+ }
+
+ var resolverTemplate = new ResolverTemplate(namespaceDot + "Resolvers", namespaceDot + "Formatters", resolverName, genericInfo.Where(x => !x.IsOpenGenericType).Cast<IResolverRegisterInfo>().Concat(enumInfo).Concat(unionInfo).Concat(objectInfo.Where(x => !x.IsOpenGenericType)).ToArray());
+ waitingTasks[waitingIndex] = OutputToDirAsync(output, resolverTemplate.Namespace, resolverTemplate.ResolverName, multioutSymbol, resolverTemplate.TransformText());
+ return Task.WhenAll(waitingTasks);
+ }
+
+ private Task OutputToDirAsync(string dir, string ns, string name, string multipleOutSymbol, string text)
+ {
+ var builder = new StringBuilder();
+ void AppendDir(string dir)
+ {
+ if (dir.Length != 0)
+ {
+ builder.Append(dir);
+ if (dir[dir.Length - 1] != Path.DirectorySeparatorChar && dir[dir.Length - 1] != Path.AltDirectorySeparatorChar)
{
- var fname = Path.GetFileNameWithoutExtension(output) + "." + MultiSymbolToSafeFilePath(multioutSymbol) + ".cs";
- var text = $"#if {multioutSymbol}" + Environment.NewLine + sb.ToString() + Environment.NewLine + "#endif";
- await OutputAsync(Path.Combine(Path.GetDirectoryName(output), fname), text, cancellationToken);
+ builder.Append(Path.DirectorySeparatorChar);
}
}
+ }
+
+ void AppendChar(char c)
+ {
+ if (c == '.' || InvalidFileCharSet.Contains(c))
+ {
+ builder.Append('_');
+ }
else
{
- // Multiple File output
- foreach (var x in objectInfo)
- {
- var template = x.IsStringKey ? new StringKeyFormatterTemplate() : (IFormatterTemplate)new FormatterTemplate();
- template.Namespace = namespaceDot + "Formatters" + (x.Namespace is null ? string.Empty : "." + x.Namespace);
- template.ObjectSerializationInfos = new[] { x };
-
- var text = template.TransformText();
- await OutputToDirAsync(output, template.Namespace, x.Name + "Formatter", multioutSymbol, text, cancellationToken);
- }
+ builder.Append(c);
+ }
+ }
- foreach (var x in enumInfo)
+ void Append(string text)
+ {
+ var span = text.AsSpan();
+ while (!span.IsEmpty)
+ {
+ var index = span.IndexOf("global::".AsSpan());
+ if (index == -1)
{
- var template = new EnumTemplate()
+ foreach (var c in span)
{
- Namespace = namespaceDot + "Formatters" + ((x.Namespace == null) ? string.Empty : "." + x.Namespace),
- EnumSerializationInfos = new[] { x },
- };
+ AppendChar(c);
+ }
- var text = template.TransformText();
- await OutputToDirAsync(output, template.Namespace, x.Name + "Formatter", multioutSymbol, text, cancellationToken);
+ break;
}
- foreach (var x in unionInfo)
+ if (index == 0)
{
- var template = new UnionTemplate()
- {
- Namespace = namespaceDot + "Formatters" + ((x.Namespace == null) ? string.Empty : "." + x.Namespace),
- UnionSerializationInfos = new[] { x },
- };
-
- var text = template.TransformText();
- await OutputToDirAsync(output, template.Namespace, x.Name + "Formatter", multioutSymbol, text, cancellationToken);
+ span = span.Slice("global::".Length);
+ continue;
}
- var resolverTemplate = new ResolverTemplate()
+ foreach (var c in span.Slice(0, index))
{
- Namespace = namespaceDot + "Resolvers",
- FormatterNamespace = namespaceDot + "Formatters",
- ResolverName = resolverName,
- RegisterInfos = genericInfo.Where(x => !x.IsOpenGenericType).Cast<IResolverRegisterInfo>().Concat(enumInfo).Concat(unionInfo).Concat(objectInfo.Where(x => !x.IsOpenGenericType)).ToArray(),
- };
-
- await OutputToDirAsync(output, resolverTemplate.Namespace, resolverTemplate.ResolverName, multioutSymbol, resolverTemplate.TransformText(), cancellationToken);
- }
+ AppendChar(c);
+ }
- if (objectInfo.Length == 0 && enumInfo.Length == 0 && genericInfo.Length == 0 && unionInfo.Length == 0)
- {
- logger("Generated result is empty, unexpected result?");
+ span = span.Slice(index + "global::".Length);
}
}
- logger("Output Generation Complete:" + sw.Elapsed.ToString());
- }
+ AppendDir(dir);
- private Task OutputToDirAsync(string dir, string ns, string name, string multipleOutSymbol, string text, CancellationToken cancellationToken)
- {
- if (multipleOutSymbol == string.Empty)
- {
- return OutputAsync(Path.Combine(dir, $"{ns}_{name}".Replace(".", "_").Replace("global::", string.Empty) + ".cs"), text, cancellationToken);
- }
- else
+ if (!string.IsNullOrWhiteSpace(multipleOutSymbol))
{
text = $"#if {multipleOutSymbol}" + Environment.NewLine + text + Environment.NewLine + "#endif";
- return OutputAsync(Path.Combine(dir, MultiSymbolToSafeFilePath(multipleOutSymbol), $"{ns}_{name}".Replace(".", "_").Replace("global::", string.Empty) + ".cs"), text, cancellationToken);
+ AppendDir(MultiSymbolToSafeFilePath(multipleOutSymbol));
}
+
+ Append(ns);
+ builder.Append('_');
+ Append(name);
+ builder.Append(".cs");
+
+ return OutputAsync(builder.ToString(), text);
}
- private Task OutputAsync(string path, string text, CancellationToken cancellationToken)
+ private Task OutputAsync(string path, string text)
{
path = path.Replace("global::", string.Empty);
@@ -226,12 +295,12 @@ namespace MessagePackCompiler
logger(prefix + path);
var fi = new FileInfo(path);
- if (!fi.Directory.Exists)
+ if (fi.Directory != null && !fi.Directory.Exists)
{
fi.Directory.Create();
}
- System.IO.File.WriteAllText(path, NormalizeNewLines(text), NoBomUtf8);
+ File.WriteAllText(path, NormalizeNewLines(text), NoBomUtf8);
return Task.CompletedTask;
}
diff --git a/src/MessagePack.GeneratorCore/Generator/EnumTemplate.cs b/src/MessagePack.GeneratorCore/Generator/EnumTemplate.cs
index b64b4912..382112a3 100644
--- a/src/MessagePack.GeneratorCore/Generator/EnumTemplate.cs
+++ b/src/MessagePack.GeneratorCore/Generator/EnumTemplate.cs
@@ -1,10 +1,10 @@
// ------------------------------------------------------------------------------
// <auto-generated>
-// このコードはツールによって生成されました。
-// ランタイム バージョン: 16.0.0.0
+// This code was generated by a tool.
+// Runtime Version: 17.0.0.0
//
-// このファイルへの変更は、正しくない動作の原因になる可能性があり、
-// コードが再生成されると失われます。
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------
namespace MessagePackCompiler.Generator
@@ -17,7 +17,7 @@ namespace MessagePackCompiler.Generator
/// <summary>
/// Class to produce the template output
/// </summary>
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "16.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "17.0.0.0")]
public partial class EnumTemplate : EnumTemplateBase
{
/// <summary>
@@ -33,28 +33,29 @@ namespace MessagePackCompiler.Generator
#pragma warning disable 612
#pragma warning disable 414
#pragma warning disable 168
+#pragma warning disable CS1591 // document public APIs
-#pragma warning disable SA1200 // Using directives should be placed correctly
#pragma warning disable SA1403 // File may only contain a single namespace
#pragma warning disable SA1649 // File name should match first type name
namespace ");
this.Write(this.ToStringHelper.ToStringWithCulture(Namespace));
- this.Write("\r\n{\r\n using System;\r\n using System.Buffers;\r\n using MessagePack;\r\n");
+ this.Write("\r\n{\r\n");
foreach(var info in EnumSerializationInfos) {
this.Write("\r\n public sealed class ");
this.Write(this.ToStringHelper.ToStringWithCulture(info.Name));
this.Write("Formatter : global::MessagePack.Formatters.IMessagePackFormatter<");
this.Write(this.ToStringHelper.ToStringWithCulture(info.FullName));
- this.Write(">\r\n {\r\n public void Serialize(ref MessagePackWriter writer, ");
+ this.Write(">\r\n {\r\n public void Serialize(ref global::MessagePack.MessagePackWriter" +
+ " writer, ");
this.Write(this.ToStringHelper.ToStringWithCulture(info.FullName));
this.Write(" value, global::MessagePack.MessagePackSerializerOptions options)\r\n {\r\n " +
- " writer.Write((");
+ " writer.Write((global::System.");
this.Write(this.ToStringHelper.ToStringWithCulture(info.UnderlyingType));
this.Write(")value);\r\n }\r\n\r\n public ");
this.Write(this.ToStringHelper.ToStringWithCulture(info.FullName));
- this.Write(" Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSeriali" +
- "zerOptions options)\r\n {\r\n return (");
+ this.Write(" Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePac" +
+ "k.MessagePackSerializerOptions options)\r\n {\r\n return (");
this.Write(this.ToStringHelper.ToStringWithCulture(info.FullName));
this.Write(")reader.Read");
this.Write(this.ToStringHelper.ToStringWithCulture(info.UnderlyingType));
@@ -67,7 +68,6 @@ namespace ");
#pragma warning restore 618
#pragma warning restore 612
-#pragma warning restore SA1200 // Using directives should be placed correctly
#pragma warning restore SA1403 // File may only contain a single namespace
#pragma warning restore SA1649 // File name should match first type name
");
@@ -78,7 +78,7 @@ namespace ");
/// <summary>
/// Base class for this transformation
/// </summary>
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "16.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "17.0.0.0")]
public class EnumTemplateBase
{
#region Fields
diff --git a/src/MessagePack.GeneratorCore/Generator/EnumTemplate.tt b/src/MessagePack.GeneratorCore/Generator/EnumTemplate.tt
index 28d34550..74214c6c 100644
--- a/src/MessagePack.GeneratorCore/Generator/EnumTemplate.tt
+++ b/src/MessagePack.GeneratorCore/Generator/EnumTemplate.tt
@@ -11,26 +11,23 @@
#pragma warning disable 612
#pragma warning disable 414
#pragma warning disable 168
+#pragma warning disable CS1591 // document public APIs
-#pragma warning disable SA1200 // Using directives should be placed correctly
#pragma warning disable SA1403 // File may only contain a single namespace
#pragma warning disable SA1649 // File name should match first type name
namespace <#= Namespace #>
{
- using System;
- using System.Buffers;
- using MessagePack;
<# foreach(var info in EnumSerializationInfos) { #>
public sealed class <#= info.Name #>Formatter : global::MessagePack.Formatters.IMessagePackFormatter<<#= info.FullName #>>
{
- public void Serialize(ref MessagePackWriter writer, <#= info.FullName #> value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, <#= info.FullName #> value, global::MessagePack.MessagePackSerializerOptions options)
{
- writer.Write((<#= info.UnderlyingType #>)value);
+ writer.Write((global::System.<#= info.UnderlyingType #>)value);
}
- public <#= info.FullName #> Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public <#= info.FullName #> Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
return (<#= info.FullName #>)reader.Read<#= info.UnderlyingType #>();
}
@@ -43,6 +40,5 @@ namespace <#= Namespace #>
#pragma warning restore 618
#pragma warning restore 612
-#pragma warning restore SA1200 // Using directives should be placed correctly
#pragma warning restore SA1403 // File may only contain a single namespace
#pragma warning restore SA1649 // File name should match first type name
diff --git a/src/MessagePack.GeneratorCore/Generator/FormatterTemplate.cs b/src/MessagePack.GeneratorCore/Generator/FormatterTemplate.cs
index 121b17f4..396d6a52 100644
--- a/src/MessagePack.GeneratorCore/Generator/FormatterTemplate.cs
+++ b/src/MessagePack.GeneratorCore/Generator/FormatterTemplate.cs
@@ -1,7 +1,7 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version: 16.0.0.0
+// Runtime Version: 17.0.0.0
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -17,7 +17,7 @@ namespace MessagePackCompiler.Generator
/// <summary>
/// Class to produce the template output
/// </summary>
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "16.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "17.0.0.0")]
public partial class FormatterTemplate : FormatterTemplateBase
{
/// <summary>
@@ -33,9 +33,9 @@ namespace MessagePackCompiler.Generator
#pragma warning disable 612
#pragma warning disable 414
#pragma warning disable 168
+#pragma warning disable CS1591 // document public APIs
#pragma warning disable SA1129 // Do not use default value type constructor
-#pragma warning disable SA1200 // Using directives should be placed correctly
#pragma warning disable SA1309 // Field names should not begin with underscore
#pragma warning disable SA1312 // Variable names should begin with lower-case letter
#pragma warning disable SA1403 // File may only contain a single namespace
@@ -43,17 +43,15 @@ namespace MessagePackCompiler.Generator
namespace ");
this.Write(this.ToStringHelper.ToStringWithCulture(Namespace));
- this.Write("\r\n{\r\n using System;\r\n using System.Buffers;\r\n using MessagePack;\r\n");
- foreach(var objInfo in ObjectSerializationInfos) {
+ this.Write("\r\n{\r\n");
+ foreach (var objInfo in ObjectSerializationInfos) {
bool isFormatterResolverNecessary = ShouldUseFormatterResolverHelper.ShouldUseFormatterResolver(objInfo.Members);
- this.Write("\r\n public sealed class ");
- this.Write(this.ToStringHelper.ToStringWithCulture(objInfo.Name));
- this.Write("Formatter");
- this.Write(this.ToStringHelper.ToStringWithCulture((objInfo.IsOpenGenericType ? $"<{string.Join(",", objInfo.GenericTypeParameters.Select(x => x.Name))}>" : "")));
+ this.Write(" public sealed class ");
+ this.Write(this.ToStringHelper.ToStringWithCulture(objInfo.FormatterNameWithoutNameSpace));
this.Write(" : global::MessagePack.Formatters.IMessagePackFormatter<");
this.Write(this.ToStringHelper.ToStringWithCulture(objInfo.FullName));
this.Write(">\r\n");
- foreach(var typeArg in objInfo.GenericTypeParameters.Where(x => x.HasConstraints)) {
+ foreach (var typeArg in objInfo.GenericTypeParameters.Where(x => x.HasConstraints)) {
this.Write(" where ");
this.Write(this.ToStringHelper.ToStringWithCulture(typeArg.Name));
this.Write(" : ");
@@ -61,9 +59,9 @@ namespace ");
this.Write("\r\n");
}
this.Write(" {\r\n");
- foreach(var item in objInfo.Members) {
- if(item.CustomFormatterTypeName != null) {
- this.Write(" ");
+ foreach (var item in objInfo.Members) {
+ if (item.CustomFormatterTypeName != null) {
+ this.Write(" private readonly ");
this.Write(this.ToStringHelper.ToStringWithCulture(item.CustomFormatterTypeName));
this.Write(" __");
this.Write(this.ToStringHelper.ToStringWithCulture(item.Name));
@@ -72,88 +70,142 @@ namespace ");
this.Write("();\r\n");
}
}
- this.Write("\r\n public void Serialize(ref MessagePackWriter writer, ");
+ this.Write("\r\n public void Serialize(ref global::MessagePack.MessagePackWriter writer," +
+ " ");
this.Write(this.ToStringHelper.ToStringWithCulture(objInfo.FullName));
this.Write(" value, global::MessagePack.MessagePackSerializerOptions options)\r\n {\r\n");
- if( objInfo.IsClass) {
+ if (objInfo.IsClass) {
this.Write(" if (value == null)\r\n {\r\n writer.WriteNil();" +
"\r\n return;\r\n }\r\n\r\n");
}
if (isFormatterResolverNecessary) {
- this.Write(" IFormatterResolver formatterResolver = options.Resolver;\r\n");
-}
+ this.Write(" global::MessagePack.IFormatterResolver formatterResolver = options.Re" +
+ "solver;\r\n");
+ }
- if(objInfo.HasIMessagePackSerializationCallbackReceiver && objInfo.NeedsCastOnBefore) {
- this.Write(" ((IMessagePackSerializationCallbackReceiver)value).OnBeforeSerialize(" +
- ");\r\n");
- } else if(objInfo.HasIMessagePackSerializationCallbackReceiver) {
+ if (objInfo.HasIMessagePackSerializationCallbackReceiver) {
+ if (objInfo.NeedsCastOnBefore) {
+ this.Write(" ((global::MessagePack.IMessagePackSerializationCallbackReceiver)value" +
+ ").OnBeforeSerialize();\r\n");
+ } else {
this.Write(" value.OnBeforeSerialize();\r\n");
}
+ }
this.Write(" writer.WriteArrayHeader(");
this.Write(this.ToStringHelper.ToStringWithCulture(objInfo.MaxKey + 1));
this.Write(");\r\n");
- for(var i =0; i<= objInfo.MaxKey; i++) { var member = objInfo.GetMember(i);
- if( member == null) {
+ for (var i = 0; i <= objInfo.MaxKey; i++) {
+ var member = objInfo.GetMember(i);
+ if (member == null) {
this.Write(" writer.WriteNil();\r\n");
} else {
this.Write(" ");
this.Write(this.ToStringHelper.ToStringWithCulture(member.GetSerializeMethodString()));
this.Write(";\r\n");
- } }
+ }
+ }
this.Write(" }\r\n\r\n public ");
this.Write(this.ToStringHelper.ToStringWithCulture(objInfo.FullName));
- this.Write(" Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSeriali" +
- "zerOptions options)\r\n {\r\n if (reader.TryReadNil())\r\n " +
- " {\r\n");
- if( objInfo.IsClass) {
+ this.Write(" Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePac" +
+ "k.MessagePackSerializerOptions options)\r\n {\r\n if (reader.TryRe" +
+ "adNil())\r\n {\r\n");
+ if (objInfo.IsClass) {
this.Write(" return null;\r\n");
} else {
- this.Write(" throw new InvalidOperationException(\"typecode is null, struct not" +
- " supported\");\r\n");
+ this.Write(" throw new global::System.InvalidOperationException(\"typecode is n" +
+ "ull, struct not supported\");\r\n");
}
- this.Write(" }\r\n\r\n options.Security.DepthStep(ref reader);\r\n");
+ this.Write(" }\r\n\r\n");
+ if (objInfo.MaxKey == -1 && !objInfo.HasIMessagePackSerializationCallbackReceiver) {
+ this.Write(" reader.Skip();\r\n return new ");
+ this.Write(this.ToStringHelper.ToStringWithCulture(objInfo.GetConstructorString()));
+ this.Write(";\r\n");
+ } else {
+ this.Write(" options.Security.DepthStep(ref reader);\r\n");
if (isFormatterResolverNecessary) {
- this.Write(" IFormatterResolver formatterResolver = options.Resolver;\r\n");
+ this.Write(" global::MessagePack.IFormatterResolver formatterResolver = options.Re" +
+ "solver;\r\n");
}
this.Write(" var length = reader.ReadArrayHeader();\r\n");
- foreach(var x in objInfo.Members) {
+ var canOverwrite = objInfo.ConstructorParameters.Length == 0;
+ if (canOverwrite) {
+ this.Write(" var ____result = new ");
+ this.Write(this.ToStringHelper.ToStringWithCulture(objInfo.GetConstructorString()));
+ this.Write(";\r\n");
+ } else { foreach (var member in objInfo.Members) {
this.Write(" var __");
- this.Write(this.ToStringHelper.ToStringWithCulture(x.Name));
+ this.Write(this.ToStringHelper.ToStringWithCulture(member.Name));
this.Write("__ = default(");
- this.Write(this.ToStringHelper.ToStringWithCulture(x.Type));
+ this.Write(this.ToStringHelper.ToStringWithCulture(member.Type));
this.Write(");\r\n");
}
+ }
this.Write("\r\n for (int i = 0; i < length; i++)\r\n {\r\n sw" +
"itch (i)\r\n {\r\n");
- foreach(var x in objInfo.Members) {
+ for (var memberIndex = 0; memberIndex <= objInfo.MaxKey; memberIndex++) {
+ var member = objInfo.GetMember(memberIndex);
+ if (member == null) { continue; }
this.Write(" case ");
- this.Write(this.ToStringHelper.ToStringWithCulture(x.IntKey));
- this.Write(":\r\n __");
- this.Write(this.ToStringHelper.ToStringWithCulture(x.Name));
+ this.Write(this.ToStringHelper.ToStringWithCulture(member.IntKey));
+ this.Write(":\r\n");
+ if (canOverwrite) {
+ if (member.IsWritable) {
+ this.Write(" ____result.");
+ this.Write(this.ToStringHelper.ToStringWithCulture(member.Name));
+ this.Write(" = ");
+ this.Write(this.ToStringHelper.ToStringWithCulture(member.GetDeserializeMethodString()));
+ this.Write(";\r\n");
+ } else {
+ this.Write(" ");
+ this.Write(this.ToStringHelper.ToStringWithCulture(member.GetDeserializeMethodString()));
+ this.Write(";\r\n");
+ }
+ } else {
+ this.Write(" __");
+ this.Write(this.ToStringHelper.ToStringWithCulture(member.Name));
this.Write("__ = ");
- this.Write(this.ToStringHelper.ToStringWithCulture(x.GetDeserializeMethodString()));
- this.Write(";\r\n break;\r\n");
+ this.Write(this.ToStringHelper.ToStringWithCulture(member.GetDeserializeMethodString()));
+ this.Write(";\r\n");
+ }
+ this.Write(" break;\r\n");
}
this.Write(" default:\r\n reader.Skip();\r\n " +
- " break;\r\n }\r\n }\r\n\r\n var ____res" +
- "ult = new ");
+ " break;\r\n }\r\n }\r\n\r\n");
+ if (!canOverwrite) {
+ this.Write(" var ____result = new ");
this.Write(this.ToStringHelper.ToStringWithCulture(objInfo.GetConstructorString()));
this.Write(";\r\n");
- foreach(var x in objInfo.Members.Where(x => x.IsWritable)) {
- this.Write(" ____result.");
- this.Write(this.ToStringHelper.ToStringWithCulture(x.Name));
+ bool memberAssignExists = false;
+ for (var memberIndex = 0; memberIndex <= objInfo.MaxKey; memberIndex++) {
+ var member = objInfo.GetMember(memberIndex);
+ if (member == null || !member.IsWritable || objInfo.ConstructorParameters.Any(p => p.Equals(member))) { continue; }
+ memberAssignExists = true;
+ this.Write(" if (length <= ");
+ this.Write(this.ToStringHelper.ToStringWithCulture(memberIndex));
+ this.Write(")\r\n {\r\n goto MEMBER_ASSIGNMENT_END;\r\n }\r\n\r\n " +
+ " ____result.");
+ this.Write(this.ToStringHelper.ToStringWithCulture(member.Name));
this.Write(" = __");
- this.Write(this.ToStringHelper.ToStringWithCulture(x.Name));
+ this.Write(this.ToStringHelper.ToStringWithCulture(member.Name));
this.Write("__;\r\n");
}
-if(objInfo.HasIMessagePackSerializationCallbackReceiver && objInfo.NeedsCastOnAfter) {
- this.Write(" ((IMessagePackSerializationCallbackReceiver)____result).OnAfterDeseri" +
- "alize();\r\n");
- } else if(objInfo.HasIMessagePackSerializationCallbackReceiver) {
+ if (memberAssignExists) {
+ this.Write("\r\n MEMBER_ASSIGNMENT_END:\r\n");
+ }
+ }
+
+ if (objInfo.HasIMessagePackSerializationCallbackReceiver) {
+ if (objInfo.NeedsCastOnAfter) {
+ this.Write(" ((global::MessagePack.IMessagePackSerializationCallbackReceiver)____r" +
+ "esult).OnAfterDeserialize();\r\n");
+ } else {
this.Write(" ____result.OnAfterDeserialize();\r\n");
}
- this.Write(" reader.Depth--;\r\n return ____result;\r\n }\r\n }\r\n");
+ }
+ this.Write(" reader.Depth--;\r\n return ____result;\r\n");
+ }
+ this.Write(" }\r\n }\r\n\r\n");
}
this.Write(@"}
@@ -163,7 +215,6 @@ if(objInfo.HasIMessagePackSerializationCallbackReceiver && objInfo.NeedsCastOnAf
#pragma warning restore 612
#pragma warning restore SA1129 // Do not use default value type constructor
-#pragma warning restore SA1200 // Using directives should be placed correctly
#pragma warning restore SA1309 // Field names should not begin with underscore
#pragma warning restore SA1312 // Variable names should begin with lower-case letter
#pragma warning restore SA1403 // File may only contain a single namespace
@@ -176,7 +227,7 @@ if(objInfo.HasIMessagePackSerializationCallbackReceiver && objInfo.NeedsCastOnAf
/// <summary>
/// Base class for this transformation
/// </summary>
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "16.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "17.0.0.0")]
public class FormatterTemplateBase
{
#region Fields
diff --git a/src/MessagePack.GeneratorCore/Generator/FormatterTemplate.tt b/src/MessagePack.GeneratorCore/Generator/FormatterTemplate.tt
index 8c285c01..240b107f 100644
--- a/src/MessagePack.GeneratorCore/Generator/FormatterTemplate.tt
+++ b/src/MessagePack.GeneratorCore/Generator/FormatterTemplate.tt
@@ -11,9 +11,9 @@
#pragma warning disable 612
#pragma warning disable 414
#pragma warning disable 168
+#pragma warning disable CS1591 // document public APIs
#pragma warning disable SA1129 // Do not use default value type constructor
-#pragma warning disable SA1200 // Using directives should be placed correctly
#pragma warning disable SA1309 // Field names should not begin with underscore
#pragma warning disable SA1312 // Variable names should begin with lower-case letter
#pragma warning disable SA1403 // File may only contain a single namespace
@@ -21,26 +21,22 @@
namespace <#= Namespace #>
{
- using System;
- using System.Buffers;
- using MessagePack;
-<# foreach(var objInfo in ObjectSerializationInfos) {
+<# foreach (var objInfo in ObjectSerializationInfos) {
bool isFormatterResolverNecessary = ShouldUseFormatterResolverHelper.ShouldUseFormatterResolver(objInfo.Members);#>
-
- public sealed class <#= objInfo.Name #>Formatter<#= (objInfo.IsOpenGenericType ? $"<{string.Join(",", objInfo.GenericTypeParameters.Select(x => x.Name))}>" : "") #> : global::MessagePack.Formatters.IMessagePackFormatter<<#= objInfo.FullName #>>
-<# foreach(var typeArg in objInfo.GenericTypeParameters.Where(x => x.HasConstraints)) { #>
+ public sealed class <#= objInfo.FormatterNameWithoutNameSpace #> : global::MessagePack.Formatters.IMessagePackFormatter<<#= objInfo.FullName #>>
+<# foreach (var typeArg in objInfo.GenericTypeParameters.Where(x => x.HasConstraints)) { #>
where <#= typeArg.Name #> : <#= typeArg.Constraints #>
<# } #>
{
-<# foreach(var item in objInfo.Members) { #>
-<# if(item.CustomFormatterTypeName != null) { #>
- <#= item.CustomFormatterTypeName #> __<#= item.Name #>CustomFormatter__ = new <#= item.CustomFormatterTypeName #>();
+<# foreach (var item in objInfo.Members) { #>
+<# if (item.CustomFormatterTypeName != null) { #>
+ private readonly <#= item.CustomFormatterTypeName #> __<#= item.Name #>CustomFormatter__ = new <#= item.CustomFormatterTypeName #>();
<# } #>
<# } #>
- public void Serialize(ref MessagePackWriter writer, <#= objInfo.FullName #> value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, <#= objInfo.FullName #> value, global::MessagePack.MessagePackSerializerOptions options)
{
-<# if( objInfo.IsClass) { #>
+<# if (objInfo.IsClass) { #>
if (value == null)
{
writer.WriteNil();
@@ -50,50 +46,72 @@ namespace <#= Namespace #>
<# }
if (isFormatterResolverNecessary) { #>
- IFormatterResolver formatterResolver = options.Resolver;
-<#}
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
+<# }
- if(objInfo.HasIMessagePackSerializationCallbackReceiver && objInfo.NeedsCastOnBefore) { #>
- ((IMessagePackSerializationCallbackReceiver)value).OnBeforeSerialize();
-<# } else if(objInfo.HasIMessagePackSerializationCallbackReceiver) { #>
+ if (objInfo.HasIMessagePackSerializationCallbackReceiver) {
+ if (objInfo.NeedsCastOnBefore) { #>
+ ((global::MessagePack.IMessagePackSerializationCallbackReceiver)value).OnBeforeSerialize();
+<# } else { #>
value.OnBeforeSerialize();
<# } #>
+<# } #>
writer.WriteArrayHeader(<#= objInfo.MaxKey + 1 #>);
-<# for(var i =0; i<= objInfo.MaxKey; i++) { var member = objInfo.GetMember(i); #>
-<# if( member == null) { #>
+<# for (var i = 0; i <= objInfo.MaxKey; i++) {
+ var member = objInfo.GetMember(i);
+ if (member == null) { #>
writer.WriteNil();
<# } else { #>
<#= member.GetSerializeMethodString() #>;
-<# } } #>
+<# } #>
+<# } #>
}
- public <#= objInfo.FullName #> Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public <#= objInfo.FullName #> Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
-<# if( objInfo.IsClass) { #>
+<# if (objInfo.IsClass) { #>
return null;
<# } else { #>
- throw new InvalidOperationException("typecode is null, struct not supported");
+ throw new global::System.InvalidOperationException("typecode is null, struct not supported");
<# } #>
}
+<# if (objInfo.MaxKey == -1 && !objInfo.HasIMessagePackSerializationCallbackReceiver) { #>
+ reader.Skip();
+ return new <#= objInfo.GetConstructorString() #>;
+<# } else { #>
options.Security.DepthStep(ref reader);
<# if (isFormatterResolverNecessary) { #>
- IFormatterResolver formatterResolver = options.Resolver;
+ global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
<# } #>
var length = reader.ReadArrayHeader();
-<# foreach(var x in objInfo.Members) { #>
- var __<#= x.Name #>__ = default(<#= x.Type #>);
+<# var canOverwrite = objInfo.ConstructorParameters.Length == 0;
+ if (canOverwrite) { #>
+ var ____result = new <#= objInfo.GetConstructorString() #>;
+<# } else { foreach (var member in objInfo.Members) { #>
+ var __<#= member.Name #>__ = default(<#= member.Type #>);
+<# } #>
<# } #>
for (int i = 0; i < length; i++)
{
switch (i)
{
-<# foreach(var x in objInfo.Members) { #>
- case <#= x.IntKey #>:
- __<#= x.Name #>__ = <#= x.GetDeserializeMethodString() #>;
+<# for (var memberIndex = 0; memberIndex <= objInfo.MaxKey; memberIndex++) {
+ var member = objInfo.GetMember(memberIndex);
+ if (member == null) { continue; } #>
+ case <#= member.IntKey #>:
+<# if (canOverwrite) {
+ if (member.IsWritable) { #>
+ ____result.<#= member.Name #> = <#= member.GetDeserializeMethodString() #>;
+<# } else { #>
+ <#= member.GetDeserializeMethodString() #>;
+<# } #>
+<# } else {#>
+ __<#= member.Name #>__ = <#= member.GetDeserializeMethodString() #>;
+<# } #>
break;
<# } #>
default:
@@ -102,21 +120,40 @@ namespace <#= Namespace #>
}
}
+<# if (!canOverwrite) { #>
var ____result = new <#= objInfo.GetConstructorString() #>;
-<# foreach(var x in objInfo.Members.Where(x => x.IsWritable)) { #>
- ____result.<#= x.Name #> = __<#= x.Name #>__;
+<# bool memberAssignExists = false;
+ for (var memberIndex = 0; memberIndex <= objInfo.MaxKey; memberIndex++) {
+ var member = objInfo.GetMember(memberIndex);
+ if (member == null || !member.IsWritable || objInfo.ConstructorParameters.Any(p => p.Equals(member))) { continue; }
+ memberAssignExists = true;#>
+ if (length <= <#= memberIndex #>)
+ {
+ goto MEMBER_ASSIGNMENT_END;
+ }
+
+ ____result.<#= member.Name #> = __<#= member.Name #>__;
<# } #>
-<#if(objInfo.HasIMessagePackSerializationCallbackReceiver && objInfo.NeedsCastOnAfter) { #>
- ((IMessagePackSerializationCallbackReceiver)____result).OnAfterDeserialize();
-<# } else if(objInfo.HasIMessagePackSerializationCallbackReceiver) { #>
+<# if (memberAssignExists) { #>
+
+ MEMBER_ASSIGNMENT_END:
+<# }
+ }
+
+ if (objInfo.HasIMessagePackSerializationCallbackReceiver) {
+ if (objInfo.NeedsCastOnAfter) { #>
+ ((global::MessagePack.IMessagePackSerializationCallbackReceiver)____result).OnAfterDeserialize();
+<# } else { #>
____result.OnAfterDeserialize();
<# } #>
+<# } #>
reader.Depth--;
return ____result;
+<# } #>
}
}
-<# } #>
-}
+
+<# } #>}
#pragma warning restore 168
#pragma warning restore 414
@@ -124,7 +161,6 @@ namespace <#= Namespace #>
#pragma warning restore 612
#pragma warning restore SA1129 // Do not use default value type constructor
-#pragma warning restore SA1200 // Using directives should be placed correctly
#pragma warning restore SA1309 // Field names should not begin with underscore
#pragma warning restore SA1312 // Variable names should begin with lower-case letter
#pragma warning restore SA1403 // File may only contain a single namespace
diff --git a/src/MessagePack.GeneratorCore/Generator/IFormatterTemplate.cs b/src/MessagePack.GeneratorCore/Generator/IFormatterTemplate.cs
index 188f7995..ea3363a6 100644
--- a/src/MessagePack.GeneratorCore/Generator/IFormatterTemplate.cs
+++ b/src/MessagePack.GeneratorCore/Generator/IFormatterTemplate.cs
@@ -7,9 +7,9 @@ namespace MessagePackCompiler.Generator
{
public interface IFormatterTemplate
{
- string Namespace { get; set; }
+ string Namespace { get; }
- ObjectSerializationInfo[] ObjectSerializationInfos { get; set; }
+ ObjectSerializationInfo[] ObjectSerializationInfos { get; }
string TransformText();
}
diff --git a/src/MessagePack.GeneratorCore/Generator/ResolverTemplate.cs b/src/MessagePack.GeneratorCore/Generator/ResolverTemplate.cs
index 48e4df6b..58f20711 100644
--- a/src/MessagePack.GeneratorCore/Generator/ResolverTemplate.cs
+++ b/src/MessagePack.GeneratorCore/Generator/ResolverTemplate.cs
@@ -1,7 +1,7 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version: 16.0.0.0
+// Runtime Version: 17.0.0.0
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -17,7 +17,7 @@ namespace MessagePackCompiler.Generator
/// <summary>
/// Class to produce the template output
/// </summary>
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "16.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "17.0.0.0")]
public partial class ResolverTemplate : ResolverTemplateBase
{
/// <summary>
@@ -33,14 +33,14 @@ namespace MessagePackCompiler.Generator
#pragma warning disable 612
#pragma warning disable 414
#pragma warning disable 168
+#pragma warning disable CS1591 // document public APIs
-#pragma warning disable SA1200 // Using directives should be placed correctly
#pragma warning disable SA1312 // Variable names should begin with lower-case letter
#pragma warning disable SA1649 // File name should match first type name
namespace ");
this.Write(this.ToStringHelper.ToStringWithCulture(Namespace));
- this.Write("\r\n{\r\n using System;\r\n\r\n public class ");
+ this.Write("\r\n{\r\n public class ");
this.Write(this.ToStringHelper.ToStringWithCulture(ResolverName));
this.Write(" : global::MessagePack.IFormatterResolver\r\n {\r\n public static readonly " +
"global::MessagePack.IFormatterResolver Instance = new ");
@@ -76,10 +76,10 @@ namespace ");
internal static class ");
this.Write(this.ToStringHelper.ToStringWithCulture(ResolverName));
this.Write("GetFormatterHelper\r\n {\r\n private static readonly global::System.Collect" +
- "ions.Generic.Dictionary<Type, int> lookup;\r\n\r\n static ");
+ "ions.Generic.Dictionary<global::System.Type, int> lookup;\r\n\r\n static ");
this.Write(this.ToStringHelper.ToStringWithCulture(ResolverName));
this.Write("GetFormatterHelper()\r\n {\r\n lookup = new global::System.Collecti" +
- "ons.Generic.Dictionary<Type, int>(");
+ "ons.Generic.Dictionary<global::System.Type, int>(");
this.Write(this.ToStringHelper.ToStringWithCulture(RegisterInfos.Length));
this.Write(")\r\n {\r\n");
for(var i = 0; i < RegisterInfos.Length; i++) { var x = RegisterInfos[i];
@@ -92,7 +92,7 @@ namespace ");
this.Write(@" };
}
- internal static object GetFormatter(Type t)
+ internal static object GetFormatter(global::System.Type t)
{
int key;
if (!lookup.TryGetValue(t, out key))
@@ -122,7 +122,6 @@ namespace ");
#pragma warning restore 612
#pragma warning restore SA1312 // Variable names should begin with lower-case letter
-#pragma warning restore SA1200 // Using directives should be placed correctly
#pragma warning restore SA1649 // File name should match first type name
");
return this.GenerationEnvironment.ToString();
@@ -132,7 +131,7 @@ namespace ");
/// <summary>
/// Base class for this transformation
/// </summary>
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "16.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "17.0.0.0")]
public class ResolverTemplateBase
{
#region Fields
diff --git a/src/MessagePack.GeneratorCore/Generator/ResolverTemplate.tt b/src/MessagePack.GeneratorCore/Generator/ResolverTemplate.tt
index e61688a1..6837185d 100644
--- a/src/MessagePack.GeneratorCore/Generator/ResolverTemplate.tt
+++ b/src/MessagePack.GeneratorCore/Generator/ResolverTemplate.tt
@@ -11,17 +11,13 @@
#pragma warning disable 612
#pragma warning disable 414
#pragma warning disable 168
+#pragma warning disable CS1591 // document public APIs
-#pragma warning disable SA1200 // Using directives should be placed correctly
#pragma warning disable SA1312 // Variable names should begin with lower-case letter
#pragma warning disable SA1649 // File name should match first type name
namespace <#= Namespace #>
{
- using System;
- using System.Buffers;
- using MessagePack;
-
public class <#= ResolverName #> : global::MessagePack.IFormatterResolver
{
public static readonly global::MessagePack.IFormatterResolver Instance = new <#= ResolverName #>();
@@ -52,11 +48,11 @@ namespace <#= Namespace #>
internal static class <#= ResolverName #>GetFormatterHelper
{
- private static readonly global::System.Collections.Generic.Dictionary<Type, int> lookup;
+ private static readonly global::System.Collections.Generic.Dictionary<global::System.Type, int> lookup;
static <#= ResolverName #>GetFormatterHelper()
{
- lookup = new global::System.Collections.Generic.Dictionary<Type, int>(<#= RegisterInfos.Length #>)
+ lookup = new global::System.Collections.Generic.Dictionary<global::System.Type, int>(<#= RegisterInfos.Length #>)
{
<# for(var i = 0; i < RegisterInfos.Length; i++) { var x = RegisterInfos[i]; #>
{ typeof(<#= x.FullName #>), <#= i #> },
@@ -64,7 +60,7 @@ namespace <#= Namespace #>
};
}
- internal static object GetFormatter(Type t)
+ internal static object GetFormatter(global::System.Type t)
{
int key;
if (!lookup.TryGetValue(t, out key))
@@ -75,7 +71,7 @@ namespace <#= Namespace #>
switch (key)
{
<# for(var i = 0; i < RegisterInfos.Length; i++) { var x = RegisterInfos[i]; #>
- case <#= i #>: return new <#= x.FormatterName.StartsWith("global::") ? x.FormatterName: (!string.IsNullOrEmpty(FormatterNamespace) ? FormatterNamespace + "." : FormatterNamespace) + x.FormatterName#>();
+ case <#= i #>: return new <#= x.FormatterName.StartsWith("global::") ? x.FormatterName: (!string.IsNullOrEmpty(FormatterNamespace) ? FormatterNamespace + "." : FormatterNamespace) + x.FormatterName #>();
<# } #>
default: return null;
}
@@ -89,5 +85,4 @@ namespace <#= Namespace #>
#pragma warning restore 612
#pragma warning restore SA1312 // Variable names should begin with lower-case letter
-#pragma warning restore SA1200 // Using directives should be placed correctly
#pragma warning restore SA1649 // File name should match first type name
diff --git a/src/MessagePack.GeneratorCore/Generator/StringKey/StringKeyFormatterDeserializeHelper.cs b/src/MessagePack.GeneratorCore/Generator/StringKey/StringKeyFormatterDeserializeHelper.cs
index f8b46ce7..f65bed0b 100644
--- a/src/MessagePack.GeneratorCore/Generator/StringKey/StringKeyFormatterDeserializeHelper.cs
+++ b/src/MessagePack.GeneratorCore/Generator/StringKey/StringKeyFormatterDeserializeHelper.cs
@@ -12,28 +12,67 @@ namespace MessagePackCompiler.Generator
{
internal static class StringKeyFormatterDeserializeHelper
{
- public static string Classify(MemberSerializationInfo[] memberArray, string indent)
+ public static string Classify(ObjectSerializationInfo objectSerializationInfo, string indent, bool canOverwrite)
{
+ var memberArray = objectSerializationInfo.Members;
var buffer = new StringBuilder();
- foreach (var memberInfoTuples in memberArray.Select(member => new MemberInfoTuple(member)).GroupBy(member => member.Binary.Length))
+ foreach (var memberInfoTuples in memberArray.Select(member => new MemberInfoTuple(member, IsConstructorParameter(objectSerializationInfo, member))).GroupBy(member => member.Binary.Length))
{
var binaryLength = memberInfoTuples.Key;
var keyLength = binaryLength >> 3;
keyLength += keyLength << 3 == binaryLength ? 0 : 1;
buffer.Append(indent).Append("case ").Append(binaryLength).Append(":\r\n");
- ClassifyRecursion(buffer, indent, 1, keyLength, memberInfoTuples);
+ ClassifyRecursion(buffer, indent, 1, keyLength, memberInfoTuples, canOverwrite);
}
return buffer.ToString();
}
- private static void Assign(StringBuilder buffer, in MemberInfoTuple member)
+ private static bool IsConstructorParameter(ObjectSerializationInfo objectSerializationInfo, MemberSerializationInfo member)
{
- buffer.Append("__").Append(member.Info.Name).Append("__ = ").Append(member.Info.GetDeserializeMethodString()).Append(";\r\n");
+ foreach (var parameter in objectSerializationInfo.ConstructorParameters)
+ {
+ if (parameter.Equals(member))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ private static void Assign(StringBuilder buffer, in MemberInfoTuple member, bool canOverwrite, string indent, string tab, int tabCount)
+ {
+ if (member.Info.IsWritable || member.IsConstructorParameter)
+ {
+ if (canOverwrite)
+ {
+ buffer.Append("____result.").Append(member.Info.Name).Append(" = ");
+ }
+ else
+ {
+ if (!member.IsConstructorParameter)
+ {
+ buffer.Append("__").Append(member.Info.Name).Append("__IsInitialized = true;\r\n").Append(indent);
+ for (var i = 0; i < tabCount; i++)
+ {
+ buffer.Append(tab);
+ }
+ }
+
+ buffer.Append("__").Append(member.Info.Name).Append("__ = ");
+ }
+
+ buffer.Append(member.Info.GetDeserializeMethodString()).Append(";\r\n");
+ }
+ else
+ {
+ buffer.Append("reader.Skip();\r\n");
+ }
}
- private static void ClassifyRecursion(StringBuilder buffer, string indent, int tabCount, int keyLength, IEnumerable<MemberInfoTuple> memberCollection)
+ private static void ClassifyRecursion(StringBuilder buffer, string indent, int tabCount, int keyLength, IEnumerable<MemberInfoTuple> memberCollection, bool canOverwrite)
{
const string Tab = " ";
buffer.Append(indent);
@@ -46,7 +85,7 @@ namespace MessagePackCompiler.Generator
if (memberArray.Length == 1)
{
var member = memberArray[0];
- EmbedOne(buffer, indent, tabCount, member);
+ EmbedOne(buffer, indent, tabCount, member, canOverwrite);
return;
}
@@ -83,7 +122,7 @@ namespace MessagePackCompiler.Generator
}
var member = grouping.Single();
- Assign(buffer, member);
+ Assign(buffer, member, canOverwrite, indent, Tab, tabCount + 2);
buffer.Append(Tab + Tab).Append(indent);
for (var i = 0; i < tabCount; i++)
{
@@ -94,7 +133,7 @@ namespace MessagePackCompiler.Generator
continue;
}
- ClassifyRecursion(buffer, indent + Tab, tabCount + 1, keyLength, grouping);
+ ClassifyRecursion(buffer, indent + Tab, tabCount + 1, keyLength, grouping, canOverwrite);
}
buffer.Append("\r\n").Append(indent);
@@ -106,7 +145,7 @@ namespace MessagePackCompiler.Generator
buffer.Append("}\r\n");
}
- private static void EmbedOne(StringBuilder buffer, string indent, int tabCount, in MemberInfoTuple member)
+ private static void EmbedOne(StringBuilder buffer, string indent, int tabCount, in MemberInfoTuple member, bool canOverwrite)
{
const string Tab = " ";
var binary = member.Binary.AsSpan((tabCount - 1) << 3);
@@ -136,7 +175,7 @@ namespace MessagePackCompiler.Generator
buffer.Append(Tab);
}
- Assign(buffer, member);
+ Assign(buffer, member, canOverwrite, indent, Tab, tabCount);
buffer.Append(indent);
for (var i = 0; i < tabCount; i++)
{
@@ -166,12 +205,14 @@ namespace MessagePackCompiler.Generator
internal readonly struct MemberInfoTuple : IComparable<MemberInfoTuple>
{
public readonly MemberSerializationInfo Info;
+ public readonly bool IsConstructorParameter;
public readonly byte[] Binary;
public readonly ulong[] Key;
- public MemberInfoTuple(MemberSerializationInfo info)
+ public MemberInfoTuple(MemberSerializationInfo info, bool isConstructorParameter)
{
Info = info;
+ IsConstructorParameter = isConstructorParameter;
Binary = EmbedStringHelper.Utf8.GetBytes(info.StringKey);
ReadOnlySpan<byte> span = Binary;
var keyLength = Binary.Length >> 3;
diff --git a/src/MessagePack.GeneratorCore/Generator/StringKey/StringKeyFormatterTemplate.cs b/src/MessagePack.GeneratorCore/Generator/StringKey/StringKeyFormatterTemplate.cs
index 40b3e83c..abc89f78 100644
--- a/src/MessagePack.GeneratorCore/Generator/StringKey/StringKeyFormatterTemplate.cs
+++ b/src/MessagePack.GeneratorCore/Generator/StringKey/StringKeyFormatterTemplate.cs
@@ -1,7 +1,7 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version: 16.0.0.0
+// Runtime Version: 17.0.0.0
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -17,7 +17,7 @@ namespace MessagePackCompiler.Generator
/// <summary>
/// Class to produce the template output
/// </summary>
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "16.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "17.0.0.0")]
public partial class StringKeyFormatterTemplate : StringKeyFormatterTemplateBase
{
/// <summary>
@@ -33,9 +33,9 @@ namespace MessagePackCompiler.Generator
#pragma warning disable 612
#pragma warning disable 414
#pragma warning disable 168
+#pragma warning disable CS1591 // document public APIs
#pragma warning disable SA1129 // Do not use default value type constructor
-#pragma warning disable SA1200 // Using directives should be placed correctly
#pragma warning disable SA1309 // Field names should not begin with underscore
#pragma warning disable SA1312 // Variable names should begin with lower-case letter
#pragma warning disable SA1403 // File may only contain a single namespace
@@ -43,24 +43,18 @@ namespace MessagePackCompiler.Generator
namespace ");
this.Write(this.ToStringHelper.ToStringWithCulture(Namespace));
- this.Write("\r\n{\r\n using System;\r\n using System.Buffers;\r\n using System.Runtime.Inter" +
- "opServices;\r\n using MessagePack;\r\n");
-
-var list = new List<ValueTuple<MemberSerializationInfo, byte[]>>();
-foreach (var objInfo in ObjectSerializationInfos)
-{
+ this.Write("\r\n{\r\n");
+ var list = new List<ValueTuple<MemberSerializationInfo, byte[]>>();
+foreach (var objInfo in ObjectSerializationInfos) {
list.Clear();
- foreach (var member in objInfo.Members)
- {
+ foreach (var member in objInfo.Members) {
var binary = EmbedStringHelper.Utf8.GetBytes(member.StringKey);
list.Add(new ValueTuple<MemberSerializationInfo, byte[]>(member, binary));
}
- string formatterName = objInfo.Name + (objInfo.IsOpenGenericType ? $"Formatter<{string.Join(", ", objInfo.GenericTypeParameters.Select(x => x.Name))}>" : "Formatter");
- bool isFormatterResolverNecessary = ShouldUseFormatterResolverHelper.ShouldUseFormatterResolver(objInfo.Members);
-
- this.Write("\r\n public sealed class ");
- this.Write(this.ToStringHelper.ToStringWithCulture(formatterName));
+ bool isFormatterResolverNecessary = ShouldUseFormatterResolverHelper.ShouldUseFormatterResolver(objInfo.Members);
+ this.Write(" public sealed class ");
+ this.Write(this.ToStringHelper.ToStringWithCulture(objInfo.FormatterNameWithoutNameSpace));
this.Write(" : global::MessagePack.Formatters.IMessagePackFormatter<");
this.Write(this.ToStringHelper.ToStringWithCulture(objInfo.FullName));
this.Write(">\r\n");
@@ -72,12 +66,9 @@ foreach (var objInfo in ObjectSerializationInfos)
this.Write("\r\n");
}
this.Write(" {\r\n");
-
- foreach (var memberAndBinary in list)
- {
- var member = memberAndBinary.Item1;
- var binary = memberAndBinary.Item2;
-
+ for (var i = 0; i < list.Count; i++) {
+ var member = list[i].Item1;
+ var binary = list[i].Item2;
this.Write(" // ");
this.Write(this.ToStringHelper.ToStringWithCulture(member.StringKey));
this.Write("\r\n private static global::System.ReadOnlySpan<byte> GetSpan_");
@@ -85,121 +76,86 @@ foreach (var objInfo in ObjectSerializationInfos)
this.Write("() => ");
this.Write(this.ToStringHelper.ToStringWithCulture(EmbedStringHelper.ToByteArrayString(binary)));
this.Write(";\r\n");
-
- }
-
- this.Write("\r\n public void Serialize(ref global::MessagePack.MessagePackWriter writer," +
- " ");
+ }
+ if (list.Count != 0) {
+ this.Write("\r\n");
+ }
+ this.Write(" public void Serialize(ref global::MessagePack.MessagePackWriter writer, ");
this.Write(this.ToStringHelper.ToStringWithCulture(objInfo.FullName));
this.Write(" value, global::MessagePack.MessagePackSerializerOptions options)\r\n {\r\n");
-
- if (objInfo.IsClass)
- {
-
+ if (objInfo.IsClass) {
this.Write(" if (value is null)\r\n {\r\n writer.WriteNil();" +
"\r\n return;\r\n }\r\n\r\n");
+ }
- }
-
- if (isFormatterResolverNecessary)
- {
-
- this.Write(" IFormatterResolver formatterResolver = options.Resolver;\r\n");
-
- }
-
- if (objInfo.HasIMessagePackSerializationCallbackReceiver)
- {
- if (objInfo.NeedsCastOnBefore)
- {
+ if (isFormatterResolverNecessary) {
+ this.Write(" var formatterResolver = options.Resolver;\r\n");
+ }
+ if (objInfo.HasIMessagePackSerializationCallbackReceiver) {
+ if (objInfo.NeedsCastOnBefore) {
this.Write(" ((global::MessagePack.IMessagePackSerializationCallbackReceiver)value" +
").OnBeforeSerialize();\r\n");
-
- }
- else
- {
-
+ } else {
this.Write(" value.OnBeforeSerialize();\r\n");
-
- }
- }
-
+ }
+ }
this.Write(" writer.WriteMapHeader(");
this.Write(this.ToStringHelper.ToStringWithCulture(list.Count));
this.Write(");\r\n");
-
- foreach (var memberAndBinary in list)
- {
- var member = memberAndBinary.Item1;
-
+ foreach (var memberAndBinary in list) {
+ var member = memberAndBinary.Item1;
this.Write(" writer.WriteRaw(GetSpan_");
this.Write(this.ToStringHelper.ToStringWithCulture(member.Name));
this.Write("());\r\n ");
this.Write(this.ToStringHelper.ToStringWithCulture(member.GetSerializeMethodString()));
this.Write(";\r\n");
-
- }
-
+ }
this.Write(" }\r\n\r\n public ");
this.Write(this.ToStringHelper.ToStringWithCulture(objInfo.FullName));
this.Write(" Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePac" +
"k.MessagePackSerializerOptions options)\r\n {\r\n if (reader.TryRe" +
"adNil())\r\n {\r\n");
-
- if (objInfo.IsClass)
- {
-
+ if (objInfo.IsClass) {
this.Write(" return null;\r\n");
-
- }
- else
- {
-
+ } else {
this.Write(" throw new global::System.InvalidOperationException(\"typecode is n" +
"ull, struct not supported\");\r\n");
-
- }
-
+ }
this.Write(" }\r\n\r\n");
-
- if (objInfo.Members.Length == 0)
- {
-
+ if (objInfo.Members.Length == 0) {
this.Write(" reader.Skip();\r\n var ____result = new ");
this.Write(this.ToStringHelper.ToStringWithCulture(objInfo.GetConstructorString()));
this.Write(";\r\n");
-
- }
- else
- {
-
+ } else {
this.Write(" options.Security.DepthStep(ref reader);\r\n");
-
- if (isFormatterResolverNecessary)
- {
-
- this.Write(" IFormatterResolver formatterResolver = options.Resolver;\r\n");
-
- }
-
+ if (isFormatterResolverNecessary) {
+ this.Write(" var formatterResolver = options.Resolver;\r\n");
+ }
this.Write(" var length = reader.ReadMapHeader();\r\n");
-
- foreach (var memberInfo in objInfo.Members)
- {
-
+ var canOverwrite = objInfo.ConstructorParameters.Length == 0;
+ if (canOverwrite) {
+ this.Write(" var ____result = new ");
+ this.Write(this.ToStringHelper.ToStringWithCulture(objInfo.GetConstructorString()));
+ this.Write(";\r\n");
+ } else {
+ foreach (var member in objInfo.Members.Where(x => x.IsWritable || objInfo.ConstructorParameters.Any(p => p.Equals(x)))) {
+ if (objInfo.ConstructorParameters.All(p => !p.Equals(member))) {
+ this.Write(" var __");
+ this.Write(this.ToStringHelper.ToStringWithCulture(member.Name));
+ this.Write("__IsInitialized = false;\r\n");
+ }
this.Write(" var __");
- this.Write(this.ToStringHelper.ToStringWithCulture(memberInfo.Name));
+ this.Write(this.ToStringHelper.ToStringWithCulture(member.Name));
this.Write("__ = default(");
- this.Write(this.ToStringHelper.ToStringWithCulture(memberInfo.Type));
+ this.Write(this.ToStringHelper.ToStringWithCulture(member.Type));
this.Write(");\r\n");
-
- }
-
+ }
+ }
this.Write(@"
for (int i = 0; i < length; i++)
{
- ReadOnlySpan<byte> stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
+ var stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
switch (stringKey.Length)
{
default:
@@ -207,56 +163,49 @@ foreach (var objInfo in ObjectSerializationInfos)
reader.Skip();
continue;
");
- this.Write(this.ToStringHelper.ToStringWithCulture(StringKeyFormatterDeserializeHelper.Classify(objInfo.Members, " ")));
- this.Write("\r\n }\r\n }\r\n\r\n var ____result = new ");
+ this.Write(this.ToStringHelper.ToStringWithCulture(StringKeyFormatterDeserializeHelper.Classify(objInfo, " ", canOverwrite)));
+ this.Write("\r\n }\r\n }\r\n\r\n");
+ if (!canOverwrite) {
+ this.Write(" var ____result = new ");
this.Write(this.ToStringHelper.ToStringWithCulture(objInfo.GetConstructorString()));
- this.Write("\r\n {\r\n");
-
- // Preparation for C#9 Record class
- foreach (var member in objInfo.Members.Where(x => x.IsWritable))
- {
-
- this.Write(" ");
+ this.Write(";\r\n");
+ foreach (var member in objInfo.Members.Where(x => x.IsWritable && !objInfo.ConstructorParameters.Any(p => p.Equals(x)))) {
+ this.Write(" if (__");
+ this.Write(this.ToStringHelper.ToStringWithCulture(member.Name));
+ this.Write("__IsInitialized)\r\n {\r\n ____result.");
this.Write(this.ToStringHelper.ToStringWithCulture(member.Name));
this.Write(" = __");
this.Write(this.ToStringHelper.ToStringWithCulture(member.Name));
- this.Write("__,\r\n");
-
- }
-
- this.Write(" };\r\n\r\n");
-
- }
-
- if (objInfo.HasIMessagePackSerializationCallbackReceiver)
- {
- if (objInfo.NeedsCastOnAfter)
- {
-
+ this.Write("__;\r\n }\r\n\r\n");
+ }
+ }
+ }
+ if (objInfo.HasIMessagePackSerializationCallbackReceiver) {
+ if (objInfo.NeedsCastOnAfter) {
this.Write(" ((global::MessagePack.IMessagePackSerializationCallbackReceiver)____r" +
"esult).OnAfterDeserialize();\r\n");
-
- }
- else
- {
-
+ } else {
this.Write(" ____result.OnAfterDeserialize();\r\n");
-
- }
- }
-
- if (objInfo.Members.Length != 0)
- {
-
+ }
+ }
+ if (objInfo.Members.Length != 0) {
this.Write(" reader.Depth--;\r\n");
-
- }
-
- this.Write(" return ____result;\r\n }\r\n }\r\n");
-
-}
-
- this.Write("}\r\n");
+ }
+ this.Write(" return ____result;\r\n }\r\n }\r\n\r\n");
+ }
+ this.Write(@"}
+
+#pragma warning restore 168
+#pragma warning restore 414
+#pragma warning restore 618
+#pragma warning restore 612
+
+#pragma warning restore SA1129 // Do not use default value type constructor
+#pragma warning restore SA1309 // Field names should not begin with underscore
+#pragma warning restore SA1312 // Variable names should begin with lower-case letter
+#pragma warning restore SA1403 // File may only contain a single namespace
+#pragma warning restore SA1649 // File name should match first type name
+");
return this.GenerationEnvironment.ToString();
}
}
@@ -264,7 +213,7 @@ foreach (var objInfo in ObjectSerializationInfos)
/// <summary>
/// Base class for this transformation
/// </summary>
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "16.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "17.0.0.0")]
public class StringKeyFormatterTemplateBase
{
#region Fields
diff --git a/src/MessagePack.GeneratorCore/Generator/StringKey/StringKeyFormatterTemplate.tt b/src/MessagePack.GeneratorCore/Generator/StringKey/StringKeyFormatterTemplate.tt
index dc146e5b..9f0dac87 100644
--- a/src/MessagePack.GeneratorCore/Generator/StringKey/StringKeyFormatterTemplate.tt
+++ b/src/MessagePack.GeneratorCore/Generator/StringKey/StringKeyFormatterTemplate.tt
@@ -12,9 +12,9 @@
#pragma warning disable 612
#pragma warning disable 414
#pragma warning disable 168
+#pragma warning disable CS1591 // document public APIs
#pragma warning disable SA1129 // Do not use default value type constructor
-#pragma warning disable SA1200 // Using directives should be placed correctly
#pragma warning disable SA1309 // Field names should not begin with underscore
#pragma warning disable SA1312 // Variable names should begin with lower-case letter
#pragma warning disable SA1403 // File may only contain a single namespace
@@ -22,199 +22,138 @@
namespace <#= Namespace #>
{
- using System;
- using System.Buffers;
- using System.Runtime.InteropServices;
- using MessagePack;
-<#
-var list = new List<ValueTuple<MemberSerializationInfo, byte[]>>();
-foreach (var objInfo in ObjectSerializationInfos)
-{
+<# var list = new List<ValueTuple<MemberSerializationInfo, byte[]>>();
+foreach (var objInfo in ObjectSerializationInfos) {
list.Clear();
- foreach (var member in objInfo.Members)
- {
+ foreach (var member in objInfo.Members) {
var binary = EmbedStringHelper.Utf8.GetBytes(member.StringKey);
list.Add(new ValueTuple<MemberSerializationInfo, byte[]>(member, binary));
}
- string formatterName = objInfo.Name + (objInfo.IsOpenGenericType ? $"Formatter<{string.Join(", ", objInfo.GenericTypeParameters.Select(x => x.Name))}>" : "Formatter");
- bool isFormatterResolverNecessary = ShouldUseFormatterResolverHelper.ShouldUseFormatterResolver(objInfo.Members);
-#>
-
- public sealed class <#= formatterName #> : global::MessagePack.Formatters.IMessagePackFormatter<<#= objInfo.FullName #>>
+ bool isFormatterResolverNecessary = ShouldUseFormatterResolverHelper.ShouldUseFormatterResolver(objInfo.Members); #>
+ public sealed class <#= objInfo.FormatterNameWithoutNameSpace #> : global::MessagePack.Formatters.IMessagePackFormatter<<#= objInfo.FullName #>>
<# foreach (var typeArg in objInfo.GenericTypeParameters.Where(x => x.HasConstraints)) {#>
where <#= typeArg.Name #> : <#= typeArg.Constraints #>
<# }#>
{
-<#
- foreach (var memberAndBinary in list)
- {
- var member = memberAndBinary.Item1;
- var binary = memberAndBinary.Item2;
-#>
+<# for (var i = 0; i < list.Count; i++) {
+ var member = list[i].Item1;
+ var binary = list[i].Item2; #>
// <#= member.StringKey #>
private static global::System.ReadOnlySpan<byte> GetSpan_<#= member.Name #>() => <#= EmbedStringHelper.ToByteArrayString(binary) #>;
-<#
- }
-#>
+<# } #>
+<# if (list.Count != 0) { #>
+<# } #>
public void Serialize(ref global::MessagePack.MessagePackWriter writer, <#= objInfo.FullName #> value, global::MessagePack.MessagePackSerializerOptions options)
{
-<#
- if (objInfo.IsClass)
- {
-#>
+<# if (objInfo.IsClass) { #>
if (value is null)
{
writer.WriteNil();
return;
}
-<#
- }
+<# }
- if (isFormatterResolverNecessary)
- {
-#>
- IFormatterResolver formatterResolver = options.Resolver;
-<#
- }
+ if (isFormatterResolverNecessary) { #>
+ var formatterResolver = options.Resolver;
+<# }
- if (objInfo.HasIMessagePackSerializationCallbackReceiver)
- {
- if (objInfo.NeedsCastOnBefore)
- {
-#>
+ if (objInfo.HasIMessagePackSerializationCallbackReceiver) {
+ if (objInfo.NeedsCastOnBefore) { #>
((global::MessagePack.IMessagePackSerializationCallbackReceiver)value).OnBeforeSerialize();
-<#
- }
- else
- {
-#>
+<# } else { #>
value.OnBeforeSerialize();
-<#
- }
- }
-#>
+<# } #>
+<# } #>
writer.WriteMapHeader(<#= list.Count #>);
-<#
- foreach (var memberAndBinary in list)
- {
- var member = memberAndBinary.Item1;
-#>
+<# foreach (var memberAndBinary in list) {
+ var member = memberAndBinary.Item1; #>
writer.WriteRaw(GetSpan_<#= member.Name #>());
<#= member.GetSerializeMethodString() #>;
-<#
- }
-#>
+<# } #>
}
public <#= objInfo.FullName #> Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
-<#
- if (objInfo.IsClass)
- {
-#>
+<# if (objInfo.IsClass) { #>
return null;
-<#
- }
- else
- {
-#>
+<# } else { #>
throw new global::System.InvalidOperationException("typecode is null, struct not supported");
-<#
- }
-#>
+<# } #>
}
-<#
- if (objInfo.Members.Length == 0)
- {
-#>
+<# if (objInfo.Members.Length == 0) { #>
reader.Skip();
var ____result = new <#= objInfo.GetConstructorString() #>;
-<#
- }
- else
- {
-#>
+<# } else { #>
options.Security.DepthStep(ref reader);
-<#
- if (isFormatterResolverNecessary)
- {
-#>
- IFormatterResolver formatterResolver = options.Resolver;
-<#
- }
-#>
+<# if (isFormatterResolverNecessary) { #>
+ var formatterResolver = options.Resolver;
+<# } #>
var length = reader.ReadMapHeader();
-<#
- foreach (var memberInfo in objInfo.Members)
- {
-#>
- var __<#= memberInfo.Name #>__ = default(<#= memberInfo.Type #>);
-<#
- }
-#>
+<# var canOverwrite = objInfo.ConstructorParameters.Length == 0;
+ if (canOverwrite) { #>
+ var ____result = new <#= objInfo.GetConstructorString() #>;
+<# } else {
+ foreach (var member in objInfo.Members.Where(x => x.IsWritable || objInfo.ConstructorParameters.Any(p => p.Equals(x)))) { #>
+<# if (objInfo.ConstructorParameters.All(p => !p.Equals(member))) { #>
+ var __<#= member.Name #>__IsInitialized = false;
+<# } #>
+ var __<#= member.Name #>__ = default(<#= member.Type #>);
+<# } #>
+<# } #>
for (int i = 0; i < length; i++)
{
- ReadOnlySpan<byte> stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
+ var stringKey = global::MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref reader);
switch (stringKey.Length)
{
default:
FAIL:
reader.Skip();
continue;
-<#= StringKeyFormatterDeserializeHelper.Classify(objInfo.Members, " ") #>
+<#= StringKeyFormatterDeserializeHelper.Classify(objInfo, " ", canOverwrite) #>
}
}
- var ____result = new <#= objInfo.GetConstructorString() #>
+<# if (!canOverwrite) { #>
+ var ____result = new <#= objInfo.GetConstructorString() #>;
+<# foreach (var member in objInfo.Members.Where(x => x.IsWritable && !objInfo.ConstructorParameters.Any(p => p.Equals(x)))) { #>
+ if (__<#= member.Name #>__IsInitialized)
{
-<#
- // Preparation for C#9 Record class
- foreach (var member in objInfo.Members.Where(x => x.IsWritable))
- {
-#>
- <#= member.Name #> = __<#= member.Name #>__,
-<#
- }
-#>
- };
-
-<#
- }
+ ____result.<#= member.Name #> = __<#= member.Name #>__;
+ }
- if (objInfo.HasIMessagePackSerializationCallbackReceiver)
- {
- if (objInfo.NeedsCastOnAfter)
- {
-#>
+<# } #>
+<# } #>
+<# } #>
+<# if (objInfo.HasIMessagePackSerializationCallbackReceiver) {
+ if (objInfo.NeedsCastOnAfter) { #>
((global::MessagePack.IMessagePackSerializationCallbackReceiver)____result).OnAfterDeserialize();
-<#
- }
- else
- {
-#>
+<# } else { #>
____result.OnAfterDeserialize();
-<#
- }
- }
-
- if (objInfo.Members.Length != 0)
- {
-#>
+<# } #>
+<# } #>
+<# if (objInfo.Members.Length != 0) { #>
reader.Depth--;
-<#
- }
-#>
+<# } #>
return ____result;
}
}
-<#
-}
-#>
-}
+
+<# } #>}
+
+#pragma warning restore 168
+#pragma warning restore 414
+#pragma warning restore 618
+#pragma warning restore 612
+
+#pragma warning restore SA1129 // Do not use default value type constructor
+#pragma warning restore SA1309 // Field names should not begin with underscore
+#pragma warning restore SA1312 // Variable names should begin with lower-case letter
+#pragma warning restore SA1403 // File may only contain a single namespace
+#pragma warning restore SA1649 // File name should match first type name
diff --git a/src/MessagePack.GeneratorCore/Generator/TemplatePartials.cs b/src/MessagePack.GeneratorCore/Generator/TemplatePartials.cs
index 6ab80bf5..bca5c587 100644
--- a/src/MessagePack.GeneratorCore/Generator/TemplatePartials.cs
+++ b/src/MessagePack.GeneratorCore/Generator/TemplatePartials.cs
@@ -7,40 +7,72 @@ namespace MessagePackCompiler.Generator
{
public partial class FormatterTemplate : IFormatterTemplate
{
- public string Namespace { get; set; }
+ public FormatterTemplate(string @namespace, ObjectSerializationInfo[] objectSerializationInfos)
+ {
+ Namespace = @namespace;
+ ObjectSerializationInfos = objectSerializationInfos;
+ }
- public ObjectSerializationInfo[] ObjectSerializationInfos { get; set; }
+ public string Namespace { get; }
+
+ public ObjectSerializationInfo[] ObjectSerializationInfos { get; }
}
public partial class StringKeyFormatterTemplate : IFormatterTemplate
{
- public string Namespace { get; set; }
+ public StringKeyFormatterTemplate(string @namespace, ObjectSerializationInfo[] objectSerializationInfos)
+ {
+ Namespace = @namespace;
+ ObjectSerializationInfos = objectSerializationInfos;
+ }
+
+ public string Namespace { get; }
- public ObjectSerializationInfo[] ObjectSerializationInfos { get; set; }
+ public ObjectSerializationInfo[] ObjectSerializationInfos { get; }
}
public partial class ResolverTemplate
{
- public string Namespace { get; set; }
+ public ResolverTemplate(string @namespace, string formatterNamespace, string resolverName, IResolverRegisterInfo[] registerInfos)
+ {
+ Namespace = @namespace;
+ FormatterNamespace = formatterNamespace;
+ ResolverName = resolverName;
+ RegisterInfos = registerInfos;
+ }
+
+ public string Namespace { get; }
- public string FormatterNamespace { get; set; }
+ public string FormatterNamespace { get; }
- public string ResolverName { get; set; } = "GeneratedResolver";
+ public string ResolverName { get; }
- public IResolverRegisterInfo[] RegisterInfos { get; set; }
+ public IResolverRegisterInfo[] RegisterInfos { get; }
}
public partial class EnumTemplate
{
- public string Namespace { get; set; }
+ public EnumTemplate(string @namespace, EnumSerializationInfo[] enumSerializationInfos)
+ {
+ Namespace = @namespace;
+ EnumSerializationInfos = enumSerializationInfos;
+ }
- public EnumSerializationInfo[] EnumSerializationInfos { get; set; }
+ public string Namespace { get; }
+
+ public EnumSerializationInfo[] EnumSerializationInfos { get; }
}
public partial class UnionTemplate
{
- public string Namespace { get; set; }
+ public UnionTemplate(string @namespace, UnionSerializationInfo[] unionSerializationInfos)
+ {
+ Namespace = @namespace;
+ UnionSerializationInfos = unionSerializationInfos;
+ }
+
+ public string Namespace { get; }
- public UnionSerializationInfo[] UnionSerializationInfos { get; set; }
+ public UnionSerializationInfo[] UnionSerializationInfos { get; }
}
}
diff --git a/src/MessagePack.GeneratorCore/Generator/UnionTemplate.cs b/src/MessagePack.GeneratorCore/Generator/UnionTemplate.cs
index 1106f1cb..b7a639bf 100644
--- a/src/MessagePack.GeneratorCore/Generator/UnionTemplate.cs
+++ b/src/MessagePack.GeneratorCore/Generator/UnionTemplate.cs
@@ -1,7 +1,7 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version: 16.0.0.0
+// Runtime Version: 17.0.0.0
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -17,7 +17,7 @@ namespace MessagePackCompiler.Generator
/// <summary>
/// Class to produce the template output
/// </summary>
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "16.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "17.0.0.0")]
public partial class UnionTemplate : UnionTemplateBase
{
/// <summary>
@@ -33,39 +33,43 @@ namespace MessagePackCompiler.Generator
#pragma warning disable 612
#pragma warning disable 414
#pragma warning disable 168
+#pragma warning disable CS1591 // document public APIs
-#pragma warning disable SA1200 // Using directives should be placed correctly
#pragma warning disable SA1403 // File may only contain a single namespace
#pragma warning disable SA1649 // File name should match first type name
namespace ");
this.Write(this.ToStringHelper.ToStringWithCulture(Namespace));
- this.Write("\r\n{\r\n using System;\r\n using System.Buffers;\r\n using System.Collections.G" +
- "eneric;\r\n using MessagePack;\r\n\r\n");
+ this.Write("\r\n{\r\n");
foreach(var info in UnionSerializationInfos) {
this.Write(" public sealed class ");
this.Write(this.ToStringHelper.ToStringWithCulture(info.Name));
this.Write("Formatter : global::MessagePack.Formatters.IMessagePackFormatter<");
this.Write(this.ToStringHelper.ToStringWithCulture(info.FullName));
- this.Write(">\r\n {\r\n private readonly Dictionary<RuntimeTypeHandle, KeyValuePair<int" +
- ", int>> typeToKeyAndJumpMap;\r\n private readonly Dictionary<int, int> keyT" +
- "oJumpMap;\r\n\r\n public ");
+ this.Write(@">
+ {
+ private readonly global::System.Collections.Generic.Dictionary<global::System.RuntimeTypeHandle, global::System.Collections.Generic.KeyValuePair<int, int>> typeToKeyAndJumpMap;
+ private readonly global::System.Collections.Generic.Dictionary<int, int> keyToJumpMap;
+
+ public ");
this.Write(this.ToStringHelper.ToStringWithCulture(info.Name));
- this.Write("Formatter()\r\n {\r\n this.typeToKeyAndJumpMap = new Dictionary<Run" +
- "timeTypeHandle, KeyValuePair<int, int>>(");
+ this.Write("Formatter()\r\n {\r\n this.typeToKeyAndJumpMap = new global::System" +
+ ".Collections.Generic.Dictionary<global::System.RuntimeTypeHandle, global::System" +
+ ".Collections.Generic.KeyValuePair<int, int>>(");
this.Write(this.ToStringHelper.ToStringWithCulture(info.SubTypes.Length));
this.Write(", global::MessagePack.Internal.RuntimeTypeHandleEqualityComparer.Default)\r\n " +
" {\r\n");
for(var i = 0; i < info.SubTypes.Length; i++) { var item = info.SubTypes[i];
this.Write(" { typeof(");
this.Write(this.ToStringHelper.ToStringWithCulture(item.Type));
- this.Write(").TypeHandle, new KeyValuePair<int, int>(");
+ this.Write(").TypeHandle, new global::System.Collections.Generic.KeyValuePair<int, int>(");
this.Write(this.ToStringHelper.ToStringWithCulture(item.Key));
this.Write(", ");
this.Write(this.ToStringHelper.ToStringWithCulture(i));
this.Write(") },\r\n");
}
- this.Write(" };\r\n this.keyToJumpMap = new Dictionary<int, int>(");
+ this.Write(" };\r\n this.keyToJumpMap = new global::System.Collections.Ge" +
+ "neric.Dictionary<int, int>(");
this.Write(this.ToStringHelper.ToStringWithCulture(info.SubTypes.Length));
this.Write(")\r\n {\r\n");
for(var i = 0; i < info.SubTypes.Length; i++) { var item = info.SubTypes[i];
@@ -75,12 +79,12 @@ namespace ");
this.Write(this.ToStringHelper.ToStringWithCulture(i));
this.Write(" },\r\n");
}
- this.Write(" };\r\n }\r\n\r\n public void Serialize(ref MessagePackWriter " +
- "writer, ");
+ this.Write(" };\r\n }\r\n\r\n public void Serialize(ref global::MessagePac" +
+ "k.MessagePackWriter writer, ");
this.Write(this.ToStringHelper.ToStringWithCulture(info.FullName));
this.Write(@" value, global::MessagePack.MessagePackSerializerOptions options)
{
- KeyValuePair<int, int> keyValuePair;
+ global::System.Collections.Generic.KeyValuePair<int, int> keyValuePair;
if (value != null && this.typeToKeyAndJumpMap.TryGetValue(value.GetType().TypeHandle, out keyValuePair))
{
writer.WriteArrayHeader(2);
@@ -101,7 +105,7 @@ namespace ");
"\r\n return;\r\n }\r\n\r\n writer.WriteNil();\r\n " +
" }\r\n\r\n public ");
this.Write(this.ToStringHelper.ToStringWithCulture(info.FullName));
- this.Write(@" Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ this.Write(@" Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -110,7 +114,7 @@ namespace ");
if (reader.ReadArrayHeader() != 2)
{
- throw new InvalidOperationException(""Invalid Union data was detected. Type:");
+ throw new global::System.InvalidOperationException(""Invalid Union data was detected. Type:");
this.Write(this.ToStringHelper.ToStringWithCulture(info.FullName));
this.Write("\");\r\n }\r\n\r\n options.Security.DepthStep(ref reader);\r\n " +
" var key = reader.ReadInt32();\r\n\r\n if (!this.keyToJumpMap.TryGet" +
@@ -139,7 +143,6 @@ namespace ");
#pragma warning restore 618
#pragma warning restore 612
-#pragma warning restore SA1200 // Using directives should be placed correctly
#pragma warning restore SA1403 // File may only contain a single namespace
#pragma warning restore SA1649 // File name should match first type name
");
@@ -150,7 +153,7 @@ namespace ");
/// <summary>
/// Base class for this transformation
/// </summary>
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "16.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "17.0.0.0")]
public class UnionTemplateBase
{
#region Fields
diff --git a/src/MessagePack.GeneratorCore/Generator/UnionTemplate.tt b/src/MessagePack.GeneratorCore/Generator/UnionTemplate.tt
index 216cf3c3..eb9272d0 100644
--- a/src/MessagePack.GeneratorCore/Generator/UnionTemplate.tt
+++ b/src/MessagePack.GeneratorCore/Generator/UnionTemplate.tt
@@ -11,33 +11,28 @@
#pragma warning disable 612
#pragma warning disable 414
#pragma warning disable 168
+#pragma warning disable CS1591 // document public APIs
-#pragma warning disable SA1200 // Using directives should be placed correctly
#pragma warning disable SA1403 // File may only contain a single namespace
#pragma warning disable SA1649 // File name should match first type name
namespace <#= Namespace #>
{
- using System;
- using System.Buffers;
- using System.Collections.Generic;
- using MessagePack;
-
<# foreach(var info in UnionSerializationInfos) { #>
public sealed class <#= info.Name #>Formatter : global::MessagePack.Formatters.IMessagePackFormatter<<#= info.FullName #>>
{
- private readonly Dictionary<RuntimeTypeHandle, KeyValuePair<int, int>> typeToKeyAndJumpMap;
- private readonly Dictionary<int, int> keyToJumpMap;
+ private readonly global::System.Collections.Generic.Dictionary<global::System.RuntimeTypeHandle, global::System.Collections.Generic.KeyValuePair<int, int>> typeToKeyAndJumpMap;
+ private readonly global::System.Collections.Generic.Dictionary<int, int> keyToJumpMap;
public <#= info.Name #>Formatter()
{
- this.typeToKeyAndJumpMap = new Dictionary<RuntimeTypeHandle, KeyValuePair<int, int>>(<#= info.SubTypes.Length #>, global::MessagePack.Internal.RuntimeTypeHandleEqualityComparer.Default)
+ this.typeToKeyAndJumpMap = new global::System.Collections.Generic.Dictionary<global::System.RuntimeTypeHandle, global::System.Collections.Generic.KeyValuePair<int, int>>(<#= info.SubTypes.Length #>, global::MessagePack.Internal.RuntimeTypeHandleEqualityComparer.Default)
{
<# for(var i = 0; i < info.SubTypes.Length; i++) { var item = info.SubTypes[i]; #>
- { typeof(<#= item.Type #>).TypeHandle, new KeyValuePair<int, int>(<#= item.Key #>, <#= i #>) },
+ { typeof(<#= item.Type #>).TypeHandle, new global::System.Collections.Generic.KeyValuePair<int, int>(<#= item.Key #>, <#= i #>) },
<# } #>
};
- this.keyToJumpMap = new Dictionary<int, int>(<#= info.SubTypes.Length #>)
+ this.keyToJumpMap = new global::System.Collections.Generic.Dictionary<int, int>(<#= info.SubTypes.Length #>)
{
<# for(var i = 0; i < info.SubTypes.Length; i++) { var item = info.SubTypes[i]; #>
{ <#= item.Key #>, <#= i #> },
@@ -45,9 +40,9 @@ namespace <#= Namespace #>
};
}
- public void Serialize(ref MessagePackWriter writer, <#= info.FullName #> value, global::MessagePack.MessagePackSerializerOptions options)
+ public void Serialize(ref global::MessagePack.MessagePackWriter writer, <#= info.FullName #> value, global::MessagePack.MessagePackSerializerOptions options)
{
- KeyValuePair<int, int> keyValuePair;
+ global::System.Collections.Generic.KeyValuePair<int, int> keyValuePair;
if (value != null && this.typeToKeyAndJumpMap.TryGetValue(value.GetType().TypeHandle, out keyValuePair))
{
writer.WriteArrayHeader(2);
@@ -69,7 +64,7 @@ namespace <#= Namespace #>
writer.WriteNil();
}
- public <#= info.FullName #> Deserialize(ref MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
+ public <#= info.FullName #> Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
@@ -78,7 +73,7 @@ namespace <#= Namespace #>
if (reader.ReadArrayHeader() != 2)
{
- throw new InvalidOperationException("Invalid Union data was detected. Type:<#= info.FullName #>");
+ throw new global::System.InvalidOperationException("Invalid Union data was detected. Type:<#= info.FullName #>");
}
options.Security.DepthStep(ref reader);
@@ -116,6 +111,5 @@ namespace <#= Namespace #>
#pragma warning restore 618
#pragma warning restore 612
-#pragma warning restore SA1200 // Using directives should be placed correctly
#pragma warning restore SA1403 // File may only contain a single namespace
#pragma warning restore SA1649 // File name should match first type name
diff --git a/src/MessagePack.GeneratorCore/MessagePack.GeneratorCore.csproj b/src/MessagePack.GeneratorCore/MessagePack.GeneratorCore.csproj
index 4be9ff60..df4755e2 100644
--- a/src/MessagePack.GeneratorCore/MessagePack.GeneratorCore.csproj
+++ b/src/MessagePack.GeneratorCore/MessagePack.GeneratorCore.csproj
@@ -6,13 +6,13 @@
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\opensource.snk</AssemblyOriginatorKeyFile>
- <LangVersion>8</LangVersion>
+ <LangVersion>9</LangVersion>
+ <Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
- <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.6.0" />
- <PackageReference Include="Microsoft.Build" Version="15.9.20" />
- <PackageReference Include="System.CodeDom" Version="4.7.0" />
+ <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.0.1" />
+ <PackageReference Include="System.CodeDom" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
diff --git a/src/MessagePack.GeneratorCore/Utils/RoslynExtensions.cs b/src/MessagePack.GeneratorCore/Utils/RoslynExtensions.cs
index a02a282c..b8645e11 100644
--- a/src/MessagePack.GeneratorCore/Utils/RoslynExtensions.cs
+++ b/src/MessagePack.GeneratorCore/Utils/RoslynExtensions.cs
@@ -1,12 +1,9 @@
// Copyright (c) All contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.CodeAnalysis;
-using Microsoft.CodeAnalysis.CSharp;
-using Microsoft.CodeAnalysis.CSharp.Syntax;
namespace MessagePackCompiler
{
@@ -15,111 +12,14 @@ namespace MessagePackCompiler
{
public static IEnumerable<INamedTypeSymbol> GetNamedTypeSymbols(this Compilation compilation)
{
- foreach (var syntaxTree in compilation.SyntaxTrees)
+ return compilation.SyntaxTrees.SelectMany(syntaxTree =>
{
var semModel = compilation.GetSemanticModel(syntaxTree);
-
- foreach (var item in syntaxTree.GetRoot()
+ return syntaxTree.GetRoot()
.DescendantNodes()
.Select(x => semModel.GetDeclaredSymbol(x))
- .Where(x => x != null))
- {
- var namedType = item as INamedTypeSymbol;
- if (namedType != null)
- {
- yield return namedType;
- }
- }
- }
- }
-
- public static IEnumerable<INamedTypeSymbol> EnumerateBaseType(this ITypeSymbol symbol)
- {
- var t = symbol.BaseType;
- while (t != null)
- {
- yield return t;
- t = t.BaseType;
- }
- }
-
- public static AttributeData FindAttribute(this IEnumerable<AttributeData> attributeDataList, string typeName)
- {
- return attributeDataList
- .Where(x => x.AttributeClass.ToDisplayString() == typeName)
- .FirstOrDefault();
- }
-
- public static AttributeData FindAttributeShortName(
- this IEnumerable<AttributeData> attributeDataList,
- string typeName)
- {
- return attributeDataList
- .Where(x => x.AttributeClass.Name == typeName)
- .FirstOrDefault();
- }
-
- public static AttributeData FindAttributeIncludeBasePropertyShortName(
- this IPropertySymbol property,
- string typeName)
- {
- do
- {
- var data = FindAttributeShortName(property.GetAttributes(), typeName);
- if (data != null)
- {
- return data;
- }
-
- property = property.OverriddenProperty;
- }
- while (property != null);
-
- return null;
- }
-
- public static AttributeSyntax FindAttribute(
- this BaseTypeDeclarationSyntax typeDeclaration,
- SemanticModel model,
- string typeName)
- {
- return typeDeclaration.AttributeLists
- .SelectMany(x => x.Attributes)
- .Where(x => model.GetTypeInfo(x).Type?.ToDisplayString() == typeName)
- .FirstOrDefault();
- }
-
- public static INamedTypeSymbol FindBaseTargetType(this ITypeSymbol symbol, string typeName)
- {
- return symbol.EnumerateBaseType()
- .Where(x => x.OriginalDefinition?.ToDisplayString() == typeName)
- .FirstOrDefault();
- }
-
- public static object GetSingleNamedArgumentValue(this AttributeData attribute, string key)
- {
- foreach (var item in attribute.NamedArguments)
- {
- if (item.Key == key)
- {
- return item.Value.Value;
- }
- }
-
- return null;
- }
-
- public static bool IsNullable(this INamedTypeSymbol symbol)
- {
- if (symbol.IsGenericType)
- {
- if (symbol.ConstructUnboundGenericType().ToDisplayString() == "T?")
- {
- return true;
- }
- }
-
- return false;
+ .OfType<INamedTypeSymbol>();
+ });
}
public static IEnumerable<ISymbol> GetAllMembers(this ITypeSymbol symbol)
@@ -136,17 +36,11 @@ namespace MessagePackCompiler
}
}
- public static IEnumerable<ISymbol> GetAllInterfaceMembers(this ITypeSymbol symbol)
- {
- return symbol.GetMembers()
- .Concat(symbol.AllInterfaces.SelectMany(x => x.GetMembers()));
- }
-
- public static bool ApproximatelyEqual(this INamedTypeSymbol left, INamedTypeSymbol right)
+ public static bool ApproximatelyEqual(this INamedTypeSymbol? left, INamedTypeSymbol? right)
{
if (left is IErrorTypeSymbol || right is IErrorTypeSymbol)
{
- return left.ToDisplayString() == right.ToDisplayString();
+ return left?.ToDisplayString() == right?.ToDisplayString();
}
else
{
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/CollectionFormatter.cs b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/CollectionFormatter.cs
index 590719e4..c7cc8272 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/CollectionFormatter.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/CollectionFormatter.cs
@@ -346,7 +346,7 @@ namespace MessagePack.Formatters
}
else
{
- using (var scratchRental = SequencePool.Shared.Rent())
+ using (var scratchRental = options.SequencePool.Rent())
{
var scratch = scratchRental.Value;
MessagePackWriter scratchWriter = writer.Clone(scratch);
@@ -464,6 +464,25 @@ namespace MessagePack.Formatters
}
}
+ public sealed class GenericEnumerableFormatter<TElement, TCollection> : CollectionFormatterBase<TElement, TElement[], TCollection>
+ where TCollection : IEnumerable<TElement>
+ {
+ protected override TElement[] Create(int count, MessagePackSerializerOptions options)
+ {
+ return new TElement[count];
+ }
+
+ protected override void Add(TElement[] collection, int index, TElement value, MessagePackSerializerOptions options)
+ {
+ collection[index] = value;
+ }
+
+ protected override TCollection Complete(TElement[] intermediateCollection)
+ {
+ return (TCollection)Activator.CreateInstance(typeof(TCollection), intermediateCollection);
+ }
+ }
+
public sealed class LinkedListFormatter<T> : CollectionFormatterBase<T, LinkedList<T>, LinkedList<T>.Enumerator, LinkedList<T>>
{
protected override void Add(LinkedList<T> collection, int index, T value, MessagePackSerializerOptions options)
@@ -950,7 +969,7 @@ namespace MessagePack.Formatters
IMessagePackFormatter<object> formatter = options.Resolver.GetFormatterWithVerify<object>();
- using (var scratchRental = SequencePool.Shared.Rent())
+ using (var scratchRental = options.SequencePool.Rent())
{
var scratch = scratchRental.Value;
MessagePackWriter scratchWriter = writer.Clone(scratch);
@@ -1271,6 +1290,28 @@ namespace MessagePack.Formatters
}
}
+#if NET5_0_OR_GREATER
+
+ public sealed class InterfaceReadOnlySetFormatter<T> : CollectionFormatterBase<T, HashSet<T>, IReadOnlySet<T>>
+ {
+ protected override void Add(HashSet<T> collection, int index, T value, MessagePackSerializerOptions options)
+ {
+ collection.Add(value);
+ }
+
+ protected override IReadOnlySet<T> Complete(HashSet<T> intermediateCollection)
+ {
+ return intermediateCollection;
+ }
+
+ protected override HashSet<T> Create(int count, MessagePackSerializerOptions options)
+ {
+ return new HashSet<T>(options.Security.GetEqualityComparer<T>());
+ }
+ }
+
+#endif
+
public sealed class ConcurrentBagFormatter<T> : CollectionFormatterBase<T, System.Collections.Concurrent.ConcurrentBag<T>>
{
protected override int? GetCount(ConcurrentBag<T> sequence)
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/DateTimeFormatters.cs b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/DateTimeFormatters.cs
index 06d2ef80..07da2097 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/DateTimeFormatters.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/DateTimeFormatters.cs
@@ -70,4 +70,50 @@ namespace MessagePack.Formatters
return array;
}
}
+
+#if NET6_0_OR_GREATER
+ /// <summary>
+ /// Serializes a <see cref="DateOnly"/> value as an ordinary <see cref="int"/> using the <see cref="DateOnly.DayNumber"/>.
+ /// </summary>
+ public sealed class DateOnlyFormatter : IMessagePackFormatter<DateOnly>
+ {
+ public static readonly DateOnlyFormatter Instance = new DateOnlyFormatter();
+
+ private DateOnlyFormatter()
+ {
+ }
+
+ public void Serialize(ref MessagePackWriter writer, DateOnly value, MessagePackSerializerOptions options)
+ {
+ writer.Write(value.DayNumber);
+ }
+
+ public DateOnly Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options)
+ {
+ return DateOnly.FromDayNumber(reader.ReadInt32());
+ }
+ }
+
+ /// <summary>
+ /// Serializes a <see cref="TimeOnly"/> value as an extension, recording either seconds or ticks depending on the resolution required.
+ /// </summary>
+ public sealed class TimeOnlyFormatter : IMessagePackFormatter<TimeOnly>
+ {
+ public static readonly TimeOnlyFormatter Instance = new TimeOnlyFormatter();
+
+ private TimeOnlyFormatter()
+ {
+ }
+
+ public void Serialize(ref MessagePackWriter writer, TimeOnly value, MessagePackSerializerOptions options)
+ {
+ writer.Write(value.Ticks);
+ }
+
+ public TimeOnly Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options)
+ {
+ return new TimeOnly(reader.ReadInt64());
+ }
+ }
+#endif
}
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/DictionaryFormatter.cs b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/DictionaryFormatter.cs
index 4b9347a1..727d9d1d 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/DictionaryFormatter.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/DictionaryFormatter.cs
@@ -174,6 +174,25 @@ namespace MessagePack.Formatters
}
}
+ public sealed class GenericReadOnlyDictionaryFormatter<TKey, TValue, TDictionary> : DictionaryFormatterBase<TKey, TValue, Dictionary<TKey, TValue>, TDictionary>
+ where TDictionary : IReadOnlyDictionary<TKey, TValue>
+ {
+ protected override void Add(Dictionary<TKey, TValue> collection, int index, TKey key, TValue value, MessagePackSerializerOptions options)
+ {
+ collection.Add(key, value);
+ }
+
+ protected override Dictionary<TKey, TValue> Create(int count, MessagePackSerializerOptions options)
+ {
+ return new Dictionary<TKey, TValue>(count, options.Security.GetEqualityComparer<TKey>());
+ }
+
+ protected override TDictionary Complete(Dictionary<TKey, TValue> intermediateCollection)
+ {
+ return (TDictionary)Activator.CreateInstance(typeof(TDictionary), intermediateCollection);
+ }
+ }
+
public sealed class InterfaceDictionaryFormatter<TKey, TValue> : DictionaryFormatterBase<TKey, TValue, Dictionary<TKey, TValue>, IDictionary<TKey, TValue>>
{
protected override void Add(Dictionary<TKey, TValue> collection, int index, TKey key, TValue value, MessagePackSerializerOptions options)
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/StandardClassLibraryFormatter.cs b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/StandardClassLibraryFormatter.cs
index a227aaca..e70a9581 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/StandardClassLibraryFormatter.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/StandardClassLibraryFormatter.cs
@@ -15,7 +15,10 @@ namespace MessagePack.Formatters
{
// NET40 -> BigInteger, Complex, Tuple
- // byte[] is special. represents bin type.
+ /// <summary>
+ /// Serializes a <see cref="byte"/> array as a bin type.
+ /// Deserializes a bin type or an array of byte-sized integers into a <see cref="byte"/> array.
+ /// </summary>
public sealed class ByteArrayFormatter : IMessagePackFormatter<byte[]>
{
public static readonly ByteArrayFormatter Instance = new ByteArrayFormatter();
@@ -31,7 +34,35 @@ namespace MessagePack.Formatters
public byte[] Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options)
{
- return reader.ReadBytes()?.ToArray();
+ if (reader.NextMessagePackType == MessagePackType.Array)
+ {
+ int len = reader.ReadArrayHeader();
+ if (len == 0)
+ {
+ return Array.Empty<byte>();
+ }
+
+ byte[] array = new byte[len];
+ options.Security.DepthStep(ref reader);
+ try
+ {
+ for (int i = 0; i < len; i++)
+ {
+ reader.CancellationToken.ThrowIfCancellationRequested();
+ array[i] = reader.ReadByte();
+ }
+ }
+ finally
+ {
+ reader.Depth--;
+ }
+
+ return array;
+ }
+ else
+ {
+ return reader.ReadBytes()?.ToArray();
+ }
}
}
@@ -635,4 +666,28 @@ namespace MessagePack.Formatters
return (T)Type.GetType(reader.ReadString(), throwOnError: true);
}
}
+
+#if NET5_0_OR_GREATER
+
+ public sealed class HalfFormatter : IMessagePackFormatter<Half>
+ {
+ public static readonly IMessagePackFormatter<Half> Instance = new HalfFormatter();
+
+ private HalfFormatter()
+ {
+ }
+
+ public void Serialize(ref MessagePackWriter writer, Half value, MessagePackSerializerOptions options)
+ {
+ writer.Write((float)value);
+ }
+
+ public Half Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options)
+ {
+ return (Half)reader.ReadSingle();
+ }
+ }
+
+#endif
+
}
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/StringInterningFormatter.cs b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/StringInterningFormatter.cs
new file mode 100644
index 00000000..9e07521b
--- /dev/null
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/StringInterningFormatter.cs
@@ -0,0 +1,61 @@
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using Microsoft.NET.StringTools;
+
+namespace MessagePack.Formatters
+{
+ /// <summary>
+ /// A <see cref="string" /> formatter that interns strings on deserialization.
+ /// </summary>
+ public sealed class StringInterningFormatter : IMessagePackFormatter<string>
+ {
+ /// <inheritdoc/>
+ public string Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options)
+ {
+ if (reader.TryReadNil())
+ {
+ return null;
+ }
+
+ MessagePackReader retryReader = reader;
+ if (reader.TryReadStringSpan(out ReadOnlySpan<byte> bytes))
+ {
+ if (bytes.Length < 4096)
+ {
+ if (bytes.Length == 0)
+ {
+ return string.Empty;
+ }
+
+ Span<char> chars = stackalloc char[bytes.Length];
+ int charLength;
+#if SPAN_BUILTIN
+ charLength = StringEncoding.UTF8.GetChars(bytes, chars);
+#else
+ unsafe
+ {
+ fixed (byte* pBytes = bytes)
+ fixed (char* pChars = chars)
+ {
+ charLength = StringEncoding.UTF8.GetChars(pBytes, bytes.Length, pChars, chars.Length);
+ }
+ }
+#endif
+ return Strings.WeakIntern(chars.Slice(0, charLength));
+ }
+ else
+ {
+ // Rewind the reader to the start of the string because we're taking the slow path.
+ reader = retryReader;
+ }
+ }
+
+ return Strings.WeakIntern(reader.ReadString());
+ }
+
+ /// <inheritdoc/>
+ public void Serialize(ref MessagePackWriter writer, string value, MessagePackSerializerOptions options) => writer.Write(value);
+ }
+}
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/StringInterningFormatter.cs.meta b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/StringInterningFormatter.cs.meta
new file mode 100644
index 00000000..329667d4
--- /dev/null
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/StringInterningFormatter.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 78f9cfd44a10b334582b112b07143434
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/TypelessFormatter.cs b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/TypelessFormatter.cs
index 0d158a35..488f6800 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/TypelessFormatter.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/TypelessFormatter.cs
@@ -202,7 +202,7 @@ namespace MessagePack.Formatters
}
// mark will be written at the end, when size is known
- using (var scratchRental = SequencePool.Shared.Rent())
+ using (var scratchRental = options.SequencePool.Rent())
{
MessagePackWriter scratchWriter = writer.Clone(scratchRental.Value);
scratchWriter.WriteString(typeName);
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/HashCode.cs b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/HashCode.cs
index 8d48c08f..79a44fcf 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/HashCode.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/HashCode.cs
@@ -42,7 +42,7 @@ https://raw.githubusercontent.com/Cyan4973/xxHash/5c174cfa4e45a42f94082dc0d4539b
*/
-#if !NETCOREAPP
+#if !(NETCOREAPP || UNITY_2021_2_OR_NEWER)
using System.Collections.Generic;
using System.ComponentModel;
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/IFormatterResolver.cs b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/IFormatterResolver.cs
index 7c5d0002..51a8e14e 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/IFormatterResolver.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/IFormatterResolver.cs
@@ -6,6 +6,7 @@ using System.Linq.Expressions;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.ExceptionServices;
+using System.Runtime.Serialization;
using MessagePack.Formatters;
using MessagePack.Internal;
@@ -107,11 +108,17 @@ namespace MessagePack
}
}
+ [Serializable]
public class FormatterNotRegisteredException : MessagePackSerializationException
{
public FormatterNotRegisteredException(string message)
: base(message)
{
}
+
+ protected FormatterNotRegisteredException(SerializationInfo info, StreamingContext context)
+ : base(info, context)
+ {
+ }
}
}
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Internal/DynamicAssembly.cs b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Internal/DynamicAssembly.cs
index f5988af0..72b86f84 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Internal/DynamicAssembly.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Internal/DynamicAssembly.cs
@@ -26,7 +26,7 @@ namespace MessagePack.Internal
AssemblyBuilderAccess builderAccess = AssemblyBuilderAccess.RunAndSave;
this.moduleName = moduleName;
#else
- AssemblyBuilderAccess builderAccess = AssemblyBuilderAccess.Run;
+ AssemblyBuilderAccess builderAccess = AssemblyBuilderAccess.RunAndCollect;
#endif
this.assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName(moduleName), builderAccess);
this.moduleBuilder = this.assemblyBuilder.DefineDynamicModule(moduleName + ".dll");
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Internal/ReflectionExtensions.cs b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Internal/ReflectionExtensions.cs
index dba62135..8c9956bd 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Internal/ReflectionExtensions.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Internal/ReflectionExtensions.cs
@@ -2,6 +2,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
+using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
@@ -48,5 +49,11 @@ namespace MessagePack.Internal
{
return propInfo.SetMethod;
}
+
+ public static bool HasPrivateCtorForSerialization(this TypeInfo type)
+ {
+ var markedCtor = type.DeclaredConstructors.SingleOrDefault(x => x.GetCustomAttribute<SerializationConstructorAttribute>(false) != null);
+ return markedCtor?.Attributes.HasFlag(MethodAttributes.Private) ?? false;
+ }
}
}
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Internal/Sequence`1.cs b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Internal/Sequence`1.cs
index 9fe752df..2813b92e 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Internal/Sequence`1.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Internal/Sequence`1.cs
@@ -27,7 +27,11 @@ namespace Nerdbank.Streams
[DebuggerDisplay("{" + nameof(DebuggerDisplay) + ",nq}")]
internal class Sequence<T> : IBufferWriter<T>, IDisposable
{
- private static readonly int DefaultLengthFromArrayPool = 1 + (4095 / Marshal.SizeOf<T>());
+ private const int MaximumAutoGrowSize = 32 * 1024;
+
+ private static readonly int DefaultLengthFromArrayPool = 1 + (4095 / Unsafe.SizeOf<T>());
+
+ private static readonly ReadOnlySequence<T> Empty = new ReadOnlySequence<T>(SequenceSegment.Empty, 0, SequenceSegment.Empty, 0);
private readonly Stack<SequenceSegment> segmentPool = new Stack<SequenceSegment>();
@@ -87,10 +91,22 @@ namespace Nerdbank.Streams
/// The <see cref="MemoryPool{T}"/> in use may itself have a minimum array length as well,
/// in which case the higher of the two minimums dictate the minimum array size that will be allocated.
/// </para>
+ /// <para>
+ /// If <see cref="AutoIncreaseMinimumSpanLength"/> is <c>true</c>, this value may be automatically increased as the length of a sequence grows.
+ /// </para>
/// </remarks>
public int MinimumSpanLength { get; set; } = 0;
/// <summary>
+ /// Gets or sets a value indicating whether the <see cref="MinimumSpanLength"/> should be
+ /// intelligently increased as the length of the sequence grows.
+ /// </summary>
+ /// <remarks>
+ /// This can help prevent long sequences made up of many very small arrays.
+ /// </remarks>
+ public bool AutoIncreaseMinimumSpanLength { get; set; } = true;
+
+ /// <summary>
/// Gets this sequence expressed as a <see cref="ReadOnlySequence{T}"/>.
/// </summary>
/// <returns>A read only sequence representing the data in this object.</returns>
@@ -112,9 +128,9 @@ namespace Nerdbank.Streams
/// <param name="sequence">The sequence to convert.</param>
public static implicit operator ReadOnlySequence<T>(Sequence<T> sequence)
{
- return sequence.first != null
+ return sequence.first != null && sequence.last != null
? new ReadOnlySequence<T>(sequence.first, sequence.first.Start, sequence.last, sequence.last.End)
- : ReadOnlySequence<T>.Empty;
+ : Empty;
}
/// <summary>
@@ -128,10 +144,22 @@ namespace Nerdbank.Streams
public void AdvanceTo(SequencePosition position)
{
var firstSegment = (SequenceSegment)position.GetObject();
+ if (firstSegment == null)
+ {
+ // Emulate PipeReader behavior which is to just return for default(SequencePosition)
+ return;
+ }
+
+ if (ReferenceEquals(firstSegment, SequenceSegment.Empty) && this.Length == 0)
+ {
+ // We were called with our own empty buffer segment.
+ return;
+ }
+
int firstIndex = position.GetInteger();
// Before making any mutations, confirm that the block specified belongs to this sequence.
- var current = this.first;
+ Sequence<T>.SequenceSegment current = this.first;
while (current != firstSegment && current != null)
{
current = current.Next;
@@ -151,12 +179,7 @@ namespace Nerdbank.Streams
firstSegment.AdvanceTo(firstIndex);
- if (firstSegment.Length == 0)
- {
- firstSegment = this.RecycleAndGetNext(firstSegment);
- }
-
- this.first = firstSegment;
+ this.first = firstSegment.Length == 0 ? this.RecycleAndGetNext(firstSegment) : firstSegment;
if (this.first == null)
{
@@ -174,6 +197,7 @@ namespace Nerdbank.Streams
SequenceSegment last = this.last;
Verify.Operation(last != null, "Cannot advance before acquiring memory.");
last.Advance(count);
+ this.ConsiderMinimumSizeIncrease();
}
/// <summary>
@@ -191,6 +215,24 @@ namespace Nerdbank.Streams
public Span<T> GetSpan(int sizeHint) => this.GetSegment(sizeHint).RemainingSpan;
/// <summary>
+ /// Adds an existing memory location to this sequence without copying.
+ /// </summary>
+ /// <param name="memory">The memory to add.</param>
+ /// <remarks>
+ /// This *may* leave significant slack space in a previously allocated block if calls to <see cref="Append(ReadOnlyMemory{T})"/>
+ /// follow calls to <see cref="GetMemory(int)"/> or <see cref="GetSpan(int)"/>.
+ /// </remarks>
+ public void Append(ReadOnlyMemory<T> memory)
+ {
+ if (memory.Length > 0)
+ {
+ Sequence<T>.SequenceSegment segment = this.segmentPool.Count > 0 ? this.segmentPool.Pop() : new SequenceSegment();
+ segment.AssignForeign(memory);
+ this.Append(segment);
+ }
+ }
+
+ /// <summary>
/// Clears the entire sequence, recycles associated memory into pools,
/// and resets this instance for reuse.
/// This invalidates any <see cref="ReadOnlySequence{T}"/> previously produced by this instance.
@@ -204,7 +246,7 @@ namespace Nerdbank.Streams
/// </summary>
public void Reset()
{
- var current = this.first;
+ Sequence<T>.SequenceSegment current = this.first;
while (current != null)
{
current = this.RecycleAndGetNext(current);
@@ -236,7 +278,7 @@ namespace Nerdbank.Streams
if (minBufferSize.HasValue)
{
- var segment = this.segmentPool.Count > 0 ? this.segmentPool.Pop() : new SequenceSegment();
+ Sequence<T>.SequenceSegment segment = this.segmentPool.Count > 0 ? this.segmentPool.Pop() : new SequenceSegment();
if (this.arrayPool != null)
{
segment.Assign(this.arrayPool.Rent(minBufferSize.Value == -1 ? DefaultLengthFromArrayPool : minBufferSize.Value));
@@ -268,7 +310,7 @@ namespace Nerdbank.Streams
else
{
// The last block is completely unused. Replace it instead of appending to it.
- var current = this.first;
+ Sequence<T>.SequenceSegment current = this.first;
if (this.first != this.last)
{
while (current.Next != this.last)
@@ -291,24 +333,40 @@ namespace Nerdbank.Streams
private SequenceSegment RecycleAndGetNext(SequenceSegment segment)
{
- var recycledSegment = segment;
- segment = segment.Next;
+ Sequence<T>.SequenceSegment recycledSegment = segment;
+ Sequence<T>.SequenceSegment nextSegment = segment.Next;
recycledSegment.ResetMemory(this.arrayPool);
this.segmentPool.Push(recycledSegment);
- return segment;
+ return nextSegment;
+ }
+
+ private void ConsiderMinimumSizeIncrease()
+ {
+ if (this.AutoIncreaseMinimumSpanLength && this.MinimumSpanLength < MaximumAutoGrowSize)
+ {
+ int autoSize = Math.Min(MaximumAutoGrowSize, (int)Math.Min(int.MaxValue, this.Length / 2));
+ if (this.MinimumSpanLength < autoSize)
+ {
+ this.MinimumSpanLength = autoSize;
+ }
+ }
}
private class SequenceSegment : ReadOnlySequenceSegment<T>
{
+ internal static readonly SequenceSegment Empty = new SequenceSegment();
+
/// <summary>
/// A value indicating whether the element may contain references (and thus must be cleared).
/// </summary>
private static readonly bool MayContainReferences = !typeof(T).GetTypeInfo().IsPrimitive;
+#pragma warning disable SA1011 // Closing square brackets should be spaced correctly
/// <summary>
/// Gets the backing array, when using an <see cref="ArrayPool{T}"/> instead of a <see cref="MemoryPool{T}"/>.
/// </summary>
private T[] array;
+#pragma warning restore SA1011 // Closing square brackets should be spaced correctly
/// <summary>
/// Gets the position within <see cref="ReadOnlySequenceSegment{T}.Memory"/> where the data starts.
@@ -363,6 +421,11 @@ namespace Nerdbank.Streams
}
/// <summary>
+ /// Gets a value indicating whether this segment refers to memory that came from outside and that we cannot write to nor recycle.
+ /// </summary>
+ internal bool IsForeignMemory => this.array == null && this.MemoryOwner == null;
+
+ /// <summary>
/// Assigns this (recyclable) segment a new area in memory.
/// </summary>
/// <param name="memoryOwner">The memory and a means to recycle it.</param>
@@ -383,11 +446,21 @@ namespace Nerdbank.Streams
}
/// <summary>
+ /// Assigns this (recyclable) segment a new area in memory.
+ /// </summary>
+ /// <param name="memory">A memory block obtained from outside, that we do not own and should not recycle.</param>
+ internal void AssignForeign(ReadOnlyMemory<T> memory)
+ {
+ this.Memory = memory;
+ this.End = memory.Length;
+ }
+
+ /// <summary>
/// Clears all fields in preparation to recycle this instance.
/// </summary>
internal void ResetMemory(ArrayPool<T> arrayPool)
{
- this.ClearReferences(this.Start, this.End);
+ this.ClearReferences(this.Start, this.End - this.Start);
this.Memory = default;
this.Next = null;
this.RunningIndex = 0;
@@ -411,14 +484,17 @@ namespace Nerdbank.Streams
/// <param name="segment">The next segment in the linked list.</param>
internal void SetNext(SequenceSegment segment)
{
- Debug.Assert(segment != null, "Null not allowed.");
this.Next = segment;
segment.RunningIndex = this.RunningIndex + this.Start + this.Length;
- // When setting Memory, we start with index 0 instead of this.Start because
- // the first segment has an explicit index set anyway,
- // and we don't want to double-count it here.
- this.Memory = this.AvailableMemory.Slice(0, this.Start + this.Length);
+ // Trim any slack on this segment.
+ if (!this.IsForeignMemory)
+ {
+ // When setting Memory, we start with index 0 instead of this.Start because
+ // the first segment has an explicit index set anyway,
+ // and we don't want to double-count it here.
+ this.Memory = this.AvailableMemory.Slice(0, this.Start + this.Length);
+ }
}
/// <summary>
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Internal/TinyJsonReader.cs b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Internal/TinyJsonReader.cs
index 87263061..02229621 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Internal/TinyJsonReader.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Internal/TinyJsonReader.cs
@@ -4,6 +4,7 @@
using System;
using System.Globalization;
using System.IO;
+using System.Runtime.Serialization;
using System.Text;
#pragma warning disable SA1649 // File name should match first type name
@@ -39,12 +40,18 @@ namespace MessagePack
String,
}
+ [Serializable]
public class TinyJsonException : MessagePackSerializationException
{
public TinyJsonException(string message)
: base(message)
{
}
+
+ protected TinyJsonException(SerializationInfo info, StreamingContext context)
+ : base(info, context)
+ {
+ }
}
internal class TinyJsonReader : IDisposable
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePack.asmdef b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePack.asmdef
index f1e851eb..ff7f5b38 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePack.asmdef
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePack.asmdef
@@ -13,9 +13,10 @@
"System.Buffers.dll",
"System.Threading.Tasks.Extensions.dll",
"System.Runtime.CompilerServices.Unsafe.dll",
+ "Microsoft.NET.StringTools.dll",
"System.Runtime.Extensions.dll"
],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": []
-} \ No newline at end of file
+}
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackCompression.cs b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackCompression.cs
index 1fb1a722..8303a219 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackCompression.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackCompression.cs
@@ -22,7 +22,7 @@ namespace MessagePack
/// Uses msgpack type code ext99 and is compatible with v1 of this library.
/// </remarks>
/// <devremarks>
- /// See also ThisLibraryExtensionTypeCodes.Lz4Block
+ /// See also ThisLibraryExtensionTypeCodes.Lz4Block.
/// </devremarks>
Lz4Block,
@@ -35,7 +35,7 @@ namespace MessagePack
/// Uses msgpack type code ext98 in array.
/// </remarks>
/// <devremarks>
- /// See also ThisLibraryExtensionTypeCodes.Lz4BlockArray
+ /// See also ThisLibraryExtensionTypeCodes.Lz4BlockArray.
/// </devremarks>
Lz4BlockArray,
}
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSecurity.cs b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSecurity.cs
index c362f915..2b743afa 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSecurity.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSecurity.cs
@@ -255,7 +255,7 @@ namespace MessagePack
/// </summary>
private class ObjectFallbackEqualityComparer : IEqualityComparer<object>, IEqualityComparer
{
- private static readonly MethodInfo GetHashCollisionResistantEqualityComparerOpenGenericMethod = typeof(MessagePackSecurity).GetTypeInfo().DeclaredMethods.Single(m => m.Name == nameof(MessagePackSecurity.GetHashCollisionResistantEqualityComparer) && m.IsGenericMethod);
+ private static readonly Lazy<MethodInfo> GetHashCollisionResistantEqualityComparerOpenGenericMethod = new Lazy<MethodInfo>(() => typeof(MessagePackSecurity).GetTypeInfo().DeclaredMethods.Single(m => m.Name == nameof(MessagePackSecurity.GetHashCollisionResistantEqualityComparer) && m.IsGenericMethod));
private readonly MessagePackSecurity security;
private readonly ThreadsafeTypeKeyHashTable<IEqualityComparer> equalityComparerCache = new ThreadsafeTypeKeyHashTable<IEqualityComparer>();
@@ -288,7 +288,7 @@ namespace MessagePack
{
try
{
- equalityComparer = (IEqualityComparer)GetHashCollisionResistantEqualityComparerOpenGenericMethod.MakeGenericMethod(valueType).Invoke(this.security, Array.Empty<object>());
+ equalityComparer = (IEqualityComparer)GetHashCollisionResistantEqualityComparerOpenGenericMethod.Value.MakeGenericMethod(valueType).Invoke(this.security, Array.Empty<object>());
}
catch (TargetInvocationException ex)
{
@@ -334,8 +334,8 @@ namespace MessagePack
value = float.NaN;
}
- long l = *(long*)&value;
- return HashCode.Combine((int)(l >> 32), unchecked((int)l));
+ int l = *(int*)&value;
+ return l;
}
}
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSerializer.Json.cs b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSerializer.Json.cs
index 091e2a95..38e39985 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSerializer.Json.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSerializer.Json.cs
@@ -21,7 +21,9 @@ namespace MessagePack
/// <exception cref="MessagePackSerializationException">Thrown if an error occurs during serialization.</exception>
public static void SerializeToJson<T>(TextWriter textWriter, T obj, MessagePackSerializerOptions options = null, CancellationToken cancellationToken = default)
{
- using (var sequenceRental = SequencePool.Shared.Rent())
+ options = options ?? DefaultOptions;
+
+ using (var sequenceRental = options.SequencePool.Rent())
{
var msgpackWriter = new MessagePackWriter(sequenceRental.Value)
{
@@ -85,7 +87,7 @@ namespace MessagePack
{
if (options.Compression.IsCompression())
{
- using (var scratchRental = SequencePool.Shared.Rent())
+ using (var scratchRental = options.SequencePool.Rent())
{
if (TryDecompress(ref reader, scratchRental.Value))
{
@@ -133,7 +135,9 @@ namespace MessagePack
/// </summary>
public static byte[] ConvertFromJson(string str, MessagePackSerializerOptions options = null, CancellationToken cancellationToken = default)
{
- using (var scratchRental = SequencePool.Shared.Rent())
+ options = options ?? DefaultOptions;
+
+ using (var scratchRental = options.SequencePool.Rent())
{
var writer = new MessagePackWriter(scratchRental.Value)
{
@@ -155,30 +159,31 @@ namespace MessagePack
public static void ConvertFromJson(TextReader reader, ref MessagePackWriter writer, MessagePackSerializerOptions options = null)
{
options = options ?? DefaultOptions;
+
if (options.Compression.IsCompression())
{
- using (var scratchRental = SequencePool.Shared.Rent())
+ using (var scratchRental = options.SequencePool.Rent())
{
MessagePackWriter scratchWriter = writer.Clone(scratchRental.Value);
using (var jr = new TinyJsonReader(reader, false))
{
- FromJsonCore(jr, ref scratchWriter);
+ FromJsonCore(jr, ref scratchWriter, options);
}
scratchWriter.Flush();
- ToLZ4BinaryCore(scratchRental.Value, ref writer, options.Compression);
+ ToLZ4BinaryCore(scratchRental.Value, ref writer, options.Compression, options.CompressionMinLength);
}
}
else
{
using (var jr = new TinyJsonReader(reader, false))
{
- FromJsonCore(jr, ref writer);
+ FromJsonCore(jr, ref writer, options);
}
}
}
- private static uint FromJsonCore(TinyJsonReader jr, ref MessagePackWriter writer)
+ private static uint FromJsonCore(TinyJsonReader jr, ref MessagePackWriter writer, MessagePackSerializerOptions options)
{
uint count = 0;
while (jr.Read())
@@ -189,10 +194,10 @@ namespace MessagePack
break;
case TinyJsonToken.StartObject:
// Set up a scratch area to serialize the collection since we don't know its length yet, which must be written first.
- using (var scratchRental = SequencePool.Shared.Rent())
+ using (var scratchRental = options.SequencePool.Rent())
{
MessagePackWriter scratchWriter = writer.Clone(scratchRental.Value);
- var mapCount = FromJsonCore(jr, ref scratchWriter);
+ var mapCount = FromJsonCore(jr, ref scratchWriter, options);
scratchWriter.Flush();
mapCount = mapCount / 2; // remove propertyname string count.
@@ -206,10 +211,10 @@ namespace MessagePack
return count; // break
case TinyJsonToken.StartArray:
// Set up a scratch area to serialize the collection since we don't know its length yet, which must be written first.
- using (var scratchRental = SequencePool.Shared.Rent())
+ using (var scratchRental = options.SequencePool.Rent())
{
MessagePackWriter scratchWriter = writer.Clone(scratchRental.Value);
- var arrayCount = FromJsonCore(jr, ref scratchWriter);
+ var arrayCount = FromJsonCore(jr, ref scratchWriter, options);
scratchWriter.Flush();
writer.WriteArrayHeader(arrayCount);
@@ -299,7 +304,7 @@ namespace MessagePack
WriteJsonString(reader.ReadString(), writer);
break;
case MessagePackType.Binary:
- ArraySegment<byte> segment = ByteArraySegmentFormatter.Instance.Deserialize(ref reader, DefaultOptions);
+ ArraySegment<byte> segment = ByteArraySegmentFormatter.Instance.Deserialize(ref reader, options);
writer.Write("\"" + Convert.ToBase64String(segment.Array, segment.Offset, segment.Count) + "\"");
break;
case MessagePackType.Array:
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSerializer.NonGeneric.cs b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSerializer.NonGeneric.cs
index 281e20f3..bd6f9b43 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSerializer.NonGeneric.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSerializer.NonGeneric.cs
@@ -82,6 +82,22 @@ namespace MessagePack
return GetOrAdd(type).Deserialize_ReadOnlySequence_Options_CancellationToken.Invoke(bytes, options, cancellationToken);
}
+ /// <summary>
+ /// Helper method used by reflection.
+ /// </summary>
+ private static void SerializeSemiGeneric<T>(ref MessagePackWriter writer, object valueObject, MessagePackSerializerOptions options = null)
+ {
+ Serialize(ref writer, (T)valueObject, options);
+ }
+
+ /// <summary>
+ /// Helper method used by reflection.
+ /// </summary>
+ private static object DeserializeSemiGeneric<T>(ref MessagePackReader reader, MessagePackSerializerOptions options = null)
+ {
+ return Deserialize<T>(ref reader, options);
+ }
+
private static async ValueTask<object> DeserializeObjectAsync<T>(Stream stream, MessagePackSerializerOptions options, CancellationToken cancellationToken) => await DeserializeAsync<T>(stream, options, cancellationToken).ConfigureAwait(false);
private static CompiledMethods GetOrAdd(Type type)
@@ -219,39 +235,22 @@ namespace MessagePack
}
{
- // public static void Serialize<T>(ref MessagePackWriter writer, T obj, MessagePackSerializerOptions options)
- MethodInfo serialize = GetMethod(nameof(Serialize), type, new Type[] { typeof(MessagePackWriter).MakeByRefType(), null, typeof(MessagePackSerializerOptions) });
+ // private static void SerializeSemiGeneric<T>(ref MessagePackWriter writer, object obj, MessagePackSerializerOptions options)
+ MethodInfo serialize = GetMethod(nameof(SerializeSemiGeneric), type, new Type[] { typeof(MessagePackWriter).MakeByRefType(), typeof(object), typeof(MessagePackSerializerOptions) });
#if ENABLE_IL2CPP
this.Serialize_MessagePackWriter_T_Options = (ref MessagePackWriter x, object y, MessagePackSerializerOptions z) => ThrowRefStructNotSupported();
#else
- ParameterExpression param1 = Expression.Parameter(typeof(MessagePackWriter).MakeByRefType(), "writer");
- ParameterExpression param2 = Expression.Parameter(typeof(object), "obj");
- ParameterExpression param3 = Expression.Parameter(typeof(MessagePackSerializerOptions), "options");
-
- MethodCallExpression body = Expression.Call(
- null,
- serialize,
- param1,
- ti.IsValueType ? Expression.Unbox(param2, type) : Expression.Convert(param2, type),
- param3);
- MessagePackWriterSerialize lambda = Expression.Lambda<MessagePackWriterSerialize>(body, param1, param2, param3).Compile(PreferInterpretation);
-
- this.Serialize_MessagePackWriter_T_Options = lambda;
+ this.Serialize_MessagePackWriter_T_Options = (MessagePackWriterSerialize)serialize.CreateDelegate(typeof(MessagePackWriterSerialize));
#endif
}
{
- // public static T Deserialize<T>(ref MessagePackReader reader, MessagePackSerializerOptions options)
- MethodInfo deserialize = GetMethod(nameof(Deserialize), type, new Type[] { typeof(MessagePackReader).MakeByRefType(), typeof(MessagePackSerializerOptions) });
+ // private static object DeserializeSemiGeneric<T>(ref MessagePackReader reader, MessagePackSerializerOptions options)
+ MethodInfo deserialize = GetMethod(nameof(DeserializeSemiGeneric), type, new Type[] { typeof(MessagePackReader).MakeByRefType(), typeof(MessagePackSerializerOptions) });
#if ENABLE_IL2CPP
this.Deserialize_MessagePackReader_Options = (ref MessagePackReader reader, MessagePackSerializerOptions options) => { ThrowRefStructNotSupported(); return null; };
#else
- ParameterExpression param1 = Expression.Parameter(typeof(MessagePackReader).MakeByRefType(), "reader");
- ParameterExpression param2 = Expression.Parameter(typeof(MessagePackSerializerOptions), "options");
- UnaryExpression body = Expression.Convert(Expression.Call(null, deserialize, param1, param2), typeof(object));
- MessagePackReaderDeserialize lambda = Expression.Lambda<MessagePackReaderDeserialize>(body, param1, param2).Compile();
-
- this.Deserialize_MessagePackReader_Options = lambda;
+ this.Deserialize_MessagePackReader_Options = (MessagePackReaderDeserialize)deserialize.CreateDelegate(typeof(MessagePackReaderDeserialize));
#endif
}
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSerializer.cs b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSerializer.cs
index 973f422f..8c4a454c 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSerializer.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSerializer.cs
@@ -18,8 +18,7 @@ namespace MessagePack
[System.Diagnostics.CodeAnalysis.SuppressMessage("ApiDesign", "RS0026:Do not add multiple public overloads with optional parameters", Justification = "Each overload has sufficiently unique required parameters.")]
public static partial class MessagePackSerializer
{
- private const int LZ4NotCompressionSizeInLz4BlockType = 64;
- private const int MaxHintSize = 1024 * 1024;
+ private static MessagePackSerializerOptions defaultOptions;
/// <summary>
/// Gets or sets the default set of options to use when not explicitly specified for a method call.
@@ -33,7 +32,20 @@ namespace MessagePack
/// If you are an app author, realize that setting this property impacts the entire application so it should only be
/// set once, and before any use of <see cref="MessagePackSerializer"/> occurs.
/// </remarks>
- public static MessagePackSerializerOptions DefaultOptions { get; set; } = MessagePackSerializerOptions.Standard;
+ public static MessagePackSerializerOptions DefaultOptions
+ {
+ get
+ {
+ if (defaultOptions is null)
+ {
+ defaultOptions = MessagePackSerializerOptions.Standard;
+ }
+
+ return defaultOptions;
+ }
+
+ set => defaultOptions = value;
+ }
/// <summary>
/// A thread-local, recyclable array that may be used for short bursts of code.
@@ -79,13 +91,13 @@ namespace MessagePack
{
if (options.Compression.IsCompression() && !PrimitiveChecker<T>.IsMessagePackFixedSizePrimitive)
{
- using (var scratchRental = SequencePool.Shared.Rent())
+ using (var scratchRental = options.SequencePool.Rent())
{
var scratch = scratchRental.Value;
MessagePackWriter scratchWriter = writer.Clone(scratch);
options.Resolver.GetFormatterWithVerify<T>().Serialize(ref scratchWriter, value, options);
scratchWriter.Flush();
- ToLZ4BinaryCore(scratch, ref writer, options.Compression);
+ ToLZ4BinaryCore(scratch, ref writer, options.Compression, options.CompressionMinLength);
}
}
else
@@ -119,7 +131,8 @@ namespace MessagePack
scratchArray = array = new byte[65536];
}
- var msgpackWriter = new MessagePackWriter(SequencePool.Shared, array)
+ options = options ?? DefaultOptions;
+ var msgpackWriter = new MessagePackWriter(options.SequencePool, array)
{
CancellationToken = cancellationToken,
};
@@ -137,8 +150,10 @@ namespace MessagePack
/// <exception cref="MessagePackSerializationException">Thrown when any error occurs during serialization.</exception>
public static void Serialize<T>(Stream stream, T value, MessagePackSerializerOptions options = null, CancellationToken cancellationToken = default)
{
+ options = options ?? DefaultOptions;
cancellationToken.ThrowIfCancellationRequested();
- using (SequencePool.Rental sequenceRental = SequencePool.Shared.Rent())
+
+ using (SequencePool.Rental sequenceRental = options.SequencePool.Rent())
{
Serialize<T>(sequenceRental.Value, value, options, cancellationToken);
@@ -168,8 +183,10 @@ namespace MessagePack
/// <exception cref="MessagePackSerializationException">Thrown when any error occurs during serialization.</exception>
public static async Task SerializeAsync<T>(Stream stream, T value, MessagePackSerializerOptions options = null, CancellationToken cancellationToken = default)
{
+ options = options ?? DefaultOptions;
cancellationToken.ThrowIfCancellationRequested();
- using (SequencePool.Rental sequenceRental = SequencePool.Shared.Rent())
+
+ using (SequencePool.Rental sequenceRental = options.SequencePool.Rent())
{
Serialize<T>(sequenceRental.Value, value, options, cancellationToken);
@@ -222,7 +239,7 @@ namespace MessagePack
{
if (options.Compression.IsCompression())
{
- using (var msgPackUncompressedRental = SequencePool.Shared.Rent())
+ using (var msgPackUncompressedRental = options.SequencePool.Rent())
{
var msgPackUncompressed = msgPackUncompressedRental.Value;
if (TryDecompress(ref reader, msgPackUncompressed))
@@ -315,12 +332,14 @@ namespace MessagePack
/// </remarks>
public static T Deserialize<T>(Stream stream, MessagePackSerializerOptions options = null, CancellationToken cancellationToken = default)
{
+ options = options ?? DefaultOptions;
+
if (TryDeserializeFromMemoryStream(stream, options, cancellationToken, out T result))
{
return result;
}
- using (var sequenceRental = SequencePool.Shared.Rent())
+ using (var sequenceRental = options.SequencePool.Rent())
{
var sequence = sequenceRental.Value;
try
@@ -329,7 +348,7 @@ namespace MessagePack
do
{
cancellationToken.ThrowIfCancellationRequested();
- Span<byte> span = sequence.GetSpan(stream.CanSeek ? (int)Math.Min(MaxHintSize, stream.Length - stream.Position) : 0);
+ Span<byte> span = sequence.GetSpan(stream.CanSeek ? (int)Math.Min(options.SuggestedContiguousMemorySize, stream.Length - stream.Position) : 0);
bytesRead = stream.Read(span);
sequence.Advance(bytesRead);
}
@@ -362,12 +381,14 @@ namespace MessagePack
/// </remarks>
public static async ValueTask<T> DeserializeAsync<T>(Stream stream, MessagePackSerializerOptions options = null, CancellationToken cancellationToken = default)
{
+ options = options ?? DefaultOptions;
+
if (TryDeserializeFromMemoryStream(stream, options, cancellationToken, out T result))
{
return result;
}
- using (var sequenceRental = SequencePool.Shared.Rent())
+ using (var sequenceRental = options.SequencePool.Rent())
{
var sequence = sequenceRental.Value;
try
@@ -375,7 +396,7 @@ namespace MessagePack
int bytesRead;
do
{
- Memory<byte> memory = sequence.GetMemory(stream.CanSeek ? (int)Math.Min(MaxHintSize, stream.Length - stream.Position) : 0);
+ Memory<byte> memory = sequence.GetMemory(stream.CanSeek ? (int)Math.Min(options.SuggestedContiguousMemorySize, stream.Length - stream.Position) : 0);
bytesRead = await stream.ReadAsync(memory, cancellationToken).ConfigureAwait(false);
sequence.Advance(bytesRead);
}
@@ -546,16 +567,16 @@ namespace MessagePack
return false;
}
- private static void ToLZ4BinaryCore(in ReadOnlySequence<byte> msgpackUncompressedData, ref MessagePackWriter writer, MessagePackCompression compression)
+ private static void ToLZ4BinaryCore(in ReadOnlySequence<byte> msgpackUncompressedData, ref MessagePackWriter writer, MessagePackCompression compression, int minCompressionSize)
{
- if (compression == MessagePackCompression.Lz4Block)
+ if (msgpackUncompressedData.Length < minCompressionSize)
{
- if (msgpackUncompressedData.Length < LZ4NotCompressionSizeInLz4BlockType)
- {
- writer.WriteRaw(msgpackUncompressedData);
- return;
- }
+ writer.WriteRaw(msgpackUncompressedData);
+ return;
+ }
+ if (compression == MessagePackCompression.Lz4Block)
+ {
var maxCompressedLength = LZ4Codec.MaximumOutputLength((int)msgpackUncompressedData.Length);
var lz4Span = ArrayPool<byte>.Shared.Rent(maxCompressedLength);
try
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSerializerOptions.cs b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSerializerOptions.cs
index 8eb9835e..a9a9ec51 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSerializerOptions.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSerializerOptions.cs
@@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
+using Nerdbank.Streams;
namespace MessagePack
{
@@ -15,7 +16,7 @@ namespace MessagePack
public class MessagePackSerializerOptions
{
// see:http://msdn.microsoft.com/en-us/library/w3f99sx1.aspx
- internal static readonly Regex AssemblyNameVersionSelectorRegex = new Regex(@", Version=\d+.\d+.\d+.\d+, Culture=[\w-]+, PublicKeyToken=(?:null|[a-f0-9]{16})$", RegexOptions.Compiled);
+ internal static readonly Regex AssemblyNameVersionSelectorRegex = new Regex(@", Version=\d+.\d+.\d+.\d+, Culture=[\w-]+, PublicKeyToken=(?:null|[a-f0-9]{16})", RegexOptions.Compiled);
/// <summary>
/// A collection of known dangerous types that are not expected in a typical MessagePack stream,
@@ -37,7 +38,7 @@ namespace MessagePack
/// <summary>
/// Initializes a new instance of the <see cref="MessagePackSerializerOptions"/> class.
/// </summary>
- protected internal MessagePackSerializerOptions(IFormatterResolver resolver)
+ public MessagePackSerializerOptions(IFormatterResolver resolver)
{
this.Resolver = resolver ?? throw new ArgumentNullException(nameof(resolver));
}
@@ -56,10 +57,13 @@ namespace MessagePack
this.Resolver = copyFrom.Resolver;
this.Compression = copyFrom.Compression;
+ this.CompressionMinLength = copyFrom.CompressionMinLength;
+ this.SuggestedContiguousMemorySize = copyFrom.SuggestedContiguousMemorySize;
this.OldSpec = copyFrom.OldSpec;
this.OmitAssemblyVersion = copyFrom.OmitAssemblyVersion;
this.AllowAssemblyVersionMismatch = copyFrom.AllowAssemblyVersionMismatch;
this.Security = copyFrom.Security;
+ this.SequencePool = copyFrom.SequencePool;
}
/// <summary>
@@ -80,6 +84,26 @@ namespace MessagePack
public MessagePackCompression Compression { get; private set; }
/// <summary>
+ /// Gets the length a serialized msgpack result must equal or exceed before <see cref="Compression"/> is applied.
+ /// </summary>
+ /// <value>The default value is 64.</value>
+ /// <remarks>
+ /// When compression is <em>not</em> applied due to a short serialized result, deserialization will still succeed
+ /// even if <see cref="Compression"/> is set to something other than <see cref="MessagePackCompression.None"/>.
+ /// </remarks>
+ public int CompressionMinLength { get; private set; } = 64;
+
+ /// <summary>
+ /// Gets the size of contiguous memory blocks in bytes that may be allocated for buffering purposes.
+ /// </summary>
+ /// <value>The default value is 1MB.</value>
+ /// <remarks>
+ /// Larger values may perform a bit faster, but may result in adding a runtime perf tax due to using the
+ /// <see href="https://docs.microsoft.com/en-us/dotnet/standard/garbage-collection/large-object-heap">Large Object Heap</see>.
+ /// </remarks>
+ public int SuggestedContiguousMemorySize { get; private set; } = 1024 * 1024;
+
+ /// <summary>
/// Gets a value indicating whether to serialize with <see cref="MessagePackWriter.OldSpec"/> set to some value
/// causing messagepack spec compliance to be explicitly set to the old or new format.
/// </summary>
@@ -114,6 +138,12 @@ namespace MessagePack
public MessagePackSecurity Security { get; private set; } = MessagePackSecurity.TrustedData;
/// <summary>
+ /// Gets a thread-safe pool of reusable <see cref="Sequence{T}"/> objects.
+ /// </summary>
+ /// <value>The default value is the <see cref="SequencePool.Shared"/> instance.</value>
+ public SequencePool SequencePool { get; private set; } = SequencePool.Shared;
+
+ /// <summary>
/// Gets a type given a string representation of the type.
/// </summary>
/// <param name="typeName">The name of the type to load. This is typically the <see cref="Type.AssemblyQualifiedName"/> but may use the assembly's simple name.</param>
@@ -187,6 +217,50 @@ namespace MessagePack
}
/// <summary>
+ /// Gets a copy of these options with the <see cref="CompressionMinLength"/> property set to a new value.
+ /// </summary>
+ /// <param name="compressionMinLength">The new value for the <see cref="CompressionMinLength"/> property. Must be a positive integer.</param>
+ /// <returns>The new instance; or the original if the value is unchanged.</returns>
+ public MessagePackSerializerOptions WithCompressionMinLength(int compressionMinLength)
+ {
+ if (this.CompressionMinLength == compressionMinLength)
+ {
+ return this;
+ }
+
+ if (compressionMinLength <= 0)
+ {
+ throw new ArgumentOutOfRangeException(nameof(compressionMinLength));
+ }
+
+ var result = this.Clone();
+ result.CompressionMinLength = compressionMinLength;
+ return result;
+ }
+
+ /// <summary>
+ /// Gets a copy of these options with the <see cref="SuggestedContiguousMemorySize"/> property set to a new value.
+ /// </summary>
+ /// <param name="suggestedContiguousMemorySize">The new value for the <see cref="SuggestedContiguousMemorySize"/> property. Must be at least 256.</param>
+ /// <returns>The new instance; or the original if the value is unchanged.</returns>
+ public MessagePackSerializerOptions WithSuggestedContiguousMemorySize(int suggestedContiguousMemorySize)
+ {
+ if (this.SuggestedContiguousMemorySize == suggestedContiguousMemorySize)
+ {
+ return this;
+ }
+
+ if (suggestedContiguousMemorySize < 256)
+ {
+ throw new ArgumentOutOfRangeException(nameof(suggestedContiguousMemorySize), "This should be at least 256");
+ }
+
+ var result = this.Clone();
+ result.SuggestedContiguousMemorySize = suggestedContiguousMemorySize;
+ return result;
+ }
+
+ /// <summary>
/// Gets a copy of these options with the <see cref="OldSpec"/> property set to a new value.
/// </summary>
/// <param name="oldSpec">The new value for the <see cref="OldSpec"/>.</param>
@@ -260,6 +334,28 @@ namespace MessagePack
}
/// <summary>
+ /// Gets a copy of these options with the <see cref="SequencePool"/> property set to a new value.
+ /// </summary>
+ /// <param name="pool">The new value for the <see cref="SequencePool"/> property.</param>
+ /// <returns>The new instance.</returns>
+ public MessagePackSerializerOptions WithPool(SequencePool pool)
+ {
+ if (pool is null)
+ {
+ throw new ArgumentNullException(nameof(pool));
+ }
+
+ if (this.SequencePool == pool)
+ {
+ return this;
+ }
+
+ var result = this.Clone();
+ result.SequencePool = pool;
+ return result;
+ }
+
+ /// <summary>
/// Creates a clone of this instance with the same properties set.
/// </summary>
/// <returns>The cloned instance. Guaranteed to be a new instance.</returns>
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackStreamReader.cs b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackStreamReader.cs
index fb439ddc..2c29bc28 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackStreamReader.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackStreamReader.cs
@@ -21,7 +21,7 @@ namespace MessagePack
{
private readonly Stream stream;
private readonly bool leaveOpen;
- private SequencePool.Rental sequenceRental = SequencePool.Shared.Rent();
+ private SequencePool.Rental sequenceRental;
private SequencePosition? endOfLastMessage;
/// <summary>
@@ -39,9 +39,26 @@ namespace MessagePack
/// <param name="stream">The stream to read from.</param>
/// <param name="leaveOpen">If true, leaves the stream open after this <see cref="MessagePackStreamReader"/> is disposed; otherwise, false.</param>
public MessagePackStreamReader(Stream stream, bool leaveOpen)
+ : this(stream, leaveOpen, SequencePool.Shared)
{
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MessagePackStreamReader"/> class.
+ /// </summary>
+ /// <param name="stream">The stream to read from.</param>
+ /// <param name="leaveOpen">If true, leaves the stream open after this <see cref="MessagePackStreamReader"/> is disposed; otherwise, false.</param>
+ /// <param name="sequencePool">The pool to rent a <see cref="Sequence{T}"/> object from.</param>
+ public MessagePackStreamReader(Stream stream, bool leaveOpen, SequencePool sequencePool)
+ {
+ if (sequencePool == null)
+ {
+ throw new ArgumentNullException(nameof(sequencePool));
+ }
+
this.stream = stream ?? throw new ArgumentNullException(nameof(stream));
this.leaveOpen = leaveOpen;
+ this.sequenceRental = sequencePool.Rent();
}
/// <summary>
@@ -107,13 +124,26 @@ namespace MessagePack
/// <inheritdoc/>
public void Dispose()
{
- if (!this.leaveOpen)
+ this.Dispose(true);
+ GC.SuppressFinalize(this);
+ }
+
+ /// <summary>
+ /// Disposes of managed and unmanaged resources.
+ /// </summary>
+ /// <param name="disposing"><see langword="true"/> if this instance is being disposed; <see langword="false"/> if it is being finalized.</param>
+ protected virtual void Dispose(bool disposing)
+ {
+ if (disposing)
{
- this.stream.Dispose();
- }
+ if (!this.leaveOpen)
+ {
+ this.stream.Dispose();
+ }
- this.sequenceRental.Dispose();
- this.sequenceRental = default;
+ this.sequenceRental.Dispose();
+ this.sequenceRental = default;
+ }
}
/// <summary>
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Nil.cs b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Nil.cs
index 9533d24d..04bade76 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Nil.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Nil.cs
@@ -3,6 +3,7 @@
using System;
using System.Buffers;
+using System.Data.Common;
namespace MessagePack
{
@@ -15,6 +16,10 @@ namespace MessagePack
{
public static readonly Nil Default = default(Nil);
+ public static bool operator ==(Nil left, Nil right) => true;
+
+ public static bool operator !=(Nil left, Nil right) => false;
+
public override bool Equals(object obj)
{
return obj is Nil;
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Resolvers/AttributeFormatterResolver.cs b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Resolvers/AttributeFormatterResolver.cs
index 00e5b075..8dde36ff 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Resolvers/AttributeFormatterResolver.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Resolvers/AttributeFormatterResolver.cs
@@ -1,10 +1,10 @@
// Copyright (c) All contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using System;
-using System.Linq; // require UNITY_2018_3_OR_NEWER
+using System.Linq;
using System.Reflection;
using MessagePack.Formatters;
+using MessagePack.Internal;
namespace MessagePack.Resolvers
{
@@ -49,14 +49,7 @@ namespace MessagePack.Resolvers
formatterType = formatterType.MakeGenericType(typeof(T).GetGenericArguments());
}
- if (attr.Arguments == null)
- {
- Formatter = (IMessagePackFormatter<T>)Activator.CreateInstance(formatterType);
- }
- else
- {
- Formatter = (IMessagePackFormatter<T>)Activator.CreateInstance(formatterType, attr.Arguments);
- }
+ Formatter = (IMessagePackFormatter<T>)ResolverUtilities.ActivateFormatter(formatterType, attr.Arguments);
}
}
}
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Resolvers/BuiltinResolver.cs b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Resolvers/BuiltinResolver.cs
index 8d031632..0defd99f 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Resolvers/BuiltinResolver.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Resolvers/BuiltinResolver.cs
@@ -64,9 +64,13 @@ namespace MessagePack.Internal
{ typeof(byte), ByteFormatter.Instance },
{ typeof(sbyte), SByteFormatter.Instance },
{ typeof(DateTime), DateTimeFormatter.Instance },
+#if NET6_0_OR_GREATER
+ { typeof(DateOnly), DateOnlyFormatter.Instance },
+ { typeof(TimeOnly), TimeOnlyFormatter.Instance },
+#endif
{ typeof(char), CharFormatter.Instance },
- // Nulllable Primitive
+ // Nullable Primitive
{ typeof(Int16?), NullableInt16Formatter.Instance },
{ typeof(Int32?), NullableInt32Formatter.Instance },
{ typeof(Int64?), NullableInt64Formatter.Instance },
@@ -151,6 +155,10 @@ namespace MessagePack.Internal
{ typeof(System.Numerics.BigInteger?), new StaticNullableFormatter<System.Numerics.BigInteger>(BigIntegerFormatter.Instance) },
{ typeof(System.Numerics.Complex), ComplexFormatter.Instance },
{ typeof(System.Numerics.Complex?), new StaticNullableFormatter<System.Numerics.Complex>(ComplexFormatter.Instance) },
+
+#if NET5_0_OR_GREATER
+ { typeof(System.Half), HalfFormatter.Instance },
+#endif
};
internal static object GetFormatter(Type t)
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Resolvers/DynamicGenericResolver.cs b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Resolvers/DynamicGenericResolver.cs
index bb555243..787fcc10 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Resolvers/DynamicGenericResolver.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Resolvers/DynamicGenericResolver.cs
@@ -70,6 +70,9 @@ namespace MessagePack.Internal
{ typeof(IReadOnlyList<>), typeof(InterfaceReadOnlyListFormatter<>) },
{ typeof(IReadOnlyCollection<>), typeof(InterfaceReadOnlyCollectionFormatter<>) },
{ typeof(ISet<>), typeof(InterfaceSetFormatter<>) },
+#if NET5_0_OR_GREATER
+ { typeof(IReadOnlySet<>), typeof(InterfaceReadOnlySetFormatter<>) },
+#endif
{ typeof(System.Collections.Concurrent.ConcurrentBag<>), typeof(ConcurrentBagFormatter<>) },
{ typeof(System.Collections.Concurrent.ConcurrentQueue<>), typeof(ConcurrentQueueFormatter<>) },
{ typeof(System.Collections.Concurrent.ConcurrentStack<>), typeof(ConcurrentStackFormatter<>) },
@@ -313,6 +316,30 @@ namespace MessagePack.Internal
return CreateInstance(typeof(GenericDictionaryFormatter<,,>), new[] { keyType, valueType, t });
}
+ // generic dictionary with collection ctor
+ var dictionaryInterfaceDef = ti.ImplementedInterfaces.FirstOrDefault(x => x.GetTypeInfo().IsConstructedGenericType() &&
+ (x.GetGenericTypeDefinition() == typeof(IDictionary<,>) || x.GetGenericTypeDefinition() == typeof(IReadOnlyDictionary<,>)));
+ if (dictionaryInterfaceDef != null)
+ {
+ Type keyType = dictionaryInterfaceDef.GenericTypeArguments[0];
+ Type valueType = dictionaryInterfaceDef.GenericTypeArguments[1];
+ Type[] allowedParameterTypes = new Type[]
+ {
+ typeof(IDictionary<,>).MakeGenericType(keyType, valueType),
+ typeof(IReadOnlyDictionary<,>).MakeGenericType(keyType, valueType),
+ typeof(IEnumerable<>).MakeGenericType(typeof(KeyValuePair<,>).MakeGenericType(keyType, valueType)),
+ };
+ foreach (var constructor in ti.DeclaredConstructors)
+ {
+ ParameterInfo[] parameters = constructor.GetParameters();
+ if (parameters.Length == 1 &&
+ allowedParameterTypes.Any(allowedType => parameters[0].ParameterType.IsAssignableFrom(allowedType)))
+ {
+ return CreateInstance(typeof(GenericReadOnlyDictionaryFormatter<,,>), new[] { keyType, valueType, t });
+ }
+ }
+ }
+
// generic collection
var collectionDef = ti.ImplementedInterfaces.FirstOrDefault(x => x.GetTypeInfo().IsConstructedGenericType() && x.GetGenericTypeDefinition() == typeof(ICollection<>));
if (collectionDef != null && ti.DeclaredConstructors.Any(x => x.GetParameters().Length == 0))
@@ -320,6 +347,23 @@ namespace MessagePack.Internal
Type elemType = collectionDef.GenericTypeArguments[0];
return CreateInstance(typeof(GenericCollectionFormatter<,>), new[] { elemType, t });
}
+
+ // generic IEnumerable collection
+ // looking for combination of IEnumerable<T> and constructor that takes
+ // enumeration of the same type
+ foreach (var enumerableCollectionDef in ti.ImplementedInterfaces.Where(x => x.GetTypeInfo().IsConstructedGenericType() && x.GetGenericTypeDefinition() == typeof(IEnumerable<>)))
+ {
+ Type elemType = enumerableCollectionDef.GenericTypeArguments[0];
+ Type paramInterface = typeof(IEnumerable<>).MakeGenericType(elemType);
+ foreach (var constructor in ti.DeclaredConstructors)
+ {
+ var parameters = constructor.GetParameters();
+ if (parameters.Length == 1 && parameters[0].ParameterType.IsAssignableFrom(paramInterface))
+ {
+ return CreateInstance(typeof(GenericEnumerableFormatter<,>), new[] { elemType, t });
+ }
+ }
+ }
}
return null;
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Resolvers/DynamicObjectResolver.cs b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Resolvers/DynamicObjectResolver.cs
index f285082d..643a6643 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Resolvers/DynamicObjectResolver.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Resolvers/DynamicObjectResolver.cs
@@ -14,6 +14,7 @@ using System.Text.RegularExpressions;
using System.Threading;
using MessagePack.Formatters;
using MessagePack.Internal;
+using MessagePack.Resolvers;
#pragma warning disable SA1403 // File may only contain a single namespace
@@ -94,13 +95,23 @@ namespace MessagePack.Resolvers
return;
}
- TypeInfo formatterTypeInfo = DynamicObjectTypeBuilder.BuildType(DynamicAssembly.Value, typeof(T), false, false);
+ TypeInfo formatterTypeInfo;
+ try
+ {
+ formatterTypeInfo = DynamicObjectTypeBuilder.BuildType(DynamicAssembly.Value, typeof(T), false, false);
+ }
+ catch (InitAccessorInGenericClassNotSupportedException)
+ {
+ Formatter = (IMessagePackFormatter<T>)DynamicObjectTypeBuilder.BuildFormatterToDynamicMethod(typeof(T), false, false, false);
+ return;
+ }
+
if (formatterTypeInfo == null)
{
return;
}
- Formatter = (IMessagePackFormatter<T>)Activator.CreateInstance(formatterTypeInfo.AsType());
+ Formatter = (IMessagePackFormatter<T>)ResolverUtilities.ActivateFormatter(formatterTypeInfo.AsType());
}
}
}
@@ -224,7 +235,7 @@ namespace MessagePack.Resolvers
return;
}
- if (ti.IsAnonymous())
+ if (ti.IsAnonymous() || ti.HasPrivateCtorForSerialization())
{
Formatter = (IMessagePackFormatter<T>)DynamicObjectTypeBuilder.BuildFormatterToDynamicMethod(typeof(T), true, true, false);
return;
@@ -341,7 +352,7 @@ namespace MessagePack.Internal
return null;
}
- var serializationInfo = MessagePack.Internal.ObjectSerializationInfo.CreateOrNull(type, forceStringKey, contractless, false);
+ var serializationInfo = MessagePack.Internal.ObjectSerializationInfo.CreateOrNull(type, forceStringKey, contractless, false, dynamicMethod: false);
if (serializationInfo == null)
{
return null;
@@ -455,7 +466,7 @@ namespace MessagePack.Internal
public static object BuildFormatterToDynamicMethod(Type type, bool forceStringKey, bool contractless, bool allowPrivate)
{
- var serializationInfo = ObjectSerializationInfo.CreateOrNull(type, forceStringKey, contractless, allowPrivate);
+ var serializationInfo = ObjectSerializationInfo.CreateOrNull(type, forceStringKey, contractless, allowPrivate, dynamicMethod: true);
if (serializationInfo == null)
{
return null;
@@ -475,7 +486,7 @@ namespace MessagePack.Internal
var i = 0;
foreach (ObjectSerializationInfo.EmittableMember item in serializationInfo.Members.Where(x => x.IsReadable))
{
- stringByteKeysField.Add(Utilities.GetWriterBytes(item.StringKey, (ref MessagePackWriter writer, string arg) => writer.Write(arg)));
+ stringByteKeysField.Add(Utilities.GetWriterBytes(item.StringKey, (ref MessagePackWriter writer, string arg) => writer.Write(arg), SequencePool.Shared));
i++;
}
}
@@ -485,7 +496,7 @@ namespace MessagePack.Internal
MessagePackFormatterAttribute attr = item.GetMessagePackFormatterAttribute();
if (attr != null)
{
- var formatter = Activator.CreateInstance(attr.FormatterType, attr.Arguments);
+ IMessagePackFormatter formatter = ResolverUtilities.ActivateFormatter(attr.FormatterType, attr.Arguments);
serializeCustomFormatters.Add(formatter);
}
else
@@ -500,7 +511,7 @@ namespace MessagePack.Internal
MessagePackFormatterAttribute attr = item.GetMessagePackFormatterAttribute();
if (attr != null)
{
- var formatter = Activator.CreateInstance(attr.FormatterType, attr.Arguments);
+ IMessagePackFormatter formatter = ResolverUtilities.ActivateFormatter(attr.FormatterType, attr.Arguments);
deserializeCustomFormatters.Add(formatter);
}
else
@@ -611,43 +622,60 @@ namespace MessagePack.Internal
private static Dictionary<ObjectSerializationInfo.EmittableMember, FieldInfo> BuildCustomFormatterField(TypeBuilder builder, ObjectSerializationInfo info, ILGenerator il)
{
Dictionary<ObjectSerializationInfo.EmittableMember, FieldInfo> dict = new Dictionary<ObjectSerializationInfo.EmittableMember, FieldInfo>();
- foreach (ObjectSerializationInfo.EmittableMember item in info.Members.Where(x => x.IsReadable || x.IsWritable))
+ foreach (ObjectSerializationInfo.EmittableMember item in info.Members.Where(x => x.IsReadable || x.IsActuallyWritable))
{
MessagePackFormatterAttribute attr = item.GetMessagePackFormatterAttribute();
if (attr != null)
{
- FieldBuilder f = builder.DefineField(item.Name + "_formatter", attr.FormatterType, FieldAttributes.Private | FieldAttributes.InitOnly);
-
- var bindingFlags = (int)(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
+ // Verify that the specified formatter implements the required interface.
+ // Doing this now provides a more helpful error message than if we let the CLR throw an EntryPointNotFoundException later.
+ if (!attr.FormatterType.GetInterfaces().Any(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IMessagePackFormatter<>) && i.GenericTypeArguments[0].IsEquivalentTo(item.Type)))
+ {
+ throw new MessagePackSerializationException($"{info.Type.FullName}.{item.Name} is declared as type {item.Type.FullName}, but the prescribed {attr.FormatterType.FullName} does not implement IMessagePackFormatter<{item.Type.Name}>.");
+ }
- LocalBuilder attrVar = il.DeclareLocal(typeof(MessagePackFormatterAttribute));
+ FieldBuilder f = builder.DefineField(item.Name + "_formatter", attr.FormatterType, FieldAttributes.Private | FieldAttributes.InitOnly);
- il.Emit(OpCodes.Ldtoken, info.Type);
- il.EmitCall(EmitInfo.GetTypeFromHandle);
- il.Emit(OpCodes.Ldstr, item.Name);
- il.EmitLdc_I4(bindingFlags);
- if (item.IsProperty)
+ // If no args were provided and the formatter implements the singleton pattern, fetch the formatter from the field.
+ if ((attr.Arguments == null || attr.Arguments.Length == 0) && ResolverUtilities.FetchSingletonField(attr.FormatterType) is FieldInfo singletonField)
{
- il.EmitCall(EmitInfo.TypeGetProperty);
+ il.EmitLoadThis();
+ il.EmitLdsfld(singletonField);
}
else
{
- il.EmitCall(EmitInfo.TypeGetField);
- }
+ var bindingFlags = (int)(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
- il.EmitTrue();
- il.EmitCall(EmitInfo.GetCustomAttributeMessagePackFormatterAttribute);
- il.EmitStloc(attrVar);
+ LocalBuilder attrVar = il.DeclareLocal(typeof(MessagePackFormatterAttribute));
- il.EmitLoadThis();
+ il.Emit(OpCodes.Ldtoken, info.Type);
+ il.EmitCall(EmitInfo.GetTypeFromHandle);
+ il.Emit(OpCodes.Ldstr, item.Name);
+ il.EmitLdc_I4(bindingFlags);
+ if (item.IsProperty)
+ {
+ il.EmitCall(EmitInfo.TypeGetProperty);
+ }
+ else
+ {
+ il.EmitCall(EmitInfo.TypeGetField);
+ }
+
+ il.EmitTrue();
+ il.EmitCall(EmitInfo.GetCustomAttributeMessagePackFormatterAttribute);
+ il.EmitStloc(attrVar);
- il.EmitLdloc(attrVar);
- il.EmitCall(EmitInfo.MessagePackFormatterAttr.FormatterType);
- il.EmitLdloc(attrVar);
- il.EmitCall(EmitInfo.MessagePackFormatterAttr.Arguments);
- il.EmitCall(EmitInfo.ActivatorCreateInstance);
+ il.EmitLoadThis();
+
+ il.EmitLdloc(attrVar);
+ il.EmitCall(EmitInfo.MessagePackFormatterAttr.FormatterType);
+ il.EmitLdloc(attrVar);
+ il.EmitCall(EmitInfo.MessagePackFormatterAttr.Arguments);
+ il.EmitCall(EmitInfo.ActivatorCreateInstance);
+
+ il.Emit(OpCodes.Castclass, attr.FormatterType);
+ }
- il.Emit(OpCodes.Castclass, attr.FormatterType);
il.Emit(OpCodes.Stfld, f);
dict.Add(item, f);
@@ -796,7 +824,7 @@ namespace MessagePack.Internal
argOptions.EmitLoad();
il.EmitCall(getSerialize(t));
}
- else if (IsOptimizeTargetType(t))
+ else if (ObjectSerializationInfo.IsOptimizeTargetType(t))
{
if (!t.GetTypeInfo().IsValueType)
{
@@ -851,263 +879,556 @@ namespace MessagePack.Internal
// T Deserialize([arg:1]ref MessagePackReader reader, [arg:2]MessagePackSerializerOptions options);
private static void BuildDeserialize(Type type, ObjectSerializationInfo info, ILGenerator il, Func<int, ObjectSerializationInfo.EmittableMember, Action> tryEmitLoadCustomFormatter, int firstArgIndex)
{
- var reader = new ArgumentField(il, firstArgIndex, @ref: true);
+ var argReader = new ArgumentField(il, firstArgIndex, @ref: true);
var argOptions = new ArgumentField(il, firstArgIndex + 1);
- // if(reader.TryReadNil()) { return null; }
- Label falseLabel = il.DefineLabel();
- reader.EmitLdarg();
- il.EmitCall(MessagePackReaderTypeInfo.TryReadNil);
- il.Emit(OpCodes.Brfalse_S, falseLabel);
- if (type.GetTypeInfo().IsClass)
+ // if (reader.TryReadNil()) { throw / return; }
+ BuildDeserializeInternalTryReadNil(type, il, ref argReader);
+
+ // T ____result;
+ var localResult = il.DeclareLocal(type);
+
+ // where T : new()
+ var canOverwrite = info.ConstructorParameters.Length == 0;
+ if (canOverwrite)
{
- il.Emit(OpCodes.Ldnull);
- il.Emit(OpCodes.Ret);
+ // ____result = new T();
+ BuildDeserializeInternalCreateInstance(type, info, il, localResult);
+ }
+
+ // options.Security.DepthStep(ref reader);
+ BuildDeserializeInternalDepthStep(il, ref argReader, ref argOptions);
+
+ // var length = reader.Read(Map|Array)Header();
+ var localLength = BuildDeserializeInternalReadHeaderLength(info, il, ref argReader);
+
+ // var resolver = options.Resolver;
+ var localResolver = BuildDeserializeInternalResolver(info, il, ref argOptions);
+
+ if (info.IsIntKey)
+ {
+ // switch (key) { ... }
+ BuildDeserializeInternalDeserializeEachPropertyIntKey(info, il, tryEmitLoadCustomFormatter, canOverwrite, ref argReader, ref argOptions, localResolver, localResult, localLength);
}
else
{
- il.Emit(OpCodes.Ldstr, "typecode is null, struct not supported");
- il.Emit(OpCodes.Newobj, messagePackSerializationExceptionMessageOnlyConstructor);
- il.Emit(OpCodes.Throw);
+ // var span = reader.ReadStringSpan();
+ BuildDeserializeInternalDeserializeEachPropertyStringKey(info, il, tryEmitLoadCustomFormatter, canOverwrite, ref argReader, argOptions, localResolver, localResult, localLength);
}
- il.MarkLabel(falseLabel);
+ // ____result.OnAfterDeserialize()
+ BuildDeserializeInternalOnAfterDeserialize(type, info, il, localResult);
- // options.Security.DepthStep(ref reader);
- argOptions.EmitLoad();
- il.EmitCall(getSecurityFromOptions);
- reader.EmitLdarg();
- il.EmitCall(securityDepthStep);
+ // reader.Depth--;
+ BuildDeserializeInternalDepthUnStep(il, ref argReader);
- // var length = ReadMapHeader(ref byteSequence);
- LocalBuilder length = il.DeclareLocal(typeof(int)); // [loc:1]
- reader.EmitLdarg();
+ // return ____result;
+ il.Emit(OpCodes.Ldloc, localResult);
+ il.Emit(OpCodes.Ret);
+ }
- if (info.IsIntKey)
+ private static void BuildDeserializeInternalDeserializeEachPropertyStringKey(ObjectSerializationInfo info, ILGenerator il, Func<int, ObjectSerializationInfo.EmittableMember, Action> tryEmitLoadCustomFormatter, bool canOverwrite, ref ArgumentField argReader, ArgumentField argOptions, LocalBuilder localResolver, LocalBuilder localResult, LocalBuilder localLength)
+ {
+ // Prepare local variables or assignment fields/properties
+ var infoList = BuildDeserializeInternalDeserializationInfoArrayStringKey(info, il, canOverwrite);
+
+ // Read Loop(for var i = 0; i < length; i++)
+ BuildDeserializeInternalDeserializeLoopStringKey(il, tryEmitLoadCustomFormatter, ref argReader, ref argOptions, infoList, localResolver, localResult, localLength, canOverwrite, info);
+
+ if (canOverwrite)
{
- il.EmitCall(MessagePackReaderTypeInfo.ReadArrayHeader);
+ return;
}
- else
+
+ // ____result = new T(...);
+ BuildDeserializeInternalCreateInstanceWithArguments(info, il, infoList, localResult);
+
+ // ... if (__field__IsInitialized) { ____result.field = __field__; } ...
+ BuildDeserializeInternalAssignFieldFromLocalVariableStringKey(info, il, infoList, localResult);
+ }
+
+ private static void BuildDeserializeInternalDeserializeEachPropertyIntKey(ObjectSerializationInfo info, ILGenerator il, Func<int, ObjectSerializationInfo.EmittableMember, Action> tryEmitLoadCustomFormatter, bool canOverwrite, ref ArgumentField argReader, ref ArgumentField argOptions, LocalBuilder localResolver, LocalBuilder localResult, LocalBuilder localLength)
+ {
+ // Prepare local variables or assignment fields/properties
+ var infoList = BuildDeserializeInternalDeserializationInfoArrayIntKey(info, il, canOverwrite, out var gotoDefault, out var maxKey);
+
+ // Read Loop(for var i = 0; i < length; i++)
+ BuildDeserializeInternalDeserializeLoopIntKey(il, tryEmitLoadCustomFormatter, ref argReader, ref argOptions, infoList, localResolver, localResult, localLength, canOverwrite, gotoDefault);
+
+ if (canOverwrite)
{
- il.EmitCall(MessagePackReaderTypeInfo.ReadMapHeader);
+ return;
}
- il.EmitStloc(length);
+ // ____result = new T(...);
+ BuildDeserializeInternalCreateInstanceWithArguments(info, il, infoList, localResult);
- // make local fields
- Label? gotoDefault = null;
- DeserializeInfo[] infoList;
- if (info.IsIntKey)
+ // ... ____result.field = __field__; ...
+ BuildDeserializeInternalAssignFieldFromLocalVariableIntKey(info, il, infoList, localResult, localLength, maxKey);
+ }
+
+ private static void BuildDeserializeInternalAssignFieldFromLocalVariableStringKey(ObjectSerializationInfo info, ILGenerator il, DeserializeInfo[] infoList, LocalBuilder localResult)
+ {
+ foreach (var item in infoList)
{
- var maxKey = info.Members.Select(x => x.IntKey).DefaultIfEmpty(-1).Max();
- var len = maxKey + 1;
- var intKeyMap = info.Members.ToDictionary(x => x.IntKey);
+ if (item.MemberInfo == null || item.IsInitializedLocalVariable == null || item.MemberInfo.IsWrittenByConstructor)
+ {
+ continue;
+ }
- infoList = Enumerable.Range(0, len)
- .Select(x =>
- {
- ObjectSerializationInfo.EmittableMember member;
- if (intKeyMap.TryGetValue(x, out member))
- {
- return new DeserializeInfo
- {
- MemberInfo = member,
- LocalField = il.DeclareLocal(member.Type),
- SwitchLabel = il.DefineLabel(),
- };
- }
- else
- {
- // return null MemberInfo, should filter null
- if (gotoDefault == null)
- {
- gotoDefault = il.DefineLabel();
- }
+ // if (__field__IsInitialized) { ____result.field = __field__; }
+ var skipLabel = il.DefineLabel();
+ il.EmitLdloc(item.IsInitializedLocalVariable);
+ il.Emit(OpCodes.Brfalse_S, skipLabel);
- return new DeserializeInfo
- {
- MemberInfo = null,
- LocalField = null,
- SwitchLabel = gotoDefault.Value,
- };
- }
- })
- .ToArray();
+ if (info.IsClass)
+ {
+ il.EmitLdloc(localResult);
+ }
+ else
+ {
+ il.EmitLdloca(localResult);
+ }
+
+ il.EmitLdloc(item.LocalVariable);
+ item.MemberInfo.EmitStoreValue(il);
+
+ il.MarkLabel(skipLabel);
}
- else
+ }
+
+ private static void BuildDeserializeInternalAssignFieldFromLocalVariableIntKey(ObjectSerializationInfo info, ILGenerator il, DeserializeInfo[] infoList, LocalBuilder localResult, LocalBuilder localLength, int maxKey)
+ {
+ if (maxKey == -1)
{
- infoList = info.Members
- .Select(item => new DeserializeInfo
- {
- MemberInfo = item,
- LocalField = il.DeclareLocal(item.Type),
- //// SwitchLabel = il.DefineLabel()
- })
- .ToArray();
+ return;
}
- // IFormatterResolver resolver = options.Resolver;
- LocalBuilder localResolver = il.DeclareLocal(typeof(IFormatterResolver));
- argOptions.EmitLoad();
- il.EmitCall(getResolverFromOptions);
- il.EmitStloc(localResolver);
+ Label? memberAssignmentDoneLabel = null;
+ var intKeyMap = infoList.Where(x => x.MemberInfo != null && x.MemberInfo.IsActuallyWritable).ToDictionary(x => x.MemberInfo.IntKey);
+ for (var key = 0; key <= maxKey; key++)
+ {
+ if (!intKeyMap.TryGetValue(key, out var item))
+ {
+ continue;
+ }
- // Read Loop(for var i = 0; i < length; i++)
- if (info.IsStringKey)
+ if (item.MemberInfo.IsWrittenByConstructor)
+ {
+ continue;
+ }
+
+ // if (length <= key) { goto MEMBER_ASSIGNMENT_DONE; }
+ il.EmitLdloc(localLength);
+ il.EmitLdc_I4(key);
+ if (memberAssignmentDoneLabel == null)
+ {
+ memberAssignmentDoneLabel = il.DefineLabel();
+ }
+
+ il.Emit(OpCodes.Ble, memberAssignmentDoneLabel.Value);
+
+ // ____result.field = __field__;
+ if (info.IsClass)
+ {
+ il.EmitLdloc(localResult);
+ }
+ else
+ {
+ il.EmitLdloca(localResult);
+ }
+
+ il.EmitLdloc(item.LocalVariable);
+ item.MemberInfo.EmitStoreValue(il);
+ }
+
+ // MEMBER_ASSIGNMENT_DONE:
+ if (memberAssignmentDoneLabel != null)
+ {
+ il.MarkLabel(memberAssignmentDoneLabel.Value);
+ }
+ }
+
+ private static void BuildDeserializeInternalCreateInstanceWithArguments(ObjectSerializationInfo info, ILGenerator il, DeserializeInfo[] infoList, LocalBuilder localResult)
+ {
+ foreach (var item in info.ConstructorParameters)
{
- var automata = new AutomataDictionary();
- for (int i = 0; i < info.Members.Length; i++)
+ var local = infoList.First(x => x.MemberInfo == item.MemberInfo);
+ il.EmitLdloc(local.LocalVariable);
+
+ if (!item.ConstructorParameter.ParameterType.IsValueType && local.MemberInfo.IsValueType)
{
- automata.Add(info.Members[i].StringKey, i);
+ // When a constructor argument of type object is being provided by a serialized member value that is a value type
+ // then that value must be boxed in order for the generated code to be valid (see issue #987). This may occur because
+ // the only requirement when determining whether a member value may be used to populate a constructor argument in an
+ // IsAssignableFrom check and typeof(object) IsAssignableFrom typeof(int), for example.
+ il.Emit(OpCodes.Box, local.MemberInfo.Type);
}
+ }
- LocalBuilder buffer = il.DeclareLocal(typeof(ReadOnlySpan<byte>));
- LocalBuilder longKey = il.DeclareLocal(typeof(ulong));
+ il.Emit(OpCodes.Newobj, info.BestmatchConstructor);
+ il.Emit(OpCodes.Stloc, localResult);
+ }
- // for (int i = 0; i < len; i++)
- il.EmitIncrementFor(length, forILocal =>
+ private static DeserializeInfo[] BuildDeserializeInternalDeserializationInfoArrayStringKey(ObjectSerializationInfo info, ILGenerator il, bool canOverwrite)
+ {
+ var infoList = new DeserializeInfo[info.Members.Length];
+ for (var i = 0; i < infoList.Length; i++)
+ {
+ var item = info.Members[i];
+ if (canOverwrite && item.IsActuallyWritable)
+ {
+ infoList[i] = new DeserializeInfo
+ {
+ MemberInfo = item,
+ };
+ }
+ else
{
- Label readNext = il.DefineLabel();
- Label loopEnd = il.DefineLabel();
+ var isConstructorParameter = info.ConstructorParameters.Any(p => p.MemberInfo.Equals(item));
+ infoList[i] = new DeserializeInfo
+ {
+ MemberInfo = item,
+ LocalVariable = il.DeclareLocal(item.Type),
+ IsInitializedLocalVariable = isConstructorParameter ? default : il.DeclareLocal(typeof(bool)),
+ };
+ }
+ }
- reader.EmitLdarg();
- il.EmitCall(ReadStringSpan);
- il.EmitStloc(buffer);
+ return infoList;
+ }
- // gen automata name lookup
- automata.EmitMatch(
- il,
- buffer,
- longKey,
- x =>
+ private static DeserializeInfo[] BuildDeserializeInternalDeserializationInfoArrayIntKey(ObjectSerializationInfo info, ILGenerator il, bool canOverwrite, out Label? gotoDefault, out int maxKey)
+ {
+ maxKey = info.Members.Select(x => x.IntKey).DefaultIfEmpty(-1).Max();
+ var len = maxKey + 1;
+ var intKeyMap = info.Members.ToDictionary(x => x.IntKey);
+ gotoDefault = null;
+
+ var infoList = new DeserializeInfo[len];
+ for (var i = 0; i < infoList.Length; i++)
+ {
+ if (intKeyMap.TryGetValue(i, out var member))
+ {
+ if (canOverwrite && member.IsActuallyWritable)
+ {
+ infoList[i] = new DeserializeInfo
{
- var i = x.Value;
- if (infoList[i].MemberInfo != null)
- {
- EmitDeserializeValue(il, infoList[i], i, tryEmitLoadCustomFormatter, reader, argOptions, localResolver);
- il.Emit(OpCodes.Br, loopEnd);
- }
- else
- {
- il.Emit(OpCodes.Br, readNext);
- }
- },
- () =>
+ MemberInfo = member,
+ SwitchLabel = il.DefineLabel(),
+ };
+ }
+ else
+ {
+ infoList[i] = new DeserializeInfo
{
- il.Emit(OpCodes.Br, readNext);
- });
-
- il.MarkLabel(readNext);
- reader.EmitLdarg();
- il.EmitCall(MessagePackReaderTypeInfo.Skip);
+ MemberInfo = member,
+ LocalVariable = il.DeclareLocal(member.Type),
+ SwitchLabel = il.DefineLabel(),
+ };
+ }
+ }
+ else
+ {
+ // return null MemberInfo, should filter null
+ if (gotoDefault == null)
+ {
+ gotoDefault = il.DefineLabel();
+ }
- il.MarkLabel(loopEnd);
- });
+ infoList[i] = new DeserializeInfo
+ {
+ SwitchLabel = gotoDefault.Value,
+ };
+ }
}
- else
+
+ return infoList;
+ }
+
+ private static void BuildDeserializeInternalDeserializeLoopIntKey(ILGenerator il, Func<int, ObjectSerializationInfo.EmittableMember, Action> tryEmitLoadCustomFormatter, ref ArgumentField argReader, ref ArgumentField argOptions, DeserializeInfo[] infoList, LocalBuilder localResolver, LocalBuilder localResult, LocalBuilder localLength, bool canOverwrite, Label? gotoDefault)
+ {
+ var key = il.DeclareLocal(typeof(int));
+ var switchDefault = il.DefineLabel();
+ var reader = argReader;
+ var options = argOptions;
+
+ void ForBody(LocalBuilder forILocal)
{
- LocalBuilder key = il.DeclareLocal(typeof(int));
- Label switchDefault = il.DefineLabel();
+ var loopEnd = il.DefineLabel();
- il.EmitIncrementFor(length, forILocal =>
- {
- Label loopEnd = il.DefineLabel();
+ il.EmitLdloc(forILocal);
+ il.EmitStloc(key);
- il.EmitLdloc(forILocal);
- il.EmitStloc(key);
+ // switch... local = Deserialize
+ il.EmitLdloc(key);
- // switch... local = Deserialize
- il.EmitLdloc(key);
+ il.Emit(OpCodes.Switch, infoList.Select(x => x.SwitchLabel).ToArray());
- il.Emit(OpCodes.Switch, infoList.Select(x => x.SwitchLabel).ToArray());
+ il.MarkLabel(switchDefault);
- il.MarkLabel(switchDefault);
+ // default, only read. reader.ReadNextBlock();
+ reader.EmitLdarg();
+ il.EmitCall(MessagePackReaderTypeInfo.Skip);
+ il.Emit(OpCodes.Br, loopEnd);
- // default, only read. reader.ReadNextBlock();
- reader.EmitLdarg();
- il.EmitCall(MessagePackReaderTypeInfo.Skip);
- il.Emit(OpCodes.Br, loopEnd);
+ if (gotoDefault != null)
+ {
+ il.MarkLabel(gotoDefault.Value);
+ il.Emit(OpCodes.Br, switchDefault);
+ }
- if (gotoDefault != null)
+ var i = 0;
+ foreach (var item in infoList)
+ {
+ if (item.MemberInfo == null)
{
- il.MarkLabel(gotoDefault.Value);
- il.Emit(OpCodes.Br, switchDefault);
+ continue;
}
- var i = 0;
- foreach (DeserializeInfo item in infoList)
+ il.MarkLabel(item.SwitchLabel);
+ if (canOverwrite)
{
- if (item.MemberInfo != null)
- {
- il.MarkLabel(item.SwitchLabel);
- EmitDeserializeValue(il, item, i++, tryEmitLoadCustomFormatter, reader, argOptions, localResolver);
- il.Emit(OpCodes.Br, loopEnd);
- }
+ BuildDeserializeInternalDeserializeValueAssignDirectly(il, item, i++, tryEmitLoadCustomFormatter, ref reader, ref options, localResolver, localResult);
+ }
+ else
+ {
+ BuildDeserializeInternalDeserializeValueAssignLocalVariable(il, item, i++, tryEmitLoadCustomFormatter, ref reader, ref options, localResolver, localResult);
}
- il.MarkLabel(loopEnd);
- });
+ il.Emit(OpCodes.Br, loopEnd);
+ }
+
+ il.MarkLabel(loopEnd);
}
- // create result object
- LocalBuilder structLocal = EmitNewObject(il, type, info, infoList);
+ il.EmitIncrementFor(localLength, ForBody);
+ }
- // IMessagePackSerializationCallbackReceiver.OnAfterDeserialize()
- if (type.GetTypeInfo().ImplementedInterfaces.Any(x => x == typeof(IMessagePackSerializationCallbackReceiver)))
+ private static void BuildDeserializeInternalDeserializeLoopStringKey(ILGenerator il, Func<int, ObjectSerializationInfo.EmittableMember, Action> tryEmitLoadCustomFormatter, ref ArgumentField argReader, ref ArgumentField argOptions, DeserializeInfo[] infoList, LocalBuilder localResolver, LocalBuilder localResult, LocalBuilder localLength, bool canOverwrite, ObjectSerializationInfo info)
+ {
+ var automata = new AutomataDictionary();
+ for (var i = 0; i < info.Members.Length; i++)
{
- // call directly
- MethodInfo[] runtimeMethods = type.GetRuntimeMethods().Where(x => x.Name == "OnAfterDeserialize").ToArray();
- if (runtimeMethods.Length == 1)
+ automata.Add(info.Members[i].StringKey, i);
+ }
+
+ var buffer = il.DeclareLocal(typeof(ReadOnlySpan<byte>));
+ var longKey = il.DeclareLocal(typeof(ulong));
+ var reader = argReader;
+ var options = argOptions;
+
+ // for (int i = 0; i < len; i++)
+ void ForBody(LocalBuilder forILocal)
+ {
+ var readNext = il.DefineLabel();
+ var loopEnd = il.DefineLabel();
+
+ reader.EmitLdarg();
+ il.EmitCall(ReadStringSpan);
+ il.EmitStloc(buffer);
+
+ // gen automata name lookup
+ void OnFoundAssignDirect(KeyValuePair<string, int> x)
{
- if (info.IsClass)
+ var i = x.Value;
+ var item = infoList[i];
+ if (item.MemberInfo != null)
{
- il.Emit(OpCodes.Dup);
+ BuildDeserializeInternalDeserializeValueAssignDirectly(il, item, i, tryEmitLoadCustomFormatter, ref reader, ref options, localResolver, localResult);
+ il.Emit(OpCodes.Br, loopEnd);
}
else
{
- il.EmitLdloca(structLocal);
+ il.Emit(OpCodes.Br, readNext);
}
-
- il.Emit(OpCodes.Call, runtimeMethods[0]); // don't use EmitCall helper(must use 'Call')
}
- else
+
+ void OnFoundAssignLocalVariable(KeyValuePair<string, int> x)
{
- if (info.IsStruct)
+ var i = x.Value;
+ var item = infoList[i];
+ if (item.MemberInfo != null)
{
- il.EmitLdloc(structLocal);
- il.Emit(OpCodes.Box, type);
+ BuildDeserializeInternalDeserializeValueAssignLocalVariable(il, item, i, tryEmitLoadCustomFormatter, ref reader, ref options, localResolver, localResult);
+ il.Emit(OpCodes.Br, loopEnd);
}
else
{
- il.Emit(OpCodes.Dup);
+ il.Emit(OpCodes.Br, readNext);
}
+ }
+
+ void OnNotFound()
+ {
+ il.Emit(OpCodes.Br, readNext);
+ }
- il.EmitCall(onAfterDeserialize);
+#if NET_STANDARD_2_0
+ throw new NotImplementedException("NET_STANDARD_2_0 directive was used");
+#else
+ if (canOverwrite)
+ {
+ automata.EmitMatch(il, buffer, longKey, OnFoundAssignDirect, OnNotFound);
+ }
+ else
+ {
+ automata.EmitMatch(il, buffer, longKey, OnFoundAssignLocalVariable, OnNotFound);
}
+#endif
+
+ il.MarkLabel(readNext);
+ reader.EmitLdarg();
+ il.EmitCall(MessagePackReaderTypeInfo.Skip);
+
+ il.MarkLabel(loopEnd);
}
- // reader.Depth--;
- reader.EmitLdarg();
+ il.EmitIncrementFor(localLength, ForBody);
+ }
+
+ private static void BuildDeserializeInternalTryReadNil(Type type, ILGenerator il, ref ArgumentField argReader)
+ {
+ // if(reader.TryReadNil()) { return null; }
+ var falseLabel = il.DefineLabel();
+ argReader.EmitLdarg();
+ il.EmitCall(MessagePackReaderTypeInfo.TryReadNil);
+ il.Emit(OpCodes.Brfalse_S, falseLabel);
+ if (type.GetTypeInfo().IsClass)
+ {
+ il.Emit(OpCodes.Ldnull);
+ il.Emit(OpCodes.Ret);
+ }
+ else
+ {
+ il.Emit(OpCodes.Ldstr, "typecode is null, struct not supported");
+ il.Emit(OpCodes.Newobj, messagePackSerializationExceptionMessageOnlyConstructor);
+ il.Emit(OpCodes.Throw);
+ }
+
+ il.MarkLabel(falseLabel);
+ }
+
+ private static void BuildDeserializeInternalDepthUnStep(ILGenerator il, ref ArgumentField argReader)
+ {
+ argReader.EmitLdarg();
il.Emit(OpCodes.Dup);
il.EmitCall(readerDepthGet);
il.Emit(OpCodes.Ldc_I4_1);
il.Emit(OpCodes.Sub_Ovf);
il.EmitCall(readerDepthSet);
+ }
+
+ private static void BuildDeserializeInternalOnAfterDeserialize(Type type, ObjectSerializationInfo info, ILGenerator il, LocalBuilder localResult)
+ {
+ if (type.GetTypeInfo().ImplementedInterfaces.All(x => x != typeof(IMessagePackSerializationCallbackReceiver)))
+ {
+ return;
+ }
- if (info.IsStruct)
+ if (info.IsClass)
{
- il.Emit(OpCodes.Ldloc, structLocal);
+ il.EmitLdloc(localResult);
}
- il.Emit(OpCodes.Ret);
+ // call directly
+ var runtimeMethod = type.GetRuntimeMethods().SingleOrDefault(x => x.Name == "OnAfterDeserialize");
+ if (runtimeMethod != null)
+ {
+ if (info.IsStruct)
+ {
+ il.EmitLdloca(localResult);
+ }
+
+ il.Emit(OpCodes.Call, runtimeMethod); // don't use EmitCall helper(must use 'Call')
+ }
+ else
+ {
+ if (info.IsStruct)
+ {
+ il.EmitLdloc(localResult);
+ il.Emit(OpCodes.Box, type);
+ }
+
+ il.EmitCall(onAfterDeserialize);
+ }
}
- private static void EmitDeserializeValue(ILGenerator il, DeserializeInfo info, int index, Func<int, ObjectSerializationInfo.EmittableMember, Action> tryEmitLoadCustomFormatter, ArgumentField argReader, ArgumentField argOptions, LocalBuilder localResolver)
+ private static LocalBuilder BuildDeserializeInternalResolver(ObjectSerializationInfo info, ILGenerator il, ref ArgumentField argOptions)
{
- Label storeLabel = il.DefineLabel();
- ObjectSerializationInfo.EmittableMember member = info.MemberInfo;
- Type t = member.Type;
- Action emitter = tryEmitLoadCustomFormatter(index, member);
+ if (!info.ShouldUseFormatterResolver)
+ {
+ return default;
+ }
+
+ // IFormatterResolver resolver = options.Resolver;
+ var localResolver = il.DeclareLocal(typeof(IFormatterResolver));
+ argOptions.EmitLoad();
+ il.EmitCall(getResolverFromOptions);
+ il.EmitStloc(localResolver);
+ return localResolver;
+ }
+
+ private static LocalBuilder BuildDeserializeInternalReadHeaderLength(ObjectSerializationInfo info, ILGenerator il, ref ArgumentField argReader)
+ {
+ // var length = ReadMapHeader(ref byteSequence);
+ var length = il.DeclareLocal(typeof(int)); // [loc:1]
+ argReader.EmitLdarg();
+
+ il.EmitCall(info.IsIntKey ? MessagePackReaderTypeInfo.ReadArrayHeader : MessagePackReaderTypeInfo.ReadMapHeader);
+
+ il.EmitStloc(length);
+ return length;
+ }
+
+ private static void BuildDeserializeInternalDepthStep(ILGenerator il, ref ArgumentField argReader, ref ArgumentField argOptions)
+ {
+ argOptions.EmitLoad();
+ il.EmitCall(getSecurityFromOptions);
+ argReader.EmitLdarg();
+ il.EmitCall(securityDepthStep);
+ }
+
+ // where T : new();
+ private static void BuildDeserializeInternalCreateInstance(Type type, ObjectSerializationInfo info, ILGenerator il, LocalBuilder localResult)
+ {
+ // var result = new T();
+ if (info.IsClass)
+ {
+ il.Emit(OpCodes.Newobj, info.BestmatchConstructor);
+ il.EmitStloc(localResult);
+ }
+ else
+ {
+ il.Emit(OpCodes.Ldloca, localResult);
+ il.Emit(OpCodes.Initobj, type);
+ }
+ }
+
+ private static void BuildDeserializeInternalDeserializeValueAssignDirectly(ILGenerator il, DeserializeInfo info, int index, Func<int, ObjectSerializationInfo.EmittableMember, Action> tryEmitLoadCustomFormatter, ref ArgumentField argReader, ref ArgumentField argOptions, LocalBuilder localResolver, LocalBuilder localResult)
+ {
+ var storeLabel = il.DefineLabel();
+ var member = info.MemberInfo;
+ var t = member.Type;
+ var emitter = tryEmitLoadCustomFormatter(index, member);
+
+ if (member.IsActuallyWritable)
+ {
+ if (localResult.LocalType.IsClass)
+ {
+ il.EmitLdloc(localResult);
+ }
+ else
+ {
+ il.EmitLdloca(localResult);
+ }
+ }
+ else if (info.IsInitializedLocalVariable != null)
+ {
+ il.EmitLdc_I4(1);
+ il.EmitStloc(info.IsInitializedLocalVariable);
+ }
+
if (emitter != null)
{
emitter();
@@ -1115,13 +1436,13 @@ namespace MessagePack.Internal
argOptions.EmitLoad();
il.EmitCall(getDeserialize(t));
}
- else if (IsOptimizeTargetType(t))
+ else if (ObjectSerializationInfo.IsOptimizeTargetType(t))
{
if (!t.GetTypeInfo().IsValueType)
{
// As a nullable type (e.g. byte[] and string) we need to first call TryReadNil
// if (reader.TryReadNil())
- Label readNonNilValueLabel = il.DefineLabel();
+ var readNonNilValueLabel = il.DefineLabel();
argReader.EmitLdarg();
il.EmitCall(MessagePackReaderTypeInfo.TryReadNil);
il.Emit(OpCodes.Brfalse_S, readNonNilValueLabel);
@@ -1134,7 +1455,7 @@ namespace MessagePack.Internal
argReader.EmitLdarg();
if (t == typeof(byte[]))
{
- LocalBuilder local = il.DeclareLocal(typeof(ReadOnlySequence<byte>?));
+ var local = il.DeclareLocal(typeof(ReadOnlySequence<byte>?));
il.EmitCall(MessagePackReaderTypeInfo.ReadBytes);
il.EmitStloc(local);
il.EmitLdloca(local);
@@ -1155,94 +1476,77 @@ namespace MessagePack.Internal
}
il.MarkLabel(storeLabel);
- il.EmitStloc(info.LocalField);
+ if (member.IsActuallyWritable)
+ {
+ member.EmitStoreValue(il);
+ }
+ else
+ {
+ il.Emit(OpCodes.Pop);
+ }
}
- private static LocalBuilder EmitNewObject(ILGenerator il, Type type, ObjectSerializationInfo info, DeserializeInfo[] members)
+ private static void BuildDeserializeInternalDeserializeValueAssignLocalVariable(ILGenerator il, DeserializeInfo info, int index, Func<int, ObjectSerializationInfo.EmittableMember, Action> tryEmitLoadCustomFormatter, ref ArgumentField argReader, ref ArgumentField argOptions, LocalBuilder localResolver, LocalBuilder localResult)
{
- if (info.IsClass)
- {
- EmitNewObjectConstructorArguments(il, info, members);
-
- il.Emit(OpCodes.Newobj, info.BestmatchConstructor);
+ var storeLabel = il.DefineLabel();
+ var member = info.MemberInfo;
+ var t = member.Type;
+ var emitter = tryEmitLoadCustomFormatter(index, member);
- foreach (DeserializeInfo item in members.Where(x => x.MemberInfo != null && x.MemberInfo.IsWritable))
- {
- il.Emit(OpCodes.Dup);
- il.EmitLdloc(item.LocalField);
- item.MemberInfo.EmitStoreValue(il);
- }
+ if (info.IsInitializedLocalVariable != null)
+ {
+ il.EmitLdc_I4(1);
+ il.EmitStloc(info.IsInitializedLocalVariable);
+ }
- return null;
+ if (emitter != null)
+ {
+ emitter();
+ argReader.EmitLdarg();
+ argOptions.EmitLoad();
+ il.EmitCall(getDeserialize(t));
}
- else
+ else if (ObjectSerializationInfo.IsOptimizeTargetType(t))
{
- LocalBuilder result = il.DeclareLocal(type);
- if (info.BestmatchConstructor == null)
- {
- il.Emit(OpCodes.Ldloca, result);
- il.Emit(OpCodes.Initobj, type);
- }
- else
+ if (!t.GetTypeInfo().IsValueType)
{
- EmitNewObjectConstructorArguments(il, info, members);
+ // As a nullable type (e.g. byte[] and string) we need to first call TryReadNil
+ // if (reader.TryReadNil())
+ var readNonNilValueLabel = il.DefineLabel();
+ argReader.EmitLdarg();
+ il.EmitCall(MessagePackReaderTypeInfo.TryReadNil);
+ il.Emit(OpCodes.Brfalse_S, readNonNilValueLabel);
+ il.Emit(OpCodes.Ldnull);
+ il.Emit(OpCodes.Br, storeLabel);
- il.Emit(OpCodes.Newobj, info.BestmatchConstructor);
- il.Emit(OpCodes.Stloc, result);
+ il.MarkLabel(readNonNilValueLabel);
}
- foreach (DeserializeInfo item in members.Where(x => x.MemberInfo != null && x.MemberInfo.IsWritable))
+ argReader.EmitLdarg();
+ if (t == typeof(byte[]))
{
- il.EmitLdloca(result);
- il.EmitLdloc(item.LocalField);
- item.MemberInfo.EmitStoreValue(il);
+ var local = il.DeclareLocal(typeof(ReadOnlySequence<byte>?));
+ il.EmitCall(MessagePackReaderTypeInfo.ReadBytes);
+ il.EmitStloc(local);
+ il.EmitLdloca(local);
+ il.EmitCall(ArrayFromNullableReadOnlySequence);
}
-
- return result; // struct returns local result field
- }
- }
-
- private static void EmitNewObjectConstructorArguments(ILGenerator il, ObjectSerializationInfo info, DeserializeInfo[] members)
- {
- foreach (ObjectSerializationInfo.EmittableMemberAndConstructorParameter item in info.ConstructorParameters)
- {
- DeserializeInfo local = members.First(x => x.MemberInfo == item.MemberInfo);
- il.EmitLdloc(local.LocalField);
-
- if (!item.ConstructorParameter.ParameterType.IsValueType && local.MemberInfo.IsValueType)
+ else
{
- // When a constructor argument of type object is being provided by a serialized member value that is a value type
- // then that value must be boxed in order for the generated code to be valid (see issue #987). This may occur because
- // the only requirement when determining whether a member value may be used to populate a constructor argument in an
- // IsAssignableFrom check and typeof(object) IsAssignableFrom typeof(int), for example.
- il.Emit(OpCodes.Box, local.MemberInfo.Type);
+ il.EmitCall(MessagePackReaderTypeInfo.TypeInfo.GetDeclaredMethods("Read" + t.Name).First(x => x.GetParameters().Length == 0));
}
}
- }
+ else
+ {
+ il.EmitLdloc(localResolver);
+ il.EmitCall(getFormatterWithVerify.MakeGenericMethod(t));
+ argReader.EmitLdarg();
+ argOptions.EmitLoad();
+ il.EmitCall(getDeserialize(t));
+ }
- /// <devremarks>
- /// Keep this list in sync with ShouldUseFormatterResolverHelper.PrimitiveTypes.
- /// </devremarks>
- private static bool IsOptimizeTargetType(Type type)
- {
- return type == typeof(Int16)
- || type == typeof(Int32)
- || type == typeof(Int64)
- || type == typeof(UInt16)
- || type == typeof(UInt32)
- || type == typeof(UInt64)
- || type == typeof(Single)
- || type == typeof(Double)
- || type == typeof(bool)
- || type == typeof(byte)
- || type == typeof(sbyte)
- || type == typeof(char)
- || type == typeof(byte[])
-
- // Do not include types that resolvers are allowed to modify.
- ////|| type == typeof(DateTime) // OldSpec has no support, so for that and perf reasons a .NET native DateTime resolver exists.
- ////|| type == typeof(string) // https://github.com/Cysharp/MasterMemory provides custom formatter for string interning.
- ;
+ il.MarkLabel(storeLabel);
+ il.EmitStloc(info.LocalVariable);
}
#pragma warning disable SA1311 // Static readonly fields should begin with upper-case letter
@@ -1336,7 +1640,9 @@ namespace MessagePack.Internal
{
public ObjectSerializationInfo.EmittableMember MemberInfo { get; set; }
- public LocalBuilder LocalField { get; set; }
+ public LocalBuilder LocalVariable { get; set; }
+
+ public LocalBuilder IsInitializedLocalVariable { get; set; }
public Label SwitchLabel { get; set; }
}
@@ -1402,6 +1708,8 @@ namespace MessagePack.Internal
get { return !this.IsClass; }
}
+ public bool ShouldUseFormatterResolver { get; private set; }
+
public ConstructorInfo BestmatchConstructor { get; set; }
public EmittableMemberAndConstructorParameter[] ConstructorParameters { get; set; }
@@ -1412,10 +1720,11 @@ namespace MessagePack.Internal
{
}
- public static ObjectSerializationInfo CreateOrNull(Type type, bool forceStringKey, bool contractless, bool allowPrivate)
+ public static ObjectSerializationInfo CreateOrNull(Type type, bool forceStringKey, bool contractless, bool allowPrivate, bool dynamicMethod)
{
TypeInfo ti = type.GetTypeInfo();
var isClass = ti.IsClass || ti.IsInterface || ti.IsAbstract;
+ var isClassRecord = isClass && IsClassRecord(ti);
var isStruct = ti.IsValueType;
MessagePackObjectAttribute contractAttr = ti.GetCustomAttributes<MessagePackObjectAttribute>().FirstOrDefault();
@@ -1429,336 +1738,189 @@ namespace MessagePack.Internal
var intMembers = new Dictionary<int, EmittableMember>();
var stringMembers = new Dictionary<string, EmittableMember>();
- if (forceStringKey || contractless || (contractAttr != null && contractAttr.KeyAsPropertyName))
+ // When returning false, it means should ignoring this member.
+ bool AddEmittableMemberOrIgnore(bool isIntKeyMode, EmittableMember member, bool checkConflicting)
{
- // All public members are serialize target except [Ignore] member.
- isIntKey = !(forceStringKey || (contractAttr != null && contractAttr.KeyAsPropertyName));
-
- var hiddenIntKey = 0;
-
- // Group the properties and fields by name to qualify members of the same name
- // (declared with the 'new' keyword) with the declaring type.
- IEnumerable<IGrouping<string, MemberInfo>> membersByName = type.GetRuntimeProperties()
- .Concat(type.GetRuntimeFields().Cast<MemberInfo>())
- .OrderBy(m => m.DeclaringType, OrderBaseTypesBeforeDerivedTypes.Instance)
- .GroupBy(m => m.Name);
- foreach (var memberGroup in membersByName)
+ if (checkConflicting)
{
- bool firstMemberByName = true;
- foreach (MemberInfo item in memberGroup)
+ if (isIntKeyMode ? intMembers.TryGetValue(member.IntKey, out var conflictingMember) : stringMembers.TryGetValue(member.StringKey, out conflictingMember))
{
- if (item.GetCustomAttribute<IgnoreMemberAttribute>(true) != null)
+ // Quietly skip duplicate if this is an override property.
+ if (member.PropertyInfo != null && ((conflictingMember.PropertyInfo.SetMethod?.IsVirtual ?? false) || (conflictingMember.PropertyInfo.GetMethod?.IsVirtual ?? false)))
{
- continue;
+ return false;
}
- if (item.GetCustomAttribute<IgnoreDataMemberAttribute>(true) != null)
- {
- continue;
- }
-
- EmittableMember member;
- if (item is PropertyInfo property)
- {
- if (property.IsIndexer())
- {
- continue;
- }
+ var memberInfo = (MemberInfo)member.PropertyInfo ?? member.FieldInfo;
+ throw new MessagePackDynamicObjectResolverException($"key is duplicated, all members key must be unique. type:{type.FullName} member:{memberInfo.Name}");
+ }
+ }
- MethodInfo getMethod = property.GetGetMethod(true);
- MethodInfo setMethod = property.GetSetMethod(true);
+ if (isIntKeyMode)
+ {
+ intMembers.Add(member.IntKey, member);
+ }
+ else
+ {
+ stringMembers.Add(member.StringKey, member);
+ }
- member = new EmittableMember
- {
- PropertyInfo = property,
- IsReadable = (getMethod != null) && (allowPrivate || getMethod.IsPublic) && !getMethod.IsStatic,
- IsWritable = (setMethod != null) && (allowPrivate || setMethod.IsPublic) && !setMethod.IsStatic,
- StringKey = firstMemberByName ? item.Name : $"{item.DeclaringType.FullName}.{item.Name}",
- };
- }
- else if (item is FieldInfo field)
- {
- if (item.GetCustomAttribute<System.Runtime.CompilerServices.CompilerGeneratedAttribute>(true) != null)
- {
- continue;
- }
+ return true;
+ }
- if (field.IsStatic)
- {
- continue;
- }
+ EmittableMember CreateEmittableMember(MemberInfo m)
+ {
+ if (m.IsDefined(typeof(IgnoreMemberAttribute), true) || m.IsDefined(typeof(IgnoreDataMemberAttribute), true))
+ {
+ return null;
+ }
- member = new EmittableMember
- {
- FieldInfo = field,
- IsReadable = allowPrivate || field.IsPublic,
- IsWritable = allowPrivate || (field.IsPublic && !field.IsInitOnly),
- StringKey = firstMemberByName ? item.Name : $"{item.DeclaringType.FullName}.{item.Name}",
- };
- }
- else
+ EmittableMember result;
+ switch (m)
+ {
+ case PropertyInfo property:
+ if (property.IsIndexer())
{
- throw new MessagePackSerializationException("unexpected member type");
+ return null;
}
- if (!member.IsReadable && !member.IsWritable)
+ if (isClassRecord && property.Name == "EqualityContract")
{
- continue;
+ return null;
}
- member.IntKey = hiddenIntKey++;
- if (isIntKey)
+ var getMethod = property.GetGetMethod(true);
+ var setMethod = property.GetSetMethod(true);
+ result = new EmittableMember(dynamicMethod)
+ {
+ PropertyInfo = property,
+ IsReadable = (getMethod != null) && (allowPrivate || getMethod.IsPublic) && !getMethod.IsStatic,
+ IsWritable = (setMethod != null) && (allowPrivate || setMethod.IsPublic) && !setMethod.IsStatic,
+ };
+ break;
+ case FieldInfo field:
+ if (field.GetCustomAttribute<System.Runtime.CompilerServices.CompilerGeneratedAttribute>(true) != null)
{
- intMembers.Add(member.IntKey, member);
+ return null;
}
- else
+
+ if (field.IsStatic)
{
- stringMembers.Add(member.StringKey, member);
+ return null;
}
- firstMemberByName = false;
- }
+ result = new EmittableMember(dynamicMethod)
+ {
+ FieldInfo = field,
+ IsReadable = allowPrivate || field.IsPublic,
+ IsWritable = allowPrivate || (field.IsPublic && !field.IsInitOnly),
+ };
+ break;
+ default:
+ throw new MessagePackSerializationException("unexpected member type");
}
+
+ return result.IsReadable || result.IsWritable ? result : null;
}
- else
+
+ // Determine whether to ignore MessagePackObjectAttribute or DataContract.
+ if (forceStringKey || contractless || (contractAttr?.KeyAsPropertyName == true))
{
- // Public members with KeyAttribute except [Ignore] member.
- var searchFirst = true;
+ // All public members are serialize target except [Ignore] member.
+ isIntKey = !(forceStringKey || (contractAttr != null && contractAttr.KeyAsPropertyName));
var hiddenIntKey = 0;
- foreach (PropertyInfo item in GetAllProperties(type))
+ // Group the properties and fields by name to qualify members of the same name
+ // (declared with the 'new' keyword) with the declaring type.
+ var membersByName = type.GetRuntimeProperties().Concat(type.GetRuntimeFields().Cast<MemberInfo>())
+ .OrderBy(m => m.DeclaringType, OrderBaseTypesBeforeDerivedTypes.Instance)
+ .GroupBy(m => m.Name);
+ foreach (var memberGroup in membersByName)
{
- if (item.GetCustomAttribute<IgnoreMemberAttribute>(true) != null)
- {
- continue;
- }
-
- if (item.GetCustomAttribute<IgnoreDataMemberAttribute>(true) != null)
- {
- continue;
- }
-
- if (item.IsIndexer())
- {
- continue;
- }
-
- MethodInfo getMethod = item.GetGetMethod(true);
- MethodInfo setMethod = item.GetSetMethod(true);
-
- var member = new EmittableMember
+ var first = true;
+ foreach (var member in memberGroup.Select(CreateEmittableMember).Where(n => n != null))
{
- PropertyInfo = item,
- IsReadable = (getMethod != null) && (allowPrivate || getMethod.IsPublic) && !getMethod.IsStatic,
- IsWritable = (setMethod != null) && (allowPrivate || setMethod.IsPublic) && !setMethod.IsStatic,
- };
- if (!member.IsReadable && !member.IsWritable)
- {
- continue;
- }
-
- KeyAttribute key;
- if (contractAttr != null)
- {
- // MessagePackObjectAttribute
- key = item.GetCustomAttribute<KeyAttribute>(true);
- if (key == null)
+ var memberInfo = (MemberInfo)member.PropertyInfo ?? member.FieldInfo;
+ if (first)
{
- throw new MessagePackDynamicObjectResolverException("all public members must mark KeyAttribute or IgnoreMemberAttribute." + " type: " + type.FullName + " member:" + item.Name);
- }
-
- member.IsExplicitContract = true;
- if (key.IntKey == null && key.StringKey == null)
- {
- throw new MessagePackDynamicObjectResolverException("both IntKey and StringKey are null." + " type: " + type.FullName + " member:" + item.Name);
- }
- }
- else
- {
- // DataContractAttribute
- DataMemberAttribute pseudokey = item.GetCustomAttribute<DataMemberAttribute>(true);
- if (pseudokey == null)
- {
- // This member has no DataMemberAttribute nor IgnoreMemberAttribute.
- // But the type *did* have a DataContractAttribute on it, so no attribute implies the member should not be serialized.
- continue;
- }
-
- member.IsExplicitContract = true;
-
- // use Order first
- if (pseudokey.Order != -1)
- {
- key = new KeyAttribute(pseudokey.Order);
- }
- else if (pseudokey.Name != null)
- {
- key = new KeyAttribute(pseudokey.Name);
+ first = false;
+ member.StringKey = memberInfo.Name;
}
else
{
- key = new KeyAttribute(item.Name); // use property name
- }
- }
-
- if (searchFirst)
- {
- searchFirst = false;
- isIntKey = key.IntKey != null;
- }
- else
- {
- if ((isIntKey && key.IntKey == null) || (!isIntKey && key.StringKey == null))
- {
- throw new MessagePackDynamicObjectResolverException("all members key type must be same." + " type: " + type.FullName + " member:" + item.Name);
- }
- }
-
- if (isIntKey)
- {
- member.IntKey = key.IntKey.Value;
- if (intMembers.TryGetValue(member.IntKey, out EmittableMember conflictingMember))
- {
- // Quietly skip duplicate if this is an override property.
- if ((conflictingMember.PropertyInfo.SetMethod?.IsVirtual ?? false) || (conflictingMember.PropertyInfo.GetMethod?.IsVirtual ?? false))
- {
- continue;
- }
-
- throw new MessagePackDynamicObjectResolverException("key is duplicated, all members key must be unique." + " type: " + type.FullName + " member:" + item.Name);
- }
-
- intMembers.Add(member.IntKey, member);
- }
- else
- {
- member.StringKey = key.StringKey;
- if (stringMembers.TryGetValue(member.StringKey, out EmittableMember conflictingMember))
- {
- // Quietly skip duplicate if this is an override property.
- if ((conflictingMember.PropertyInfo.SetMethod?.IsVirtual ?? false) || (conflictingMember.PropertyInfo.GetMethod?.IsVirtual ?? false))
- {
- continue;
- }
-
- throw new MessagePackDynamicObjectResolverException("key is duplicated, all members key must be unique." + " type: " + type.FullName + " member:" + item.Name);
+ member.StringKey = $"{memberInfo.DeclaringType.FullName}.{memberInfo.Name}";
}
member.IntKey = hiddenIntKey++;
- stringMembers.Add(member.StringKey, member);
+ AddEmittableMemberOrIgnore(isIntKey, member, false);
}
}
+ }
+ else
+ {
+ // Public members with KeyAttribute except [Ignore] member.
+ var searchFirst = true;
+ var hiddenIntKey = 0;
- foreach (FieldInfo item in GetAllFields(type))
+ var memberInfos = GetAllProperties(type).Cast<MemberInfo>().Concat(GetAllFields(type));
+ foreach (var member in memberInfos.Select(CreateEmittableMember).Where(n => n != null))
{
- if (item.GetCustomAttribute<IgnoreMemberAttribute>(true) != null)
- {
- continue;
- }
-
- if (item.GetCustomAttribute<IgnoreDataMemberAttribute>(true) != null)
- {
- continue;
- }
-
- if (item.GetCustomAttribute<System.Runtime.CompilerServices.CompilerGeneratedAttribute>(true) != null)
- {
- continue;
- }
-
- if (item.IsStatic)
- {
- continue;
- }
-
- var member = new EmittableMember
- {
- FieldInfo = item,
- IsReadable = allowPrivate || item.IsPublic,
- IsWritable = allowPrivate || (item.IsPublic && !item.IsInitOnly),
- };
- if (!member.IsReadable && !member.IsWritable)
- {
- continue;
- }
+ var memberInfo = (MemberInfo)member.PropertyInfo ?? member.FieldInfo;
KeyAttribute key;
if (contractAttr != null)
{
- // MessagePackObjectAttribute
- key = item.GetCustomAttribute<KeyAttribute>(true);
- if (key == null)
- {
- throw new MessagePackDynamicObjectResolverException("all public members must mark KeyAttribute or IgnoreMemberAttribute." + " type: " + type.FullName + " member:" + item.Name);
- }
-
- member.IsExplicitContract = true;
+ // MessagePackObjectAttribute. KeyAttribute must be marked, and IntKey or StringKey must be set.
+ key = memberInfo.GetCustomAttribute<KeyAttribute>(true) ??
+ throw new MessagePackDynamicObjectResolverException($"all public members must mark KeyAttribute or IgnoreMemberAttribute. type:{type.FullName} member:{memberInfo.Name}");
if (key.IntKey == null && key.StringKey == null)
{
- throw new MessagePackDynamicObjectResolverException("both IntKey and StringKey are null." + " type: " + type.FullName + " member:" + item.Name);
+ throw new MessagePackDynamicObjectResolverException($"both IntKey and StringKey are null. type: {type.FullName} member:{memberInfo.Name}");
}
}
else
{
- // DataContractAttribute
- DataMemberAttribute pseudokey = item.GetCustomAttribute<DataMemberAttribute>(true);
+ // DataContractAttribute. Try to use the DataMemberAttribute to fake KeyAttribute.
+ // This member has no DataMemberAttribute nor IgnoreMemberAttribute.
+ // But the type *did* have a DataContractAttribute on it, so no attribute implies the member should not be serialized.
+ var pseudokey = memberInfo.GetCustomAttribute<DataMemberAttribute>(true);
if (pseudokey == null)
{
- // This member has no DataMemberAttribute nor IgnoreMemberAttribute.
- // But the type *did* have a DataContractAttribute on it, so no attribute implies the member should not be serialized.
continue;
}
- member.IsExplicitContract = true;
-
- // use Order first
- if (pseudokey.Order != -1)
- {
- key = new KeyAttribute(pseudokey.Order);
- }
- else if (pseudokey.Name != null)
- {
- key = new KeyAttribute(pseudokey.Name);
- }
- else
- {
- key = new KeyAttribute(item.Name); // use property name
- }
+ key =
+ pseudokey.Order != -1 ? new KeyAttribute(pseudokey.Order) :
+ pseudokey.Name != null ? new KeyAttribute(pseudokey.Name) :
+ new KeyAttribute(memberInfo.Name);
}
+ member.IsExplicitContract = true;
+
+ // Cannot assign StringKey and IntKey at the same time.
if (searchFirst)
{
searchFirst = false;
isIntKey = key.IntKey != null;
}
- else
+ else if ((isIntKey && key.IntKey == null) || (!isIntKey && key.StringKey == null))
{
- if ((isIntKey && key.IntKey == null) || (!isIntKey && key.StringKey == null))
- {
- throw new MessagePackDynamicObjectResolverException("all members key type must be same." + " type: " + type.FullName + " member:" + item.Name);
- }
+ throw new MessagePackDynamicObjectResolverException($"all members key type must be same. type: {type.FullName} member:{memberInfo.Name}");
}
if (isIntKey)
{
member.IntKey = key.IntKey.Value;
- if (intMembers.ContainsKey(member.IntKey))
- {
- throw new MessagePackDynamicObjectResolverException("key is duplicated, all members key must be unique." + " type: " + type.FullName + " member:" + item.Name);
- }
-
- intMembers.Add(member.IntKey, member);
}
else
{
member.StringKey = key.StringKey;
- if (stringMembers.ContainsKey(member.StringKey))
- {
- throw new MessagePackDynamicObjectResolverException("key is duplicated, all members key must be unique." + " type: " + type.FullName + " member:" + item.Name);
- }
-
member.IntKey = hiddenIntKey++;
- stringMembers.Add(member.StringKey, member);
+ }
+
+ if (!AddEmittableMemberOrIgnore(isIntKey, member, true))
+ {
+ continue;
}
}
}
@@ -1787,6 +1949,7 @@ namespace MessagePack.Internal
var constructorParameters = new List<EmittableMemberAndConstructorParameter>();
if (ctor != null)
{
+ IReadOnlyDictionary<int, EmittableMember> ctorParamIndexIntMembersDictionary = intMembers.OrderBy(x => x.Key).Select((x, i) => (Key: x.Value, Index: i)).ToDictionary(x => x.Index, x => x.Key);
ILookup<string, KeyValuePair<string, EmittableMember>> constructorLookupByKeyDictionary = stringMembers.ToLookup(x => x.Key, x => x, StringComparer.OrdinalIgnoreCase);
ILookup<string, KeyValuePair<string, EmittableMember>> constructorLookupByMemberNameDictionary = stringMembers.ToLookup(x => x.Value.Name, x => x, StringComparer.OrdinalIgnoreCase);
do
@@ -1798,7 +1961,7 @@ namespace MessagePack.Internal
EmittableMember paramMember;
if (isIntKey)
{
- if (intMembers.TryGetValue(ctorParamIndex, out paramMember))
+ if (ctorParamIndexIntMembersDictionary.TryGetValue(ctorParamIndex, out paramMember))
{
if ((item.ParameterType == paramMember.Type ||
item.ParameterType.GetTypeInfo().IsAssignableFrom(paramMember.Type))
@@ -1811,7 +1974,7 @@ namespace MessagePack.Internal
if (ctorEnumerator != null)
{
ctor = null;
- continue;
+ break;
}
else
{
@@ -1824,7 +1987,7 @@ namespace MessagePack.Internal
if (ctorEnumerator != null)
{
ctor = null;
- continue;
+ break;
}
else
{
@@ -1857,7 +2020,7 @@ namespace MessagePack.Internal
if (ctorEnumerator != null)
{
ctor = null;
- continue;
+ break;
}
else
{
@@ -1875,7 +2038,7 @@ namespace MessagePack.Internal
if (ctorEnumerator != null)
{
ctor = null;
- continue;
+ break;
}
else
{
@@ -1888,7 +2051,7 @@ namespace MessagePack.Internal
if (ctorEnumerator != null)
{
ctor = null;
- continue;
+ break;
}
else
{
@@ -1929,17 +2092,78 @@ namespace MessagePack.Internal
.ToArray();
}
+ var shouldUseFormatterResolver = false;
+
+ // Mark each member that will be set by way of the constructor.
+ foreach (var item in constructorParameters)
+ {
+ item.MemberInfo.IsWrittenByConstructor = true;
+ }
+
+ var membersArray = members.Where(m => m.IsExplicitContract || m.IsWrittenByConstructor || m.IsWritable).ToArray();
+ foreach (var member in membersArray)
+ {
+ if (IsOptimizeTargetType(member.Type))
+ {
+ continue;
+ }
+
+ var attr = member.GetMessagePackFormatterAttribute();
+ if (!(attr is null))
+ {
+ continue;
+ }
+
+ shouldUseFormatterResolver = true;
+ break;
+ }
+
+ // Under a certain combination of conditions, throw to draw attention to the fact that we cannot set a property.
+ if (!allowPrivate)
+ {
+ // A property is not actually problematic if we can set it via the type's constructor.
+ var problematicProperties = membersArray
+ .Where(m => m.IsProblematicInitProperty && !constructorParameters.Any(cp => cp.MemberInfo == m));
+ problematicProperties.FirstOrDefault()?.ThrowIfNotWritable();
+ }
+
return new ObjectSerializationInfo
{
Type = type,
IsClass = isClass,
+ ShouldUseFormatterResolver = shouldUseFormatterResolver,
BestmatchConstructor = ctor,
ConstructorParameters = constructorParameters.ToArray(),
IsIntKey = isIntKey,
- Members = members.Where(m => m.IsExplicitContract || constructorParameters.Any(p => p.MemberInfo.Equals(m)) || m.IsWritable).ToArray(),
+ Members = membersArray,
};
}
+ /// <devremarks>
+ /// Keep this list in sync with ShouldUseFormatterResolverHelper.PrimitiveTypes.
+ /// </devremarks>
+ internal static bool IsOptimizeTargetType(Type type)
+ {
+ return type == typeof(Int16)
+ || type == typeof(Int32)
+ || type == typeof(Int64)
+ || type == typeof(UInt16)
+ || type == typeof(UInt32)
+ || type == typeof(UInt64)
+ || type == typeof(Single)
+ || type == typeof(Double)
+ || type == typeof(bool)
+ || type == typeof(byte)
+ || type == typeof(sbyte)
+ || type == typeof(char)
+ || type == typeof(byte[])
+
+ // Do not include types that resolvers are allowed to modify.
+ ////|| type == typeof(DateTime) // OldSpec has no support, so for that and perf reasons a .NET native DateTime resolver exists.
+ ////|| type == typeof(string) // https://github.com/Cysharp/MasterMemory provides custom formatter for string interning.
+ ;
+ }
+
private static IEnumerable<FieldInfo> GetAllFields(Type type)
{
if (type.BaseType is object)
@@ -1974,6 +2198,14 @@ namespace MessagePack.Internal
}
}
+ private static bool IsClassRecord(TypeInfo type)
+ {
+ // The only truly unique thing about a C# 9 record class is the presence of a <Clone>$ method,
+ // which cannot be declared in C# because of the reserved characters in its name.
+ return type.IsClass
+ && type.GetMethod("<Clone>$", BindingFlags.Public | BindingFlags.Instance) is object;
+ }
+
private static bool TryGetNextConstructor(IEnumerator<ConstructorInfo> ctorEnumerator, ref ConstructorInfo ctor)
{
if (ctorEnumerator == null || ctor != null)
@@ -2002,6 +2234,13 @@ namespace MessagePack.Internal
public class EmittableMember
{
+ private readonly bool dynamicMethod;
+
+ internal EmittableMember(bool dynamicMethod)
+ {
+ this.dynamicMethod = dynamicMethod;
+ }
+
public bool IsProperty
{
get { return this.PropertyInfo != null; }
@@ -2014,6 +2253,13 @@ namespace MessagePack.Internal
public bool IsWritable { get; set; }
+ public bool IsWrittenByConstructor { get; set; }
+
+ /// <summary>
+ /// Gets a value indicating whether the property can only be set by an object initializer, a constructor, or another `init` member.
+ /// </summary>
+ public bool IsInitOnly => this.PropertyInfo?.GetSetMethod(true)?.ReturnParameter.GetRequiredCustomModifiers().Any(modifierType => modifierType.FullName == "System.Runtime.CompilerServices.IsExternalInit") ?? false;
+
public bool IsReadable { get; set; }
public int IntKey { get; set; }
@@ -2051,6 +2297,22 @@ namespace MessagePack.Internal
/// </summary>
public bool IsExplicitContract { get; set; }
+ /// <summary>
+ /// Gets a value indicating whether a dynamic resolver can write to this property,
+ /// going beyond <see cref="IsWritable"/> by also considering CLR bugs.
+ /// </summary>
+ internal bool IsActuallyWritable => this.IsWritable && (this.dynamicMethod || !this.IsProblematicInitProperty);
+
+ /// <summary>
+ /// Gets a value indicating whether this member is a property with an <see langword="init" /> property setter
+ /// and is declared on a generic class.
+ /// </summary>
+ /// <remarks>
+ /// <see href="https://github.com/neuecc/MessagePack-CSharp/issues/1134">A bug</see> in <see cref="MethodBuilder"/>
+ /// blocks its ability to invoke property init accessors when in a generic class.
+ /// </remarks>
+ internal bool IsProblematicInitProperty => this.PropertyInfo is PropertyInfo property && property.DeclaringType.IsGenericType && this.IsInitOnly;
+
public MessagePackFormatterAttribute GetMessagePackFormatterAttribute()
{
if (this.IsProperty)
@@ -2099,6 +2361,17 @@ namespace MessagePack.Internal
}
}
+ internal void ThrowIfNotWritable()
+ {
+ if (this.IsProblematicInitProperty && !this.dynamicMethod)
+ {
+ throw new InitAccessorInGenericClassNotSupportedException(
+ $"`init` property accessor {this.PropertyInfo.SetMethod.DeclaringType.FullName}.{this.PropertyInfo.Name} found in generic type, " +
+ $"which is not supported with the DynamicObjectResolver. Use the AllowPrivate variety of the resolver instead. " +
+ $"See https://github.com/neuecc/MessagePack-CSharp/issues/1134 for details.");
+ }
+ }
+
////public object ReflectionLoadValue(object value)
////{
//// if (IsProperty)
@@ -2150,6 +2423,35 @@ namespace MessagePack.Internal
{
}
}
+
+ /// <summary>
+ /// Identifies the unsupported scenario of <see href="https://github.com/neuecc/MessagePack-CSharp/issues/1134">an
+ /// <see langword="init"/> property accessor within a generic class</see>.
+ /// </summary>
+ [Serializable]
+ internal class InitAccessorInGenericClassNotSupportedException : NotSupportedException
+ {
+ public InitAccessorInGenericClassNotSupportedException()
+ {
+ }
+
+ public InitAccessorInGenericClassNotSupportedException(string message)
+ : base(message)
+ {
+ }
+
+ public InitAccessorInGenericClassNotSupportedException(string message, Exception inner)
+ : base(message, inner)
+ {
+ }
+
+ protected InitAccessorInGenericClassNotSupportedException(
+ SerializationInfo info,
+ StreamingContext context)
+ : base(info, context)
+ {
+ }
+ }
}
#endif
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Resolvers/ResolverUtilities.cs b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Resolvers/ResolverUtilities.cs
new file mode 100644
index 00000000..a6622181
--- /dev/null
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Resolvers/ResolverUtilities.cs
@@ -0,0 +1,45 @@
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Reflection;
+using MessagePack.Formatters;
+
+namespace MessagePack.Internal
+{
+ internal static class ResolverUtilities
+ {
+ internal static IMessagePackFormatter ActivateFormatter(Type formatterType, object[] args = null)
+ {
+ if (args == null || args.Length == 0)
+ {
+ if (formatterType.GetConstructor(Type.EmptyTypes) is ConstructorInfo ctor)
+ {
+ return (IMessagePackFormatter)ctor.Invoke(Array.Empty<object>());
+ }
+ else if (FetchSingletonField(formatterType) is FieldInfo instance)
+ {
+ return (IMessagePackFormatter)instance.GetValue(null);
+ }
+ else
+ {
+ throw new MessagePackSerializationException($"The {formatterType.FullName} formatter has no default constructor nor implements the singleton pattern.");
+ }
+ }
+ else
+ {
+ return (IMessagePackFormatter)Activator.CreateInstance(formatterType, args);
+ }
+ }
+
+ internal static FieldInfo FetchSingletonField(Type formatterType)
+ {
+ if (formatterType.GetField("Instance", BindingFlags.Static | BindingFlags.Public) is FieldInfo fieldInfo && fieldInfo.IsInitOnly)
+ {
+ return fieldInfo;
+ }
+
+ return null;
+ }
+ }
+}
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Resolvers/ResolverUtilities.cs.meta b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Resolvers/ResolverUtilities.cs.meta
new file mode 100644
index 00000000..1f34c5ff
--- /dev/null
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Resolvers/ResolverUtilities.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d4e2e1ebcc7467944a57bb9a3327820b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/SafeBitConverter.cs b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/SafeBitConverter.cs
index 7eb77a00..8bbc141a 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/SafeBitConverter.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/SafeBitConverter.cs
@@ -13,15 +13,15 @@ namespace MessagePack
#if UNITY_ANDROID
if (BitConverter.IsLittleEndian)
{
- int i1 = value[0] | (value[1] << 8) | (value[2] << 16) | (value[3] << 24);
- int i2 = value[4] | (value[5] << 8) | (value[6] << 16) | (value[7] << 24);
- return (uint)i1 | ((long)i2 << 32);
+ long i1 = value[0] | (value[1] << 8) | (value[2] << 16) | (value[3] << 24);
+ long i2 = value[4] | (value[5] << 8) | (value[6] << 16) | (value[7] << 24);
+ return i1 | (i2 << 32);
}
else
{
- int i1 = (value[0] << 24) | (value[1] << 16) | (value[2] << 8) | value[3];
- int i2 = (value[4] << 24) | (value[5] << 16) | (value[6] << 8) | value[7];
- return (uint)i2 | ((long)i1 << 32);
+ long i1 = (value[0] << 24) | (value[1] << 16) | (value[2] << 8) | value[3];
+ long i2 = (value[4] << 24) | (value[5] << 16) | (value[6] << 8) | value[7];
+ return i2 | (i1 << 32);
}
#else
return MemoryMarshal.Cast<byte, long>(value)[0];
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/SequencePool.cs b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/SequencePool.cs
index bdfc073d..4857095d 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/SequencePool.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/SequencePool.cs
@@ -11,16 +11,17 @@ namespace MessagePack
/// <summary>
/// A thread-safe, alloc-free reusable object pool.
/// </summary>
- internal class SequencePool
+#if MESSAGEPACK_INTERNAL
+ internal
+#else
+ public
+#endif
+ class SequencePool
{
/// <summary>
/// A thread-safe pool of reusable <see cref="Sequence{T}"/> objects.
/// </summary>
- /// <remarks>
- /// We use a <see cref="maxSize"/> that allows every processor to be involved in messagepack serialization concurrently,
- /// plus one nested serialization per processor (since LZ4 and sometimes other nested serializations may exist).
- /// </remarks>
- internal static readonly SequencePool Shared = new SequencePool(Environment.ProcessorCount * 2);
+ internal static readonly SequencePool Shared = new SequencePool();
/// <summary>
/// The value to use for <see cref="Sequence{T}.MinimumSpanLength"/>.
@@ -41,18 +42,41 @@ namespace MessagePack
/// <summary>
/// The array pool which we share with all <see cref="Sequence{T}"/> objects created by this <see cref="SequencePool"/> instance.
/// </summary>
+ private readonly ArrayPool<byte> arrayPool;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="SequencePool"/> class.
+ /// </summary>
+ /// <remarks>
+ /// We use a <see cref="maxSize"/> that allows every processor to be involved in messagepack serialization concurrently,
+ /// plus one nested serialization per processor (since LZ4 and sometimes other nested serializations may exist).
+ /// </remarks>
+ public SequencePool()
+ : this(Environment.ProcessorCount * 2, ArrayPool<byte>.Create(80 * 1024, 100))
+ {
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="SequencePool"/> class.
+ /// </summary>
+ /// <param name="maxSize">The maximum size to allow the pool to grow.</param>
/// <devremarks>
/// We allow 100 arrays to be shared (instead of the default 50) and reduce the max array length from the default 1MB to something more reasonable for our expected use.
/// </devremarks>
- private readonly ArrayPool<byte> arrayPool = ArrayPool<byte>.Create(80 * 1024, 100);
+ public SequencePool(int maxSize)
+ : this(maxSize, ArrayPool<byte>.Create(80 * 1024, 100))
+ {
+ }
/// <summary>
/// Initializes a new instance of the <see cref="SequencePool"/> class.
/// </summary>
/// <param name="maxSize">The maximum size to allow the pool to grow.</param>
- internal SequencePool(int maxSize)
+ /// <param name="arrayPool">Array pool that will be used.</param>
+ public SequencePool(int maxSize, ArrayPool<byte> arrayPool)
{
this.maxSize = maxSize;
+ this.arrayPool = arrayPool;
}
/// <summary>
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Utilities.cs b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Utilities.cs
index 8d5a4cfe..d011ee4d 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Utilities.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Utilities.cs
@@ -22,9 +22,9 @@ namespace MessagePack
internal delegate void GetWriterBytesAction<TArg>(ref MessagePackWriter writer, TArg argument);
- internal static byte[] GetWriterBytes<TArg>(TArg arg, GetWriterBytesAction<TArg> action)
+ internal static byte[] GetWriterBytes<TArg>(TArg arg, GetWriterBytesAction<TArg> action, SequencePool pool)
{
- using (var sequenceRental = SequencePool.Shared.Rent())
+ using (var sequenceRental = pool.Rent())
{
var writer = new MessagePackWriter(sequenceRental.Value);
action(ref writer, arg);
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/package.json b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/package.json
index 369e3773..ea203c5c 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/package.json
+++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/package.json
@@ -1,11 +1,12 @@
{
"name": "com.neuecc.messagepack",
"displayName": "MessagePack",
- "version": "2.2.60",
+ "version": "2.4.35",
"unity": "2018.4",
"description": "Extremely Fast MessagePack Serializer for C#.",
- "keywords": [ "Serializer" ],
+ "keywords": [
+ "Serializer"
+ ],
"license": "MIT",
- "category": "Scripting",
- "dependencies": {}
+ "category": "Scripting"
}
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/Tests/Class1.cs b/src/MessagePack.UnityClient/Assets/Scripts/Tests/Class1.cs
index d25b14f6..3325e3c3 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/Tests/Class1.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/Tests/Class1.cs
@@ -116,6 +116,108 @@ namespace SharedData
}
[MessagePackObject(true)]
+ public class DefaultValueStringKeyClassWithoutExplicitConstructor
+ {
+ public const int Prop1Constant = 11;
+ public const int Prop2Constant = 45;
+
+ public int Prop1 { get; set; } = Prop1Constant;
+
+ public int Prop2 { get; set; } = Prop2Constant;
+ }
+
+ [MessagePackObject(true)]
+ public class DefaultValueStringKeyClassWithExplicitConstructor
+ {
+ public const int Prop2Constant = 1419;
+
+ public int Prop1 { get; set; }
+
+ public int Prop2 { get; set; }
+
+ public DefaultValueStringKeyClassWithExplicitConstructor(int prop1)
+ {
+ Prop1 = prop1;
+ Prop2 = Prop2Constant;
+ }
+ }
+
+ [MessagePackObject(true)]
+ public struct DefaultValueStringKeyStructWithExplicitConstructor
+ {
+ public const int Prop2Constant = 198;
+
+ public int Prop1 { get; set; }
+
+ public int Prop2 { get; set; }
+
+ public DefaultValueStringKeyStructWithExplicitConstructor(int prop1)
+ {
+ Prop1 = prop1;
+ Prop2 = Prop2Constant;
+ }
+ }
+
+ [MessagePackObject]
+ public class DefaultValueIntKeyClassWithoutExplicitConstructor
+ {
+ public const int Prop1Constant = 33;
+ public const int Prop2Constant = -4;
+
+ [Key(0)]
+ public int Prop1 { get; set; } = Prop1Constant;
+
+ [Key(1)]
+ public int Prop2 { get; set; } = Prop2Constant;
+ }
+
+ [MessagePackObject]
+ public class DefaultValueIntKeyClassWithExplicitConstructor
+ {
+ public const int Prop2Constant = -109;
+ public const string Prop3Constant = "生命、宇宙、そして万物についての究極の疑問の答え";
+ public const string Prop4Constant = "Hello, world! To you, From me.";
+
+ [Key(0)]
+ public int Prop1 { get; set; }
+
+ [Key(1)]
+ public int Prop2 { get; set; }
+
+ [Key(2)]
+ public string Prop3 { get; set; }
+
+ [Key(3)]
+ public string Prop4 { get; set; }
+
+ public DefaultValueIntKeyClassWithExplicitConstructor(int prop1)
+ {
+ Prop1 = prop1;
+ Prop2 = Prop2Constant;
+ Prop3 = Prop3Constant;
+ Prop4 = Prop4Constant;
+ }
+ }
+
+ [MessagePackObject]
+ public struct DefaultValueIntKeyStructWithExplicitConstructor
+ {
+ public const int Prop2Constant = 31;
+
+ [Key(0)]
+ public int Prop1 { get; set; }
+
+ [Key(1)]
+ public int Prop2 { get; set; }
+
+ public DefaultValueIntKeyStructWithExplicitConstructor(int prop1)
+ {
+ Prop1 = prop1;
+ Prop2 = Prop2Constant;
+ }
+ }
+
+ [MessagePackObject(true)]
public class SimpleStringKeyData
{
public int Prop1 { get; set; }
@@ -1047,6 +1149,13 @@ public class SimpleModel
}
}
+[MessagePackObject]
+public class MessagePackFormatterFieldUser
+{
+ [Key(0), MessagePackFormatter(typeof(NativeDateTimeFormatter))]
+ public DateTime Timestamp { get; set; }
+}
+
namespace PerfBenchmarkDotNet
{
[MessagePackObject(true)]
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/AllowPrivateTest.cs b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/AllowPrivateTest.cs
index 7c418e7e..f27b794e 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/AllowPrivateTest.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/AllowPrivateTest.cs
@@ -157,6 +157,28 @@ namespace MessagePack.Tests
internal InternalEnum EnumProperty { get; set; }
}
+ [MessagePackObject]
+ public class PrivateReadonlyField
+ {
+ public static PrivateReadonlyField WithNullValue { get; } = new PrivateReadonlyField();
+
+ [Key(0)]
+ private readonly string field;
+
+ [SerializationConstructor]
+ public PrivateReadonlyField(string field)
+ {
+ this.field = field ?? "not null";
+ }
+
+ private PrivateReadonlyField()
+ {
+ }
+
+ [IgnoreMember]
+ public string Field => field;
+ }
+
#if !ENABLE_IL2CPP
[MessagePackObject]
@@ -193,6 +215,25 @@ namespace MessagePack.Tests
public bool CreatedUsingPrivateCtor { get; }
}
+ public class ContractlessClassPrivateCtor
+ {
+ public int X { get; private set; }
+
+ public int Y { get; private set; }
+
+ [SerializationConstructor]
+ private ContractlessClassPrivateCtor(int x, int y)
+ {
+ X = x;
+ Y = y;
+ }
+
+ public static ContractlessClassPrivateCtor Create(int x, int y)
+ {
+ return new ContractlessClassPrivateCtor(x, y);
+ }
+ }
+
[MessagePackObject]
public class CompletelyPrivateConstructor
{
@@ -310,6 +351,15 @@ namespace MessagePack.Tests
Assert.Equal(expected.EnumProperty, actual.EnumProperty);
}
+ [Fact]
+ public void PrivateReadonlyFieldSetInConstructor()
+ {
+ PrivateReadonlyField initial = PrivateReadonlyField.WithNullValue;
+ var bin = MessagePackSerializer.Serialize(initial, StandardResolverAllowPrivate.Options);
+ var deserialized = MessagePackSerializer.Deserialize<PrivateReadonlyField>(bin, StandardResolverAllowPrivate.Options);
+ Assert.Equal("not null", deserialized.Field);
+ }
+
#if !ENABLE_IL2CPP
[Fact]
@@ -335,6 +385,17 @@ namespace MessagePack.Tests
Assert.Equal(p1.X, p2.X);
Assert.Equal(p1.Y, p2.Y);
}
+
+ [Fact]
+ public void ContractlessAttributedPrivateConstructor()
+ {
+ var p1 = ContractlessClassPrivateCtor.Create(10, 20);
+ var bin = MessagePackSerializer.Serialize(p1, ContractlessStandardResolver.Options);
+ var p2 = MessagePackSerializer.Deserialize<ContractlessClassPrivateCtor>(bin, ContractlessStandardResolver.Options);
+
+ Assert.Equal(p1.X, p2.X);
+ Assert.Equal(p1.Y, p2.Y);
+ }
#endif
}
}
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/CollectionTest.cs b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/CollectionTest.cs
index 121806e3..fce5184f 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/CollectionTest.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/CollectionTest.cs
@@ -252,6 +252,41 @@ namespace MessagePack.Tests
}
[Fact]
+ public void CustomGenericEnumerableCollectionTest()
+ {
+ {
+ var xs = new ImplGenericEnumerable();
+ xs.Add(1);
+ xs.Add(2);
+ xs.Add(3);
+
+ this.Convert(xs).Is(1, 2, 3);
+ }
+ }
+
+ [Fact]
+ public void CustomGenericInterfaceReadOnlyCollectionTest()
+ {
+ {
+ var xs = new ImplGenericReadonlyCollection();
+ xs.Add(1);
+ xs.Add(2);
+ xs.Add(3);
+
+ this.Convert(xs).Is(1, 2, 3);
+ }
+
+ {
+ var xs = new ImplGenericGenericReadOnlyCollection<int>();
+ xs.Add(1);
+ xs.Add(2);
+ xs.Add(3);
+
+ this.Convert(xs).Is(1, 2, 3);
+ }
+ }
+
+ [Fact]
public void CustomGenericDictionaryTest()
{
var d = new ImplDictionary();
@@ -262,6 +297,18 @@ namespace MessagePack.Tests
d2["foo"].Is(10);
d2["bar"].Is(20);
}
+
+ [Fact]
+ public void CustomGenericReadOnlyDictionaryTest()
+ {
+ var d = new ImplReadonlyDictionary();
+ d.Add("foo", 10);
+ d.Add("bar", 20);
+
+ var d2 = this.Convert(d);
+ d2["foo"].Is(10);
+ d2["bar"].Is(20);
+ }
}
public class ImplNonGenericList : IList
@@ -429,6 +476,38 @@ namespace MessagePack.Tests
}
}
+ public class ImplGenericGenericReadOnlyCollection<T> : IReadOnlyCollection<T>
+ {
+ private readonly ICollection<T> inner;
+
+ public ImplGenericGenericReadOnlyCollection()
+ {
+ this.inner = new List<T>();
+ }
+
+ public ImplGenericGenericReadOnlyCollection(IEnumerable<T> items)
+ {
+ this.inner = new List<T>(items);
+ }
+
+ public IEnumerator<T> GetEnumerator()
+ {
+ return inner.GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return ((IEnumerable)inner).GetEnumerator();
+ }
+
+ public int Count => inner.Count;
+
+ public void Add(T item)
+ {
+ inner.Add(item);
+ }
+ }
+
public class ImplDictionary : IDictionary<string, int>
{
private readonly Dictionary<string, int> inner;
@@ -503,4 +582,119 @@ namespace MessagePack.Tests
return ((IDictionary<string, int>)inner).GetEnumerator();
}
}
+
+ public class ImplGenericReadonlyCollection : IReadOnlyCollection<int>
+ {
+ private readonly ICollection<int> inner;
+
+ public ImplGenericReadonlyCollection()
+ {
+ this.inner = new List<int>();
+ }
+
+ public ImplGenericReadonlyCollection(IEnumerable<int> items)
+ {
+ this.inner = new List<int>(items);
+ }
+
+ public int Count => inner.Count;
+
+ public IEnumerator<int> GetEnumerator()
+ {
+ return inner.GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return inner.GetEnumerator();
+ }
+
+ public void Add(int item)
+ {
+ inner.Add(item);
+ }
+ }
+
+ public class ImplReadonlyDictionary : IReadOnlyDictionary<string, int>
+ {
+ private readonly Dictionary<string, int> inner;
+
+ public ImplReadonlyDictionary()
+ {
+ this.inner = new Dictionary<string, int>();
+ }
+
+ public ImplReadonlyDictionary(IDictionary<string, int> inner)
+ {
+ this.inner = new Dictionary<string, int>(inner);
+ }
+
+ public IEnumerator<KeyValuePair<string, int>> GetEnumerator()
+ {
+ return inner.GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return ((IEnumerable)inner).GetEnumerator();
+ }
+
+ public int Count => inner.Count;
+
+ public bool ContainsKey(string key)
+ {
+ return inner.ContainsKey(key);
+ }
+
+ public bool TryGetValue(string key, out int value)
+ {
+ return inner.TryGetValue(key, out value);
+ }
+
+ public int this[string key] => inner[key];
+
+ public IEnumerable<string> Keys => inner.Keys;
+
+ public IEnumerable<int> Values => inner.Values;
+
+ public void Add(string key, int value)
+ {
+ inner.Add(key, value);
+ }
+ }
+
+ public class ImplGenericEnumerable : IEnumerable<int>
+ {
+ private readonly List<int> inner = new List<int>();
+
+ public ImplGenericEnumerable()
+ {
+ }
+
+ public ImplGenericEnumerable(IEnumerable<double> values)
+ {
+ }
+
+ public ImplGenericEnumerable(IEnumerable<int> values)
+ {
+ inner.AddRange(values);
+ }
+
+ public ImplGenericEnumerable(ICollection<int> values)
+ {
+ inner.AddRange(values);
+ }
+
+ public IEnumerator<int> GetEnumerator()
+ {
+ return inner.GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return ((IEnumerable)inner).GetEnumerator();
+ }
+
+ public void Add(int item) => inner.Add(item);
+ }
}
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/ContractlessStandardResolverTest.cs b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/ContractlessStandardResolverTest.cs
index d0520426..0349bc0f 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/ContractlessStandardResolverTest.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/ContractlessStandardResolverTest.cs
@@ -42,6 +42,16 @@ namespace MessagePack.Tests
public object[] /*Address*/ Addresses { get; set; }
}
+ public class DefaultValueStringKeyClassWithoutExplicitConstructor
+ {
+ public const int Prop1Constant = 11;
+ public const int Prop2Constant = 45;
+
+ public int Prop1 { get; set; } = Prop1Constant;
+
+ public int Prop2 { get; set; } = Prop2Constant;
+ }
+
public class V1
{
public int ABCDEFG1 { get; set; }
@@ -185,6 +195,18 @@ namespace MessagePack.Tests
}
[Fact]
+ public void DefaultValueStringKeyClassWithoutExplicitConstructorTest()
+ {
+ var dictionary = new Dictionary<string, int>();
+
+ var result = MessagePackSerializer.Serialize(dictionary, Resolvers.ContractlessStandardResolver.Options);
+
+ var instance = MessagePackSerializer.Deserialize<DefaultValueStringKeyClassWithoutExplicitConstructor>(result, Resolvers.ContractlessStandardResolver.Options);
+ instance.Prop1.Is(DefaultValueStringKeyClassWithoutExplicitConstructor.Prop1Constant);
+ instance.Prop2.Is(DefaultValueStringKeyClassWithoutExplicitConstructor.Prop2Constant);
+ }
+
+ [Fact]
public void Versioning()
{
var v1 = MessagePackSerializer.Serialize(new V1 { ABCDEFG1 = 10, ABCDEFG3 = 99 }, Resolvers.ContractlessStandardResolver.Options);
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/DataContractTest.cs b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/DataContractTest.cs
index 87175888..d4defb9e 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/DataContractTest.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/DataContractTest.cs
@@ -3,18 +3,27 @@
using System;
using System.Collections.Generic;
+using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
+using MessagePack.Resolvers;
using Xunit;
+using Xunit.Abstractions;
namespace MessagePack.Tests
{
#if !ENABLE_IL2CPP
-
public class DataContractTest
{
+ private readonly ITestOutputHelper logger;
+
+ public DataContractTest(ITestOutputHelper logger)
+ {
+ this.logger = logger;
+ }
+
[DataContract]
public class MyClass
{
@@ -65,6 +74,23 @@ namespace MessagePack.Tests
public int IgnoredField;
}
+ [DataContract]
+ public class ClassWithPrivateReadonlyDictionary
+ {
+ [DataMember(Name = "Key", Order = 0, EmitDefaultValue = false)]
+ private readonly Guid? key;
+
+ [DataMember(Name = "Body", Order = 1, EmitDefaultValue = false)]
+ private readonly Dictionary<string, object> body = new Dictionary<string, object>();
+
+ public ClassWithPrivateReadonlyDictionary(Guid? key)
+ {
+ this.key = key;
+ }
+
+ internal Dictionary<string, object> GetBody() => this.body;
+ }
+
[Fact]
public void SerializeOrder()
{
@@ -134,6 +160,103 @@ namespace MessagePack.Tests
MessagePackSerializer.ConvertToJson(bin).Is(@"{""AttributedProperty"":1,""AttributedField"":4}");
}
+
+ [DataContract]
+ public class Master : IEquatable<Master>
+ {
+ [DataMember]
+ public int A { get; set; }
+
+ [DataMember]
+ internal Detail InternalComplexProperty { get; set; }
+
+ [DataMember]
+ internal Detail InternalComplexField;
+
+ public bool Equals(Master other)
+ {
+ return other != null
+ && this.A == other.A
+ && EqualityComparer<Detail>.Default.Equals(this.InternalComplexProperty, other.InternalComplexProperty)
+ && EqualityComparer<Detail>.Default.Equals(this.InternalComplexField, other.InternalComplexField);
+ }
+ }
+
+ public class Detail : IEquatable<Detail>
+ {
+ public int B1 { get; set; }
+
+ internal int B2 { get; set; }
+
+ public bool Equals(Detail other) => other != null && this.B1 == other.B1 && this.B2 == other.B2;
+ }
+
+#if !UNITY_2018_3_OR_NEWER
+
+ [Fact]
+ public void DataContractSerializerCompatibility()
+ {
+ var master = new Master
+ {
+ A = 1,
+ InternalComplexProperty = new Detail
+ {
+ B1 = 2,
+ B2 = 3,
+ },
+ InternalComplexField = new Detail
+ {
+ B1 = 4,
+ B2 = 5,
+ },
+ };
+
+ var dcsValue = DataContractSerializerRoundTrip(master);
+
+ var option = MessagePackSerializerOptions.Standard.WithResolver(CompositeResolver.Create(
+ DynamicObjectResolverAllowPrivate.Instance,
+ ContractlessStandardResolver.Instance));
+ var mpValue = MessagePackSerializer.Deserialize<Master>(MessagePackSerializer.Serialize(master, option), option);
+
+ Assert.Equal(dcsValue, mpValue);
+ }
+
+#endif
+
+ private static T DataContractSerializerRoundTrip<T>(T value)
+ {
+ var ms = new MemoryStream();
+ var dcs = new DataContractSerializer(typeof(T));
+ dcs.WriteObject(ms, value);
+ ms.Position = 0;
+ return (T)dcs.ReadObject(ms);
+ }
+
+ [Fact]
+ public void DeserializeTypeWithPrivateReadonlyDictionary()
+ {
+ var before = new ClassWithPrivateReadonlyDictionary(Guid.NewGuid());
+ before.GetBody()["name"] = "my name";
+ byte[] bytes = MessagePackSerializer.Serialize(before, StandardResolverAllowPrivate.Options);
+ string json = MessagePackSerializer.ConvertToJson(bytes); // just for check that json has _body' values.
+ this.logger.WriteLine(json);
+
+ var after = MessagePackSerializer.Deserialize<ClassWithPrivateReadonlyDictionary>(bytes, StandardResolverAllowPrivate.Options);
+ Assert.Equal("my name", after.GetBody()["name"]);
+ }
+
+ [Fact]
+ public void DeserializeTypeWithPrivateReadonlyDictionary_DCS()
+ {
+ var before = new ClassWithPrivateReadonlyDictionary(Guid.NewGuid());
+ before.GetBody()["name"] = "my name";
+ DataContractSerializer dcs = new DataContractSerializer(typeof(ClassWithPrivateReadonlyDictionary));
+ var ms = new MemoryStream();
+ dcs.WriteObject(ms, before);
+ ms.Position = 0;
+ var after = (ClassWithPrivateReadonlyDictionary)dcs.ReadObject(ms);
+ Assert.Equal("my name", after.GetBody()["name"]);
+ }
}
#endif
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/DynamicObjectFallbackTest.cs b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/DynamicObjectFallbackTest.cs
index 4ac2331d..a16b9f0b 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/DynamicObjectFallbackTest.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/DynamicObjectFallbackTest.cs
@@ -1,7 +1,7 @@
// Copyright (c) All contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-#if !ENABLE_IL2CPP
+#if !UNITY_2018_3_OR_NEWER
using System;
using System.Collections.Generic;
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/DynamicObjectResolverConstructorTest.cs b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/DynamicObjectResolverConstructorTest.cs
index 73bc1c70..68f0b8aa 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/DynamicObjectResolverConstructorTest.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/DynamicObjectResolverConstructorTest.cs
@@ -255,6 +255,30 @@ namespace MessagePack.Tests
}
}
+ /// <summary>
+ /// This constructor tests the case where there are missing int keys, to ensure that
+ /// the correct ctor is still found using index numbers of the keys, not their values.
+ /// </summary>
+ [MessagePackObject]
+ public class TestConstructor10
+ {
+ [Key(0)]
+ public int X { get; }
+
+ [Key(2)]
+ public int Y { get; }
+
+ [Key(5)]
+ public int Z { get; }
+
+ public TestConstructor10(int x, int y, int z)
+ {
+ X = x;
+ Y = y;
+ Z = z;
+ }
+ }
+
[Fact]
public void StringKey()
{
@@ -350,5 +374,17 @@ namespace MessagePack.Tests
r.Y.Is(8);
r.Z.Is(9);
}
+
+ [Fact]
+ public void MatchedClassCtorFoundWithMissingIntKeys()
+ {
+ var ctor = new TestConstructor10(10, 11, 12);
+ var bin = MessagePackSerializer.Serialize(ctor);
+ var r = MessagePackSerializer.Deserialize<TestConstructor10>(bin);
+
+ r.X.Is(10);
+ r.Y.Is(11);
+ r.Z.Is(12);
+ }
}
}
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/DynamicObjectResolverTests.cs b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/DynamicObjectResolverTests.cs
index 34e409ba..8508b01a 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/DynamicObjectResolverTests.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/DynamicObjectResolverTests.cs
@@ -67,7 +67,7 @@ namespace MessagePack.Tests
var instance = MessagePackSerializer.Deserialize<TwoProperties>(seq);
Assert.Equal("Set", instance.Prop1);
- Assert.Null(instance.Prop2);
+ Assert.Equal("Uninitialized", instance.Prop2);
}
[Fact]
@@ -81,7 +81,7 @@ namespace MessagePack.Tests
var instance = MessagePackSerializer.Deserialize<TwoPropertiesOrdinalKey>(seq);
Assert.Equal("Set", instance.Prop1);
- Assert.Null(instance.Prop2);
+ Assert.Equal("Uninitialized", instance.Prop2);
}
[Fact]
@@ -91,9 +91,8 @@ namespace MessagePack.Tests
byte[] bin = MessagePackSerializer.Serialize(m1);
var m2 = MessagePackSerializer.Deserialize<ClassWithPropertySetterAndDummyCtor>(bin);
- // In this version of the deserializer, we expect the property setter to be invoked
- // and reaffirm the value already passed to the constructor.
- Assert.Equal(m1.MyProperty, m2.MyProperty);
+ // We do NOT use the property setter since the constructor is expected to set the property.
+ Assert.Equal(0, m2.MyProperty);
}
/// <summary>
@@ -176,6 +175,290 @@ namespace MessagePack.Tests
Assert.Equal(obj.Name, obj2.Name);
}
+ [Fact]
+ public void DefaultValueStringKeyClassWithoutExplicitConstructorTest()
+ {
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteMapHeader(0);
+ writer.Flush();
+
+ var instance = MessagePackSerializer.Deserialize<DefaultValueStringKeyClassWithoutExplicitConstructor>(seq);
+ Assert.Equal(DefaultValueStringKeyClassWithoutExplicitConstructor.Prop1Constant, instance.Prop1);
+ Assert.Equal(DefaultValueStringKeyClassWithoutExplicitConstructor.Prop2Constant, instance.Prop2);
+ }
+
+ [Fact]
+ public void DefaultValueStringKeyClassWithExplicitConstructorTest()
+ {
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteMapHeader(1);
+ writer.Write(nameof(DefaultValueStringKeyClassWithExplicitConstructor.Prop1));
+ writer.Write(-1);
+ writer.Flush();
+
+ var instance = MessagePackSerializer.Deserialize<DefaultValueStringKeyClassWithExplicitConstructor>(seq);
+ Assert.Equal(-1, instance.Prop1);
+ Assert.Equal(DefaultValueStringKeyClassWithExplicitConstructor.Prop2Constant, instance.Prop2);
+ }
+
+ [Fact]
+ public void DefaultValueStringKeyClassWithExplicitConstructorSetPropertyTest()
+ {
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteMapHeader(2);
+ writer.Write(nameof(DefaultValueStringKeyClassWithExplicitConstructor.Prop1));
+ writer.Write(-1);
+ writer.Write(nameof(DefaultValueStringKeyClassWithExplicitConstructor.Prop2));
+ writer.Write(int.MaxValue);
+ writer.Flush();
+
+ var instance = MessagePackSerializer.Deserialize<DefaultValueStringKeyClassWithExplicitConstructor>(seq);
+ Assert.Equal(-1, instance.Prop1);
+ Assert.Equal(int.MaxValue, instance.Prop2);
+ }
+
+ [Fact]
+ public void DefaultValueStringKeyStructWithExplicitConstructorTest()
+ {
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteMapHeader(1);
+ writer.Write(nameof(DefaultValueStringKeyStructWithExplicitConstructor.Prop1));
+ writer.Write(-1);
+ writer.Flush();
+
+ var instance = MessagePackSerializer.Deserialize<DefaultValueStringKeyStructWithExplicitConstructor>(seq);
+ Assert.Equal(-1, instance.Prop1);
+ Assert.Equal(DefaultValueStringKeyStructWithExplicitConstructor.Prop2Constant, instance.Prop2);
+ }
+
+ [Fact]
+ public void DefaultValueStringKeyStructWithExplicitConstructorSetPropertyTest()
+ {
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteMapHeader(2);
+ writer.Write(nameof(DefaultValueStringKeyStructWithExplicitConstructor.Prop1));
+ writer.Write(-1);
+ writer.Write(nameof(DefaultValueStringKeyStructWithExplicitConstructor.Prop2));
+ writer.Write(int.MinValue);
+ writer.Flush();
+
+ var instance = MessagePackSerializer.Deserialize<DefaultValueStringKeyStructWithExplicitConstructor>(seq);
+ Assert.Equal(-1, instance.Prop1);
+ Assert.Equal(int.MinValue, instance.Prop2);
+ }
+
+ [Fact]
+ public void DefaultValueIntKeyClassWithoutExplicitConstructorTest()
+ {
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteArrayHeader(0);
+ writer.Flush();
+
+ var instance = MessagePackSerializer.Deserialize<DefaultValueIntKeyClassWithoutExplicitConstructor>(seq);
+ Assert.Equal(DefaultValueIntKeyClassWithoutExplicitConstructor.Prop1Constant, instance.Prop1);
+ Assert.Equal(DefaultValueIntKeyClassWithoutExplicitConstructor.Prop2Constant, instance.Prop2);
+ }
+
+ [Fact]
+ public void DefaultValueIntKeyClassWithExplicitConstructorTest()
+ {
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteArrayHeader(1);
+ writer.Write(-1);
+ writer.Flush();
+
+ var instance = MessagePackSerializer.Deserialize<DefaultValueIntKeyClassWithExplicitConstructor>(seq);
+ Assert.Equal(-1, instance.Prop1);
+ Assert.Equal(DefaultValueIntKeyClassWithExplicitConstructor.Prop2Constant, instance.Prop2);
+ }
+
+ [Fact]
+ public void DefaultValueIntKeyClassWithExplicitConstructorSetPropertyTest()
+ {
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteArrayHeader(2);
+ writer.Write(-1);
+ writer.Write(42);
+ writer.Flush();
+
+ var instance = MessagePackSerializer.Deserialize<DefaultValueIntKeyClassWithExplicitConstructor>(seq);
+ Assert.Equal(-1, instance.Prop1);
+ Assert.Equal(42, instance.Prop2);
+ }
+
+ [Fact]
+ public void DefaultValueIntKeyStructWithExplicitConstructorTest()
+ {
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteArrayHeader(1);
+ writer.Write(-1);
+ writer.Flush();
+
+ var instance = MessagePackSerializer.Deserialize<DefaultValueIntKeyStructWithExplicitConstructor>(seq);
+ Assert.Equal(-1, instance.Prop1);
+ Assert.Equal(DefaultValueIntKeyStructWithExplicitConstructor.Prop2Constant, instance.Prop2);
+ }
+
+ [Fact]
+ public void DefaultValueIntKeyStructWithExplicitConstructorSetPropertyTest()
+ {
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteArrayHeader(2);
+ writer.Write(-1);
+ writer.Write(-98);
+ writer.Flush();
+
+ var instance = MessagePackSerializer.Deserialize<DefaultValueIntKeyStructWithExplicitConstructor>(seq);
+ Assert.Equal(-1, instance.Prop1);
+ Assert.Equal(-98, instance.Prop2);
+ }
+
+#if !UNITY_2018_3_OR_NEWER
+
+ [Fact]
+ public void RoundtripGenericClass_StandardResolverFallsBackOnInitProperty()
+ {
+ var person = new GenericPerson<int> { Name = "bob" };
+ var options = StandardResolver.Options;
+ byte[] msgpack = MessagePackSerializer.Serialize(person, options);
+ var deserialized = MessagePackSerializer.Deserialize<GenericPerson<int>>(msgpack, options);
+ Assert.Equal(person.Name, deserialized.Name);
+ }
+
+ [Fact]
+ public void RoundtripNonGenericClass_StandardResolverWorksWithInitPropertySetter()
+ {
+ var person = new Person { Name = "bob" };
+ var options = StandardResolver.Options;
+ byte[] msgpack = MessagePackSerializer.Serialize(person, options);
+ var deserialized = MessagePackSerializer.Deserialize<Person>(msgpack, options);
+ Assert.Equal(person.Name, deserialized.Name);
+ }
+
+ [Fact]
+ public void RoundtripGenericClass_StandardResolverWorksWithDeserializingCtor()
+ {
+ var person = new GenericPersonWithCtor<int>("bob");
+ var options = StandardResolver.Options;
+ byte[] msgpack = MessagePackSerializer.Serialize(person, options);
+ var deserialized = MessagePackSerializer.Deserialize<GenericPersonWithCtor<int>>(msgpack, options);
+ Assert.Equal(person.Name, deserialized.Name);
+ }
+
+ [Fact]
+ public void RoundtripGenericClass_AllowPrivateStandardResolver()
+ {
+ var person = new GenericPerson<int> { Name = "bob" };
+ var options = StandardResolverAllowPrivate.Options;
+ byte[] msgpack = MessagePackSerializer.Serialize(person, options);
+ var deserialized = MessagePackSerializer.Deserialize<GenericPerson<int>>(msgpack, options);
+ Assert.Equal(person.Name, deserialized.Name);
+ }
+
+#endif
+
+ [MessagePackObject(true)]
+ public class DefaultValueStringKeyClassWithoutExplicitConstructor
+ {
+ public const int Prop1Constant = 11;
+ public const int Prop2Constant = 45;
+
+ public int Prop1 { get; set; } = Prop1Constant;
+
+ public int Prop2 { get; set; } = Prop2Constant;
+ }
+
+ [MessagePackObject(true)]
+ public class DefaultValueStringKeyClassWithExplicitConstructor
+ {
+ public const int Prop2Constant = 1419;
+
+ public int Prop1 { get; set; }
+
+ public int Prop2 { get; set; }
+
+ public DefaultValueStringKeyClassWithExplicitConstructor(int prop1)
+ {
+ Prop1 = prop1;
+ Prop2 = Prop2Constant;
+ }
+ }
+
+ [MessagePackObject(true)]
+ public struct DefaultValueStringKeyStructWithExplicitConstructor
+ {
+ public const int Prop2Constant = 198;
+
+ public int Prop1 { get; set; }
+
+ public int Prop2 { get; set; }
+
+ public DefaultValueStringKeyStructWithExplicitConstructor(int prop1)
+ {
+ Prop1 = prop1;
+ Prop2 = Prop2Constant;
+ }
+ }
+
+ [MessagePackObject]
+ public class DefaultValueIntKeyClassWithoutExplicitConstructor
+ {
+ public const int Prop1Constant = 33;
+ public const int Prop2Constant = -4;
+
+ [Key(0)]
+ public int Prop1 { get; set; } = Prop1Constant;
+
+ [Key(1)]
+ public int Prop2 { get; set; } = Prop2Constant;
+ }
+
+ [MessagePackObject]
+ public class DefaultValueIntKeyClassWithExplicitConstructor
+ {
+ public const int Prop2Constant = -109;
+
+ [Key(0)]
+ public int Prop1 { get; set; }
+
+ [Key(1)]
+ public int Prop2 { get; set; }
+
+ public DefaultValueIntKeyClassWithExplicitConstructor(int prop1)
+ {
+ Prop1 = prop1;
+ Prop2 = Prop2Constant;
+ }
+ }
+
+ [MessagePackObject]
+ public struct DefaultValueIntKeyStructWithExplicitConstructor
+ {
+ public const int Prop2Constant = 31;
+
+ [Key(0)]
+ public int Prop1 { get; set; }
+
+ [Key(1)]
+ public int Prop2 { get; set; }
+
+ public DefaultValueIntKeyStructWithExplicitConstructor(int prop1)
+ {
+ Prop1 = prop1;
+ Prop2 = Prop2Constant;
+ }
+ }
+
[DataContract]
public class BaseClassWithVirtualProperty
{
@@ -370,6 +653,32 @@ namespace MessagePack.Tests
public string Name { get; set; }
}
+#if !UNITY_2018_3_OR_NEWER
+ [MessagePackObject]
+ public class Person
+ {
+ [Key(0)]
+ public string Name { get; init; }
+ }
+
+ [MessagePackObject]
+ public class GenericPerson<T>
+ {
+ [Key(0)]
+ public string Name { get; init; }
+ }
+
+ [MessagePackObject]
+ public class GenericPersonWithCtor<T>
+ {
+ [SerializationConstructor]
+ public GenericPersonWithCtor(string name) => this.Name = name;
+
+ [Key(0)]
+ public string Name { get; init; }
+ }
+#endif
+
[MessagePackObject(true)]
public class ClassWithPropertySetterAndDummyCtor
{
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/ExpandoObjectTests.cs b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/ExpandoObjectTests.cs
index 45b17ede..99f3b808 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/ExpandoObjectTests.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/ExpandoObjectTests.cs
@@ -1,6 +1,8 @@
// Copyright (c) All contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+#if !UNITY_2018_3_OR_NEWER
+
using System.Dynamic;
using System.Runtime.Serialization;
using MessagePack.Resolvers;
@@ -115,3 +117,5 @@ namespace MessagePack.Tests
}
}
}
+
+#endif
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/FormatterTest.cs b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/FormatterTest.cs
index d2b18a79..d74e4ba5 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/FormatterTest.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/FormatterTest.cs
@@ -312,5 +312,16 @@ namespace MessagePack.Tests
var relative = new Uri("/me/", UriKind.Relative);
this.Convert(relative).ToString().Is("/me/");
}
+
+#if NET5_0_OR_GREATER
+
+ [Fact]
+ public void HalfTest()
+ {
+ Convert((Half)1.34f).Is((Half)1.34f);
+ Convert((Half)0).Is((Half)0);
+ }
+
+#endif
}
}
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/MessagePackFormatterPerFieldTest.cs b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/MessagePackFormatterPerFieldTest.cs
index 6be33a46..b0dca2c3 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/MessagePackFormatterPerFieldTest.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/MessagePackFormatterPerFieldTest.cs
@@ -5,16 +5,27 @@ using System;
using System.Buffers;
using System.Collections.Generic;
using System.Linq;
+using System.Net.Sockets;
+using System.Reflection;
+using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
using MessagePack.Formatters;
using MessagePack.Resolvers;
using Xunit;
+using Xunit.Abstractions;
namespace MessagePack.Tests
{
public class MessagePackFormatterPerFieldTest
{
+ private readonly ITestOutputHelper logger;
+
+ public MessagePackFormatterPerFieldTest(ITestOutputHelper logger)
+ {
+ this.logger = logger;
+ }
+
[MessagePackObject]
public class MyClass
{
@@ -105,5 +116,129 @@ namespace MessagePack.Tests
r2.MyProperty4.Is("bar");
}
}
+
+ [MessagePackObject]
+ public class BlockFormattedIntegers
+ {
+ [Key(0)] [MessagePackFormatter(typeof(ForceByteBlockFormatter))] public byte UInt8Property { get; set; }
+
+ [Key(1)] [MessagePackFormatter(typeof(ForceUInt16BlockFormatter))] public ushort UInt16Property { get; set; }
+
+ [Key(2)] [MessagePackFormatter(typeof(ForceUInt32BlockFormatter))] public uint UInt32Property { get; set; }
+
+ [Key(3)] [MessagePackFormatter(typeof(ForceUInt64BlockFormatter))] public ulong UInt64Property { get; set; }
+
+ [Key(4)] [MessagePackFormatter(typeof(ForceSByteBlockFormatter))] public sbyte Int8Property { get; set; }
+
+ [Key(5)] [MessagePackFormatter(typeof(ForceInt16BlockFormatter))] public short Int16Property { get; set; }
+
+ [Key(6)] [MessagePackFormatter(typeof(ForceInt32BlockFormatter))] public int Int32Property { get; set; }
+
+ [Key(7)] [MessagePackFormatter(typeof(ForceInt64BlockFormatter))] public long Int64Property { get; set; }
+
+ [Key(8)] [MessagePackFormatter(typeof(NullableForceByteBlockFormatter))] public byte? NullableUInt8Property { get; set; }
+
+ [Key(9)] [MessagePackFormatter(typeof(NullableForceUInt16BlockFormatter))] public ushort? NullableUInt16Property { get; set; }
+
+ [Key(10)] [MessagePackFormatter(typeof(NullableForceUInt32BlockFormatter))] public uint? NullableUInt32Property { get; set; }
+
+ [Key(11)] [MessagePackFormatter(typeof(NullableForceUInt64BlockFormatter))] public ulong? NullableUInt64Property { get; set; }
+
+ [Key(12)] [MessagePackFormatter(typeof(NullableForceSByteBlockFormatter))] public sbyte? NullableInt8Property { get; set; }
+
+ [Key(13)] [MessagePackFormatter(typeof(NullableForceInt16BlockFormatter))] public short? NullableInt16Property { get; set; }
+
+ [Key(14)] [MessagePackFormatter(typeof(NullableForceInt32BlockFormatter))] public int? NullableInt32Property { get; set; }
+
+ [Key(15)] [MessagePackFormatter(typeof(NullableForceInt64BlockFormatter))] public long? NullableInt64Property { get; set; }
+ }
+
+ /// <summary>
+ /// Asserts that every formatter offers the public API required for use by
+ /// <see cref="MessagePackFormatterAttribute"/>.
+ /// </summary>
+ [Fact]
+ public void AllFormattersOfferAreAvailableViaAttribute()
+ {
+ var formatters = (from type in typeof(ForceByteBlockFormatter).Assembly.GetTypes()
+ where typeof(IMessagePackFormatter).IsAssignableFrom(type) && !type.IsAbstract
+ let ctor = GetDefaultConstructor(type)
+ where ctor is object // skip formatters that require special initialization.
+ select new { Type = type, DefaultConstructor = ctor }).ToList();
+ this.logger.WriteLine("Found {0} applicable formatters to check.", formatters.Count);
+
+ Assert.All(formatters, formatter => Assert.True(formatter.DefaultConstructor.IsPublic || UsesSingletonPattern(formatter.Type)));
+ }
+
+ [Fact]
+ public void ForceBlockFormatters()
+ {
+ var block = new BlockFormattedIntegers
+ {
+ UInt8Property = 1,
+ UInt16Property = 2,
+ UInt32Property = 3,
+ UInt64Property = 4,
+
+ Int8Property = 1,
+ Int16Property = 2,
+ Int32Property = 3,
+ Int64Property = 4,
+
+ NullableUInt8Property = 1,
+ NullableUInt16Property = 2,
+ NullableUInt32Property = 3,
+ NullableUInt64Property = 4,
+
+ NullableInt8Property = 1,
+ NullableInt16Property = 2,
+ NullableInt32Property = 3,
+ NullableInt64Property = 4,
+ };
+ byte[] packed = MessagePackSerializer.Serialize(block, MessagePackSerializerOptions.Standard);
+ var reader = new MessagePackReader(packed);
+
+ reader.ReadArrayHeader();
+
+ Assert.Equal(MessagePackCode.UInt8, reader.NextCode);
+ Assert.Equal(1, reader.ReadByte());
+ Assert.Equal(MessagePackCode.UInt16, reader.NextCode);
+ Assert.Equal(2, reader.ReadUInt16());
+ Assert.Equal(MessagePackCode.UInt32, reader.NextCode);
+ Assert.Equal(3u, reader.ReadUInt32());
+ Assert.Equal(MessagePackCode.UInt64, reader.NextCode);
+ Assert.Equal(4u, reader.ReadUInt64());
+
+ Assert.Equal(MessagePackCode.Int8, reader.NextCode);
+ Assert.Equal(1, reader.ReadSByte());
+ Assert.Equal(MessagePackCode.Int16, reader.NextCode);
+ Assert.Equal(2, reader.ReadInt16());
+ Assert.Equal(MessagePackCode.Int32, reader.NextCode);
+ Assert.Equal(3, reader.ReadInt32());
+ Assert.Equal(MessagePackCode.Int64, reader.NextCode);
+ Assert.Equal(4, reader.ReadInt64());
+
+ Assert.Equal(MessagePackCode.UInt8, reader.NextCode);
+ Assert.Equal(1, reader.ReadByte());
+ Assert.Equal(MessagePackCode.UInt16, reader.NextCode);
+ Assert.Equal(2, reader.ReadUInt16());
+ Assert.Equal(MessagePackCode.UInt32, reader.NextCode);
+ Assert.Equal(3u, reader.ReadUInt32());
+ Assert.Equal(MessagePackCode.UInt64, reader.NextCode);
+ Assert.Equal(4u, reader.ReadUInt64());
+
+ Assert.Equal(MessagePackCode.Int8, reader.NextCode);
+ Assert.Equal(1, reader.ReadSByte());
+ Assert.Equal(MessagePackCode.Int16, reader.NextCode);
+ Assert.Equal(2, reader.ReadInt16());
+ Assert.Equal(MessagePackCode.Int32, reader.NextCode);
+ Assert.Equal(3, reader.ReadInt32());
+ Assert.Equal(MessagePackCode.Int64, reader.NextCode);
+ Assert.Equal(4, reader.ReadInt64());
+ }
+
+ private static ConstructorInfo GetDefaultConstructor(Type formatterType) => formatterType.GetConstructors(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).FirstOrDefault(c => c.GetParameters().Length == 0);
+
+ private static bool UsesSingletonPattern(Type formatterType) => formatterType.GetField("Instance", BindingFlags.Static | BindingFlags.Public)?.IsInitOnly is true;
}
}
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/MessagePackSerializerOptionsTests.cs b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/MessagePackSerializerOptionsTests.cs
index 96bec149..0db5157c 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/MessagePackSerializerOptionsTests.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/MessagePackSerializerOptionsTests.cs
@@ -1,6 +1,7 @@
// Copyright (c) All contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+using System;
using MessagePack;
using MessagePack.Resolvers;
using Xunit;
@@ -13,7 +14,8 @@ public class MessagePackSerializerOptionsTests
.WithOmitAssemblyVersion(true)
.WithResolver(BuiltinResolver.Instance)
.WithOldSpec(false)
- .WithSecurity(MySecurityOptions.Instance);
+ .WithSecurity(MySecurityOptions.Instance)
+ .WithSuggestedContiguousMemorySize(64 * 1024);
[Fact]
public void AllowAssemblyVersionMismatch()
@@ -37,6 +39,26 @@ public class MessagePackSerializerOptionsTests
}
[Fact]
+ public void CompressionMinLength()
+ {
+ Assert.Equal(64, MessagePackSerializerOptions.Standard.CompressionMinLength);
+ Assert.Throws<ArgumentOutOfRangeException>(() => MessagePackSerializerOptions.Standard.WithCompressionMinLength(0));
+ Assert.Throws<ArgumentOutOfRangeException>(() => MessagePackSerializerOptions.Standard.WithCompressionMinLength(-1));
+ MessagePackSerializerOptions options = MessagePackSerializerOptions.Standard.WithCompressionMinLength(128);
+ Assert.Equal(128, options.CompressionMinLength);
+ }
+
+ [Fact]
+ public void SuggestedContiguousMemorySize()
+ {
+ Assert.Equal(1024 * 1024, MessagePackSerializerOptions.Standard.SuggestedContiguousMemorySize);
+ Assert.Throws<ArgumentOutOfRangeException>(() => MessagePackSerializerOptions.Standard.WithSuggestedContiguousMemorySize(0));
+ Assert.Throws<ArgumentOutOfRangeException>(() => MessagePackSerializerOptions.Standard.WithSuggestedContiguousMemorySize(4));
+ MessagePackSerializerOptions options = MessagePackSerializerOptions.Standard.WithSuggestedContiguousMemorySize(512);
+ Assert.Equal(512, options.SuggestedContiguousMemorySize);
+ }
+
+ [Fact]
public void OldSpec()
{
Assert.Null(MessagePackSerializerOptions.Standard.OldSpec);
@@ -63,6 +85,7 @@ public class MessagePackSerializerOptionsTests
var mutated = NonDefaultOptions.WithOldSpec(true);
Assert.True(mutated.OldSpec.Value);
Assert.Equal(NonDefaultOptions.Compression, mutated.Compression);
+ Assert.Equal(NonDefaultOptions.SuggestedContiguousMemorySize, mutated.SuggestedContiguousMemorySize);
Assert.Equal(NonDefaultOptions.AllowAssemblyVersionMismatch, mutated.AllowAssemblyVersionMismatch);
Assert.Equal(NonDefaultOptions.OmitAssemblyVersion, mutated.OmitAssemblyVersion);
Assert.Same(NonDefaultOptions.Resolver, mutated.Resolver);
@@ -82,11 +105,25 @@ public class MessagePackSerializerOptionsTests
}
[Fact]
+ public void WithSuggestedContiguousMemorySize_PreservesOtherProperties()
+ {
+ var mutated = NonDefaultOptions.WithSuggestedContiguousMemorySize(612);
+ Assert.Equal(612, mutated.SuggestedContiguousMemorySize);
+ Assert.Equal(NonDefaultOptions.Compression, mutated.Compression);
+ Assert.Equal(NonDefaultOptions.OldSpec, mutated.OldSpec);
+ Assert.Equal(NonDefaultOptions.AllowAssemblyVersionMismatch, mutated.AllowAssemblyVersionMismatch);
+ Assert.Equal(NonDefaultOptions.OmitAssemblyVersion, mutated.OmitAssemblyVersion);
+ Assert.Same(NonDefaultOptions.Resolver, mutated.Resolver);
+ Assert.Same(MySecurityOptions.Instance, mutated.Security);
+ }
+
+ [Fact]
public void WithAllowAssemblyVersionMismatch_PreservesOtherProperties()
{
var mutated = NonDefaultOptions.WithAllowAssemblyVersionMismatch(false);
Assert.False(mutated.AllowAssemblyVersionMismatch);
Assert.Equal(NonDefaultOptions.Compression, mutated.Compression);
+ Assert.Equal(NonDefaultOptions.SuggestedContiguousMemorySize, mutated.SuggestedContiguousMemorySize);
Assert.Equal(NonDefaultOptions.OldSpec, mutated.OldSpec);
Assert.Equal(NonDefaultOptions.OmitAssemblyVersion, mutated.OmitAssemblyVersion);
Assert.Same(NonDefaultOptions.Resolver, mutated.Resolver);
@@ -99,6 +136,7 @@ public class MessagePackSerializerOptionsTests
var mutated = NonDefaultOptions.WithOmitAssemblyVersion(false);
Assert.False(mutated.OmitAssemblyVersion);
Assert.Equal(NonDefaultOptions.Compression, mutated.Compression);
+ Assert.Equal(NonDefaultOptions.SuggestedContiguousMemorySize, mutated.SuggestedContiguousMemorySize);
Assert.Equal(NonDefaultOptions.OldSpec, mutated.OldSpec);
Assert.Equal(NonDefaultOptions.AllowAssemblyVersionMismatch, mutated.AllowAssemblyVersionMismatch);
Assert.Same(NonDefaultOptions.Resolver, mutated.Resolver);
@@ -111,6 +149,7 @@ public class MessagePackSerializerOptionsTests
var mutated = NonDefaultOptions.WithResolver(ContractlessStandardResolver.Instance);
Assert.Same(ContractlessStandardResolver.Instance, mutated.Resolver);
Assert.Equal(NonDefaultOptions.Compression, mutated.Compression);
+ Assert.Equal(NonDefaultOptions.SuggestedContiguousMemorySize, mutated.SuggestedContiguousMemorySize);
Assert.Equal(NonDefaultOptions.OldSpec, mutated.OldSpec);
Assert.Equal(NonDefaultOptions.AllowAssemblyVersionMismatch, mutated.AllowAssemblyVersionMismatch);
Assert.Equal(NonDefaultOptions.OmitAssemblyVersion, mutated.OmitAssemblyVersion);
@@ -124,6 +163,7 @@ public class MessagePackSerializerOptionsTests
Assert.Same(MessagePackSecurity.TrustedData, mutated.Security);
Assert.Same(NonDefaultOptions.Resolver, mutated.Resolver);
Assert.Equal(NonDefaultOptions.Compression, mutated.Compression);
+ Assert.Equal(NonDefaultOptions.SuggestedContiguousMemorySize, mutated.SuggestedContiguousMemorySize);
Assert.Equal(NonDefaultOptions.OldSpec, mutated.OldSpec);
Assert.Equal(NonDefaultOptions.AllowAssemblyVersionMismatch, mutated.AllowAssemblyVersionMismatch);
Assert.Equal(NonDefaultOptions.OmitAssemblyVersion, mutated.OmitAssemblyVersion);
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/MessagePackWriterTests.cs b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/MessagePackWriterTests.cs
index 5d06e78d..85d29365 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/MessagePackWriterTests.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/MessagePackWriterTests.cs
@@ -10,6 +10,7 @@ using System.Threading;
using Nerdbank.Streams;
using Xunit;
using Xunit.Abstractions;
+using MessagePackWriterCref = MessagePack.MessagePackWriter;
namespace MessagePack.Tests
{
@@ -33,7 +34,7 @@ namespace MessagePack.Tests
#endif
/// <summary>
- /// Verifies that <see cref="MessagePackWriter.WriteRaw(ReadOnlySpan{byte})"/>
+ /// Verifies that <see cref="MessagePackWriterCref.WriteRaw(ReadOnlySpan{byte})"/>
/// accepts a span that came from stackalloc.
/// </summary>
[Fact]
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/StandardClassLibraryFormatterTests.cs b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/StandardClassLibraryFormatterTests.cs
index 6d4d9b34..35123476 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/StandardClassLibraryFormatterTests.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/StandardClassLibraryFormatterTests.cs
@@ -2,12 +2,21 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
+using Nerdbank.Streams;
using Xunit;
+using Xunit.Abstractions;
namespace MessagePack.Tests
{
public class StandardClassLibraryFormatterTests : TestBase
{
+ private readonly ITestOutputHelper logger;
+
+ public StandardClassLibraryFormatterTests(ITestOutputHelper logger)
+ {
+ this.logger = logger;
+ }
+
[Fact]
public void SystemType_Serializable()
{
@@ -25,5 +34,103 @@ namespace MessagePack.Tests
Type type2 = MessagePackSerializer.Deserialize<Type>(msgpack, MessagePackSerializerOptions.Standard);
Assert.Equal(type, type2);
}
+
+ [Fact]
+ public void DeserializeByteArrayFromFixArray()
+ {
+ var input = new byte[] { 0x93, 0x01, 0x02, 0x03 };
+ byte[] byte_array = MessagePackSerializer.Deserialize<byte[]>(input);
+ Assert.Equal(new byte[] { 1, 2, 3 }, byte_array);
+ }
+
+ [Fact]
+ public void DeserializeByteArrayFromFixArray_LargerNumbers()
+ {
+ var input = new byte[] { 0x93, 0x01, 0x02, 0xCC, 0xD4 };
+ byte[] byte_array = MessagePackSerializer.Deserialize<byte[]>(input);
+ Assert.Equal(new byte[] { 1, 2, 212 }, byte_array);
+ }
+
+ [Fact]
+ public void DeserializeByteArrayFromFixArray_LargerThanByte()
+ {
+ var input = new byte[] { 0x93, 0x01, 0x02, 0xCD, 0x08, 0x48 }; // 1, 2, 2120
+ var ex = Assert.Throws<MessagePackSerializationException>(() => MessagePackSerializer.Deserialize<byte[]>(input));
+ this.logger.WriteLine(ex.ToString());
+ }
+
+ [Fact]
+ public void DeserializeByteArrayFromFixArray_ZeroLength()
+ {
+ var input = new byte[] { 0x90 }; // [ ]
+ byte[] actual = MessagePackSerializer.Deserialize<byte[]>(input);
+ Assert.Empty(actual);
+
+ // Make sure we're optimized to reuse singleton empty arrays.
+ Assert.Same(Array.Empty<byte>(), actual);
+ }
+
+ [Fact]
+ public void DeserializeByteArrayFromFixArray_Array32()
+ {
+ var input = new byte[] { 0xDD, 0, 0, 0, 3, 1, 2, 3 };
+ byte[] byte_array = MessagePackSerializer.Deserialize<byte[]>(input);
+ Assert.Equal(new byte[] { 1, 2, 3 }, byte_array);
+ }
+
+#if NET6_0_OR_GREATER
+ [Fact]
+ public void DateOnly()
+ {
+ var value = new DateOnly(2012, 3, 5);
+ this.AssertRoundtrip(value);
+ this.AssertRoundtrip<DateOnly?>(value);
+ this.AssertRoundtrip(new[] { value });
+ }
+
+ [Fact]
+ public void TimeOnly()
+ {
+ TimeOnly lowRes = new TimeOnly(5, 4, 3);
+ this.AssertRoundtrip(lowRes);
+ this.AssertRoundtrip<TimeOnly?>(lowRes);
+ this.AssertRoundtrip(new[] { lowRes });
+
+ TimeOnly mediumRes = new TimeOnly(5, 4, 3, 2);
+ this.AssertRoundtrip(mediumRes);
+ this.AssertRoundtrip<TimeOnly?>(mediumRes);
+ this.AssertRoundtrip(new[] { mediumRes });
+
+ TimeOnly highRes = new TimeOnly(lowRes.Ticks + 1);
+ this.AssertRoundtrip(highRes);
+ this.AssertRoundtrip(System.TimeOnly.MaxValue);
+ }
+#endif
+
+ private void AssertRoundtrip<T>(T value)
+ {
+ Assert.Equal(value, this.Roundtrip(value, breakupBuffer: false));
+ Assert.Equal(value, this.Roundtrip(value, breakupBuffer: true));
+ }
+
+ private T Roundtrip<T>(T value, bool breakupBuffer = false)
+ {
+ byte[] msgpack = MessagePackSerializer.Serialize(value, MessagePackSerializerOptions.Standard);
+ this.logger.WriteLine("{0} 0x{1}", value, TestUtilities.ToHex(msgpack));
+
+ if (breakupBuffer)
+ {
+ using (Sequence<byte> seq = new Sequence<byte>())
+ {
+ seq.Append(msgpack.AsMemory(0, msgpack.Length - 1));
+ seq.Append(msgpack.AsMemory(msgpack.Length - 1, 1));
+ return MessagePackSerializer.Deserialize<T>(seq, MessagePackSerializerOptions.Standard);
+ }
+ }
+ else
+ {
+ return MessagePackSerializer.Deserialize<T>(msgpack, MessagePackSerializerOptions.Standard);
+ }
+ }
}
}
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/StringInterningTests.cs b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/StringInterningTests.cs
new file mode 100644
index 00000000..d4e98f77
--- /dev/null
+++ b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/StringInterningTests.cs
@@ -0,0 +1,107 @@
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using MessagePack.Formatters;
+using MessagePack.Resolvers;
+using Nerdbank.Streams;
+using Xunit;
+
+namespace MessagePack.Tests
+{
+ public class StringInterningTests
+ {
+ [Fact]
+ public void NullString()
+ {
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteNil();
+ writer.Flush();
+
+ var reader = new MessagePackReader(seq);
+ string result = StandardResolver.Instance.GetFormatter<string>().Deserialize(ref reader, MessagePackSerializerOptions.Standard);
+ Assert.Null(result);
+ }
+
+ [Fact]
+ public void EmptyString()
+ {
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.Write(string.Empty);
+ writer.Flush();
+
+ var reader = new MessagePackReader(seq);
+ string result = StandardResolver.Instance.GetFormatter<string>().Deserialize(ref reader, MessagePackSerializerOptions.Standard);
+ Assert.Same(string.Empty, result);
+ }
+
+ [Theory]
+ [InlineData(3)]
+ [InlineData(1024 * 1024)]
+ public void EquivalentStringsGetSharedInstance(int length)
+ {
+ string originalValue1 = new string('a', length);
+ string originalValue3 = new string('b', length);
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.Write(originalValue1);
+ writer.Write(originalValue1);
+ writer.Write(originalValue3);
+ writer.Flush();
+
+ var reader = new MessagePackReader(seq);
+ var formatter = new StringInterningFormatter();
+ string value1 = formatter.Deserialize(ref reader, MessagePackSerializerOptions.Standard);
+ string value2 = formatter.Deserialize(ref reader, MessagePackSerializerOptions.Standard);
+ string value3 = formatter.Deserialize(ref reader, MessagePackSerializerOptions.Standard);
+
+ Assert.Equal(originalValue1, value1);
+ Assert.Equal(originalValue3, value3);
+
+ Assert.Same(value1, value2);
+ }
+
+ [Fact]
+ public void StringMemberInterning()
+ {
+ ClassOfStrings before = new ClassOfStrings { InternedString = "abc", OrdinaryString = "def" };
+ ClassOfStrings after1 = MessagePackSerializer.Deserialize<ClassOfStrings>(MessagePackSerializer.Serialize(before, MessagePackSerializerOptions.Standard), MessagePackSerializerOptions.Standard);
+ ClassOfStrings after2 = MessagePackSerializer.Deserialize<ClassOfStrings>(MessagePackSerializer.Serialize(before, MessagePackSerializerOptions.Standard), MessagePackSerializerOptions.Standard);
+ Assert.Equal(after1.InternedString, after2.InternedString);
+ Assert.Equal(after1.OrdinaryString, after2.OrdinaryString);
+
+ Assert.Same(after1.InternedString, after2.InternedString);
+ Assert.NotSame(after1.OrdinaryString, after2.OrdinaryString);
+ }
+
+ [Fact]
+ public void StringMemberInterning_CustomResolver()
+ {
+ var options = MessagePackSerializerOptions.Standard.WithResolver(
+ CompositeResolver.Create(
+ new IMessagePackFormatter[] { new StringInterningFormatter() },
+ new IFormatterResolver[] { StandardResolver.Instance }));
+
+ ClassOfStrings before = new ClassOfStrings { InternedString = "abc", OrdinaryString = "def" };
+ ClassOfStrings after1 = MessagePackSerializer.Deserialize<ClassOfStrings>(MessagePackSerializer.Serialize(before, options), options);
+ ClassOfStrings after2 = MessagePackSerializer.Deserialize<ClassOfStrings>(MessagePackSerializer.Serialize(before, options), options);
+ Assert.Equal(after1.InternedString, after2.InternedString);
+ Assert.Equal(after1.OrdinaryString, after2.OrdinaryString);
+
+ Assert.Same(after1.InternedString, after2.InternedString);
+ Assert.Same(after1.OrdinaryString, after2.OrdinaryString);
+ }
+
+ [MessagePackObject]
+ public class ClassOfStrings
+ {
+ [Key(0)]
+ [MessagePackFormatter(typeof(StringInterningFormatter))]
+ public string InternedString { get; set; }
+
+ [Key(1)]
+ public string OrdinaryString { get; set; }
+ }
+ }
+}
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/StringInterningTests.cs.meta b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/StringInterningTests.cs.meta
new file mode 100644
index 00000000..a6117b9c
--- /dev/null
+++ b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/StringInterningTests.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 593d09755237d984a95626a65167c3a7
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/TestUtilities.cs b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/TestUtilities.cs
index 0a4bf9fb..abc85b0f 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/TestUtilities.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/Tests/ShareTests/TestUtilities.cs
@@ -15,6 +15,8 @@ namespace MessagePack.Tests
/// Gets a value indicating whether the mono runtime is executing this code.
/// </summary>
internal static bool IsRunningOnMono => Type.GetType("Mono.Runtime") != null;
+
+ internal static string ToHex(byte[] buffer) => BitConverter.ToString(buffer).Replace("-", string.Empty).ToLowerInvariant();
}
public class NullTestOutputHelper : ITestOutputHelper
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/Tests/Shims/XUnit.cs b/src/MessagePack.UnityClient/Assets/Scripts/Tests/Shims/XUnit.cs
index 86efef46..f1eee269 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/Tests/Shims/XUnit.cs
+++ b/src/MessagePack.UnityClient/Assets/Scripts/Tests/Shims/XUnit.cs
@@ -87,6 +87,19 @@ namespace Xunit
NUnit.Framework.Assert.IsNull(expected);
}
+ public static void Empty(System.Collections.IEnumerable enumerable)
+ {
+ Assert.False(enumerable.GetEnumerator().MoveNext());
+ }
+
+ public static void All<T>(IEnumerable<T> collection, Action<T> predicate)
+ {
+ foreach (T item in collection)
+ {
+ predicate(item);
+ }
+ }
+
public static T IsType<T>(object o)
{
NUnit.Framework.Assert.AreEqual(typeof(T), o.GetType());
@@ -117,6 +130,11 @@ namespace Xunit
{
NUnit.Framework.Assert.AreSame(expected, actual);
}
+
+ public static void NotSame(object expected, object actual)
+ {
+ NUnit.Framework.Assert.AreNotSame(expected, actual);
+ }
}
[Serializable]
diff --git a/src/MessagePack.UnityClient/Assets/Scripts/Tests/Tests.asmdef b/src/MessagePack.UnityClient/Assets/Scripts/Tests/Tests.asmdef
index 9fb3f171..b02d5a89 100644
--- a/src/MessagePack.UnityClient/Assets/Scripts/Tests/Tests.asmdef
+++ b/src/MessagePack.UnityClient/Assets/Scripts/Tests/Tests.asmdef
@@ -1,19 +1,30 @@
{
"name": "MessagePack.Tests",
+ "rootNamespace": "",
"references": [
"MessagePack",
"MessagePack.Annotations",
- "RuntimeUnitTestToolkit"
- ],
- "optionalUnityReferences": [
- "TestAssemblies"
+ "RuntimeUnitTestToolkit",
+ "UnityEngine.TestRunner",
+ "UnityEditor.TestRunner"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": true,
- "overrideReferences": false,
- "precompiledReferences": [],
- "autoReferenced": true,
- "defineConstraints": [],
- "versionDefines": []
+ "overrideReferences": true,
+ "precompiledReferences": [
+ "System.Memory.dll",
+ "System.Buffers.dll",
+ "System.Threading.Tasks.Extensions.dll",
+ "System.Runtime.CompilerServices.Unsafe.dll",
+ "System.Runtime.Extensions.dll",
+ "nunit.framework.dll",
+ "MsgPack.dll"
+ ],
+ "autoReferenced": false,
+ "defineConstraints": [
+ "UNITY_INCLUDE_TESTS"
+ ],
+ "versionDefines": [],
+ "noEngineReferences": false
} \ No newline at end of file
diff --git a/src/MessagePack.UnityClient/copy_assets.bat b/src/MessagePack.UnityClient/copy_assets.bat
index bb7232df..c2b03f0e 100644
--- a/src/MessagePack.UnityClient/copy_assets.bat
+++ b/src/MessagePack.UnityClient/copy_assets.bat
@@ -11,6 +11,7 @@
echo F | xcopy "..\..\bin\MessagePack\release\netstandard2.0\publish\System.Buffers.dll" ".\Assets\Plugins\System.Buffers.dll" /Y /I
echo F | xcopy "..\..\bin\MessagePack\release\netstandard2.0\publish\System.Memory.dll" ".\Assets\Plugins\System.Memory.dll" /Y /I
echo F | xcopy "..\..\bin\MessagePack\release\netstandard2.0\publish\System.Runtime.CompilerServices.Unsafe.dll" ".\Assets\Plugins\System.Runtime.CompilerServices.Unsafe.dll" /Y /I
+echo F | xcopy "..\..\bin\MessagePack\release\netstandard2.0\publish\Microsoft.NET.StringTools.dll" ".\Assets\Plugins\Microsoft.NET.StringTools.dll" /Y /I
echo F | xcopy "..\..\bin\MessagePack\release\netstandard2.0\publish\System.Threading.Tasks.Extensions.dll" ".\Assets\Plugins\System.Threading.Tasks.Extensions.dll" /Y /I
@popd
diff --git a/src/MessagePack.UnityClient/copy_assets.sh b/src/MessagePack.UnityClient/copy_assets.sh
index 9912ab97..7743fd66 100755
--- a/src/MessagePack.UnityClient/copy_assets.sh
+++ b/src/MessagePack.UnityClient/copy_assets.sh
@@ -21,4 +21,5 @@ fi
cp ${SCRIPT_DIR}/../../bin/MessagePack/${BUILDCONFIGURATION}/netstandard2.0/publish/System.Buffers.dll ${SCRIPT_DIR}/Assets/Plugins/System.Buffers.dll
cp ${SCRIPT_DIR}/../../bin/MessagePack/${BUILDCONFIGURATION}/netstandard2.0/publish/System.Memory.dll ${SCRIPT_DIR}/Assets/Plugins/System.Memory.dll
cp ${SCRIPT_DIR}/../../bin/MessagePack/${BUILDCONFIGURATION}/netstandard2.0/publish/System.Runtime.CompilerServices.Unsafe.dll ${SCRIPT_DIR}/Assets/Plugins/System.Runtime.CompilerServices.Unsafe.dll
+cp ${SCRIPT_DIR}/../../bin/MessagePack/${BUILDCONFIGURATION}/netstandard2.0/publish/Microsoft.NET.StringTools.dll ${SCRIPT_DIR}/Assets/Plugins/Microsoft.NET.StringTools.dll
cp ${SCRIPT_DIR}/../../bin/MessagePack/${BUILDCONFIGURATION}/netstandard2.0/publish/System.Threading.Tasks.Extensions.dll ${SCRIPT_DIR}/Assets/Plugins/System.Threading.Tasks.Extensions.dll
diff --git a/src/MessagePack/MessagePack.csproj b/src/MessagePack/MessagePack.csproj
index f0d53003..801ab7de 100644
--- a/src/MessagePack/MessagePack.csproj
+++ b/src/MessagePack/MessagePack.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>netstandard2.0;netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
+ <TargetFrameworks>netstandard2.0;netcoreapp3.1;net6.0</TargetFrameworks>
<NoWarn>$(NoWarn);CS0649</NoWarn>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<DefineConstants Condition=" '$(TargetFramework)' != 'netstandard2.0' ">$(DefineConstants);SPAN_BUILTIN</DefineConstants>
@@ -28,21 +28,20 @@
</ItemGroup>
<ItemGroup>
- <AdditionalFiles Include="PublicAPI.Shipped.txt" />
- <AdditionalFiles Include="PublicAPI.Unshipped.txt" />
+ <AdditionalFiles Include="$(TargetFramework)\PublicAPI.Shipped.txt" />
+ <AdditionalFiles Include="$(TargetFramework)\PublicAPI.Unshipped.txt" />
</ItemGroup>
<ItemGroup>
- <PackageReference Include="Roslyn.Diagnostics.Analyzers" Version="2.9.7" PrivateAssets="all" />
+ <PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.3" PrivateAssets="all" />
+ <PackageReference Include="Microsoft.NET.StringTools" Version="1.0.0" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetFramework)'!='netcoreapp3.1'">
- <PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="1.0.0" />
- <PackageReference Include="System.Collections.Immutable" Version="1.5.0" />
- <PackageReference Include="System.Reflection.Emit" Version="4.6.0" />
- <PackageReference Include="System.Reflection.Emit.Lightweight" Version="4.6.0" />
- <PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.3" />
- <PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.5.2" />
- <PackageReference Include="System.Memory" Version="4.5.3" />
+ <ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
+ <PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="6.0.0" />
+ <PackageReference Include="System.Collections.Immutable" Version="1.7.1" />
+ <PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
+ <PackageReference Include="System.Reflection.Emit.Lightweight" Version="4.7.0" />
+ <PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
</ItemGroup>
<ItemGroup>
diff --git a/src/MessagePack/MessagePackStreamReader.Arrays.cs b/src/MessagePack/MessagePackStreamReader.Arrays.cs
index 2735e27e..c44095b6 100644
--- a/src/MessagePack/MessagePackStreamReader.Arrays.cs
+++ b/src/MessagePack/MessagePackStreamReader.Arrays.cs
@@ -8,13 +8,39 @@ using System.IO;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
-using Nerdbank.Streams;
namespace MessagePack
{
public partial class MessagePackStreamReader : IDisposable
{
/// <summary>
+ /// Reads the next messagepack array header.
+ /// </summary>
+ /// <param name="cancellationToken">A cancellation token.</param>
+ /// <returns>
+ /// A task whose result is the length of the next array from the stream.
+ /// </returns>
+ /// <remarks>
+ /// Any extra bytes read (between the last complete message and the end of the stream) will be available via the <see cref="RemainingBytes"/> property.
+ /// </remarks>
+ public async ValueTask<int> ReadArrayHeaderAsync(CancellationToken cancellationToken)
+ {
+ this.RecycleLastMessage();
+
+ cancellationToken.ThrowIfCancellationRequested();
+ int count;
+ while (!this.TryReadArrayHeader(out count))
+ {
+ if (!await this.TryReadMoreDataAsync(cancellationToken).ConfigureAwait(false))
+ {
+ throw new EndOfStreamException("The stream ended before a map header could be found.");
+ }
+ }
+
+ return count;
+ }
+
+ /// <summary>
/// Reads the next messagepack array and produces each element individually.
/// </summary>
/// <param name="cancellationToken">A cancellation token.</param>
diff --git a/src/MessagePack/MessagePackStreamReader.Maps.cs b/src/MessagePack/MessagePackStreamReader.Maps.cs
new file mode 100644
index 00000000..7fa4f28d
--- /dev/null
+++ b/src/MessagePack/MessagePackStreamReader.Maps.cs
@@ -0,0 +1,62 @@
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.IO;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace MessagePack
+{
+ public partial class MessagePackStreamReader : IDisposable
+ {
+ /// <summary>
+ /// Reads the next messagepack map header.
+ /// </summary>
+ /// <param name="cancellationToken">A cancellation token.</param>
+ /// <returns>
+ /// A task whose result is the size of the next map from the stream.
+ /// </returns>
+ /// <remarks>
+ /// Any extra bytes read (between the last complete message and the end of the stream) will be available via the <see cref="RemainingBytes"/> property.
+ /// </remarks>
+ public async ValueTask<int> ReadMapHeaderAsync(CancellationToken cancellationToken)
+ {
+ this.RecycleLastMessage();
+
+ cancellationToken.ThrowIfCancellationRequested();
+ int count;
+ while (!this.TryReadMapHeader(out count))
+ {
+ if (!await this.TryReadMoreDataAsync(cancellationToken).ConfigureAwait(false))
+ {
+ throw new EndOfStreamException("The stream ended before a map header could be found.");
+ }
+ }
+
+ return count;
+ }
+
+ /// <summary>
+ /// Reads a map header from <see cref="ReadData"/> if there are enough bytes to do so.
+ /// </summary>
+ /// <param name="count">Receives the size of the map, if its header could be read.</param>
+ /// <returns><c>true</c> if the map header was found and complete; <c>false</c> if there were insufficient bytes to read the header.</returns>
+ /// <exception cref="MessagePackSerializationException">Thrown if the next msgpack structure is not a map header.</exception>
+ private bool TryReadMapHeader(out int count)
+ {
+ if (this.ReadData.Length > 0)
+ {
+ var reader = new MessagePackReader(this.ReadData);
+ if (reader.TryReadMapHeader(out count))
+ {
+ this.endOfLastMessage = reader.Position;
+ return true;
+ }
+ }
+
+ count = 0;
+ return false;
+ }
+ }
+}
diff --git a/src/MessagePack/PublicAPI.Unshipped.txt b/src/MessagePack/PublicAPI.Unshipped.txt
deleted file mode 100644
index d3118694..00000000
--- a/src/MessagePack/PublicAPI.Unshipped.txt
+++ /dev/null
@@ -1,127 +0,0 @@
-MessagePack.Formatters.ByteMemoryFormatter
-MessagePack.Formatters.ByteMemoryFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Memory<byte>
-MessagePack.Formatters.ByteMemoryFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Memory<byte> value, MessagePack.MessagePackSerializerOptions options) -> void
-MessagePack.Formatters.ByteReadOnlyMemoryFormatter
-MessagePack.Formatters.ByteReadOnlyMemoryFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.ReadOnlyMemory<byte>
-MessagePack.Formatters.ByteReadOnlyMemoryFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.ReadOnlyMemory<byte> value, MessagePack.MessagePackSerializerOptions options) -> void
-MessagePack.Formatters.ByteReadOnlySequenceFormatter
-MessagePack.Formatters.ByteReadOnlySequenceFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Buffers.ReadOnlySequence<byte>
-MessagePack.Formatters.ByteReadOnlySequenceFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Buffers.ReadOnlySequence<byte> value, MessagePack.MessagePackSerializerOptions options) -> void
-MessagePack.Formatters.ExpandoObjectFormatter
-MessagePack.Formatters.ExpandoObjectFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Dynamic.ExpandoObject
-MessagePack.Formatters.ExpandoObjectFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Dynamic.ExpandoObject value, MessagePack.MessagePackSerializerOptions options) -> void
-MessagePack.Formatters.ForceTypelessFormatter<T>
-MessagePack.Formatters.ForceTypelessFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T
-MessagePack.Formatters.ForceTypelessFormatter<T>.ForceTypelessFormatter() -> void
-MessagePack.Formatters.ForceTypelessFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T value, MessagePack.MessagePackSerializerOptions options) -> void
-MessagePack.Formatters.MemoryFormatter<T>
-MessagePack.Formatters.MemoryFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Memory<T>
-MessagePack.Formatters.MemoryFormatter<T>.MemoryFormatter() -> void
-MessagePack.Formatters.MemoryFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, System.Memory<T> value, MessagePack.MessagePackSerializerOptions options) -> void
-MessagePack.Formatters.NonGenericInterfaceCollectionFormatter
-MessagePack.Formatters.NonGenericInterfaceCollectionFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Collections.ICollection
-MessagePack.Formatters.NonGenericInterfaceCollectionFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Collections.ICollection value, MessagePack.MessagePackSerializerOptions options) -> void
-MessagePack.Formatters.NonGenericInterfaceEnumerableFormatter
-MessagePack.Formatters.NonGenericInterfaceEnumerableFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Collections.IEnumerable
-MessagePack.Formatters.NonGenericInterfaceEnumerableFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Collections.IEnumerable value, MessagePack.MessagePackSerializerOptions options) -> void
-MessagePack.Formatters.PrimitiveObjectFormatter.PrimitiveObjectFormatter() -> void
-MessagePack.Formatters.ReadOnlyMemoryFormatter<T>
-MessagePack.Formatters.ReadOnlyMemoryFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.ReadOnlyMemory<T>
-MessagePack.Formatters.ReadOnlyMemoryFormatter<T>.ReadOnlyMemoryFormatter() -> void
-MessagePack.Formatters.ReadOnlyMemoryFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, System.ReadOnlyMemory<T> value, MessagePack.MessagePackSerializerOptions options) -> void
-MessagePack.Formatters.ReadOnlySequenceFormatter<T>
-MessagePack.Formatters.ReadOnlySequenceFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Buffers.ReadOnlySequence<T>
-MessagePack.Formatters.ReadOnlySequenceFormatter<T>.ReadOnlySequenceFormatter() -> void
-MessagePack.Formatters.ReadOnlySequenceFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, System.Buffers.ReadOnlySequence<T> value, MessagePack.MessagePackSerializerOptions options) -> void
-MessagePack.Formatters.TypeFormatter<T>
-MessagePack.Formatters.TypeFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T
-MessagePack.Formatters.TypeFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T value, MessagePack.MessagePackSerializerOptions options) -> void
-MessagePack.Formatters.TypelessFormatter.TypelessFormatter() -> void
-MessagePack.ImmutableCollection.ImmutableArrayFormatter<T>
-MessagePack.ImmutableCollection.ImmutableArrayFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableArray<T>
-MessagePack.ImmutableCollection.ImmutableArrayFormatter<T>.ImmutableArrayFormatter() -> void
-MessagePack.ImmutableCollection.ImmutableArrayFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, System.Collections.Immutable.ImmutableArray<T> value, MessagePack.MessagePackSerializerOptions options) -> void
-MessagePack.ImmutableCollection.ImmutableCollectionResolver
-MessagePack.ImmutableCollection.ImmutableCollectionResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
-MessagePack.ImmutableCollection.ImmutableDictionaryFormatter<TKey, TValue>
-MessagePack.ImmutableCollection.ImmutableDictionaryFormatter<TKey, TValue>.ImmutableDictionaryFormatter() -> void
-MessagePack.ImmutableCollection.ImmutableHashSetFormatter<T>
-MessagePack.ImmutableCollection.ImmutableHashSetFormatter<T>.ImmutableHashSetFormatter() -> void
-MessagePack.ImmutableCollection.ImmutableListFormatter<T>
-MessagePack.ImmutableCollection.ImmutableListFormatter<T>.ImmutableListFormatter() -> void
-MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>
-MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>.Add(T value) -> void
-MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>.ImmutableQueueBuilder() -> void
-MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>.Q.get -> System.Collections.Immutable.ImmutableQueue<T>
-MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>.Q.set -> void
-MessagePack.ImmutableCollection.ImmutableQueueFormatter<T>
-MessagePack.ImmutableCollection.ImmutableQueueFormatter<T>.ImmutableQueueFormatter() -> void
-MessagePack.ImmutableCollection.ImmutableSortedDictionaryFormatter<TKey, TValue>
-MessagePack.ImmutableCollection.ImmutableSortedDictionaryFormatter<TKey, TValue>.ImmutableSortedDictionaryFormatter() -> void
-MessagePack.ImmutableCollection.ImmutableSortedSetFormatter<T>
-MessagePack.ImmutableCollection.ImmutableSortedSetFormatter<T>.ImmutableSortedSetFormatter() -> void
-MessagePack.ImmutableCollection.ImmutableStackFormatter<T>
-MessagePack.ImmutableCollection.ImmutableStackFormatter<T>.ImmutableStackFormatter() -> void
-MessagePack.ImmutableCollection.InterfaceImmutableDictionaryFormatter<TKey, TValue>
-MessagePack.ImmutableCollection.InterfaceImmutableDictionaryFormatter<TKey, TValue>.InterfaceImmutableDictionaryFormatter() -> void
-MessagePack.ImmutableCollection.InterfaceImmutableListFormatter<T>
-MessagePack.ImmutableCollection.InterfaceImmutableListFormatter<T>.InterfaceImmutableListFormatter() -> void
-MessagePack.ImmutableCollection.InterfaceImmutableQueueFormatter<T>
-MessagePack.ImmutableCollection.InterfaceImmutableQueueFormatter<T>.InterfaceImmutableQueueFormatter() -> void
-MessagePack.ImmutableCollection.InterfaceImmutableSetFormatter<T>
-MessagePack.ImmutableCollection.InterfaceImmutableSetFormatter<T>.InterfaceImmutableSetFormatter() -> void
-MessagePack.ImmutableCollection.InterfaceImmutableStackFormatter<T>
-MessagePack.ImmutableCollection.InterfaceImmutableStackFormatter<T>.InterfaceImmutableStackFormatter() -> void
-MessagePack.Resolvers.ExpandoObjectResolver
-override MessagePack.ImmutableCollection.ImmutableDictionaryFormatter<TKey, TValue>.Add(System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Builder collection, int index, TKey key, TValue value, MessagePack.MessagePackSerializerOptions options) -> void
-override MessagePack.ImmutableCollection.ImmutableDictionaryFormatter<TKey, TValue>.Complete(System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Builder intermediateCollection) -> System.Collections.Immutable.ImmutableDictionary<TKey, TValue>
-override MessagePack.ImmutableCollection.ImmutableDictionaryFormatter<TKey, TValue>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Builder
-override MessagePack.ImmutableCollection.ImmutableDictionaryFormatter<TKey, TValue>.GetSourceEnumerator(System.Collections.Immutable.ImmutableDictionary<TKey, TValue> source) -> System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Enumerator
-override MessagePack.ImmutableCollection.ImmutableHashSetFormatter<T>.Add(System.Collections.Immutable.ImmutableHashSet<T>.Builder collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
-override MessagePack.ImmutableCollection.ImmutableHashSetFormatter<T>.Complete(System.Collections.Immutable.ImmutableHashSet<T>.Builder intermediateCollection) -> System.Collections.Immutable.ImmutableHashSet<T>
-override MessagePack.ImmutableCollection.ImmutableHashSetFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableHashSet<T>.Builder
-override MessagePack.ImmutableCollection.ImmutableHashSetFormatter<T>.GetSourceEnumerator(System.Collections.Immutable.ImmutableHashSet<T> source) -> System.Collections.Immutable.ImmutableHashSet<T>.Enumerator
-override MessagePack.ImmutableCollection.ImmutableListFormatter<T>.Add(System.Collections.Immutable.ImmutableList<T>.Builder collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
-override MessagePack.ImmutableCollection.ImmutableListFormatter<T>.Complete(System.Collections.Immutable.ImmutableList<T>.Builder intermediateCollection) -> System.Collections.Immutable.ImmutableList<T>
-override MessagePack.ImmutableCollection.ImmutableListFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableList<T>.Builder
-override MessagePack.ImmutableCollection.ImmutableListFormatter<T>.GetSourceEnumerator(System.Collections.Immutable.ImmutableList<T> source) -> System.Collections.Immutable.ImmutableList<T>.Enumerator
-override MessagePack.ImmutableCollection.ImmutableQueueFormatter<T>.Add(MessagePack.ImmutableCollection.ImmutableQueueBuilder<T> collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
-override MessagePack.ImmutableCollection.ImmutableQueueFormatter<T>.Complete(MessagePack.ImmutableCollection.ImmutableQueueBuilder<T> intermediateCollection) -> System.Collections.Immutable.ImmutableQueue<T>
-override MessagePack.ImmutableCollection.ImmutableQueueFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>
-override MessagePack.ImmutableCollection.ImmutableSortedDictionaryFormatter<TKey, TValue>.Add(System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue>.Builder collection, int index, TKey key, TValue value, MessagePack.MessagePackSerializerOptions options) -> void
-override MessagePack.ImmutableCollection.ImmutableSortedDictionaryFormatter<TKey, TValue>.Complete(System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue>.Builder intermediateCollection) -> System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue>
-override MessagePack.ImmutableCollection.ImmutableSortedDictionaryFormatter<TKey, TValue>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue>.Builder
-override MessagePack.ImmutableCollection.ImmutableSortedDictionaryFormatter<TKey, TValue>.GetSourceEnumerator(System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue> source) -> System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue>.Enumerator
-override MessagePack.ImmutableCollection.ImmutableSortedSetFormatter<T>.Add(System.Collections.Immutable.ImmutableSortedSet<T>.Builder collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
-override MessagePack.ImmutableCollection.ImmutableSortedSetFormatter<T>.Complete(System.Collections.Immutable.ImmutableSortedSet<T>.Builder intermediateCollection) -> System.Collections.Immutable.ImmutableSortedSet<T>
-override MessagePack.ImmutableCollection.ImmutableSortedSetFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableSortedSet<T>.Builder
-override MessagePack.ImmutableCollection.ImmutableSortedSetFormatter<T>.GetSourceEnumerator(System.Collections.Immutable.ImmutableSortedSet<T> source) -> System.Collections.Immutable.ImmutableSortedSet<T>.Enumerator
-override MessagePack.ImmutableCollection.ImmutableStackFormatter<T>.Add(T[] collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
-override MessagePack.ImmutableCollection.ImmutableStackFormatter<T>.Complete(T[] intermediateCollection) -> System.Collections.Immutable.ImmutableStack<T>
-override MessagePack.ImmutableCollection.ImmutableStackFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> T[]
-override MessagePack.ImmutableCollection.InterfaceImmutableDictionaryFormatter<TKey, TValue>.Add(System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Builder collection, int index, TKey key, TValue value, MessagePack.MessagePackSerializerOptions options) -> void
-override MessagePack.ImmutableCollection.InterfaceImmutableDictionaryFormatter<TKey, TValue>.Complete(System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Builder intermediateCollection) -> System.Collections.Immutable.IImmutableDictionary<TKey, TValue>
-override MessagePack.ImmutableCollection.InterfaceImmutableDictionaryFormatter<TKey, TValue>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Builder
-override MessagePack.ImmutableCollection.InterfaceImmutableListFormatter<T>.Add(System.Collections.Immutable.ImmutableList<T>.Builder collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
-override MessagePack.ImmutableCollection.InterfaceImmutableListFormatter<T>.Complete(System.Collections.Immutable.ImmutableList<T>.Builder intermediateCollection) -> System.Collections.Immutable.IImmutableList<T>
-override MessagePack.ImmutableCollection.InterfaceImmutableListFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableList<T>.Builder
-override MessagePack.ImmutableCollection.InterfaceImmutableQueueFormatter<T>.Add(MessagePack.ImmutableCollection.ImmutableQueueBuilder<T> collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
-override MessagePack.ImmutableCollection.InterfaceImmutableQueueFormatter<T>.Complete(MessagePack.ImmutableCollection.ImmutableQueueBuilder<T> intermediateCollection) -> System.Collections.Immutable.IImmutableQueue<T>
-override MessagePack.ImmutableCollection.InterfaceImmutableQueueFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>
-override MessagePack.ImmutableCollection.InterfaceImmutableSetFormatter<T>.Add(System.Collections.Immutable.ImmutableHashSet<T>.Builder collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
-override MessagePack.ImmutableCollection.InterfaceImmutableSetFormatter<T>.Complete(System.Collections.Immutable.ImmutableHashSet<T>.Builder intermediateCollection) -> System.Collections.Immutable.IImmutableSet<T>
-override MessagePack.ImmutableCollection.InterfaceImmutableSetFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableHashSet<T>.Builder
-override MessagePack.ImmutableCollection.InterfaceImmutableStackFormatter<T>.Add(T[] collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
-override MessagePack.ImmutableCollection.InterfaceImmutableStackFormatter<T>.Complete(T[] intermediateCollection) -> System.Collections.Immutable.IImmutableStack<T>
-override MessagePack.ImmutableCollection.InterfaceImmutableStackFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> T[]
-static readonly MessagePack.Formatters.ByteMemoryFormatter.Instance -> MessagePack.Formatters.ByteMemoryFormatter
-static readonly MessagePack.Formatters.ByteReadOnlyMemoryFormatter.Instance -> MessagePack.Formatters.ByteReadOnlyMemoryFormatter
-static readonly MessagePack.Formatters.ByteReadOnlySequenceFormatter.Instance -> MessagePack.Formatters.ByteReadOnlySequenceFormatter
-static readonly MessagePack.Formatters.ExpandoObjectFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Dynamic.ExpandoObject>
-static readonly MessagePack.Formatters.NonGenericInterfaceCollectionFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Collections.ICollection>
-static readonly MessagePack.Formatters.NonGenericInterfaceEnumerableFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Collections.IEnumerable>
-static readonly MessagePack.Formatters.TypeFormatter<T>.Instance -> MessagePack.Formatters.IMessagePackFormatter<T>
-static readonly MessagePack.ImmutableCollection.ImmutableCollectionResolver.Instance -> MessagePack.ImmutableCollection.ImmutableCollectionResolver
-static readonly MessagePack.Resolvers.ExpandoObjectResolver.Instance -> MessagePack.IFormatterResolver
-static readonly MessagePack.Resolvers.ExpandoObjectResolver.Options -> MessagePack.MessagePackSerializerOptions
-virtual MessagePack.Formatters.PrimitiveObjectFormatter.DeserializeMap(ref MessagePack.MessagePackReader reader, int length, MessagePack.MessagePackSerializerOptions options) -> object
diff --git a/src/MessagePack/net5.0/PublicAPI.Shipped.txt b/src/MessagePack/net5.0/PublicAPI.Shipped.txt
new file mode 100644
index 00000000..b0a1a3dc
--- /dev/null
+++ b/src/MessagePack/net5.0/PublicAPI.Shipped.txt
@@ -0,0 +1,1180 @@
+MessagePack.ExtensionHeader
+MessagePack.ExtensionHeader.ExtensionHeader(sbyte typeCode, int length) -> void
+MessagePack.ExtensionHeader.ExtensionHeader(sbyte typeCode, uint length) -> void
+MessagePack.ExtensionHeader.Length.get -> uint
+MessagePack.ExtensionHeader.TypeCode.get -> sbyte
+MessagePack.ExtensionResult
+MessagePack.ExtensionResult.Data.get -> System.Buffers.ReadOnlySequence<byte>
+MessagePack.ExtensionResult.ExtensionResult(sbyte typeCode, System.Buffers.ReadOnlySequence<byte> data) -> void
+MessagePack.ExtensionResult.ExtensionResult(sbyte typeCode, System.Memory<byte> data) -> void
+MessagePack.ExtensionResult.Header.get -> MessagePack.ExtensionHeader
+MessagePack.ExtensionResult.TypeCode.get -> sbyte
+MessagePack.FormatterNotRegisteredException
+MessagePack.FormatterNotRegisteredException.FormatterNotRegisteredException(string message) -> void
+MessagePack.FormatterResolverExtensions
+MessagePack.Formatters.ArrayFormatter<T>
+MessagePack.Formatters.ArrayFormatter<T>.ArrayFormatter() -> void
+MessagePack.Formatters.ArrayFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T[]
+MessagePack.Formatters.ArrayFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ArraySegmentFormatter<T>
+MessagePack.Formatters.ArraySegmentFormatter<T>.ArraySegmentFormatter() -> void
+MessagePack.Formatters.ArraySegmentFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.ArraySegment<T>
+MessagePack.Formatters.ArraySegmentFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, System.ArraySegment<T> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.BigIntegerFormatter
+MessagePack.Formatters.BigIntegerFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Numerics.BigInteger
+MessagePack.Formatters.BigIntegerFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Numerics.BigInteger value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.BitArrayFormatter
+MessagePack.Formatters.BitArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Collections.BitArray
+MessagePack.Formatters.BitArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Collections.BitArray value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.BooleanArrayFormatter
+MessagePack.Formatters.BooleanArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> bool[]
+MessagePack.Formatters.BooleanArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, bool[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.BooleanFormatter
+MessagePack.Formatters.BooleanFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> bool
+MessagePack.Formatters.BooleanFormatter.Serialize(ref MessagePack.MessagePackWriter writer, bool value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ByteArrayFormatter
+MessagePack.Formatters.ByteArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> byte[]
+MessagePack.Formatters.ByteArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, byte[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ByteArraySegmentFormatter
+MessagePack.Formatters.ByteArraySegmentFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.ArraySegment<byte>
+MessagePack.Formatters.ByteArraySegmentFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.ArraySegment<byte> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ByteFormatter
+MessagePack.Formatters.ByteFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> byte
+MessagePack.Formatters.ByteFormatter.Serialize(ref MessagePack.MessagePackWriter writer, byte value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.CharArrayFormatter
+MessagePack.Formatters.CharArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> char[]
+MessagePack.Formatters.CharArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, char[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.CharFormatter
+MessagePack.Formatters.CharFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> char
+MessagePack.Formatters.CharFormatter.Serialize(ref MessagePack.MessagePackWriter writer, char value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.CollectionFormatterBase<TElement, TCollection>
+MessagePack.Formatters.CollectionFormatterBase<TElement, TCollection>.CollectionFormatterBase() -> void
+MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TCollection>
+MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TCollection>.CollectionFormatterBase() -> void
+MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TEnumerator, TCollection>
+MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TEnumerator, TCollection>.CollectionFormatterBase() -> void
+MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TEnumerator, TCollection>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> TCollection
+MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TEnumerator, TCollection>.Serialize(ref MessagePack.MessagePackWriter writer, TCollection value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ComplexFormatter
+MessagePack.Formatters.ComplexFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Numerics.Complex
+MessagePack.Formatters.ComplexFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Numerics.Complex value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ConcurrentBagFormatter<T>
+MessagePack.Formatters.ConcurrentBagFormatter<T>.ConcurrentBagFormatter() -> void
+MessagePack.Formatters.ConcurrentDictionaryFormatter<TKey, TValue>
+MessagePack.Formatters.ConcurrentDictionaryFormatter<TKey, TValue>.ConcurrentDictionaryFormatter() -> void
+MessagePack.Formatters.ConcurrentQueueFormatter<T>
+MessagePack.Formatters.ConcurrentQueueFormatter<T>.ConcurrentQueueFormatter() -> void
+MessagePack.Formatters.ConcurrentStackFormatter<T>
+MessagePack.Formatters.ConcurrentStackFormatter<T>.ConcurrentStackFormatter() -> void
+MessagePack.Formatters.DateTimeArrayFormatter
+MessagePack.Formatters.DateTimeArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.DateTime[]
+MessagePack.Formatters.DateTimeArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.DateTime[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.DateTimeFormatter
+MessagePack.Formatters.DateTimeFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.DateTime
+MessagePack.Formatters.DateTimeFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.DateTime value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.DateTimeOffsetFormatter
+MessagePack.Formatters.DateTimeOffsetFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.DateTimeOffset
+MessagePack.Formatters.DateTimeOffsetFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.DateTimeOffset value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.DecimalFormatter
+MessagePack.Formatters.DecimalFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> decimal
+MessagePack.Formatters.DecimalFormatter.Serialize(ref MessagePack.MessagePackWriter writer, decimal value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.DictionaryFormatter<TKey, TValue>
+MessagePack.Formatters.DictionaryFormatter<TKey, TValue>.DictionaryFormatter() -> void
+MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TDictionary>
+MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TDictionary>.DictionaryFormatterBase() -> void
+MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TDictionary>
+MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TDictionary>.DictionaryFormatterBase() -> void
+MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TEnumerator, TDictionary>
+MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TEnumerator, TDictionary>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> TDictionary
+MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TEnumerator, TDictionary>.DictionaryFormatterBase() -> void
+MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TEnumerator, TDictionary>.Serialize(ref MessagePack.MessagePackWriter writer, TDictionary value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.DoubleArrayFormatter
+MessagePack.Formatters.DoubleArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> double[]
+MessagePack.Formatters.DoubleArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, double[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.DoubleFormatter
+MessagePack.Formatters.DoubleFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> double
+MessagePack.Formatters.DoubleFormatter.Serialize(ref MessagePack.MessagePackWriter writer, double value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.DynamicObjectTypeFallbackFormatter
+MessagePack.Formatters.DynamicObjectTypeFallbackFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> object
+MessagePack.Formatters.DynamicObjectTypeFallbackFormatter.Serialize(ref MessagePack.MessagePackWriter writer, object value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.EnumAsStringFormatter<T>
+MessagePack.Formatters.EnumAsStringFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T
+MessagePack.Formatters.EnumAsStringFormatter<T>.EnumAsStringFormatter() -> void
+MessagePack.Formatters.EnumAsStringFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceByteBlockFormatter
+MessagePack.Formatters.ForceByteBlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> byte
+MessagePack.Formatters.ForceByteBlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, byte value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceInt16BlockArrayFormatter
+MessagePack.Formatters.ForceInt16BlockArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> short[]
+MessagePack.Formatters.ForceInt16BlockArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, short[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceInt16BlockFormatter
+MessagePack.Formatters.ForceInt16BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> short
+MessagePack.Formatters.ForceInt16BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, short value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceInt32BlockArrayFormatter
+MessagePack.Formatters.ForceInt32BlockArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> int[]
+MessagePack.Formatters.ForceInt32BlockArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, int[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceInt32BlockFormatter
+MessagePack.Formatters.ForceInt32BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> int
+MessagePack.Formatters.ForceInt32BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, int value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceInt64BlockArrayFormatter
+MessagePack.Formatters.ForceInt64BlockArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> long[]
+MessagePack.Formatters.ForceInt64BlockArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, long[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceInt64BlockFormatter
+MessagePack.Formatters.ForceInt64BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> long
+MessagePack.Formatters.ForceInt64BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, long value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceSByteBlockArrayFormatter
+MessagePack.Formatters.ForceSByteBlockArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> sbyte[]
+MessagePack.Formatters.ForceSByteBlockArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, sbyte[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceSByteBlockFormatter
+MessagePack.Formatters.ForceSByteBlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> sbyte
+MessagePack.Formatters.ForceSByteBlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, sbyte value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceUInt16BlockArrayFormatter
+MessagePack.Formatters.ForceUInt16BlockArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ushort[]
+MessagePack.Formatters.ForceUInt16BlockArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, ushort[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceUInt16BlockFormatter
+MessagePack.Formatters.ForceUInt16BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ushort
+MessagePack.Formatters.ForceUInt16BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, ushort value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceUInt32BlockArrayFormatter
+MessagePack.Formatters.ForceUInt32BlockArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> uint[]
+MessagePack.Formatters.ForceUInt32BlockArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, uint[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceUInt32BlockFormatter
+MessagePack.Formatters.ForceUInt32BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> uint
+MessagePack.Formatters.ForceUInt32BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, uint value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceUInt64BlockArrayFormatter
+MessagePack.Formatters.ForceUInt64BlockArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ulong[]
+MessagePack.Formatters.ForceUInt64BlockArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, ulong[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceUInt64BlockFormatter
+MessagePack.Formatters.ForceUInt64BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ulong
+MessagePack.Formatters.ForceUInt64BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, ulong value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.FourDimensionalArrayFormatter<T>
+MessagePack.Formatters.FourDimensionalArrayFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T[,,,]
+MessagePack.Formatters.FourDimensionalArrayFormatter<T>.FourDimensionalArrayFormatter() -> void
+MessagePack.Formatters.FourDimensionalArrayFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T[,,,] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.GenericCollectionFormatter<TElement, TCollection>
+MessagePack.Formatters.GenericCollectionFormatter<TElement, TCollection>.GenericCollectionFormatter() -> void
+MessagePack.Formatters.GenericDictionaryFormatter<TKey, TValue, TDictionary>
+MessagePack.Formatters.GenericDictionaryFormatter<TKey, TValue, TDictionary>.GenericDictionaryFormatter() -> void
+MessagePack.Formatters.GenericEnumFormatter<T>
+MessagePack.Formatters.GenericEnumFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T
+MessagePack.Formatters.GenericEnumFormatter<T>.GenericEnumFormatter() -> void
+MessagePack.Formatters.GenericEnumFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.GuidFormatter
+MessagePack.Formatters.GuidFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Guid
+MessagePack.Formatters.GuidFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Guid value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.HashSetFormatter<T>
+MessagePack.Formatters.HashSetFormatter<T>.HashSetFormatter() -> void
+MessagePack.Formatters.IMessagePackFormatter
+MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Formatters.IMessagePackFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T
+MessagePack.Formatters.IMessagePackFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.IgnoreFormatter<T>
+MessagePack.Formatters.IgnoreFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T
+MessagePack.Formatters.IgnoreFormatter<T>.IgnoreFormatter() -> void
+MessagePack.Formatters.IgnoreFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.Int16ArrayFormatter
+MessagePack.Formatters.Int16ArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> short[]
+MessagePack.Formatters.Int16ArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, short[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.Int16Formatter
+MessagePack.Formatters.Int16Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> short
+MessagePack.Formatters.Int16Formatter.Serialize(ref MessagePack.MessagePackWriter writer, short value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.Int32ArrayFormatter
+MessagePack.Formatters.Int32ArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> int[]
+MessagePack.Formatters.Int32ArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, int[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.Int32Formatter
+MessagePack.Formatters.Int32Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> int
+MessagePack.Formatters.Int32Formatter.Serialize(ref MessagePack.MessagePackWriter writer, int value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.Int64ArrayFormatter
+MessagePack.Formatters.Int64ArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> long[]
+MessagePack.Formatters.Int64ArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, long[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.Int64Formatter
+MessagePack.Formatters.Int64Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> long
+MessagePack.Formatters.Int64Formatter.Serialize(ref MessagePack.MessagePackWriter writer, long value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.InterfaceCollectionFormatter<T>
+MessagePack.Formatters.InterfaceCollectionFormatter<T>.InterfaceCollectionFormatter() -> void
+MessagePack.Formatters.InterfaceDictionaryFormatter<TKey, TValue>
+MessagePack.Formatters.InterfaceDictionaryFormatter<TKey, TValue>.InterfaceDictionaryFormatter() -> void
+MessagePack.Formatters.InterfaceEnumerableFormatter<T>
+MessagePack.Formatters.InterfaceEnumerableFormatter<T>.InterfaceEnumerableFormatter() -> void
+MessagePack.Formatters.InterfaceGroupingFormatter<TKey, TElement>
+MessagePack.Formatters.InterfaceGroupingFormatter<TKey, TElement>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Linq.IGrouping<TKey, TElement>
+MessagePack.Formatters.InterfaceGroupingFormatter<TKey, TElement>.InterfaceGroupingFormatter() -> void
+MessagePack.Formatters.InterfaceGroupingFormatter<TKey, TElement>.Serialize(ref MessagePack.MessagePackWriter writer, System.Linq.IGrouping<TKey, TElement> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.InterfaceListFormatter<T>
+MessagePack.Formatters.InterfaceListFormatter<T>.InterfaceListFormatter() -> void
+MessagePack.Formatters.InterfaceLookupFormatter<TKey, TElement>
+MessagePack.Formatters.InterfaceLookupFormatter<TKey, TElement>.InterfaceLookupFormatter() -> void
+MessagePack.Formatters.InterfaceReadOnlyCollectionFormatter<T>
+MessagePack.Formatters.InterfaceReadOnlyCollectionFormatter<T>.InterfaceReadOnlyCollectionFormatter() -> void
+MessagePack.Formatters.InterfaceReadOnlyDictionaryFormatter<TKey, TValue>
+MessagePack.Formatters.InterfaceReadOnlyDictionaryFormatter<TKey, TValue>.InterfaceReadOnlyDictionaryFormatter() -> void
+MessagePack.Formatters.InterfaceReadOnlyListFormatter<T>
+MessagePack.Formatters.InterfaceReadOnlyListFormatter<T>.InterfaceReadOnlyListFormatter() -> void
+MessagePack.Formatters.InterfaceSetFormatter<T>
+MessagePack.Formatters.InterfaceSetFormatter<T>.InterfaceSetFormatter() -> void
+MessagePack.Formatters.KeyValuePairFormatter<TKey, TValue>
+MessagePack.Formatters.KeyValuePairFormatter<TKey, TValue>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Generic.KeyValuePair<TKey, TValue>
+MessagePack.Formatters.KeyValuePairFormatter<TKey, TValue>.KeyValuePairFormatter() -> void
+MessagePack.Formatters.KeyValuePairFormatter<TKey, TValue>.Serialize(ref MessagePack.MessagePackWriter writer, System.Collections.Generic.KeyValuePair<TKey, TValue> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.LazyFormatter<T>
+MessagePack.Formatters.LazyFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Lazy<T>
+MessagePack.Formatters.LazyFormatter<T>.LazyFormatter() -> void
+MessagePack.Formatters.LazyFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, System.Lazy<T> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.LinkedListFormatter<T>
+MessagePack.Formatters.LinkedListFormatter<T>.LinkedListFormatter() -> void
+MessagePack.Formatters.ListFormatter<T>
+MessagePack.Formatters.ListFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Generic.List<T>
+MessagePack.Formatters.ListFormatter<T>.ListFormatter() -> void
+MessagePack.Formatters.ListFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, System.Collections.Generic.List<T> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NativeDateTimeArrayFormatter
+MessagePack.Formatters.NativeDateTimeArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.DateTime[]
+MessagePack.Formatters.NativeDateTimeArrayFormatter.NativeDateTimeArrayFormatter() -> void
+MessagePack.Formatters.NativeDateTimeArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.DateTime[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NativeDateTimeFormatter
+MessagePack.Formatters.NativeDateTimeFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.DateTime
+MessagePack.Formatters.NativeDateTimeFormatter.NativeDateTimeFormatter() -> void
+MessagePack.Formatters.NativeDateTimeFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.DateTime value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NativeDecimalFormatter
+MessagePack.Formatters.NativeDecimalFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> decimal
+MessagePack.Formatters.NativeDecimalFormatter.Serialize(ref MessagePack.MessagePackWriter writer, decimal value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NativeGuidFormatter
+MessagePack.Formatters.NativeGuidFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Guid
+MessagePack.Formatters.NativeGuidFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Guid value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NilFormatter
+MessagePack.Formatters.NilFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> MessagePack.Nil
+MessagePack.Formatters.NilFormatter.Serialize(ref MessagePack.MessagePackWriter writer, MessagePack.Nil value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NonGenericDictionaryFormatter<T>
+MessagePack.Formatters.NonGenericDictionaryFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T
+MessagePack.Formatters.NonGenericDictionaryFormatter<T>.NonGenericDictionaryFormatter() -> void
+MessagePack.Formatters.NonGenericDictionaryFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NonGenericInterfaceDictionaryFormatter
+MessagePack.Formatters.NonGenericInterfaceDictionaryFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Collections.IDictionary
+MessagePack.Formatters.NonGenericInterfaceDictionaryFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Collections.IDictionary value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NonGenericInterfaceListFormatter
+MessagePack.Formatters.NonGenericInterfaceListFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Collections.IList
+MessagePack.Formatters.NonGenericInterfaceListFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Collections.IList value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NonGenericListFormatter<T>
+MessagePack.Formatters.NonGenericListFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T
+MessagePack.Formatters.NonGenericListFormatter<T>.NonGenericListFormatter() -> void
+MessagePack.Formatters.NonGenericListFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableBooleanFormatter
+MessagePack.Formatters.NullableBooleanFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> bool?
+MessagePack.Formatters.NullableBooleanFormatter.Serialize(ref MessagePack.MessagePackWriter writer, bool? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableByteFormatter
+MessagePack.Formatters.NullableByteFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> byte?
+MessagePack.Formatters.NullableByteFormatter.Serialize(ref MessagePack.MessagePackWriter writer, byte? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableCharFormatter
+MessagePack.Formatters.NullableCharFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> char?
+MessagePack.Formatters.NullableCharFormatter.Serialize(ref MessagePack.MessagePackWriter writer, char? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableDateTimeFormatter
+MessagePack.Formatters.NullableDateTimeFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.DateTime?
+MessagePack.Formatters.NullableDateTimeFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.DateTime? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableDoubleFormatter
+MessagePack.Formatters.NullableDoubleFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> double?
+MessagePack.Formatters.NullableDoubleFormatter.Serialize(ref MessagePack.MessagePackWriter writer, double? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableForceByteBlockFormatter
+MessagePack.Formatters.NullableForceByteBlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> byte?
+MessagePack.Formatters.NullableForceByteBlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, byte? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableForceInt16BlockFormatter
+MessagePack.Formatters.NullableForceInt16BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> short?
+MessagePack.Formatters.NullableForceInt16BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, short? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableForceInt32BlockFormatter
+MessagePack.Formatters.NullableForceInt32BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> int?
+MessagePack.Formatters.NullableForceInt32BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, int? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableForceInt64BlockFormatter
+MessagePack.Formatters.NullableForceInt64BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> long?
+MessagePack.Formatters.NullableForceInt64BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, long? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableForceSByteBlockFormatter
+MessagePack.Formatters.NullableForceSByteBlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> sbyte?
+MessagePack.Formatters.NullableForceSByteBlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, sbyte? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableForceUInt16BlockFormatter
+MessagePack.Formatters.NullableForceUInt16BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ushort?
+MessagePack.Formatters.NullableForceUInt16BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, ushort? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableForceUInt32BlockFormatter
+MessagePack.Formatters.NullableForceUInt32BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> uint?
+MessagePack.Formatters.NullableForceUInt32BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, uint? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableForceUInt64BlockFormatter
+MessagePack.Formatters.NullableForceUInt64BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ulong?
+MessagePack.Formatters.NullableForceUInt64BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, ulong? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableFormatter<T>
+MessagePack.Formatters.NullableFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T?
+MessagePack.Formatters.NullableFormatter<T>.NullableFormatter() -> void
+MessagePack.Formatters.NullableFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableInt16Formatter
+MessagePack.Formatters.NullableInt16Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> short?
+MessagePack.Formatters.NullableInt16Formatter.Serialize(ref MessagePack.MessagePackWriter writer, short? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableInt32Formatter
+MessagePack.Formatters.NullableInt32Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> int?
+MessagePack.Formatters.NullableInt32Formatter.Serialize(ref MessagePack.MessagePackWriter writer, int? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableInt64Formatter
+MessagePack.Formatters.NullableInt64Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> long?
+MessagePack.Formatters.NullableInt64Formatter.Serialize(ref MessagePack.MessagePackWriter writer, long? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableNilFormatter
+MessagePack.Formatters.NullableNilFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> MessagePack.Nil?
+MessagePack.Formatters.NullableNilFormatter.Serialize(ref MessagePack.MessagePackWriter writer, MessagePack.Nil? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableSByteFormatter
+MessagePack.Formatters.NullableSByteFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> sbyte?
+MessagePack.Formatters.NullableSByteFormatter.Serialize(ref MessagePack.MessagePackWriter writer, sbyte? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableSingleFormatter
+MessagePack.Formatters.NullableSingleFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> float?
+MessagePack.Formatters.NullableSingleFormatter.Serialize(ref MessagePack.MessagePackWriter writer, float? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableStringArrayFormatter
+MessagePack.Formatters.NullableStringArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> string[]
+MessagePack.Formatters.NullableStringArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, string[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableStringFormatter
+MessagePack.Formatters.NullableStringFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> string
+MessagePack.Formatters.NullableStringFormatter.Serialize(ref MessagePack.MessagePackWriter writer, string value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableUInt16Formatter
+MessagePack.Formatters.NullableUInt16Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ushort?
+MessagePack.Formatters.NullableUInt16Formatter.Serialize(ref MessagePack.MessagePackWriter writer, ushort? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableUInt32Formatter
+MessagePack.Formatters.NullableUInt32Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> uint?
+MessagePack.Formatters.NullableUInt32Formatter.Serialize(ref MessagePack.MessagePackWriter writer, uint? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableUInt64Formatter
+MessagePack.Formatters.NullableUInt64Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ulong?
+MessagePack.Formatters.NullableUInt64Formatter.Serialize(ref MessagePack.MessagePackWriter writer, ulong? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ObservableCollectionFormatter<T>
+MessagePack.Formatters.ObservableCollectionFormatter<T>.ObservableCollectionFormatter() -> void
+MessagePack.Formatters.PrimitiveObjectFormatter
+MessagePack.Formatters.PrimitiveObjectFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> object
+MessagePack.Formatters.PrimitiveObjectFormatter.Serialize(ref MessagePack.MessagePackWriter writer, object value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.QueueFormatter<T>
+MessagePack.Formatters.QueueFormatter<T>.QueueFormatter() -> void
+MessagePack.Formatters.ReadOnlyCollectionFormatter<T>
+MessagePack.Formatters.ReadOnlyCollectionFormatter<T>.ReadOnlyCollectionFormatter() -> void
+MessagePack.Formatters.ReadOnlyDictionaryFormatter<TKey, TValue>
+MessagePack.Formatters.ReadOnlyDictionaryFormatter<TKey, TValue>.ReadOnlyDictionaryFormatter() -> void
+MessagePack.Formatters.ReadOnlyObservableCollectionFormatter<T>
+MessagePack.Formatters.ReadOnlyObservableCollectionFormatter<T>.ReadOnlyObservableCollectionFormatter() -> void
+MessagePack.Formatters.SByteArrayFormatter
+MessagePack.Formatters.SByteArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> sbyte[]
+MessagePack.Formatters.SByteArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, sbyte[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.SByteFormatter
+MessagePack.Formatters.SByteFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> sbyte
+MessagePack.Formatters.SByteFormatter.Serialize(ref MessagePack.MessagePackWriter writer, sbyte value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.SingleArrayFormatter
+MessagePack.Formatters.SingleArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> float[]
+MessagePack.Formatters.SingleArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, float[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.SingleFormatter
+MessagePack.Formatters.SingleFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> float
+MessagePack.Formatters.SingleFormatter.Serialize(ref MessagePack.MessagePackWriter writer, float value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.SortedDictionaryFormatter<TKey, TValue>
+MessagePack.Formatters.SortedDictionaryFormatter<TKey, TValue>.SortedDictionaryFormatter() -> void
+MessagePack.Formatters.SortedListFormatter<TKey, TValue>
+MessagePack.Formatters.SortedListFormatter<TKey, TValue>.SortedListFormatter() -> void
+MessagePack.Formatters.StackFormatter<T>
+MessagePack.Formatters.StackFormatter<T>.StackFormatter() -> void
+MessagePack.Formatters.StaticNullableFormatter<T>
+MessagePack.Formatters.StaticNullableFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T?
+MessagePack.Formatters.StaticNullableFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.StaticNullableFormatter<T>.StaticNullableFormatter(MessagePack.Formatters.IMessagePackFormatter<T> underlyingFormatter) -> void
+MessagePack.Formatters.StringBuilderFormatter
+MessagePack.Formatters.StringBuilderFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Text.StringBuilder
+MessagePack.Formatters.StringBuilderFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Text.StringBuilder value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ThreeDimensionalArrayFormatter<T>
+MessagePack.Formatters.ThreeDimensionalArrayFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T[,,]
+MessagePack.Formatters.ThreeDimensionalArrayFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T[,,] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ThreeDimensionalArrayFormatter<T>.ThreeDimensionalArrayFormatter() -> void
+MessagePack.Formatters.TimeSpanFormatter
+MessagePack.Formatters.TimeSpanFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.TimeSpan
+MessagePack.Formatters.TimeSpanFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.TimeSpan value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6, T7, TRest>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6, T7, TRest>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Tuple<T1, T2, T3, T4, T5, T6, T7, TRest>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6, T7, TRest>.Serialize(ref MessagePack.MessagePackWriter writer, System.Tuple<T1, T2, T3, T4, T5, T6, T7, TRest> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6, T7, TRest>.TupleFormatter() -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6, T7>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6, T7>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Tuple<T1, T2, T3, T4, T5, T6, T7>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6, T7>.Serialize(ref MessagePack.MessagePackWriter writer, System.Tuple<T1, T2, T3, T4, T5, T6, T7> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6, T7>.TupleFormatter() -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Tuple<T1, T2, T3, T4, T5, T6>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6>.Serialize(ref MessagePack.MessagePackWriter writer, System.Tuple<T1, T2, T3, T4, T5, T6> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6>.TupleFormatter() -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Tuple<T1, T2, T3, T4, T5>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5>.Serialize(ref MessagePack.MessagePackWriter writer, System.Tuple<T1, T2, T3, T4, T5> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5>.TupleFormatter() -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Tuple<T1, T2, T3, T4>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4>.Serialize(ref MessagePack.MessagePackWriter writer, System.Tuple<T1, T2, T3, T4> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4>.TupleFormatter() -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Tuple<T1, T2, T3>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3>.Serialize(ref MessagePack.MessagePackWriter writer, System.Tuple<T1, T2, T3> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3>.TupleFormatter() -> void
+MessagePack.Formatters.TupleFormatter<T1, T2>
+MessagePack.Formatters.TupleFormatter<T1, T2>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Tuple<T1, T2>
+MessagePack.Formatters.TupleFormatter<T1, T2>.Serialize(ref MessagePack.MessagePackWriter writer, System.Tuple<T1, T2> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TupleFormatter<T1, T2>.TupleFormatter() -> void
+MessagePack.Formatters.TupleFormatter<T1>
+MessagePack.Formatters.TupleFormatter<T1>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Tuple<T1>
+MessagePack.Formatters.TupleFormatter<T1>.Serialize(ref MessagePack.MessagePackWriter writer, System.Tuple<T1> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TupleFormatter<T1>.TupleFormatter() -> void
+MessagePack.Formatters.TwoDimensionalArrayFormatter<T>
+MessagePack.Formatters.TwoDimensionalArrayFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T[,]
+MessagePack.Formatters.TwoDimensionalArrayFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T[,] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TwoDimensionalArrayFormatter<T>.TwoDimensionalArrayFormatter() -> void
+MessagePack.Formatters.TypelessFormatter
+MessagePack.Formatters.TypelessFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> object
+MessagePack.Formatters.TypelessFormatter.Serialize(ref MessagePack.MessagePackWriter writer, object value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.UInt16ArrayFormatter
+MessagePack.Formatters.UInt16ArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ushort[]
+MessagePack.Formatters.UInt16ArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, ushort[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.UInt16Formatter
+MessagePack.Formatters.UInt16Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ushort
+MessagePack.Formatters.UInt16Formatter.Serialize(ref MessagePack.MessagePackWriter writer, ushort value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.UInt32ArrayFormatter
+MessagePack.Formatters.UInt32ArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> uint[]
+MessagePack.Formatters.UInt32ArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, uint[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.UInt32Formatter
+MessagePack.Formatters.UInt32Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> uint
+MessagePack.Formatters.UInt32Formatter.Serialize(ref MessagePack.MessagePackWriter writer, uint value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.UInt64ArrayFormatter
+MessagePack.Formatters.UInt64ArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ulong[]
+MessagePack.Formatters.UInt64ArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, ulong[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.UInt64Formatter
+MessagePack.Formatters.UInt64Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ulong
+MessagePack.Formatters.UInt64Formatter.Serialize(ref MessagePack.MessagePackWriter writer, ulong value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.UriFormatter
+MessagePack.Formatters.UriFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Uri
+MessagePack.Formatters.UriFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Uri value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6, T7, TRest>
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6, T7, TRest>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6, T7, TRest>.Serialize(ref MessagePack.MessagePackWriter writer, System.ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6, T7, TRest>.ValueTupleFormatter() -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6, T7>
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6, T7>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> (T1, T2, T3, T4, T5, T6, T7)
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6, T7>.Serialize(ref MessagePack.MessagePackWriter writer, (T1, T2, T3, T4, T5, T6, T7) value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6, T7>.ValueTupleFormatter() -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6>
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> (T1, T2, T3, T4, T5, T6)
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6>.Serialize(ref MessagePack.MessagePackWriter writer, (T1, T2, T3, T4, T5, T6) value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6>.ValueTupleFormatter() -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5>
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> (T1, T2, T3, T4, T5)
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5>.Serialize(ref MessagePack.MessagePackWriter writer, (T1, T2, T3, T4, T5) value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5>.ValueTupleFormatter() -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4>
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> (T1, T2, T3, T4)
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4>.Serialize(ref MessagePack.MessagePackWriter writer, (T1, T2, T3, T4) value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4>.ValueTupleFormatter() -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3>
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> (T1, T2, T3)
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3>.Serialize(ref MessagePack.MessagePackWriter writer, (T1, T2, T3) value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3>.ValueTupleFormatter() -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2>
+MessagePack.Formatters.ValueTupleFormatter<T1, T2>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> (T1, T2)
+MessagePack.Formatters.ValueTupleFormatter<T1, T2>.Serialize(ref MessagePack.MessagePackWriter writer, (T1, T2) value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2>.ValueTupleFormatter() -> void
+MessagePack.Formatters.ValueTupleFormatter<T1>
+MessagePack.Formatters.ValueTupleFormatter<T1>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.ValueTuple<T1>
+MessagePack.Formatters.ValueTupleFormatter<T1>.Serialize(ref MessagePack.MessagePackWriter writer, System.ValueTuple<T1> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ValueTupleFormatter<T1>.ValueTupleFormatter() -> void
+MessagePack.Formatters.VersionFormatter
+MessagePack.Formatters.VersionFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Version
+MessagePack.Formatters.VersionFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Version value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.IFormatterResolver
+MessagePack.IFormatterResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Internal.AutomataDictionary
+MessagePack.Internal.AutomataDictionary.Add(string str, int value) -> void
+MessagePack.Internal.AutomataDictionary.AutomataDictionary() -> void
+MessagePack.Internal.AutomataDictionary.EmitMatch(System.Reflection.Emit.ILGenerator il, System.Reflection.Emit.LocalBuilder bytesSpan, System.Reflection.Emit.LocalBuilder key, System.Action<System.Collections.Generic.KeyValuePair<string, int>> onFound, System.Action onNotFound) -> void
+MessagePack.Internal.AutomataDictionary.GetEnumerator() -> System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<string, int>>
+MessagePack.Internal.AutomataDictionary.TryGetValue(System.ReadOnlySpan<byte> bytes, out int value) -> bool
+MessagePack.Internal.AutomataDictionary.TryGetValue(in System.Buffers.ReadOnlySequence<byte> bytes, out int value) -> bool
+MessagePack.Internal.AutomataKeyGen
+MessagePack.Internal.ByteArrayStringHashTable
+MessagePack.Internal.ByteArrayStringHashTable.Add(byte[] key, int value) -> void
+MessagePack.Internal.ByteArrayStringHashTable.Add(string key, int value) -> void
+MessagePack.Internal.ByteArrayStringHashTable.ByteArrayStringHashTable(int capacity) -> void
+MessagePack.Internal.ByteArrayStringHashTable.ByteArrayStringHashTable(int capacity, float loadFactor) -> void
+MessagePack.Internal.ByteArrayStringHashTable.GetEnumerator() -> System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<string, int>>
+MessagePack.Internal.ByteArrayStringHashTable.TryGetValue(System.ReadOnlySpan<byte> key, out int value) -> bool
+MessagePack.Internal.ByteArrayStringHashTable.TryGetValue(in System.Buffers.ReadOnlySequence<byte> key, out int value) -> bool
+MessagePack.Internal.CodeGenHelpers
+MessagePack.Internal.RuntimeTypeHandleEqualityComparer
+MessagePack.Internal.RuntimeTypeHandleEqualityComparer.Equals(System.RuntimeTypeHandle x, System.RuntimeTypeHandle y) -> bool
+MessagePack.Internal.RuntimeTypeHandleEqualityComparer.GetHashCode(System.RuntimeTypeHandle obj) -> int
+MessagePack.Internal.UnsafeMemory
+MessagePack.Internal.UnsafeMemory32
+MessagePack.Internal.UnsafeMemory64
+MessagePack.MessagePackCode
+MessagePack.MessagePackCompression
+MessagePack.MessagePackCompression.Lz4Block = 1 -> MessagePack.MessagePackCompression
+MessagePack.MessagePackCompression.Lz4BlockArray = 2 -> MessagePack.MessagePackCompression
+MessagePack.MessagePackCompression.None = 0 -> MessagePack.MessagePackCompression
+MessagePack.MessagePackRange
+MessagePack.MessagePackReader
+MessagePack.MessagePackReader.CancellationToken.get -> System.Threading.CancellationToken
+MessagePack.MessagePackReader.CancellationToken.set -> void
+MessagePack.MessagePackReader.Clone(in System.Buffers.ReadOnlySequence<byte> readOnlySequence) -> MessagePack.MessagePackReader
+MessagePack.MessagePackReader.Consumed.get -> long
+MessagePack.MessagePackReader.CreatePeekReader() -> MessagePack.MessagePackReader
+MessagePack.MessagePackReader.End.get -> bool
+MessagePack.MessagePackReader.IsNil.get -> bool
+MessagePack.MessagePackReader.MessagePackReader(System.ReadOnlyMemory<byte> memory) -> void
+MessagePack.MessagePackReader.MessagePackReader(in System.Buffers.ReadOnlySequence<byte> readOnlySequence) -> void
+MessagePack.MessagePackReader.NextCode.get -> byte
+MessagePack.MessagePackReader.NextMessagePackType.get -> MessagePack.MessagePackType
+MessagePack.MessagePackReader.Position.get -> System.SequencePosition
+MessagePack.MessagePackReader.ReadArrayHeader() -> int
+MessagePack.MessagePackReader.ReadBoolean() -> bool
+MessagePack.MessagePackReader.ReadByte() -> byte
+MessagePack.MessagePackReader.ReadBytes() -> System.Buffers.ReadOnlySequence<byte>?
+MessagePack.MessagePackReader.ReadChar() -> char
+MessagePack.MessagePackReader.ReadDateTime() -> System.DateTime
+MessagePack.MessagePackReader.ReadDouble() -> double
+MessagePack.MessagePackReader.ReadExtensionFormat() -> MessagePack.ExtensionResult
+MessagePack.MessagePackReader.ReadExtensionFormatHeader() -> MessagePack.ExtensionHeader
+MessagePack.MessagePackReader.ReadInt16() -> short
+MessagePack.MessagePackReader.ReadInt32() -> int
+MessagePack.MessagePackReader.ReadInt64() -> long
+MessagePack.MessagePackReader.ReadMapHeader() -> int
+MessagePack.MessagePackReader.ReadNil() -> MessagePack.Nil
+MessagePack.MessagePackReader.ReadRaw() -> System.Buffers.ReadOnlySequence<byte>
+MessagePack.MessagePackReader.ReadRaw(long length) -> System.Buffers.ReadOnlySequence<byte>
+MessagePack.MessagePackReader.ReadSByte() -> sbyte
+MessagePack.MessagePackReader.ReadSingle() -> float
+MessagePack.MessagePackReader.ReadString() -> string
+MessagePack.MessagePackReader.ReadStringSequence() -> System.Buffers.ReadOnlySequence<byte>?
+MessagePack.MessagePackReader.ReadUInt16() -> ushort
+MessagePack.MessagePackReader.ReadUInt32() -> uint
+MessagePack.MessagePackReader.ReadUInt64() -> ulong
+MessagePack.MessagePackReader.Sequence.get -> System.Buffers.ReadOnlySequence<byte>
+MessagePack.MessagePackReader.Skip() -> void
+MessagePack.MessagePackReader.TryReadNil() -> bool
+MessagePack.MessagePackReader.TryReadStringSpan(out System.ReadOnlySpan<byte> span) -> bool
+MessagePack.MessagePackSerializationException
+MessagePack.MessagePackSerializationException.MessagePackSerializationException() -> void
+MessagePack.MessagePackSerializationException.MessagePackSerializationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) -> void
+MessagePack.MessagePackSerializationException.MessagePackSerializationException(string message) -> void
+MessagePack.MessagePackSerializationException.MessagePackSerializationException(string message, System.Exception inner) -> void
+MessagePack.MessagePackSerializer
+MessagePack.MessagePackSerializer.Typeless
+MessagePack.MessagePackSerializerOptions
+MessagePack.MessagePackSerializerOptions.AllowAssemblyVersionMismatch.get -> bool
+MessagePack.MessagePackSerializerOptions.Compression.get -> MessagePack.MessagePackCompression
+MessagePack.MessagePackSerializerOptions.MessagePackSerializerOptions(MessagePack.IFormatterResolver resolver) -> void
+MessagePack.MessagePackSerializerOptions.MessagePackSerializerOptions(MessagePack.MessagePackSerializerOptions copyFrom) -> void
+MessagePack.MessagePackSerializerOptions.OldSpec.get -> bool?
+MessagePack.MessagePackSerializerOptions.OmitAssemblyVersion.get -> bool
+MessagePack.MessagePackSerializerOptions.Resolver.get -> MessagePack.IFormatterResolver
+MessagePack.MessagePackSerializerOptions.WithAllowAssemblyVersionMismatch(bool allowAssemblyVersionMismatch) -> MessagePack.MessagePackSerializerOptions
+MessagePack.MessagePackSerializerOptions.WithCompression(MessagePack.MessagePackCompression compression) -> MessagePack.MessagePackSerializerOptions
+MessagePack.MessagePackSerializerOptions.WithOldSpec(bool? oldSpec = true) -> MessagePack.MessagePackSerializerOptions
+MessagePack.MessagePackSerializerOptions.WithOmitAssemblyVersion(bool omitAssemblyVersion) -> MessagePack.MessagePackSerializerOptions
+MessagePack.MessagePackSerializerOptions.WithResolver(MessagePack.IFormatterResolver resolver) -> MessagePack.MessagePackSerializerOptions
+MessagePack.MessagePackStreamReader
+MessagePack.MessagePackStreamReader.Dispose() -> void
+MessagePack.MessagePackStreamReader.MessagePackStreamReader(System.IO.Stream stream) -> void
+MessagePack.MessagePackStreamReader.ReadAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.ValueTask<System.Buffers.ReadOnlySequence<byte>?>
+MessagePack.MessagePackStreamReader.RemainingBytes.get -> System.Buffers.ReadOnlySequence<byte>
+MessagePack.MessagePackType
+MessagePack.MessagePackType.Array = 7 -> MessagePack.MessagePackType
+MessagePack.MessagePackType.Binary = 6 -> MessagePack.MessagePackType
+MessagePack.MessagePackType.Boolean = 3 -> MessagePack.MessagePackType
+MessagePack.MessagePackType.Extension = 9 -> MessagePack.MessagePackType
+MessagePack.MessagePackType.Float = 4 -> MessagePack.MessagePackType
+MessagePack.MessagePackType.Integer = 1 -> MessagePack.MessagePackType
+MessagePack.MessagePackType.Map = 8 -> MessagePack.MessagePackType
+MessagePack.MessagePackType.Nil = 2 -> MessagePack.MessagePackType
+MessagePack.MessagePackType.String = 5 -> MessagePack.MessagePackType
+MessagePack.MessagePackType.Unknown = 0 -> MessagePack.MessagePackType
+MessagePack.MessagePackWriter
+MessagePack.MessagePackWriter.Advance(int length) -> void
+MessagePack.MessagePackWriter.CancellationToken.get -> System.Threading.CancellationToken
+MessagePack.MessagePackWriter.CancellationToken.set -> void
+MessagePack.MessagePackWriter.Clone(System.Buffers.IBufferWriter<byte> writer) -> MessagePack.MessagePackWriter
+MessagePack.MessagePackWriter.Flush() -> void
+MessagePack.MessagePackWriter.GetSpan(int length) -> System.Span<byte>
+MessagePack.MessagePackWriter.MessagePackWriter(System.Buffers.IBufferWriter<byte> writer) -> void
+MessagePack.MessagePackWriter.OldSpec.get -> bool
+MessagePack.MessagePackWriter.OldSpec.set -> void
+MessagePack.MessagePackWriter.Write(System.DateTime dateTime) -> void
+MessagePack.MessagePackWriter.Write(System.ReadOnlySpan<byte> src) -> void
+MessagePack.MessagePackWriter.Write(System.ReadOnlySpan<char> value) -> void
+MessagePack.MessagePackWriter.Write(bool value) -> void
+MessagePack.MessagePackWriter.Write(byte value) -> void
+MessagePack.MessagePackWriter.Write(byte[] src) -> void
+MessagePack.MessagePackWriter.Write(char value) -> void
+MessagePack.MessagePackWriter.Write(double value) -> void
+MessagePack.MessagePackWriter.Write(float value) -> void
+MessagePack.MessagePackWriter.Write(in System.Buffers.ReadOnlySequence<byte> src) -> void
+MessagePack.MessagePackWriter.Write(int value) -> void
+MessagePack.MessagePackWriter.Write(long value) -> void
+MessagePack.MessagePackWriter.Write(sbyte value) -> void
+MessagePack.MessagePackWriter.Write(short value) -> void
+MessagePack.MessagePackWriter.Write(string value) -> void
+MessagePack.MessagePackWriter.Write(uint value) -> void
+MessagePack.MessagePackWriter.Write(ulong value) -> void
+MessagePack.MessagePackWriter.Write(ushort value) -> void
+MessagePack.MessagePackWriter.WriteArrayHeader(int count) -> void
+MessagePack.MessagePackWriter.WriteArrayHeader(uint count) -> void
+MessagePack.MessagePackWriter.WriteExtensionFormat(MessagePack.ExtensionResult extensionData) -> void
+MessagePack.MessagePackWriter.WriteExtensionFormatHeader(MessagePack.ExtensionHeader extensionHeader) -> void
+MessagePack.MessagePackWriter.WriteInt16(short value) -> void
+MessagePack.MessagePackWriter.WriteInt32(int value) -> void
+MessagePack.MessagePackWriter.WriteInt64(long value) -> void
+MessagePack.MessagePackWriter.WriteInt8(sbyte value) -> void
+MessagePack.MessagePackWriter.WriteMapHeader(int count) -> void
+MessagePack.MessagePackWriter.WriteMapHeader(uint count) -> void
+MessagePack.MessagePackWriter.WriteNil() -> void
+MessagePack.MessagePackWriter.WriteRaw(System.ReadOnlySpan<byte> rawMessagePackBlock) -> void
+MessagePack.MessagePackWriter.WriteRaw(in System.Buffers.ReadOnlySequence<byte> rawMessagePackBlock) -> void
+MessagePack.MessagePackWriter.WriteString(System.ReadOnlySpan<byte> utf8stringBytes) -> void
+MessagePack.MessagePackWriter.WriteString(in System.Buffers.ReadOnlySequence<byte> utf8stringBytes) -> void
+MessagePack.MessagePackWriter.WriteUInt16(ushort value) -> void
+MessagePack.MessagePackWriter.WriteUInt32(uint value) -> void
+MessagePack.MessagePackWriter.WriteUInt64(ulong value) -> void
+MessagePack.MessagePackWriter.WriteUInt8(byte value) -> void
+MessagePack.Nil
+MessagePack.Nil.Equals(MessagePack.Nil other) -> bool
+MessagePack.Nil.Nil() -> void
+MessagePack.ReservedMessagePackExtensionTypeCode
+MessagePack.Resolvers.AttributeFormatterResolver
+MessagePack.Resolvers.AttributeFormatterResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.BuiltinResolver
+MessagePack.Resolvers.BuiltinResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.CompositeResolver
+MessagePack.Resolvers.ContractlessStandardResolver
+MessagePack.Resolvers.ContractlessStandardResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.ContractlessStandardResolverAllowPrivate
+MessagePack.Resolvers.ContractlessStandardResolverAllowPrivate.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.DynamicContractlessObjectResolver
+MessagePack.Resolvers.DynamicContractlessObjectResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.DynamicContractlessObjectResolverAllowPrivate
+MessagePack.Resolvers.DynamicContractlessObjectResolverAllowPrivate.DynamicContractlessObjectResolverAllowPrivate() -> void
+MessagePack.Resolvers.DynamicContractlessObjectResolverAllowPrivate.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.DynamicEnumAsStringResolver
+MessagePack.Resolvers.DynamicEnumAsStringResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.DynamicEnumResolver
+MessagePack.Resolvers.DynamicEnumResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.DynamicGenericResolver
+MessagePack.Resolvers.DynamicGenericResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.DynamicObjectResolver
+MessagePack.Resolvers.DynamicObjectResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.DynamicObjectResolverAllowPrivate
+MessagePack.Resolvers.DynamicObjectResolverAllowPrivate.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.DynamicUnionResolver
+MessagePack.Resolvers.DynamicUnionResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.NativeDateTimeResolver
+MessagePack.Resolvers.NativeDateTimeResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.NativeDecimalResolver
+MessagePack.Resolvers.NativeDecimalResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.NativeGuidResolver
+MessagePack.Resolvers.NativeGuidResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.PrimitiveObjectResolver
+MessagePack.Resolvers.PrimitiveObjectResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.StandardResolver
+MessagePack.Resolvers.StandardResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.StandardResolverAllowPrivate
+MessagePack.Resolvers.StandardResolverAllowPrivate.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.StaticCompositeResolver
+MessagePack.Resolvers.StaticCompositeResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.StaticCompositeResolver.Register(System.Collections.Generic.IReadOnlyList<MessagePack.Formatters.IMessagePackFormatter> formatters, System.Collections.Generic.IReadOnlyList<MessagePack.IFormatterResolver> resolvers) -> void
+MessagePack.Resolvers.StaticCompositeResolver.Register(params MessagePack.Formatters.IMessagePackFormatter[] formatters) -> void
+MessagePack.Resolvers.StaticCompositeResolver.Register(params MessagePack.IFormatterResolver[] resolvers) -> void
+MessagePack.Resolvers.TypelessContractlessStandardResolver
+MessagePack.Resolvers.TypelessContractlessStandardResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.TypelessContractlessStandardResolver.TypelessContractlessStandardResolver() -> void
+MessagePack.Resolvers.TypelessObjectResolver
+MessagePack.Resolvers.TypelessObjectResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.TinyJsonException
+MessagePack.TinyJsonException.TinyJsonException(string message) -> void
+abstract MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TEnumerator, TCollection>.Add(TIntermediate collection, int index, TElement value, MessagePack.MessagePackSerializerOptions options) -> void
+abstract MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TEnumerator, TCollection>.Complete(TIntermediate intermediateCollection) -> TCollection
+abstract MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TEnumerator, TCollection>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> TIntermediate
+abstract MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TEnumerator, TCollection>.GetSourceEnumerator(TCollection source) -> TEnumerator
+abstract MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TEnumerator, TDictionary>.Add(TIntermediate collection, int index, TKey key, TValue value, MessagePack.MessagePackSerializerOptions options) -> void
+abstract MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TEnumerator, TDictionary>.Complete(TIntermediate intermediateCollection) -> TDictionary
+abstract MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TEnumerator, TDictionary>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> TIntermediate
+abstract MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TEnumerator, TDictionary>.GetSourceEnumerator(TDictionary source) -> TEnumerator
+const MessagePack.MessagePackCode.Array16 = 220 -> byte
+const MessagePack.MessagePackCode.Array32 = 221 -> byte
+const MessagePack.MessagePackCode.Bin16 = 197 -> byte
+const MessagePack.MessagePackCode.Bin32 = 198 -> byte
+const MessagePack.MessagePackCode.Bin8 = 196 -> byte
+const MessagePack.MessagePackCode.Ext16 = 200 -> byte
+const MessagePack.MessagePackCode.Ext32 = 201 -> byte
+const MessagePack.MessagePackCode.Ext8 = 199 -> byte
+const MessagePack.MessagePackCode.False = 194 -> byte
+const MessagePack.MessagePackCode.FixExt1 = 212 -> byte
+const MessagePack.MessagePackCode.FixExt16 = 216 -> byte
+const MessagePack.MessagePackCode.FixExt2 = 213 -> byte
+const MessagePack.MessagePackCode.FixExt4 = 214 -> byte
+const MessagePack.MessagePackCode.FixExt8 = 215 -> byte
+const MessagePack.MessagePackCode.Float32 = 202 -> byte
+const MessagePack.MessagePackCode.Float64 = 203 -> byte
+const MessagePack.MessagePackCode.Int16 = 209 -> byte
+const MessagePack.MessagePackCode.Int32 = 210 -> byte
+const MessagePack.MessagePackCode.Int64 = 211 -> byte
+const MessagePack.MessagePackCode.Int8 = 208 -> byte
+const MessagePack.MessagePackCode.Map16 = 222 -> byte
+const MessagePack.MessagePackCode.Map32 = 223 -> byte
+const MessagePack.MessagePackCode.MaxFixArray = 159 -> byte
+const MessagePack.MessagePackCode.MaxFixInt = 127 -> byte
+const MessagePack.MessagePackCode.MaxFixMap = 143 -> byte
+const MessagePack.MessagePackCode.MaxFixStr = 191 -> byte
+const MessagePack.MessagePackCode.MaxNegativeFixInt = 255 -> byte
+const MessagePack.MessagePackCode.MinFixArray = 144 -> byte
+const MessagePack.MessagePackCode.MinFixInt = 0 -> byte
+const MessagePack.MessagePackCode.MinFixMap = 128 -> byte
+const MessagePack.MessagePackCode.MinFixStr = 160 -> byte
+const MessagePack.MessagePackCode.MinNegativeFixInt = 224 -> byte
+const MessagePack.MessagePackCode.NeverUsed = 193 -> byte
+const MessagePack.MessagePackCode.Nil = 192 -> byte
+const MessagePack.MessagePackCode.Str16 = 218 -> byte
+const MessagePack.MessagePackCode.Str32 = 219 -> byte
+const MessagePack.MessagePackCode.Str8 = 217 -> byte
+const MessagePack.MessagePackCode.True = 195 -> byte
+const MessagePack.MessagePackCode.UInt16 = 205 -> byte
+const MessagePack.MessagePackCode.UInt32 = 206 -> byte
+const MessagePack.MessagePackCode.UInt64 = 207 -> byte
+const MessagePack.MessagePackCode.UInt8 = 204 -> byte
+const MessagePack.MessagePackRange.MaxFixArrayCount = 15 -> int
+const MessagePack.MessagePackRange.MaxFixMapCount = 15 -> int
+const MessagePack.MessagePackRange.MaxFixNegativeInt = -1 -> int
+const MessagePack.MessagePackRange.MaxFixPositiveInt = 127 -> int
+const MessagePack.MessagePackRange.MaxFixStringLength = 31 -> int
+const MessagePack.MessagePackRange.MinFixNegativeInt = -32 -> int
+const MessagePack.MessagePackRange.MinFixStringLength = 0 -> int
+const MessagePack.ReservedMessagePackExtensionTypeCode.DateTime = -1 -> sbyte
+override MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TCollection>.GetSourceEnumerator(TCollection source) -> System.Collections.Generic.IEnumerator<TElement>
+override MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TDictionary>.Complete(TDictionary intermediateCollection) -> TDictionary
+override MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TDictionary>.GetSourceEnumerator(TDictionary source) -> System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<TKey, TValue>>
+override MessagePack.Internal.AutomataDictionary.ToString() -> string
+override MessagePack.Nil.Equals(object obj) -> bool
+override MessagePack.Nil.GetHashCode() -> int
+override MessagePack.Nil.ToString() -> string
+override sealed MessagePack.Formatters.CollectionFormatterBase<TElement, TCollection>.Complete(TCollection intermediateCollection) -> TCollection
+static MessagePack.FormatterResolverExtensions.GetFormatterDynamic(this MessagePack.IFormatterResolver resolver, System.Type type) -> object
+static MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T>(this MessagePack.IFormatterResolver resolver) -> MessagePack.Formatters.IMessagePackFormatter<T>
+static MessagePack.Formatters.PrimitiveObjectFormatter.IsSupportedType(System.Type type, System.Reflection.TypeInfo typeInfo, object value) -> bool
+static MessagePack.Internal.AutomataKeyGen.GetKey(ref System.ReadOnlySpan<byte> span) -> ulong
+static MessagePack.Internal.CodeGenHelpers.GetArrayFromNullableSequence(in System.Buffers.ReadOnlySequence<byte>? sequence) -> byte[]
+static MessagePack.Internal.CodeGenHelpers.GetEncodedStringBytes(string value) -> byte[]
+static MessagePack.Internal.CodeGenHelpers.GetSpanFromSequence(in System.Buffers.ReadOnlySequence<byte> sequence) -> System.ReadOnlySpan<byte>
+static MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref MessagePack.MessagePackReader reader) -> System.ReadOnlySpan<byte>
+static MessagePack.Internal.UnsafeMemory32.WriteRaw1(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw10(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw11(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw12(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw13(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw14(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw15(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw16(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw17(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw18(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw19(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw2(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw20(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw21(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw22(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw23(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw24(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw25(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw26(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw27(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw28(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw29(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw3(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw30(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw31(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw4(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw5(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw6(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw7(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw8(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw9(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw1(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw10(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw11(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw12(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw13(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw14(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw15(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw16(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw17(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw18(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw19(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw2(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw20(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw21(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw22(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw23(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw24(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw25(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw26(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw27(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw28(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw29(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw3(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw30(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw31(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw4(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw5(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw6(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw7(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw8(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw9(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.MessagePackCode.ToFormatName(byte code) -> string
+static MessagePack.MessagePackCode.ToMessagePackType(byte code) -> MessagePack.MessagePackType
+static MessagePack.MessagePackSerializer.ConvertFromJson(System.IO.TextReader reader, ref MessagePack.MessagePackWriter writer, MessagePack.MessagePackSerializerOptions options = null) -> void
+static MessagePack.MessagePackSerializer.ConvertFromJson(string str, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> byte[]
+static MessagePack.MessagePackSerializer.ConvertFromJson(string str, ref MessagePack.MessagePackWriter writer, MessagePack.MessagePackSerializerOptions options = null) -> void
+static MessagePack.MessagePackSerializer.ConvertToJson(System.ReadOnlyMemory<byte> bytes, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> string
+static MessagePack.MessagePackSerializer.ConvertToJson(in System.Buffers.ReadOnlySequence<byte> bytes, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> string
+static MessagePack.MessagePackSerializer.ConvertToJson(ref MessagePack.MessagePackReader reader, System.IO.TextWriter jsonWriter, MessagePack.MessagePackSerializerOptions options = null) -> void
+static MessagePack.MessagePackSerializer.DefaultOptions.get -> MessagePack.MessagePackSerializerOptions
+static MessagePack.MessagePackSerializer.DefaultOptions.set -> void
+static MessagePack.MessagePackSerializer.Deserialize(System.Type type, System.Buffers.ReadOnlySequence<byte> bytes, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> object
+static MessagePack.MessagePackSerializer.Deserialize(System.Type type, System.IO.Stream stream, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> object
+static MessagePack.MessagePackSerializer.Deserialize(System.Type type, System.ReadOnlyMemory<byte> bytes, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> object
+static MessagePack.MessagePackSerializer.Deserialize(System.Type type, ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options = null) -> object
+static MessagePack.MessagePackSerializer.Deserialize<T>(System.IO.Stream stream, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> T
+static MessagePack.MessagePackSerializer.Deserialize<T>(System.ReadOnlyMemory<byte> buffer, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> T
+static MessagePack.MessagePackSerializer.Deserialize<T>(System.ReadOnlyMemory<byte> buffer, MessagePack.MessagePackSerializerOptions options, out int bytesRead, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> T
+static MessagePack.MessagePackSerializer.Deserialize<T>(System.ReadOnlyMemory<byte> buffer, out int bytesRead, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> T
+static MessagePack.MessagePackSerializer.Deserialize<T>(in System.Buffers.ReadOnlySequence<byte> byteSequence, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> T
+static MessagePack.MessagePackSerializer.Deserialize<T>(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options = null) -> T
+static MessagePack.MessagePackSerializer.DeserializeAsync(System.Type type, System.IO.Stream stream, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask<object>
+static MessagePack.MessagePackSerializer.DeserializeAsync<T>(System.IO.Stream stream, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask<T>
+static MessagePack.MessagePackSerializer.Serialize(System.Type type, System.Buffers.IBufferWriter<byte> writer, object obj, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> void
+static MessagePack.MessagePackSerializer.Serialize(System.Type type, System.IO.Stream stream, object obj, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> void
+static MessagePack.MessagePackSerializer.Serialize(System.Type type, object obj, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> byte[]
+static MessagePack.MessagePackSerializer.Serialize(System.Type type, ref MessagePack.MessagePackWriter writer, object obj, MessagePack.MessagePackSerializerOptions options = null) -> void
+static MessagePack.MessagePackSerializer.Serialize<T>(System.Buffers.IBufferWriter<byte> writer, T value, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> void
+static MessagePack.MessagePackSerializer.Serialize<T>(System.IO.Stream stream, T value, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> void
+static MessagePack.MessagePackSerializer.Serialize<T>(T value, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> byte[]
+static MessagePack.MessagePackSerializer.Serialize<T>(ref MessagePack.MessagePackWriter writer, T value, MessagePack.MessagePackSerializerOptions options = null) -> void
+static MessagePack.MessagePackSerializer.SerializeAsync(System.Type type, System.IO.Stream stream, object obj, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task
+static MessagePack.MessagePackSerializer.SerializeAsync<T>(System.IO.Stream stream, T value, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task
+static MessagePack.MessagePackSerializer.SerializeToJson<T>(System.IO.TextWriter textWriter, T obj, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> void
+static MessagePack.MessagePackSerializer.SerializeToJson<T>(T obj, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> string
+static MessagePack.MessagePackSerializer.Typeless.DefaultOptions.get -> MessagePack.MessagePackSerializerOptions
+static MessagePack.MessagePackSerializer.Typeless.DefaultOptions.set -> void
+static MessagePack.MessagePackSerializer.Typeless.Deserialize(System.IO.Stream stream, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> object
+static MessagePack.MessagePackSerializer.Typeless.Deserialize(System.Memory<byte> bytes, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> object
+static MessagePack.MessagePackSerializer.Typeless.Deserialize(in System.Buffers.ReadOnlySequence<byte> byteSequence, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> object
+static MessagePack.MessagePackSerializer.Typeless.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options = null) -> object
+static MessagePack.MessagePackSerializer.Typeless.DeserializeAsync(System.IO.Stream stream, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask<object>
+static MessagePack.MessagePackSerializer.Typeless.Serialize(System.Buffers.IBufferWriter<byte> writer, object obj, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> void
+static MessagePack.MessagePackSerializer.Typeless.Serialize(System.IO.Stream stream, object obj, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> void
+static MessagePack.MessagePackSerializer.Typeless.Serialize(object obj, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> byte[]
+static MessagePack.MessagePackSerializer.Typeless.Serialize(ref MessagePack.MessagePackWriter writer, object obj, MessagePack.MessagePackSerializerOptions options = null) -> void
+static MessagePack.MessagePackSerializer.Typeless.SerializeAsync(System.IO.Stream stream, object obj, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task
+static MessagePack.MessagePackSerializerOptions.Standard.get -> MessagePack.MessagePackSerializerOptions
+static MessagePack.Resolvers.CompositeResolver.Create(System.Collections.Generic.IReadOnlyList<MessagePack.Formatters.IMessagePackFormatter> formatters, System.Collections.Generic.IReadOnlyList<MessagePack.IFormatterResolver> resolvers) -> MessagePack.IFormatterResolver
+static MessagePack.Resolvers.CompositeResolver.Create(params MessagePack.Formatters.IMessagePackFormatter[] formatters) -> MessagePack.IFormatterResolver
+static MessagePack.Resolvers.CompositeResolver.Create(params MessagePack.IFormatterResolver[] resolvers) -> MessagePack.IFormatterResolver
+static readonly MessagePack.Formatters.BigIntegerFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Numerics.BigInteger>
+static readonly MessagePack.Formatters.BitArrayFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Collections.BitArray>
+static readonly MessagePack.Formatters.BooleanArrayFormatter.Instance -> MessagePack.Formatters.BooleanArrayFormatter
+static readonly MessagePack.Formatters.BooleanFormatter.Instance -> MessagePack.Formatters.BooleanFormatter
+static readonly MessagePack.Formatters.ByteArrayFormatter.Instance -> MessagePack.Formatters.ByteArrayFormatter
+static readonly MessagePack.Formatters.ByteArraySegmentFormatter.Instance -> MessagePack.Formatters.ByteArraySegmentFormatter
+static readonly MessagePack.Formatters.ByteFormatter.Instance -> MessagePack.Formatters.ByteFormatter
+static readonly MessagePack.Formatters.CharArrayFormatter.Instance -> MessagePack.Formatters.CharArrayFormatter
+static readonly MessagePack.Formatters.CharFormatter.Instance -> MessagePack.Formatters.CharFormatter
+static readonly MessagePack.Formatters.ComplexFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Numerics.Complex>
+static readonly MessagePack.Formatters.DateTimeArrayFormatter.Instance -> MessagePack.Formatters.DateTimeArrayFormatter
+static readonly MessagePack.Formatters.DateTimeFormatter.Instance -> MessagePack.Formatters.DateTimeFormatter
+static readonly MessagePack.Formatters.DateTimeOffsetFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.DateTimeOffset>
+static readonly MessagePack.Formatters.DecimalFormatter.Instance -> MessagePack.Formatters.DecimalFormatter
+static readonly MessagePack.Formatters.DoubleArrayFormatter.Instance -> MessagePack.Formatters.DoubleArrayFormatter
+static readonly MessagePack.Formatters.DoubleFormatter.Instance -> MessagePack.Formatters.DoubleFormatter
+static readonly MessagePack.Formatters.DynamicObjectTypeFallbackFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<object>
+static readonly MessagePack.Formatters.ForceByteBlockFormatter.Instance -> MessagePack.Formatters.ForceByteBlockFormatter
+static readonly MessagePack.Formatters.ForceInt16BlockArrayFormatter.Instance -> MessagePack.Formatters.ForceInt16BlockArrayFormatter
+static readonly MessagePack.Formatters.ForceInt16BlockFormatter.Instance -> MessagePack.Formatters.ForceInt16BlockFormatter
+static readonly MessagePack.Formatters.ForceInt32BlockArrayFormatter.Instance -> MessagePack.Formatters.ForceInt32BlockArrayFormatter
+static readonly MessagePack.Formatters.ForceInt32BlockFormatter.Instance -> MessagePack.Formatters.ForceInt32BlockFormatter
+static readonly MessagePack.Formatters.ForceInt64BlockArrayFormatter.Instance -> MessagePack.Formatters.ForceInt64BlockArrayFormatter
+static readonly MessagePack.Formatters.ForceInt64BlockFormatter.Instance -> MessagePack.Formatters.ForceInt64BlockFormatter
+static readonly MessagePack.Formatters.ForceSByteBlockArrayFormatter.Instance -> MessagePack.Formatters.ForceSByteBlockArrayFormatter
+static readonly MessagePack.Formatters.ForceSByteBlockFormatter.Instance -> MessagePack.Formatters.ForceSByteBlockFormatter
+static readonly MessagePack.Formatters.ForceUInt16BlockArrayFormatter.Instance -> MessagePack.Formatters.ForceUInt16BlockArrayFormatter
+static readonly MessagePack.Formatters.ForceUInt16BlockFormatter.Instance -> MessagePack.Formatters.ForceUInt16BlockFormatter
+static readonly MessagePack.Formatters.ForceUInt32BlockArrayFormatter.Instance -> MessagePack.Formatters.ForceUInt32BlockArrayFormatter
+static readonly MessagePack.Formatters.ForceUInt32BlockFormatter.Instance -> MessagePack.Formatters.ForceUInt32BlockFormatter
+static readonly MessagePack.Formatters.ForceUInt64BlockArrayFormatter.Instance -> MessagePack.Formatters.ForceUInt64BlockArrayFormatter
+static readonly MessagePack.Formatters.ForceUInt64BlockFormatter.Instance -> MessagePack.Formatters.ForceUInt64BlockFormatter
+static readonly MessagePack.Formatters.GuidFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Guid>
+static readonly MessagePack.Formatters.Int16ArrayFormatter.Instance -> MessagePack.Formatters.Int16ArrayFormatter
+static readonly MessagePack.Formatters.Int16Formatter.Instance -> MessagePack.Formatters.Int16Formatter
+static readonly MessagePack.Formatters.Int32ArrayFormatter.Instance -> MessagePack.Formatters.Int32ArrayFormatter
+static readonly MessagePack.Formatters.Int32Formatter.Instance -> MessagePack.Formatters.Int32Formatter
+static readonly MessagePack.Formatters.Int64ArrayFormatter.Instance -> MessagePack.Formatters.Int64ArrayFormatter
+static readonly MessagePack.Formatters.Int64Formatter.Instance -> MessagePack.Formatters.Int64Formatter
+static readonly MessagePack.Formatters.NativeDateTimeArrayFormatter.Instance -> MessagePack.Formatters.NativeDateTimeArrayFormatter
+static readonly MessagePack.Formatters.NativeDateTimeFormatter.Instance -> MessagePack.Formatters.NativeDateTimeFormatter
+static readonly MessagePack.Formatters.NativeDecimalFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<decimal>
+static readonly MessagePack.Formatters.NativeGuidFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Guid>
+static readonly MessagePack.Formatters.NilFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<MessagePack.Nil>
+static readonly MessagePack.Formatters.NonGenericInterfaceDictionaryFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Collections.IDictionary>
+static readonly MessagePack.Formatters.NonGenericInterfaceListFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Collections.IList>
+static readonly MessagePack.Formatters.NullableBooleanFormatter.Instance -> MessagePack.Formatters.NullableBooleanFormatter
+static readonly MessagePack.Formatters.NullableByteFormatter.Instance -> MessagePack.Formatters.NullableByteFormatter
+static readonly MessagePack.Formatters.NullableCharFormatter.Instance -> MessagePack.Formatters.NullableCharFormatter
+static readonly MessagePack.Formatters.NullableDateTimeFormatter.Instance -> MessagePack.Formatters.NullableDateTimeFormatter
+static readonly MessagePack.Formatters.NullableDoubleFormatter.Instance -> MessagePack.Formatters.NullableDoubleFormatter
+static readonly MessagePack.Formatters.NullableForceByteBlockFormatter.Instance -> MessagePack.Formatters.NullableForceByteBlockFormatter
+static readonly MessagePack.Formatters.NullableForceInt16BlockFormatter.Instance -> MessagePack.Formatters.NullableForceInt16BlockFormatter
+static readonly MessagePack.Formatters.NullableForceInt32BlockFormatter.Instance -> MessagePack.Formatters.NullableForceInt32BlockFormatter
+static readonly MessagePack.Formatters.NullableForceInt64BlockFormatter.Instance -> MessagePack.Formatters.NullableForceInt64BlockFormatter
+static readonly MessagePack.Formatters.NullableForceSByteBlockFormatter.Instance -> MessagePack.Formatters.NullableForceSByteBlockFormatter
+static readonly MessagePack.Formatters.NullableForceUInt16BlockFormatter.Instance -> MessagePack.Formatters.NullableForceUInt16BlockFormatter
+static readonly MessagePack.Formatters.NullableForceUInt32BlockFormatter.Instance -> MessagePack.Formatters.NullableForceUInt32BlockFormatter
+static readonly MessagePack.Formatters.NullableForceUInt64BlockFormatter.Instance -> MessagePack.Formatters.NullableForceUInt64BlockFormatter
+static readonly MessagePack.Formatters.NullableInt16Formatter.Instance -> MessagePack.Formatters.NullableInt16Formatter
+static readonly MessagePack.Formatters.NullableInt32Formatter.Instance -> MessagePack.Formatters.NullableInt32Formatter
+static readonly MessagePack.Formatters.NullableInt64Formatter.Instance -> MessagePack.Formatters.NullableInt64Formatter
+static readonly MessagePack.Formatters.NullableNilFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<MessagePack.Nil?>
+static readonly MessagePack.Formatters.NullableSByteFormatter.Instance -> MessagePack.Formatters.NullableSByteFormatter
+static readonly MessagePack.Formatters.NullableSingleFormatter.Instance -> MessagePack.Formatters.NullableSingleFormatter
+static readonly MessagePack.Formatters.NullableStringArrayFormatter.Instance -> MessagePack.Formatters.NullableStringArrayFormatter
+static readonly MessagePack.Formatters.NullableStringFormatter.Instance -> MessagePack.Formatters.NullableStringFormatter
+static readonly MessagePack.Formatters.NullableUInt16Formatter.Instance -> MessagePack.Formatters.NullableUInt16Formatter
+static readonly MessagePack.Formatters.NullableUInt32Formatter.Instance -> MessagePack.Formatters.NullableUInt32Formatter
+static readonly MessagePack.Formatters.NullableUInt64Formatter.Instance -> MessagePack.Formatters.NullableUInt64Formatter
+static readonly MessagePack.Formatters.PrimitiveObjectFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<object>
+static readonly MessagePack.Formatters.SByteArrayFormatter.Instance -> MessagePack.Formatters.SByteArrayFormatter
+static readonly MessagePack.Formatters.SByteFormatter.Instance -> MessagePack.Formatters.SByteFormatter
+static readonly MessagePack.Formatters.SingleArrayFormatter.Instance -> MessagePack.Formatters.SingleArrayFormatter
+static readonly MessagePack.Formatters.SingleFormatter.Instance -> MessagePack.Formatters.SingleFormatter
+static readonly MessagePack.Formatters.StringBuilderFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Text.StringBuilder>
+static readonly MessagePack.Formatters.TimeSpanFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.TimeSpan>
+static readonly MessagePack.Formatters.TypelessFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<object>
+static readonly MessagePack.Formatters.UInt16ArrayFormatter.Instance -> MessagePack.Formatters.UInt16ArrayFormatter
+static readonly MessagePack.Formatters.UInt16Formatter.Instance -> MessagePack.Formatters.UInt16Formatter
+static readonly MessagePack.Formatters.UInt32ArrayFormatter.Instance -> MessagePack.Formatters.UInt32ArrayFormatter
+static readonly MessagePack.Formatters.UInt32Formatter.Instance -> MessagePack.Formatters.UInt32Formatter
+static readonly MessagePack.Formatters.UInt64ArrayFormatter.Instance -> MessagePack.Formatters.UInt64ArrayFormatter
+static readonly MessagePack.Formatters.UInt64Formatter.Instance -> MessagePack.Formatters.UInt64Formatter
+static readonly MessagePack.Formatters.UriFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Uri>
+static readonly MessagePack.Formatters.VersionFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Version>
+static readonly MessagePack.Internal.AutomataKeyGen.GetKeyMethod -> System.Reflection.MethodInfo
+static readonly MessagePack.Internal.RuntimeTypeHandleEqualityComparer.Default -> System.Collections.Generic.IEqualityComparer<System.RuntimeTypeHandle>
+static readonly MessagePack.Internal.UnsafeMemory.Is32Bit -> bool
+static readonly MessagePack.Nil.Default -> MessagePack.Nil
+static readonly MessagePack.Resolvers.AttributeFormatterResolver.Instance -> MessagePack.Resolvers.AttributeFormatterResolver
+static readonly MessagePack.Resolvers.BuiltinResolver.Instance -> MessagePack.Resolvers.BuiltinResolver
+static readonly MessagePack.Resolvers.ContractlessStandardResolver.Instance -> MessagePack.Resolvers.ContractlessStandardResolver
+static readonly MessagePack.Resolvers.ContractlessStandardResolver.Options -> MessagePack.MessagePackSerializerOptions
+static readonly MessagePack.Resolvers.ContractlessStandardResolverAllowPrivate.Instance -> MessagePack.Resolvers.ContractlessStandardResolverAllowPrivate
+static readonly MessagePack.Resolvers.ContractlessStandardResolverAllowPrivate.Options -> MessagePack.MessagePackSerializerOptions
+static readonly MessagePack.Resolvers.DynamicContractlessObjectResolver.Instance -> MessagePack.Resolvers.DynamicContractlessObjectResolver
+static readonly MessagePack.Resolvers.DynamicContractlessObjectResolverAllowPrivate.Instance -> MessagePack.Resolvers.DynamicContractlessObjectResolverAllowPrivate
+static readonly MessagePack.Resolvers.DynamicEnumAsStringResolver.Instance -> MessagePack.Resolvers.DynamicEnumAsStringResolver
+static readonly MessagePack.Resolvers.DynamicEnumAsStringResolver.Options -> MessagePack.MessagePackSerializerOptions
+static readonly MessagePack.Resolvers.DynamicEnumResolver.Instance -> MessagePack.Resolvers.DynamicEnumResolver
+static readonly MessagePack.Resolvers.DynamicGenericResolver.Instance -> MessagePack.Resolvers.DynamicGenericResolver
+static readonly MessagePack.Resolvers.DynamicObjectResolver.Instance -> MessagePack.Resolvers.DynamicObjectResolver
+static readonly MessagePack.Resolvers.DynamicObjectResolver.Options -> MessagePack.MessagePackSerializerOptions
+static readonly MessagePack.Resolvers.DynamicObjectResolverAllowPrivate.Instance -> MessagePack.Resolvers.DynamicObjectResolverAllowPrivate
+static readonly MessagePack.Resolvers.DynamicUnionResolver.Instance -> MessagePack.Resolvers.DynamicUnionResolver
+static readonly MessagePack.Resolvers.DynamicUnionResolver.Options -> MessagePack.MessagePackSerializerOptions
+static readonly MessagePack.Resolvers.NativeDateTimeResolver.Instance -> MessagePack.Resolvers.NativeDateTimeResolver
+static readonly MessagePack.Resolvers.NativeDateTimeResolver.Options -> MessagePack.MessagePackSerializerOptions
+static readonly MessagePack.Resolvers.NativeDecimalResolver.Instance -> MessagePack.Resolvers.NativeDecimalResolver
+static readonly MessagePack.Resolvers.NativeGuidResolver.Instance -> MessagePack.Resolvers.NativeGuidResolver
+static readonly MessagePack.Resolvers.PrimitiveObjectResolver.Instance -> MessagePack.Resolvers.PrimitiveObjectResolver
+static readonly MessagePack.Resolvers.PrimitiveObjectResolver.Options -> MessagePack.MessagePackSerializerOptions
+static readonly MessagePack.Resolvers.StandardResolver.Instance -> MessagePack.Resolvers.StandardResolver
+static readonly MessagePack.Resolvers.StandardResolver.Options -> MessagePack.MessagePackSerializerOptions
+static readonly MessagePack.Resolvers.StandardResolverAllowPrivate.Instance -> MessagePack.Resolvers.StandardResolverAllowPrivate
+static readonly MessagePack.Resolvers.StandardResolverAllowPrivate.Options -> MessagePack.MessagePackSerializerOptions
+static readonly MessagePack.Resolvers.StaticCompositeResolver.Instance -> MessagePack.Resolvers.StaticCompositeResolver
+static readonly MessagePack.Resolvers.TypelessContractlessStandardResolver.Instance -> MessagePack.Resolvers.TypelessContractlessStandardResolver
+static readonly MessagePack.Resolvers.TypelessContractlessStandardResolver.Options -> MessagePack.MessagePackSerializerOptions
+static readonly MessagePack.Resolvers.TypelessObjectResolver.Instance -> MessagePack.IFormatterResolver
+virtual MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TEnumerator, TCollection>.GetCount(TCollection sequence) -> int?
+virtual MessagePack.MessagePackSerializerOptions.Clone() -> MessagePack.MessagePackSerializerOptions
+virtual MessagePack.MessagePackSerializerOptions.LoadType(string typeName) -> System.Type
+virtual MessagePack.MessagePackSerializerOptions.ThrowIfDeserializingTypeIsDisallowed(System.Type type) -> void
+MessagePack.ExtensionHeader.Equals(MessagePack.ExtensionHeader other) -> bool
+MessagePack.Formatters.InterfaceCollectionFormatter2<T>
+MessagePack.Formatters.InterfaceCollectionFormatter2<T>.InterfaceCollectionFormatter2() -> void
+MessagePack.Formatters.InterfaceListFormatter2<T>
+MessagePack.Formatters.InterfaceListFormatter2<T>.InterfaceListFormatter2() -> void
+MessagePack.MessagePackReader.Depth.get -> int
+MessagePack.MessagePackReader.Depth.set -> void
+MessagePack.MessagePackReader.ReadDateTime(MessagePack.ExtensionHeader header) -> System.DateTime
+MessagePack.MessagePackReader.TryReadArrayHeader(out int count) -> bool
+MessagePack.MessagePackReader.TryReadExtensionFormatHeader(out MessagePack.ExtensionHeader extensionHeader) -> bool
+MessagePack.MessagePackReader.TryReadMapHeader(out int count) -> bool
+MessagePack.MessagePackSecurity
+MessagePack.MessagePackSecurity.DepthStep(ref MessagePack.MessagePackReader reader) -> void
+MessagePack.MessagePackSecurity.GetEqualityComparer() -> System.Collections.IEqualityComparer
+MessagePack.MessagePackSecurity.GetEqualityComparer<T>() -> System.Collections.Generic.IEqualityComparer<T>
+MessagePack.MessagePackSecurity.HashCollisionResistant.get -> bool
+MessagePack.MessagePackSecurity.MaximumObjectGraphDepth.get -> int
+MessagePack.MessagePackSecurity.MessagePackSecurity(MessagePack.MessagePackSecurity copyFrom) -> void
+MessagePack.MessagePackSecurity.WithHashCollisionResistant(bool hashCollisionResistant) -> MessagePack.MessagePackSecurity
+MessagePack.MessagePackSecurity.WithMaximumObjectGraphDepth(int maximumObjectGraphDepth) -> MessagePack.MessagePackSecurity
+MessagePack.MessagePackSerializerOptions.Security.get -> MessagePack.MessagePackSecurity
+MessagePack.MessagePackSerializerOptions.WithSecurity(MessagePack.MessagePackSecurity security) -> MessagePack.MessagePackSerializerOptions
+MessagePack.MessagePackStreamReader.DiscardBufferedData() -> void
+MessagePack.MessagePackStreamReader.MessagePackStreamReader(System.IO.Stream stream, bool leaveOpen) -> void
+MessagePack.MessagePackStreamReader.ReadArrayAsync(System.Threading.CancellationToken cancellationToken) -> System.Collections.Generic.IAsyncEnumerable<System.Buffers.ReadOnlySequence<byte>>
+MessagePack.MessagePackWriter.WriteBinHeader(int length) -> void
+MessagePack.MessagePackWriter.WriteStringHeader(int byteCount) -> void
+static readonly MessagePack.MessagePackSecurity.TrustedData -> MessagePack.MessagePackSecurity
+static readonly MessagePack.MessagePackSecurity.UntrustedData -> MessagePack.MessagePackSecurity
+virtual MessagePack.MessagePackSecurity.Clone() -> MessagePack.MessagePackSecurity
+virtual MessagePack.MessagePackSecurity.GetHashCollisionResistantEqualityComparer() -> System.Collections.IEqualityComparer
+virtual MessagePack.MessagePackSecurity.GetHashCollisionResistantEqualityComparer<T>() -> System.Collections.Generic.IEqualityComparer<T>
+MessagePack.Formatters.ByteMemoryFormatter
+MessagePack.Formatters.ByteMemoryFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Memory<byte>
+MessagePack.Formatters.ByteMemoryFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Memory<byte> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ByteReadOnlyMemoryFormatter
+MessagePack.Formatters.ByteReadOnlyMemoryFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.ReadOnlyMemory<byte>
+MessagePack.Formatters.ByteReadOnlyMemoryFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.ReadOnlyMemory<byte> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ByteReadOnlySequenceFormatter
+MessagePack.Formatters.ByteReadOnlySequenceFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Buffers.ReadOnlySequence<byte>
+MessagePack.Formatters.ByteReadOnlySequenceFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Buffers.ReadOnlySequence<byte> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ExpandoObjectFormatter
+MessagePack.Formatters.ExpandoObjectFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Dynamic.ExpandoObject
+MessagePack.Formatters.ExpandoObjectFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Dynamic.ExpandoObject value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceTypelessFormatter<T>
+MessagePack.Formatters.ForceTypelessFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T
+MessagePack.Formatters.ForceTypelessFormatter<T>.ForceTypelessFormatter() -> void
+MessagePack.Formatters.ForceTypelessFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.MemoryFormatter<T>
+MessagePack.Formatters.MemoryFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Memory<T>
+MessagePack.Formatters.MemoryFormatter<T>.MemoryFormatter() -> void
+MessagePack.Formatters.MemoryFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, System.Memory<T> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NonGenericInterfaceCollectionFormatter
+MessagePack.Formatters.NonGenericInterfaceCollectionFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Collections.ICollection
+MessagePack.Formatters.NonGenericInterfaceCollectionFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Collections.ICollection value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NonGenericInterfaceEnumerableFormatter
+MessagePack.Formatters.NonGenericInterfaceEnumerableFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Collections.IEnumerable
+MessagePack.Formatters.NonGenericInterfaceEnumerableFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Collections.IEnumerable value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.PrimitiveObjectFormatter.PrimitiveObjectFormatter() -> void
+MessagePack.Formatters.ReadOnlyMemoryFormatter<T>
+MessagePack.Formatters.ReadOnlyMemoryFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.ReadOnlyMemory<T>
+MessagePack.Formatters.ReadOnlyMemoryFormatter<T>.ReadOnlyMemoryFormatter() -> void
+MessagePack.Formatters.ReadOnlyMemoryFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, System.ReadOnlyMemory<T> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ReadOnlySequenceFormatter<T>
+MessagePack.Formatters.ReadOnlySequenceFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Buffers.ReadOnlySequence<T>
+MessagePack.Formatters.ReadOnlySequenceFormatter<T>.ReadOnlySequenceFormatter() -> void
+MessagePack.Formatters.ReadOnlySequenceFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, System.Buffers.ReadOnlySequence<T> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TypeFormatter<T>
+MessagePack.Formatters.TypeFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T
+MessagePack.Formatters.TypeFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TypelessFormatter.TypelessFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableArrayFormatter<T>
+MessagePack.ImmutableCollection.ImmutableArrayFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableArray<T>
+MessagePack.ImmutableCollection.ImmutableArrayFormatter<T>.ImmutableArrayFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableArrayFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, System.Collections.Immutable.ImmutableArray<T> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.ImmutableCollection.ImmutableCollectionResolver
+MessagePack.ImmutableCollection.ImmutableCollectionResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.ImmutableCollection.ImmutableDictionaryFormatter<TKey, TValue>
+MessagePack.ImmutableCollection.ImmutableDictionaryFormatter<TKey, TValue>.ImmutableDictionaryFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableHashSetFormatter<T>
+MessagePack.ImmutableCollection.ImmutableHashSetFormatter<T>.ImmutableHashSetFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableListFormatter<T>
+MessagePack.ImmutableCollection.ImmutableListFormatter<T>.ImmutableListFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>
+MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>.Add(T value) -> void
+MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>.ImmutableQueueBuilder() -> void
+MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>.Q.get -> System.Collections.Immutable.ImmutableQueue<T>
+MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>.Q.set -> void
+MessagePack.ImmutableCollection.ImmutableQueueFormatter<T>
+MessagePack.ImmutableCollection.ImmutableQueueFormatter<T>.ImmutableQueueFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableSortedDictionaryFormatter<TKey, TValue>
+MessagePack.ImmutableCollection.ImmutableSortedDictionaryFormatter<TKey, TValue>.ImmutableSortedDictionaryFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableSortedSetFormatter<T>
+MessagePack.ImmutableCollection.ImmutableSortedSetFormatter<T>.ImmutableSortedSetFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableStackFormatter<T>
+MessagePack.ImmutableCollection.ImmutableStackFormatter<T>.ImmutableStackFormatter() -> void
+MessagePack.ImmutableCollection.InterfaceImmutableDictionaryFormatter<TKey, TValue>
+MessagePack.ImmutableCollection.InterfaceImmutableDictionaryFormatter<TKey, TValue>.InterfaceImmutableDictionaryFormatter() -> void
+MessagePack.ImmutableCollection.InterfaceImmutableListFormatter<T>
+MessagePack.ImmutableCollection.InterfaceImmutableListFormatter<T>.InterfaceImmutableListFormatter() -> void
+MessagePack.ImmutableCollection.InterfaceImmutableQueueFormatter<T>
+MessagePack.ImmutableCollection.InterfaceImmutableQueueFormatter<T>.InterfaceImmutableQueueFormatter() -> void
+MessagePack.ImmutableCollection.InterfaceImmutableSetFormatter<T>
+MessagePack.ImmutableCollection.InterfaceImmutableSetFormatter<T>.InterfaceImmutableSetFormatter() -> void
+MessagePack.ImmutableCollection.InterfaceImmutableStackFormatter<T>
+MessagePack.ImmutableCollection.InterfaceImmutableStackFormatter<T>.InterfaceImmutableStackFormatter() -> void
+MessagePack.Resolvers.ExpandoObjectResolver
+override MessagePack.ImmutableCollection.ImmutableDictionaryFormatter<TKey, TValue>.Add(System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Builder collection, int index, TKey key, TValue value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.ImmutableDictionaryFormatter<TKey, TValue>.Complete(System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Builder intermediateCollection) -> System.Collections.Immutable.ImmutableDictionary<TKey, TValue>
+override MessagePack.ImmutableCollection.ImmutableDictionaryFormatter<TKey, TValue>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Builder
+override MessagePack.ImmutableCollection.ImmutableDictionaryFormatter<TKey, TValue>.GetSourceEnumerator(System.Collections.Immutable.ImmutableDictionary<TKey, TValue> source) -> System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Enumerator
+override MessagePack.ImmutableCollection.ImmutableHashSetFormatter<T>.Add(System.Collections.Immutable.ImmutableHashSet<T>.Builder collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.ImmutableHashSetFormatter<T>.Complete(System.Collections.Immutable.ImmutableHashSet<T>.Builder intermediateCollection) -> System.Collections.Immutable.ImmutableHashSet<T>
+override MessagePack.ImmutableCollection.ImmutableHashSetFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableHashSet<T>.Builder
+override MessagePack.ImmutableCollection.ImmutableHashSetFormatter<T>.GetSourceEnumerator(System.Collections.Immutable.ImmutableHashSet<T> source) -> System.Collections.Immutable.ImmutableHashSet<T>.Enumerator
+override MessagePack.ImmutableCollection.ImmutableListFormatter<T>.Add(System.Collections.Immutable.ImmutableList<T>.Builder collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.ImmutableListFormatter<T>.Complete(System.Collections.Immutable.ImmutableList<T>.Builder intermediateCollection) -> System.Collections.Immutable.ImmutableList<T>
+override MessagePack.ImmutableCollection.ImmutableListFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableList<T>.Builder
+override MessagePack.ImmutableCollection.ImmutableListFormatter<T>.GetSourceEnumerator(System.Collections.Immutable.ImmutableList<T> source) -> System.Collections.Immutable.ImmutableList<T>.Enumerator
+override MessagePack.ImmutableCollection.ImmutableQueueFormatter<T>.Add(MessagePack.ImmutableCollection.ImmutableQueueBuilder<T> collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.ImmutableQueueFormatter<T>.Complete(MessagePack.ImmutableCollection.ImmutableQueueBuilder<T> intermediateCollection) -> System.Collections.Immutable.ImmutableQueue<T>
+override MessagePack.ImmutableCollection.ImmutableQueueFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>
+override MessagePack.ImmutableCollection.ImmutableSortedDictionaryFormatter<TKey, TValue>.Add(System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue>.Builder collection, int index, TKey key, TValue value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.ImmutableSortedDictionaryFormatter<TKey, TValue>.Complete(System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue>.Builder intermediateCollection) -> System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue>
+override MessagePack.ImmutableCollection.ImmutableSortedDictionaryFormatter<TKey, TValue>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue>.Builder
+override MessagePack.ImmutableCollection.ImmutableSortedDictionaryFormatter<TKey, TValue>.GetSourceEnumerator(System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue> source) -> System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue>.Enumerator
+override MessagePack.ImmutableCollection.ImmutableSortedSetFormatter<T>.Add(System.Collections.Immutable.ImmutableSortedSet<T>.Builder collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.ImmutableSortedSetFormatter<T>.Complete(System.Collections.Immutable.ImmutableSortedSet<T>.Builder intermediateCollection) -> System.Collections.Immutable.ImmutableSortedSet<T>
+override MessagePack.ImmutableCollection.ImmutableSortedSetFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableSortedSet<T>.Builder
+override MessagePack.ImmutableCollection.ImmutableSortedSetFormatter<T>.GetSourceEnumerator(System.Collections.Immutable.ImmutableSortedSet<T> source) -> System.Collections.Immutable.ImmutableSortedSet<T>.Enumerator
+override MessagePack.ImmutableCollection.ImmutableStackFormatter<T>.Add(T[] collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.ImmutableStackFormatter<T>.Complete(T[] intermediateCollection) -> System.Collections.Immutable.ImmutableStack<T>
+override MessagePack.ImmutableCollection.ImmutableStackFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> T[]
+override MessagePack.ImmutableCollection.InterfaceImmutableDictionaryFormatter<TKey, TValue>.Add(System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Builder collection, int index, TKey key, TValue value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.InterfaceImmutableDictionaryFormatter<TKey, TValue>.Complete(System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Builder intermediateCollection) -> System.Collections.Immutable.IImmutableDictionary<TKey, TValue>
+override MessagePack.ImmutableCollection.InterfaceImmutableDictionaryFormatter<TKey, TValue>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Builder
+override MessagePack.ImmutableCollection.InterfaceImmutableListFormatter<T>.Add(System.Collections.Immutable.ImmutableList<T>.Builder collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.InterfaceImmutableListFormatter<T>.Complete(System.Collections.Immutable.ImmutableList<T>.Builder intermediateCollection) -> System.Collections.Immutable.IImmutableList<T>
+override MessagePack.ImmutableCollection.InterfaceImmutableListFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableList<T>.Builder
+override MessagePack.ImmutableCollection.InterfaceImmutableQueueFormatter<T>.Add(MessagePack.ImmutableCollection.ImmutableQueueBuilder<T> collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.InterfaceImmutableQueueFormatter<T>.Complete(MessagePack.ImmutableCollection.ImmutableQueueBuilder<T> intermediateCollection) -> System.Collections.Immutable.IImmutableQueue<T>
+override MessagePack.ImmutableCollection.InterfaceImmutableQueueFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>
+override MessagePack.ImmutableCollection.InterfaceImmutableSetFormatter<T>.Add(System.Collections.Immutable.ImmutableHashSet<T>.Builder collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.InterfaceImmutableSetFormatter<T>.Complete(System.Collections.Immutable.ImmutableHashSet<T>.Builder intermediateCollection) -> System.Collections.Immutable.IImmutableSet<T>
+override MessagePack.ImmutableCollection.InterfaceImmutableSetFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableHashSet<T>.Builder
+override MessagePack.ImmutableCollection.InterfaceImmutableStackFormatter<T>.Add(T[] collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.InterfaceImmutableStackFormatter<T>.Complete(T[] intermediateCollection) -> System.Collections.Immutable.IImmutableStack<T>
+override MessagePack.ImmutableCollection.InterfaceImmutableStackFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> T[]
+static readonly MessagePack.Formatters.ByteMemoryFormatter.Instance -> MessagePack.Formatters.ByteMemoryFormatter
+static readonly MessagePack.Formatters.ByteReadOnlyMemoryFormatter.Instance -> MessagePack.Formatters.ByteReadOnlyMemoryFormatter
+static readonly MessagePack.Formatters.ByteReadOnlySequenceFormatter.Instance -> MessagePack.Formatters.ByteReadOnlySequenceFormatter
+static readonly MessagePack.Formatters.ExpandoObjectFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Dynamic.ExpandoObject>
+static readonly MessagePack.Formatters.NonGenericInterfaceCollectionFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Collections.ICollection>
+static readonly MessagePack.Formatters.NonGenericInterfaceEnumerableFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Collections.IEnumerable>
+static readonly MessagePack.Formatters.TypeFormatter<T>.Instance -> MessagePack.Formatters.IMessagePackFormatter<T>
+static readonly MessagePack.ImmutableCollection.ImmutableCollectionResolver.Instance -> MessagePack.ImmutableCollection.ImmutableCollectionResolver
+static readonly MessagePack.Resolvers.ExpandoObjectResolver.Instance -> MessagePack.IFormatterResolver
+static readonly MessagePack.Resolvers.ExpandoObjectResolver.Options -> MessagePack.MessagePackSerializerOptions
+virtual MessagePack.Formatters.PrimitiveObjectFormatter.DeserializeMap(ref MessagePack.MessagePackReader reader, int length, MessagePack.MessagePackSerializerOptions options) -> object
+MessagePack.ExtensionHeader.ExtensionHeader() -> void
+MessagePack.ExtensionResult.ExtensionResult() -> void
+MessagePack.FormatterNotRegisteredException.FormatterNotRegisteredException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) -> void
+MessagePack.Formatters.HalfFormatter
+MessagePack.Formatters.HalfFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Half
+MessagePack.Formatters.HalfFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Half value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.InterfaceReadOnlySetFormatter<T>
+MessagePack.Formatters.InterfaceReadOnlySetFormatter<T>.InterfaceReadOnlySetFormatter() -> void
+MessagePack.MessagePackReader.MessagePackReader() -> void
+MessagePack.MessagePackSerializerOptions.SequencePool.get -> MessagePack.SequencePool
+MessagePack.MessagePackSerializerOptions.WithPool(MessagePack.SequencePool pool) -> MessagePack.MessagePackSerializerOptions
+MessagePack.MessagePackStreamReader.MessagePackStreamReader(System.IO.Stream stream, bool leaveOpen, MessagePack.SequencePool sequencePool) -> void
+MessagePack.MessagePackStreamReader.ReadArrayHeaderAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.ValueTask<int>
+MessagePack.MessagePackStreamReader.ReadMapHeaderAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.ValueTask<int>
+MessagePack.MessagePackWriter.MessagePackWriter() -> void
+MessagePack.SequencePool
+MessagePack.SequencePool.SequencePool() -> void
+MessagePack.SequencePool.SequencePool(int maxSize) -> void
+MessagePack.SequencePool.SequencePool(int maxSize, System.Buffers.ArrayPool<byte> arrayPool) -> void
+MessagePack.TinyJsonException.TinyJsonException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) -> void
+static MessagePack.Nil.operator !=(MessagePack.Nil left, MessagePack.Nil right) -> bool
+static MessagePack.Nil.operator ==(MessagePack.Nil left, MessagePack.Nil right) -> bool
+static readonly MessagePack.Formatters.HalfFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Half>
+virtual MessagePack.MessagePackStreamReader.Dispose(bool disposing) -> void
+MessagePack.Formatters.GenericEnumerableFormatter<TElement, TCollection>
+MessagePack.Formatters.GenericEnumerableFormatter<TElement, TCollection>.GenericEnumerableFormatter() -> void
+MessagePack.Formatters.GenericReadOnlyDictionaryFormatter<TKey, TValue, TDictionary>
+MessagePack.Formatters.GenericReadOnlyDictionaryFormatter<TKey, TValue, TDictionary>.GenericReadOnlyDictionaryFormatter() -> void
diff --git a/src/MessagePack/net5.0/PublicAPI.Unshipped.txt b/src/MessagePack/net5.0/PublicAPI.Unshipped.txt
new file mode 100644
index 00000000..49e84ad1
--- /dev/null
+++ b/src/MessagePack/net5.0/PublicAPI.Unshipped.txt
@@ -0,0 +1,6 @@
+MessagePack.Formatters.StringInterningFormatter
+MessagePack.Formatters.StringInterningFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> string
+MessagePack.Formatters.StringInterningFormatter.Serialize(ref MessagePack.MessagePackWriter writer, string value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.StringInterningFormatter.StringInterningFormatter() -> void
+MessagePack.MessagePackSerializerOptions.CompressionMinLength.get -> int
+MessagePack.MessagePackSerializerOptions.WithCompressionMinLength(int compressionMinLength) -> MessagePack.MessagePackSerializerOptions \ No newline at end of file
diff --git a/src/MessagePack/net6.0/PublicAPI.Shipped.txt b/src/MessagePack/net6.0/PublicAPI.Shipped.txt
new file mode 100644
index 00000000..b0a1a3dc
--- /dev/null
+++ b/src/MessagePack/net6.0/PublicAPI.Shipped.txt
@@ -0,0 +1,1180 @@
+MessagePack.ExtensionHeader
+MessagePack.ExtensionHeader.ExtensionHeader(sbyte typeCode, int length) -> void
+MessagePack.ExtensionHeader.ExtensionHeader(sbyte typeCode, uint length) -> void
+MessagePack.ExtensionHeader.Length.get -> uint
+MessagePack.ExtensionHeader.TypeCode.get -> sbyte
+MessagePack.ExtensionResult
+MessagePack.ExtensionResult.Data.get -> System.Buffers.ReadOnlySequence<byte>
+MessagePack.ExtensionResult.ExtensionResult(sbyte typeCode, System.Buffers.ReadOnlySequence<byte> data) -> void
+MessagePack.ExtensionResult.ExtensionResult(sbyte typeCode, System.Memory<byte> data) -> void
+MessagePack.ExtensionResult.Header.get -> MessagePack.ExtensionHeader
+MessagePack.ExtensionResult.TypeCode.get -> sbyte
+MessagePack.FormatterNotRegisteredException
+MessagePack.FormatterNotRegisteredException.FormatterNotRegisteredException(string message) -> void
+MessagePack.FormatterResolverExtensions
+MessagePack.Formatters.ArrayFormatter<T>
+MessagePack.Formatters.ArrayFormatter<T>.ArrayFormatter() -> void
+MessagePack.Formatters.ArrayFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T[]
+MessagePack.Formatters.ArrayFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ArraySegmentFormatter<T>
+MessagePack.Formatters.ArraySegmentFormatter<T>.ArraySegmentFormatter() -> void
+MessagePack.Formatters.ArraySegmentFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.ArraySegment<T>
+MessagePack.Formatters.ArraySegmentFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, System.ArraySegment<T> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.BigIntegerFormatter
+MessagePack.Formatters.BigIntegerFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Numerics.BigInteger
+MessagePack.Formatters.BigIntegerFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Numerics.BigInteger value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.BitArrayFormatter
+MessagePack.Formatters.BitArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Collections.BitArray
+MessagePack.Formatters.BitArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Collections.BitArray value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.BooleanArrayFormatter
+MessagePack.Formatters.BooleanArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> bool[]
+MessagePack.Formatters.BooleanArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, bool[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.BooleanFormatter
+MessagePack.Formatters.BooleanFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> bool
+MessagePack.Formatters.BooleanFormatter.Serialize(ref MessagePack.MessagePackWriter writer, bool value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ByteArrayFormatter
+MessagePack.Formatters.ByteArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> byte[]
+MessagePack.Formatters.ByteArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, byte[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ByteArraySegmentFormatter
+MessagePack.Formatters.ByteArraySegmentFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.ArraySegment<byte>
+MessagePack.Formatters.ByteArraySegmentFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.ArraySegment<byte> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ByteFormatter
+MessagePack.Formatters.ByteFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> byte
+MessagePack.Formatters.ByteFormatter.Serialize(ref MessagePack.MessagePackWriter writer, byte value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.CharArrayFormatter
+MessagePack.Formatters.CharArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> char[]
+MessagePack.Formatters.CharArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, char[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.CharFormatter
+MessagePack.Formatters.CharFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> char
+MessagePack.Formatters.CharFormatter.Serialize(ref MessagePack.MessagePackWriter writer, char value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.CollectionFormatterBase<TElement, TCollection>
+MessagePack.Formatters.CollectionFormatterBase<TElement, TCollection>.CollectionFormatterBase() -> void
+MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TCollection>
+MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TCollection>.CollectionFormatterBase() -> void
+MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TEnumerator, TCollection>
+MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TEnumerator, TCollection>.CollectionFormatterBase() -> void
+MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TEnumerator, TCollection>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> TCollection
+MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TEnumerator, TCollection>.Serialize(ref MessagePack.MessagePackWriter writer, TCollection value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ComplexFormatter
+MessagePack.Formatters.ComplexFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Numerics.Complex
+MessagePack.Formatters.ComplexFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Numerics.Complex value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ConcurrentBagFormatter<T>
+MessagePack.Formatters.ConcurrentBagFormatter<T>.ConcurrentBagFormatter() -> void
+MessagePack.Formatters.ConcurrentDictionaryFormatter<TKey, TValue>
+MessagePack.Formatters.ConcurrentDictionaryFormatter<TKey, TValue>.ConcurrentDictionaryFormatter() -> void
+MessagePack.Formatters.ConcurrentQueueFormatter<T>
+MessagePack.Formatters.ConcurrentQueueFormatter<T>.ConcurrentQueueFormatter() -> void
+MessagePack.Formatters.ConcurrentStackFormatter<T>
+MessagePack.Formatters.ConcurrentStackFormatter<T>.ConcurrentStackFormatter() -> void
+MessagePack.Formatters.DateTimeArrayFormatter
+MessagePack.Formatters.DateTimeArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.DateTime[]
+MessagePack.Formatters.DateTimeArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.DateTime[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.DateTimeFormatter
+MessagePack.Formatters.DateTimeFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.DateTime
+MessagePack.Formatters.DateTimeFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.DateTime value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.DateTimeOffsetFormatter
+MessagePack.Formatters.DateTimeOffsetFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.DateTimeOffset
+MessagePack.Formatters.DateTimeOffsetFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.DateTimeOffset value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.DecimalFormatter
+MessagePack.Formatters.DecimalFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> decimal
+MessagePack.Formatters.DecimalFormatter.Serialize(ref MessagePack.MessagePackWriter writer, decimal value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.DictionaryFormatter<TKey, TValue>
+MessagePack.Formatters.DictionaryFormatter<TKey, TValue>.DictionaryFormatter() -> void
+MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TDictionary>
+MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TDictionary>.DictionaryFormatterBase() -> void
+MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TDictionary>
+MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TDictionary>.DictionaryFormatterBase() -> void
+MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TEnumerator, TDictionary>
+MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TEnumerator, TDictionary>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> TDictionary
+MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TEnumerator, TDictionary>.DictionaryFormatterBase() -> void
+MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TEnumerator, TDictionary>.Serialize(ref MessagePack.MessagePackWriter writer, TDictionary value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.DoubleArrayFormatter
+MessagePack.Formatters.DoubleArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> double[]
+MessagePack.Formatters.DoubleArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, double[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.DoubleFormatter
+MessagePack.Formatters.DoubleFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> double
+MessagePack.Formatters.DoubleFormatter.Serialize(ref MessagePack.MessagePackWriter writer, double value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.DynamicObjectTypeFallbackFormatter
+MessagePack.Formatters.DynamicObjectTypeFallbackFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> object
+MessagePack.Formatters.DynamicObjectTypeFallbackFormatter.Serialize(ref MessagePack.MessagePackWriter writer, object value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.EnumAsStringFormatter<T>
+MessagePack.Formatters.EnumAsStringFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T
+MessagePack.Formatters.EnumAsStringFormatter<T>.EnumAsStringFormatter() -> void
+MessagePack.Formatters.EnumAsStringFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceByteBlockFormatter
+MessagePack.Formatters.ForceByteBlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> byte
+MessagePack.Formatters.ForceByteBlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, byte value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceInt16BlockArrayFormatter
+MessagePack.Formatters.ForceInt16BlockArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> short[]
+MessagePack.Formatters.ForceInt16BlockArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, short[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceInt16BlockFormatter
+MessagePack.Formatters.ForceInt16BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> short
+MessagePack.Formatters.ForceInt16BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, short value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceInt32BlockArrayFormatter
+MessagePack.Formatters.ForceInt32BlockArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> int[]
+MessagePack.Formatters.ForceInt32BlockArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, int[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceInt32BlockFormatter
+MessagePack.Formatters.ForceInt32BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> int
+MessagePack.Formatters.ForceInt32BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, int value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceInt64BlockArrayFormatter
+MessagePack.Formatters.ForceInt64BlockArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> long[]
+MessagePack.Formatters.ForceInt64BlockArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, long[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceInt64BlockFormatter
+MessagePack.Formatters.ForceInt64BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> long
+MessagePack.Formatters.ForceInt64BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, long value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceSByteBlockArrayFormatter
+MessagePack.Formatters.ForceSByteBlockArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> sbyte[]
+MessagePack.Formatters.ForceSByteBlockArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, sbyte[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceSByteBlockFormatter
+MessagePack.Formatters.ForceSByteBlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> sbyte
+MessagePack.Formatters.ForceSByteBlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, sbyte value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceUInt16BlockArrayFormatter
+MessagePack.Formatters.ForceUInt16BlockArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ushort[]
+MessagePack.Formatters.ForceUInt16BlockArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, ushort[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceUInt16BlockFormatter
+MessagePack.Formatters.ForceUInt16BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ushort
+MessagePack.Formatters.ForceUInt16BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, ushort value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceUInt32BlockArrayFormatter
+MessagePack.Formatters.ForceUInt32BlockArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> uint[]
+MessagePack.Formatters.ForceUInt32BlockArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, uint[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceUInt32BlockFormatter
+MessagePack.Formatters.ForceUInt32BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> uint
+MessagePack.Formatters.ForceUInt32BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, uint value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceUInt64BlockArrayFormatter
+MessagePack.Formatters.ForceUInt64BlockArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ulong[]
+MessagePack.Formatters.ForceUInt64BlockArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, ulong[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceUInt64BlockFormatter
+MessagePack.Formatters.ForceUInt64BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ulong
+MessagePack.Formatters.ForceUInt64BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, ulong value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.FourDimensionalArrayFormatter<T>
+MessagePack.Formatters.FourDimensionalArrayFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T[,,,]
+MessagePack.Formatters.FourDimensionalArrayFormatter<T>.FourDimensionalArrayFormatter() -> void
+MessagePack.Formatters.FourDimensionalArrayFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T[,,,] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.GenericCollectionFormatter<TElement, TCollection>
+MessagePack.Formatters.GenericCollectionFormatter<TElement, TCollection>.GenericCollectionFormatter() -> void
+MessagePack.Formatters.GenericDictionaryFormatter<TKey, TValue, TDictionary>
+MessagePack.Formatters.GenericDictionaryFormatter<TKey, TValue, TDictionary>.GenericDictionaryFormatter() -> void
+MessagePack.Formatters.GenericEnumFormatter<T>
+MessagePack.Formatters.GenericEnumFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T
+MessagePack.Formatters.GenericEnumFormatter<T>.GenericEnumFormatter() -> void
+MessagePack.Formatters.GenericEnumFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.GuidFormatter
+MessagePack.Formatters.GuidFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Guid
+MessagePack.Formatters.GuidFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Guid value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.HashSetFormatter<T>
+MessagePack.Formatters.HashSetFormatter<T>.HashSetFormatter() -> void
+MessagePack.Formatters.IMessagePackFormatter
+MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Formatters.IMessagePackFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T
+MessagePack.Formatters.IMessagePackFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.IgnoreFormatter<T>
+MessagePack.Formatters.IgnoreFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T
+MessagePack.Formatters.IgnoreFormatter<T>.IgnoreFormatter() -> void
+MessagePack.Formatters.IgnoreFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.Int16ArrayFormatter
+MessagePack.Formatters.Int16ArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> short[]
+MessagePack.Formatters.Int16ArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, short[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.Int16Formatter
+MessagePack.Formatters.Int16Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> short
+MessagePack.Formatters.Int16Formatter.Serialize(ref MessagePack.MessagePackWriter writer, short value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.Int32ArrayFormatter
+MessagePack.Formatters.Int32ArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> int[]
+MessagePack.Formatters.Int32ArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, int[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.Int32Formatter
+MessagePack.Formatters.Int32Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> int
+MessagePack.Formatters.Int32Formatter.Serialize(ref MessagePack.MessagePackWriter writer, int value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.Int64ArrayFormatter
+MessagePack.Formatters.Int64ArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> long[]
+MessagePack.Formatters.Int64ArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, long[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.Int64Formatter
+MessagePack.Formatters.Int64Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> long
+MessagePack.Formatters.Int64Formatter.Serialize(ref MessagePack.MessagePackWriter writer, long value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.InterfaceCollectionFormatter<T>
+MessagePack.Formatters.InterfaceCollectionFormatter<T>.InterfaceCollectionFormatter() -> void
+MessagePack.Formatters.InterfaceDictionaryFormatter<TKey, TValue>
+MessagePack.Formatters.InterfaceDictionaryFormatter<TKey, TValue>.InterfaceDictionaryFormatter() -> void
+MessagePack.Formatters.InterfaceEnumerableFormatter<T>
+MessagePack.Formatters.InterfaceEnumerableFormatter<T>.InterfaceEnumerableFormatter() -> void
+MessagePack.Formatters.InterfaceGroupingFormatter<TKey, TElement>
+MessagePack.Formatters.InterfaceGroupingFormatter<TKey, TElement>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Linq.IGrouping<TKey, TElement>
+MessagePack.Formatters.InterfaceGroupingFormatter<TKey, TElement>.InterfaceGroupingFormatter() -> void
+MessagePack.Formatters.InterfaceGroupingFormatter<TKey, TElement>.Serialize(ref MessagePack.MessagePackWriter writer, System.Linq.IGrouping<TKey, TElement> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.InterfaceListFormatter<T>
+MessagePack.Formatters.InterfaceListFormatter<T>.InterfaceListFormatter() -> void
+MessagePack.Formatters.InterfaceLookupFormatter<TKey, TElement>
+MessagePack.Formatters.InterfaceLookupFormatter<TKey, TElement>.InterfaceLookupFormatter() -> void
+MessagePack.Formatters.InterfaceReadOnlyCollectionFormatter<T>
+MessagePack.Formatters.InterfaceReadOnlyCollectionFormatter<T>.InterfaceReadOnlyCollectionFormatter() -> void
+MessagePack.Formatters.InterfaceReadOnlyDictionaryFormatter<TKey, TValue>
+MessagePack.Formatters.InterfaceReadOnlyDictionaryFormatter<TKey, TValue>.InterfaceReadOnlyDictionaryFormatter() -> void
+MessagePack.Formatters.InterfaceReadOnlyListFormatter<T>
+MessagePack.Formatters.InterfaceReadOnlyListFormatter<T>.InterfaceReadOnlyListFormatter() -> void
+MessagePack.Formatters.InterfaceSetFormatter<T>
+MessagePack.Formatters.InterfaceSetFormatter<T>.InterfaceSetFormatter() -> void
+MessagePack.Formatters.KeyValuePairFormatter<TKey, TValue>
+MessagePack.Formatters.KeyValuePairFormatter<TKey, TValue>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Generic.KeyValuePair<TKey, TValue>
+MessagePack.Formatters.KeyValuePairFormatter<TKey, TValue>.KeyValuePairFormatter() -> void
+MessagePack.Formatters.KeyValuePairFormatter<TKey, TValue>.Serialize(ref MessagePack.MessagePackWriter writer, System.Collections.Generic.KeyValuePair<TKey, TValue> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.LazyFormatter<T>
+MessagePack.Formatters.LazyFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Lazy<T>
+MessagePack.Formatters.LazyFormatter<T>.LazyFormatter() -> void
+MessagePack.Formatters.LazyFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, System.Lazy<T> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.LinkedListFormatter<T>
+MessagePack.Formatters.LinkedListFormatter<T>.LinkedListFormatter() -> void
+MessagePack.Formatters.ListFormatter<T>
+MessagePack.Formatters.ListFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Generic.List<T>
+MessagePack.Formatters.ListFormatter<T>.ListFormatter() -> void
+MessagePack.Formatters.ListFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, System.Collections.Generic.List<T> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NativeDateTimeArrayFormatter
+MessagePack.Formatters.NativeDateTimeArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.DateTime[]
+MessagePack.Formatters.NativeDateTimeArrayFormatter.NativeDateTimeArrayFormatter() -> void
+MessagePack.Formatters.NativeDateTimeArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.DateTime[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NativeDateTimeFormatter
+MessagePack.Formatters.NativeDateTimeFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.DateTime
+MessagePack.Formatters.NativeDateTimeFormatter.NativeDateTimeFormatter() -> void
+MessagePack.Formatters.NativeDateTimeFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.DateTime value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NativeDecimalFormatter
+MessagePack.Formatters.NativeDecimalFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> decimal
+MessagePack.Formatters.NativeDecimalFormatter.Serialize(ref MessagePack.MessagePackWriter writer, decimal value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NativeGuidFormatter
+MessagePack.Formatters.NativeGuidFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Guid
+MessagePack.Formatters.NativeGuidFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Guid value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NilFormatter
+MessagePack.Formatters.NilFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> MessagePack.Nil
+MessagePack.Formatters.NilFormatter.Serialize(ref MessagePack.MessagePackWriter writer, MessagePack.Nil value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NonGenericDictionaryFormatter<T>
+MessagePack.Formatters.NonGenericDictionaryFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T
+MessagePack.Formatters.NonGenericDictionaryFormatter<T>.NonGenericDictionaryFormatter() -> void
+MessagePack.Formatters.NonGenericDictionaryFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NonGenericInterfaceDictionaryFormatter
+MessagePack.Formatters.NonGenericInterfaceDictionaryFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Collections.IDictionary
+MessagePack.Formatters.NonGenericInterfaceDictionaryFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Collections.IDictionary value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NonGenericInterfaceListFormatter
+MessagePack.Formatters.NonGenericInterfaceListFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Collections.IList
+MessagePack.Formatters.NonGenericInterfaceListFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Collections.IList value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NonGenericListFormatter<T>
+MessagePack.Formatters.NonGenericListFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T
+MessagePack.Formatters.NonGenericListFormatter<T>.NonGenericListFormatter() -> void
+MessagePack.Formatters.NonGenericListFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableBooleanFormatter
+MessagePack.Formatters.NullableBooleanFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> bool?
+MessagePack.Formatters.NullableBooleanFormatter.Serialize(ref MessagePack.MessagePackWriter writer, bool? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableByteFormatter
+MessagePack.Formatters.NullableByteFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> byte?
+MessagePack.Formatters.NullableByteFormatter.Serialize(ref MessagePack.MessagePackWriter writer, byte? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableCharFormatter
+MessagePack.Formatters.NullableCharFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> char?
+MessagePack.Formatters.NullableCharFormatter.Serialize(ref MessagePack.MessagePackWriter writer, char? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableDateTimeFormatter
+MessagePack.Formatters.NullableDateTimeFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.DateTime?
+MessagePack.Formatters.NullableDateTimeFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.DateTime? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableDoubleFormatter
+MessagePack.Formatters.NullableDoubleFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> double?
+MessagePack.Formatters.NullableDoubleFormatter.Serialize(ref MessagePack.MessagePackWriter writer, double? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableForceByteBlockFormatter
+MessagePack.Formatters.NullableForceByteBlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> byte?
+MessagePack.Formatters.NullableForceByteBlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, byte? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableForceInt16BlockFormatter
+MessagePack.Formatters.NullableForceInt16BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> short?
+MessagePack.Formatters.NullableForceInt16BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, short? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableForceInt32BlockFormatter
+MessagePack.Formatters.NullableForceInt32BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> int?
+MessagePack.Formatters.NullableForceInt32BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, int? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableForceInt64BlockFormatter
+MessagePack.Formatters.NullableForceInt64BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> long?
+MessagePack.Formatters.NullableForceInt64BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, long? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableForceSByteBlockFormatter
+MessagePack.Formatters.NullableForceSByteBlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> sbyte?
+MessagePack.Formatters.NullableForceSByteBlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, sbyte? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableForceUInt16BlockFormatter
+MessagePack.Formatters.NullableForceUInt16BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ushort?
+MessagePack.Formatters.NullableForceUInt16BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, ushort? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableForceUInt32BlockFormatter
+MessagePack.Formatters.NullableForceUInt32BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> uint?
+MessagePack.Formatters.NullableForceUInt32BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, uint? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableForceUInt64BlockFormatter
+MessagePack.Formatters.NullableForceUInt64BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ulong?
+MessagePack.Formatters.NullableForceUInt64BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, ulong? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableFormatter<T>
+MessagePack.Formatters.NullableFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T?
+MessagePack.Formatters.NullableFormatter<T>.NullableFormatter() -> void
+MessagePack.Formatters.NullableFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableInt16Formatter
+MessagePack.Formatters.NullableInt16Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> short?
+MessagePack.Formatters.NullableInt16Formatter.Serialize(ref MessagePack.MessagePackWriter writer, short? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableInt32Formatter
+MessagePack.Formatters.NullableInt32Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> int?
+MessagePack.Formatters.NullableInt32Formatter.Serialize(ref MessagePack.MessagePackWriter writer, int? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableInt64Formatter
+MessagePack.Formatters.NullableInt64Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> long?
+MessagePack.Formatters.NullableInt64Formatter.Serialize(ref MessagePack.MessagePackWriter writer, long? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableNilFormatter
+MessagePack.Formatters.NullableNilFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> MessagePack.Nil?
+MessagePack.Formatters.NullableNilFormatter.Serialize(ref MessagePack.MessagePackWriter writer, MessagePack.Nil? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableSByteFormatter
+MessagePack.Formatters.NullableSByteFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> sbyte?
+MessagePack.Formatters.NullableSByteFormatter.Serialize(ref MessagePack.MessagePackWriter writer, sbyte? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableSingleFormatter
+MessagePack.Formatters.NullableSingleFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> float?
+MessagePack.Formatters.NullableSingleFormatter.Serialize(ref MessagePack.MessagePackWriter writer, float? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableStringArrayFormatter
+MessagePack.Formatters.NullableStringArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> string[]
+MessagePack.Formatters.NullableStringArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, string[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableStringFormatter
+MessagePack.Formatters.NullableStringFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> string
+MessagePack.Formatters.NullableStringFormatter.Serialize(ref MessagePack.MessagePackWriter writer, string value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableUInt16Formatter
+MessagePack.Formatters.NullableUInt16Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ushort?
+MessagePack.Formatters.NullableUInt16Formatter.Serialize(ref MessagePack.MessagePackWriter writer, ushort? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableUInt32Formatter
+MessagePack.Formatters.NullableUInt32Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> uint?
+MessagePack.Formatters.NullableUInt32Formatter.Serialize(ref MessagePack.MessagePackWriter writer, uint? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableUInt64Formatter
+MessagePack.Formatters.NullableUInt64Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ulong?
+MessagePack.Formatters.NullableUInt64Formatter.Serialize(ref MessagePack.MessagePackWriter writer, ulong? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ObservableCollectionFormatter<T>
+MessagePack.Formatters.ObservableCollectionFormatter<T>.ObservableCollectionFormatter() -> void
+MessagePack.Formatters.PrimitiveObjectFormatter
+MessagePack.Formatters.PrimitiveObjectFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> object
+MessagePack.Formatters.PrimitiveObjectFormatter.Serialize(ref MessagePack.MessagePackWriter writer, object value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.QueueFormatter<T>
+MessagePack.Formatters.QueueFormatter<T>.QueueFormatter() -> void
+MessagePack.Formatters.ReadOnlyCollectionFormatter<T>
+MessagePack.Formatters.ReadOnlyCollectionFormatter<T>.ReadOnlyCollectionFormatter() -> void
+MessagePack.Formatters.ReadOnlyDictionaryFormatter<TKey, TValue>
+MessagePack.Formatters.ReadOnlyDictionaryFormatter<TKey, TValue>.ReadOnlyDictionaryFormatter() -> void
+MessagePack.Formatters.ReadOnlyObservableCollectionFormatter<T>
+MessagePack.Formatters.ReadOnlyObservableCollectionFormatter<T>.ReadOnlyObservableCollectionFormatter() -> void
+MessagePack.Formatters.SByteArrayFormatter
+MessagePack.Formatters.SByteArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> sbyte[]
+MessagePack.Formatters.SByteArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, sbyte[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.SByteFormatter
+MessagePack.Formatters.SByteFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> sbyte
+MessagePack.Formatters.SByteFormatter.Serialize(ref MessagePack.MessagePackWriter writer, sbyte value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.SingleArrayFormatter
+MessagePack.Formatters.SingleArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> float[]
+MessagePack.Formatters.SingleArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, float[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.SingleFormatter
+MessagePack.Formatters.SingleFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> float
+MessagePack.Formatters.SingleFormatter.Serialize(ref MessagePack.MessagePackWriter writer, float value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.SortedDictionaryFormatter<TKey, TValue>
+MessagePack.Formatters.SortedDictionaryFormatter<TKey, TValue>.SortedDictionaryFormatter() -> void
+MessagePack.Formatters.SortedListFormatter<TKey, TValue>
+MessagePack.Formatters.SortedListFormatter<TKey, TValue>.SortedListFormatter() -> void
+MessagePack.Formatters.StackFormatter<T>
+MessagePack.Formatters.StackFormatter<T>.StackFormatter() -> void
+MessagePack.Formatters.StaticNullableFormatter<T>
+MessagePack.Formatters.StaticNullableFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T?
+MessagePack.Formatters.StaticNullableFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.StaticNullableFormatter<T>.StaticNullableFormatter(MessagePack.Formatters.IMessagePackFormatter<T> underlyingFormatter) -> void
+MessagePack.Formatters.StringBuilderFormatter
+MessagePack.Formatters.StringBuilderFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Text.StringBuilder
+MessagePack.Formatters.StringBuilderFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Text.StringBuilder value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ThreeDimensionalArrayFormatter<T>
+MessagePack.Formatters.ThreeDimensionalArrayFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T[,,]
+MessagePack.Formatters.ThreeDimensionalArrayFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T[,,] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ThreeDimensionalArrayFormatter<T>.ThreeDimensionalArrayFormatter() -> void
+MessagePack.Formatters.TimeSpanFormatter
+MessagePack.Formatters.TimeSpanFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.TimeSpan
+MessagePack.Formatters.TimeSpanFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.TimeSpan value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6, T7, TRest>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6, T7, TRest>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Tuple<T1, T2, T3, T4, T5, T6, T7, TRest>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6, T7, TRest>.Serialize(ref MessagePack.MessagePackWriter writer, System.Tuple<T1, T2, T3, T4, T5, T6, T7, TRest> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6, T7, TRest>.TupleFormatter() -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6, T7>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6, T7>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Tuple<T1, T2, T3, T4, T5, T6, T7>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6, T7>.Serialize(ref MessagePack.MessagePackWriter writer, System.Tuple<T1, T2, T3, T4, T5, T6, T7> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6, T7>.TupleFormatter() -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Tuple<T1, T2, T3, T4, T5, T6>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6>.Serialize(ref MessagePack.MessagePackWriter writer, System.Tuple<T1, T2, T3, T4, T5, T6> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6>.TupleFormatter() -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Tuple<T1, T2, T3, T4, T5>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5>.Serialize(ref MessagePack.MessagePackWriter writer, System.Tuple<T1, T2, T3, T4, T5> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5>.TupleFormatter() -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Tuple<T1, T2, T3, T4>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4>.Serialize(ref MessagePack.MessagePackWriter writer, System.Tuple<T1, T2, T3, T4> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4>.TupleFormatter() -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Tuple<T1, T2, T3>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3>.Serialize(ref MessagePack.MessagePackWriter writer, System.Tuple<T1, T2, T3> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3>.TupleFormatter() -> void
+MessagePack.Formatters.TupleFormatter<T1, T2>
+MessagePack.Formatters.TupleFormatter<T1, T2>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Tuple<T1, T2>
+MessagePack.Formatters.TupleFormatter<T1, T2>.Serialize(ref MessagePack.MessagePackWriter writer, System.Tuple<T1, T2> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TupleFormatter<T1, T2>.TupleFormatter() -> void
+MessagePack.Formatters.TupleFormatter<T1>
+MessagePack.Formatters.TupleFormatter<T1>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Tuple<T1>
+MessagePack.Formatters.TupleFormatter<T1>.Serialize(ref MessagePack.MessagePackWriter writer, System.Tuple<T1> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TupleFormatter<T1>.TupleFormatter() -> void
+MessagePack.Formatters.TwoDimensionalArrayFormatter<T>
+MessagePack.Formatters.TwoDimensionalArrayFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T[,]
+MessagePack.Formatters.TwoDimensionalArrayFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T[,] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TwoDimensionalArrayFormatter<T>.TwoDimensionalArrayFormatter() -> void
+MessagePack.Formatters.TypelessFormatter
+MessagePack.Formatters.TypelessFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> object
+MessagePack.Formatters.TypelessFormatter.Serialize(ref MessagePack.MessagePackWriter writer, object value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.UInt16ArrayFormatter
+MessagePack.Formatters.UInt16ArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ushort[]
+MessagePack.Formatters.UInt16ArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, ushort[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.UInt16Formatter
+MessagePack.Formatters.UInt16Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ushort
+MessagePack.Formatters.UInt16Formatter.Serialize(ref MessagePack.MessagePackWriter writer, ushort value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.UInt32ArrayFormatter
+MessagePack.Formatters.UInt32ArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> uint[]
+MessagePack.Formatters.UInt32ArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, uint[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.UInt32Formatter
+MessagePack.Formatters.UInt32Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> uint
+MessagePack.Formatters.UInt32Formatter.Serialize(ref MessagePack.MessagePackWriter writer, uint value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.UInt64ArrayFormatter
+MessagePack.Formatters.UInt64ArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ulong[]
+MessagePack.Formatters.UInt64ArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, ulong[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.UInt64Formatter
+MessagePack.Formatters.UInt64Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ulong
+MessagePack.Formatters.UInt64Formatter.Serialize(ref MessagePack.MessagePackWriter writer, ulong value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.UriFormatter
+MessagePack.Formatters.UriFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Uri
+MessagePack.Formatters.UriFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Uri value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6, T7, TRest>
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6, T7, TRest>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6, T7, TRest>.Serialize(ref MessagePack.MessagePackWriter writer, System.ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6, T7, TRest>.ValueTupleFormatter() -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6, T7>
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6, T7>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> (T1, T2, T3, T4, T5, T6, T7)
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6, T7>.Serialize(ref MessagePack.MessagePackWriter writer, (T1, T2, T3, T4, T5, T6, T7) value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6, T7>.ValueTupleFormatter() -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6>
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> (T1, T2, T3, T4, T5, T6)
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6>.Serialize(ref MessagePack.MessagePackWriter writer, (T1, T2, T3, T4, T5, T6) value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6>.ValueTupleFormatter() -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5>
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> (T1, T2, T3, T4, T5)
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5>.Serialize(ref MessagePack.MessagePackWriter writer, (T1, T2, T3, T4, T5) value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5>.ValueTupleFormatter() -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4>
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> (T1, T2, T3, T4)
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4>.Serialize(ref MessagePack.MessagePackWriter writer, (T1, T2, T3, T4) value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4>.ValueTupleFormatter() -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3>
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> (T1, T2, T3)
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3>.Serialize(ref MessagePack.MessagePackWriter writer, (T1, T2, T3) value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3>.ValueTupleFormatter() -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2>
+MessagePack.Formatters.ValueTupleFormatter<T1, T2>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> (T1, T2)
+MessagePack.Formatters.ValueTupleFormatter<T1, T2>.Serialize(ref MessagePack.MessagePackWriter writer, (T1, T2) value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2>.ValueTupleFormatter() -> void
+MessagePack.Formatters.ValueTupleFormatter<T1>
+MessagePack.Formatters.ValueTupleFormatter<T1>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.ValueTuple<T1>
+MessagePack.Formatters.ValueTupleFormatter<T1>.Serialize(ref MessagePack.MessagePackWriter writer, System.ValueTuple<T1> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ValueTupleFormatter<T1>.ValueTupleFormatter() -> void
+MessagePack.Formatters.VersionFormatter
+MessagePack.Formatters.VersionFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Version
+MessagePack.Formatters.VersionFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Version value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.IFormatterResolver
+MessagePack.IFormatterResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Internal.AutomataDictionary
+MessagePack.Internal.AutomataDictionary.Add(string str, int value) -> void
+MessagePack.Internal.AutomataDictionary.AutomataDictionary() -> void
+MessagePack.Internal.AutomataDictionary.EmitMatch(System.Reflection.Emit.ILGenerator il, System.Reflection.Emit.LocalBuilder bytesSpan, System.Reflection.Emit.LocalBuilder key, System.Action<System.Collections.Generic.KeyValuePair<string, int>> onFound, System.Action onNotFound) -> void
+MessagePack.Internal.AutomataDictionary.GetEnumerator() -> System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<string, int>>
+MessagePack.Internal.AutomataDictionary.TryGetValue(System.ReadOnlySpan<byte> bytes, out int value) -> bool
+MessagePack.Internal.AutomataDictionary.TryGetValue(in System.Buffers.ReadOnlySequence<byte> bytes, out int value) -> bool
+MessagePack.Internal.AutomataKeyGen
+MessagePack.Internal.ByteArrayStringHashTable
+MessagePack.Internal.ByteArrayStringHashTable.Add(byte[] key, int value) -> void
+MessagePack.Internal.ByteArrayStringHashTable.Add(string key, int value) -> void
+MessagePack.Internal.ByteArrayStringHashTable.ByteArrayStringHashTable(int capacity) -> void
+MessagePack.Internal.ByteArrayStringHashTable.ByteArrayStringHashTable(int capacity, float loadFactor) -> void
+MessagePack.Internal.ByteArrayStringHashTable.GetEnumerator() -> System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<string, int>>
+MessagePack.Internal.ByteArrayStringHashTable.TryGetValue(System.ReadOnlySpan<byte> key, out int value) -> bool
+MessagePack.Internal.ByteArrayStringHashTable.TryGetValue(in System.Buffers.ReadOnlySequence<byte> key, out int value) -> bool
+MessagePack.Internal.CodeGenHelpers
+MessagePack.Internal.RuntimeTypeHandleEqualityComparer
+MessagePack.Internal.RuntimeTypeHandleEqualityComparer.Equals(System.RuntimeTypeHandle x, System.RuntimeTypeHandle y) -> bool
+MessagePack.Internal.RuntimeTypeHandleEqualityComparer.GetHashCode(System.RuntimeTypeHandle obj) -> int
+MessagePack.Internal.UnsafeMemory
+MessagePack.Internal.UnsafeMemory32
+MessagePack.Internal.UnsafeMemory64
+MessagePack.MessagePackCode
+MessagePack.MessagePackCompression
+MessagePack.MessagePackCompression.Lz4Block = 1 -> MessagePack.MessagePackCompression
+MessagePack.MessagePackCompression.Lz4BlockArray = 2 -> MessagePack.MessagePackCompression
+MessagePack.MessagePackCompression.None = 0 -> MessagePack.MessagePackCompression
+MessagePack.MessagePackRange
+MessagePack.MessagePackReader
+MessagePack.MessagePackReader.CancellationToken.get -> System.Threading.CancellationToken
+MessagePack.MessagePackReader.CancellationToken.set -> void
+MessagePack.MessagePackReader.Clone(in System.Buffers.ReadOnlySequence<byte> readOnlySequence) -> MessagePack.MessagePackReader
+MessagePack.MessagePackReader.Consumed.get -> long
+MessagePack.MessagePackReader.CreatePeekReader() -> MessagePack.MessagePackReader
+MessagePack.MessagePackReader.End.get -> bool
+MessagePack.MessagePackReader.IsNil.get -> bool
+MessagePack.MessagePackReader.MessagePackReader(System.ReadOnlyMemory<byte> memory) -> void
+MessagePack.MessagePackReader.MessagePackReader(in System.Buffers.ReadOnlySequence<byte> readOnlySequence) -> void
+MessagePack.MessagePackReader.NextCode.get -> byte
+MessagePack.MessagePackReader.NextMessagePackType.get -> MessagePack.MessagePackType
+MessagePack.MessagePackReader.Position.get -> System.SequencePosition
+MessagePack.MessagePackReader.ReadArrayHeader() -> int
+MessagePack.MessagePackReader.ReadBoolean() -> bool
+MessagePack.MessagePackReader.ReadByte() -> byte
+MessagePack.MessagePackReader.ReadBytes() -> System.Buffers.ReadOnlySequence<byte>?
+MessagePack.MessagePackReader.ReadChar() -> char
+MessagePack.MessagePackReader.ReadDateTime() -> System.DateTime
+MessagePack.MessagePackReader.ReadDouble() -> double
+MessagePack.MessagePackReader.ReadExtensionFormat() -> MessagePack.ExtensionResult
+MessagePack.MessagePackReader.ReadExtensionFormatHeader() -> MessagePack.ExtensionHeader
+MessagePack.MessagePackReader.ReadInt16() -> short
+MessagePack.MessagePackReader.ReadInt32() -> int
+MessagePack.MessagePackReader.ReadInt64() -> long
+MessagePack.MessagePackReader.ReadMapHeader() -> int
+MessagePack.MessagePackReader.ReadNil() -> MessagePack.Nil
+MessagePack.MessagePackReader.ReadRaw() -> System.Buffers.ReadOnlySequence<byte>
+MessagePack.MessagePackReader.ReadRaw(long length) -> System.Buffers.ReadOnlySequence<byte>
+MessagePack.MessagePackReader.ReadSByte() -> sbyte
+MessagePack.MessagePackReader.ReadSingle() -> float
+MessagePack.MessagePackReader.ReadString() -> string
+MessagePack.MessagePackReader.ReadStringSequence() -> System.Buffers.ReadOnlySequence<byte>?
+MessagePack.MessagePackReader.ReadUInt16() -> ushort
+MessagePack.MessagePackReader.ReadUInt32() -> uint
+MessagePack.MessagePackReader.ReadUInt64() -> ulong
+MessagePack.MessagePackReader.Sequence.get -> System.Buffers.ReadOnlySequence<byte>
+MessagePack.MessagePackReader.Skip() -> void
+MessagePack.MessagePackReader.TryReadNil() -> bool
+MessagePack.MessagePackReader.TryReadStringSpan(out System.ReadOnlySpan<byte> span) -> bool
+MessagePack.MessagePackSerializationException
+MessagePack.MessagePackSerializationException.MessagePackSerializationException() -> void
+MessagePack.MessagePackSerializationException.MessagePackSerializationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) -> void
+MessagePack.MessagePackSerializationException.MessagePackSerializationException(string message) -> void
+MessagePack.MessagePackSerializationException.MessagePackSerializationException(string message, System.Exception inner) -> void
+MessagePack.MessagePackSerializer
+MessagePack.MessagePackSerializer.Typeless
+MessagePack.MessagePackSerializerOptions
+MessagePack.MessagePackSerializerOptions.AllowAssemblyVersionMismatch.get -> bool
+MessagePack.MessagePackSerializerOptions.Compression.get -> MessagePack.MessagePackCompression
+MessagePack.MessagePackSerializerOptions.MessagePackSerializerOptions(MessagePack.IFormatterResolver resolver) -> void
+MessagePack.MessagePackSerializerOptions.MessagePackSerializerOptions(MessagePack.MessagePackSerializerOptions copyFrom) -> void
+MessagePack.MessagePackSerializerOptions.OldSpec.get -> bool?
+MessagePack.MessagePackSerializerOptions.OmitAssemblyVersion.get -> bool
+MessagePack.MessagePackSerializerOptions.Resolver.get -> MessagePack.IFormatterResolver
+MessagePack.MessagePackSerializerOptions.WithAllowAssemblyVersionMismatch(bool allowAssemblyVersionMismatch) -> MessagePack.MessagePackSerializerOptions
+MessagePack.MessagePackSerializerOptions.WithCompression(MessagePack.MessagePackCompression compression) -> MessagePack.MessagePackSerializerOptions
+MessagePack.MessagePackSerializerOptions.WithOldSpec(bool? oldSpec = true) -> MessagePack.MessagePackSerializerOptions
+MessagePack.MessagePackSerializerOptions.WithOmitAssemblyVersion(bool omitAssemblyVersion) -> MessagePack.MessagePackSerializerOptions
+MessagePack.MessagePackSerializerOptions.WithResolver(MessagePack.IFormatterResolver resolver) -> MessagePack.MessagePackSerializerOptions
+MessagePack.MessagePackStreamReader
+MessagePack.MessagePackStreamReader.Dispose() -> void
+MessagePack.MessagePackStreamReader.MessagePackStreamReader(System.IO.Stream stream) -> void
+MessagePack.MessagePackStreamReader.ReadAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.ValueTask<System.Buffers.ReadOnlySequence<byte>?>
+MessagePack.MessagePackStreamReader.RemainingBytes.get -> System.Buffers.ReadOnlySequence<byte>
+MessagePack.MessagePackType
+MessagePack.MessagePackType.Array = 7 -> MessagePack.MessagePackType
+MessagePack.MessagePackType.Binary = 6 -> MessagePack.MessagePackType
+MessagePack.MessagePackType.Boolean = 3 -> MessagePack.MessagePackType
+MessagePack.MessagePackType.Extension = 9 -> MessagePack.MessagePackType
+MessagePack.MessagePackType.Float = 4 -> MessagePack.MessagePackType
+MessagePack.MessagePackType.Integer = 1 -> MessagePack.MessagePackType
+MessagePack.MessagePackType.Map = 8 -> MessagePack.MessagePackType
+MessagePack.MessagePackType.Nil = 2 -> MessagePack.MessagePackType
+MessagePack.MessagePackType.String = 5 -> MessagePack.MessagePackType
+MessagePack.MessagePackType.Unknown = 0 -> MessagePack.MessagePackType
+MessagePack.MessagePackWriter
+MessagePack.MessagePackWriter.Advance(int length) -> void
+MessagePack.MessagePackWriter.CancellationToken.get -> System.Threading.CancellationToken
+MessagePack.MessagePackWriter.CancellationToken.set -> void
+MessagePack.MessagePackWriter.Clone(System.Buffers.IBufferWriter<byte> writer) -> MessagePack.MessagePackWriter
+MessagePack.MessagePackWriter.Flush() -> void
+MessagePack.MessagePackWriter.GetSpan(int length) -> System.Span<byte>
+MessagePack.MessagePackWriter.MessagePackWriter(System.Buffers.IBufferWriter<byte> writer) -> void
+MessagePack.MessagePackWriter.OldSpec.get -> bool
+MessagePack.MessagePackWriter.OldSpec.set -> void
+MessagePack.MessagePackWriter.Write(System.DateTime dateTime) -> void
+MessagePack.MessagePackWriter.Write(System.ReadOnlySpan<byte> src) -> void
+MessagePack.MessagePackWriter.Write(System.ReadOnlySpan<char> value) -> void
+MessagePack.MessagePackWriter.Write(bool value) -> void
+MessagePack.MessagePackWriter.Write(byte value) -> void
+MessagePack.MessagePackWriter.Write(byte[] src) -> void
+MessagePack.MessagePackWriter.Write(char value) -> void
+MessagePack.MessagePackWriter.Write(double value) -> void
+MessagePack.MessagePackWriter.Write(float value) -> void
+MessagePack.MessagePackWriter.Write(in System.Buffers.ReadOnlySequence<byte> src) -> void
+MessagePack.MessagePackWriter.Write(int value) -> void
+MessagePack.MessagePackWriter.Write(long value) -> void
+MessagePack.MessagePackWriter.Write(sbyte value) -> void
+MessagePack.MessagePackWriter.Write(short value) -> void
+MessagePack.MessagePackWriter.Write(string value) -> void
+MessagePack.MessagePackWriter.Write(uint value) -> void
+MessagePack.MessagePackWriter.Write(ulong value) -> void
+MessagePack.MessagePackWriter.Write(ushort value) -> void
+MessagePack.MessagePackWriter.WriteArrayHeader(int count) -> void
+MessagePack.MessagePackWriter.WriteArrayHeader(uint count) -> void
+MessagePack.MessagePackWriter.WriteExtensionFormat(MessagePack.ExtensionResult extensionData) -> void
+MessagePack.MessagePackWriter.WriteExtensionFormatHeader(MessagePack.ExtensionHeader extensionHeader) -> void
+MessagePack.MessagePackWriter.WriteInt16(short value) -> void
+MessagePack.MessagePackWriter.WriteInt32(int value) -> void
+MessagePack.MessagePackWriter.WriteInt64(long value) -> void
+MessagePack.MessagePackWriter.WriteInt8(sbyte value) -> void
+MessagePack.MessagePackWriter.WriteMapHeader(int count) -> void
+MessagePack.MessagePackWriter.WriteMapHeader(uint count) -> void
+MessagePack.MessagePackWriter.WriteNil() -> void
+MessagePack.MessagePackWriter.WriteRaw(System.ReadOnlySpan<byte> rawMessagePackBlock) -> void
+MessagePack.MessagePackWriter.WriteRaw(in System.Buffers.ReadOnlySequence<byte> rawMessagePackBlock) -> void
+MessagePack.MessagePackWriter.WriteString(System.ReadOnlySpan<byte> utf8stringBytes) -> void
+MessagePack.MessagePackWriter.WriteString(in System.Buffers.ReadOnlySequence<byte> utf8stringBytes) -> void
+MessagePack.MessagePackWriter.WriteUInt16(ushort value) -> void
+MessagePack.MessagePackWriter.WriteUInt32(uint value) -> void
+MessagePack.MessagePackWriter.WriteUInt64(ulong value) -> void
+MessagePack.MessagePackWriter.WriteUInt8(byte value) -> void
+MessagePack.Nil
+MessagePack.Nil.Equals(MessagePack.Nil other) -> bool
+MessagePack.Nil.Nil() -> void
+MessagePack.ReservedMessagePackExtensionTypeCode
+MessagePack.Resolvers.AttributeFormatterResolver
+MessagePack.Resolvers.AttributeFormatterResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.BuiltinResolver
+MessagePack.Resolvers.BuiltinResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.CompositeResolver
+MessagePack.Resolvers.ContractlessStandardResolver
+MessagePack.Resolvers.ContractlessStandardResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.ContractlessStandardResolverAllowPrivate
+MessagePack.Resolvers.ContractlessStandardResolverAllowPrivate.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.DynamicContractlessObjectResolver
+MessagePack.Resolvers.DynamicContractlessObjectResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.DynamicContractlessObjectResolverAllowPrivate
+MessagePack.Resolvers.DynamicContractlessObjectResolverAllowPrivate.DynamicContractlessObjectResolverAllowPrivate() -> void
+MessagePack.Resolvers.DynamicContractlessObjectResolverAllowPrivate.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.DynamicEnumAsStringResolver
+MessagePack.Resolvers.DynamicEnumAsStringResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.DynamicEnumResolver
+MessagePack.Resolvers.DynamicEnumResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.DynamicGenericResolver
+MessagePack.Resolvers.DynamicGenericResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.DynamicObjectResolver
+MessagePack.Resolvers.DynamicObjectResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.DynamicObjectResolverAllowPrivate
+MessagePack.Resolvers.DynamicObjectResolverAllowPrivate.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.DynamicUnionResolver
+MessagePack.Resolvers.DynamicUnionResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.NativeDateTimeResolver
+MessagePack.Resolvers.NativeDateTimeResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.NativeDecimalResolver
+MessagePack.Resolvers.NativeDecimalResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.NativeGuidResolver
+MessagePack.Resolvers.NativeGuidResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.PrimitiveObjectResolver
+MessagePack.Resolvers.PrimitiveObjectResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.StandardResolver
+MessagePack.Resolvers.StandardResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.StandardResolverAllowPrivate
+MessagePack.Resolvers.StandardResolverAllowPrivate.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.StaticCompositeResolver
+MessagePack.Resolvers.StaticCompositeResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.StaticCompositeResolver.Register(System.Collections.Generic.IReadOnlyList<MessagePack.Formatters.IMessagePackFormatter> formatters, System.Collections.Generic.IReadOnlyList<MessagePack.IFormatterResolver> resolvers) -> void
+MessagePack.Resolvers.StaticCompositeResolver.Register(params MessagePack.Formatters.IMessagePackFormatter[] formatters) -> void
+MessagePack.Resolvers.StaticCompositeResolver.Register(params MessagePack.IFormatterResolver[] resolvers) -> void
+MessagePack.Resolvers.TypelessContractlessStandardResolver
+MessagePack.Resolvers.TypelessContractlessStandardResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.TypelessContractlessStandardResolver.TypelessContractlessStandardResolver() -> void
+MessagePack.Resolvers.TypelessObjectResolver
+MessagePack.Resolvers.TypelessObjectResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.TinyJsonException
+MessagePack.TinyJsonException.TinyJsonException(string message) -> void
+abstract MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TEnumerator, TCollection>.Add(TIntermediate collection, int index, TElement value, MessagePack.MessagePackSerializerOptions options) -> void
+abstract MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TEnumerator, TCollection>.Complete(TIntermediate intermediateCollection) -> TCollection
+abstract MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TEnumerator, TCollection>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> TIntermediate
+abstract MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TEnumerator, TCollection>.GetSourceEnumerator(TCollection source) -> TEnumerator
+abstract MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TEnumerator, TDictionary>.Add(TIntermediate collection, int index, TKey key, TValue value, MessagePack.MessagePackSerializerOptions options) -> void
+abstract MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TEnumerator, TDictionary>.Complete(TIntermediate intermediateCollection) -> TDictionary
+abstract MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TEnumerator, TDictionary>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> TIntermediate
+abstract MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TEnumerator, TDictionary>.GetSourceEnumerator(TDictionary source) -> TEnumerator
+const MessagePack.MessagePackCode.Array16 = 220 -> byte
+const MessagePack.MessagePackCode.Array32 = 221 -> byte
+const MessagePack.MessagePackCode.Bin16 = 197 -> byte
+const MessagePack.MessagePackCode.Bin32 = 198 -> byte
+const MessagePack.MessagePackCode.Bin8 = 196 -> byte
+const MessagePack.MessagePackCode.Ext16 = 200 -> byte
+const MessagePack.MessagePackCode.Ext32 = 201 -> byte
+const MessagePack.MessagePackCode.Ext8 = 199 -> byte
+const MessagePack.MessagePackCode.False = 194 -> byte
+const MessagePack.MessagePackCode.FixExt1 = 212 -> byte
+const MessagePack.MessagePackCode.FixExt16 = 216 -> byte
+const MessagePack.MessagePackCode.FixExt2 = 213 -> byte
+const MessagePack.MessagePackCode.FixExt4 = 214 -> byte
+const MessagePack.MessagePackCode.FixExt8 = 215 -> byte
+const MessagePack.MessagePackCode.Float32 = 202 -> byte
+const MessagePack.MessagePackCode.Float64 = 203 -> byte
+const MessagePack.MessagePackCode.Int16 = 209 -> byte
+const MessagePack.MessagePackCode.Int32 = 210 -> byte
+const MessagePack.MessagePackCode.Int64 = 211 -> byte
+const MessagePack.MessagePackCode.Int8 = 208 -> byte
+const MessagePack.MessagePackCode.Map16 = 222 -> byte
+const MessagePack.MessagePackCode.Map32 = 223 -> byte
+const MessagePack.MessagePackCode.MaxFixArray = 159 -> byte
+const MessagePack.MessagePackCode.MaxFixInt = 127 -> byte
+const MessagePack.MessagePackCode.MaxFixMap = 143 -> byte
+const MessagePack.MessagePackCode.MaxFixStr = 191 -> byte
+const MessagePack.MessagePackCode.MaxNegativeFixInt = 255 -> byte
+const MessagePack.MessagePackCode.MinFixArray = 144 -> byte
+const MessagePack.MessagePackCode.MinFixInt = 0 -> byte
+const MessagePack.MessagePackCode.MinFixMap = 128 -> byte
+const MessagePack.MessagePackCode.MinFixStr = 160 -> byte
+const MessagePack.MessagePackCode.MinNegativeFixInt = 224 -> byte
+const MessagePack.MessagePackCode.NeverUsed = 193 -> byte
+const MessagePack.MessagePackCode.Nil = 192 -> byte
+const MessagePack.MessagePackCode.Str16 = 218 -> byte
+const MessagePack.MessagePackCode.Str32 = 219 -> byte
+const MessagePack.MessagePackCode.Str8 = 217 -> byte
+const MessagePack.MessagePackCode.True = 195 -> byte
+const MessagePack.MessagePackCode.UInt16 = 205 -> byte
+const MessagePack.MessagePackCode.UInt32 = 206 -> byte
+const MessagePack.MessagePackCode.UInt64 = 207 -> byte
+const MessagePack.MessagePackCode.UInt8 = 204 -> byte
+const MessagePack.MessagePackRange.MaxFixArrayCount = 15 -> int
+const MessagePack.MessagePackRange.MaxFixMapCount = 15 -> int
+const MessagePack.MessagePackRange.MaxFixNegativeInt = -1 -> int
+const MessagePack.MessagePackRange.MaxFixPositiveInt = 127 -> int
+const MessagePack.MessagePackRange.MaxFixStringLength = 31 -> int
+const MessagePack.MessagePackRange.MinFixNegativeInt = -32 -> int
+const MessagePack.MessagePackRange.MinFixStringLength = 0 -> int
+const MessagePack.ReservedMessagePackExtensionTypeCode.DateTime = -1 -> sbyte
+override MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TCollection>.GetSourceEnumerator(TCollection source) -> System.Collections.Generic.IEnumerator<TElement>
+override MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TDictionary>.Complete(TDictionary intermediateCollection) -> TDictionary
+override MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TDictionary>.GetSourceEnumerator(TDictionary source) -> System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<TKey, TValue>>
+override MessagePack.Internal.AutomataDictionary.ToString() -> string
+override MessagePack.Nil.Equals(object obj) -> bool
+override MessagePack.Nil.GetHashCode() -> int
+override MessagePack.Nil.ToString() -> string
+override sealed MessagePack.Formatters.CollectionFormatterBase<TElement, TCollection>.Complete(TCollection intermediateCollection) -> TCollection
+static MessagePack.FormatterResolverExtensions.GetFormatterDynamic(this MessagePack.IFormatterResolver resolver, System.Type type) -> object
+static MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T>(this MessagePack.IFormatterResolver resolver) -> MessagePack.Formatters.IMessagePackFormatter<T>
+static MessagePack.Formatters.PrimitiveObjectFormatter.IsSupportedType(System.Type type, System.Reflection.TypeInfo typeInfo, object value) -> bool
+static MessagePack.Internal.AutomataKeyGen.GetKey(ref System.ReadOnlySpan<byte> span) -> ulong
+static MessagePack.Internal.CodeGenHelpers.GetArrayFromNullableSequence(in System.Buffers.ReadOnlySequence<byte>? sequence) -> byte[]
+static MessagePack.Internal.CodeGenHelpers.GetEncodedStringBytes(string value) -> byte[]
+static MessagePack.Internal.CodeGenHelpers.GetSpanFromSequence(in System.Buffers.ReadOnlySequence<byte> sequence) -> System.ReadOnlySpan<byte>
+static MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref MessagePack.MessagePackReader reader) -> System.ReadOnlySpan<byte>
+static MessagePack.Internal.UnsafeMemory32.WriteRaw1(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw10(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw11(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw12(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw13(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw14(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw15(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw16(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw17(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw18(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw19(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw2(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw20(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw21(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw22(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw23(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw24(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw25(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw26(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw27(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw28(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw29(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw3(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw30(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw31(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw4(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw5(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw6(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw7(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw8(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw9(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw1(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw10(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw11(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw12(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw13(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw14(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw15(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw16(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw17(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw18(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw19(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw2(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw20(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw21(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw22(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw23(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw24(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw25(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw26(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw27(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw28(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw29(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw3(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw30(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw31(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw4(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw5(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw6(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw7(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw8(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw9(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.MessagePackCode.ToFormatName(byte code) -> string
+static MessagePack.MessagePackCode.ToMessagePackType(byte code) -> MessagePack.MessagePackType
+static MessagePack.MessagePackSerializer.ConvertFromJson(System.IO.TextReader reader, ref MessagePack.MessagePackWriter writer, MessagePack.MessagePackSerializerOptions options = null) -> void
+static MessagePack.MessagePackSerializer.ConvertFromJson(string str, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> byte[]
+static MessagePack.MessagePackSerializer.ConvertFromJson(string str, ref MessagePack.MessagePackWriter writer, MessagePack.MessagePackSerializerOptions options = null) -> void
+static MessagePack.MessagePackSerializer.ConvertToJson(System.ReadOnlyMemory<byte> bytes, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> string
+static MessagePack.MessagePackSerializer.ConvertToJson(in System.Buffers.ReadOnlySequence<byte> bytes, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> string
+static MessagePack.MessagePackSerializer.ConvertToJson(ref MessagePack.MessagePackReader reader, System.IO.TextWriter jsonWriter, MessagePack.MessagePackSerializerOptions options = null) -> void
+static MessagePack.MessagePackSerializer.DefaultOptions.get -> MessagePack.MessagePackSerializerOptions
+static MessagePack.MessagePackSerializer.DefaultOptions.set -> void
+static MessagePack.MessagePackSerializer.Deserialize(System.Type type, System.Buffers.ReadOnlySequence<byte> bytes, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> object
+static MessagePack.MessagePackSerializer.Deserialize(System.Type type, System.IO.Stream stream, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> object
+static MessagePack.MessagePackSerializer.Deserialize(System.Type type, System.ReadOnlyMemory<byte> bytes, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> object
+static MessagePack.MessagePackSerializer.Deserialize(System.Type type, ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options = null) -> object
+static MessagePack.MessagePackSerializer.Deserialize<T>(System.IO.Stream stream, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> T
+static MessagePack.MessagePackSerializer.Deserialize<T>(System.ReadOnlyMemory<byte> buffer, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> T
+static MessagePack.MessagePackSerializer.Deserialize<T>(System.ReadOnlyMemory<byte> buffer, MessagePack.MessagePackSerializerOptions options, out int bytesRead, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> T
+static MessagePack.MessagePackSerializer.Deserialize<T>(System.ReadOnlyMemory<byte> buffer, out int bytesRead, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> T
+static MessagePack.MessagePackSerializer.Deserialize<T>(in System.Buffers.ReadOnlySequence<byte> byteSequence, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> T
+static MessagePack.MessagePackSerializer.Deserialize<T>(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options = null) -> T
+static MessagePack.MessagePackSerializer.DeserializeAsync(System.Type type, System.IO.Stream stream, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask<object>
+static MessagePack.MessagePackSerializer.DeserializeAsync<T>(System.IO.Stream stream, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask<T>
+static MessagePack.MessagePackSerializer.Serialize(System.Type type, System.Buffers.IBufferWriter<byte> writer, object obj, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> void
+static MessagePack.MessagePackSerializer.Serialize(System.Type type, System.IO.Stream stream, object obj, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> void
+static MessagePack.MessagePackSerializer.Serialize(System.Type type, object obj, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> byte[]
+static MessagePack.MessagePackSerializer.Serialize(System.Type type, ref MessagePack.MessagePackWriter writer, object obj, MessagePack.MessagePackSerializerOptions options = null) -> void
+static MessagePack.MessagePackSerializer.Serialize<T>(System.Buffers.IBufferWriter<byte> writer, T value, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> void
+static MessagePack.MessagePackSerializer.Serialize<T>(System.IO.Stream stream, T value, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> void
+static MessagePack.MessagePackSerializer.Serialize<T>(T value, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> byte[]
+static MessagePack.MessagePackSerializer.Serialize<T>(ref MessagePack.MessagePackWriter writer, T value, MessagePack.MessagePackSerializerOptions options = null) -> void
+static MessagePack.MessagePackSerializer.SerializeAsync(System.Type type, System.IO.Stream stream, object obj, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task
+static MessagePack.MessagePackSerializer.SerializeAsync<T>(System.IO.Stream stream, T value, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task
+static MessagePack.MessagePackSerializer.SerializeToJson<T>(System.IO.TextWriter textWriter, T obj, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> void
+static MessagePack.MessagePackSerializer.SerializeToJson<T>(T obj, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> string
+static MessagePack.MessagePackSerializer.Typeless.DefaultOptions.get -> MessagePack.MessagePackSerializerOptions
+static MessagePack.MessagePackSerializer.Typeless.DefaultOptions.set -> void
+static MessagePack.MessagePackSerializer.Typeless.Deserialize(System.IO.Stream stream, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> object
+static MessagePack.MessagePackSerializer.Typeless.Deserialize(System.Memory<byte> bytes, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> object
+static MessagePack.MessagePackSerializer.Typeless.Deserialize(in System.Buffers.ReadOnlySequence<byte> byteSequence, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> object
+static MessagePack.MessagePackSerializer.Typeless.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options = null) -> object
+static MessagePack.MessagePackSerializer.Typeless.DeserializeAsync(System.IO.Stream stream, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask<object>
+static MessagePack.MessagePackSerializer.Typeless.Serialize(System.Buffers.IBufferWriter<byte> writer, object obj, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> void
+static MessagePack.MessagePackSerializer.Typeless.Serialize(System.IO.Stream stream, object obj, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> void
+static MessagePack.MessagePackSerializer.Typeless.Serialize(object obj, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> byte[]
+static MessagePack.MessagePackSerializer.Typeless.Serialize(ref MessagePack.MessagePackWriter writer, object obj, MessagePack.MessagePackSerializerOptions options = null) -> void
+static MessagePack.MessagePackSerializer.Typeless.SerializeAsync(System.IO.Stream stream, object obj, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task
+static MessagePack.MessagePackSerializerOptions.Standard.get -> MessagePack.MessagePackSerializerOptions
+static MessagePack.Resolvers.CompositeResolver.Create(System.Collections.Generic.IReadOnlyList<MessagePack.Formatters.IMessagePackFormatter> formatters, System.Collections.Generic.IReadOnlyList<MessagePack.IFormatterResolver> resolvers) -> MessagePack.IFormatterResolver
+static MessagePack.Resolvers.CompositeResolver.Create(params MessagePack.Formatters.IMessagePackFormatter[] formatters) -> MessagePack.IFormatterResolver
+static MessagePack.Resolvers.CompositeResolver.Create(params MessagePack.IFormatterResolver[] resolvers) -> MessagePack.IFormatterResolver
+static readonly MessagePack.Formatters.BigIntegerFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Numerics.BigInteger>
+static readonly MessagePack.Formatters.BitArrayFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Collections.BitArray>
+static readonly MessagePack.Formatters.BooleanArrayFormatter.Instance -> MessagePack.Formatters.BooleanArrayFormatter
+static readonly MessagePack.Formatters.BooleanFormatter.Instance -> MessagePack.Formatters.BooleanFormatter
+static readonly MessagePack.Formatters.ByteArrayFormatter.Instance -> MessagePack.Formatters.ByteArrayFormatter
+static readonly MessagePack.Formatters.ByteArraySegmentFormatter.Instance -> MessagePack.Formatters.ByteArraySegmentFormatter
+static readonly MessagePack.Formatters.ByteFormatter.Instance -> MessagePack.Formatters.ByteFormatter
+static readonly MessagePack.Formatters.CharArrayFormatter.Instance -> MessagePack.Formatters.CharArrayFormatter
+static readonly MessagePack.Formatters.CharFormatter.Instance -> MessagePack.Formatters.CharFormatter
+static readonly MessagePack.Formatters.ComplexFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Numerics.Complex>
+static readonly MessagePack.Formatters.DateTimeArrayFormatter.Instance -> MessagePack.Formatters.DateTimeArrayFormatter
+static readonly MessagePack.Formatters.DateTimeFormatter.Instance -> MessagePack.Formatters.DateTimeFormatter
+static readonly MessagePack.Formatters.DateTimeOffsetFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.DateTimeOffset>
+static readonly MessagePack.Formatters.DecimalFormatter.Instance -> MessagePack.Formatters.DecimalFormatter
+static readonly MessagePack.Formatters.DoubleArrayFormatter.Instance -> MessagePack.Formatters.DoubleArrayFormatter
+static readonly MessagePack.Formatters.DoubleFormatter.Instance -> MessagePack.Formatters.DoubleFormatter
+static readonly MessagePack.Formatters.DynamicObjectTypeFallbackFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<object>
+static readonly MessagePack.Formatters.ForceByteBlockFormatter.Instance -> MessagePack.Formatters.ForceByteBlockFormatter
+static readonly MessagePack.Formatters.ForceInt16BlockArrayFormatter.Instance -> MessagePack.Formatters.ForceInt16BlockArrayFormatter
+static readonly MessagePack.Formatters.ForceInt16BlockFormatter.Instance -> MessagePack.Formatters.ForceInt16BlockFormatter
+static readonly MessagePack.Formatters.ForceInt32BlockArrayFormatter.Instance -> MessagePack.Formatters.ForceInt32BlockArrayFormatter
+static readonly MessagePack.Formatters.ForceInt32BlockFormatter.Instance -> MessagePack.Formatters.ForceInt32BlockFormatter
+static readonly MessagePack.Formatters.ForceInt64BlockArrayFormatter.Instance -> MessagePack.Formatters.ForceInt64BlockArrayFormatter
+static readonly MessagePack.Formatters.ForceInt64BlockFormatter.Instance -> MessagePack.Formatters.ForceInt64BlockFormatter
+static readonly MessagePack.Formatters.ForceSByteBlockArrayFormatter.Instance -> MessagePack.Formatters.ForceSByteBlockArrayFormatter
+static readonly MessagePack.Formatters.ForceSByteBlockFormatter.Instance -> MessagePack.Formatters.ForceSByteBlockFormatter
+static readonly MessagePack.Formatters.ForceUInt16BlockArrayFormatter.Instance -> MessagePack.Formatters.ForceUInt16BlockArrayFormatter
+static readonly MessagePack.Formatters.ForceUInt16BlockFormatter.Instance -> MessagePack.Formatters.ForceUInt16BlockFormatter
+static readonly MessagePack.Formatters.ForceUInt32BlockArrayFormatter.Instance -> MessagePack.Formatters.ForceUInt32BlockArrayFormatter
+static readonly MessagePack.Formatters.ForceUInt32BlockFormatter.Instance -> MessagePack.Formatters.ForceUInt32BlockFormatter
+static readonly MessagePack.Formatters.ForceUInt64BlockArrayFormatter.Instance -> MessagePack.Formatters.ForceUInt64BlockArrayFormatter
+static readonly MessagePack.Formatters.ForceUInt64BlockFormatter.Instance -> MessagePack.Formatters.ForceUInt64BlockFormatter
+static readonly MessagePack.Formatters.GuidFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Guid>
+static readonly MessagePack.Formatters.Int16ArrayFormatter.Instance -> MessagePack.Formatters.Int16ArrayFormatter
+static readonly MessagePack.Formatters.Int16Formatter.Instance -> MessagePack.Formatters.Int16Formatter
+static readonly MessagePack.Formatters.Int32ArrayFormatter.Instance -> MessagePack.Formatters.Int32ArrayFormatter
+static readonly MessagePack.Formatters.Int32Formatter.Instance -> MessagePack.Formatters.Int32Formatter
+static readonly MessagePack.Formatters.Int64ArrayFormatter.Instance -> MessagePack.Formatters.Int64ArrayFormatter
+static readonly MessagePack.Formatters.Int64Formatter.Instance -> MessagePack.Formatters.Int64Formatter
+static readonly MessagePack.Formatters.NativeDateTimeArrayFormatter.Instance -> MessagePack.Formatters.NativeDateTimeArrayFormatter
+static readonly MessagePack.Formatters.NativeDateTimeFormatter.Instance -> MessagePack.Formatters.NativeDateTimeFormatter
+static readonly MessagePack.Formatters.NativeDecimalFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<decimal>
+static readonly MessagePack.Formatters.NativeGuidFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Guid>
+static readonly MessagePack.Formatters.NilFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<MessagePack.Nil>
+static readonly MessagePack.Formatters.NonGenericInterfaceDictionaryFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Collections.IDictionary>
+static readonly MessagePack.Formatters.NonGenericInterfaceListFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Collections.IList>
+static readonly MessagePack.Formatters.NullableBooleanFormatter.Instance -> MessagePack.Formatters.NullableBooleanFormatter
+static readonly MessagePack.Formatters.NullableByteFormatter.Instance -> MessagePack.Formatters.NullableByteFormatter
+static readonly MessagePack.Formatters.NullableCharFormatter.Instance -> MessagePack.Formatters.NullableCharFormatter
+static readonly MessagePack.Formatters.NullableDateTimeFormatter.Instance -> MessagePack.Formatters.NullableDateTimeFormatter
+static readonly MessagePack.Formatters.NullableDoubleFormatter.Instance -> MessagePack.Formatters.NullableDoubleFormatter
+static readonly MessagePack.Formatters.NullableForceByteBlockFormatter.Instance -> MessagePack.Formatters.NullableForceByteBlockFormatter
+static readonly MessagePack.Formatters.NullableForceInt16BlockFormatter.Instance -> MessagePack.Formatters.NullableForceInt16BlockFormatter
+static readonly MessagePack.Formatters.NullableForceInt32BlockFormatter.Instance -> MessagePack.Formatters.NullableForceInt32BlockFormatter
+static readonly MessagePack.Formatters.NullableForceInt64BlockFormatter.Instance -> MessagePack.Formatters.NullableForceInt64BlockFormatter
+static readonly MessagePack.Formatters.NullableForceSByteBlockFormatter.Instance -> MessagePack.Formatters.NullableForceSByteBlockFormatter
+static readonly MessagePack.Formatters.NullableForceUInt16BlockFormatter.Instance -> MessagePack.Formatters.NullableForceUInt16BlockFormatter
+static readonly MessagePack.Formatters.NullableForceUInt32BlockFormatter.Instance -> MessagePack.Formatters.NullableForceUInt32BlockFormatter
+static readonly MessagePack.Formatters.NullableForceUInt64BlockFormatter.Instance -> MessagePack.Formatters.NullableForceUInt64BlockFormatter
+static readonly MessagePack.Formatters.NullableInt16Formatter.Instance -> MessagePack.Formatters.NullableInt16Formatter
+static readonly MessagePack.Formatters.NullableInt32Formatter.Instance -> MessagePack.Formatters.NullableInt32Formatter
+static readonly MessagePack.Formatters.NullableInt64Formatter.Instance -> MessagePack.Formatters.NullableInt64Formatter
+static readonly MessagePack.Formatters.NullableNilFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<MessagePack.Nil?>
+static readonly MessagePack.Formatters.NullableSByteFormatter.Instance -> MessagePack.Formatters.NullableSByteFormatter
+static readonly MessagePack.Formatters.NullableSingleFormatter.Instance -> MessagePack.Formatters.NullableSingleFormatter
+static readonly MessagePack.Formatters.NullableStringArrayFormatter.Instance -> MessagePack.Formatters.NullableStringArrayFormatter
+static readonly MessagePack.Formatters.NullableStringFormatter.Instance -> MessagePack.Formatters.NullableStringFormatter
+static readonly MessagePack.Formatters.NullableUInt16Formatter.Instance -> MessagePack.Formatters.NullableUInt16Formatter
+static readonly MessagePack.Formatters.NullableUInt32Formatter.Instance -> MessagePack.Formatters.NullableUInt32Formatter
+static readonly MessagePack.Formatters.NullableUInt64Formatter.Instance -> MessagePack.Formatters.NullableUInt64Formatter
+static readonly MessagePack.Formatters.PrimitiveObjectFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<object>
+static readonly MessagePack.Formatters.SByteArrayFormatter.Instance -> MessagePack.Formatters.SByteArrayFormatter
+static readonly MessagePack.Formatters.SByteFormatter.Instance -> MessagePack.Formatters.SByteFormatter
+static readonly MessagePack.Formatters.SingleArrayFormatter.Instance -> MessagePack.Formatters.SingleArrayFormatter
+static readonly MessagePack.Formatters.SingleFormatter.Instance -> MessagePack.Formatters.SingleFormatter
+static readonly MessagePack.Formatters.StringBuilderFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Text.StringBuilder>
+static readonly MessagePack.Formatters.TimeSpanFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.TimeSpan>
+static readonly MessagePack.Formatters.TypelessFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<object>
+static readonly MessagePack.Formatters.UInt16ArrayFormatter.Instance -> MessagePack.Formatters.UInt16ArrayFormatter
+static readonly MessagePack.Formatters.UInt16Formatter.Instance -> MessagePack.Formatters.UInt16Formatter
+static readonly MessagePack.Formatters.UInt32ArrayFormatter.Instance -> MessagePack.Formatters.UInt32ArrayFormatter
+static readonly MessagePack.Formatters.UInt32Formatter.Instance -> MessagePack.Formatters.UInt32Formatter
+static readonly MessagePack.Formatters.UInt64ArrayFormatter.Instance -> MessagePack.Formatters.UInt64ArrayFormatter
+static readonly MessagePack.Formatters.UInt64Formatter.Instance -> MessagePack.Formatters.UInt64Formatter
+static readonly MessagePack.Formatters.UriFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Uri>
+static readonly MessagePack.Formatters.VersionFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Version>
+static readonly MessagePack.Internal.AutomataKeyGen.GetKeyMethod -> System.Reflection.MethodInfo
+static readonly MessagePack.Internal.RuntimeTypeHandleEqualityComparer.Default -> System.Collections.Generic.IEqualityComparer<System.RuntimeTypeHandle>
+static readonly MessagePack.Internal.UnsafeMemory.Is32Bit -> bool
+static readonly MessagePack.Nil.Default -> MessagePack.Nil
+static readonly MessagePack.Resolvers.AttributeFormatterResolver.Instance -> MessagePack.Resolvers.AttributeFormatterResolver
+static readonly MessagePack.Resolvers.BuiltinResolver.Instance -> MessagePack.Resolvers.BuiltinResolver
+static readonly MessagePack.Resolvers.ContractlessStandardResolver.Instance -> MessagePack.Resolvers.ContractlessStandardResolver
+static readonly MessagePack.Resolvers.ContractlessStandardResolver.Options -> MessagePack.MessagePackSerializerOptions
+static readonly MessagePack.Resolvers.ContractlessStandardResolverAllowPrivate.Instance -> MessagePack.Resolvers.ContractlessStandardResolverAllowPrivate
+static readonly MessagePack.Resolvers.ContractlessStandardResolverAllowPrivate.Options -> MessagePack.MessagePackSerializerOptions
+static readonly MessagePack.Resolvers.DynamicContractlessObjectResolver.Instance -> MessagePack.Resolvers.DynamicContractlessObjectResolver
+static readonly MessagePack.Resolvers.DynamicContractlessObjectResolverAllowPrivate.Instance -> MessagePack.Resolvers.DynamicContractlessObjectResolverAllowPrivate
+static readonly MessagePack.Resolvers.DynamicEnumAsStringResolver.Instance -> MessagePack.Resolvers.DynamicEnumAsStringResolver
+static readonly MessagePack.Resolvers.DynamicEnumAsStringResolver.Options -> MessagePack.MessagePackSerializerOptions
+static readonly MessagePack.Resolvers.DynamicEnumResolver.Instance -> MessagePack.Resolvers.DynamicEnumResolver
+static readonly MessagePack.Resolvers.DynamicGenericResolver.Instance -> MessagePack.Resolvers.DynamicGenericResolver
+static readonly MessagePack.Resolvers.DynamicObjectResolver.Instance -> MessagePack.Resolvers.DynamicObjectResolver
+static readonly MessagePack.Resolvers.DynamicObjectResolver.Options -> MessagePack.MessagePackSerializerOptions
+static readonly MessagePack.Resolvers.DynamicObjectResolverAllowPrivate.Instance -> MessagePack.Resolvers.DynamicObjectResolverAllowPrivate
+static readonly MessagePack.Resolvers.DynamicUnionResolver.Instance -> MessagePack.Resolvers.DynamicUnionResolver
+static readonly MessagePack.Resolvers.DynamicUnionResolver.Options -> MessagePack.MessagePackSerializerOptions
+static readonly MessagePack.Resolvers.NativeDateTimeResolver.Instance -> MessagePack.Resolvers.NativeDateTimeResolver
+static readonly MessagePack.Resolvers.NativeDateTimeResolver.Options -> MessagePack.MessagePackSerializerOptions
+static readonly MessagePack.Resolvers.NativeDecimalResolver.Instance -> MessagePack.Resolvers.NativeDecimalResolver
+static readonly MessagePack.Resolvers.NativeGuidResolver.Instance -> MessagePack.Resolvers.NativeGuidResolver
+static readonly MessagePack.Resolvers.PrimitiveObjectResolver.Instance -> MessagePack.Resolvers.PrimitiveObjectResolver
+static readonly MessagePack.Resolvers.PrimitiveObjectResolver.Options -> MessagePack.MessagePackSerializerOptions
+static readonly MessagePack.Resolvers.StandardResolver.Instance -> MessagePack.Resolvers.StandardResolver
+static readonly MessagePack.Resolvers.StandardResolver.Options -> MessagePack.MessagePackSerializerOptions
+static readonly MessagePack.Resolvers.StandardResolverAllowPrivate.Instance -> MessagePack.Resolvers.StandardResolverAllowPrivate
+static readonly MessagePack.Resolvers.StandardResolverAllowPrivate.Options -> MessagePack.MessagePackSerializerOptions
+static readonly MessagePack.Resolvers.StaticCompositeResolver.Instance -> MessagePack.Resolvers.StaticCompositeResolver
+static readonly MessagePack.Resolvers.TypelessContractlessStandardResolver.Instance -> MessagePack.Resolvers.TypelessContractlessStandardResolver
+static readonly MessagePack.Resolvers.TypelessContractlessStandardResolver.Options -> MessagePack.MessagePackSerializerOptions
+static readonly MessagePack.Resolvers.TypelessObjectResolver.Instance -> MessagePack.IFormatterResolver
+virtual MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TEnumerator, TCollection>.GetCount(TCollection sequence) -> int?
+virtual MessagePack.MessagePackSerializerOptions.Clone() -> MessagePack.MessagePackSerializerOptions
+virtual MessagePack.MessagePackSerializerOptions.LoadType(string typeName) -> System.Type
+virtual MessagePack.MessagePackSerializerOptions.ThrowIfDeserializingTypeIsDisallowed(System.Type type) -> void
+MessagePack.ExtensionHeader.Equals(MessagePack.ExtensionHeader other) -> bool
+MessagePack.Formatters.InterfaceCollectionFormatter2<T>
+MessagePack.Formatters.InterfaceCollectionFormatter2<T>.InterfaceCollectionFormatter2() -> void
+MessagePack.Formatters.InterfaceListFormatter2<T>
+MessagePack.Formatters.InterfaceListFormatter2<T>.InterfaceListFormatter2() -> void
+MessagePack.MessagePackReader.Depth.get -> int
+MessagePack.MessagePackReader.Depth.set -> void
+MessagePack.MessagePackReader.ReadDateTime(MessagePack.ExtensionHeader header) -> System.DateTime
+MessagePack.MessagePackReader.TryReadArrayHeader(out int count) -> bool
+MessagePack.MessagePackReader.TryReadExtensionFormatHeader(out MessagePack.ExtensionHeader extensionHeader) -> bool
+MessagePack.MessagePackReader.TryReadMapHeader(out int count) -> bool
+MessagePack.MessagePackSecurity
+MessagePack.MessagePackSecurity.DepthStep(ref MessagePack.MessagePackReader reader) -> void
+MessagePack.MessagePackSecurity.GetEqualityComparer() -> System.Collections.IEqualityComparer
+MessagePack.MessagePackSecurity.GetEqualityComparer<T>() -> System.Collections.Generic.IEqualityComparer<T>
+MessagePack.MessagePackSecurity.HashCollisionResistant.get -> bool
+MessagePack.MessagePackSecurity.MaximumObjectGraphDepth.get -> int
+MessagePack.MessagePackSecurity.MessagePackSecurity(MessagePack.MessagePackSecurity copyFrom) -> void
+MessagePack.MessagePackSecurity.WithHashCollisionResistant(bool hashCollisionResistant) -> MessagePack.MessagePackSecurity
+MessagePack.MessagePackSecurity.WithMaximumObjectGraphDepth(int maximumObjectGraphDepth) -> MessagePack.MessagePackSecurity
+MessagePack.MessagePackSerializerOptions.Security.get -> MessagePack.MessagePackSecurity
+MessagePack.MessagePackSerializerOptions.WithSecurity(MessagePack.MessagePackSecurity security) -> MessagePack.MessagePackSerializerOptions
+MessagePack.MessagePackStreamReader.DiscardBufferedData() -> void
+MessagePack.MessagePackStreamReader.MessagePackStreamReader(System.IO.Stream stream, bool leaveOpen) -> void
+MessagePack.MessagePackStreamReader.ReadArrayAsync(System.Threading.CancellationToken cancellationToken) -> System.Collections.Generic.IAsyncEnumerable<System.Buffers.ReadOnlySequence<byte>>
+MessagePack.MessagePackWriter.WriteBinHeader(int length) -> void
+MessagePack.MessagePackWriter.WriteStringHeader(int byteCount) -> void
+static readonly MessagePack.MessagePackSecurity.TrustedData -> MessagePack.MessagePackSecurity
+static readonly MessagePack.MessagePackSecurity.UntrustedData -> MessagePack.MessagePackSecurity
+virtual MessagePack.MessagePackSecurity.Clone() -> MessagePack.MessagePackSecurity
+virtual MessagePack.MessagePackSecurity.GetHashCollisionResistantEqualityComparer() -> System.Collections.IEqualityComparer
+virtual MessagePack.MessagePackSecurity.GetHashCollisionResistantEqualityComparer<T>() -> System.Collections.Generic.IEqualityComparer<T>
+MessagePack.Formatters.ByteMemoryFormatter
+MessagePack.Formatters.ByteMemoryFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Memory<byte>
+MessagePack.Formatters.ByteMemoryFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Memory<byte> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ByteReadOnlyMemoryFormatter
+MessagePack.Formatters.ByteReadOnlyMemoryFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.ReadOnlyMemory<byte>
+MessagePack.Formatters.ByteReadOnlyMemoryFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.ReadOnlyMemory<byte> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ByteReadOnlySequenceFormatter
+MessagePack.Formatters.ByteReadOnlySequenceFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Buffers.ReadOnlySequence<byte>
+MessagePack.Formatters.ByteReadOnlySequenceFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Buffers.ReadOnlySequence<byte> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ExpandoObjectFormatter
+MessagePack.Formatters.ExpandoObjectFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Dynamic.ExpandoObject
+MessagePack.Formatters.ExpandoObjectFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Dynamic.ExpandoObject value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceTypelessFormatter<T>
+MessagePack.Formatters.ForceTypelessFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T
+MessagePack.Formatters.ForceTypelessFormatter<T>.ForceTypelessFormatter() -> void
+MessagePack.Formatters.ForceTypelessFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.MemoryFormatter<T>
+MessagePack.Formatters.MemoryFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Memory<T>
+MessagePack.Formatters.MemoryFormatter<T>.MemoryFormatter() -> void
+MessagePack.Formatters.MemoryFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, System.Memory<T> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NonGenericInterfaceCollectionFormatter
+MessagePack.Formatters.NonGenericInterfaceCollectionFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Collections.ICollection
+MessagePack.Formatters.NonGenericInterfaceCollectionFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Collections.ICollection value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NonGenericInterfaceEnumerableFormatter
+MessagePack.Formatters.NonGenericInterfaceEnumerableFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Collections.IEnumerable
+MessagePack.Formatters.NonGenericInterfaceEnumerableFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Collections.IEnumerable value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.PrimitiveObjectFormatter.PrimitiveObjectFormatter() -> void
+MessagePack.Formatters.ReadOnlyMemoryFormatter<T>
+MessagePack.Formatters.ReadOnlyMemoryFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.ReadOnlyMemory<T>
+MessagePack.Formatters.ReadOnlyMemoryFormatter<T>.ReadOnlyMemoryFormatter() -> void
+MessagePack.Formatters.ReadOnlyMemoryFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, System.ReadOnlyMemory<T> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ReadOnlySequenceFormatter<T>
+MessagePack.Formatters.ReadOnlySequenceFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Buffers.ReadOnlySequence<T>
+MessagePack.Formatters.ReadOnlySequenceFormatter<T>.ReadOnlySequenceFormatter() -> void
+MessagePack.Formatters.ReadOnlySequenceFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, System.Buffers.ReadOnlySequence<T> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TypeFormatter<T>
+MessagePack.Formatters.TypeFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T
+MessagePack.Formatters.TypeFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TypelessFormatter.TypelessFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableArrayFormatter<T>
+MessagePack.ImmutableCollection.ImmutableArrayFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableArray<T>
+MessagePack.ImmutableCollection.ImmutableArrayFormatter<T>.ImmutableArrayFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableArrayFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, System.Collections.Immutable.ImmutableArray<T> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.ImmutableCollection.ImmutableCollectionResolver
+MessagePack.ImmutableCollection.ImmutableCollectionResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.ImmutableCollection.ImmutableDictionaryFormatter<TKey, TValue>
+MessagePack.ImmutableCollection.ImmutableDictionaryFormatter<TKey, TValue>.ImmutableDictionaryFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableHashSetFormatter<T>
+MessagePack.ImmutableCollection.ImmutableHashSetFormatter<T>.ImmutableHashSetFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableListFormatter<T>
+MessagePack.ImmutableCollection.ImmutableListFormatter<T>.ImmutableListFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>
+MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>.Add(T value) -> void
+MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>.ImmutableQueueBuilder() -> void
+MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>.Q.get -> System.Collections.Immutable.ImmutableQueue<T>
+MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>.Q.set -> void
+MessagePack.ImmutableCollection.ImmutableQueueFormatter<T>
+MessagePack.ImmutableCollection.ImmutableQueueFormatter<T>.ImmutableQueueFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableSortedDictionaryFormatter<TKey, TValue>
+MessagePack.ImmutableCollection.ImmutableSortedDictionaryFormatter<TKey, TValue>.ImmutableSortedDictionaryFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableSortedSetFormatter<T>
+MessagePack.ImmutableCollection.ImmutableSortedSetFormatter<T>.ImmutableSortedSetFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableStackFormatter<T>
+MessagePack.ImmutableCollection.ImmutableStackFormatter<T>.ImmutableStackFormatter() -> void
+MessagePack.ImmutableCollection.InterfaceImmutableDictionaryFormatter<TKey, TValue>
+MessagePack.ImmutableCollection.InterfaceImmutableDictionaryFormatter<TKey, TValue>.InterfaceImmutableDictionaryFormatter() -> void
+MessagePack.ImmutableCollection.InterfaceImmutableListFormatter<T>
+MessagePack.ImmutableCollection.InterfaceImmutableListFormatter<T>.InterfaceImmutableListFormatter() -> void
+MessagePack.ImmutableCollection.InterfaceImmutableQueueFormatter<T>
+MessagePack.ImmutableCollection.InterfaceImmutableQueueFormatter<T>.InterfaceImmutableQueueFormatter() -> void
+MessagePack.ImmutableCollection.InterfaceImmutableSetFormatter<T>
+MessagePack.ImmutableCollection.InterfaceImmutableSetFormatter<T>.InterfaceImmutableSetFormatter() -> void
+MessagePack.ImmutableCollection.InterfaceImmutableStackFormatter<T>
+MessagePack.ImmutableCollection.InterfaceImmutableStackFormatter<T>.InterfaceImmutableStackFormatter() -> void
+MessagePack.Resolvers.ExpandoObjectResolver
+override MessagePack.ImmutableCollection.ImmutableDictionaryFormatter<TKey, TValue>.Add(System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Builder collection, int index, TKey key, TValue value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.ImmutableDictionaryFormatter<TKey, TValue>.Complete(System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Builder intermediateCollection) -> System.Collections.Immutable.ImmutableDictionary<TKey, TValue>
+override MessagePack.ImmutableCollection.ImmutableDictionaryFormatter<TKey, TValue>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Builder
+override MessagePack.ImmutableCollection.ImmutableDictionaryFormatter<TKey, TValue>.GetSourceEnumerator(System.Collections.Immutable.ImmutableDictionary<TKey, TValue> source) -> System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Enumerator
+override MessagePack.ImmutableCollection.ImmutableHashSetFormatter<T>.Add(System.Collections.Immutable.ImmutableHashSet<T>.Builder collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.ImmutableHashSetFormatter<T>.Complete(System.Collections.Immutable.ImmutableHashSet<T>.Builder intermediateCollection) -> System.Collections.Immutable.ImmutableHashSet<T>
+override MessagePack.ImmutableCollection.ImmutableHashSetFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableHashSet<T>.Builder
+override MessagePack.ImmutableCollection.ImmutableHashSetFormatter<T>.GetSourceEnumerator(System.Collections.Immutable.ImmutableHashSet<T> source) -> System.Collections.Immutable.ImmutableHashSet<T>.Enumerator
+override MessagePack.ImmutableCollection.ImmutableListFormatter<T>.Add(System.Collections.Immutable.ImmutableList<T>.Builder collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.ImmutableListFormatter<T>.Complete(System.Collections.Immutable.ImmutableList<T>.Builder intermediateCollection) -> System.Collections.Immutable.ImmutableList<T>
+override MessagePack.ImmutableCollection.ImmutableListFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableList<T>.Builder
+override MessagePack.ImmutableCollection.ImmutableListFormatter<T>.GetSourceEnumerator(System.Collections.Immutable.ImmutableList<T> source) -> System.Collections.Immutable.ImmutableList<T>.Enumerator
+override MessagePack.ImmutableCollection.ImmutableQueueFormatter<T>.Add(MessagePack.ImmutableCollection.ImmutableQueueBuilder<T> collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.ImmutableQueueFormatter<T>.Complete(MessagePack.ImmutableCollection.ImmutableQueueBuilder<T> intermediateCollection) -> System.Collections.Immutable.ImmutableQueue<T>
+override MessagePack.ImmutableCollection.ImmutableQueueFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>
+override MessagePack.ImmutableCollection.ImmutableSortedDictionaryFormatter<TKey, TValue>.Add(System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue>.Builder collection, int index, TKey key, TValue value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.ImmutableSortedDictionaryFormatter<TKey, TValue>.Complete(System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue>.Builder intermediateCollection) -> System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue>
+override MessagePack.ImmutableCollection.ImmutableSortedDictionaryFormatter<TKey, TValue>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue>.Builder
+override MessagePack.ImmutableCollection.ImmutableSortedDictionaryFormatter<TKey, TValue>.GetSourceEnumerator(System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue> source) -> System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue>.Enumerator
+override MessagePack.ImmutableCollection.ImmutableSortedSetFormatter<T>.Add(System.Collections.Immutable.ImmutableSortedSet<T>.Builder collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.ImmutableSortedSetFormatter<T>.Complete(System.Collections.Immutable.ImmutableSortedSet<T>.Builder intermediateCollection) -> System.Collections.Immutable.ImmutableSortedSet<T>
+override MessagePack.ImmutableCollection.ImmutableSortedSetFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableSortedSet<T>.Builder
+override MessagePack.ImmutableCollection.ImmutableSortedSetFormatter<T>.GetSourceEnumerator(System.Collections.Immutable.ImmutableSortedSet<T> source) -> System.Collections.Immutable.ImmutableSortedSet<T>.Enumerator
+override MessagePack.ImmutableCollection.ImmutableStackFormatter<T>.Add(T[] collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.ImmutableStackFormatter<T>.Complete(T[] intermediateCollection) -> System.Collections.Immutable.ImmutableStack<T>
+override MessagePack.ImmutableCollection.ImmutableStackFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> T[]
+override MessagePack.ImmutableCollection.InterfaceImmutableDictionaryFormatter<TKey, TValue>.Add(System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Builder collection, int index, TKey key, TValue value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.InterfaceImmutableDictionaryFormatter<TKey, TValue>.Complete(System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Builder intermediateCollection) -> System.Collections.Immutable.IImmutableDictionary<TKey, TValue>
+override MessagePack.ImmutableCollection.InterfaceImmutableDictionaryFormatter<TKey, TValue>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Builder
+override MessagePack.ImmutableCollection.InterfaceImmutableListFormatter<T>.Add(System.Collections.Immutable.ImmutableList<T>.Builder collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.InterfaceImmutableListFormatter<T>.Complete(System.Collections.Immutable.ImmutableList<T>.Builder intermediateCollection) -> System.Collections.Immutable.IImmutableList<T>
+override MessagePack.ImmutableCollection.InterfaceImmutableListFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableList<T>.Builder
+override MessagePack.ImmutableCollection.InterfaceImmutableQueueFormatter<T>.Add(MessagePack.ImmutableCollection.ImmutableQueueBuilder<T> collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.InterfaceImmutableQueueFormatter<T>.Complete(MessagePack.ImmutableCollection.ImmutableQueueBuilder<T> intermediateCollection) -> System.Collections.Immutable.IImmutableQueue<T>
+override MessagePack.ImmutableCollection.InterfaceImmutableQueueFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>
+override MessagePack.ImmutableCollection.InterfaceImmutableSetFormatter<T>.Add(System.Collections.Immutable.ImmutableHashSet<T>.Builder collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.InterfaceImmutableSetFormatter<T>.Complete(System.Collections.Immutable.ImmutableHashSet<T>.Builder intermediateCollection) -> System.Collections.Immutable.IImmutableSet<T>
+override MessagePack.ImmutableCollection.InterfaceImmutableSetFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableHashSet<T>.Builder
+override MessagePack.ImmutableCollection.InterfaceImmutableStackFormatter<T>.Add(T[] collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.InterfaceImmutableStackFormatter<T>.Complete(T[] intermediateCollection) -> System.Collections.Immutable.IImmutableStack<T>
+override MessagePack.ImmutableCollection.InterfaceImmutableStackFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> T[]
+static readonly MessagePack.Formatters.ByteMemoryFormatter.Instance -> MessagePack.Formatters.ByteMemoryFormatter
+static readonly MessagePack.Formatters.ByteReadOnlyMemoryFormatter.Instance -> MessagePack.Formatters.ByteReadOnlyMemoryFormatter
+static readonly MessagePack.Formatters.ByteReadOnlySequenceFormatter.Instance -> MessagePack.Formatters.ByteReadOnlySequenceFormatter
+static readonly MessagePack.Formatters.ExpandoObjectFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Dynamic.ExpandoObject>
+static readonly MessagePack.Formatters.NonGenericInterfaceCollectionFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Collections.ICollection>
+static readonly MessagePack.Formatters.NonGenericInterfaceEnumerableFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Collections.IEnumerable>
+static readonly MessagePack.Formatters.TypeFormatter<T>.Instance -> MessagePack.Formatters.IMessagePackFormatter<T>
+static readonly MessagePack.ImmutableCollection.ImmutableCollectionResolver.Instance -> MessagePack.ImmutableCollection.ImmutableCollectionResolver
+static readonly MessagePack.Resolvers.ExpandoObjectResolver.Instance -> MessagePack.IFormatterResolver
+static readonly MessagePack.Resolvers.ExpandoObjectResolver.Options -> MessagePack.MessagePackSerializerOptions
+virtual MessagePack.Formatters.PrimitiveObjectFormatter.DeserializeMap(ref MessagePack.MessagePackReader reader, int length, MessagePack.MessagePackSerializerOptions options) -> object
+MessagePack.ExtensionHeader.ExtensionHeader() -> void
+MessagePack.ExtensionResult.ExtensionResult() -> void
+MessagePack.FormatterNotRegisteredException.FormatterNotRegisteredException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) -> void
+MessagePack.Formatters.HalfFormatter
+MessagePack.Formatters.HalfFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Half
+MessagePack.Formatters.HalfFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Half value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.InterfaceReadOnlySetFormatter<T>
+MessagePack.Formatters.InterfaceReadOnlySetFormatter<T>.InterfaceReadOnlySetFormatter() -> void
+MessagePack.MessagePackReader.MessagePackReader() -> void
+MessagePack.MessagePackSerializerOptions.SequencePool.get -> MessagePack.SequencePool
+MessagePack.MessagePackSerializerOptions.WithPool(MessagePack.SequencePool pool) -> MessagePack.MessagePackSerializerOptions
+MessagePack.MessagePackStreamReader.MessagePackStreamReader(System.IO.Stream stream, bool leaveOpen, MessagePack.SequencePool sequencePool) -> void
+MessagePack.MessagePackStreamReader.ReadArrayHeaderAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.ValueTask<int>
+MessagePack.MessagePackStreamReader.ReadMapHeaderAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.ValueTask<int>
+MessagePack.MessagePackWriter.MessagePackWriter() -> void
+MessagePack.SequencePool
+MessagePack.SequencePool.SequencePool() -> void
+MessagePack.SequencePool.SequencePool(int maxSize) -> void
+MessagePack.SequencePool.SequencePool(int maxSize, System.Buffers.ArrayPool<byte> arrayPool) -> void
+MessagePack.TinyJsonException.TinyJsonException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) -> void
+static MessagePack.Nil.operator !=(MessagePack.Nil left, MessagePack.Nil right) -> bool
+static MessagePack.Nil.operator ==(MessagePack.Nil left, MessagePack.Nil right) -> bool
+static readonly MessagePack.Formatters.HalfFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Half>
+virtual MessagePack.MessagePackStreamReader.Dispose(bool disposing) -> void
+MessagePack.Formatters.GenericEnumerableFormatter<TElement, TCollection>
+MessagePack.Formatters.GenericEnumerableFormatter<TElement, TCollection>.GenericEnumerableFormatter() -> void
+MessagePack.Formatters.GenericReadOnlyDictionaryFormatter<TKey, TValue, TDictionary>
+MessagePack.Formatters.GenericReadOnlyDictionaryFormatter<TKey, TValue, TDictionary>.GenericReadOnlyDictionaryFormatter() -> void
diff --git a/src/MessagePack/net6.0/PublicAPI.Unshipped.txt b/src/MessagePack/net6.0/PublicAPI.Unshipped.txt
new file mode 100644
index 00000000..89697310
--- /dev/null
+++ b/src/MessagePack/net6.0/PublicAPI.Unshipped.txt
@@ -0,0 +1,16 @@
+MessagePack.Formatters.DateOnlyFormatter
+MessagePack.Formatters.DateOnlyFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.DateOnly
+MessagePack.Formatters.DateOnlyFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.DateOnly value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.StringInterningFormatter
+MessagePack.Formatters.StringInterningFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> string
+MessagePack.Formatters.StringInterningFormatter.Serialize(ref MessagePack.MessagePackWriter writer, string value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.StringInterningFormatter.StringInterningFormatter() -> void
+MessagePack.Formatters.TimeOnlyFormatter
+MessagePack.Formatters.TimeOnlyFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.TimeOnly
+MessagePack.Formatters.TimeOnlyFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.TimeOnly value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.MessagePackSerializerOptions.CompressionMinLength.get -> int
+MessagePack.MessagePackSerializerOptions.SuggestedContiguousMemorySize.get -> int
+MessagePack.MessagePackSerializerOptions.WithCompressionMinLength(int compressionMinLength) -> MessagePack.MessagePackSerializerOptions
+MessagePack.MessagePackSerializerOptions.WithSuggestedContiguousMemorySize(int suggestedContiguousMemorySize) -> MessagePack.MessagePackSerializerOptions
+static readonly MessagePack.Formatters.DateOnlyFormatter.Instance -> MessagePack.Formatters.DateOnlyFormatter
+static readonly MessagePack.Formatters.TimeOnlyFormatter.Instance -> MessagePack.Formatters.TimeOnlyFormatter
diff --git a/src/MessagePack/PublicAPI.Shipped.txt b/src/MessagePack/netcoreapp3.1/PublicAPI.Shipped.txt
index 05578778..51002a49 100644
--- a/src/MessagePack/PublicAPI.Shipped.txt
+++ b/src/MessagePack/netcoreapp3.1/PublicAPI.Shipped.txt
@@ -1,4 +1,4 @@
-MessagePack.ExtensionHeader
+MessagePack.ExtensionHeader
MessagePack.ExtensionHeader.ExtensionHeader(sbyte typeCode, int length) -> void
MessagePack.ExtensionHeader.ExtensionHeader(sbyte typeCode, uint length) -> void
MessagePack.ExtensionHeader.Length.get -> uint
@@ -1023,3 +1023,152 @@ static readonly MessagePack.MessagePackSecurity.UntrustedData -> MessagePack.Mes
virtual MessagePack.MessagePackSecurity.Clone() -> MessagePack.MessagePackSecurity
virtual MessagePack.MessagePackSecurity.GetHashCollisionResistantEqualityComparer() -> System.Collections.IEqualityComparer
virtual MessagePack.MessagePackSecurity.GetHashCollisionResistantEqualityComparer<T>() -> System.Collections.Generic.IEqualityComparer<T>
+MessagePack.Formatters.ByteMemoryFormatter
+MessagePack.Formatters.ByteMemoryFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Memory<byte>
+MessagePack.Formatters.ByteMemoryFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Memory<byte> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ByteReadOnlyMemoryFormatter
+MessagePack.Formatters.ByteReadOnlyMemoryFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.ReadOnlyMemory<byte>
+MessagePack.Formatters.ByteReadOnlyMemoryFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.ReadOnlyMemory<byte> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ByteReadOnlySequenceFormatter
+MessagePack.Formatters.ByteReadOnlySequenceFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Buffers.ReadOnlySequence<byte>
+MessagePack.Formatters.ByteReadOnlySequenceFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Buffers.ReadOnlySequence<byte> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ExpandoObjectFormatter
+MessagePack.Formatters.ExpandoObjectFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Dynamic.ExpandoObject
+MessagePack.Formatters.ExpandoObjectFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Dynamic.ExpandoObject value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceTypelessFormatter<T>
+MessagePack.Formatters.ForceTypelessFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T
+MessagePack.Formatters.ForceTypelessFormatter<T>.ForceTypelessFormatter() -> void
+MessagePack.Formatters.ForceTypelessFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.MemoryFormatter<T>
+MessagePack.Formatters.MemoryFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Memory<T>
+MessagePack.Formatters.MemoryFormatter<T>.MemoryFormatter() -> void
+MessagePack.Formatters.MemoryFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, System.Memory<T> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NonGenericInterfaceCollectionFormatter
+MessagePack.Formatters.NonGenericInterfaceCollectionFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Collections.ICollection
+MessagePack.Formatters.NonGenericInterfaceCollectionFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Collections.ICollection value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NonGenericInterfaceEnumerableFormatter
+MessagePack.Formatters.NonGenericInterfaceEnumerableFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Collections.IEnumerable
+MessagePack.Formatters.NonGenericInterfaceEnumerableFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Collections.IEnumerable value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.PrimitiveObjectFormatter.PrimitiveObjectFormatter() -> void
+MessagePack.Formatters.ReadOnlyMemoryFormatter<T>
+MessagePack.Formatters.ReadOnlyMemoryFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.ReadOnlyMemory<T>
+MessagePack.Formatters.ReadOnlyMemoryFormatter<T>.ReadOnlyMemoryFormatter() -> void
+MessagePack.Formatters.ReadOnlyMemoryFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, System.ReadOnlyMemory<T> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ReadOnlySequenceFormatter<T>
+MessagePack.Formatters.ReadOnlySequenceFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Buffers.ReadOnlySequence<T>
+MessagePack.Formatters.ReadOnlySequenceFormatter<T>.ReadOnlySequenceFormatter() -> void
+MessagePack.Formatters.ReadOnlySequenceFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, System.Buffers.ReadOnlySequence<T> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TypeFormatter<T>
+MessagePack.Formatters.TypeFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T
+MessagePack.Formatters.TypeFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TypelessFormatter.TypelessFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableArrayFormatter<T>
+MessagePack.ImmutableCollection.ImmutableArrayFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableArray<T>
+MessagePack.ImmutableCollection.ImmutableArrayFormatter<T>.ImmutableArrayFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableArrayFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, System.Collections.Immutable.ImmutableArray<T> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.ImmutableCollection.ImmutableCollectionResolver
+MessagePack.ImmutableCollection.ImmutableCollectionResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.ImmutableCollection.ImmutableDictionaryFormatter<TKey, TValue>
+MessagePack.ImmutableCollection.ImmutableDictionaryFormatter<TKey, TValue>.ImmutableDictionaryFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableHashSetFormatter<T>
+MessagePack.ImmutableCollection.ImmutableHashSetFormatter<T>.ImmutableHashSetFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableListFormatter<T>
+MessagePack.ImmutableCollection.ImmutableListFormatter<T>.ImmutableListFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>
+MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>.Add(T value) -> void
+MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>.ImmutableQueueBuilder() -> void
+MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>.Q.get -> System.Collections.Immutable.ImmutableQueue<T>
+MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>.Q.set -> void
+MessagePack.ImmutableCollection.ImmutableQueueFormatter<T>
+MessagePack.ImmutableCollection.ImmutableQueueFormatter<T>.ImmutableQueueFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableSortedDictionaryFormatter<TKey, TValue>
+MessagePack.ImmutableCollection.ImmutableSortedDictionaryFormatter<TKey, TValue>.ImmutableSortedDictionaryFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableSortedSetFormatter<T>
+MessagePack.ImmutableCollection.ImmutableSortedSetFormatter<T>.ImmutableSortedSetFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableStackFormatter<T>
+MessagePack.ImmutableCollection.ImmutableStackFormatter<T>.ImmutableStackFormatter() -> void
+MessagePack.ImmutableCollection.InterfaceImmutableDictionaryFormatter<TKey, TValue>
+MessagePack.ImmutableCollection.InterfaceImmutableDictionaryFormatter<TKey, TValue>.InterfaceImmutableDictionaryFormatter() -> void
+MessagePack.ImmutableCollection.InterfaceImmutableListFormatter<T>
+MessagePack.ImmutableCollection.InterfaceImmutableListFormatter<T>.InterfaceImmutableListFormatter() -> void
+MessagePack.ImmutableCollection.InterfaceImmutableQueueFormatter<T>
+MessagePack.ImmutableCollection.InterfaceImmutableQueueFormatter<T>.InterfaceImmutableQueueFormatter() -> void
+MessagePack.ImmutableCollection.InterfaceImmutableSetFormatter<T>
+MessagePack.ImmutableCollection.InterfaceImmutableSetFormatter<T>.InterfaceImmutableSetFormatter() -> void
+MessagePack.ImmutableCollection.InterfaceImmutableStackFormatter<T>
+MessagePack.ImmutableCollection.InterfaceImmutableStackFormatter<T>.InterfaceImmutableStackFormatter() -> void
+MessagePack.Resolvers.ExpandoObjectResolver
+override MessagePack.ImmutableCollection.ImmutableDictionaryFormatter<TKey, TValue>.Add(System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Builder collection, int index, TKey key, TValue value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.ImmutableDictionaryFormatter<TKey, TValue>.Complete(System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Builder intermediateCollection) -> System.Collections.Immutable.ImmutableDictionary<TKey, TValue>
+override MessagePack.ImmutableCollection.ImmutableDictionaryFormatter<TKey, TValue>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Builder
+override MessagePack.ImmutableCollection.ImmutableDictionaryFormatter<TKey, TValue>.GetSourceEnumerator(System.Collections.Immutable.ImmutableDictionary<TKey, TValue> source) -> System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Enumerator
+override MessagePack.ImmutableCollection.ImmutableHashSetFormatter<T>.Add(System.Collections.Immutable.ImmutableHashSet<T>.Builder collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.ImmutableHashSetFormatter<T>.Complete(System.Collections.Immutable.ImmutableHashSet<T>.Builder intermediateCollection) -> System.Collections.Immutable.ImmutableHashSet<T>
+override MessagePack.ImmutableCollection.ImmutableHashSetFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableHashSet<T>.Builder
+override MessagePack.ImmutableCollection.ImmutableHashSetFormatter<T>.GetSourceEnumerator(System.Collections.Immutable.ImmutableHashSet<T> source) -> System.Collections.Immutable.ImmutableHashSet<T>.Enumerator
+override MessagePack.ImmutableCollection.ImmutableListFormatter<T>.Add(System.Collections.Immutable.ImmutableList<T>.Builder collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.ImmutableListFormatter<T>.Complete(System.Collections.Immutable.ImmutableList<T>.Builder intermediateCollection) -> System.Collections.Immutable.ImmutableList<T>
+override MessagePack.ImmutableCollection.ImmutableListFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableList<T>.Builder
+override MessagePack.ImmutableCollection.ImmutableListFormatter<T>.GetSourceEnumerator(System.Collections.Immutable.ImmutableList<T> source) -> System.Collections.Immutable.ImmutableList<T>.Enumerator
+override MessagePack.ImmutableCollection.ImmutableQueueFormatter<T>.Add(MessagePack.ImmutableCollection.ImmutableQueueBuilder<T> collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.ImmutableQueueFormatter<T>.Complete(MessagePack.ImmutableCollection.ImmutableQueueBuilder<T> intermediateCollection) -> System.Collections.Immutable.ImmutableQueue<T>
+override MessagePack.ImmutableCollection.ImmutableQueueFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>
+override MessagePack.ImmutableCollection.ImmutableSortedDictionaryFormatter<TKey, TValue>.Add(System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue>.Builder collection, int index, TKey key, TValue value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.ImmutableSortedDictionaryFormatter<TKey, TValue>.Complete(System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue>.Builder intermediateCollection) -> System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue>
+override MessagePack.ImmutableCollection.ImmutableSortedDictionaryFormatter<TKey, TValue>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue>.Builder
+override MessagePack.ImmutableCollection.ImmutableSortedDictionaryFormatter<TKey, TValue>.GetSourceEnumerator(System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue> source) -> System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue>.Enumerator
+override MessagePack.ImmutableCollection.ImmutableSortedSetFormatter<T>.Add(System.Collections.Immutable.ImmutableSortedSet<T>.Builder collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.ImmutableSortedSetFormatter<T>.Complete(System.Collections.Immutable.ImmutableSortedSet<T>.Builder intermediateCollection) -> System.Collections.Immutable.ImmutableSortedSet<T>
+override MessagePack.ImmutableCollection.ImmutableSortedSetFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableSortedSet<T>.Builder
+override MessagePack.ImmutableCollection.ImmutableSortedSetFormatter<T>.GetSourceEnumerator(System.Collections.Immutable.ImmutableSortedSet<T> source) -> System.Collections.Immutable.ImmutableSortedSet<T>.Enumerator
+override MessagePack.ImmutableCollection.ImmutableStackFormatter<T>.Add(T[] collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.ImmutableStackFormatter<T>.Complete(T[] intermediateCollection) -> System.Collections.Immutable.ImmutableStack<T>
+override MessagePack.ImmutableCollection.ImmutableStackFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> T[]
+override MessagePack.ImmutableCollection.InterfaceImmutableDictionaryFormatter<TKey, TValue>.Add(System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Builder collection, int index, TKey key, TValue value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.InterfaceImmutableDictionaryFormatter<TKey, TValue>.Complete(System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Builder intermediateCollection) -> System.Collections.Immutable.IImmutableDictionary<TKey, TValue>
+override MessagePack.ImmutableCollection.InterfaceImmutableDictionaryFormatter<TKey, TValue>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Builder
+override MessagePack.ImmutableCollection.InterfaceImmutableListFormatter<T>.Add(System.Collections.Immutable.ImmutableList<T>.Builder collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.InterfaceImmutableListFormatter<T>.Complete(System.Collections.Immutable.ImmutableList<T>.Builder intermediateCollection) -> System.Collections.Immutable.IImmutableList<T>
+override MessagePack.ImmutableCollection.InterfaceImmutableListFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableList<T>.Builder
+override MessagePack.ImmutableCollection.InterfaceImmutableQueueFormatter<T>.Add(MessagePack.ImmutableCollection.ImmutableQueueBuilder<T> collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.InterfaceImmutableQueueFormatter<T>.Complete(MessagePack.ImmutableCollection.ImmutableQueueBuilder<T> intermediateCollection) -> System.Collections.Immutable.IImmutableQueue<T>
+override MessagePack.ImmutableCollection.InterfaceImmutableQueueFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>
+override MessagePack.ImmutableCollection.InterfaceImmutableSetFormatter<T>.Add(System.Collections.Immutable.ImmutableHashSet<T>.Builder collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.InterfaceImmutableSetFormatter<T>.Complete(System.Collections.Immutable.ImmutableHashSet<T>.Builder intermediateCollection) -> System.Collections.Immutable.IImmutableSet<T>
+override MessagePack.ImmutableCollection.InterfaceImmutableSetFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableHashSet<T>.Builder
+override MessagePack.ImmutableCollection.InterfaceImmutableStackFormatter<T>.Add(T[] collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.InterfaceImmutableStackFormatter<T>.Complete(T[] intermediateCollection) -> System.Collections.Immutable.IImmutableStack<T>
+override MessagePack.ImmutableCollection.InterfaceImmutableStackFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> T[]
+static readonly MessagePack.Formatters.ByteMemoryFormatter.Instance -> MessagePack.Formatters.ByteMemoryFormatter
+static readonly MessagePack.Formatters.ByteReadOnlyMemoryFormatter.Instance -> MessagePack.Formatters.ByteReadOnlyMemoryFormatter
+static readonly MessagePack.Formatters.ByteReadOnlySequenceFormatter.Instance -> MessagePack.Formatters.ByteReadOnlySequenceFormatter
+static readonly MessagePack.Formatters.ExpandoObjectFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Dynamic.ExpandoObject>
+static readonly MessagePack.Formatters.NonGenericInterfaceCollectionFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Collections.ICollection>
+static readonly MessagePack.Formatters.NonGenericInterfaceEnumerableFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Collections.IEnumerable>
+static readonly MessagePack.Formatters.TypeFormatter<T>.Instance -> MessagePack.Formatters.IMessagePackFormatter<T>
+static readonly MessagePack.ImmutableCollection.ImmutableCollectionResolver.Instance -> MessagePack.ImmutableCollection.ImmutableCollectionResolver
+static readonly MessagePack.Resolvers.ExpandoObjectResolver.Instance -> MessagePack.IFormatterResolver
+static readonly MessagePack.Resolvers.ExpandoObjectResolver.Options -> MessagePack.MessagePackSerializerOptions
+virtual MessagePack.Formatters.PrimitiveObjectFormatter.DeserializeMap(ref MessagePack.MessagePackReader reader, int length, MessagePack.MessagePackSerializerOptions options) -> object
+MessagePack.ExtensionHeader.ExtensionHeader() -> void
+MessagePack.ExtensionResult.ExtensionResult() -> void
+MessagePack.FormatterNotRegisteredException.FormatterNotRegisteredException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) -> void
+MessagePack.MessagePackReader.MessagePackReader() -> void
+MessagePack.MessagePackSerializerOptions.SequencePool.get -> MessagePack.SequencePool
+MessagePack.MessagePackSerializerOptions.WithPool(MessagePack.SequencePool pool) -> MessagePack.MessagePackSerializerOptions
+MessagePack.MessagePackStreamReader.MessagePackStreamReader(System.IO.Stream stream, bool leaveOpen, MessagePack.SequencePool sequencePool) -> void
+MessagePack.MessagePackStreamReader.ReadArrayHeaderAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.ValueTask<int>
+MessagePack.MessagePackStreamReader.ReadMapHeaderAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.ValueTask<int>
+MessagePack.MessagePackWriter.MessagePackWriter() -> void
+MessagePack.SequencePool
+MessagePack.SequencePool.SequencePool() -> void
+MessagePack.SequencePool.SequencePool(int maxSize) -> void
+MessagePack.SequencePool.SequencePool(int maxSize, System.Buffers.ArrayPool<byte> arrayPool) -> void
+MessagePack.TinyJsonException.TinyJsonException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) -> void
+static MessagePack.Nil.operator !=(MessagePack.Nil left, MessagePack.Nil right) -> bool
+static MessagePack.Nil.operator ==(MessagePack.Nil left, MessagePack.Nil right) -> bool
+virtual MessagePack.MessagePackStreamReader.Dispose(bool disposing) -> void
+MessagePack.Formatters.GenericEnumerableFormatter<TElement, TCollection>
+MessagePack.Formatters.GenericEnumerableFormatter<TElement, TCollection>.GenericEnumerableFormatter() -> void
+MessagePack.Formatters.GenericReadOnlyDictionaryFormatter<TKey, TValue, TDictionary>
+MessagePack.Formatters.GenericReadOnlyDictionaryFormatter<TKey, TValue, TDictionary>.GenericReadOnlyDictionaryFormatter() -> void
diff --git a/src/MessagePack/netcoreapp3.1/PublicAPI.Unshipped.txt b/src/MessagePack/netcoreapp3.1/PublicAPI.Unshipped.txt
new file mode 100644
index 00000000..ba449cac
--- /dev/null
+++ b/src/MessagePack/netcoreapp3.1/PublicAPI.Unshipped.txt
@@ -0,0 +1,8 @@
+MessagePack.Formatters.StringInterningFormatter
+MessagePack.Formatters.StringInterningFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> string
+MessagePack.Formatters.StringInterningFormatter.Serialize(ref MessagePack.MessagePackWriter writer, string value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.StringInterningFormatter.StringInterningFormatter() -> void
+MessagePack.MessagePackSerializerOptions.CompressionMinLength.get -> int
+MessagePack.MessagePackSerializerOptions.SuggestedContiguousMemorySize.get -> int
+MessagePack.MessagePackSerializerOptions.WithCompressionMinLength(int compressionMinLength) -> MessagePack.MessagePackSerializerOptions
+MessagePack.MessagePackSerializerOptions.WithSuggestedContiguousMemorySize(int suggestedContiguousMemorySize) -> MessagePack.MessagePackSerializerOptions
diff --git a/src/MessagePack/netstandard2.0/PublicAPI.Shipped.txt b/src/MessagePack/netstandard2.0/PublicAPI.Shipped.txt
new file mode 100644
index 00000000..51002a49
--- /dev/null
+++ b/src/MessagePack/netstandard2.0/PublicAPI.Shipped.txt
@@ -0,0 +1,1174 @@
+MessagePack.ExtensionHeader
+MessagePack.ExtensionHeader.ExtensionHeader(sbyte typeCode, int length) -> void
+MessagePack.ExtensionHeader.ExtensionHeader(sbyte typeCode, uint length) -> void
+MessagePack.ExtensionHeader.Length.get -> uint
+MessagePack.ExtensionHeader.TypeCode.get -> sbyte
+MessagePack.ExtensionResult
+MessagePack.ExtensionResult.Data.get -> System.Buffers.ReadOnlySequence<byte>
+MessagePack.ExtensionResult.ExtensionResult(sbyte typeCode, System.Buffers.ReadOnlySequence<byte> data) -> void
+MessagePack.ExtensionResult.ExtensionResult(sbyte typeCode, System.Memory<byte> data) -> void
+MessagePack.ExtensionResult.Header.get -> MessagePack.ExtensionHeader
+MessagePack.ExtensionResult.TypeCode.get -> sbyte
+MessagePack.FormatterNotRegisteredException
+MessagePack.FormatterNotRegisteredException.FormatterNotRegisteredException(string message) -> void
+MessagePack.FormatterResolverExtensions
+MessagePack.Formatters.ArrayFormatter<T>
+MessagePack.Formatters.ArrayFormatter<T>.ArrayFormatter() -> void
+MessagePack.Formatters.ArrayFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T[]
+MessagePack.Formatters.ArrayFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ArraySegmentFormatter<T>
+MessagePack.Formatters.ArraySegmentFormatter<T>.ArraySegmentFormatter() -> void
+MessagePack.Formatters.ArraySegmentFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.ArraySegment<T>
+MessagePack.Formatters.ArraySegmentFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, System.ArraySegment<T> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.BigIntegerFormatter
+MessagePack.Formatters.BigIntegerFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Numerics.BigInteger
+MessagePack.Formatters.BigIntegerFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Numerics.BigInteger value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.BitArrayFormatter
+MessagePack.Formatters.BitArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Collections.BitArray
+MessagePack.Formatters.BitArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Collections.BitArray value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.BooleanArrayFormatter
+MessagePack.Formatters.BooleanArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> bool[]
+MessagePack.Formatters.BooleanArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, bool[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.BooleanFormatter
+MessagePack.Formatters.BooleanFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> bool
+MessagePack.Formatters.BooleanFormatter.Serialize(ref MessagePack.MessagePackWriter writer, bool value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ByteArrayFormatter
+MessagePack.Formatters.ByteArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> byte[]
+MessagePack.Formatters.ByteArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, byte[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ByteArraySegmentFormatter
+MessagePack.Formatters.ByteArraySegmentFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.ArraySegment<byte>
+MessagePack.Formatters.ByteArraySegmentFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.ArraySegment<byte> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ByteFormatter
+MessagePack.Formatters.ByteFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> byte
+MessagePack.Formatters.ByteFormatter.Serialize(ref MessagePack.MessagePackWriter writer, byte value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.CharArrayFormatter
+MessagePack.Formatters.CharArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> char[]
+MessagePack.Formatters.CharArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, char[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.CharFormatter
+MessagePack.Formatters.CharFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> char
+MessagePack.Formatters.CharFormatter.Serialize(ref MessagePack.MessagePackWriter writer, char value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.CollectionFormatterBase<TElement, TCollection>
+MessagePack.Formatters.CollectionFormatterBase<TElement, TCollection>.CollectionFormatterBase() -> void
+MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TCollection>
+MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TCollection>.CollectionFormatterBase() -> void
+MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TEnumerator, TCollection>
+MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TEnumerator, TCollection>.CollectionFormatterBase() -> void
+MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TEnumerator, TCollection>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> TCollection
+MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TEnumerator, TCollection>.Serialize(ref MessagePack.MessagePackWriter writer, TCollection value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ComplexFormatter
+MessagePack.Formatters.ComplexFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Numerics.Complex
+MessagePack.Formatters.ComplexFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Numerics.Complex value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ConcurrentBagFormatter<T>
+MessagePack.Formatters.ConcurrentBagFormatter<T>.ConcurrentBagFormatter() -> void
+MessagePack.Formatters.ConcurrentDictionaryFormatter<TKey, TValue>
+MessagePack.Formatters.ConcurrentDictionaryFormatter<TKey, TValue>.ConcurrentDictionaryFormatter() -> void
+MessagePack.Formatters.ConcurrentQueueFormatter<T>
+MessagePack.Formatters.ConcurrentQueueFormatter<T>.ConcurrentQueueFormatter() -> void
+MessagePack.Formatters.ConcurrentStackFormatter<T>
+MessagePack.Formatters.ConcurrentStackFormatter<T>.ConcurrentStackFormatter() -> void
+MessagePack.Formatters.DateTimeArrayFormatter
+MessagePack.Formatters.DateTimeArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.DateTime[]
+MessagePack.Formatters.DateTimeArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.DateTime[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.DateTimeFormatter
+MessagePack.Formatters.DateTimeFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.DateTime
+MessagePack.Formatters.DateTimeFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.DateTime value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.DateTimeOffsetFormatter
+MessagePack.Formatters.DateTimeOffsetFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.DateTimeOffset
+MessagePack.Formatters.DateTimeOffsetFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.DateTimeOffset value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.DecimalFormatter
+MessagePack.Formatters.DecimalFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> decimal
+MessagePack.Formatters.DecimalFormatter.Serialize(ref MessagePack.MessagePackWriter writer, decimal value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.DictionaryFormatter<TKey, TValue>
+MessagePack.Formatters.DictionaryFormatter<TKey, TValue>.DictionaryFormatter() -> void
+MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TDictionary>
+MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TDictionary>.DictionaryFormatterBase() -> void
+MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TDictionary>
+MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TDictionary>.DictionaryFormatterBase() -> void
+MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TEnumerator, TDictionary>
+MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TEnumerator, TDictionary>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> TDictionary
+MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TEnumerator, TDictionary>.DictionaryFormatterBase() -> void
+MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TEnumerator, TDictionary>.Serialize(ref MessagePack.MessagePackWriter writer, TDictionary value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.DoubleArrayFormatter
+MessagePack.Formatters.DoubleArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> double[]
+MessagePack.Formatters.DoubleArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, double[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.DoubleFormatter
+MessagePack.Formatters.DoubleFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> double
+MessagePack.Formatters.DoubleFormatter.Serialize(ref MessagePack.MessagePackWriter writer, double value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.DynamicObjectTypeFallbackFormatter
+MessagePack.Formatters.DynamicObjectTypeFallbackFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> object
+MessagePack.Formatters.DynamicObjectTypeFallbackFormatter.Serialize(ref MessagePack.MessagePackWriter writer, object value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.EnumAsStringFormatter<T>
+MessagePack.Formatters.EnumAsStringFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T
+MessagePack.Formatters.EnumAsStringFormatter<T>.EnumAsStringFormatter() -> void
+MessagePack.Formatters.EnumAsStringFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceByteBlockFormatter
+MessagePack.Formatters.ForceByteBlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> byte
+MessagePack.Formatters.ForceByteBlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, byte value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceInt16BlockArrayFormatter
+MessagePack.Formatters.ForceInt16BlockArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> short[]
+MessagePack.Formatters.ForceInt16BlockArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, short[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceInt16BlockFormatter
+MessagePack.Formatters.ForceInt16BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> short
+MessagePack.Formatters.ForceInt16BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, short value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceInt32BlockArrayFormatter
+MessagePack.Formatters.ForceInt32BlockArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> int[]
+MessagePack.Formatters.ForceInt32BlockArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, int[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceInt32BlockFormatter
+MessagePack.Formatters.ForceInt32BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> int
+MessagePack.Formatters.ForceInt32BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, int value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceInt64BlockArrayFormatter
+MessagePack.Formatters.ForceInt64BlockArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> long[]
+MessagePack.Formatters.ForceInt64BlockArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, long[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceInt64BlockFormatter
+MessagePack.Formatters.ForceInt64BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> long
+MessagePack.Formatters.ForceInt64BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, long value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceSByteBlockArrayFormatter
+MessagePack.Formatters.ForceSByteBlockArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> sbyte[]
+MessagePack.Formatters.ForceSByteBlockArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, sbyte[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceSByteBlockFormatter
+MessagePack.Formatters.ForceSByteBlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> sbyte
+MessagePack.Formatters.ForceSByteBlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, sbyte value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceUInt16BlockArrayFormatter
+MessagePack.Formatters.ForceUInt16BlockArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ushort[]
+MessagePack.Formatters.ForceUInt16BlockArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, ushort[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceUInt16BlockFormatter
+MessagePack.Formatters.ForceUInt16BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ushort
+MessagePack.Formatters.ForceUInt16BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, ushort value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceUInt32BlockArrayFormatter
+MessagePack.Formatters.ForceUInt32BlockArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> uint[]
+MessagePack.Formatters.ForceUInt32BlockArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, uint[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceUInt32BlockFormatter
+MessagePack.Formatters.ForceUInt32BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> uint
+MessagePack.Formatters.ForceUInt32BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, uint value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceUInt64BlockArrayFormatter
+MessagePack.Formatters.ForceUInt64BlockArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ulong[]
+MessagePack.Formatters.ForceUInt64BlockArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, ulong[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceUInt64BlockFormatter
+MessagePack.Formatters.ForceUInt64BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ulong
+MessagePack.Formatters.ForceUInt64BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, ulong value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.FourDimensionalArrayFormatter<T>
+MessagePack.Formatters.FourDimensionalArrayFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T[,,,]
+MessagePack.Formatters.FourDimensionalArrayFormatter<T>.FourDimensionalArrayFormatter() -> void
+MessagePack.Formatters.FourDimensionalArrayFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T[,,,] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.GenericCollectionFormatter<TElement, TCollection>
+MessagePack.Formatters.GenericCollectionFormatter<TElement, TCollection>.GenericCollectionFormatter() -> void
+MessagePack.Formatters.GenericDictionaryFormatter<TKey, TValue, TDictionary>
+MessagePack.Formatters.GenericDictionaryFormatter<TKey, TValue, TDictionary>.GenericDictionaryFormatter() -> void
+MessagePack.Formatters.GenericEnumFormatter<T>
+MessagePack.Formatters.GenericEnumFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T
+MessagePack.Formatters.GenericEnumFormatter<T>.GenericEnumFormatter() -> void
+MessagePack.Formatters.GenericEnumFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.GuidFormatter
+MessagePack.Formatters.GuidFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Guid
+MessagePack.Formatters.GuidFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Guid value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.HashSetFormatter<T>
+MessagePack.Formatters.HashSetFormatter<T>.HashSetFormatter() -> void
+MessagePack.Formatters.IMessagePackFormatter
+MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Formatters.IMessagePackFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T
+MessagePack.Formatters.IMessagePackFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.IgnoreFormatter<T>
+MessagePack.Formatters.IgnoreFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T
+MessagePack.Formatters.IgnoreFormatter<T>.IgnoreFormatter() -> void
+MessagePack.Formatters.IgnoreFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.Int16ArrayFormatter
+MessagePack.Formatters.Int16ArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> short[]
+MessagePack.Formatters.Int16ArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, short[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.Int16Formatter
+MessagePack.Formatters.Int16Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> short
+MessagePack.Formatters.Int16Formatter.Serialize(ref MessagePack.MessagePackWriter writer, short value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.Int32ArrayFormatter
+MessagePack.Formatters.Int32ArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> int[]
+MessagePack.Formatters.Int32ArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, int[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.Int32Formatter
+MessagePack.Formatters.Int32Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> int
+MessagePack.Formatters.Int32Formatter.Serialize(ref MessagePack.MessagePackWriter writer, int value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.Int64ArrayFormatter
+MessagePack.Formatters.Int64ArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> long[]
+MessagePack.Formatters.Int64ArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, long[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.Int64Formatter
+MessagePack.Formatters.Int64Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> long
+MessagePack.Formatters.Int64Formatter.Serialize(ref MessagePack.MessagePackWriter writer, long value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.InterfaceCollectionFormatter<T>
+MessagePack.Formatters.InterfaceCollectionFormatter<T>.InterfaceCollectionFormatter() -> void
+MessagePack.Formatters.InterfaceDictionaryFormatter<TKey, TValue>
+MessagePack.Formatters.InterfaceDictionaryFormatter<TKey, TValue>.InterfaceDictionaryFormatter() -> void
+MessagePack.Formatters.InterfaceEnumerableFormatter<T>
+MessagePack.Formatters.InterfaceEnumerableFormatter<T>.InterfaceEnumerableFormatter() -> void
+MessagePack.Formatters.InterfaceGroupingFormatter<TKey, TElement>
+MessagePack.Formatters.InterfaceGroupingFormatter<TKey, TElement>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Linq.IGrouping<TKey, TElement>
+MessagePack.Formatters.InterfaceGroupingFormatter<TKey, TElement>.InterfaceGroupingFormatter() -> void
+MessagePack.Formatters.InterfaceGroupingFormatter<TKey, TElement>.Serialize(ref MessagePack.MessagePackWriter writer, System.Linq.IGrouping<TKey, TElement> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.InterfaceListFormatter<T>
+MessagePack.Formatters.InterfaceListFormatter<T>.InterfaceListFormatter() -> void
+MessagePack.Formatters.InterfaceLookupFormatter<TKey, TElement>
+MessagePack.Formatters.InterfaceLookupFormatter<TKey, TElement>.InterfaceLookupFormatter() -> void
+MessagePack.Formatters.InterfaceReadOnlyCollectionFormatter<T>
+MessagePack.Formatters.InterfaceReadOnlyCollectionFormatter<T>.InterfaceReadOnlyCollectionFormatter() -> void
+MessagePack.Formatters.InterfaceReadOnlyDictionaryFormatter<TKey, TValue>
+MessagePack.Formatters.InterfaceReadOnlyDictionaryFormatter<TKey, TValue>.InterfaceReadOnlyDictionaryFormatter() -> void
+MessagePack.Formatters.InterfaceReadOnlyListFormatter<T>
+MessagePack.Formatters.InterfaceReadOnlyListFormatter<T>.InterfaceReadOnlyListFormatter() -> void
+MessagePack.Formatters.InterfaceSetFormatter<T>
+MessagePack.Formatters.InterfaceSetFormatter<T>.InterfaceSetFormatter() -> void
+MessagePack.Formatters.KeyValuePairFormatter<TKey, TValue>
+MessagePack.Formatters.KeyValuePairFormatter<TKey, TValue>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Generic.KeyValuePair<TKey, TValue>
+MessagePack.Formatters.KeyValuePairFormatter<TKey, TValue>.KeyValuePairFormatter() -> void
+MessagePack.Formatters.KeyValuePairFormatter<TKey, TValue>.Serialize(ref MessagePack.MessagePackWriter writer, System.Collections.Generic.KeyValuePair<TKey, TValue> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.LazyFormatter<T>
+MessagePack.Formatters.LazyFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Lazy<T>
+MessagePack.Formatters.LazyFormatter<T>.LazyFormatter() -> void
+MessagePack.Formatters.LazyFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, System.Lazy<T> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.LinkedListFormatter<T>
+MessagePack.Formatters.LinkedListFormatter<T>.LinkedListFormatter() -> void
+MessagePack.Formatters.ListFormatter<T>
+MessagePack.Formatters.ListFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Generic.List<T>
+MessagePack.Formatters.ListFormatter<T>.ListFormatter() -> void
+MessagePack.Formatters.ListFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, System.Collections.Generic.List<T> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NativeDateTimeArrayFormatter
+MessagePack.Formatters.NativeDateTimeArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.DateTime[]
+MessagePack.Formatters.NativeDateTimeArrayFormatter.NativeDateTimeArrayFormatter() -> void
+MessagePack.Formatters.NativeDateTimeArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.DateTime[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NativeDateTimeFormatter
+MessagePack.Formatters.NativeDateTimeFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.DateTime
+MessagePack.Formatters.NativeDateTimeFormatter.NativeDateTimeFormatter() -> void
+MessagePack.Formatters.NativeDateTimeFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.DateTime value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NativeDecimalFormatter
+MessagePack.Formatters.NativeDecimalFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> decimal
+MessagePack.Formatters.NativeDecimalFormatter.Serialize(ref MessagePack.MessagePackWriter writer, decimal value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NativeGuidFormatter
+MessagePack.Formatters.NativeGuidFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Guid
+MessagePack.Formatters.NativeGuidFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Guid value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NilFormatter
+MessagePack.Formatters.NilFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> MessagePack.Nil
+MessagePack.Formatters.NilFormatter.Serialize(ref MessagePack.MessagePackWriter writer, MessagePack.Nil value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NonGenericDictionaryFormatter<T>
+MessagePack.Formatters.NonGenericDictionaryFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T
+MessagePack.Formatters.NonGenericDictionaryFormatter<T>.NonGenericDictionaryFormatter() -> void
+MessagePack.Formatters.NonGenericDictionaryFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NonGenericInterfaceDictionaryFormatter
+MessagePack.Formatters.NonGenericInterfaceDictionaryFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Collections.IDictionary
+MessagePack.Formatters.NonGenericInterfaceDictionaryFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Collections.IDictionary value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NonGenericInterfaceListFormatter
+MessagePack.Formatters.NonGenericInterfaceListFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Collections.IList
+MessagePack.Formatters.NonGenericInterfaceListFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Collections.IList value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NonGenericListFormatter<T>
+MessagePack.Formatters.NonGenericListFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T
+MessagePack.Formatters.NonGenericListFormatter<T>.NonGenericListFormatter() -> void
+MessagePack.Formatters.NonGenericListFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableBooleanFormatter
+MessagePack.Formatters.NullableBooleanFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> bool?
+MessagePack.Formatters.NullableBooleanFormatter.Serialize(ref MessagePack.MessagePackWriter writer, bool? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableByteFormatter
+MessagePack.Formatters.NullableByteFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> byte?
+MessagePack.Formatters.NullableByteFormatter.Serialize(ref MessagePack.MessagePackWriter writer, byte? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableCharFormatter
+MessagePack.Formatters.NullableCharFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> char?
+MessagePack.Formatters.NullableCharFormatter.Serialize(ref MessagePack.MessagePackWriter writer, char? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableDateTimeFormatter
+MessagePack.Formatters.NullableDateTimeFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.DateTime?
+MessagePack.Formatters.NullableDateTimeFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.DateTime? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableDoubleFormatter
+MessagePack.Formatters.NullableDoubleFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> double?
+MessagePack.Formatters.NullableDoubleFormatter.Serialize(ref MessagePack.MessagePackWriter writer, double? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableForceByteBlockFormatter
+MessagePack.Formatters.NullableForceByteBlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> byte?
+MessagePack.Formatters.NullableForceByteBlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, byte? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableForceInt16BlockFormatter
+MessagePack.Formatters.NullableForceInt16BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> short?
+MessagePack.Formatters.NullableForceInt16BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, short? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableForceInt32BlockFormatter
+MessagePack.Formatters.NullableForceInt32BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> int?
+MessagePack.Formatters.NullableForceInt32BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, int? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableForceInt64BlockFormatter
+MessagePack.Formatters.NullableForceInt64BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> long?
+MessagePack.Formatters.NullableForceInt64BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, long? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableForceSByteBlockFormatter
+MessagePack.Formatters.NullableForceSByteBlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> sbyte?
+MessagePack.Formatters.NullableForceSByteBlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, sbyte? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableForceUInt16BlockFormatter
+MessagePack.Formatters.NullableForceUInt16BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ushort?
+MessagePack.Formatters.NullableForceUInt16BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, ushort? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableForceUInt32BlockFormatter
+MessagePack.Formatters.NullableForceUInt32BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> uint?
+MessagePack.Formatters.NullableForceUInt32BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, uint? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableForceUInt64BlockFormatter
+MessagePack.Formatters.NullableForceUInt64BlockFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ulong?
+MessagePack.Formatters.NullableForceUInt64BlockFormatter.Serialize(ref MessagePack.MessagePackWriter writer, ulong? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableFormatter<T>
+MessagePack.Formatters.NullableFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T?
+MessagePack.Formatters.NullableFormatter<T>.NullableFormatter() -> void
+MessagePack.Formatters.NullableFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableInt16Formatter
+MessagePack.Formatters.NullableInt16Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> short?
+MessagePack.Formatters.NullableInt16Formatter.Serialize(ref MessagePack.MessagePackWriter writer, short? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableInt32Formatter
+MessagePack.Formatters.NullableInt32Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> int?
+MessagePack.Formatters.NullableInt32Formatter.Serialize(ref MessagePack.MessagePackWriter writer, int? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableInt64Formatter
+MessagePack.Formatters.NullableInt64Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> long?
+MessagePack.Formatters.NullableInt64Formatter.Serialize(ref MessagePack.MessagePackWriter writer, long? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableNilFormatter
+MessagePack.Formatters.NullableNilFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> MessagePack.Nil?
+MessagePack.Formatters.NullableNilFormatter.Serialize(ref MessagePack.MessagePackWriter writer, MessagePack.Nil? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableSByteFormatter
+MessagePack.Formatters.NullableSByteFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> sbyte?
+MessagePack.Formatters.NullableSByteFormatter.Serialize(ref MessagePack.MessagePackWriter writer, sbyte? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableSingleFormatter
+MessagePack.Formatters.NullableSingleFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> float?
+MessagePack.Formatters.NullableSingleFormatter.Serialize(ref MessagePack.MessagePackWriter writer, float? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableStringArrayFormatter
+MessagePack.Formatters.NullableStringArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> string[]
+MessagePack.Formatters.NullableStringArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, string[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableStringFormatter
+MessagePack.Formatters.NullableStringFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> string
+MessagePack.Formatters.NullableStringFormatter.Serialize(ref MessagePack.MessagePackWriter writer, string value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableUInt16Formatter
+MessagePack.Formatters.NullableUInt16Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ushort?
+MessagePack.Formatters.NullableUInt16Formatter.Serialize(ref MessagePack.MessagePackWriter writer, ushort? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableUInt32Formatter
+MessagePack.Formatters.NullableUInt32Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> uint?
+MessagePack.Formatters.NullableUInt32Formatter.Serialize(ref MessagePack.MessagePackWriter writer, uint? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NullableUInt64Formatter
+MessagePack.Formatters.NullableUInt64Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ulong?
+MessagePack.Formatters.NullableUInt64Formatter.Serialize(ref MessagePack.MessagePackWriter writer, ulong? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ObservableCollectionFormatter<T>
+MessagePack.Formatters.ObservableCollectionFormatter<T>.ObservableCollectionFormatter() -> void
+MessagePack.Formatters.PrimitiveObjectFormatter
+MessagePack.Formatters.PrimitiveObjectFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> object
+MessagePack.Formatters.PrimitiveObjectFormatter.Serialize(ref MessagePack.MessagePackWriter writer, object value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.QueueFormatter<T>
+MessagePack.Formatters.QueueFormatter<T>.QueueFormatter() -> void
+MessagePack.Formatters.ReadOnlyCollectionFormatter<T>
+MessagePack.Formatters.ReadOnlyCollectionFormatter<T>.ReadOnlyCollectionFormatter() -> void
+MessagePack.Formatters.ReadOnlyDictionaryFormatter<TKey, TValue>
+MessagePack.Formatters.ReadOnlyDictionaryFormatter<TKey, TValue>.ReadOnlyDictionaryFormatter() -> void
+MessagePack.Formatters.ReadOnlyObservableCollectionFormatter<T>
+MessagePack.Formatters.ReadOnlyObservableCollectionFormatter<T>.ReadOnlyObservableCollectionFormatter() -> void
+MessagePack.Formatters.SByteArrayFormatter
+MessagePack.Formatters.SByteArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> sbyte[]
+MessagePack.Formatters.SByteArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, sbyte[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.SByteFormatter
+MessagePack.Formatters.SByteFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> sbyte
+MessagePack.Formatters.SByteFormatter.Serialize(ref MessagePack.MessagePackWriter writer, sbyte value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.SingleArrayFormatter
+MessagePack.Formatters.SingleArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> float[]
+MessagePack.Formatters.SingleArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, float[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.SingleFormatter
+MessagePack.Formatters.SingleFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> float
+MessagePack.Formatters.SingleFormatter.Serialize(ref MessagePack.MessagePackWriter writer, float value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.SortedDictionaryFormatter<TKey, TValue>
+MessagePack.Formatters.SortedDictionaryFormatter<TKey, TValue>.SortedDictionaryFormatter() -> void
+MessagePack.Formatters.SortedListFormatter<TKey, TValue>
+MessagePack.Formatters.SortedListFormatter<TKey, TValue>.SortedListFormatter() -> void
+MessagePack.Formatters.StackFormatter<T>
+MessagePack.Formatters.StackFormatter<T>.StackFormatter() -> void
+MessagePack.Formatters.StaticNullableFormatter<T>
+MessagePack.Formatters.StaticNullableFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T?
+MessagePack.Formatters.StaticNullableFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T? value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.StaticNullableFormatter<T>.StaticNullableFormatter(MessagePack.Formatters.IMessagePackFormatter<T> underlyingFormatter) -> void
+MessagePack.Formatters.StringBuilderFormatter
+MessagePack.Formatters.StringBuilderFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Text.StringBuilder
+MessagePack.Formatters.StringBuilderFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Text.StringBuilder value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ThreeDimensionalArrayFormatter<T>
+MessagePack.Formatters.ThreeDimensionalArrayFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T[,,]
+MessagePack.Formatters.ThreeDimensionalArrayFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T[,,] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ThreeDimensionalArrayFormatter<T>.ThreeDimensionalArrayFormatter() -> void
+MessagePack.Formatters.TimeSpanFormatter
+MessagePack.Formatters.TimeSpanFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.TimeSpan
+MessagePack.Formatters.TimeSpanFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.TimeSpan value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6, T7, TRest>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6, T7, TRest>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Tuple<T1, T2, T3, T4, T5, T6, T7, TRest>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6, T7, TRest>.Serialize(ref MessagePack.MessagePackWriter writer, System.Tuple<T1, T2, T3, T4, T5, T6, T7, TRest> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6, T7, TRest>.TupleFormatter() -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6, T7>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6, T7>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Tuple<T1, T2, T3, T4, T5, T6, T7>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6, T7>.Serialize(ref MessagePack.MessagePackWriter writer, System.Tuple<T1, T2, T3, T4, T5, T6, T7> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6, T7>.TupleFormatter() -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Tuple<T1, T2, T3, T4, T5, T6>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6>.Serialize(ref MessagePack.MessagePackWriter writer, System.Tuple<T1, T2, T3, T4, T5, T6> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5, T6>.TupleFormatter() -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Tuple<T1, T2, T3, T4, T5>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5>.Serialize(ref MessagePack.MessagePackWriter writer, System.Tuple<T1, T2, T3, T4, T5> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4, T5>.TupleFormatter() -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Tuple<T1, T2, T3, T4>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4>.Serialize(ref MessagePack.MessagePackWriter writer, System.Tuple<T1, T2, T3, T4> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3, T4>.TupleFormatter() -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Tuple<T1, T2, T3>
+MessagePack.Formatters.TupleFormatter<T1, T2, T3>.Serialize(ref MessagePack.MessagePackWriter writer, System.Tuple<T1, T2, T3> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TupleFormatter<T1, T2, T3>.TupleFormatter() -> void
+MessagePack.Formatters.TupleFormatter<T1, T2>
+MessagePack.Formatters.TupleFormatter<T1, T2>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Tuple<T1, T2>
+MessagePack.Formatters.TupleFormatter<T1, T2>.Serialize(ref MessagePack.MessagePackWriter writer, System.Tuple<T1, T2> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TupleFormatter<T1, T2>.TupleFormatter() -> void
+MessagePack.Formatters.TupleFormatter<T1>
+MessagePack.Formatters.TupleFormatter<T1>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Tuple<T1>
+MessagePack.Formatters.TupleFormatter<T1>.Serialize(ref MessagePack.MessagePackWriter writer, System.Tuple<T1> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TupleFormatter<T1>.TupleFormatter() -> void
+MessagePack.Formatters.TwoDimensionalArrayFormatter<T>
+MessagePack.Formatters.TwoDimensionalArrayFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T[,]
+MessagePack.Formatters.TwoDimensionalArrayFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T[,] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TwoDimensionalArrayFormatter<T>.TwoDimensionalArrayFormatter() -> void
+MessagePack.Formatters.TypelessFormatter
+MessagePack.Formatters.TypelessFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> object
+MessagePack.Formatters.TypelessFormatter.Serialize(ref MessagePack.MessagePackWriter writer, object value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.UInt16ArrayFormatter
+MessagePack.Formatters.UInt16ArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ushort[]
+MessagePack.Formatters.UInt16ArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, ushort[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.UInt16Formatter
+MessagePack.Formatters.UInt16Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ushort
+MessagePack.Formatters.UInt16Formatter.Serialize(ref MessagePack.MessagePackWriter writer, ushort value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.UInt32ArrayFormatter
+MessagePack.Formatters.UInt32ArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> uint[]
+MessagePack.Formatters.UInt32ArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, uint[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.UInt32Formatter
+MessagePack.Formatters.UInt32Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> uint
+MessagePack.Formatters.UInt32Formatter.Serialize(ref MessagePack.MessagePackWriter writer, uint value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.UInt64ArrayFormatter
+MessagePack.Formatters.UInt64ArrayFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ulong[]
+MessagePack.Formatters.UInt64ArrayFormatter.Serialize(ref MessagePack.MessagePackWriter writer, ulong[] value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.UInt64Formatter
+MessagePack.Formatters.UInt64Formatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> ulong
+MessagePack.Formatters.UInt64Formatter.Serialize(ref MessagePack.MessagePackWriter writer, ulong value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.UriFormatter
+MessagePack.Formatters.UriFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Uri
+MessagePack.Formatters.UriFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Uri value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6, T7, TRest>
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6, T7, TRest>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6, T7, TRest>.Serialize(ref MessagePack.MessagePackWriter writer, System.ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6, T7, TRest>.ValueTupleFormatter() -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6, T7>
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6, T7>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> (T1, T2, T3, T4, T5, T6, T7)
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6, T7>.Serialize(ref MessagePack.MessagePackWriter writer, (T1, T2, T3, T4, T5, T6, T7) value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6, T7>.ValueTupleFormatter() -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6>
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> (T1, T2, T3, T4, T5, T6)
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6>.Serialize(ref MessagePack.MessagePackWriter writer, (T1, T2, T3, T4, T5, T6) value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5, T6>.ValueTupleFormatter() -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5>
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> (T1, T2, T3, T4, T5)
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5>.Serialize(ref MessagePack.MessagePackWriter writer, (T1, T2, T3, T4, T5) value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4, T5>.ValueTupleFormatter() -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4>
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> (T1, T2, T3, T4)
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4>.Serialize(ref MessagePack.MessagePackWriter writer, (T1, T2, T3, T4) value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3, T4>.ValueTupleFormatter() -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3>
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> (T1, T2, T3)
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3>.Serialize(ref MessagePack.MessagePackWriter writer, (T1, T2, T3) value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2, T3>.ValueTupleFormatter() -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2>
+MessagePack.Formatters.ValueTupleFormatter<T1, T2>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> (T1, T2)
+MessagePack.Formatters.ValueTupleFormatter<T1, T2>.Serialize(ref MessagePack.MessagePackWriter writer, (T1, T2) value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ValueTupleFormatter<T1, T2>.ValueTupleFormatter() -> void
+MessagePack.Formatters.ValueTupleFormatter<T1>
+MessagePack.Formatters.ValueTupleFormatter<T1>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.ValueTuple<T1>
+MessagePack.Formatters.ValueTupleFormatter<T1>.Serialize(ref MessagePack.MessagePackWriter writer, System.ValueTuple<T1> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ValueTupleFormatter<T1>.ValueTupleFormatter() -> void
+MessagePack.Formatters.VersionFormatter
+MessagePack.Formatters.VersionFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Version
+MessagePack.Formatters.VersionFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Version value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.IFormatterResolver
+MessagePack.IFormatterResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Internal.AutomataDictionary
+MessagePack.Internal.AutomataDictionary.Add(string str, int value) -> void
+MessagePack.Internal.AutomataDictionary.AutomataDictionary() -> void
+MessagePack.Internal.AutomataDictionary.EmitMatch(System.Reflection.Emit.ILGenerator il, System.Reflection.Emit.LocalBuilder bytesSpan, System.Reflection.Emit.LocalBuilder key, System.Action<System.Collections.Generic.KeyValuePair<string, int>> onFound, System.Action onNotFound) -> void
+MessagePack.Internal.AutomataDictionary.GetEnumerator() -> System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<string, int>>
+MessagePack.Internal.AutomataDictionary.TryGetValue(System.ReadOnlySpan<byte> bytes, out int value) -> bool
+MessagePack.Internal.AutomataDictionary.TryGetValue(in System.Buffers.ReadOnlySequence<byte> bytes, out int value) -> bool
+MessagePack.Internal.AutomataKeyGen
+MessagePack.Internal.ByteArrayStringHashTable
+MessagePack.Internal.ByteArrayStringHashTable.Add(byte[] key, int value) -> void
+MessagePack.Internal.ByteArrayStringHashTable.Add(string key, int value) -> void
+MessagePack.Internal.ByteArrayStringHashTable.ByteArrayStringHashTable(int capacity) -> void
+MessagePack.Internal.ByteArrayStringHashTable.ByteArrayStringHashTable(int capacity, float loadFactor) -> void
+MessagePack.Internal.ByteArrayStringHashTable.GetEnumerator() -> System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<string, int>>
+MessagePack.Internal.ByteArrayStringHashTable.TryGetValue(System.ReadOnlySpan<byte> key, out int value) -> bool
+MessagePack.Internal.ByteArrayStringHashTable.TryGetValue(in System.Buffers.ReadOnlySequence<byte> key, out int value) -> bool
+MessagePack.Internal.CodeGenHelpers
+MessagePack.Internal.RuntimeTypeHandleEqualityComparer
+MessagePack.Internal.RuntimeTypeHandleEqualityComparer.Equals(System.RuntimeTypeHandle x, System.RuntimeTypeHandle y) -> bool
+MessagePack.Internal.RuntimeTypeHandleEqualityComparer.GetHashCode(System.RuntimeTypeHandle obj) -> int
+MessagePack.Internal.UnsafeMemory
+MessagePack.Internal.UnsafeMemory32
+MessagePack.Internal.UnsafeMemory64
+MessagePack.MessagePackCode
+MessagePack.MessagePackCompression
+MessagePack.MessagePackCompression.Lz4Block = 1 -> MessagePack.MessagePackCompression
+MessagePack.MessagePackCompression.Lz4BlockArray = 2 -> MessagePack.MessagePackCompression
+MessagePack.MessagePackCompression.None = 0 -> MessagePack.MessagePackCompression
+MessagePack.MessagePackRange
+MessagePack.MessagePackReader
+MessagePack.MessagePackReader.CancellationToken.get -> System.Threading.CancellationToken
+MessagePack.MessagePackReader.CancellationToken.set -> void
+MessagePack.MessagePackReader.Clone(in System.Buffers.ReadOnlySequence<byte> readOnlySequence) -> MessagePack.MessagePackReader
+MessagePack.MessagePackReader.Consumed.get -> long
+MessagePack.MessagePackReader.CreatePeekReader() -> MessagePack.MessagePackReader
+MessagePack.MessagePackReader.End.get -> bool
+MessagePack.MessagePackReader.IsNil.get -> bool
+MessagePack.MessagePackReader.MessagePackReader(System.ReadOnlyMemory<byte> memory) -> void
+MessagePack.MessagePackReader.MessagePackReader(in System.Buffers.ReadOnlySequence<byte> readOnlySequence) -> void
+MessagePack.MessagePackReader.NextCode.get -> byte
+MessagePack.MessagePackReader.NextMessagePackType.get -> MessagePack.MessagePackType
+MessagePack.MessagePackReader.Position.get -> System.SequencePosition
+MessagePack.MessagePackReader.ReadArrayHeader() -> int
+MessagePack.MessagePackReader.ReadBoolean() -> bool
+MessagePack.MessagePackReader.ReadByte() -> byte
+MessagePack.MessagePackReader.ReadBytes() -> System.Buffers.ReadOnlySequence<byte>?
+MessagePack.MessagePackReader.ReadChar() -> char
+MessagePack.MessagePackReader.ReadDateTime() -> System.DateTime
+MessagePack.MessagePackReader.ReadDouble() -> double
+MessagePack.MessagePackReader.ReadExtensionFormat() -> MessagePack.ExtensionResult
+MessagePack.MessagePackReader.ReadExtensionFormatHeader() -> MessagePack.ExtensionHeader
+MessagePack.MessagePackReader.ReadInt16() -> short
+MessagePack.MessagePackReader.ReadInt32() -> int
+MessagePack.MessagePackReader.ReadInt64() -> long
+MessagePack.MessagePackReader.ReadMapHeader() -> int
+MessagePack.MessagePackReader.ReadNil() -> MessagePack.Nil
+MessagePack.MessagePackReader.ReadRaw() -> System.Buffers.ReadOnlySequence<byte>
+MessagePack.MessagePackReader.ReadRaw(long length) -> System.Buffers.ReadOnlySequence<byte>
+MessagePack.MessagePackReader.ReadSByte() -> sbyte
+MessagePack.MessagePackReader.ReadSingle() -> float
+MessagePack.MessagePackReader.ReadString() -> string
+MessagePack.MessagePackReader.ReadStringSequence() -> System.Buffers.ReadOnlySequence<byte>?
+MessagePack.MessagePackReader.ReadUInt16() -> ushort
+MessagePack.MessagePackReader.ReadUInt32() -> uint
+MessagePack.MessagePackReader.ReadUInt64() -> ulong
+MessagePack.MessagePackReader.Sequence.get -> System.Buffers.ReadOnlySequence<byte>
+MessagePack.MessagePackReader.Skip() -> void
+MessagePack.MessagePackReader.TryReadNil() -> bool
+MessagePack.MessagePackReader.TryReadStringSpan(out System.ReadOnlySpan<byte> span) -> bool
+MessagePack.MessagePackSerializationException
+MessagePack.MessagePackSerializationException.MessagePackSerializationException() -> void
+MessagePack.MessagePackSerializationException.MessagePackSerializationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) -> void
+MessagePack.MessagePackSerializationException.MessagePackSerializationException(string message) -> void
+MessagePack.MessagePackSerializationException.MessagePackSerializationException(string message, System.Exception inner) -> void
+MessagePack.MessagePackSerializer
+MessagePack.MessagePackSerializer.Typeless
+MessagePack.MessagePackSerializerOptions
+MessagePack.MessagePackSerializerOptions.AllowAssemblyVersionMismatch.get -> bool
+MessagePack.MessagePackSerializerOptions.Compression.get -> MessagePack.MessagePackCompression
+MessagePack.MessagePackSerializerOptions.MessagePackSerializerOptions(MessagePack.IFormatterResolver resolver) -> void
+MessagePack.MessagePackSerializerOptions.MessagePackSerializerOptions(MessagePack.MessagePackSerializerOptions copyFrom) -> void
+MessagePack.MessagePackSerializerOptions.OldSpec.get -> bool?
+MessagePack.MessagePackSerializerOptions.OmitAssemblyVersion.get -> bool
+MessagePack.MessagePackSerializerOptions.Resolver.get -> MessagePack.IFormatterResolver
+MessagePack.MessagePackSerializerOptions.WithAllowAssemblyVersionMismatch(bool allowAssemblyVersionMismatch) -> MessagePack.MessagePackSerializerOptions
+MessagePack.MessagePackSerializerOptions.WithCompression(MessagePack.MessagePackCompression compression) -> MessagePack.MessagePackSerializerOptions
+MessagePack.MessagePackSerializerOptions.WithOldSpec(bool? oldSpec = true) -> MessagePack.MessagePackSerializerOptions
+MessagePack.MessagePackSerializerOptions.WithOmitAssemblyVersion(bool omitAssemblyVersion) -> MessagePack.MessagePackSerializerOptions
+MessagePack.MessagePackSerializerOptions.WithResolver(MessagePack.IFormatterResolver resolver) -> MessagePack.MessagePackSerializerOptions
+MessagePack.MessagePackStreamReader
+MessagePack.MessagePackStreamReader.Dispose() -> void
+MessagePack.MessagePackStreamReader.MessagePackStreamReader(System.IO.Stream stream) -> void
+MessagePack.MessagePackStreamReader.ReadAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.ValueTask<System.Buffers.ReadOnlySequence<byte>?>
+MessagePack.MessagePackStreamReader.RemainingBytes.get -> System.Buffers.ReadOnlySequence<byte>
+MessagePack.MessagePackType
+MessagePack.MessagePackType.Array = 7 -> MessagePack.MessagePackType
+MessagePack.MessagePackType.Binary = 6 -> MessagePack.MessagePackType
+MessagePack.MessagePackType.Boolean = 3 -> MessagePack.MessagePackType
+MessagePack.MessagePackType.Extension = 9 -> MessagePack.MessagePackType
+MessagePack.MessagePackType.Float = 4 -> MessagePack.MessagePackType
+MessagePack.MessagePackType.Integer = 1 -> MessagePack.MessagePackType
+MessagePack.MessagePackType.Map = 8 -> MessagePack.MessagePackType
+MessagePack.MessagePackType.Nil = 2 -> MessagePack.MessagePackType
+MessagePack.MessagePackType.String = 5 -> MessagePack.MessagePackType
+MessagePack.MessagePackType.Unknown = 0 -> MessagePack.MessagePackType
+MessagePack.MessagePackWriter
+MessagePack.MessagePackWriter.Advance(int length) -> void
+MessagePack.MessagePackWriter.CancellationToken.get -> System.Threading.CancellationToken
+MessagePack.MessagePackWriter.CancellationToken.set -> void
+MessagePack.MessagePackWriter.Clone(System.Buffers.IBufferWriter<byte> writer) -> MessagePack.MessagePackWriter
+MessagePack.MessagePackWriter.Flush() -> void
+MessagePack.MessagePackWriter.GetSpan(int length) -> System.Span<byte>
+MessagePack.MessagePackWriter.MessagePackWriter(System.Buffers.IBufferWriter<byte> writer) -> void
+MessagePack.MessagePackWriter.OldSpec.get -> bool
+MessagePack.MessagePackWriter.OldSpec.set -> void
+MessagePack.MessagePackWriter.Write(System.DateTime dateTime) -> void
+MessagePack.MessagePackWriter.Write(System.ReadOnlySpan<byte> src) -> void
+MessagePack.MessagePackWriter.Write(System.ReadOnlySpan<char> value) -> void
+MessagePack.MessagePackWriter.Write(bool value) -> void
+MessagePack.MessagePackWriter.Write(byte value) -> void
+MessagePack.MessagePackWriter.Write(byte[] src) -> void
+MessagePack.MessagePackWriter.Write(char value) -> void
+MessagePack.MessagePackWriter.Write(double value) -> void
+MessagePack.MessagePackWriter.Write(float value) -> void
+MessagePack.MessagePackWriter.Write(in System.Buffers.ReadOnlySequence<byte> src) -> void
+MessagePack.MessagePackWriter.Write(int value) -> void
+MessagePack.MessagePackWriter.Write(long value) -> void
+MessagePack.MessagePackWriter.Write(sbyte value) -> void
+MessagePack.MessagePackWriter.Write(short value) -> void
+MessagePack.MessagePackWriter.Write(string value) -> void
+MessagePack.MessagePackWriter.Write(uint value) -> void
+MessagePack.MessagePackWriter.Write(ulong value) -> void
+MessagePack.MessagePackWriter.Write(ushort value) -> void
+MessagePack.MessagePackWriter.WriteArrayHeader(int count) -> void
+MessagePack.MessagePackWriter.WriteArrayHeader(uint count) -> void
+MessagePack.MessagePackWriter.WriteExtensionFormat(MessagePack.ExtensionResult extensionData) -> void
+MessagePack.MessagePackWriter.WriteExtensionFormatHeader(MessagePack.ExtensionHeader extensionHeader) -> void
+MessagePack.MessagePackWriter.WriteInt16(short value) -> void
+MessagePack.MessagePackWriter.WriteInt32(int value) -> void
+MessagePack.MessagePackWriter.WriteInt64(long value) -> void
+MessagePack.MessagePackWriter.WriteInt8(sbyte value) -> void
+MessagePack.MessagePackWriter.WriteMapHeader(int count) -> void
+MessagePack.MessagePackWriter.WriteMapHeader(uint count) -> void
+MessagePack.MessagePackWriter.WriteNil() -> void
+MessagePack.MessagePackWriter.WriteRaw(System.ReadOnlySpan<byte> rawMessagePackBlock) -> void
+MessagePack.MessagePackWriter.WriteRaw(in System.Buffers.ReadOnlySequence<byte> rawMessagePackBlock) -> void
+MessagePack.MessagePackWriter.WriteString(System.ReadOnlySpan<byte> utf8stringBytes) -> void
+MessagePack.MessagePackWriter.WriteString(in System.Buffers.ReadOnlySequence<byte> utf8stringBytes) -> void
+MessagePack.MessagePackWriter.WriteUInt16(ushort value) -> void
+MessagePack.MessagePackWriter.WriteUInt32(uint value) -> void
+MessagePack.MessagePackWriter.WriteUInt64(ulong value) -> void
+MessagePack.MessagePackWriter.WriteUInt8(byte value) -> void
+MessagePack.Nil
+MessagePack.Nil.Equals(MessagePack.Nil other) -> bool
+MessagePack.Nil.Nil() -> void
+MessagePack.ReservedMessagePackExtensionTypeCode
+MessagePack.Resolvers.AttributeFormatterResolver
+MessagePack.Resolvers.AttributeFormatterResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.BuiltinResolver
+MessagePack.Resolvers.BuiltinResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.CompositeResolver
+MessagePack.Resolvers.ContractlessStandardResolver
+MessagePack.Resolvers.ContractlessStandardResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.ContractlessStandardResolverAllowPrivate
+MessagePack.Resolvers.ContractlessStandardResolverAllowPrivate.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.DynamicContractlessObjectResolver
+MessagePack.Resolvers.DynamicContractlessObjectResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.DynamicContractlessObjectResolverAllowPrivate
+MessagePack.Resolvers.DynamicContractlessObjectResolverAllowPrivate.DynamicContractlessObjectResolverAllowPrivate() -> void
+MessagePack.Resolvers.DynamicContractlessObjectResolverAllowPrivate.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.DynamicEnumAsStringResolver
+MessagePack.Resolvers.DynamicEnumAsStringResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.DynamicEnumResolver
+MessagePack.Resolvers.DynamicEnumResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.DynamicGenericResolver
+MessagePack.Resolvers.DynamicGenericResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.DynamicObjectResolver
+MessagePack.Resolvers.DynamicObjectResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.DynamicObjectResolverAllowPrivate
+MessagePack.Resolvers.DynamicObjectResolverAllowPrivate.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.DynamicUnionResolver
+MessagePack.Resolvers.DynamicUnionResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.NativeDateTimeResolver
+MessagePack.Resolvers.NativeDateTimeResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.NativeDecimalResolver
+MessagePack.Resolvers.NativeDecimalResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.NativeGuidResolver
+MessagePack.Resolvers.NativeGuidResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.PrimitiveObjectResolver
+MessagePack.Resolvers.PrimitiveObjectResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.StandardResolver
+MessagePack.Resolvers.StandardResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.StandardResolverAllowPrivate
+MessagePack.Resolvers.StandardResolverAllowPrivate.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.StaticCompositeResolver
+MessagePack.Resolvers.StaticCompositeResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.StaticCompositeResolver.Register(System.Collections.Generic.IReadOnlyList<MessagePack.Formatters.IMessagePackFormatter> formatters, System.Collections.Generic.IReadOnlyList<MessagePack.IFormatterResolver> resolvers) -> void
+MessagePack.Resolvers.StaticCompositeResolver.Register(params MessagePack.Formatters.IMessagePackFormatter[] formatters) -> void
+MessagePack.Resolvers.StaticCompositeResolver.Register(params MessagePack.IFormatterResolver[] resolvers) -> void
+MessagePack.Resolvers.TypelessContractlessStandardResolver
+MessagePack.Resolvers.TypelessContractlessStandardResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.Resolvers.TypelessContractlessStandardResolver.TypelessContractlessStandardResolver() -> void
+MessagePack.Resolvers.TypelessObjectResolver
+MessagePack.Resolvers.TypelessObjectResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.TinyJsonException
+MessagePack.TinyJsonException.TinyJsonException(string message) -> void
+abstract MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TEnumerator, TCollection>.Add(TIntermediate collection, int index, TElement value, MessagePack.MessagePackSerializerOptions options) -> void
+abstract MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TEnumerator, TCollection>.Complete(TIntermediate intermediateCollection) -> TCollection
+abstract MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TEnumerator, TCollection>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> TIntermediate
+abstract MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TEnumerator, TCollection>.GetSourceEnumerator(TCollection source) -> TEnumerator
+abstract MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TEnumerator, TDictionary>.Add(TIntermediate collection, int index, TKey key, TValue value, MessagePack.MessagePackSerializerOptions options) -> void
+abstract MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TEnumerator, TDictionary>.Complete(TIntermediate intermediateCollection) -> TDictionary
+abstract MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TEnumerator, TDictionary>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> TIntermediate
+abstract MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TEnumerator, TDictionary>.GetSourceEnumerator(TDictionary source) -> TEnumerator
+const MessagePack.MessagePackCode.Array16 = 220 -> byte
+const MessagePack.MessagePackCode.Array32 = 221 -> byte
+const MessagePack.MessagePackCode.Bin16 = 197 -> byte
+const MessagePack.MessagePackCode.Bin32 = 198 -> byte
+const MessagePack.MessagePackCode.Bin8 = 196 -> byte
+const MessagePack.MessagePackCode.Ext16 = 200 -> byte
+const MessagePack.MessagePackCode.Ext32 = 201 -> byte
+const MessagePack.MessagePackCode.Ext8 = 199 -> byte
+const MessagePack.MessagePackCode.False = 194 -> byte
+const MessagePack.MessagePackCode.FixExt1 = 212 -> byte
+const MessagePack.MessagePackCode.FixExt16 = 216 -> byte
+const MessagePack.MessagePackCode.FixExt2 = 213 -> byte
+const MessagePack.MessagePackCode.FixExt4 = 214 -> byte
+const MessagePack.MessagePackCode.FixExt8 = 215 -> byte
+const MessagePack.MessagePackCode.Float32 = 202 -> byte
+const MessagePack.MessagePackCode.Float64 = 203 -> byte
+const MessagePack.MessagePackCode.Int16 = 209 -> byte
+const MessagePack.MessagePackCode.Int32 = 210 -> byte
+const MessagePack.MessagePackCode.Int64 = 211 -> byte
+const MessagePack.MessagePackCode.Int8 = 208 -> byte
+const MessagePack.MessagePackCode.Map16 = 222 -> byte
+const MessagePack.MessagePackCode.Map32 = 223 -> byte
+const MessagePack.MessagePackCode.MaxFixArray = 159 -> byte
+const MessagePack.MessagePackCode.MaxFixInt = 127 -> byte
+const MessagePack.MessagePackCode.MaxFixMap = 143 -> byte
+const MessagePack.MessagePackCode.MaxFixStr = 191 -> byte
+const MessagePack.MessagePackCode.MaxNegativeFixInt = 255 -> byte
+const MessagePack.MessagePackCode.MinFixArray = 144 -> byte
+const MessagePack.MessagePackCode.MinFixInt = 0 -> byte
+const MessagePack.MessagePackCode.MinFixMap = 128 -> byte
+const MessagePack.MessagePackCode.MinFixStr = 160 -> byte
+const MessagePack.MessagePackCode.MinNegativeFixInt = 224 -> byte
+const MessagePack.MessagePackCode.NeverUsed = 193 -> byte
+const MessagePack.MessagePackCode.Nil = 192 -> byte
+const MessagePack.MessagePackCode.Str16 = 218 -> byte
+const MessagePack.MessagePackCode.Str32 = 219 -> byte
+const MessagePack.MessagePackCode.Str8 = 217 -> byte
+const MessagePack.MessagePackCode.True = 195 -> byte
+const MessagePack.MessagePackCode.UInt16 = 205 -> byte
+const MessagePack.MessagePackCode.UInt32 = 206 -> byte
+const MessagePack.MessagePackCode.UInt64 = 207 -> byte
+const MessagePack.MessagePackCode.UInt8 = 204 -> byte
+const MessagePack.MessagePackRange.MaxFixArrayCount = 15 -> int
+const MessagePack.MessagePackRange.MaxFixMapCount = 15 -> int
+const MessagePack.MessagePackRange.MaxFixNegativeInt = -1 -> int
+const MessagePack.MessagePackRange.MaxFixPositiveInt = 127 -> int
+const MessagePack.MessagePackRange.MaxFixStringLength = 31 -> int
+const MessagePack.MessagePackRange.MinFixNegativeInt = -32 -> int
+const MessagePack.MessagePackRange.MinFixStringLength = 0 -> int
+const MessagePack.ReservedMessagePackExtensionTypeCode.DateTime = -1 -> sbyte
+override MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TCollection>.GetSourceEnumerator(TCollection source) -> System.Collections.Generic.IEnumerator<TElement>
+override MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TDictionary>.Complete(TDictionary intermediateCollection) -> TDictionary
+override MessagePack.Formatters.DictionaryFormatterBase<TKey, TValue, TIntermediate, TDictionary>.GetSourceEnumerator(TDictionary source) -> System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<TKey, TValue>>
+override MessagePack.Internal.AutomataDictionary.ToString() -> string
+override MessagePack.Nil.Equals(object obj) -> bool
+override MessagePack.Nil.GetHashCode() -> int
+override MessagePack.Nil.ToString() -> string
+override sealed MessagePack.Formatters.CollectionFormatterBase<TElement, TCollection>.Complete(TCollection intermediateCollection) -> TCollection
+static MessagePack.FormatterResolverExtensions.GetFormatterDynamic(this MessagePack.IFormatterResolver resolver, System.Type type) -> object
+static MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<T>(this MessagePack.IFormatterResolver resolver) -> MessagePack.Formatters.IMessagePackFormatter<T>
+static MessagePack.Formatters.PrimitiveObjectFormatter.IsSupportedType(System.Type type, System.Reflection.TypeInfo typeInfo, object value) -> bool
+static MessagePack.Internal.AutomataKeyGen.GetKey(ref System.ReadOnlySpan<byte> span) -> ulong
+static MessagePack.Internal.CodeGenHelpers.GetArrayFromNullableSequence(in System.Buffers.ReadOnlySequence<byte>? sequence) -> byte[]
+static MessagePack.Internal.CodeGenHelpers.GetEncodedStringBytes(string value) -> byte[]
+static MessagePack.Internal.CodeGenHelpers.GetSpanFromSequence(in System.Buffers.ReadOnlySequence<byte> sequence) -> System.ReadOnlySpan<byte>
+static MessagePack.Internal.CodeGenHelpers.ReadStringSpan(ref MessagePack.MessagePackReader reader) -> System.ReadOnlySpan<byte>
+static MessagePack.Internal.UnsafeMemory32.WriteRaw1(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw10(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw11(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw12(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw13(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw14(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw15(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw16(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw17(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw18(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw19(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw2(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw20(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw21(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw22(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw23(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw24(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw25(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw26(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw27(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw28(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw29(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw3(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw30(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw31(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw4(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw5(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw6(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw7(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw8(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory32.WriteRaw9(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw1(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw10(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw11(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw12(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw13(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw14(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw15(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw16(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw17(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw18(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw19(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw2(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw20(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw21(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw22(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw23(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw24(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw25(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw26(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw27(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw28(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw29(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw3(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw30(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw31(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw4(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw5(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw6(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw7(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw8(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.Internal.UnsafeMemory64.WriteRaw9(ref MessagePack.MessagePackWriter writer, System.ReadOnlySpan<byte> src) -> void
+static MessagePack.MessagePackCode.ToFormatName(byte code) -> string
+static MessagePack.MessagePackCode.ToMessagePackType(byte code) -> MessagePack.MessagePackType
+static MessagePack.MessagePackSerializer.ConvertFromJson(System.IO.TextReader reader, ref MessagePack.MessagePackWriter writer, MessagePack.MessagePackSerializerOptions options = null) -> void
+static MessagePack.MessagePackSerializer.ConvertFromJson(string str, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> byte[]
+static MessagePack.MessagePackSerializer.ConvertFromJson(string str, ref MessagePack.MessagePackWriter writer, MessagePack.MessagePackSerializerOptions options = null) -> void
+static MessagePack.MessagePackSerializer.ConvertToJson(System.ReadOnlyMemory<byte> bytes, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> string
+static MessagePack.MessagePackSerializer.ConvertToJson(in System.Buffers.ReadOnlySequence<byte> bytes, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> string
+static MessagePack.MessagePackSerializer.ConvertToJson(ref MessagePack.MessagePackReader reader, System.IO.TextWriter jsonWriter, MessagePack.MessagePackSerializerOptions options = null) -> void
+static MessagePack.MessagePackSerializer.DefaultOptions.get -> MessagePack.MessagePackSerializerOptions
+static MessagePack.MessagePackSerializer.DefaultOptions.set -> void
+static MessagePack.MessagePackSerializer.Deserialize(System.Type type, System.Buffers.ReadOnlySequence<byte> bytes, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> object
+static MessagePack.MessagePackSerializer.Deserialize(System.Type type, System.IO.Stream stream, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> object
+static MessagePack.MessagePackSerializer.Deserialize(System.Type type, System.ReadOnlyMemory<byte> bytes, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> object
+static MessagePack.MessagePackSerializer.Deserialize(System.Type type, ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options = null) -> object
+static MessagePack.MessagePackSerializer.Deserialize<T>(System.IO.Stream stream, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> T
+static MessagePack.MessagePackSerializer.Deserialize<T>(System.ReadOnlyMemory<byte> buffer, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> T
+static MessagePack.MessagePackSerializer.Deserialize<T>(System.ReadOnlyMemory<byte> buffer, MessagePack.MessagePackSerializerOptions options, out int bytesRead, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> T
+static MessagePack.MessagePackSerializer.Deserialize<T>(System.ReadOnlyMemory<byte> buffer, out int bytesRead, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> T
+static MessagePack.MessagePackSerializer.Deserialize<T>(in System.Buffers.ReadOnlySequence<byte> byteSequence, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> T
+static MessagePack.MessagePackSerializer.Deserialize<T>(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options = null) -> T
+static MessagePack.MessagePackSerializer.DeserializeAsync(System.Type type, System.IO.Stream stream, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask<object>
+static MessagePack.MessagePackSerializer.DeserializeAsync<T>(System.IO.Stream stream, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask<T>
+static MessagePack.MessagePackSerializer.Serialize(System.Type type, System.Buffers.IBufferWriter<byte> writer, object obj, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> void
+static MessagePack.MessagePackSerializer.Serialize(System.Type type, System.IO.Stream stream, object obj, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> void
+static MessagePack.MessagePackSerializer.Serialize(System.Type type, object obj, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> byte[]
+static MessagePack.MessagePackSerializer.Serialize(System.Type type, ref MessagePack.MessagePackWriter writer, object obj, MessagePack.MessagePackSerializerOptions options = null) -> void
+static MessagePack.MessagePackSerializer.Serialize<T>(System.Buffers.IBufferWriter<byte> writer, T value, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> void
+static MessagePack.MessagePackSerializer.Serialize<T>(System.IO.Stream stream, T value, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> void
+static MessagePack.MessagePackSerializer.Serialize<T>(T value, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> byte[]
+static MessagePack.MessagePackSerializer.Serialize<T>(ref MessagePack.MessagePackWriter writer, T value, MessagePack.MessagePackSerializerOptions options = null) -> void
+static MessagePack.MessagePackSerializer.SerializeAsync(System.Type type, System.IO.Stream stream, object obj, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task
+static MessagePack.MessagePackSerializer.SerializeAsync<T>(System.IO.Stream stream, T value, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task
+static MessagePack.MessagePackSerializer.SerializeToJson<T>(System.IO.TextWriter textWriter, T obj, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> void
+static MessagePack.MessagePackSerializer.SerializeToJson<T>(T obj, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> string
+static MessagePack.MessagePackSerializer.Typeless.DefaultOptions.get -> MessagePack.MessagePackSerializerOptions
+static MessagePack.MessagePackSerializer.Typeless.DefaultOptions.set -> void
+static MessagePack.MessagePackSerializer.Typeless.Deserialize(System.IO.Stream stream, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> object
+static MessagePack.MessagePackSerializer.Typeless.Deserialize(System.Memory<byte> bytes, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> object
+static MessagePack.MessagePackSerializer.Typeless.Deserialize(in System.Buffers.ReadOnlySequence<byte> byteSequence, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> object
+static MessagePack.MessagePackSerializer.Typeless.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options = null) -> object
+static MessagePack.MessagePackSerializer.Typeless.DeserializeAsync(System.IO.Stream stream, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask<object>
+static MessagePack.MessagePackSerializer.Typeless.Serialize(System.Buffers.IBufferWriter<byte> writer, object obj, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> void
+static MessagePack.MessagePackSerializer.Typeless.Serialize(System.IO.Stream stream, object obj, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> void
+static MessagePack.MessagePackSerializer.Typeless.Serialize(object obj, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> byte[]
+static MessagePack.MessagePackSerializer.Typeless.Serialize(ref MessagePack.MessagePackWriter writer, object obj, MessagePack.MessagePackSerializerOptions options = null) -> void
+static MessagePack.MessagePackSerializer.Typeless.SerializeAsync(System.IO.Stream stream, object obj, MessagePack.MessagePackSerializerOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task
+static MessagePack.MessagePackSerializerOptions.Standard.get -> MessagePack.MessagePackSerializerOptions
+static MessagePack.Resolvers.CompositeResolver.Create(System.Collections.Generic.IReadOnlyList<MessagePack.Formatters.IMessagePackFormatter> formatters, System.Collections.Generic.IReadOnlyList<MessagePack.IFormatterResolver> resolvers) -> MessagePack.IFormatterResolver
+static MessagePack.Resolvers.CompositeResolver.Create(params MessagePack.Formatters.IMessagePackFormatter[] formatters) -> MessagePack.IFormatterResolver
+static MessagePack.Resolvers.CompositeResolver.Create(params MessagePack.IFormatterResolver[] resolvers) -> MessagePack.IFormatterResolver
+static readonly MessagePack.Formatters.BigIntegerFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Numerics.BigInteger>
+static readonly MessagePack.Formatters.BitArrayFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Collections.BitArray>
+static readonly MessagePack.Formatters.BooleanArrayFormatter.Instance -> MessagePack.Formatters.BooleanArrayFormatter
+static readonly MessagePack.Formatters.BooleanFormatter.Instance -> MessagePack.Formatters.BooleanFormatter
+static readonly MessagePack.Formatters.ByteArrayFormatter.Instance -> MessagePack.Formatters.ByteArrayFormatter
+static readonly MessagePack.Formatters.ByteArraySegmentFormatter.Instance -> MessagePack.Formatters.ByteArraySegmentFormatter
+static readonly MessagePack.Formatters.ByteFormatter.Instance -> MessagePack.Formatters.ByteFormatter
+static readonly MessagePack.Formatters.CharArrayFormatter.Instance -> MessagePack.Formatters.CharArrayFormatter
+static readonly MessagePack.Formatters.CharFormatter.Instance -> MessagePack.Formatters.CharFormatter
+static readonly MessagePack.Formatters.ComplexFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Numerics.Complex>
+static readonly MessagePack.Formatters.DateTimeArrayFormatter.Instance -> MessagePack.Formatters.DateTimeArrayFormatter
+static readonly MessagePack.Formatters.DateTimeFormatter.Instance -> MessagePack.Formatters.DateTimeFormatter
+static readonly MessagePack.Formatters.DateTimeOffsetFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.DateTimeOffset>
+static readonly MessagePack.Formatters.DecimalFormatter.Instance -> MessagePack.Formatters.DecimalFormatter
+static readonly MessagePack.Formatters.DoubleArrayFormatter.Instance -> MessagePack.Formatters.DoubleArrayFormatter
+static readonly MessagePack.Formatters.DoubleFormatter.Instance -> MessagePack.Formatters.DoubleFormatter
+static readonly MessagePack.Formatters.DynamicObjectTypeFallbackFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<object>
+static readonly MessagePack.Formatters.ForceByteBlockFormatter.Instance -> MessagePack.Formatters.ForceByteBlockFormatter
+static readonly MessagePack.Formatters.ForceInt16BlockArrayFormatter.Instance -> MessagePack.Formatters.ForceInt16BlockArrayFormatter
+static readonly MessagePack.Formatters.ForceInt16BlockFormatter.Instance -> MessagePack.Formatters.ForceInt16BlockFormatter
+static readonly MessagePack.Formatters.ForceInt32BlockArrayFormatter.Instance -> MessagePack.Formatters.ForceInt32BlockArrayFormatter
+static readonly MessagePack.Formatters.ForceInt32BlockFormatter.Instance -> MessagePack.Formatters.ForceInt32BlockFormatter
+static readonly MessagePack.Formatters.ForceInt64BlockArrayFormatter.Instance -> MessagePack.Formatters.ForceInt64BlockArrayFormatter
+static readonly MessagePack.Formatters.ForceInt64BlockFormatter.Instance -> MessagePack.Formatters.ForceInt64BlockFormatter
+static readonly MessagePack.Formatters.ForceSByteBlockArrayFormatter.Instance -> MessagePack.Formatters.ForceSByteBlockArrayFormatter
+static readonly MessagePack.Formatters.ForceSByteBlockFormatter.Instance -> MessagePack.Formatters.ForceSByteBlockFormatter
+static readonly MessagePack.Formatters.ForceUInt16BlockArrayFormatter.Instance -> MessagePack.Formatters.ForceUInt16BlockArrayFormatter
+static readonly MessagePack.Formatters.ForceUInt16BlockFormatter.Instance -> MessagePack.Formatters.ForceUInt16BlockFormatter
+static readonly MessagePack.Formatters.ForceUInt32BlockArrayFormatter.Instance -> MessagePack.Formatters.ForceUInt32BlockArrayFormatter
+static readonly MessagePack.Formatters.ForceUInt32BlockFormatter.Instance -> MessagePack.Formatters.ForceUInt32BlockFormatter
+static readonly MessagePack.Formatters.ForceUInt64BlockArrayFormatter.Instance -> MessagePack.Formatters.ForceUInt64BlockArrayFormatter
+static readonly MessagePack.Formatters.ForceUInt64BlockFormatter.Instance -> MessagePack.Formatters.ForceUInt64BlockFormatter
+static readonly MessagePack.Formatters.GuidFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Guid>
+static readonly MessagePack.Formatters.Int16ArrayFormatter.Instance -> MessagePack.Formatters.Int16ArrayFormatter
+static readonly MessagePack.Formatters.Int16Formatter.Instance -> MessagePack.Formatters.Int16Formatter
+static readonly MessagePack.Formatters.Int32ArrayFormatter.Instance -> MessagePack.Formatters.Int32ArrayFormatter
+static readonly MessagePack.Formatters.Int32Formatter.Instance -> MessagePack.Formatters.Int32Formatter
+static readonly MessagePack.Formatters.Int64ArrayFormatter.Instance -> MessagePack.Formatters.Int64ArrayFormatter
+static readonly MessagePack.Formatters.Int64Formatter.Instance -> MessagePack.Formatters.Int64Formatter
+static readonly MessagePack.Formatters.NativeDateTimeArrayFormatter.Instance -> MessagePack.Formatters.NativeDateTimeArrayFormatter
+static readonly MessagePack.Formatters.NativeDateTimeFormatter.Instance -> MessagePack.Formatters.NativeDateTimeFormatter
+static readonly MessagePack.Formatters.NativeDecimalFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<decimal>
+static readonly MessagePack.Formatters.NativeGuidFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Guid>
+static readonly MessagePack.Formatters.NilFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<MessagePack.Nil>
+static readonly MessagePack.Formatters.NonGenericInterfaceDictionaryFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Collections.IDictionary>
+static readonly MessagePack.Formatters.NonGenericInterfaceListFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Collections.IList>
+static readonly MessagePack.Formatters.NullableBooleanFormatter.Instance -> MessagePack.Formatters.NullableBooleanFormatter
+static readonly MessagePack.Formatters.NullableByteFormatter.Instance -> MessagePack.Formatters.NullableByteFormatter
+static readonly MessagePack.Formatters.NullableCharFormatter.Instance -> MessagePack.Formatters.NullableCharFormatter
+static readonly MessagePack.Formatters.NullableDateTimeFormatter.Instance -> MessagePack.Formatters.NullableDateTimeFormatter
+static readonly MessagePack.Formatters.NullableDoubleFormatter.Instance -> MessagePack.Formatters.NullableDoubleFormatter
+static readonly MessagePack.Formatters.NullableForceByteBlockFormatter.Instance -> MessagePack.Formatters.NullableForceByteBlockFormatter
+static readonly MessagePack.Formatters.NullableForceInt16BlockFormatter.Instance -> MessagePack.Formatters.NullableForceInt16BlockFormatter
+static readonly MessagePack.Formatters.NullableForceInt32BlockFormatter.Instance -> MessagePack.Formatters.NullableForceInt32BlockFormatter
+static readonly MessagePack.Formatters.NullableForceInt64BlockFormatter.Instance -> MessagePack.Formatters.NullableForceInt64BlockFormatter
+static readonly MessagePack.Formatters.NullableForceSByteBlockFormatter.Instance -> MessagePack.Formatters.NullableForceSByteBlockFormatter
+static readonly MessagePack.Formatters.NullableForceUInt16BlockFormatter.Instance -> MessagePack.Formatters.NullableForceUInt16BlockFormatter
+static readonly MessagePack.Formatters.NullableForceUInt32BlockFormatter.Instance -> MessagePack.Formatters.NullableForceUInt32BlockFormatter
+static readonly MessagePack.Formatters.NullableForceUInt64BlockFormatter.Instance -> MessagePack.Formatters.NullableForceUInt64BlockFormatter
+static readonly MessagePack.Formatters.NullableInt16Formatter.Instance -> MessagePack.Formatters.NullableInt16Formatter
+static readonly MessagePack.Formatters.NullableInt32Formatter.Instance -> MessagePack.Formatters.NullableInt32Formatter
+static readonly MessagePack.Formatters.NullableInt64Formatter.Instance -> MessagePack.Formatters.NullableInt64Formatter
+static readonly MessagePack.Formatters.NullableNilFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<MessagePack.Nil?>
+static readonly MessagePack.Formatters.NullableSByteFormatter.Instance -> MessagePack.Formatters.NullableSByteFormatter
+static readonly MessagePack.Formatters.NullableSingleFormatter.Instance -> MessagePack.Formatters.NullableSingleFormatter
+static readonly MessagePack.Formatters.NullableStringArrayFormatter.Instance -> MessagePack.Formatters.NullableStringArrayFormatter
+static readonly MessagePack.Formatters.NullableStringFormatter.Instance -> MessagePack.Formatters.NullableStringFormatter
+static readonly MessagePack.Formatters.NullableUInt16Formatter.Instance -> MessagePack.Formatters.NullableUInt16Formatter
+static readonly MessagePack.Formatters.NullableUInt32Formatter.Instance -> MessagePack.Formatters.NullableUInt32Formatter
+static readonly MessagePack.Formatters.NullableUInt64Formatter.Instance -> MessagePack.Formatters.NullableUInt64Formatter
+static readonly MessagePack.Formatters.PrimitiveObjectFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<object>
+static readonly MessagePack.Formatters.SByteArrayFormatter.Instance -> MessagePack.Formatters.SByteArrayFormatter
+static readonly MessagePack.Formatters.SByteFormatter.Instance -> MessagePack.Formatters.SByteFormatter
+static readonly MessagePack.Formatters.SingleArrayFormatter.Instance -> MessagePack.Formatters.SingleArrayFormatter
+static readonly MessagePack.Formatters.SingleFormatter.Instance -> MessagePack.Formatters.SingleFormatter
+static readonly MessagePack.Formatters.StringBuilderFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Text.StringBuilder>
+static readonly MessagePack.Formatters.TimeSpanFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.TimeSpan>
+static readonly MessagePack.Formatters.TypelessFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<object>
+static readonly MessagePack.Formatters.UInt16ArrayFormatter.Instance -> MessagePack.Formatters.UInt16ArrayFormatter
+static readonly MessagePack.Formatters.UInt16Formatter.Instance -> MessagePack.Formatters.UInt16Formatter
+static readonly MessagePack.Formatters.UInt32ArrayFormatter.Instance -> MessagePack.Formatters.UInt32ArrayFormatter
+static readonly MessagePack.Formatters.UInt32Formatter.Instance -> MessagePack.Formatters.UInt32Formatter
+static readonly MessagePack.Formatters.UInt64ArrayFormatter.Instance -> MessagePack.Formatters.UInt64ArrayFormatter
+static readonly MessagePack.Formatters.UInt64Formatter.Instance -> MessagePack.Formatters.UInt64Formatter
+static readonly MessagePack.Formatters.UriFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Uri>
+static readonly MessagePack.Formatters.VersionFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Version>
+static readonly MessagePack.Internal.AutomataKeyGen.GetKeyMethod -> System.Reflection.MethodInfo
+static readonly MessagePack.Internal.RuntimeTypeHandleEqualityComparer.Default -> System.Collections.Generic.IEqualityComparer<System.RuntimeTypeHandle>
+static readonly MessagePack.Internal.UnsafeMemory.Is32Bit -> bool
+static readonly MessagePack.Nil.Default -> MessagePack.Nil
+static readonly MessagePack.Resolvers.AttributeFormatterResolver.Instance -> MessagePack.Resolvers.AttributeFormatterResolver
+static readonly MessagePack.Resolvers.BuiltinResolver.Instance -> MessagePack.Resolvers.BuiltinResolver
+static readonly MessagePack.Resolvers.ContractlessStandardResolver.Instance -> MessagePack.Resolvers.ContractlessStandardResolver
+static readonly MessagePack.Resolvers.ContractlessStandardResolver.Options -> MessagePack.MessagePackSerializerOptions
+static readonly MessagePack.Resolvers.ContractlessStandardResolverAllowPrivate.Instance -> MessagePack.Resolvers.ContractlessStandardResolverAllowPrivate
+static readonly MessagePack.Resolvers.ContractlessStandardResolverAllowPrivate.Options -> MessagePack.MessagePackSerializerOptions
+static readonly MessagePack.Resolvers.DynamicContractlessObjectResolver.Instance -> MessagePack.Resolvers.DynamicContractlessObjectResolver
+static readonly MessagePack.Resolvers.DynamicContractlessObjectResolverAllowPrivate.Instance -> MessagePack.Resolvers.DynamicContractlessObjectResolverAllowPrivate
+static readonly MessagePack.Resolvers.DynamicEnumAsStringResolver.Instance -> MessagePack.Resolvers.DynamicEnumAsStringResolver
+static readonly MessagePack.Resolvers.DynamicEnumAsStringResolver.Options -> MessagePack.MessagePackSerializerOptions
+static readonly MessagePack.Resolvers.DynamicEnumResolver.Instance -> MessagePack.Resolvers.DynamicEnumResolver
+static readonly MessagePack.Resolvers.DynamicGenericResolver.Instance -> MessagePack.Resolvers.DynamicGenericResolver
+static readonly MessagePack.Resolvers.DynamicObjectResolver.Instance -> MessagePack.Resolvers.DynamicObjectResolver
+static readonly MessagePack.Resolvers.DynamicObjectResolver.Options -> MessagePack.MessagePackSerializerOptions
+static readonly MessagePack.Resolvers.DynamicObjectResolverAllowPrivate.Instance -> MessagePack.Resolvers.DynamicObjectResolverAllowPrivate
+static readonly MessagePack.Resolvers.DynamicUnionResolver.Instance -> MessagePack.Resolvers.DynamicUnionResolver
+static readonly MessagePack.Resolvers.DynamicUnionResolver.Options -> MessagePack.MessagePackSerializerOptions
+static readonly MessagePack.Resolvers.NativeDateTimeResolver.Instance -> MessagePack.Resolvers.NativeDateTimeResolver
+static readonly MessagePack.Resolvers.NativeDateTimeResolver.Options -> MessagePack.MessagePackSerializerOptions
+static readonly MessagePack.Resolvers.NativeDecimalResolver.Instance -> MessagePack.Resolvers.NativeDecimalResolver
+static readonly MessagePack.Resolvers.NativeGuidResolver.Instance -> MessagePack.Resolvers.NativeGuidResolver
+static readonly MessagePack.Resolvers.PrimitiveObjectResolver.Instance -> MessagePack.Resolvers.PrimitiveObjectResolver
+static readonly MessagePack.Resolvers.PrimitiveObjectResolver.Options -> MessagePack.MessagePackSerializerOptions
+static readonly MessagePack.Resolvers.StandardResolver.Instance -> MessagePack.Resolvers.StandardResolver
+static readonly MessagePack.Resolvers.StandardResolver.Options -> MessagePack.MessagePackSerializerOptions
+static readonly MessagePack.Resolvers.StandardResolverAllowPrivate.Instance -> MessagePack.Resolvers.StandardResolverAllowPrivate
+static readonly MessagePack.Resolvers.StandardResolverAllowPrivate.Options -> MessagePack.MessagePackSerializerOptions
+static readonly MessagePack.Resolvers.StaticCompositeResolver.Instance -> MessagePack.Resolvers.StaticCompositeResolver
+static readonly MessagePack.Resolvers.TypelessContractlessStandardResolver.Instance -> MessagePack.Resolvers.TypelessContractlessStandardResolver
+static readonly MessagePack.Resolvers.TypelessContractlessStandardResolver.Options -> MessagePack.MessagePackSerializerOptions
+static readonly MessagePack.Resolvers.TypelessObjectResolver.Instance -> MessagePack.IFormatterResolver
+virtual MessagePack.Formatters.CollectionFormatterBase<TElement, TIntermediate, TEnumerator, TCollection>.GetCount(TCollection sequence) -> int?
+virtual MessagePack.MessagePackSerializerOptions.Clone() -> MessagePack.MessagePackSerializerOptions
+virtual MessagePack.MessagePackSerializerOptions.LoadType(string typeName) -> System.Type
+virtual MessagePack.MessagePackSerializerOptions.ThrowIfDeserializingTypeIsDisallowed(System.Type type) -> void
+MessagePack.ExtensionHeader.Equals(MessagePack.ExtensionHeader other) -> bool
+MessagePack.Formatters.InterfaceCollectionFormatter2<T>
+MessagePack.Formatters.InterfaceCollectionFormatter2<T>.InterfaceCollectionFormatter2() -> void
+MessagePack.Formatters.InterfaceListFormatter2<T>
+MessagePack.Formatters.InterfaceListFormatter2<T>.InterfaceListFormatter2() -> void
+MessagePack.MessagePackReader.Depth.get -> int
+MessagePack.MessagePackReader.Depth.set -> void
+MessagePack.MessagePackReader.ReadDateTime(MessagePack.ExtensionHeader header) -> System.DateTime
+MessagePack.MessagePackReader.TryReadArrayHeader(out int count) -> bool
+MessagePack.MessagePackReader.TryReadExtensionFormatHeader(out MessagePack.ExtensionHeader extensionHeader) -> bool
+MessagePack.MessagePackReader.TryReadMapHeader(out int count) -> bool
+MessagePack.MessagePackSecurity
+MessagePack.MessagePackSecurity.DepthStep(ref MessagePack.MessagePackReader reader) -> void
+MessagePack.MessagePackSecurity.GetEqualityComparer() -> System.Collections.IEqualityComparer
+MessagePack.MessagePackSecurity.GetEqualityComparer<T>() -> System.Collections.Generic.IEqualityComparer<T>
+MessagePack.MessagePackSecurity.HashCollisionResistant.get -> bool
+MessagePack.MessagePackSecurity.MaximumObjectGraphDepth.get -> int
+MessagePack.MessagePackSecurity.MessagePackSecurity(MessagePack.MessagePackSecurity copyFrom) -> void
+MessagePack.MessagePackSecurity.WithHashCollisionResistant(bool hashCollisionResistant) -> MessagePack.MessagePackSecurity
+MessagePack.MessagePackSecurity.WithMaximumObjectGraphDepth(int maximumObjectGraphDepth) -> MessagePack.MessagePackSecurity
+MessagePack.MessagePackSerializerOptions.Security.get -> MessagePack.MessagePackSecurity
+MessagePack.MessagePackSerializerOptions.WithSecurity(MessagePack.MessagePackSecurity security) -> MessagePack.MessagePackSerializerOptions
+MessagePack.MessagePackStreamReader.DiscardBufferedData() -> void
+MessagePack.MessagePackStreamReader.MessagePackStreamReader(System.IO.Stream stream, bool leaveOpen) -> void
+MessagePack.MessagePackStreamReader.ReadArrayAsync(System.Threading.CancellationToken cancellationToken) -> System.Collections.Generic.IAsyncEnumerable<System.Buffers.ReadOnlySequence<byte>>
+MessagePack.MessagePackWriter.WriteBinHeader(int length) -> void
+MessagePack.MessagePackWriter.WriteStringHeader(int byteCount) -> void
+static readonly MessagePack.MessagePackSecurity.TrustedData -> MessagePack.MessagePackSecurity
+static readonly MessagePack.MessagePackSecurity.UntrustedData -> MessagePack.MessagePackSecurity
+virtual MessagePack.MessagePackSecurity.Clone() -> MessagePack.MessagePackSecurity
+virtual MessagePack.MessagePackSecurity.GetHashCollisionResistantEqualityComparer() -> System.Collections.IEqualityComparer
+virtual MessagePack.MessagePackSecurity.GetHashCollisionResistantEqualityComparer<T>() -> System.Collections.Generic.IEqualityComparer<T>
+MessagePack.Formatters.ByteMemoryFormatter
+MessagePack.Formatters.ByteMemoryFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Memory<byte>
+MessagePack.Formatters.ByteMemoryFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Memory<byte> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ByteReadOnlyMemoryFormatter
+MessagePack.Formatters.ByteReadOnlyMemoryFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.ReadOnlyMemory<byte>
+MessagePack.Formatters.ByteReadOnlyMemoryFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.ReadOnlyMemory<byte> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ByteReadOnlySequenceFormatter
+MessagePack.Formatters.ByteReadOnlySequenceFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Buffers.ReadOnlySequence<byte>
+MessagePack.Formatters.ByteReadOnlySequenceFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Buffers.ReadOnlySequence<byte> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ExpandoObjectFormatter
+MessagePack.Formatters.ExpandoObjectFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Dynamic.ExpandoObject
+MessagePack.Formatters.ExpandoObjectFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Dynamic.ExpandoObject value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ForceTypelessFormatter<T>
+MessagePack.Formatters.ForceTypelessFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T
+MessagePack.Formatters.ForceTypelessFormatter<T>.ForceTypelessFormatter() -> void
+MessagePack.Formatters.ForceTypelessFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.MemoryFormatter<T>
+MessagePack.Formatters.MemoryFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Memory<T>
+MessagePack.Formatters.MemoryFormatter<T>.MemoryFormatter() -> void
+MessagePack.Formatters.MemoryFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, System.Memory<T> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NonGenericInterfaceCollectionFormatter
+MessagePack.Formatters.NonGenericInterfaceCollectionFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Collections.ICollection
+MessagePack.Formatters.NonGenericInterfaceCollectionFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Collections.ICollection value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.NonGenericInterfaceEnumerableFormatter
+MessagePack.Formatters.NonGenericInterfaceEnumerableFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Collections.IEnumerable
+MessagePack.Formatters.NonGenericInterfaceEnumerableFormatter.Serialize(ref MessagePack.MessagePackWriter writer, System.Collections.IEnumerable value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.PrimitiveObjectFormatter.PrimitiveObjectFormatter() -> void
+MessagePack.Formatters.ReadOnlyMemoryFormatter<T>
+MessagePack.Formatters.ReadOnlyMemoryFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.ReadOnlyMemory<T>
+MessagePack.Formatters.ReadOnlyMemoryFormatter<T>.ReadOnlyMemoryFormatter() -> void
+MessagePack.Formatters.ReadOnlyMemoryFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, System.ReadOnlyMemory<T> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.ReadOnlySequenceFormatter<T>
+MessagePack.Formatters.ReadOnlySequenceFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Buffers.ReadOnlySequence<T>
+MessagePack.Formatters.ReadOnlySequenceFormatter<T>.ReadOnlySequenceFormatter() -> void
+MessagePack.Formatters.ReadOnlySequenceFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, System.Buffers.ReadOnlySequence<T> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TypeFormatter<T>
+MessagePack.Formatters.TypeFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> T
+MessagePack.Formatters.TypeFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, T value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.TypelessFormatter.TypelessFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableArrayFormatter<T>
+MessagePack.ImmutableCollection.ImmutableArrayFormatter<T>.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableArray<T>
+MessagePack.ImmutableCollection.ImmutableArrayFormatter<T>.ImmutableArrayFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableArrayFormatter<T>.Serialize(ref MessagePack.MessagePackWriter writer, System.Collections.Immutable.ImmutableArray<T> value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.ImmutableCollection.ImmutableCollectionResolver
+MessagePack.ImmutableCollection.ImmutableCollectionResolver.GetFormatter<T>() -> MessagePack.Formatters.IMessagePackFormatter<T>
+MessagePack.ImmutableCollection.ImmutableDictionaryFormatter<TKey, TValue>
+MessagePack.ImmutableCollection.ImmutableDictionaryFormatter<TKey, TValue>.ImmutableDictionaryFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableHashSetFormatter<T>
+MessagePack.ImmutableCollection.ImmutableHashSetFormatter<T>.ImmutableHashSetFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableListFormatter<T>
+MessagePack.ImmutableCollection.ImmutableListFormatter<T>.ImmutableListFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>
+MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>.Add(T value) -> void
+MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>.ImmutableQueueBuilder() -> void
+MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>.Q.get -> System.Collections.Immutable.ImmutableQueue<T>
+MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>.Q.set -> void
+MessagePack.ImmutableCollection.ImmutableQueueFormatter<T>
+MessagePack.ImmutableCollection.ImmutableQueueFormatter<T>.ImmutableQueueFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableSortedDictionaryFormatter<TKey, TValue>
+MessagePack.ImmutableCollection.ImmutableSortedDictionaryFormatter<TKey, TValue>.ImmutableSortedDictionaryFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableSortedSetFormatter<T>
+MessagePack.ImmutableCollection.ImmutableSortedSetFormatter<T>.ImmutableSortedSetFormatter() -> void
+MessagePack.ImmutableCollection.ImmutableStackFormatter<T>
+MessagePack.ImmutableCollection.ImmutableStackFormatter<T>.ImmutableStackFormatter() -> void
+MessagePack.ImmutableCollection.InterfaceImmutableDictionaryFormatter<TKey, TValue>
+MessagePack.ImmutableCollection.InterfaceImmutableDictionaryFormatter<TKey, TValue>.InterfaceImmutableDictionaryFormatter() -> void
+MessagePack.ImmutableCollection.InterfaceImmutableListFormatter<T>
+MessagePack.ImmutableCollection.InterfaceImmutableListFormatter<T>.InterfaceImmutableListFormatter() -> void
+MessagePack.ImmutableCollection.InterfaceImmutableQueueFormatter<T>
+MessagePack.ImmutableCollection.InterfaceImmutableQueueFormatter<T>.InterfaceImmutableQueueFormatter() -> void
+MessagePack.ImmutableCollection.InterfaceImmutableSetFormatter<T>
+MessagePack.ImmutableCollection.InterfaceImmutableSetFormatter<T>.InterfaceImmutableSetFormatter() -> void
+MessagePack.ImmutableCollection.InterfaceImmutableStackFormatter<T>
+MessagePack.ImmutableCollection.InterfaceImmutableStackFormatter<T>.InterfaceImmutableStackFormatter() -> void
+MessagePack.Resolvers.ExpandoObjectResolver
+override MessagePack.ImmutableCollection.ImmutableDictionaryFormatter<TKey, TValue>.Add(System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Builder collection, int index, TKey key, TValue value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.ImmutableDictionaryFormatter<TKey, TValue>.Complete(System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Builder intermediateCollection) -> System.Collections.Immutable.ImmutableDictionary<TKey, TValue>
+override MessagePack.ImmutableCollection.ImmutableDictionaryFormatter<TKey, TValue>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Builder
+override MessagePack.ImmutableCollection.ImmutableDictionaryFormatter<TKey, TValue>.GetSourceEnumerator(System.Collections.Immutable.ImmutableDictionary<TKey, TValue> source) -> System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Enumerator
+override MessagePack.ImmutableCollection.ImmutableHashSetFormatter<T>.Add(System.Collections.Immutable.ImmutableHashSet<T>.Builder collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.ImmutableHashSetFormatter<T>.Complete(System.Collections.Immutable.ImmutableHashSet<T>.Builder intermediateCollection) -> System.Collections.Immutable.ImmutableHashSet<T>
+override MessagePack.ImmutableCollection.ImmutableHashSetFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableHashSet<T>.Builder
+override MessagePack.ImmutableCollection.ImmutableHashSetFormatter<T>.GetSourceEnumerator(System.Collections.Immutable.ImmutableHashSet<T> source) -> System.Collections.Immutable.ImmutableHashSet<T>.Enumerator
+override MessagePack.ImmutableCollection.ImmutableListFormatter<T>.Add(System.Collections.Immutable.ImmutableList<T>.Builder collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.ImmutableListFormatter<T>.Complete(System.Collections.Immutable.ImmutableList<T>.Builder intermediateCollection) -> System.Collections.Immutable.ImmutableList<T>
+override MessagePack.ImmutableCollection.ImmutableListFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableList<T>.Builder
+override MessagePack.ImmutableCollection.ImmutableListFormatter<T>.GetSourceEnumerator(System.Collections.Immutable.ImmutableList<T> source) -> System.Collections.Immutable.ImmutableList<T>.Enumerator
+override MessagePack.ImmutableCollection.ImmutableQueueFormatter<T>.Add(MessagePack.ImmutableCollection.ImmutableQueueBuilder<T> collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.ImmutableQueueFormatter<T>.Complete(MessagePack.ImmutableCollection.ImmutableQueueBuilder<T> intermediateCollection) -> System.Collections.Immutable.ImmutableQueue<T>
+override MessagePack.ImmutableCollection.ImmutableQueueFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>
+override MessagePack.ImmutableCollection.ImmutableSortedDictionaryFormatter<TKey, TValue>.Add(System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue>.Builder collection, int index, TKey key, TValue value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.ImmutableSortedDictionaryFormatter<TKey, TValue>.Complete(System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue>.Builder intermediateCollection) -> System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue>
+override MessagePack.ImmutableCollection.ImmutableSortedDictionaryFormatter<TKey, TValue>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue>.Builder
+override MessagePack.ImmutableCollection.ImmutableSortedDictionaryFormatter<TKey, TValue>.GetSourceEnumerator(System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue> source) -> System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue>.Enumerator
+override MessagePack.ImmutableCollection.ImmutableSortedSetFormatter<T>.Add(System.Collections.Immutable.ImmutableSortedSet<T>.Builder collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.ImmutableSortedSetFormatter<T>.Complete(System.Collections.Immutable.ImmutableSortedSet<T>.Builder intermediateCollection) -> System.Collections.Immutable.ImmutableSortedSet<T>
+override MessagePack.ImmutableCollection.ImmutableSortedSetFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableSortedSet<T>.Builder
+override MessagePack.ImmutableCollection.ImmutableSortedSetFormatter<T>.GetSourceEnumerator(System.Collections.Immutable.ImmutableSortedSet<T> source) -> System.Collections.Immutable.ImmutableSortedSet<T>.Enumerator
+override MessagePack.ImmutableCollection.ImmutableStackFormatter<T>.Add(T[] collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.ImmutableStackFormatter<T>.Complete(T[] intermediateCollection) -> System.Collections.Immutable.ImmutableStack<T>
+override MessagePack.ImmutableCollection.ImmutableStackFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> T[]
+override MessagePack.ImmutableCollection.InterfaceImmutableDictionaryFormatter<TKey, TValue>.Add(System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Builder collection, int index, TKey key, TValue value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.InterfaceImmutableDictionaryFormatter<TKey, TValue>.Complete(System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Builder intermediateCollection) -> System.Collections.Immutable.IImmutableDictionary<TKey, TValue>
+override MessagePack.ImmutableCollection.InterfaceImmutableDictionaryFormatter<TKey, TValue>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.Builder
+override MessagePack.ImmutableCollection.InterfaceImmutableListFormatter<T>.Add(System.Collections.Immutable.ImmutableList<T>.Builder collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.InterfaceImmutableListFormatter<T>.Complete(System.Collections.Immutable.ImmutableList<T>.Builder intermediateCollection) -> System.Collections.Immutable.IImmutableList<T>
+override MessagePack.ImmutableCollection.InterfaceImmutableListFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableList<T>.Builder
+override MessagePack.ImmutableCollection.InterfaceImmutableQueueFormatter<T>.Add(MessagePack.ImmutableCollection.ImmutableQueueBuilder<T> collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.InterfaceImmutableQueueFormatter<T>.Complete(MessagePack.ImmutableCollection.ImmutableQueueBuilder<T> intermediateCollection) -> System.Collections.Immutable.IImmutableQueue<T>
+override MessagePack.ImmutableCollection.InterfaceImmutableQueueFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> MessagePack.ImmutableCollection.ImmutableQueueBuilder<T>
+override MessagePack.ImmutableCollection.InterfaceImmutableSetFormatter<T>.Add(System.Collections.Immutable.ImmutableHashSet<T>.Builder collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.InterfaceImmutableSetFormatter<T>.Complete(System.Collections.Immutable.ImmutableHashSet<T>.Builder intermediateCollection) -> System.Collections.Immutable.IImmutableSet<T>
+override MessagePack.ImmutableCollection.InterfaceImmutableSetFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> System.Collections.Immutable.ImmutableHashSet<T>.Builder
+override MessagePack.ImmutableCollection.InterfaceImmutableStackFormatter<T>.Add(T[] collection, int index, T value, MessagePack.MessagePackSerializerOptions options) -> void
+override MessagePack.ImmutableCollection.InterfaceImmutableStackFormatter<T>.Complete(T[] intermediateCollection) -> System.Collections.Immutable.IImmutableStack<T>
+override MessagePack.ImmutableCollection.InterfaceImmutableStackFormatter<T>.Create(int count, MessagePack.MessagePackSerializerOptions options) -> T[]
+static readonly MessagePack.Formatters.ByteMemoryFormatter.Instance -> MessagePack.Formatters.ByteMemoryFormatter
+static readonly MessagePack.Formatters.ByteReadOnlyMemoryFormatter.Instance -> MessagePack.Formatters.ByteReadOnlyMemoryFormatter
+static readonly MessagePack.Formatters.ByteReadOnlySequenceFormatter.Instance -> MessagePack.Formatters.ByteReadOnlySequenceFormatter
+static readonly MessagePack.Formatters.ExpandoObjectFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Dynamic.ExpandoObject>
+static readonly MessagePack.Formatters.NonGenericInterfaceCollectionFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Collections.ICollection>
+static readonly MessagePack.Formatters.NonGenericInterfaceEnumerableFormatter.Instance -> MessagePack.Formatters.IMessagePackFormatter<System.Collections.IEnumerable>
+static readonly MessagePack.Formatters.TypeFormatter<T>.Instance -> MessagePack.Formatters.IMessagePackFormatter<T>
+static readonly MessagePack.ImmutableCollection.ImmutableCollectionResolver.Instance -> MessagePack.ImmutableCollection.ImmutableCollectionResolver
+static readonly MessagePack.Resolvers.ExpandoObjectResolver.Instance -> MessagePack.IFormatterResolver
+static readonly MessagePack.Resolvers.ExpandoObjectResolver.Options -> MessagePack.MessagePackSerializerOptions
+virtual MessagePack.Formatters.PrimitiveObjectFormatter.DeserializeMap(ref MessagePack.MessagePackReader reader, int length, MessagePack.MessagePackSerializerOptions options) -> object
+MessagePack.ExtensionHeader.ExtensionHeader() -> void
+MessagePack.ExtensionResult.ExtensionResult() -> void
+MessagePack.FormatterNotRegisteredException.FormatterNotRegisteredException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) -> void
+MessagePack.MessagePackReader.MessagePackReader() -> void
+MessagePack.MessagePackSerializerOptions.SequencePool.get -> MessagePack.SequencePool
+MessagePack.MessagePackSerializerOptions.WithPool(MessagePack.SequencePool pool) -> MessagePack.MessagePackSerializerOptions
+MessagePack.MessagePackStreamReader.MessagePackStreamReader(System.IO.Stream stream, bool leaveOpen, MessagePack.SequencePool sequencePool) -> void
+MessagePack.MessagePackStreamReader.ReadArrayHeaderAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.ValueTask<int>
+MessagePack.MessagePackStreamReader.ReadMapHeaderAsync(System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.ValueTask<int>
+MessagePack.MessagePackWriter.MessagePackWriter() -> void
+MessagePack.SequencePool
+MessagePack.SequencePool.SequencePool() -> void
+MessagePack.SequencePool.SequencePool(int maxSize) -> void
+MessagePack.SequencePool.SequencePool(int maxSize, System.Buffers.ArrayPool<byte> arrayPool) -> void
+MessagePack.TinyJsonException.TinyJsonException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) -> void
+static MessagePack.Nil.operator !=(MessagePack.Nil left, MessagePack.Nil right) -> bool
+static MessagePack.Nil.operator ==(MessagePack.Nil left, MessagePack.Nil right) -> bool
+virtual MessagePack.MessagePackStreamReader.Dispose(bool disposing) -> void
+MessagePack.Formatters.GenericEnumerableFormatter<TElement, TCollection>
+MessagePack.Formatters.GenericEnumerableFormatter<TElement, TCollection>.GenericEnumerableFormatter() -> void
+MessagePack.Formatters.GenericReadOnlyDictionaryFormatter<TKey, TValue, TDictionary>
+MessagePack.Formatters.GenericReadOnlyDictionaryFormatter<TKey, TValue, TDictionary>.GenericReadOnlyDictionaryFormatter() -> void
diff --git a/src/MessagePack/netstandard2.0/PublicAPI.Unshipped.txt b/src/MessagePack/netstandard2.0/PublicAPI.Unshipped.txt
new file mode 100644
index 00000000..2cdd3d32
--- /dev/null
+++ b/src/MessagePack/netstandard2.0/PublicAPI.Unshipped.txt
@@ -0,0 +1,8 @@
+MessagePack.Formatters.StringInterningFormatter
+MessagePack.Formatters.StringInterningFormatter.Deserialize(ref MessagePack.MessagePackReader reader, MessagePack.MessagePackSerializerOptions options) -> string
+MessagePack.Formatters.StringInterningFormatter.Serialize(ref MessagePack.MessagePackWriter writer, string value, MessagePack.MessagePackSerializerOptions options) -> void
+MessagePack.Formatters.StringInterningFormatter.StringInterningFormatter() -> void
+MessagePack.MessagePackSerializerOptions.CompressionMinLength.get -> int
+MessagePack.MessagePackSerializerOptions.SuggestedContiguousMemorySize.get -> int
+MessagePack.MessagePackSerializerOptions.WithCompressionMinLength(int compressionMinLength) -> MessagePack.MessagePackSerializerOptions
+MessagePack.MessagePackSerializerOptions.WithSuggestedContiguousMemorySize(int suggestedContiguousMemorySize) -> MessagePack.MessagePackSerializerOptions \ No newline at end of file
diff --git a/src/MessagePackAnalyzer.Vsix/MessagePackAnalyzer.Vsix.csproj b/src/MessagePackAnalyzer.Vsix/MessagePackAnalyzer.Vsix.csproj
deleted file mode 100644
index a6b8cc67..00000000
--- a/src/MessagePackAnalyzer.Vsix/MessagePackAnalyzer.Vsix.csproj
+++ /dev/null
@@ -1,91 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
-<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion>
- <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
- <PublishUrl>publish\</PublishUrl>
- <Install>true</Install>
- <InstallFrom>Disk</InstallFrom>
- <UpdateEnabled>false</UpdateEnabled>
- <UpdateMode>Foreground</UpdateMode>
- <UpdateInterval>7</UpdateInterval>
- <UpdateIntervalUnits>Days</UpdateIntervalUnits>
- <UpdatePeriodically>false</UpdatePeriodically>
- <UpdateRequired>false</UpdateRequired>
- <MapFileExtensions>true</MapFileExtensions>
- <ApplicationRevision>0</ApplicationRevision>
- <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
- <IsWebBootstrapper>false</IsWebBootstrapper>
- <UseApplicationTrust>false</UseApplicationTrust>
- <BootstrapperEnabled>true</BootstrapperEnabled>
- </PropertyGroup>
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
- <PropertyGroup>
- <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
- <Platform Condition="'$(Platform)' == ''">AnyCPU</Platform>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectTypeGuids>{82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <ProjectGuid>{09B87BEB-D9A3-4EEB-B56A-ED53D27DF1A3}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>MessagePackAnalyzer.Vsix</RootNamespace>
- <AssemblyName>MessagePackAnalyzer.Vsix</AssemblyName>
- <TargetVsixContainerName>MessagePackAnalyzer.vsix</TargetVsixContainerName>
- <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
- <GeneratePkgDefFile>false</GeneratePkgDefFile>
- <IncludeAssemblyInVSIXContainer>false</IncludeAssemblyInVSIXContainer>
- <IncludeDebugSymbolsInVSIXContainer>false</IncludeDebugSymbolsInVSIXContainer>
- <IncludeDebugSymbolsInLocalVSIXDeployment>false</IncludeDebugSymbolsInLocalVSIXDeployment>
- <CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
- <CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory>
- <VSSDKTargetPlatformRegRootSuffix>Roslyn</VSSDKTargetPlatformRegRootSuffix>
- <OutputPath>$(BaseOutputPath)$(Configuration)\</OutputPath>
- <RuntimeIdentifiers>win</RuntimeIdentifiers>
- <DeployExtension Condition=" '$(BuildingInsideVisualStudio)' != 'true' ">false</DeployExtension>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup>
- <StartAction>Program</StartAction>
- <StartProgram>$(DevEnvDir)devenv.exe</StartProgram>
- <StartArguments>/rootsuffix Roslyn</StartArguments>
- </PropertyGroup>
- <ItemGroup>
- <None Include="source.extension.vsixmanifest">
- <SubType>Designer</SubType>
- </None>
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\MessagePackAnalyzer\MessagePackAnalyzer.csproj">
- <Project>{2F9A6E0C-DE95-4460-96B7-EB72BBEAEE9E}</Project>
- <Name>MessagePackAnalyzer</Name>
- <IncludeOutputGroupsInVSIX>BuiltProjectOutputGroup%3bBuiltProjectOutputGroupDependencies%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b</IncludeOutputGroupsInVSIX>
- <IncludeOutputGroupsInVSIXLocalOnly>DebugSymbolsProjectOutputGroup%3b</IncludeOutputGroupsInVSIXLocalOnly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
- <Target Name="Pack" DependsOnTargets="Build" />
-</Project>
diff --git a/src/MessagePackAnalyzer.Vsix/source.extension.vsixmanifest b/src/MessagePackAnalyzer.Vsix/source.extension.vsixmanifest
deleted file mode 100644
index 9b6caf57..00000000
--- a/src/MessagePackAnalyzer.Vsix/source.extension.vsixmanifest
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
- <Metadata>
- <Identity Id="MessagePackAnalyzer..6f156dc4-edce-4392-97cf-44853e392d1c" Version="|%CurrentProject%;GetBuildVersion|" Language="en-US" Publisher="neuecc"/>
- <DisplayName>MessagePackAnalyzer</DisplayName>
- <Description xml:space="preserve">MessagePack AnalyzerMessagePack Analyzer</Description>
- </Metadata>
- <Installation>
- <InstallationTarget Version="[14.0,]" Id="Microsoft.VisualStudio.Pro" />
- </Installation>
- <Assets>
- <Asset Type="Microsoft.VisualStudio.MefComponent" d:Source="Project" d:ProjectName="MessagePackAnalyzer" Path="|MessagePackAnalyzer|"/>
- <Asset Type="Microsoft.VisualStudio.Analyzer" d:Source="Project" d:ProjectName="MessagePackAnalyzer" Path="|MessagePackAnalyzer|" />
- </Assets>
- <Prerequisites>
- <Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,17.0)" DisplayName="Visual Studio core editor" />
- <Prerequisite Id="Microsoft.VisualStudio.Component.Roslyn.LanguageServices" Version="[15.0,17.0)" DisplayName="Roslyn Language Services" />
- </Prerequisites>
-</PackageManifest>
diff --git a/src/MessagePackAnalyzer/MessagePackAnalyzer.cs b/src/MessagePackAnalyzer/MessagePackAnalyzer.cs
index bfb0b21e..7fd3f792 100644
--- a/src/MessagePackAnalyzer/MessagePackAnalyzer.cs
+++ b/src/MessagePackAnalyzer/MessagePackAnalyzer.cs
@@ -16,6 +16,7 @@ namespace MessagePackAnalyzer
public const string UseMessagePackObjectAttributeId = "MsgPack003";
public const string AttributeMessagePackObjectMembersId = "MsgPack004";
public const string InvalidMessagePackObjectId = "MsgPack005";
+ public const string MessagePackFormatterMustBeMessagePackFormatterId = "MsgPack006";
internal const string Category = "Usage";
@@ -35,6 +36,16 @@ namespace MessagePackAnalyzer
isEnabledByDefault: true,
helpLinkUri: AnalyzerUtilities.GetHelpLink(UseMessagePackObjectAttributeId));
+ internal static readonly DiagnosticDescriptor MessageFormatterMustBeMessagePackFormatter = new DiagnosticDescriptor(
+ id: MessagePackFormatterMustBeMessagePackFormatterId,
+ title: "Must be IMessageFormatter",
+ category: Category,
+ messageFormat: "Type must be of IMessagePackFormatter. {0}.", // type.Name
+ description: "Type must be of IMessagePackFormatter.",
+ defaultSeverity: DiagnosticSeverity.Error,
+ isEnabledByDefault: true,
+ helpLinkUri: AnalyzerUtilities.GetHelpLink(UseMessagePackObjectAttributeId));
+
internal static readonly DiagnosticDescriptor PublicMemberNeedsKey = new DiagnosticDescriptor(
id: AttributeMessagePackObjectMembersId,
title: "Attribute public members of MessagePack objects",
@@ -58,7 +69,8 @@ namespace MessagePackAnalyzer
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(
TypeMustBeMessagePackObject,
PublicMemberNeedsKey,
- InvalidMessagePackObject);
+ InvalidMessagePackObject,
+ MessageFormatterMustBeMessagePackFormatter);
public override void Initialize(AnalysisContext context)
{
diff --git a/src/MessagePackAnalyzer/MessagePackAnalyzer.csproj b/src/MessagePackAnalyzer/MessagePackAnalyzer.csproj
index 51952963..5a5a18f8 100644
--- a/src/MessagePackAnalyzer/MessagePackAnalyzer.csproj
+++ b/src/MessagePackAnalyzer/MessagePackAnalyzer.csproj
@@ -11,6 +11,7 @@
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);PackBuildOutputs</TargetsForTfmSpecificContentInPackage>
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
<IncludeSymbols>false</IncludeSymbols>
+ <DevelopmentDependency>true</DevelopmentDependency>
</PropertyGroup>
<ItemGroup>
<Content Include="tools\*.ps1" Pack="true" PackagePath="tools\" />
diff --git a/src/MessagePackAnalyzer/ReferenceSymbols.cs b/src/MessagePackAnalyzer/ReferenceSymbols.cs
index 354599ad..36787e73 100644
--- a/src/MessagePackAnalyzer/ReferenceSymbols.cs
+++ b/src/MessagePackAnalyzer/ReferenceSymbols.cs
@@ -13,12 +13,16 @@ namespace MessagePackAnalyzer
INamedTypeSymbol unionAttribute,
INamedTypeSymbol keyAttribute,
INamedTypeSymbol ignoreAttribute,
+ INamedTypeSymbol formatterAttribute,
+ INamedTypeSymbol messagePackFormatter,
INamedTypeSymbol ignoreDataMemberAttribute)
{
this.MessagePackObjectAttribute = messagePackObjectAttribute;
this.UnionAttribute = unionAttribute;
this.KeyAttribute = keyAttribute;
this.IgnoreAttribute = ignoreAttribute;
+ this.FormatterAttribute = formatterAttribute;
+ this.MessagePackFormatter = messagePackFormatter;
this.IgnoreDataMemberAttribute = ignoreDataMemberAttribute;
}
@@ -30,6 +34,10 @@ namespace MessagePackAnalyzer
internal INamedTypeSymbol IgnoreAttribute { get; }
+ internal INamedTypeSymbol FormatterAttribute { get; }
+
+ internal INamedTypeSymbol MessagePackFormatter { get; }
+
internal INamedTypeSymbol IgnoreDataMemberAttribute { get; }
public static bool TryCreate(Compilation compilation, [NotNullWhen(true)] out ReferenceSymbols? instance)
@@ -60,6 +68,18 @@ namespace MessagePackAnalyzer
return false;
}
+ var formatterAttribute = compilation.GetTypeByMetadataName("MessagePack.MessagePackFormatterAttribute");
+ if (formatterAttribute is null)
+ {
+ return false;
+ }
+
+ var messageFormatter = compilation.GetTypeByMetadataName("MessagePack.Formatters.IMessagePackFormatter");
+ if (messageFormatter is null)
+ {
+ return false;
+ }
+
var ignoreDataMemberAttribute = compilation.GetTypeByMetadataName("System.Runtime.Serialization.IgnoreDataMemberAttribute");
if (ignoreDataMemberAttribute is null)
{
@@ -71,6 +91,8 @@ namespace MessagePackAnalyzer
unionAttribute,
keyAttribute,
ignoreAttribute,
+ formatterAttribute,
+ messageFormatter,
ignoreDataMemberAttribute);
return true;
}
diff --git a/src/MessagePackAnalyzer/TypeCollector.cs b/src/MessagePackAnalyzer/TypeCollector.cs
index 55c481a9..a2ece578 100644
--- a/src/MessagePackAnalyzer/TypeCollector.cs
+++ b/src/MessagePackAnalyzer/TypeCollector.cs
@@ -183,6 +183,22 @@ namespace MessagePackAnalyzer
{
var isClass = !type.IsValueType;
+ AttributeData formatterAttr = type.GetAttributes().FirstOrDefault(x => Equals(x.AttributeClass, this.typeReferences.FormatterAttribute));
+ if (formatterAttr != null)
+ {
+ // Validate that the typed formatter is actually of `IMessagePackFormatter`
+ var formatterType = (ITypeSymbol)formatterAttr.ConstructorArguments[0].Value;
+ var isMessagePackFormatter = formatterType.AllInterfaces.Any(x => x.Equals(this.typeReferences.MessagePackFormatter));
+ if (!isMessagePackFormatter)
+ {
+ var location = formatterAttr.ApplicationSyntaxReference.SyntaxTree.GetLocation(formatterAttr.ApplicationSyntaxReference.Span);
+ var typeInfo = ImmutableDictionary.Create<string, string>().Add("type", formatterType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat));
+ this.ReportContext.Add(Diagnostic.Create(MessagePackAnalyzer.MessageFormatterMustBeMessagePackFormatter, location, typeInfo));
+ }
+
+ return;
+ }
+
AttributeData contractAttr = type.GetAttributes().FirstOrDefault(x => Equals(x.AttributeClass, this.typeReferences.MessagePackObjectAttribute));
if (contractAttr == null)
{
diff --git a/tests/MessagePack.AspNetCoreMvcFormatter.Tests/AspNetCoreMvcFormatterTest.cs b/tests/MessagePack.AspNetCoreMvcFormatter.Tests/AspNetCoreMvcFormatterTest.cs
index 55726235..96b54b31 100644
--- a/tests/MessagePack.AspNetCoreMvcFormatter.Tests/AspNetCoreMvcFormatterTest.cs
+++ b/tests/MessagePack.AspNetCoreMvcFormatter.Tests/AspNetCoreMvcFormatterTest.cs
@@ -181,6 +181,20 @@ namespace MessagePack.Tests.ExtensionTests
inputFormatter.CanRead(inputFormatterContext).IsFalse();
}
+ [Fact]
+ public void MessagePackOutputFormatterSupportsXMsgPack()
+ {
+ var outputFormatter = new MessagePackOutputFormatter();
+ outputFormatter.SupportedMediaTypes.Is(MsgPackContentType);
+ }
+
+ [Fact]
+ public void MessagePackInputFormatterSupportsXMsgPack()
+ {
+ var inputFormatter = new MessagePackInputFormatter();
+ inputFormatter.SupportedMediaTypes.Is(MsgPackContentType);
+ }
+
/// <summary>
/// <see href="https://github.com/aspnet/Mvc/blob/master/test/Microsoft.AspNetCore.Mvc.Formatters.Json.Test/JsonOutputFormatterTests.cs#L453">JsonOutputFormatterTests.cs#L453</see>.
/// </summary>
diff --git a/tests/MessagePack.AspNetCoreMvcFormatter.Tests/MessagePack.AspNetCoreMvcFormatter.Tests.csproj b/tests/MessagePack.AspNetCoreMvcFormatter.Tests/MessagePack.AspNetCoreMvcFormatter.Tests.csproj
index 975fc82a..0a9041bd 100644
--- a/tests/MessagePack.AspNetCoreMvcFormatter.Tests/MessagePack.AspNetCoreMvcFormatter.Tests.csproj
+++ b/tests/MessagePack.AspNetCoreMvcFormatter.Tests/MessagePack.AspNetCoreMvcFormatter.Tests.csproj
@@ -1,14 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>netcoreapp2.1</TargetFramework>
+ <TargetFramework>netcoreapp3.1</TargetFramework>
<IsPackable>false</IsPackable>
<CodeAnalysisRuleSet>..\MessagePack.Tests\MessagePack.Tests.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
- <PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
<PackageReference Include="Moq" Version="4.10.1" />
</ItemGroup>
diff --git a/tests/MessagePack.GeneratedCode.Tests/MessagePack.GeneratedCode.Tests.csproj b/tests/MessagePack.GeneratedCode.Tests/MessagePack.GeneratedCode.Tests.csproj
new file mode 100644
index 00000000..0844ff4e
--- /dev/null
+++ b/tests/MessagePack.GeneratedCode.Tests/MessagePack.GeneratedCode.Tests.csproj
@@ -0,0 +1,21 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <TargetFramework>netcoreapp3.1</TargetFramework>
+
+ <IsPackable>false</IsPackable>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
+ <PackageReference Include="Nerdbank.Streams" Version="2.8.57" />
+ <PackageReference Include="xunit" Version="2.4.0" />
+ <PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
+ <PackageReference Include="coverlet.collector" Version="1.2.0" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\sandbox\Sandbox\Sandbox.csproj" />
+ </ItemGroup>
+
+</Project>
diff --git a/tests/MessagePack.GeneratedCode.Tests/MissingPropertiesTest.cs b/tests/MessagePack.GeneratedCode.Tests/MissingPropertiesTest.cs
new file mode 100644
index 00000000..0db93add
--- /dev/null
+++ b/tests/MessagePack.GeneratedCode.Tests/MissingPropertiesTest.cs
@@ -0,0 +1,105 @@
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using MessagePack.Resolvers;
+using Nerdbank.Streams;
+using SharedData;
+using Xunit;
+
+namespace MessagePack.GeneratedCode.Tests
+{
+ public class MissingPropertiesTest
+ {
+ private readonly MessagePackSerializerOptions options;
+
+ public MissingPropertiesTest()
+ {
+ var resolver = CompositeResolver.Create(GeneratedResolver.Instance, StandardResolver.Instance);
+ options = MessagePackSerializerOptions.Standard.WithResolver(resolver);
+ }
+
+ [Fact]
+ public void DefaultValueStringKeyClassWithoutExplicitConstructorTest()
+ {
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteMapHeader(0);
+ writer.Flush();
+
+ var instance = MessagePackSerializer.Deserialize<DefaultValueStringKeyClassWithoutExplicitConstructor>(seq, options);
+ Assert.Equal(DefaultValueStringKeyClassWithoutExplicitConstructor.Prop1Constant, instance.Prop1);
+ Assert.Equal(DefaultValueStringKeyClassWithoutExplicitConstructor.Prop2Constant, instance.Prop2);
+ }
+
+ [Fact]
+ public void DefaultValueStringKeyClassWithExplicitConstructorTest()
+ {
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteMapHeader(1);
+ writer.Write(nameof(DefaultValueStringKeyClassWithExplicitConstructor.Prop1));
+ writer.Write(-1);
+ writer.Flush();
+
+ var instance = MessagePackSerializer.Deserialize<DefaultValueStringKeyClassWithExplicitConstructor>(seq, options);
+ Assert.Equal(-1, instance.Prop1);
+ Assert.Equal(DefaultValueStringKeyClassWithExplicitConstructor.Prop2Constant, instance.Prop2);
+ }
+
+ [Fact]
+ public void DefaultValueStringKeyStructWithExplicitConstructorTest()
+ {
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteMapHeader(1);
+ writer.Write(nameof(DefaultValueStringKeyStructWithExplicitConstructor.Prop1));
+ writer.Write(-1);
+ writer.Flush();
+
+ var instance = MessagePackSerializer.Deserialize<DefaultValueStringKeyStructWithExplicitConstructor>(seq, options);
+ Assert.Equal(-1, instance.Prop1);
+ Assert.Equal(DefaultValueStringKeyStructWithExplicitConstructor.Prop2Constant, instance.Prop2);
+ }
+
+ [Fact]
+ public void DefaultValueIntKeyClassWithoutExplicitConstructorTest()
+ {
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteArrayHeader(0);
+ writer.Flush();
+
+ var instance = MessagePackSerializer.Deserialize<DefaultValueIntKeyClassWithoutExplicitConstructor>(seq, options);
+ Assert.Equal(DefaultValueIntKeyClassWithoutExplicitConstructor.Prop1Constant, instance.Prop1);
+ Assert.Equal(DefaultValueIntKeyClassWithoutExplicitConstructor.Prop2Constant, instance.Prop2);
+ }
+
+ [Fact]
+ public void DefaultValueIntKeyClassWithExplicitConstructorTest()
+ {
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteArrayHeader(1);
+ writer.Write(-1);
+ writer.Flush();
+
+ var instance = MessagePackSerializer.Deserialize<DefaultValueIntKeyClassWithExplicitConstructor>(seq, options);
+ Assert.Equal(-1, instance.Prop1);
+ Assert.Equal(DefaultValueIntKeyClassWithExplicitConstructor.Prop2Constant, instance.Prop2);
+ }
+
+ [Fact]
+ public void DefaultValueIntKeyStructWithExplicitConstructorTest()
+ {
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteArrayHeader(1);
+ writer.Write(-1);
+ writer.Flush();
+
+ var instance = MessagePackSerializer.Deserialize<DefaultValueIntKeyStructWithExplicitConstructor>(seq, options);
+ Assert.Equal(-1, instance.Prop1);
+ Assert.Equal(DefaultValueIntKeyStructWithExplicitConstructor.Prop2Constant, instance.Prop2);
+ }
+ }
+}
diff --git a/tests/MessagePack.Generator.Tests/GenerateEnumFormatterTest.cs b/tests/MessagePack.Generator.Tests/GenerateEnumFormatterTest.cs
index ac735c3e..2ad23fcb 100644
--- a/tests/MessagePack.Generator.Tests/GenerateEnumFormatterTest.cs
+++ b/tests/MessagePack.Generator.Tests/GenerateEnumFormatterTest.cs
@@ -43,7 +43,7 @@ namespace TempProject
}
}
";
- tempWorkarea.AddFileToProject("MyMessagePackObject.cs", contents);
+ tempWorkarea.AddFileToTargetProject("MyMessagePackObject.cs", contents);
var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
await compiler.GenerateFileAsync(
diff --git a/tests/MessagePack.Generator.Tests/GenerateGenericsFormatterTest.cs b/tests/MessagePack.Generator.Tests/GenerateGenericsFormatterTest.cs
index 05040322..675817fc 100644
--- a/tests/MessagePack.Generator.Tests/GenerateGenericsFormatterTest.cs
+++ b/tests/MessagePack.Generator.Tests/GenerateGenericsFormatterTest.cs
@@ -53,7 +53,7 @@ namespace TempProject
}
}
";
- tempWorkarea.AddFileToProject("MyMessagePackObject.cs", contents);
+ tempWorkarea.AddFileToTargetProject("MyMessagePackObject.cs", contents);
var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
await compiler.GenerateFileAsync(
@@ -100,7 +100,7 @@ namespace TempProject
}
}
";
- tempWorkarea.AddFileToProject("MyMessagePackObject.cs", contents);
+ tempWorkarea.AddFileToTargetProject("MyMessagePackObject.cs", contents);
var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
await compiler.GenerateFileAsync(
@@ -148,7 +148,7 @@ namespace TempProject
}
}
";
- tempWorkarea.AddFileToProject("MyMessagePackObject.cs", contents);
+ tempWorkarea.AddFileToTargetProject("MyMessagePackObject.cs", contents);
var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
await compiler.GenerateFileAsync(
@@ -213,7 +213,7 @@ namespace TempProject
}
}
";
- tempWorkarea.AddFileToProject("MyMessagePackObject.cs", contents);
+ tempWorkarea.AddFileToTargetProject("MyMessagePackObject.cs", contents);
var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
await compiler.GenerateFileAsync(
@@ -297,7 +297,7 @@ namespace TempProject
}
}
";
- tempWorkarea.AddFileToProject("MyMessagePackObject.cs", contents);
+ tempWorkarea.AddFileToTargetProject("MyMessagePackObject.cs", contents);
var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
await compiler.GenerateFileAsync(
@@ -365,7 +365,7 @@ namespace TempProject
}
}
";
- tempWorkarea.AddFileToProject("MyMessagePackObject.cs", contents);
+ tempWorkarea.AddFileToTargetProject("MyMessagePackObject.cs", contents);
var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
await compiler.GenerateFileAsync(
@@ -434,7 +434,7 @@ namespace TempProject
}
}
";
- tempWorkarea.AddFileToProject("MyMessagePackObject.cs", contents);
+ tempWorkarea.AddFileToTargetProject("MyMessagePackObject.cs", contents);
var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
await compiler.GenerateFileAsync(
@@ -503,7 +503,7 @@ namespace TempProject
}
}
";
- tempWorkarea.AddFileToProject("MyMessagePackObject.cs", contents);
+ tempWorkarea.AddFileToTargetProject("MyMessagePackObject.cs", contents);
var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
await compiler.GenerateFileAsync(
@@ -558,7 +558,7 @@ namespace TempProject
}
}
";
- tempWorkarea.AddFileToProject("MyMessagePackObject.cs", contents);
+ tempWorkarea.AddFileToTargetProject("MyMessagePackObject.cs", contents);
var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
await compiler.GenerateFileAsync(
@@ -607,7 +607,7 @@ namespace TempProject
}
}
";
- tempWorkarea.AddFileToProject("MyMessagePackObject.cs", contents);
+ tempWorkarea.AddFileToTargetProject("MyMessagePackObject.cs", contents);
var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
await compiler.GenerateFileAsync(
@@ -664,7 +664,7 @@ namespace TempProject
public interface IMyInterface {}
}
";
- tempWorkarea.AddFileToProject("MyMessagePackObject.cs", contents);
+ tempWorkarea.AddFileToTargetProject("MyMessagePackObject.cs", contents);
var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
await compiler.GenerateFileAsync(
@@ -722,7 +722,7 @@ namespace TempProject
}
}
";
- tempWorkarea.AddFileToProject("MyMessagePackObject.cs", contents);
+ tempWorkarea.AddFileToTargetProject("MyMessagePackObject.cs", contents);
var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
await compiler.GenerateFileAsync(
@@ -781,7 +781,7 @@ namespace TempProject
}
}
";
- tempWorkarea.AddFileToProject("MyMessagePackObject.cs", contents);
+ tempWorkarea.AddFileToTargetProject("MyMessagePackObject.cs", contents);
var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
await compiler.GenerateFileAsync(
@@ -855,7 +855,7 @@ namespace TempProject
}
}
";
- tempWorkarea.AddFileToProject("MyMessagePackObject.cs", contents);
+ tempWorkarea.AddFileToTargetProject("MyMessagePackObject.cs", contents);
var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
await compiler.GenerateFileAsync(
@@ -883,5 +883,82 @@ namespace TempProject
formatterType.TypeParameters[1].ConstraintTypes.Should().BeEmpty();
formatterType.TypeParameters[1].ReferenceTypeConstraintNullableAnnotation.Should().Be(NullableAnnotation.None);
}
+
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public async Task Generics_Defined_In_ReferencedProject(bool isSingleFileOutput)
+ {
+ using var tempWorkarea = TemporaryProjectWorkarea.Create();
+ var defineContents = @"
+using System;
+using System.Collections.Generic;
+using MessagePack;
+
+namespace TempProject
+{
+ [MessagePackObject]
+ public class MyGenericObject<T>
+ {
+ [Key(0)]
+ public T Content { get; set; }
+ }
+}
+ ";
+ tempWorkarea.AddFileToReferencedProject("MyGenericObject.cs", defineContents);
+
+ var usageContents = @"
+using System;
+using System.Collections.Generic;
+using MessagePack;
+
+namespace TempProject
+{
+ [MessagePackObject]
+ public class MyObject
+ {
+ [Key(0)]
+ public MyGenericObject<int> Value { get; set; }
+ }
+
+ [MessagePackObject]
+ public class MyObjectNested
+ {
+ [Key(0)]
+ public MyGenericObject<MyGenericObject<int>> Value { get; set; }
+ }
+}
+ ";
+ tempWorkarea.AddFileToTargetProject("MyObject.cs", usageContents);
+
+ var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
+ await compiler.GenerateFileAsync(
+ tempWorkarea.GetOutputCompilation().Compilation,
+ isSingleFileOutput ? Path.Combine(tempWorkarea.OutputDirectory, "Generated.cs") : tempWorkarea.OutputDirectory,
+ "TempProjectResolver",
+ "TempProject.Generated",
+ false,
+ string.Empty,
+ Array.Empty<string>());
+
+ var compilation = tempWorkarea.GetOutputCompilation();
+ compilation.Compilation.GetDiagnostics().Where(x => x.WarningLevel == 0).Should().BeEmpty();
+
+ var symbols = compilation.GetNamedTypeSymbolsFromGenerated();
+
+ var types = symbols.Select(x => x.ToDisplayString()).ToArray();
+ types.Should().Contain("TempProject.Generated.Formatters.TempProject.MyGenericObjectFormatter<T>");
+
+ var formatters = symbols.SelectMany(x => x.Interfaces).Select(x => x.ToDisplayString()).ToArray();
+ formatters.Should().Contain("MessagePack.Formatters.IMessagePackFormatter<TempProject.MyGenericObject<T>>");
+
+ compilation.GetResolverKnownFormatterTypes().Should().Contain(new[]
+ {
+ "TempProject.Generated.Formatters.TempProject.MyGenericObjectFormatter<global::TempProject.MyGenericObject<int>>",
+ "TempProject.Generated.Formatters.TempProject.MyGenericObjectFormatter<int>",
+ "TempProject.Generated.Formatters.TempProject.MyObjectFormatter",
+ "TempProject.Generated.Formatters.TempProject.MyObjectNestedFormatter",
+ });
+ }
}
}
diff --git a/tests/MessagePack.Generator.Tests/GenerateKeyedFormatterTest.cs b/tests/MessagePack.Generator.Tests/GenerateKeyedFormatterTest.cs
new file mode 100644
index 00000000..50209326
--- /dev/null
+++ b/tests/MessagePack.Generator.Tests/GenerateKeyedFormatterTest.cs
@@ -0,0 +1,164 @@
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Buffers;
+using System.Threading;
+using System.Threading.Tasks;
+using FluentAssertions;
+using MessagePack.Resolvers;
+using Microsoft.CodeAnalysis;
+using Nerdbank.Streams;
+using Xunit;
+using Xunit.Abstractions;
+
+namespace MessagePack.Generator.Tests
+{
+ public class GenerateKeyedFormatterTest
+ {
+ private readonly ITestOutputHelper testOutputHelper;
+
+ public GenerateKeyedFormatterTest(ITestOutputHelper testOutputHelper)
+ {
+ this.testOutputHelper = testOutputHelper;
+ }
+
+ [Fact]
+ public async Task PropertiesGetterSetter()
+ {
+ using var tempWorkarea = TemporaryProjectWorkarea.Create();
+ var contents = @"
+using System;
+using System.Collections.Generic;
+using MessagePack;
+
+namespace TempProject
+{
+ [MessagePackObject(false)]
+ public class MyMessagePackObject
+ {
+ [Key(0)]
+ public int A { get; set; }
+ [Key(1)]
+ public string B { get; set; }
+ }
+}
+ ";
+ tempWorkarea.AddFileToTargetProject("MyMessagePackObject.cs", contents);
+
+ var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
+ await compiler.GenerateFileAsync(
+ tempWorkarea.GetOutputCompilation().Compilation,
+ tempWorkarea.OutputDirectory,
+ "TempProjectResolver",
+ "TempProject.Generated",
+ false,
+ string.Empty,
+ Array.Empty<string>());
+
+ var compilation = tempWorkarea.GetOutputCompilation();
+ compilation.Compilation.GetDiagnostics().Should().NotContain(x => x.Severity == DiagnosticSeverity.Error);
+
+ // Run tests with the generated resolver/formatter assembly.
+ compilation.ExecuteWithGeneratedAssembly((ctx, assembly) =>
+ {
+ var mpoType = assembly.GetType("TempProject.MyMessagePackObject");
+ var options = MessagePackSerializerOptions.Standard
+ .WithResolver(CompositeResolver.Create(
+ StandardResolver.Instance,
+ TestUtilities.GetResolverInstance(assembly, "TempProject.Generated.Resolvers.TempProjectResolver")));
+
+ // Build `[]`
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteArrayHeader(0);
+ writer.Flush();
+
+ dynamic result = MessagePackSerializer.Deserialize(mpoType, seq, options);
+
+ // The deserialized object has default values.
+ ((int)result.A).Should().Be(0);
+ ((string)result.B).Should().BeNull();
+
+ // Verify round trip serialization/deserialization.
+ result.A = 123;
+ result.B = "foobar";
+
+ var serialized = MessagePackSerializer.Serialize(mpoType, (object)result, options);
+ dynamic result2 = MessagePackSerializer.Deserialize(mpoType, serialized, options);
+ ((int)result2.A).Should().Be(123);
+ ((string)result2.B).Should().Be("foobar");
+ });
+ }
+
+ [Fact]
+ public async Task PropertiesGetterOnlyWithParameterizedConstructor()
+ {
+ using var tempWorkarea = TemporaryProjectWorkarea.Create();
+ var contents = @"
+using System;
+using System.Collections.Generic;
+using MessagePack;
+
+namespace TempProject
+{
+ [MessagePackObject(false)]
+ public class MyMessagePackObject
+ {
+ [Key(0)]
+ public int A { get; }
+ [Key(1)]
+ public string B { get; }
+
+ public MyMessagePackObject(int a, string b)
+ {
+ A = a;
+ B = b;
+ }
+ }
+}
+ ";
+ tempWorkarea.AddFileToTargetProject("MyMessagePackObject.cs", contents);
+
+ var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
+ await compiler.GenerateFileAsync(
+ tempWorkarea.GetOutputCompilation().Compilation,
+ tempWorkarea.OutputDirectory,
+ "TempProjectResolver",
+ "TempProject.Generated",
+ false,
+ string.Empty,
+ Array.Empty<string>());
+
+ var compilation = tempWorkarea.GetOutputCompilation();
+ compilation.Compilation.GetDiagnostics().Should().NotContain(x => x.Severity == DiagnosticSeverity.Error);
+
+ // Run tests with the generated resolver/formatter assembly.
+ compilation.ExecuteWithGeneratedAssembly((ctx, assembly) =>
+ {
+ var mpoType = assembly.GetType("TempProject.MyMessagePackObject");
+ var options = MessagePackSerializerOptions.Standard
+ .WithResolver(CompositeResolver.Create(
+ StandardResolver.Instance,
+ TestUtilities.GetResolverInstance(assembly, "TempProject.Generated.Resolvers.TempProjectResolver")));
+
+ // Build `[-1, "foobar"]`
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteArrayHeader(2);
+ writer.Write(-1);
+ writer.Write("foobar");
+ writer.Flush();
+
+ // Verify deserialization
+ dynamic result = MessagePackSerializer.Deserialize(mpoType, seq, options);
+ ((int)result.A).Should().Be(-1);
+ ((string)result.B).Should().Be("foobar");
+
+ // Verify serialization
+ var serialized = MessagePackSerializer.Serialize(mpoType, (object)result, options);
+ serialized.Should().BeEquivalentTo(seq.AsReadOnlySequence.ToArray());
+ });
+ }
+ }
+}
diff --git a/tests/MessagePack.Generator.Tests/GenerateMessagePackFormatterAttrTest.cs b/tests/MessagePack.Generator.Tests/GenerateMessagePackFormatterAttrTest.cs
index 44a778f1..38e08f67 100644
--- a/tests/MessagePack.Generator.Tests/GenerateMessagePackFormatterAttrTest.cs
+++ b/tests/MessagePack.Generator.Tests/GenerateMessagePackFormatterAttrTest.cs
@@ -56,7 +56,7 @@ namespace TempProject
}
}
";
- tempWorkarea.AddFileToProject("MyMessagePackObject.cs", contents);
+ tempWorkarea.AddFileToTargetProject("MyMessagePackObject.cs", contents);
var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
diff --git a/tests/MessagePack.Generator.Tests/GenerateStringKeyedFormatterTest.cs b/tests/MessagePack.Generator.Tests/GenerateStringKeyedFormatterTest.cs
new file mode 100644
index 00000000..1719fb5f
--- /dev/null
+++ b/tests/MessagePack.Generator.Tests/GenerateStringKeyedFormatterTest.cs
@@ -0,0 +1,867 @@
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Buffers;
+using System.IO;
+using System.Linq;
+using System.Runtime.Loader;
+using System.Threading;
+using System.Threading.Tasks;
+using FluentAssertions;
+using MessagePack.Resolvers;
+using Microsoft.CodeAnalysis;
+using Nerdbank.Streams;
+using Xunit;
+using Xunit.Abstractions;
+
+namespace MessagePack.Generator.Tests
+{
+ public class GenerateStringKeyedFormatterTest
+ {
+ private readonly ITestOutputHelper testOutputHelper;
+
+ public GenerateStringKeyedFormatterTest(ITestOutputHelper testOutputHelper)
+ {
+ this.testOutputHelper = testOutputHelper;
+ }
+
+ [Fact]
+ public async Task PropertiesGetterSetter()
+ {
+ using var tempWorkarea = TemporaryProjectWorkarea.Create();
+ var contents = @"
+using System;
+using System.Collections.Generic;
+using MessagePack;
+
+namespace TempProject
+{
+ [MessagePackObject(true)]
+ public class MyMessagePackObject
+ {
+ public int A { get; set; }
+ public string B { get; set; }
+ }
+}
+ ";
+ tempWorkarea.AddFileToTargetProject("MyMessagePackObject.cs", contents);
+
+ var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
+ await compiler.GenerateFileAsync(
+ tempWorkarea.GetOutputCompilation().Compilation,
+ tempWorkarea.OutputDirectory,
+ "TempProjectResolver",
+ "TempProject.Generated",
+ false,
+ string.Empty,
+ Array.Empty<string>());
+
+ var compilation = tempWorkarea.GetOutputCompilation();
+ compilation.Compilation.GetDiagnostics().Should().NotContain(x => x.Severity == DiagnosticSeverity.Error);
+
+ // Run tests with the generated resolver/formatter assembly.
+ compilation.ExecuteWithGeneratedAssembly((ctx, assembly) =>
+ {
+ var mpoType = assembly.GetType("TempProject.MyMessagePackObject");
+ var options = MessagePackSerializerOptions.Standard
+ .WithResolver(CompositeResolver.Create(
+ StandardResolver.Instance,
+ TestUtilities.GetResolverInstance(assembly, "TempProject.Generated.Resolvers.TempProjectResolver")));
+
+ // Build `{ }`.
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteMapHeader(0);
+ writer.Flush();
+
+ // Verify deserialization
+ dynamic result = MessagePackSerializer.Deserialize(mpoType, seq, options);
+ ((int)result.A).Should().Be(0);
+ ((string)result.B).Should().BeNull();
+
+ // Verify round trip serialization/deserialization.
+ result.A = 123;
+ result.B = "foobar";
+
+ var serialized = MessagePackSerializer.Serialize(mpoType, (object)result, options);
+ dynamic result2 = MessagePackSerializer.Deserialize(mpoType, serialized, options);
+ ((int)result2.A).Should().Be(123);
+ ((string)result2.B).Should().Be("foobar");
+ });
+ }
+
+ [Fact]
+ public async Task PropertiesGetterOnlyMixed()
+ {
+ using var tempWorkarea = TemporaryProjectWorkarea.Create();
+ var contents = @"
+using System;
+using System.Collections.Generic;
+using MessagePack;
+
+namespace TempProject
+{
+ [MessagePackObject(true)]
+ public class MyMessagePackObject
+ {
+ public int A { get; }
+ public string B { get; set; }
+ }
+}
+ ";
+ tempWorkarea.AddFileToTargetProject("MyMessagePackObject.cs", contents);
+
+ var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
+ await compiler.GenerateFileAsync(
+ tempWorkarea.GetOutputCompilation().Compilation,
+ tempWorkarea.OutputDirectory,
+ "TempProjectResolver",
+ "TempProject.Generated",
+ false,
+ string.Empty,
+ Array.Empty<string>());
+
+ var compilation = tempWorkarea.GetOutputCompilation();
+ compilation.Compilation.GetDiagnostics().Should().NotContain(x => x.Severity == DiagnosticSeverity.Error);
+
+ // Run tests with the generated resolver/formatter assembly.
+ compilation.ExecuteWithGeneratedAssembly((ctx, assembly) =>
+ {
+ var mpoType = assembly.GetType("TempProject.MyMessagePackObject");
+ var options = MessagePackSerializerOptions.Standard
+ .WithResolver(CompositeResolver.Create(
+ StandardResolver.Instance,
+ TestUtilities.GetResolverInstance(assembly, "TempProject.Generated.Resolvers.TempProjectResolver")));
+
+ // Build `{ "A": -1, "B": "foobar" }`.
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteMapHeader(2);
+ writer.Write("A");
+ writer.Write(-1);
+ writer.Write("B");
+ writer.Write("foobar");
+ writer.Flush();
+
+ // Verify deserialization
+ dynamic result = MessagePackSerializer.Deserialize(mpoType, seq, options);
+ ((int)result.A).Should().Be(0); // default
+ ((string)result.B).Should().Be("foobar"); // from input
+ });
+ }
+
+ [Fact]
+ public async Task PropertiesGetterOnlyIgnore()
+ {
+ using var tempWorkarea = TemporaryProjectWorkarea.Create();
+ var contents = @"
+using System;
+using System.Collections.Generic;
+using MessagePack;
+
+namespace TempProject
+{
+ [MessagePackObject(true)]
+ public class MyMessagePackObject
+ {
+ public int A { get; }
+ public string B { get; }
+ }
+}
+ ";
+ tempWorkarea.AddFileToTargetProject("MyMessagePackObject.cs", contents);
+
+ var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
+ await compiler.GenerateFileAsync(
+ tempWorkarea.GetOutputCompilation().Compilation,
+ tempWorkarea.OutputDirectory,
+ "TempProjectResolver",
+ "TempProject.Generated",
+ false,
+ string.Empty,
+ Array.Empty<string>());
+
+ var compilation = tempWorkarea.GetOutputCompilation();
+ compilation.Compilation.GetDiagnostics().Should().NotContain(x => x.Severity == DiagnosticSeverity.Error);
+
+ // Run tests with the generated resolver/formatter assembly.
+ compilation.ExecuteWithGeneratedAssembly((ctx, assembly) =>
+ {
+ var mpoType = assembly.GetType("TempProject.MyMessagePackObject");
+ var options = MessagePackSerializerOptions.Standard
+ .WithResolver(CompositeResolver.Create(
+ StandardResolver.Instance,
+ TestUtilities.GetResolverInstance(assembly, "TempProject.Generated.Resolvers.TempProjectResolver")));
+
+ // Build `{ "A": -1, "B": "foobar" }`.
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteMapHeader(2);
+ writer.Write("A");
+ writer.Write(-1);
+ writer.Write("B");
+ writer.Write("foobar");
+ writer.Flush();
+
+ // Verify deserialization
+ dynamic result = MessagePackSerializer.Deserialize(mpoType, seq, options);
+ ((int)result.A).Should().Be(0);
+ ((string)result.B).Should().BeNull();
+ });
+ }
+
+ [Fact]
+ public async Task PropertiesGetterOnlyDefaultValue()
+ {
+ using var tempWorkarea = TemporaryProjectWorkarea.Create();
+ var contents = @"
+using System;
+using System.Collections.Generic;
+using MessagePack;
+
+namespace TempProject
+{
+ [MessagePackObject(true)]
+ public class MyMessagePackObject
+ {
+ public int A { get; } = 123;
+ public string B { get; } = ""foobar"";
+ }
+}
+ ";
+ tempWorkarea.AddFileToTargetProject("MyMessagePackObject.cs", contents);
+
+ var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
+ await compiler.GenerateFileAsync(
+ tempWorkarea.GetOutputCompilation().Compilation,
+ tempWorkarea.OutputDirectory,
+ "TempProjectResolver",
+ "TempProject.Generated",
+ false,
+ string.Empty,
+ Array.Empty<string>());
+
+ var compilation = tempWorkarea.GetOutputCompilation();
+ compilation.Compilation.GetDiagnostics().Should().NotContain(x => x.Severity == DiagnosticSeverity.Error);
+
+ // Run tests with the generated resolver/formatter assembly.
+ compilation.ExecuteWithGeneratedAssembly((ctx, assembly) =>
+ {
+ var mpoType = assembly.GetType("TempProject.MyMessagePackObject");
+ var options = MessagePackSerializerOptions.Standard
+ .WithResolver(CompositeResolver.Create(
+ StandardResolver.Instance,
+ TestUtilities.GetResolverInstance(assembly, "TempProject.Generated.Resolvers.TempProjectResolver")));
+
+ // Build `{ }`.
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteMapHeader(0);
+ writer.Flush();
+
+ // Verify deserialization
+ // The deserialized object has default values.
+ dynamic result = MessagePackSerializer.Deserialize(mpoType, seq, options);
+ ((int)result.A).Should().Be(123);
+ ((string)result.B).Should().Be("foobar");
+ });
+ }
+
+ [Fact]
+ public async Task PropertiesGetterSetterWithDefaultValue()
+ {
+ using var tempWorkarea = TemporaryProjectWorkarea.Create();
+ var contents = @"
+using System;
+using System.Collections.Generic;
+using MessagePack;
+
+namespace TempProject
+{
+ [MessagePackObject(true)]
+ public class MyMessagePackObject
+ {
+ public int A { get; set; } = 123;
+ public string B { get; set; } = ""foobar"";
+ }
+}
+ ";
+ tempWorkarea.AddFileToTargetProject("MyMessagePackObject.cs", contents);
+
+ var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
+ await compiler.GenerateFileAsync(
+ tempWorkarea.GetOutputCompilation().Compilation,
+ tempWorkarea.OutputDirectory,
+ "TempProjectResolver",
+ "TempProject.Generated",
+ false,
+ string.Empty,
+ Array.Empty<string>());
+
+ var compilation = tempWorkarea.GetOutputCompilation();
+ compilation.Compilation.GetDiagnostics().Should().NotContain(x => x.Severity == DiagnosticSeverity.Error);
+
+ // Run tests with the generated resolver/formatter assembly.
+ compilation.ExecuteWithGeneratedAssembly((ctx, assembly) =>
+ {
+ var mpoType = assembly.GetType("TempProject.MyMessagePackObject");
+ var options = MessagePackSerializerOptions.Standard
+ .WithResolver(CompositeResolver.Create(
+ StandardResolver.Instance,
+ TestUtilities.GetResolverInstance(assembly, "TempProject.Generated.Resolvers.TempProjectResolver")));
+
+ // Build an empty data.
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteMapHeader(0);
+ writer.Flush();
+
+ // Verify deserialization
+ // The deserialized object has default values.
+ dynamic result = MessagePackSerializer.Deserialize(mpoType, seq, options);
+ ((int)result.A).Should().Be(123);
+ ((string)result.B).Should().Be("foobar");
+
+ // Verify round trip serialization/deserialization.
+ result.A = 456;
+ result.B = "baz";
+
+ var serialized = MessagePackSerializer.Serialize(mpoType, (object)result, options);
+ dynamic result2 = MessagePackSerializer.Deserialize(mpoType, serialized, options);
+ ((int)result2.A).Should().Be(456);
+ ((string)result2.B).Should().Be("baz");
+ });
+ }
+
+ [Fact]
+ public async Task PropertiesGetterSetterWithDefaultValueInputPartially()
+ {
+ using var tempWorkarea = TemporaryProjectWorkarea.Create();
+ var contents = @"
+using System;
+using System.Collections.Generic;
+using MessagePack;
+
+namespace TempProject
+{
+ [MessagePackObject(true)]
+ public class MyMessagePackObject
+ {
+ public int A { get; set; } = 123;
+ public string B { get; set; } = ""foobar"";
+ }
+}
+ ";
+ tempWorkarea.AddFileToTargetProject("MyMessagePackObject.cs", contents);
+
+ var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
+ await compiler.GenerateFileAsync(
+ tempWorkarea.GetOutputCompilation().Compilation,
+ tempWorkarea.OutputDirectory,
+ "TempProjectResolver",
+ "TempProject.Generated",
+ false,
+ string.Empty,
+ Array.Empty<string>());
+
+ var compilation = tempWorkarea.GetOutputCompilation();
+ compilation.Compilation.GetDiagnostics().Should().NotContain(x => x.Severity == DiagnosticSeverity.Error);
+
+ // Run tests with the generated resolver/formatter assembly.
+ compilation.ExecuteWithGeneratedAssembly((ctx, assembly) =>
+ {
+ var mpoType = assembly.GetType("TempProject.MyMessagePackObject");
+ var options = MessagePackSerializerOptions.Standard
+ .WithResolver(CompositeResolver.Create(
+ StandardResolver.Instance,
+ TestUtilities.GetResolverInstance(assembly, "TempProject.Generated.Resolvers.TempProjectResolver")));
+
+ // Build `{ "A": -1 }`
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteMapHeader(1);
+ writer.Write("A");
+ writer.Write(-1);
+ writer.Flush();
+
+ // Verify deserialization
+ // The deserialized object has default value and should preserve it.
+ dynamic result = MessagePackSerializer.Deserialize(mpoType, seq, options);
+ ((int)result.A).Should().Be(-1); // from input
+ ((string)result.B).Should().Be("foobar"); // default value
+
+ // Verify round trip serialization/deserialization.
+ result.A = 456;
+ result.B = "baz";
+
+ var serialized = MessagePackSerializer.Serialize(mpoType, (object)result, options);
+ dynamic result2 = MessagePackSerializer.Deserialize(mpoType, serialized, options);
+ ((int)result2.A).Should().Be(456);
+ ((string)result2.B).Should().Be("baz");
+ });
+ }
+
+ [Fact]
+ public async Task PropertiesGetterOnlyWithParameterizedConstructor()
+ {
+ using var tempWorkarea = TemporaryProjectWorkarea.Create();
+ var contents = @"
+using System;
+using System.Collections.Generic;
+using MessagePack;
+
+namespace TempProject
+{
+ [MessagePackObject(true)]
+ public class MyMessagePackObject
+ {
+ public int A { get; }
+ public string B { get; }
+
+ public MyMessagePackObject(int a, string b)
+ {
+ A = a;
+ B = b;
+ }
+ }
+}
+ ";
+ tempWorkarea.AddFileToTargetProject("MyMessagePackObject.cs", contents);
+
+ var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
+ await compiler.GenerateFileAsync(
+ tempWorkarea.GetOutputCompilation().Compilation,
+ tempWorkarea.OutputDirectory,
+ "TempProjectResolver",
+ "TempProject.Generated",
+ false,
+ string.Empty,
+ Array.Empty<string>());
+
+ var compilation = tempWorkarea.GetOutputCompilation();
+ compilation.Compilation.GetDiagnostics().Should().NotContain(x => x.Severity == DiagnosticSeverity.Error);
+
+ // Run tests with the generated resolver/formatter assembly.
+ compilation.ExecuteWithGeneratedAssembly((ctx, assembly) =>
+ {
+ var mpoType = assembly.GetType("TempProject.MyMessagePackObject");
+ var options = MessagePackSerializerOptions.Standard
+ .WithResolver(CompositeResolver.Create(
+ StandardResolver.Instance,
+ TestUtilities.GetResolverInstance(assembly, "TempProject.Generated.Resolvers.TempProjectResolver")));
+
+ // Build `{ "A": -1, "B": "foobar" }`
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteMapHeader(2);
+ writer.Write("A");
+ writer.Write(-1);
+ writer.Write("B");
+ writer.Write("foobar");
+ writer.Flush();
+
+ // Verify deserialization
+ dynamic result = MessagePackSerializer.Deserialize(mpoType, seq, options);
+ ((int)result.A).Should().Be(-1); // from input
+ ((string)result.B).Should().Be("foobar"); // from input
+
+ // Verify serialization
+ var serialized = MessagePackSerializer.Serialize(mpoType, (object)result, options);
+ serialized.Should().BeEquivalentTo(seq.AsReadOnlySequence.ToArray());
+ });
+ }
+
+ [Fact]
+ public async Task PropertiesGetterOnlyWithParameterizedConstructorPartially()
+ {
+ using var tempWorkarea = TemporaryProjectWorkarea.Create();
+ var contents = @"
+using System;
+using System.Collections.Generic;
+using MessagePack;
+
+namespace TempProject
+{
+ [MessagePackObject(true)]
+ public class MyMessagePackObject
+ {
+ public int A { get; }
+ public string B { get; }
+
+ public MyMessagePackObject(string b)
+ {
+ B = b;
+ }
+ }
+}
+ ";
+ tempWorkarea.AddFileToTargetProject("MyMessagePackObject.cs", contents);
+
+ var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
+ await compiler.GenerateFileAsync(
+ tempWorkarea.GetOutputCompilation().Compilation,
+ tempWorkarea.OutputDirectory,
+ "TempProjectResolver",
+ "TempProject.Generated",
+ false,
+ string.Empty,
+ Array.Empty<string>());
+
+ var compilation = tempWorkarea.GetOutputCompilation();
+ compilation.Compilation.GetDiagnostics().Should().NotContain(x => x.Severity == DiagnosticSeverity.Error);
+
+ // Run tests with the generated resolver/formatter assembly.
+ compilation.ExecuteWithGeneratedAssembly((ctx, assembly) =>
+ {
+ var mpoType = assembly.GetType("TempProject.MyMessagePackObject");
+ var options = MessagePackSerializerOptions.Standard
+ .WithResolver(CompositeResolver.Create(
+ StandardResolver.Instance,
+ TestUtilities.GetResolverInstance(assembly, "TempProject.Generated.Resolvers.TempProjectResolver")));
+
+ // Build `{ "A": -1, "B": "foobar" }`
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteMapHeader(2);
+ writer.Write("A");
+ writer.Write(-1);
+ writer.Write("B");
+ writer.Write("foobar");
+ writer.Flush();
+
+ // Verify deserialization
+ dynamic result = MessagePackSerializer.Deserialize(mpoType, seq, options);
+ ((int)result.A).Should().Be(0); // default value
+ ((string)result.B).Should().Be("foobar"); // from input
+ });
+ }
+
+ [Fact]
+ public async Task PropertiesGetterOnlyWithParameterizedConstructorDefaultValue()
+ {
+ using var tempWorkarea = TemporaryProjectWorkarea.Create();
+ var contents = @"
+using System;
+using System.Collections.Generic;
+using MessagePack;
+
+namespace TempProject
+{
+ [MessagePackObject(true)]
+ public class MyMessagePackObject
+ {
+ public int A { get; } = 12345;
+ public string B { get; } = ""some"";
+
+ public MyMessagePackObject(string b)
+ {
+ B = b;
+ }
+ }
+}
+ ";
+ tempWorkarea.AddFileToTargetProject("MyMessagePackObject.cs", contents);
+
+ var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
+ await compiler.GenerateFileAsync(
+ tempWorkarea.GetOutputCompilation().Compilation,
+ tempWorkarea.OutputDirectory,
+ "TempProjectResolver",
+ "TempProject.Generated",
+ false,
+ string.Empty,
+ Array.Empty<string>());
+
+ var compilation = tempWorkarea.GetOutputCompilation();
+ compilation.Compilation.GetDiagnostics().Should().NotContain(x => x.Severity == DiagnosticSeverity.Error);
+
+ // Run tests with the generated resolver/formatter assembly.
+ compilation.ExecuteWithGeneratedAssembly((ctx, assembly) =>
+ {
+ var mpoType = assembly.GetType("TempProject.MyMessagePackObject");
+ var options = MessagePackSerializerOptions.Standard
+ .WithResolver(CompositeResolver.Create(
+ StandardResolver.Instance,
+ TestUtilities.GetResolverInstance(assembly, "TempProject.Generated.Resolvers.TempProjectResolver")));
+
+ // Build `{ "A": -1, "B": "foobar" }`
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteMapHeader(2);
+ writer.Write("A");
+ writer.Write(-1);
+ writer.Write("B");
+ writer.Write("foobar");
+ writer.Flush();
+
+ // Verify deserialization
+ dynamic result = MessagePackSerializer.Deserialize(mpoType, seq, options);
+ ((int)result.A).Should().Be(12345); // default value
+ ((string)result.B).Should().Be("foobar"); // from input
+ });
+ }
+
+ [Fact]
+ public async Task PropertiesGetterSetterWithParameterizedConstructor()
+ {
+ using var tempWorkarea = TemporaryProjectWorkarea.Create();
+ var contents = @"
+using System;
+using System.Collections.Generic;
+using MessagePack;
+
+namespace TempProject
+{
+ [MessagePackObject(true)]
+ public class MyMessagePackObject
+ {
+ public int A { get; set; }
+ public string B { get; set; }
+
+ public MyMessagePackObject(int a, string b)
+ {
+ A = a;
+ B = b;
+ }
+ }
+}
+ ";
+ tempWorkarea.AddFileToTargetProject("MyMessagePackObject.cs", contents);
+
+ var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
+ await compiler.GenerateFileAsync(
+ tempWorkarea.GetOutputCompilation().Compilation,
+ tempWorkarea.OutputDirectory,
+ "TempProjectResolver",
+ "TempProject.Generated",
+ false,
+ string.Empty,
+ Array.Empty<string>());
+
+ var compilation = tempWorkarea.GetOutputCompilation();
+ compilation.Compilation.GetDiagnostics().Should().NotContain(x => x.Severity == DiagnosticSeverity.Error);
+
+ // Run tests with the generated resolver/formatter assembly.
+ compilation.ExecuteWithGeneratedAssembly((ctx, assembly) =>
+ {
+ var mpoType = assembly.GetType("TempProject.MyMessagePackObject");
+ var options = MessagePackSerializerOptions.Standard
+ .WithResolver(CompositeResolver.Create(
+ StandardResolver.Instance,
+ TestUtilities.GetResolverInstance(assembly, "TempProject.Generated.Resolvers.TempProjectResolver")));
+
+ // Build `{ "A": -1, "B": "foobar" }`
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteMapHeader(2);
+ writer.Write("A");
+ writer.Write(-1);
+ writer.Write("B");
+ writer.Write("foobar");
+ writer.Flush();
+
+ // Verify deserialization
+ dynamic result = MessagePackSerializer.Deserialize(mpoType, seq, options);
+ ((int)result.A).Should().Be(-1); // from input
+ ((string)result.B).Should().Be("foobar"); // from input
+
+ // Verify serialization
+ var serialized = MessagePackSerializer.Serialize(mpoType, (object)result, options);
+ serialized.Should().BeEquivalentTo(seq.AsReadOnlySequence.ToArray());
+ });
+ }
+
+ [Fact]
+ public async Task PropertiesGetterSetterWithParameterizedConstructorPartially()
+ {
+ using var tempWorkarea = TemporaryProjectWorkarea.Create();
+ var contents = @"
+using System;
+using System.Collections.Generic;
+using MessagePack;
+
+namespace TempProject
+{
+ [MessagePackObject(true)]
+ public class MyMessagePackObject
+ {
+ public int A { get; set; }
+ public string B { get; set; }
+
+ public MyMessagePackObject(int a)
+ {
+ A = a;
+ }
+ }
+}
+ ";
+ tempWorkarea.AddFileToTargetProject("MyMessagePackObject.cs", contents);
+
+ var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
+ await compiler.GenerateFileAsync(
+ tempWorkarea.GetOutputCompilation().Compilation,
+ tempWorkarea.OutputDirectory,
+ "TempProjectResolver",
+ "TempProject.Generated",
+ false,
+ string.Empty,
+ Array.Empty<string>());
+
+ var compilation = tempWorkarea.GetOutputCompilation();
+ compilation.Compilation.GetDiagnostics().Should().NotContain(x => x.Severity == DiagnosticSeverity.Error);
+
+ // Run tests with the generated resolver/formatter assembly.
+ compilation.ExecuteWithGeneratedAssembly((ctx, assembly) =>
+ {
+ var mpoType = assembly.GetType("TempProject.MyMessagePackObject");
+ var options = MessagePackSerializerOptions.Standard
+ .WithResolver(CompositeResolver.Create(
+ StandardResolver.Instance,
+ TestUtilities.GetResolverInstance(assembly, "TempProject.Generated.Resolvers.TempProjectResolver")));
+
+ // Build `{ "A": -1, "B": "foobar" }`
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteMapHeader(2);
+ writer.Write("A");
+ writer.Write(-1);
+ writer.Write("B");
+ writer.Write("foobar");
+ writer.Flush();
+
+ // Verify deserialization
+ dynamic result = MessagePackSerializer.Deserialize(mpoType, seq, options);
+ ((int)result.A).Should().Be(-1); // from ctor
+ ((string)result.B).Should().Be("foobar"); // from setter
+
+ // Verify serialization
+ var serialized = MessagePackSerializer.Serialize(mpoType, (object)result, options);
+ serialized.Should().BeEquivalentTo(seq.AsReadOnlySequence.ToArray());
+ });
+ }
+
+ [Fact]
+ public async Task PropertiesGetterSetterWithParameterizedConstructorDoNotUseSetter()
+ {
+ using var tempWorkarea = TemporaryProjectWorkarea.Create();
+ var contents = @"
+using System;
+using System.Collections.Generic;
+using MessagePack;
+
+namespace TempProject
+{
+ [MessagePackObject(true)]
+ public class MyMessagePackObject
+ {
+ public int A { get; set; }
+
+ public MyMessagePackObject(int a)
+ {
+ }
+ }
+}
+ ";
+ tempWorkarea.AddFileToTargetProject("MyMessagePackObject.cs", contents);
+
+ var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
+ await compiler.GenerateFileAsync(
+ tempWorkarea.GetOutputCompilation().Compilation,
+ tempWorkarea.OutputDirectory,
+ "TempProjectResolver",
+ "TempProject.Generated",
+ false,
+ string.Empty,
+ Array.Empty<string>());
+
+ var compilation = tempWorkarea.GetOutputCompilation();
+ compilation.Compilation.GetDiagnostics().Should().NotContain(x => x.Severity == DiagnosticSeverity.Error);
+
+ // Run tests with the generated resolver/formatter assembly.
+ compilation.ExecuteWithGeneratedAssembly((ctx, assembly) =>
+ {
+ var mpoType = assembly.GetType("TempProject.MyMessagePackObject");
+ var options = MessagePackSerializerOptions.Standard
+ .WithResolver(CompositeResolver.Create(
+ StandardResolver.Instance,
+ TestUtilities.GetResolverInstance(assembly, "TempProject.Generated.Resolvers.TempProjectResolver")));
+
+ // Build `{ "A": -1 }`
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteMapHeader(1);
+ writer.Write("A");
+ writer.Write(-1);
+ writer.Flush();
+
+ // Verify deserialization
+ dynamic result = MessagePackSerializer.Deserialize(mpoType, seq, options);
+ ((int)result.A).Should().Be(0);
+ });
+ }
+
+ [Fact]
+ public async Task PropertiesGetterSetterWithParameterizedConstructorAndDefaultValue()
+ {
+ using var tempWorkarea = TemporaryProjectWorkarea.Create();
+ var contents = @"
+using System;
+using System.Collections.Generic;
+using MessagePack;
+
+namespace TempProject
+{
+ [MessagePackObject(true)]
+ public class MyMessagePackObject
+ {
+ public int A { get; set; }
+ public string B { get; set; } = ""foobar"";
+
+ public MyMessagePackObject(int a)
+ {
+ A = a;
+ }
+ }
+}
+ ";
+ tempWorkarea.AddFileToTargetProject("MyMessagePackObject.cs", contents);
+
+ var compiler = new MessagePackCompiler.CodeGenerator(testOutputHelper.WriteLine, CancellationToken.None);
+ await compiler.GenerateFileAsync(
+ tempWorkarea.GetOutputCompilation().Compilation,
+ tempWorkarea.OutputDirectory,
+ "TempProjectResolver",
+ "TempProject.Generated",
+ false,
+ string.Empty,
+ Array.Empty<string>());
+
+ var compilation = tempWorkarea.GetOutputCompilation();
+ compilation.Compilation.GetDiagnostics().Should().NotContain(x => x.Severity == DiagnosticSeverity.Error);
+
+ // Run tests with the generated resolver/formatter assembly.
+ compilation.ExecuteWithGeneratedAssembly((ctx, assembly) =>
+ {
+ var mpoType = assembly.GetType("TempProject.MyMessagePackObject");
+ var options = MessagePackSerializerOptions.Standard
+ .WithResolver(CompositeResolver.Create(
+ StandardResolver.Instance,
+ TestUtilities.GetResolverInstance(assembly, "TempProject.Generated.Resolvers.TempProjectResolver")));
+
+ // Build `{ "A": -1 }`
+ var seq = new Sequence<byte>();
+ var writer = new MessagePackWriter(seq);
+ writer.WriteMapHeader(1);
+ writer.Write("A");
+ writer.Write(-1);
+ writer.Flush();
+
+ // Verify deserialization
+ dynamic result = MessagePackSerializer.Deserialize(mpoType, seq, options);
+ ((int)result.A).Should().Be(-1); // from ctor
+ ((string)result.B).Should().Be("foobar"); // default value
+ });
+ }
+ }
+}
diff --git a/tests/MessagePack.Generator.Tests/MessagePack.Generator.Tests.csproj b/tests/MessagePack.Generator.Tests/MessagePack.Generator.Tests.csproj
index 08a0c802..7c12e7f5 100644
--- a/tests/MessagePack.Generator.Tests/MessagePack.Generator.Tests.csproj
+++ b/tests/MessagePack.Generator.Tests/MessagePack.Generator.Tests.csproj
@@ -10,10 +10,11 @@
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.10.3" />
- <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.6.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
+ <PackageReference Include="Nerdbank.Streams" Version="2.8.57" />
+
<PackageReference Include="xunit" Version="2.4.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
<PackageReference Include="coverlet.collector" Version="1.2.0" />
diff --git a/tests/MessagePack.Generator.Tests/TemporaryProjectWorkarea.cs b/tests/MessagePack.Generator.Tests/TemporaryProjectWorkarea.cs
index f3277665..243e9fcb 100644
--- a/tests/MessagePack.Generator.Tests/TemporaryProjectWorkarea.cs
+++ b/tests/MessagePack.Generator.Tests/TemporaryProjectWorkarea.cs
@@ -6,11 +6,13 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
+using System.Runtime.Loader;
using System.Threading.Tasks;
using MessagePack.Formatters;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
+using Nerdbank.Streams;
namespace MessagePack.Generator.Tests
{
@@ -20,12 +22,28 @@ namespace MessagePack.Generator.Tests
public class TemporaryProjectWorkarea : IDisposable
{
private readonly string tempDirPath;
- private readonly string csprojFileName = "TempProject.csproj";
+ private readonly string targetCsprojFileName = "TempTargetProject.csproj";
+ private readonly string referencedCsprojFileName = "TempReferencedProject.csproj";
private readonly bool cleanOnDisposing;
- public string CsProjectPath { get; }
+ /// <summary>
+ /// Gets the identifier of the workarea.
+ /// </summary>
+ public Guid WorkareaId { get; }
- public string ProjectDirectory { get; }
+ /// <summary>
+ /// Gets Generator target csproj file path.
+ /// </summary>
+ public string TargetCsProjectPath { get; }
+
+ /// <summary>
+ /// Gets csproj file path Referenced from TargetProject.
+ /// </summary>
+ public string ReferencedCsProjectPath { get; }
+
+ public string TargetProjectDirectory { get; }
+
+ public string ReferencedProjectDirectory { get; }
public string OutputDirectory { get; }
@@ -36,20 +54,38 @@ namespace MessagePack.Generator.Tests
private TemporaryProjectWorkarea(bool cleanOnDisposing)
{
+ WorkareaId = Guid.NewGuid();
this.cleanOnDisposing = cleanOnDisposing;
- this.tempDirPath = Path.Combine(Path.GetTempPath(), $"MessagePack.Generator.Tests-{Guid.NewGuid()}");
+ this.tempDirPath = Path.Combine(Path.GetTempPath(), $"MessagePack.Generator.Tests-{WorkareaId}");
- ProjectDirectory = Path.Combine(tempDirPath, "Project");
+ TargetProjectDirectory = Path.Combine(tempDirPath, "TargetProject");
+ ReferencedProjectDirectory = Path.Combine(tempDirPath, "ReferencedProject");
OutputDirectory = Path.Combine(tempDirPath, "Output");
- Directory.CreateDirectory(ProjectDirectory);
+ Directory.CreateDirectory(TargetProjectDirectory);
+ Directory.CreateDirectory(ReferencedProjectDirectory);
Directory.CreateDirectory(OutputDirectory);
+ Directory.CreateDirectory(Path.Combine(OutputDirectory, "bin"));
var solutionRootDir = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "../../../.."));
var messagePackProjectDir = Path.Combine(solutionRootDir, "src/MessagePack/MessagePack.csproj");
var annotationsProjectDir = Path.Combine(solutionRootDir, "src/MessagePack.Annotations/MessagePack.Annotations.csproj");
- CsProjectPath = Path.Combine(ProjectDirectory, csprojFileName);
+ ReferencedCsProjectPath = Path.Combine(ReferencedProjectDirectory, referencedCsprojFileName);
+ var referencedCsprojContents = @"
+<Project Sdk=""Microsoft.NET.Sdk"">
+ <PropertyGroup>
+ <TargetFramework>netstandard2.0</TargetFramework>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include=""" + annotationsProjectDir + @""" />
+ </ItemGroup>
+</Project>
+";
+ AddFileToReferencedProject(referencedCsprojFileName, referencedCsprojContents);
+
+ TargetCsProjectPath = Path.Combine(TargetProjectDirectory, targetCsprojFileName);
var csprojContents = @"
<Project Sdk=""Microsoft.NET.Sdk"">
<PropertyGroup>
@@ -59,26 +95,56 @@ namespace MessagePack.Generator.Tests
<ItemGroup>
<ProjectReference Include=""" + messagePackProjectDir + @""" />
<ProjectReference Include=""" + annotationsProjectDir + @""" />
+ <ProjectReference Include=""" + ReferencedCsProjectPath + @""" />
</ItemGroup>
</Project>
";
- AddFileToProject(csprojFileName, csprojContents);
+ AddFileToTargetProject(targetCsprojFileName, csprojContents);
+ }
+
+ /// <summary>
+ /// Add file to Generator target project.
+ /// </summary>
+ public void AddFileToTargetProject(string fileName, string contents)
+ {
+ File.WriteAllText(Path.Combine(TargetProjectDirectory, fileName), contents.Trim());
}
- public void AddFileToProject(string fileName, string contents)
+ /// <summary>
+ /// Add file to project, referenced by Generator target project.
+ /// </summary>
+ public void AddFileToReferencedProject(string fileName, string contents)
{
- File.WriteAllText(Path.Combine(ProjectDirectory, fileName), contents.Trim());
+ File.WriteAllText(Path.Combine(ReferencedProjectDirectory, fileName), contents.Trim());
}
public OutputCompilation GetOutputCompilation()
{
var refAsmDir = Path.GetDirectoryName(typeof(object).Assembly.Location);
+ var referenceCompilation = CSharpCompilation.Create(Guid.NewGuid().ToString())
+ .AddSyntaxTrees(
+ Directory.EnumerateFiles(ReferencedProjectDirectory, "*.cs", SearchOption.AllDirectories)
+ .Select(x => CSharpSyntaxTree.ParseText(File.ReadAllText(x), CSharpParseOptions.Default, x)))
+ .AddReferences(MetadataReference.CreateFromFile(Path.Combine(refAsmDir, "System.Private.CoreLib.dll")))
+ .AddReferences(MetadataReference.CreateFromFile(Path.Combine(refAsmDir, "System.Runtime.Extensions.dll")))
+ .AddReferences(MetadataReference.CreateFromFile(Path.Combine(refAsmDir, "System.Collections.dll")))
+ .AddReferences(MetadataReference.CreateFromFile(Path.Combine(refAsmDir, "System.Linq.dll")))
+ .AddReferences(MetadataReference.CreateFromFile(Path.Combine(refAsmDir, "System.Console.dll")))
+ .AddReferences(MetadataReference.CreateFromFile(Path.Combine(refAsmDir, "System.Runtime.dll")))
+ .AddReferences(MetadataReference.CreateFromFile(Path.Combine(refAsmDir, "System.Memory.dll")))
+ .AddReferences(MetadataReference.CreateFromFile(Path.Combine(refAsmDir, "netstandard.dll")))
+ .AddReferences(MetadataReference.CreateFromFile(typeof(object).Assembly.Location))
+ .AddReferences(MetadataReference.CreateFromFile(typeof(MessagePack.MessagePackObjectAttribute).Assembly.Location))
+ .AddReferences(MetadataReference.CreateFromFile(typeof(IMessagePackFormatter<>).Assembly.Location))
+ .WithOptions(new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary));
+
var compilation = CSharpCompilation.Create(Guid.NewGuid().ToString())
.AddSyntaxTrees(
- Directory.EnumerateFiles(ProjectDirectory, "*.cs", SearchOption.AllDirectories)
+ Directory.EnumerateFiles(TargetProjectDirectory, "*.cs", SearchOption.AllDirectories)
.Concat(Directory.EnumerateFiles(OutputDirectory, "*.cs", SearchOption.AllDirectories))
.Select(x => CSharpSyntaxTree.ParseText(File.ReadAllText(x), CSharpParseOptions.Default, x)))
+ .AddReferences(referenceCompilation.ToMetadataReference())
.AddReferences(MetadataReference.CreateFromFile(Path.Combine(refAsmDir, "System.Private.CoreLib.dll")))
.AddReferences(MetadataReference.CreateFromFile(Path.Combine(refAsmDir, "System.Runtime.Extensions.dll")))
.AddReferences(MetadataReference.CreateFromFile(Path.Combine(refAsmDir, "System.Collections.dll")))
@@ -92,7 +158,7 @@ namespace MessagePack.Generator.Tests
.AddReferences(MetadataReference.CreateFromFile(typeof(IMessagePackFormatter<>).Assembly.Location))
.WithOptions(new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary));
- return new OutputCompilation(compilation);
+ return new OutputCompilation(this, compilation);
}
public void Dispose()
@@ -106,10 +172,13 @@ namespace MessagePack.Generator.Tests
public class OutputCompilation
{
+ private readonly TemporaryProjectWorkarea workarea;
+
public Compilation Compilation { get; }
- public OutputCompilation(Compilation compilation)
+ public OutputCompilation(TemporaryProjectWorkarea workarea, Compilation compilation)
{
+ this.workarea = workarea;
this.Compilation = compilation ?? throw new ArgumentNullException(nameof(compilation));
}
@@ -146,5 +215,26 @@ namespace MessagePack.Generator.Tests
.Select(x => x.ToString()))
.ToArray();
}
+
+ /// <summary>
+ /// Load the generated assembly and execute the code in that context.
+ /// </summary>
+ public void ExecuteWithGeneratedAssembly(Action<AssemblyLoadContext, Assembly> action)
+ {
+ var memoryStream = new MemoryStream();
+ Compilation.Emit(memoryStream);
+ memoryStream.Position = 0;
+
+ var assemblyLoadContext = new AssemblyLoadContext($"TempProject-{workarea.WorkareaId}", isCollectible: true);
+ try
+ {
+ Assembly assembly = assemblyLoadContext.LoadFromStream(memoryStream);
+ action(assemblyLoadContext, assembly);
+ }
+ finally
+ {
+ assemblyLoadContext.Unload();
+ }
+ }
}
}
diff --git a/tests/MessagePack.Generator.Tests/TestUtilities.cs b/tests/MessagePack.Generator.Tests/TestUtilities.cs
new file mode 100644
index 00000000..ad6bb13f
--- /dev/null
+++ b/tests/MessagePack.Generator.Tests/TestUtilities.cs
@@ -0,0 +1,22 @@
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System.Reflection;
+
+namespace MessagePack.Generator.Tests
+{
+ internal static class TestUtilities
+ {
+ /// <summary>
+ /// Fetches the static instance of the named resolver, by its <see langword="public" /> <see langword="static"/> <c>Instance</c> property.
+ /// </summary>
+ /// <param name="assembly">The assembly to retrieve the resolver from.</param>
+ /// <param name="name">The full name of the resolver.</param>
+ /// <returns>The resolver.</returns>
+ internal static IFormatterResolver GetResolverInstance(Assembly assembly, string name)
+ {
+ var resolverType = assembly.GetType(name);
+ return (IFormatterResolver)resolverType.GetField("Instance", BindingFlags.Static | BindingFlags.Public).GetValue(null);
+ }
+ }
+}
diff --git a/tests/MessagePack.Internal.Tests/MessagePack.Internal.Tests.csproj b/tests/MessagePack.Internal.Tests/MessagePack.Internal.Tests.csproj
index f75ede3e..61f97964 100644
--- a/tests/MessagePack.Internal.Tests/MessagePack.Internal.Tests.csproj
+++ b/tests/MessagePack.Internal.Tests/MessagePack.Internal.Tests.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>netcoreapp2.2</TargetFrameworks>
+ <TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<CodeAnalysisRuleSet>..\MessagePack.Tests\MessagePack.Tests.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
diff --git a/tests/MessagePack.Tests/DynamicObjectResolverRecordsTests.cs b/tests/MessagePack.Tests/DynamicObjectResolverRecordsTests.cs
new file mode 100644
index 00000000..483fe4ce
--- /dev/null
+++ b/tests/MessagePack.Tests/DynamicObjectResolverRecordsTests.cs
@@ -0,0 +1,101 @@
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using MessagePack.Resolvers;
+using Xunit;
+
+#if NET5_0_OR_GREATER
+
+namespace MessagePack.Tests
+{
+ public class DynamicObjectResolverRecordsTests : TestBase
+ {
+ [Fact]
+ public void RoundtripRecord()
+ {
+ this.AssertRoundTrip(new Person { FirstName = "bob", LastName = "smith" });
+ }
+
+ [Fact]
+ public void RoundtripPositionalRecord()
+ {
+ this.AssertRoundTrip(new PersonPositional("bob", "smith"));
+ }
+
+ [Fact]
+ public void RoundtripGenericPositionalRecord()
+ {
+ this.AssertRoundTrip(new GenericPersonPositional<int>("bob", "smith"));
+ }
+
+ [Fact]
+ public void RoundtripDerivedRecord()
+ {
+ this.AssertRoundTrip(new Student { FirstName = "bob", LastName = "smith", Grade = 5 });
+ }
+
+ [Fact]
+ public void RoundtripPositionalDerivedRecord()
+ {
+ this.AssertRoundTrip(new StudentPositional("bob", "smith", 5));
+ }
+
+ [Fact]
+ public void RoundtripRecordWithPrivateProperties()
+ {
+ var original = new RecordWithPrivateProperties("PublicValue");
+ original.SetPrivateProperty("PrivateValue");
+ var deserializedValue = this.AssertRoundTrip(original, allowPrivate: true);
+ Assert.Equal(original.GetPrivateProperty(), deserializedValue.GetPrivateProperty());
+ }
+
+ protected T AssertRoundTrip<T>(T value, bool allowPrivate = false)
+ {
+ var options = allowPrivate ? StandardResolverAllowPrivate.Options : MessagePackSerializerOptions.Standard;
+ byte[] msgpack = MessagePackSerializer.Serialize(value, options, this.TimeoutToken);
+ T deserializedValue = MessagePackSerializer.Deserialize<T>(msgpack, options, this.TimeoutToken);
+ Assert.Equal(value, deserializedValue);
+ return deserializedValue;
+ }
+
+ [MessagePackObject]
+ public record GenericPersonPositional<T>([property: Key(0)] string FirstName, [property: Key(1)] string LastName);
+
+ [MessagePackObject]
+ public record PersonPositional([property: Key(0)] string FirstName, [property: Key(1)] string LastName);
+
+ [MessagePackObject]
+ public record StudentPositional(string FirstName, string LastName, [property: Key(2)] int Grade)
+ : PersonPositional(FirstName, LastName);
+
+ [MessagePackObject]
+ public record Person
+ {
+ [Key(0)]
+ public string FirstName { get; init; }
+
+ [Key(1)]
+ public string LastName { get; init; }
+ }
+
+ [MessagePackObject]
+ public record Student : Person
+ {
+ [Key(2)]
+ public int Grade { get; init; }
+ }
+
+ [MessagePackObject]
+ public record RecordWithPrivateProperties([property: Key(0)] string SomePublicProperty)
+ {
+ [Key(1)]
+ private string SomePrivateProperty { get; set; }
+
+ public string GetPrivateProperty() => this.SomePrivateProperty;
+
+ public void SetPrivateProperty(string value) => this.SomePrivateProperty = value;
+ }
+ }
+}
+
+#endif
diff --git a/tests/MessagePack.Tests/IsExternalInit.cs b/tests/MessagePack.Tests/IsExternalInit.cs
new file mode 100644
index 00000000..62f1255f
--- /dev/null
+++ b/tests/MessagePack.Tests/IsExternalInit.cs
@@ -0,0 +1,18 @@
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+#if !NET5_0_OR_GREATER
+
+#pragma warning disable CA1812
+
+namespace System.Runtime.CompilerServices
+{
+ /// <summary>
+ /// Used by C# 9 for property <c>init</c> accessors.
+ /// </summary>
+ internal sealed class IsExternalInit
+ {
+ }
+}
+
+#endif
diff --git a/tests/MessagePack.Tests/MessagePack.Tests.csproj b/tests/MessagePack.Tests/MessagePack.Tests.csproj
index 4c2da233..5fb26383 100644
--- a/tests/MessagePack.Tests/MessagePack.Tests.csproj
+++ b/tests/MessagePack.Tests/MessagePack.Tests.csproj
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>net472;netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
+ <TargetFrameworks>net472;netcoreapp3.1;net6.0</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <LangVersion>8.0</LangVersion>
+ <LangVersion>10</LangVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
<NoWarn>$(NoWarn);CS1701</NoWarn>
@@ -27,7 +27,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="MsgPack.Cli" version="0.9.0-beta2" />
- <PackageReference Include="Nerdbank.Streams" Version="2.4.48" />
+ <PackageReference Include="Nerdbank.Streams" Version="2.8.57" />
<PackageReference Include="ReactiveProperty" version="4.2.2" />
<PackageReference Include="xunit" version="2.4.1" />
<PackageReference Include="xunit.runner.console" Version="2.4.1" />
diff --git a/tests/MessagePack.Tests/MessagePackStreamReaderArrayTests.cs b/tests/MessagePack.Tests/MessagePackStreamReaderArrayTests.cs
index 69d5c0de..80f38fef 100644
--- a/tests/MessagePack.Tests/MessagePackStreamReaderArrayTests.cs
+++ b/tests/MessagePack.Tests/MessagePackStreamReaderArrayTests.cs
@@ -33,6 +33,19 @@ namespace MessagePack.Tests
}
[Fact]
+ public async Task ReadArrayHeader()
+ {
+ var reader = new MessagePackStreamReader(this.arraySequence.AsStream());
+ var length = await reader.ReadArrayHeaderAsync(this.TimeoutToken);
+ Assert.Equal(ArrayContent.Count, length);
+ for (var i = 0; i < length; i++)
+ {
+ var elementSequence = await reader.ReadAsync(this.TimeoutToken);
+ Assert.Equal(ArrayContent[i], MessagePackSerializer.Deserialize<object>(elementSequence.Value));
+ }
+ }
+
+ [Fact]
public async Task EnumerateArrayElements_AllAtOnce()
{
var reader = new MessagePackStreamReader(this.arraySequence.AsStream());
diff --git a/tests/MessagePack.Tests/MessagePackStreamReaderMapTests.cs b/tests/MessagePack.Tests/MessagePackStreamReaderMapTests.cs
new file mode 100644
index 00000000..ef33055e
--- /dev/null
+++ b/tests/MessagePack.Tests/MessagePackStreamReaderMapTests.cs
@@ -0,0 +1,48 @@
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Buffers;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Nerdbank.Streams;
+using Xunit;
+
+namespace MessagePack.Tests
+{
+ public class MessagePackStreamReaderMapTests : TestBase
+ {
+ private static readonly IReadOnlyList<object> MapContent = new object[] { (byte)5, "2", "23", "234", "2345" };
+ private readonly ReadOnlySequence<byte> arraySequence;
+
+ public MessagePackStreamReaderMapTests()
+ {
+ var sequence = new Sequence<byte>();
+ var writer = new MessagePackWriter(sequence);
+
+ writer.WriteMapHeader(MapContent.Count);
+
+ for (int i = 0; i < MapContent.Count; i++)
+ {
+ MessagePackSerializer.Serialize(ref writer, MapContent[i]);
+ writer.Flush();
+ }
+
+ this.arraySequence = sequence;
+ }
+
+ [Fact]
+ public async Task ReadMapHeader()
+ {
+ var reader = new MessagePackStreamReader(this.arraySequence.AsStream());
+ var count = await reader.ReadMapHeaderAsync(this.TimeoutToken);
+ Assert.Equal(MapContent.Count, count);
+ for (var i = 0; i < count; i++)
+ {
+ var elementSequence = await reader.ReadAsync(this.TimeoutToken);
+ Assert.Equal(MapContent[i], MessagePackSerializer.Deserialize<object>(elementSequence.Value));
+ }
+ }
+ }
+}
diff --git a/tests/MessagePackAnalyzer.Tests/MessagePackAnalyzerTests.cs b/tests/MessagePackAnalyzer.Tests/MessagePackAnalyzerTests.cs
index 9e27d3cc..8fc4c65f 100644
--- a/tests/MessagePackAnalyzer.Tests/MessagePackAnalyzerTests.cs
+++ b/tests/MessagePackAnalyzer.Tests/MessagePackAnalyzerTests.cs
@@ -2,8 +2,11 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Threading.Tasks;
+using Microsoft.CodeAnalysis;
+using Microsoft.CodeAnalysis.Testing;
using Xunit;
-using VerifyCS = CSharpCodeFixVerifier<MessagePackAnalyzer.MessagePackAnalyzer, MessagePackAnalyzer.MessagePackCodeFixProvider>;
+using VerifyCS =
+ CSharpCodeFixVerifier<MessagePackAnalyzer.MessagePackAnalyzer, MessagePackAnalyzer.MessagePackCodeFixProvider>;
public class MessagePackAnalyzerTests
{
@@ -24,6 +27,54 @@ public class Foo
}
[Fact]
+ public async Task MessageFormatterAttribute()
+ {
+ string input = Preamble + @"using MessagePack.Formatters;
+
+public class FooFormatter : IMessagePackFormatter<Foo> {
+ public void Serialize(ref MessagePackWriter writer, Foo value, MessagePackSerializerOptions options) {}
+ public Foo Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) => default;
+}
+
+
+[MessagePackFormatter(typeof(FooFormatter))]
+public struct Foo
+{
+}
+
+[MessagePackObject]
+public class SomeClass {
+ [Key(0)]
+ public Foo SomeFoo { get; set; }
+}
+";
+
+ await VerifyCS.VerifyAnalyzerAsync(input);
+ }
+
+ [Fact]
+ public async Task InvalidMessageFormatterType()
+ {
+ string input = Preamble + @"using MessagePack.Formatters;
+
+public class InvalidMessageFormatter { }
+
+[{|MsgPack006:MessagePackFormatter(typeof(InvalidMessageFormatter))|}]
+public struct Foo
+{
+}
+
+[MessagePackObject]
+public class SomeClass {
+ [Key(0)]
+ public Foo SomeFoo { get; set; }
+}
+";
+
+ await VerifyCS.VerifyAnalyzerAsync(input);
+ }
+
+ [Fact]
public async Task NullStringKey()
{
string input = Preamble + @"
@@ -106,12 +157,13 @@ public class Bar
{
var inputs = new string[]
{
- @"
+ @"
public class Foo
{
public int {|MsgPack004:Member1|} { get; set; }
}
-", @"using MessagePack;
+",
+ @"using MessagePack;
[MessagePackObject]
public class Bar : Foo
@@ -122,13 +174,14 @@ public class Bar : Foo
};
var outputs = new string[]
{
- @"
+ @"
public class Foo
{
[MessagePack.Key(1)]
public int Member1 { get; set; }
}
-", @"using MessagePack;
+",
+ @"using MessagePack;
[MessagePackObject]
public class Bar : Foo
diff --git a/tools/Check-DotNetRuntime.ps1 b/tools/Check-DotNetRuntime.ps1
new file mode 100644
index 00000000..9d012109
--- /dev/null
+++ b/tools/Check-DotNetRuntime.ps1
@@ -0,0 +1,41 @@
+<#
+.SYNOPSIS
+ Checks whether a given .NET Core runtime is installed.
+#>
+[CmdletBinding()]
+Param (
+ [Parameter()]
+ [ValidateSet('Microsoft.AspNetCore.App','Microsoft.NETCore.App')]
+ [string]$Runtime='Microsoft.NETCore.App',
+ [Parameter(Mandatory=$true)]
+ [Version]$Version
+)
+
+$dotnet = Get-Command dotnet -ErrorAction SilentlyContinue
+if (!$dotnet) {
+ # Nothing is installed.
+ Write-Output $false
+ exit 1
+}
+
+Function IsVersionMatch {
+ Param(
+ [Parameter()]
+ $actualVersion
+ )
+ return $actualVersion -and
+ $Version.Major -eq $actualVersion.Major -and
+ $Version.Minor -eq $actualVersion.Minor -and
+ (($Version.Build -eq -1) -or ($Version.Build -eq $actualVersion.Build)) -and
+ (($Version.Revision -eq -1) -or ($Version.Revision -eq $actualVersion.Revision))
+}
+
+$installedRuntimes = dotnet --list-runtimes |? { $_.Split()[0] -ieq $Runtime } |% { $v = $null; [Version]::tryparse($_.Split()[1], [ref] $v); $v }
+$matchingRuntimes = $installedRuntimes |? { IsVersionMatch -actualVersion $_ }
+if (!$matchingRuntimes) {
+ Write-Output $false
+ exit 1
+}
+
+Write-Output $true
+exit 0
diff --git a/tools/Check-DotNetSdk.ps1 b/tools/Check-DotNetSdk.ps1
new file mode 100644
index 00000000..6c9fa772
--- /dev/null
+++ b/tools/Check-DotNetSdk.ps1
@@ -0,0 +1,37 @@
+<#
+.SYNOPSIS
+ Checks whether the .NET Core SDK required by this repo is installed.
+#>
+[CmdletBinding()]
+Param (
+)
+
+$dotnet = Get-Command dotnet -ErrorAction SilentlyContinue
+if (!$dotnet) {
+ # Nothing is installed.
+ Write-Output $false
+ exit 1
+}
+
+# We need to set the current directory so dotnet considers the SDK required by our global.json file.
+Push-Location "$PSScriptRoot\.."
+try {
+ dotnet -h 2>&1 | Out-Null
+ if (($LASTEXITCODE -eq 129) -or # On Linux
+ ($LASTEXITCODE -eq -2147450751) # On Windows
+ ) {
+ # These exit codes indicate no matching SDK exists.
+ Write-Output $false
+ exit 2
+ }
+
+ # The required SDK is already installed!
+ Write-Output $true
+ exit 0
+} catch {
+ # I don't know why, but on some build agents (e.g. MicroBuild), an exception is thrown from the `dotnet` invocation when a match is not found.
+ Write-Output $false
+ exit 3
+} finally {
+ Pop-Location
+}
diff --git a/tools/Install-DotNetSdk.ps1 b/tools/Install-DotNetSdk.ps1
index 05cfef02..0606d802 100755
--- a/tools/Install-DotNetSdk.ps1
+++ b/tools/Install-DotNetSdk.ps1
@@ -2,19 +2,19 @@
<#
.SYNOPSIS
-Installs the .NET SDK specified in the global.json file at the root of this repository,
-along with supporting .NET Core runtimes used for testing.
+ Installs the .NET SDK specified in the global.json file at the root of this repository,
+ along with supporting .NET Core runtimes used for testing.
.DESCRIPTION
-This MAY not require elevation, as the SDK and runtimes are installed locally to this repo location,
-unless `-InstallLocality machine` is specified.
+ This MAY not require elevation, as the SDK and runtimes are installed locally to this repo location,
+ unless `-InstallLocality machine` is specified.
.PARAMETER InstallLocality
-A value indicating whether dependencies should be installed locally to the repo or at a per-user location.
-Per-user allows sharing the installed dependencies across repositories and allows use of a shared expanded package cache.
-Visual Studio will only notice and use these SDKs/runtimes if VS is launched from the environment that runs this script.
-Per-repo allows for high isolation, allowing for a more precise recreation of the environment within an Azure Pipelines build.
-When using 'repo', environment variables are set to cause the locally installed dotnet SDK to be used.
-Per-repo can lead to file locking issues when dotnet.exe is left running as a build server and can be mitigated by running `dotnet build-server shutdown`.
-Per-machine requires elevation and will download and install all SDKs and runtimes to machine-wide locations so all applications can find it.
+ A value indicating whether dependencies should be installed locally to the repo or at a per-user location.
+ Per-user allows sharing the installed dependencies across repositories and allows use of a shared expanded package cache.
+ Visual Studio will only notice and use these SDKs/runtimes if VS is launched from the environment that runs this script.
+ Per-repo allows for high isolation, allowing for a more precise recreation of the environment within an Azure Pipelines build.
+ When using 'repo', environment variables are set to cause the locally installed dotnet SDK to be used.
+ Per-repo can lead to file locking issues when dotnet.exe is left running as a build server and can be mitigated by running `dotnet build-server shutdown`.
+ Per-machine requires elevation and will download and install all SDKs and runtimes to machine-wide locations so all applications can find it.
#>
[CmdletBinding(SupportsShouldProcess=$true,ConfirmImpact='Medium')]
Param (
@@ -29,20 +29,43 @@ $DotNetInstallScriptRoot = Resolve-Path $DotNetInstallScriptRoot
# Look up actual required .NET Core SDK version from global.json
$sdkVersion = & "$PSScriptRoot/../azure-pipelines/variables/DotNetSdkVersion.ps1"
+$arch = [System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture
+if (!$arch) { # Windows Powershell leaves this blank
+ $arch = 'x64'
+ if ($env:PROCESSOR_ARCHITECTURE -eq 'ARM64') { $arch = 'ARM64' }
+}
+
# Search for all .NET Core runtime versions referenced from MSBuild projects and arrange to install them.
$runtimeVersions = @()
+$windowsDesktopRuntimeVersions = @()
Get-ChildItem "$PSScriptRoot\..\src\*.*proj","$PSScriptRoot\..\tests\*.*proj","$PSScriptRoot\..\Directory.Build.props" -Recurse |% {
$projXml = [xml](Get-Content -Path $_)
- $targetFrameworks = $projXml.Project.PropertyGroup.TargetFramework
- if (!$targetFrameworks) {
- $targetFrameworks = $projXml.Project.PropertyGroup.TargetFrameworks
- if ($targetFrameworks) {
- $targetFrameworks = $targetFrameworks -Split ';'
+ $pg = $projXml.Project.PropertyGroup
+ if ($pg) {
+ $targetFrameworks = $pg.TargetFramework
+ if (!$targetFrameworks) {
+ $targetFrameworks = $pg.TargetFrameworks
+ if ($targetFrameworks) {
+ $targetFrameworks = $targetFrameworks -Split ';'
+ }
}
}
- $targetFrameworks |? { $_ -match 'netcoreapp(\d+\.\d+)' } |% {
- $runtimeVersions += $Matches[1]
+ $targetFrameworks |? { $_ -match 'net(?:coreapp)?(\d+\.\d+)' } |% {
+ $v = $Matches[1]
+ $runtimeVersions += $v
+ if ($v -ge '3.0' -and -not ($IsMacOS -or $IsLinux)) {
+ $windowsDesktopRuntimeVersions += $v
+ }
}
+
+ # Add target frameworks of the form: netXX
+ $targetFrameworks |? { $_ -match 'net(\d+\.\d+)' } |% {
+ $v = $Matches[1]
+ $runtimeVersions += $v
+ if (-not ($IsMacOS -or $IsLinux)) {
+ $windowsDesktopRuntimeVersions += $v
+ }
+ }
}
Function Get-FileFromWeb([Uri]$Uri, $OutDir) {
@@ -69,7 +92,7 @@ Function Get-InstallerExe($Version, [switch]$Runtime) {
$Version = $versionInfo[-1]
}
- Get-FileFromWeb -Uri "https://dotnetcli.blob.core.windows.net/dotnet/$sdkOrRuntime/$Version/dotnet-$($sdkOrRuntime.ToLowerInvariant())-$Version-win-x64.exe" -OutDir "$DotNetInstallScriptRoot"
+ Get-FileFromWeb -Uri "https://dotnetcli.blob.core.windows.net/dotnet/$sdkOrRuntime/$Version/dotnet-$($sdkOrRuntime.ToLowerInvariant())-$Version-win-$arch.exe" -OutDir "$DotNetInstallScriptRoot"
}
Function Install-DotNet($Version, [switch]$Runtime) {
@@ -86,7 +109,7 @@ Function Install-DotNet($Version, [switch]$Runtime) {
}
$switches = @(
- '-Architecture','x64'
+ '-Architecture',$arch
)
$envVars = @{
# For locally installed dotnet, skip first time experience which takes a long time
@@ -128,16 +151,16 @@ if ($InstallLocality -eq 'machine') {
Write-Host "Installing .NET Core SDK and runtimes to $DotNetInstallDir" -ForegroundColor Blue
if ($DotNetInstallDir) {
- $switches += '-InstallDir',$DotNetInstallDir
+ $switches += '-InstallDir',"`"$DotNetInstallDir`""
$envVars['DOTNET_MULTILEVEL_LOOKUP'] = '0'
$envVars['DOTNET_ROOT'] = $DotNetInstallDir
}
if ($IsMacOS -or $IsLinux) {
- $DownloadUri = "https://dot.net/v1/dotnet-install.sh"
+ $DownloadUri = "https://raw.githubusercontent.com/dotnet/install-scripts/781752509a890ca7520f1182e8bae71f9a53d754/src/dotnet-install.sh"
$DotNetInstallScriptPath = "$DotNetInstallScriptRoot/dotnet-install.sh"
} else {
- $DownloadUri = "https://dot.net/v1/dotnet-install.ps1"
+ $DownloadUri = "https://raw.githubusercontent.com/dotnet/install-scripts/781752509a890ca7520f1182e8bae71f9a53d754/src/dotnet-install.ps1"
$DotNetInstallScriptPath = "$DotNetInstallScriptRoot/dotnet-install.ps1"
}
@@ -148,22 +171,78 @@ if (-not (Test-Path $DotNetInstallScriptPath)) {
}
}
+# In case the script we invoke is in a directory with spaces, wrap it with single quotes.
+# In case the path includes single quotes, escape them.
+$DotNetInstallScriptPathExpression = $DotNetInstallScriptPath.Replace("'", "''")
+$DotNetInstallScriptPathExpression = "& '$DotNetInstallScriptPathExpression'"
+
+$anythingInstalled = $false
+$global:LASTEXITCODE = 0
+
if ($PSCmdlet.ShouldProcess(".NET Core SDK $sdkVersion", "Install")) {
- Invoke-Expression -Command "$DotNetInstallScriptPath -Version $sdkVersion $switches"
+ $anythingInstalled = $true
+ Invoke-Expression -Command "$DotNetInstallScriptPathExpression -Version $sdkVersion $switches"
+
+ if ($LASTEXITCODE -ne 0) {
+ Write-Error ".NET SDK installation failure: $LASTEXITCODE"
+ exit $LASTEXITCODE
+ }
} else {
- Invoke-Expression -Command "$DotNetInstallScriptPath -Version $sdkVersion $switches -DryRun"
+ Invoke-Expression -Command "$DotNetInstallScriptPathExpression -Version $sdkVersion $switches -DryRun"
}
-$switches += '-Runtime','dotnet'
+$dotnetRuntimeSwitches = $switches + '-Runtime','dotnet'
-$runtimeVersions | Get-Unique |% {
+$runtimeVersions | Sort-Object -Unique |% {
if ($PSCmdlet.ShouldProcess(".NET Core runtime $_", "Install")) {
- Invoke-Expression -Command "$DotNetInstallScriptPath -Channel $_ $switches"
+ $anythingInstalled = $true
+ Invoke-Expression -Command "$DotNetInstallScriptPathExpression -Channel $_ $dotnetRuntimeSwitches"
+
+ if ($LASTEXITCODE -ne 0) {
+ Write-Error ".NET SDK installation failure: $LASTEXITCODE"
+ exit $LASTEXITCODE
+ }
+ } else {
+ Invoke-Expression -Command "$DotNetInstallScriptPathExpression -Channel $_ $dotnetRuntimeSwitches -DryRun"
+ }
+}
+
+$windowsDesktopRuntimeSwitches = $switches + '-Runtime','windowsdesktop'
+
+$windowsDesktopRuntimeVersions | Sort-Object -Unique |% {
+ if ($PSCmdlet.ShouldProcess(".NET Core WindowsDesktop runtime $_", "Install")) {
+ $anythingInstalled = $true
+ Invoke-Expression -Command "$DotNetInstallScriptPathExpression -Channel $_ $windowsDesktopRuntimeSwitches"
+
+ if ($LASTEXITCODE -ne 0) {
+ Write-Error ".NET SDK installation failure: $LASTEXITCODE"
+ exit $LASTEXITCODE
+ }
+ } else {
+ Invoke-Expression -Command "$DotNetInstallScriptPathExpression -Channel $_ $windowsDesktopRuntimeSwitches -DryRun"
+ }
+}
+
+$aspnetRuntimeSwitches = $switches + '-Runtime','aspnetcore'
+
+$runtimeVersions | Sort-Object -Unique |% {
+ if ($PSCmdlet.ShouldProcess(".NET Core ASP.NET runtime $_", "Install")) {
+ $anythingInstalled = $true
+ Invoke-Expression -Command "$DotNetInstallScriptPathExpression -Channel $_ $aspnetRuntimeSwitches"
+
+ if ($LASTEXITCODE -ne 0) {
+ Write-Error ".NET SDK installation failure: $LASTEXITCODE"
+ exit $LASTEXITCODE
+ }
} else {
- Invoke-Expression -Command "$DotNetInstallScriptPath -Channel $_ $switches -DryRun"
+ Invoke-Expression -Command "$DotNetInstallScriptPathExpression -Channel $_ $aspnetRuntimeSwitches -DryRun"
}
}
if ($PSCmdlet.ShouldProcess("Set DOTNET environment variables to discover these installed runtimes?")) {
- & "$PSScriptRoot/../azure-pipelines/Set-EnvVars.ps1" -Variables $envVars -PrependPath $DotNetInstallDir | Out-Null
+ & "$PSScriptRoot/Set-EnvVars.ps1" -Variables $envVars -PrependPath $DotNetInstallDir | Out-Null
+}
+
+if ($anythingInstalled -and ($InstallLocality -ne 'machine') -and !$env:TF_BUILD -and !$env:GITHUB_ACTIONS) {
+ Write-Warning ".NET Core runtimes or SDKs were installed to a non-machine location. Perform your builds or open Visual Studio from this same environment in order for tools to discover the location of these dependencies."
}
diff --git a/tools/Install-NuGetCredProvider.ps1 b/tools/Install-NuGetCredProvider.ps1
index 2b3fb6fb..6d310034 100644
--- a/tools/Install-NuGetCredProvider.ps1
+++ b/tools/Install-NuGetCredProvider.ps1
@@ -19,6 +19,8 @@ Param (
[string]$AccessToken
)
+$envVars = @{}
+
$toolsPath = & "$PSScriptRoot\..\azure-pipelines\Get-TempToolsPath.ps1"
if ($IsMacOS -or $IsLinux) {
@@ -66,9 +68,9 @@ if ($AccessToken) {
Add-Member -InputObject $auth -MemberType NoteProperty -Name endpointCredentials -Value $endpoints
$authJson = ConvertTo-Json -InputObject $auth
- $envVars = @{
+ $envVars += @{
'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS'=$authJson;
}
-
- & "$PSScriptRoot\..\azure-pipelines\Set-EnvVars.ps1" -Variables $envVars | Out-Null
}
+
+& "$PSScriptRoot/Set-EnvVars.ps1" -Variables $envVars | Out-Null
diff --git a/azure-pipelines/Set-EnvVars.ps1 b/tools/Set-EnvVars.ps1
index 9d14d9aa..3f6f86ba 100644
--- a/azure-pipelines/Set-EnvVars.ps1
+++ b/tools/Set-EnvVars.ps1
@@ -4,8 +4,13 @@
Azure Pipeline and CMD environments are considered.
.PARAMETER Variables
A hashtable of variables to be set.
+.PARAMETER PrependPath
+ A set of paths to prepend to the PATH environment variable.
.OUTPUTS
A boolean indicating whether the environment variables can be expected to propagate to the caller's environment.
+.DESCRIPTION
+ The CmdEnvScriptPath environment variable may be optionally set to a path to a cmd shell script to be created (or appended to if it already exists) that will set the environment variables in cmd.exe that are set within the PowerShell environment.
+ This is used by init.cmd in order to reapply any new environment variables to the parent cmd.exe process that were set in the powershell child process.
#>
[CmdletBinding(SupportsShouldProcess=$true)]
Param(
@@ -18,7 +23,7 @@ if ($Variables.Count -eq 0) {
return $true
}
-$cmdInstructions = !$env:TF_BUILD -and !$env:GITHUB_ACTIONS -and $env:PS1UnderCmd -eq '1'
+$cmdInstructions = !$env:TF_BUILD -and !$env:GITHUB_ACTIONS -and !$env:CmdEnvScriptPath -and ($env:PS1UnderCmd -eq '1')
if ($cmdInstructions) {
Write-Warning "Environment variables have been set that will be lost because you're running under cmd.exe"
Write-Host "Environment variables that must be set manually:" -ForegroundColor Blue
@@ -38,6 +43,7 @@ if ($env:GITHUB_ACTIONS) {
Write-Host "GitHub Actions detected. Logging commands will be used to propagate environment variables and prepend path."
}
+$CmdEnvScript = ''
$Variables.GetEnumerator() |% {
Set-Item -Path env:$($_.Key) -Value $_.Value
@@ -46,12 +52,14 @@ $Variables.GetEnumerator() |% {
Write-Host "##vso[task.setvariable variable=$($_.Key);]$($_.Value)"
}
if ($env:GITHUB_ACTIONS) {
- Write-Host "::set-env name=$($_.Key)::$($_.Value)"
+ Add-Content -Path $env:GITHUB_ENV -Value "$($_.Key)=$($_.Value)"
}
if ($cmdInstructions) {
Write-Host "SET $($_.Key)=$($_.Value)"
}
+
+ $CmdEnvScript += "SET $($_.Key)=$($_.Value)`r`n"
}
$pathDelimiter = ';'
@@ -71,9 +79,19 @@ if ($PrependPath) {
Write-Host "##vso[task.prependpath]$_"
}
if ($env:GITHUB_ACTIONS) {
- Write-Host "::add-path::$_"
+ Add-Content -Path $env:GITHUB_PATH -Value $_
}
+
+ $CmdEnvScript += "SET PATH=$_$pathDelimiter%PATH%"
+ }
+}
+
+if ($env:CmdEnvScriptPath) {
+ if (Test-Path $env:CmdEnvScriptPath) {
+ $CmdEnvScript = (Get-Content -Path $env:CmdEnvScriptPath) + $CmdEnvScript
}
+
+ Set-Content -Path $env:CmdEnvScriptPath -Value $CmdEnvScript
}
return !$cmdInstructions
diff --git a/version.json b/version.json
index 007bf56e..fff14ab3 100644
--- a/version.json
+++ b/version.json
@@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
- "version": "2.2",
+ "version": "2.4",
"publicReleaseRefSpec": [
"^refs/heads/master$",
"^refs/heads/v1\\.x$",