diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 2f4ce2358e0207..058644afd46753 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -15,7 +15,7 @@ ] }, "microsoft.dotnet.xharness.cli": { - "version": "9.0.0-prerelease.24405.1", + "version": "9.0.0-prerelease.25113.3", "commands": [ "xharness" ] diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 2d544524862e2d..6d8489e86c472d 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -113,3 +113,4 @@ /docs/area-owners.* @jeffhandley /docs/issue*.md @jeffhandley /.github/policies/ @jeffhandley @mkArtakMSFT +/.github/workflows/ @jeffhandley @dotnet/runtime-infrastructure diff --git a/.github/PULL_REQUEST_TEMPLATE/servicing_pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/servicing_pull_request_template.md index 9a748a085a20f1..cfd64682e8313e 100644 --- a/.github/PULL_REQUEST_TEMPLATE/servicing_pull_request_template.md +++ b/.github/PULL_REQUEST_TEMPLATE/servicing_pull_request_template.md @@ -22,6 +22,7 @@ main PR -# Package authoring signed off? +# Package authoring no longer needed in .NET 9 -IMPORTANT: If this change touches code that ships in a NuGet package, please make certain that you have added any necessary [package authoring](../../docs/project/library-servicing.md) and gotten it explicitly reviewed. +IMPORTANT: Starting with .NET 9, you no longer need to edit a NuGet package's csproj to enable building and bump the version. +Keep in mind that we still need package authoring in .NET 8 and older versions. \ No newline at end of file diff --git a/.github/workflows/README.md b/.github/workflows/README.md new file mode 100644 index 00000000000000..f5e7799b30e2a2 --- /dev/null +++ b/.github/workflows/README.md @@ -0,0 +1,22 @@ +# Workflows + +General guidance: + +Please make sure to include the @dotnet/runtime-infrastructure group as a reviewer of your PRs. + +For workflows that are triggered by pull requests, refer to GitHub's documentation for the `pull_request` and `pull_request_target` events. The `pull_request_target` event is the more common use case in this repository as it runs the workflow in the context of the target branch instead of in the context of the pull request's fork or branch. However, workflows that need to consume the contents of the pull request need to use the `pull_request` event. There are security considerations with each of the events though. + +Most workflows are intended to run only in the `dotnet/runtime` repository and not in forks. To force workflow jobs to be skipped in forks, each job should apply an `if` statement that checks the repository name or owner. Either approach works, but checking only the repository owner allows the workflow to run in copies or forks withing the dotnet org. + +```yaml +jobs: + job-1: + # Do not run this job in forks + if: github.repository == 'dotnet/runtime' + + job-2: + # Do not run this job in forks outside the dotnet org + if: github.repository_owner == 'dotnet' +``` + +Refer to GitHub's [Workflows in forked repositories](https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#workflows-in-forked-repositories) and [pull_request_target](https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request_target) documentation for more information. diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index f8165363070ea5..67ddf782dc0d14 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -48,4 +48,7 @@ jobs: - The PR target branch is `release/X.0-staging`, not `release/X.0`. - - If the change touches code that ships in a NuGet package, you have added the necessary [package authoring](https://github.com/dotnet/runtime/blob/main/docs/project/library-servicing.md) and gotten it explicitly reviewed. + ## Package authoring no longer needed in .NET 9 + + **IMPORTANT**: Starting with .NET 9, you no longer need to edit a NuGet package's csproj to enable building and bump the version. + Keep in mind that we still need package authoring in .NET 8 and older versions. \ No newline at end of file diff --git a/.github/workflows/check-no-merge-label.yml b/.github/workflows/check-no-merge-label.yml new file mode 100644 index 00000000000000..d503400b0e154c --- /dev/null +++ b/.github/workflows/check-no-merge-label.yml @@ -0,0 +1,25 @@ +name: check-no-merge-label + +permissions: + pull-requests: read + +on: + pull_request_target: + types: [opened, reopened, labeled, unlabeled] + branches: + - 'release/**' + +jobs: + check-labels: + if: github.repository == 'dotnet/runtime' + runs-on: ubuntu-latest + steps: + - name: Check 'NO-MERGE' label + run: | + echo "Merging permission is disabled when the 'NO-MERGE' label is applied." + if [ "${{ contains(github.event.pull_request.labels.*.name, 'NO-MERGE') }}" = "false" ]; then + exit 0 + else + echo "::error:: The 'NO-MERGE' label was applied to the PR. Merging is disabled." + exit 1 + fi diff --git a/.github/workflows/check-service-labels.yml b/.github/workflows/check-service-labels.yml index 5261cc165ee128..c158ff6f1520d6 100644 --- a/.github/workflows/check-service-labels.yml +++ b/.github/workflows/check-service-labels.yml @@ -4,18 +4,19 @@ permissions: pull-requests: read on: - pull_request: - types: [opened, edited, reopened, labeled, unlabeled, synchronize] + pull_request_target: + types: [opened, reopened, labeled, unlabeled] branches: - 'release/**' jobs: check-labels: + if: github.repository == 'dotnet/runtime' runs-on: ubuntu-latest steps: - name: Check 'Servicing-approved' label run: | - echo "Merging permission is enabled for servicing PRs when the `Servicing-approved` label is applied." + echo "Merging permission is enabled for servicing PRs when the 'Servicing-approved' label is applied." if [ "${{ contains(github.event.pull_request.labels.*.name, 'Servicing-approved') }}" = "true" ]; then exit 0 else diff --git a/.github/workflows/jit-format.yml b/.github/workflows/jit-format.yml index be0a5d854a9caa..18fb209c628afc 100644 --- a/.github/workflows/jit-format.yml +++ b/.github/workflows/jit-format.yml @@ -15,7 +15,7 @@ jobs: os: - name: linux image: ubuntu-latest - container: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-cross-amd64-net9.0 + container: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-amd64 extension: '.sh' cross: '--cross' rootfs: '/crossrootfs/x64' diff --git a/Directory.Build.props b/Directory.Build.props index 688fcaec63b4f6..530286a2719d7e 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -121,9 +121,8 @@ - - 8.0.0 - net8.0 + 9.0.0 + net9.0 diff --git a/NuGet.config b/NuGet.config index c35709acd8020a..deafa2a01414c9 100644 --- a/NuGet.config +++ b/NuGet.config @@ -9,8 +9,11 @@ - + + + + - + https://github.com/dotnet/cecil - e51bd3677d5674fa34bf5676c5fc5562206bf94e + 8debcd23b73a27992a5fdb2229f546e453619d11 - + https://github.com/dotnet/emsdk - 763d10a1a251be35337ee736832bfde3f9200672 + 78be8cdf4f0bfd93018fd7a87f8282a41d041298 - + https://github.com/dotnet/emsdk - 763d10a1a251be35337ee736832bfde3f9200672 + 78be8cdf4f0bfd93018fd7a87f8282a41d041298 - + https://github.com/dotnet/emsdk - 763d10a1a251be35337ee736832bfde3f9200672 + 78be8cdf4f0bfd93018fd7a87f8282a41d041298 - + https://github.com/dotnet/source-build-reference-packages - c43ee853e96528e2f2eb0f6d8c151ddc07b6a844 + 1cec3b4a8fb07138136a1ca1e04763bfcf7841db - + https://github.com/dotnet/source-build-externals - 4df883d781a4290873b3b968afc0ff0df7132507 + ab469606a3e6b026dcac301e2dab96117c94faeb - + https://github.com/dotnet/arcade - 3c393bbd85ae16ddddba20d0b75035b0c6f1a52d + f33d9e642f0e68a61312164cd9e0baf4e142a999 - + https://github.com/dotnet/arcade - 3c393bbd85ae16ddddba20d0b75035b0c6f1a52d + f33d9e642f0e68a61312164cd9e0baf4e142a999 - + https://github.com/dotnet/arcade - 3c393bbd85ae16ddddba20d0b75035b0c6f1a52d + f33d9e642f0e68a61312164cd9e0baf4e142a999 - + https://github.com/dotnet/arcade - 3c393bbd85ae16ddddba20d0b75035b0c6f1a52d + f33d9e642f0e68a61312164cd9e0baf4e142a999 - + https://github.com/dotnet/arcade - 3c393bbd85ae16ddddba20d0b75035b0c6f1a52d + f33d9e642f0e68a61312164cd9e0baf4e142a999 - + https://github.com/dotnet/arcade - 3c393bbd85ae16ddddba20d0b75035b0c6f1a52d + f33d9e642f0e68a61312164cd9e0baf4e142a999 - + https://github.com/dotnet/arcade - 3c393bbd85ae16ddddba20d0b75035b0c6f1a52d + f33d9e642f0e68a61312164cd9e0baf4e142a999 - + https://github.com/dotnet/arcade - 3c393bbd85ae16ddddba20d0b75035b0c6f1a52d + f33d9e642f0e68a61312164cd9e0baf4e142a999 - + https://github.com/dotnet/arcade - 3c393bbd85ae16ddddba20d0b75035b0c6f1a52d + f33d9e642f0e68a61312164cd9e0baf4e142a999 - + https://github.com/dotnet/arcade - 3c393bbd85ae16ddddba20d0b75035b0c6f1a52d + f33d9e642f0e68a61312164cd9e0baf4e142a999 - + https://github.com/dotnet/arcade - 3c393bbd85ae16ddddba20d0b75035b0c6f1a52d + f33d9e642f0e68a61312164cd9e0baf4e142a999 - + https://github.com/dotnet/arcade - 3c393bbd85ae16ddddba20d0b75035b0c6f1a52d + f33d9e642f0e68a61312164cd9e0baf4e142a999 - + https://github.com/dotnet/arcade - 3c393bbd85ae16ddddba20d0b75035b0c6f1a52d + f33d9e642f0e68a61312164cd9e0baf4e142a999 - + https://github.com/dotnet/arcade - 3c393bbd85ae16ddddba20d0b75035b0c6f1a52d + f33d9e642f0e68a61312164cd9e0baf4e142a999 - + https://github.com/dotnet/arcade - 3c393bbd85ae16ddddba20d0b75035b0c6f1a52d + f33d9e642f0e68a61312164cd9e0baf4e142a999 - + https://github.com/dotnet/arcade - 3c393bbd85ae16ddddba20d0b75035b0c6f1a52d + f33d9e642f0e68a61312164cd9e0baf4e142a999 - + https://github.com/dotnet/arcade - 3c393bbd85ae16ddddba20d0b75035b0c6f1a52d + f33d9e642f0e68a61312164cd9e0baf4e142a999 - + https://github.com/dotnet/arcade - 3c393bbd85ae16ddddba20d0b75035b0c6f1a52d + f33d9e642f0e68a61312164cd9e0baf4e142a999 - + https://github.com/dotnet/arcade - 3c393bbd85ae16ddddba20d0b75035b0c6f1a52d + f33d9e642f0e68a61312164cd9e0baf4e142a999 - + https://github.com/dotnet/arcade - 3c393bbd85ae16ddddba20d0b75035b0c6f1a52d + f33d9e642f0e68a61312164cd9e0baf4e142a999 - + https://github.com/dotnet/runtime-assets - e98370e661a19bdfed31eefb8740ecfad255f9ed + 739921bd3405841c06d3f74701c9e6ccfbd19e2e - + https://github.com/dotnet/runtime-assets - e98370e661a19bdfed31eefb8740ecfad255f9ed + 739921bd3405841c06d3f74701c9e6ccfbd19e2e - + https://github.com/dotnet/runtime-assets - e98370e661a19bdfed31eefb8740ecfad255f9ed + 739921bd3405841c06d3f74701c9e6ccfbd19e2e - + https://github.com/dotnet/runtime-assets - e98370e661a19bdfed31eefb8740ecfad255f9ed + 739921bd3405841c06d3f74701c9e6ccfbd19e2e - + https://github.com/dotnet/runtime-assets - e98370e661a19bdfed31eefb8740ecfad255f9ed + 739921bd3405841c06d3f74701c9e6ccfbd19e2e - + https://github.com/dotnet/runtime-assets - e98370e661a19bdfed31eefb8740ecfad255f9ed + 739921bd3405841c06d3f74701c9e6ccfbd19e2e - + https://github.com/dotnet/runtime-assets - e98370e661a19bdfed31eefb8740ecfad255f9ed + 739921bd3405841c06d3f74701c9e6ccfbd19e2e - + https://github.com/dotnet/runtime-assets - e98370e661a19bdfed31eefb8740ecfad255f9ed + 739921bd3405841c06d3f74701c9e6ccfbd19e2e - + https://github.com/dotnet/runtime-assets - e98370e661a19bdfed31eefb8740ecfad255f9ed + 739921bd3405841c06d3f74701c9e6ccfbd19e2e - + https://github.com/dotnet/runtime-assets - e98370e661a19bdfed31eefb8740ecfad255f9ed + 739921bd3405841c06d3f74701c9e6ccfbd19e2e - + https://github.com/dotnet/runtime-assets - e98370e661a19bdfed31eefb8740ecfad255f9ed + 739921bd3405841c06d3f74701c9e6ccfbd19e2e - + https://github.com/dotnet/runtime-assets - e98370e661a19bdfed31eefb8740ecfad255f9ed + 739921bd3405841c06d3f74701c9e6ccfbd19e2e - + https://github.com/dotnet/runtime-assets - e98370e661a19bdfed31eefb8740ecfad255f9ed + 739921bd3405841c06d3f74701c9e6ccfbd19e2e - + https://github.com/dotnet/llvm-project - 966011b3b666d1bf58d86666add23a9d401ee26a + f98a0db595fe3f28dac4594acc7114b16281d090 - + https://github.com/dotnet/llvm-project - 966011b3b666d1bf58d86666add23a9d401ee26a + f98a0db595fe3f28dac4594acc7114b16281d090 - + https://github.com/dotnet/llvm-project - 966011b3b666d1bf58d86666add23a9d401ee26a + f98a0db595fe3f28dac4594acc7114b16281d090 - + https://github.com/dotnet/llvm-project - 966011b3b666d1bf58d86666add23a9d401ee26a + f98a0db595fe3f28dac4594acc7114b16281d090 - + https://github.com/dotnet/llvm-project - 966011b3b666d1bf58d86666add23a9d401ee26a + f98a0db595fe3f28dac4594acc7114b16281d090 - + https://github.com/dotnet/llvm-project - 966011b3b666d1bf58d86666add23a9d401ee26a + f98a0db595fe3f28dac4594acc7114b16281d090 - + https://github.com/dotnet/llvm-project - 966011b3b666d1bf58d86666add23a9d401ee26a + f98a0db595fe3f28dac4594acc7114b16281d090 - + https://github.com/dotnet/llvm-project - 966011b3b666d1bf58d86666add23a9d401ee26a + f98a0db595fe3f28dac4594acc7114b16281d090 - + https://github.com/dotnet/llvm-project - 966011b3b666d1bf58d86666add23a9d401ee26a + f98a0db595fe3f28dac4594acc7114b16281d090 - + https://github.com/dotnet/llvm-project - 966011b3b666d1bf58d86666add23a9d401ee26a + f98a0db595fe3f28dac4594acc7114b16281d090 - + https://github.com/dotnet/llvm-project - 966011b3b666d1bf58d86666add23a9d401ee26a + f98a0db595fe3f28dac4594acc7114b16281d090 - + https://github.com/dotnet/llvm-project - 966011b3b666d1bf58d86666add23a9d401ee26a + f98a0db595fe3f28dac4594acc7114b16281d090 - + https://github.com/dotnet/llvm-project - 966011b3b666d1bf58d86666add23a9d401ee26a + f98a0db595fe3f28dac4594acc7114b16281d090 - + https://github.com/dotnet/llvm-project - 966011b3b666d1bf58d86666add23a9d401ee26a + f98a0db595fe3f28dac4594acc7114b16281d090 https://github.com/dotnet/runtime @@ -320,21 +320,21 @@ https://github.com/dotnet/runtime b030c4dfdfa1bf287f10f96006619a06bc2000ae - + https://github.com/dotnet/xharness - 9794254fa909ff5adc46326e9b54009793f61dcd + edc52ac68c1bf77e3b107fc8a448674a6d058d8a - + https://github.com/dotnet/xharness - 9794254fa909ff5adc46326e9b54009793f61dcd + edc52ac68c1bf77e3b107fc8a448674a6d058d8a - + https://github.com/dotnet/xharness - 9794254fa909ff5adc46326e9b54009793f61dcd + edc52ac68c1bf77e3b107fc8a448674a6d058d8a - + https://github.com/dotnet/arcade - 3c393bbd85ae16ddddba20d0b75035b0c6f1a52d + f33d9e642f0e68a61312164cd9e0baf4e142a999 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization @@ -352,48 +352,48 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-optimization 9d7532585ce71e30ab55f0364d3cecccaf0775d1 - + https://github.com/dotnet/hotreload-utils - bf7e87a8574449a441bf905e2acd38e4aa25b3d4 + fd21b154f1152569e7fa49a4e030927eccbf4aaa - + https://github.com/dotnet/runtime-assets - e98370e661a19bdfed31eefb8740ecfad255f9ed + 739921bd3405841c06d3f74701c9e6ccfbd19e2e - + https://github.com/dotnet/roslyn - 3bff3622487486dec7794dfd0c71e05a52c313a4 + 3f5cf9fbbd91f2047e988801a5142ca1cb6bab45 - + https://github.com/dotnet/roslyn - 3bff3622487486dec7794dfd0c71e05a52c313a4 + 3f5cf9fbbd91f2047e988801a5142ca1cb6bab45 - + https://github.com/dotnet/roslyn - 3bff3622487486dec7794dfd0c71e05a52c313a4 + 3f5cf9fbbd91f2047e988801a5142ca1cb6bab45 - + https://github.com/dotnet/roslyn-analyzers - 3d61c57c73c3dd5f1f407ef9cd3414d94bf0eaf2 + 16865ea61910500f1022ad2b96c499e5df02c228 - + https://github.com/dotnet/roslyn-analyzers - 3d61c57c73c3dd5f1f407ef9cd3414d94bf0eaf2 + 16865ea61910500f1022ad2b96c499e5df02c228 - + https://github.com/dotnet/roslyn - 3bff3622487486dec7794dfd0c71e05a52c313a4 + 3f5cf9fbbd91f2047e988801a5142ca1cb6bab45 - + https://github.com/dotnet/sdk - 5b9d9d4677ea31d954533e9de2f95a3ea638135d + 346d06baea1cf7113e181e779b056b955973c633 - + https://github.com/dotnet/sdk - 5b9d9d4677ea31d954533e9de2f95a3ea638135d + 346d06baea1cf7113e181e779b056b955973c633 diff --git a/eng/Versions.props b/eng/Versions.props index 24c0c9e1048042..8ba353723841c2 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -1,16 +1,16 @@ - 9.0.0 + 9.0.4 9 0 - 0 + 4 9.0.100 - 8.0.11 + 8.0.$([MSBuild]::Add($(PatchVersion),11)) 7.0.20 6.0.36 - rtm + servicing @@ -36,17 +36,17 @@ - 3.11.0-beta1.24508.2 - 9.0.0-preview.24508.2 + 3.11.0-beta1.25123.3 + 9.0.0-preview.25123.3 - 4.12.0-3.24516.15 - 4.12.0-3.24516.15 - 4.12.0-3.24516.15 + 4.12.0-3.25124.2 + 4.12.0-3.25124.2 + 4.12.0-3.25124.2 - 9.0.100-rtm.24512.1 + 9.0.104 - 9.0.0-beta.24516.2 - 9.0.0-beta.24516.2 - 9.0.0-beta.24516.2 - 9.0.0-beta.24516.2 - 2.9.0-beta.24516.2 - 9.0.0-beta.24516.2 - 2.9.0-beta.24516.2 - 9.0.0-beta.24516.2 - 9.0.0-beta.24516.2 - 9.0.0-beta.24516.2 - 9.0.0-beta.24516.2 - 9.0.0-beta.24516.2 - 9.0.0-beta.24516.2 - 9.0.0-beta.24516.2 - 9.0.0-beta.24516.2 - 9.0.0-beta.24516.2 + 9.0.0-beta.25161.4 + 9.0.0-beta.25161.4 + 9.0.0-beta.25161.4 + 9.0.0-beta.25161.4 + 2.9.0-beta.25161.4 + 9.0.0-beta.25161.4 + 2.9.0-beta.25161.4 + 9.0.0-beta.25161.4 + 9.0.0-beta.25161.4 + 9.0.0-beta.25161.4 + 9.0.0-beta.25161.4 + 9.0.0-beta.25161.4 + 9.0.0-beta.25161.4 + 9.0.0-beta.25161.4 + 9.0.0-beta.25161.4 + 9.0.0-beta.25161.4 1.4.0 @@ -141,20 +141,20 @@ 8.0.0 8.0.0 - 9.0.0-beta.24459.2 - 9.0.0-beta.24459.2 - 9.0.0-beta.24459.2 - 9.0.0-beta.24459.2 - 9.0.0-beta.24459.2 - 9.0.0-beta.24459.2 - 9.0.0-beta.24459.2 - 9.0.0-beta.24459.2 - 9.0.0-beta.24459.2 - 9.0.0-beta.24459.2 - 9.0.0-beta.24459.2 - 9.0.0-beta.24459.2 - 9.0.0-beta.24459.2 - 9.0.0-beta.24459.2 + 9.0.0-beta.25113.2 + 9.0.0-beta.25113.2 + 9.0.0-beta.25113.2 + 9.0.0-beta.25113.2 + 9.0.0-beta.25113.2 + 9.0.0-beta.25113.2 + 9.0.0-beta.25113.2 + 9.0.0-beta.25113.2 + 9.0.0-beta.25113.2 + 9.0.0-beta.25113.2 + 9.0.0-beta.25113.2 + 9.0.0-beta.25113.2 + 9.0.0-beta.25113.2 + 9.0.0-beta.25113.2 1.0.0-prerelease.24462.2 1.0.0-prerelease.24462.2 @@ -164,7 +164,7 @@ 1.0.0-prerelease.24462.2 2.0.0 - 17.10.0-beta1.24272.1 + 17.12.0-beta1.24603.5 2.0.0-beta4.24324.3 3.1.7 2.1.0 @@ -184,10 +184,10 @@ 1.4.0 17.4.0-preview-20220707-01 - 9.0.0-prerelease.24405.1 - 9.0.0-prerelease.24405.1 - 9.0.0-prerelease.24405.1 - 9.0.0-alpha.0.24514.3 + 9.0.0-prerelease.25113.3 + 9.0.0-prerelease.25113.3 + 9.0.0-prerelease.25113.3 + 9.0.0-alpha.0.25153.2 3.12.0 4.5.0 6.0.0 @@ -215,54 +215,55 @@ 9.0.0-preview-20241010.1 - 0.11.5-alpha.24515.1 + 0.11.5-alpha.25112.2 9.0.0-rtm.24511.16 - 9.0.0-rtm.24516.3 + 9.0.0-rtm.25157.1 9.0.0-rtm.24466.4 - 2.4.3 + 2.4.8 9.0.0-alpha.1.24167.3 - 19.1.0-alpha.1.24519.2 - 19.1.0-alpha.1.24519.2 - 19.1.0-alpha.1.24519.2 - 19.1.0-alpha.1.24519.2 - 19.1.0-alpha.1.24519.2 - 19.1.0-alpha.1.24519.2 - 19.1.0-alpha.1.24519.2 - 19.1.0-alpha.1.24519.2 - 19.1.0-alpha.1.24519.2 - 19.1.0-alpha.1.24519.2 - 19.1.0-alpha.1.24519.2 - 19.1.0-alpha.1.24519.2 - 19.1.0-alpha.1.24519.2 - 19.1.0-alpha.1.24519.2 + 19.1.0-alpha.1.25113.2 + 19.1.0-alpha.1.25113.2 + 19.1.0-alpha.1.25113.2 + 19.1.0-alpha.1.25113.2 + 19.1.0-alpha.1.25113.2 + 19.1.0-alpha.1.25113.2 + 19.1.0-alpha.1.25113.2 + 19.1.0-alpha.1.25113.2 + 19.1.0-alpha.1.25113.2 + 19.1.0-alpha.1.25113.2 + 19.1.0-alpha.1.25113.2 + 19.1.0-alpha.1.25113.2 + 19.1.0-alpha.1.25113.2 + 19.1.0-alpha.1.25113.2 - 9.0.0-rtm.24528.2 - 9.0.0 + 9.0.4-servicing.25157.2 + 9.0.4 $(MicrosoftNETWorkloadEmscriptenCurrentManifest90100Version) 1.1.87-gba258badda 1.0.0-v3.14.0.5722 - 19.1.0-alpha.1.24519.2 - 19.1.0-alpha.1.24519.2 - 19.1.0-alpha.1.24519.2 - 19.1.0-alpha.1.24519.2 - 19.1.0-alpha.1.24519.2 - 19.1.0-alpha.1.24519.2 - 19.1.0-alpha.1.24519.2 - 19.1.0-alpha.1.24519.2 + 19.1.0-alpha.1.25113.2 + 19.1.0-alpha.1.25113.2 + 19.1.0-alpha.1.25113.2 + 19.1.0-alpha.1.25113.2 + 19.1.0-alpha.1.25113.2 + 19.1.0-alpha.1.25113.2 + 19.1.0-alpha.1.25113.2 + 19.1.0-alpha.1.25113.2 3.1.7 1.0.406601 $(MicrosoftDotNetApiCompatTaskVersion) + 9.0.0-alpha.1.24175.1 $(MicrosoftNETRuntimeEmscriptenVersion) $(runtimewinx64MicrosoftNETCoreRuntimeWasmNodeTransportPackageVersion) diff --git a/eng/common/core-templates/steps/generate-sbom.yml b/eng/common/core-templates/steps/generate-sbom.yml index d938b60e1bb534..56a090094824f4 100644 --- a/eng/common/core-templates/steps/generate-sbom.yml +++ b/eng/common/core-templates/steps/generate-sbom.yml @@ -38,7 +38,7 @@ steps: PackageName: ${{ parameters.packageName }} BuildDropPath: ${{ parameters.buildDropPath }} PackageVersion: ${{ parameters.packageVersion }} - ManifestDirPath: ${{ parameters.manifestDirPath }} + ManifestDirPath: ${{ parameters.manifestDirPath }}/$(ARTIFACT_NAME) ${{ if ne(parameters.IgnoreDirectories, '') }}: AdditionalComponentDetectorArgs: '--IgnoreDirectories ${{ parameters.IgnoreDirectories }}' diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake index 9a4e285a5ae3f0..9a7ecfbd42c5f3 100644 --- a/eng/common/cross/toolchain.cmake +++ b/eng/common/cross/toolchain.cmake @@ -40,7 +40,7 @@ if(TARGET_ARCH_NAME STREQUAL "arm") set(TOOLCHAIN "arm-linux-gnueabihf") endif() if(TIZEN) - set(TIZEN_TOOLCHAIN "armv7hl-tizen-linux-gnueabihf/9.2.0") + set(TIZEN_TOOLCHAIN "armv7hl-tizen-linux-gnueabihf") endif() elseif(TARGET_ARCH_NAME STREQUAL "arm64") set(CMAKE_SYSTEM_PROCESSOR aarch64) @@ -49,7 +49,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "arm64") elseif(LINUX) set(TOOLCHAIN "aarch64-linux-gnu") if(TIZEN) - set(TIZEN_TOOLCHAIN "aarch64-tizen-linux-gnu/9.2.0") + set(TIZEN_TOOLCHAIN "aarch64-tizen-linux-gnu") endif() elseif(FREEBSD) set(triple "aarch64-unknown-freebsd12") @@ -58,7 +58,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "armel") set(CMAKE_SYSTEM_PROCESSOR armv7l) set(TOOLCHAIN "arm-linux-gnueabi") if(TIZEN) - set(TIZEN_TOOLCHAIN "armv7l-tizen-linux-gnueabi/9.2.0") + set(TIZEN_TOOLCHAIN "armv7l-tizen-linux-gnueabi") endif() elseif(TARGET_ARCH_NAME STREQUAL "armv6") set(CMAKE_SYSTEM_PROCESSOR armv6l) @@ -81,7 +81,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "riscv64") else() set(TOOLCHAIN "riscv64-linux-gnu") if(TIZEN) - set(TIZEN_TOOLCHAIN "riscv64-tizen-linux-gnu/13.1.0") + set(TIZEN_TOOLCHAIN "riscv64-tizen-linux-gnu") endif() endif() elseif(TARGET_ARCH_NAME STREQUAL "s390x") @@ -98,7 +98,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "x64") elseif(LINUX) set(TOOLCHAIN "x86_64-linux-gnu") if(TIZEN) - set(TIZEN_TOOLCHAIN "x86_64-tizen-linux-gnu/9.2.0") + set(TIZEN_TOOLCHAIN "x86_64-tizen-linux-gnu") endif() elseif(FREEBSD) set(triple "x86_64-unknown-freebsd12") @@ -115,7 +115,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "x86") set(TOOLCHAIN "i686-linux-gnu") endif() if(TIZEN) - set(TIZEN_TOOLCHAIN "i586-tizen-linux-gnu/9.2.0") + set(TIZEN_TOOLCHAIN "i586-tizen-linux-gnu") endif() else() message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only arm, arm64, armel, armv6, ppc64le, riscv64, s390x, x64 and x86 are supported!") @@ -127,30 +127,25 @@ endif() # Specify include paths if(TIZEN) - if(TARGET_ARCH_NAME STREQUAL "arm") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/armv7hl-tizen-linux-gnueabihf) - endif() - if(TARGET_ARCH_NAME STREQUAL "armel") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/armv7l-tizen-linux-gnueabi) - endif() - if(TARGET_ARCH_NAME STREQUAL "arm64") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/aarch64-tizen-linux-gnu) - endif() - if(TARGET_ARCH_NAME STREQUAL "x86") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/i586-tizen-linux-gnu) - endif() - if(TARGET_ARCH_NAME STREQUAL "x64") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/x86_64-tizen-linux-gnu) - endif() - if(TARGET_ARCH_NAME STREQUAL "riscv64") - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/) - include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/riscv64-tizen-linux-gnu) + function(find_toolchain_dir prefix) + # Dynamically find the version subdirectory + file(GLOB DIRECTORIES "${prefix}/*") + list(GET DIRECTORIES 0 FIRST_MATCH) + get_filename_component(TOOLCHAIN_VERSION ${FIRST_MATCH} NAME) + + set(TIZEN_TOOLCHAIN_PATH "${prefix}/${TOOLCHAIN_VERSION}" PARENT_SCOPE) + endfunction() + + if(TARGET_ARCH_NAME MATCHES "^(arm|armel|x86)$") + find_toolchain_dir("${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + else() + find_toolchain_dir("${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") endif() + + message(STATUS "TIZEN_TOOLCHAIN_PATH set to: ${TIZEN_TOOLCHAIN_PATH}") + + include_directories(SYSTEM ${TIZEN_TOOLCHAIN_PATH}/include/c++) + include_directories(SYSTEM ${TIZEN_TOOLCHAIN_PATH}/include/c++/${TIZEN_TOOLCHAIN}) endif() if(ANDROID) @@ -272,21 +267,21 @@ endif() if(TARGET_ARCH_NAME MATCHES "^(arm|armel)$") if(TIZEN) - add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-B${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib") - add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-L${TIZEN_TOOLCHAIN_PATH}") endif() elseif(TARGET_ARCH_NAME MATCHES "^(arm64|x64|riscv64)$") if(TIZEN) - add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-B${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib64") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib64") - add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-L${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/lib64") add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64") - add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-Wl,--rpath-link=${TIZEN_TOOLCHAIN_PATH}") endif() elseif(TARGET_ARCH_NAME STREQUAL "s390x") add_toolchain_linker_flag("--target=${TOOLCHAIN}") @@ -297,10 +292,10 @@ elseif(TARGET_ARCH_NAME STREQUAL "x86") endif() add_toolchain_linker_flag(-m32) if(TIZEN) - add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-B${TIZEN_TOOLCHAIN_PATH}") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib") - add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-L${TIZEN_TOOLCHAIN_PATH}") endif() elseif(ILLUMOS) add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib/amd64") diff --git a/eng/common/generate-sbom-prep.ps1 b/eng/common/generate-sbom-prep.ps1 index 3e5c1c74a1c50d..a0c7d792a76fbe 100644 --- a/eng/common/generate-sbom-prep.ps1 +++ b/eng/common/generate-sbom-prep.ps1 @@ -4,18 +4,26 @@ Param( . $PSScriptRoot\pipeline-logging-functions.ps1 +# Normally - we'd listen to the manifest path given, but 1ES templates will overwrite if this level gets uploaded directly +# with their own overwriting ours. So we create it as a sub directory of the requested manifest path. +$ArtifactName = "${env:SYSTEM_STAGENAME}_${env:AGENT_JOBNAME}_SBOM" +$SafeArtifactName = $ArtifactName -replace '["/:<>\\|?@*"() ]', '_' +$SbomGenerationDir = Join-Path $ManifestDirPath $SafeArtifactName + +Write-Host "Artifact name before : $ArtifactName" +Write-Host "Artifact name after : $SafeArtifactName" + Write-Host "Creating dir $ManifestDirPath" + # create directory for sbom manifest to be placed -if (!(Test-Path -path $ManifestDirPath)) +if (!(Test-Path -path $SbomGenerationDir)) { - New-Item -ItemType Directory -path $ManifestDirPath - Write-Host "Successfully created directory $ManifestDirPath" + New-Item -ItemType Directory -path $SbomGenerationDir + Write-Host "Successfully created directory $SbomGenerationDir" } else{ Write-PipelineTelemetryError -category 'Build' "Unable to create sbom folder." } Write-Host "Updating artifact name" -$artifact_name = "${env:SYSTEM_STAGENAME}_${env:AGENT_JOBNAME}_SBOM" -replace '["/:<>\\|?@*"() ]', '_' -Write-Host "Artifact name $artifact_name" -Write-Host "##vso[task.setvariable variable=ARTIFACT_NAME]$artifact_name" +Write-Host "##vso[task.setvariable variable=ARTIFACT_NAME]$SafeArtifactName" diff --git a/eng/common/generate-sbom-prep.sh b/eng/common/generate-sbom-prep.sh index d5c76dc827b496..b8ecca72bbf506 100644 --- a/eng/common/generate-sbom-prep.sh +++ b/eng/common/generate-sbom-prep.sh @@ -14,19 +14,24 @@ done scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" . $scriptroot/pipeline-logging-functions.sh + +# replace all special characters with _, some builds use special characters like : in Agent.Jobname, that is not a permissible name while uploading artifacts. +artifact_name=$SYSTEM_STAGENAME"_"$AGENT_JOBNAME"_SBOM" +safe_artifact_name="${artifact_name//["/:<>\\|?@*$" ]/_}" manifest_dir=$1 -if [ ! -d "$manifest_dir" ] ; then - mkdir -p "$manifest_dir" - echo "Sbom directory created." $manifest_dir +# Normally - we'd listen to the manifest path given, but 1ES templates will overwrite if this level gets uploaded directly +# with their own overwriting ours. So we create it as a sub directory of the requested manifest path. +sbom_generation_dir="$manifest_dir/$safe_artifact_name" + +if [ ! -d "$sbom_generation_dir" ] ; then + mkdir -p "$sbom_generation_dir" + echo "Sbom directory created." $sbom_generation_dir else Write-PipelineTelemetryError -category 'Build' "Unable to create sbom folder." fi -artifact_name=$SYSTEM_STAGENAME"_"$AGENT_JOBNAME"_SBOM" echo "Artifact name before : "$artifact_name -# replace all special characters with _, some builds use special characters like : in Agent.Jobname, that is not a permissible name while uploading artifacts. -safe_artifact_name="${artifact_name//["/:<>\\|?@*$" ]/_}" echo "Artifact name after : "$safe_artifact_name export ARTIFACT_NAME=$safe_artifact_name echo "##vso[task.setvariable variable=ARTIFACT_NAME]$safe_artifact_name" diff --git a/eng/common/internal/Tools.csproj b/eng/common/internal/Tools.csproj index 32f79dfb3402c0..feaa6d20812d8f 100644 --- a/eng/common/internal/Tools.csproj +++ b/eng/common/internal/Tools.csproj @@ -15,16 +15,6 @@ - - - - https://devdiv.pkgs.visualstudio.com/_packaging/dotnet-core-internal-tooling/nuget/v3/index.json; - - - $(RestoreSources); - https://devdiv.pkgs.visualstudio.com/_packaging/VS/nuget/v3/index.json; - - diff --git a/eng/common/sdk-task.ps1 b/eng/common/sdk-task.ps1 index aab40de3fd9aca..4f0546dce1208d 100644 --- a/eng/common/sdk-task.ps1 +++ b/eng/common/sdk-task.ps1 @@ -64,7 +64,7 @@ try { $GlobalJson.tools | Add-Member -Name "vs" -Value (ConvertFrom-Json "{ `"version`": `"16.5`" }") -MemberType NoteProperty } if( -not ($GlobalJson.tools.PSObject.Properties.Name -match "xcopy-msbuild" )) { - $GlobalJson.tools | Add-Member -Name "xcopy-msbuild" -Value "17.10.0-pre.4.0" -MemberType NoteProperty + $GlobalJson.tools | Add-Member -Name "xcopy-msbuild" -Value "17.12.0" -MemberType NoteProperty } if ($GlobalJson.tools."xcopy-msbuild".Trim() -ine "none") { $xcopyMSBuildToolsFolder = InitializeXCopyMSBuild $GlobalJson.tools."xcopy-msbuild" -install $true diff --git a/eng/common/template-guidance.md b/eng/common/template-guidance.md index 5ef6c30ba92465..98bbc1ded0ba88 100644 --- a/eng/common/template-guidance.md +++ b/eng/common/template-guidance.md @@ -57,7 +57,7 @@ extends: Note: Multiple outputs are ONLY applicable to 1ES PT publishing (only usable when referencing `templates-official`). -# Development notes +## Development notes **Folder / file structure** diff --git a/eng/common/templates-official/job/job.yml b/eng/common/templates-official/job/job.yml index 605692d2fb770c..817555505aa602 100644 --- a/eng/common/templates-official/job/job.yml +++ b/eng/common/templates-official/job/job.yml @@ -16,6 +16,7 @@ jobs: parameters: PackageVersion: ${{ parameters.packageVersion }} BuildDropPath: ${{ parameters.buildDropPath }} + ManifestDirPath: $(Build.ArtifactStagingDirectory)/sbom publishArtifacts: false # publish artifacts diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 22954477a5747f..a46b6deb75986b 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -320,7 +320,7 @@ function InstallDotNet([string] $dotnetRoot, $variations += @($installParameters) $dotnetBuilds = $installParameters.Clone() - $dotnetbuilds.AzureFeed = "https://dotnetbuilds.azureedge.net/public" + $dotnetbuilds.AzureFeed = "https://ci.dot.net/public" $variations += @($dotnetBuilds) if ($runtimeSourceFeed) { @@ -383,8 +383,8 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = # If the version of msbuild is going to be xcopied, # use this version. Version matches a package here: - # https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-eng/NuGet/Microsoft.DotNet.Arcade.MSBuild.Xcopy/versions/17.10.0-pre.4.0 - $defaultXCopyMSBuildVersion = '17.10.0-pre.4.0' + # https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-eng/NuGet/Microsoft.DotNet.Arcade.MSBuild.Xcopy/versions/17.12.0 + $defaultXCopyMSBuildVersion = '17.12.0' if (!$vsRequirements) { if (Get-Member -InputObject $GlobalJson.tools -Name 'vs') { diff --git a/eng/common/tools.sh b/eng/common/tools.sh index 00473c9f918d47..1159726a10fd6f 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -232,7 +232,7 @@ function InstallDotNet { local public_location=("${installParameters[@]}") variations+=(public_location) - local dotnetbuilds=("${installParameters[@]}" --azure-feed "https://dotnetbuilds.azureedge.net/public") + local dotnetbuilds=("${installParameters[@]}" --azure-feed "https://ci.dot.net/public") variations+=(dotnetbuilds) if [[ -n "${6:-}" ]]; then diff --git a/eng/install-native-dependencies.sh b/eng/install-native-dependencies.sh index 41895e0b9254c8..f8c9db632860de 100755 --- a/eng/install-native-dependencies.sh +++ b/eng/install-native-dependencies.sh @@ -44,7 +44,7 @@ case "$os" in export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 # Skip brew update for now, see https://github.com/actions/setup-python/issues/577 # brew update --preinstall - brew bundle --no-upgrade --no-lock --file "$(dirname "$0")/Brewfile" + brew bundle --no-upgrade --file "$(dirname "$0")/Brewfile" ;; *) diff --git a/eng/packaging.targets b/eng/packaging.targets index 99912459fe02c1..a14c954df54dbc 100644 --- a/eng/packaging.targets +++ b/eng/packaging.targets @@ -27,8 +27,6 @@ PACKAGE.md $(BeforePack);ValidatePackageReadmeExists - - false true - - true false @@ -58,18 +48,6 @@ $(NoWarn);CP0003 - - - 0 - - - $(MajorVersion).$(MinorVersion).$(ServicingVersion) - $(Version)-$(VersionSuffix) - - @@ -155,7 +133,7 @@ - <_RuntimeSymbolPath Include="$(RuntimeSymbolPath)" /> + <_RuntimeSymbolPath Include="@(TfmRuntimeSpecificPackageFile->'%(RootDir)%(Directory)%(FileName).pdb')" Condition="'%(TfmRuntimeSpecificPackageFile.Extension)' == '.dll'" KeepMetadata="None" /> - - - - diff --git a/eng/pipelines/common/templates/pipeline-with-resources.yml b/eng/pipelines/common/templates/pipeline-with-resources.yml index cf2b9f53e528b5..90851b8d725ee6 100644 --- a/eng/pipelines/common/templates/pipeline-with-resources.yml +++ b/eng/pipelines/common/templates/pipeline-with-resources.yml @@ -17,7 +17,7 @@ extends: containers: linux_arm: - image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-cross-arm-net9.0 + image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-arm env: ROOTFS_DIR: /crossrootfs/arm @@ -27,44 +27,44 @@ extends: ROOTFS_DIR: /crossrootfs/armv6 linux_arm64: - image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-cross-arm64-net9.0 + image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-arm64 env: ROOTFS_DIR: /crossrootfs/arm64 linux_musl_x64: - image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-cross-amd64-alpine-net9.0 + image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-amd64-alpine env: ROOTFS_DIR: /crossrootfs/x64 linux_musl_arm: - image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-cross-arm-alpine-net9.0 + image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-arm-alpine env: ROOTFS_DIR: /crossrootfs/arm linux_musl_arm64: - image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-cross-arm64-alpine-net9.0 + image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-arm64-alpine env: ROOTFS_DIR: /crossrootfs/arm64 # This container contains all required toolsets to build for Android and for Linux with bionic libc. android: - image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-cross-android-amd64-net9.0 + image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-android-amd64 # This container contains all required toolsets to build for Android and for Linux with bionic libc and a special layout of OpenSSL. linux_bionic: - image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-android-openssl-net9.0 + image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-android-openssl # This container contains all required toolsets to build for Android as well as tooling to build docker images. android_docker: - image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-android-docker-net9.0 + image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-android-docker linux_x64: - image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-cross-amd64-net9.0 + image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-amd64 env: ROOTFS_DIR: /crossrootfs/x64 linux_x86: - image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-cross-x86-net9.0 + image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-x86 env: ROOTFS_DIR: /crossrootfs/x86 @@ -75,7 +75,7 @@ extends: image: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.19-WithNode linux_x64_sanitizer: - image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-cross-amd64-net9.0-sanitizer + image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-amd64-sanitizer env: ROOTFS_DIR: /crossrootfs/x64 @@ -88,17 +88,17 @@ extends: image: mcr.microsoft.com/dotnet-buildtools/prereqs:almalinux-8-source-build linux_s390x: - image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-cross-s390x-net9.0 + image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-s390x env: ROOTFS_DIR: /crossrootfs/s390x linux_ppc64le: - image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-cross-ppc64le-net9.0 + image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-ppc64le env: ROOTFS_DIR: /crossrootfs/ppc64le linux_riscv64: - image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-cross-riscv64-net9.0 + image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-riscv64 env: ROOTFS_DIR: /crossrootfs/riscv64 @@ -109,17 +109,17 @@ extends: image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8 browser_wasm: - image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-webassembly-amd64-net9.0 + image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-webassembly-amd64 env: ROOTFS_DIR: /crossrootfs/x64 wasi_wasm: - image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-webassembly-amd64-net9.0 + image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-webassembly-amd64 env: ROOTFS_DIR: /crossrootfs/x64 freebsd_x64: - image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-cross-freebsd-13-net9.0 + image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-freebsd-13 env: ROOTFS_DIR: /crossrootfs/x64 @@ -132,4 +132,4 @@ extends: image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-debpkg rpmpkg: - image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-fpm-net9.0 + image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-fpm diff --git a/eng/pipelines/common/xplat-setup.yml b/eng/pipelines/common/xplat-setup.yml index f50a2db9e81ec5..39676f8fd9b292 100644 --- a/eng/pipelines/common/xplat-setup.yml +++ b/eng/pipelines/common/xplat-setup.yml @@ -170,12 +170,12 @@ jobs: # OSX Public Build Pool (we don't have on-prem OSX BuildPool). ${{ if and(in(parameters.osGroup, 'osx', 'maccatalyst', 'ios', 'iossimulator', 'tvos', 'tvossimulator'), eq(variables['System.TeamProject'], 'public')) }}: - vmImage: 'macos-12' + vmImage: 'macos-13' # OSX Internal Pool ${{ if and(in(parameters.osGroup, 'osx', 'maccatalyst', 'ios', 'iossimulator', 'tvos', 'tvossimulator'), ne(variables['System.TeamProject'], 'public')) }}: name: "Azure Pipelines" - vmImage: 'macOS-12' + vmImage: 'macOS-13' os: macOS # Official Build Windows Pool diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml index df9c99e5297d63..78b035fa0228ea 100644 --- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml +++ b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml @@ -374,7 +374,7 @@ jobs: nameSuffix: PerfBDNApp isOfficialBuild: false pool: - vmImage: 'macos-12' + vmImage: 'macos-13' postBuildSteps: - template: /eng/pipelines/coreclr/templates/build-perf-bdn-app.yml parameters: diff --git a/eng/pipelines/coreclr/templates/helix-queues-setup.yml b/eng/pipelines/coreclr/templates/helix-queues-setup.yml index a9dae35f177eb4..815f297ff3060f 100644 --- a/eng/pipelines/coreclr/templates/helix-queues-setup.yml +++ b/eng/pipelines/coreclr/templates/helix-queues-setup.yml @@ -63,37 +63,37 @@ jobs: # Linux arm - ${{ if eq(parameters.platform, 'linux_arm') }}: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - - (Debian.12.Arm32.Open)Ubuntu.2004.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-arm32v7 + - (Debian.12.Arm32.Open)Ubuntu.2204.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-arm32v7 - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - - (Debian.12.Arm32)Ubuntu.2004.ArmArch@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-arm32v7 + - (Debian.12.Arm32)Ubuntu.2204.ArmArch@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-arm32v7 # Linux arm64 - ${{ if eq(parameters.platform, 'linux_arm64') }}: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - - (Ubuntu.2004.Arm64.Open)Ubuntu.2004.Armarch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-20.04-helix-arm64v8 + - (Ubuntu.2004.Arm64.Open)Ubuntu.2204.Armarch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-20.04-helix-arm64v8 - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - - (Ubuntu.2004.Arm64)Ubuntu.2004.ArmArch@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-20.04-helix-arm64v8 + - (Ubuntu.2004.Arm64)Ubuntu.2204.ArmArch@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-20.04-helix-arm64v8 # Linux musl x64 - ${{ if eq(parameters.platform, 'linux_musl_x64') }}: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - - (Alpine.317.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.17-helix-amd64 + - (Alpine.321.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.21-helix-amd64 - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - - (Alpine.317.Amd64)Ubuntu.2204.Amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.17-helix-amd64 + - (Alpine.321.Amd64)Ubuntu.2204.Amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.21-helix-amd64 # Linux musl arm32 - ${{ if eq(parameters.platform, 'linux_musl_arm') }}: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - - (Alpine.316.Arm32.Open)Ubuntu.2004.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.17-helix-arm32v7 + - (Alpine.321.Arm32.Open)Ubuntu.2204.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.21-helix-arm32v7 - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - - (Alpine.316.Arm32)Ubuntu.2004.ArmArch@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.17-helix-arm32v7 + - (Alpine.321.Arm32)Ubuntu.2204.ArmArch@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.21-helix-arm32v7 # Linux musl arm64 - ${{ if eq(parameters.platform, 'linux_musl_arm64') }}: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - - (Alpine.317.Arm64.Open)Ubuntu.2004.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.17-helix-arm64v8 + - (Alpine.320.Arm64.Open)Ubuntu.2204.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.20-helix-arm64v8 - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - - (Alpine.317.Arm64)Ubuntu.2004.ArmArch@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.17-helix-arm64v8 + - (Alpine.320.Arm64)Ubuntu.2204.ArmArch@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.20-helix-arm64v8 # Linux x64 - ${{ if eq(parameters.platform, 'linux_x64') }}: diff --git a/eng/pipelines/libraries/helix-queues-setup.yml b/eng/pipelines/libraries/helix-queues-setup.yml index 5b660a70bf7680..d6c83bd12137da 100644 --- a/eng/pipelines/libraries/helix-queues-setup.yml +++ b/eng/pipelines/libraries/helix-queues-setup.yml @@ -26,31 +26,28 @@ jobs: # Linux arm - ${{ if eq(parameters.platform, 'linux_arm') }}: - ${{ if or(eq(parameters.jobParameters.isExtraPlatformsBuild, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}: - - (Debian.12.Arm32.Open)Ubuntu.2004.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-arm32v7 + - (Debian.12.Arm32.Open)Ubuntu.2204.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-arm32v7 # Linux armv6 - ${{ if eq(parameters.platform, 'linux_armv6') }}: - - (Raspbian.10.Armv6.Open)Ubuntu.2004.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:raspbian-10-helix-arm32v6 + - (Raspbian.10.Armv6.Open)Ubuntu.2204.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:raspbian-10-helix-arm32v6 # Linux arm64 - ${{ if eq(parameters.platform, 'linux_arm64') }}: - - (Ubuntu.2204.Arm64.Open)Ubuntu.2004.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-arm64v8 + - (Ubuntu.2204.Arm64.Open)Ubuntu.2204.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-arm64v8 - ${{ if or(ne(parameters.jobParameters.isExtraPlatformsBuild, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}: - - (Debian.11.Arm64.Open)Ubuntu.2004.Armarch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-helix-arm64v8 + - (Debian.11.Arm64.Open)Ubuntu.2204.Armarch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-helix-arm64v8 # Linux musl x64 - ${{ if eq(parameters.platform, 'linux_musl_x64') }}: - ${{ if or(ne(parameters.jobParameters.isExtraPlatformsBuild, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}: - - (Alpine.317.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.17-helix-amd64 + - (Alpine.321.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.21-helix-amd64 - ${{ if or(eq(parameters.jobParameters.isExtraPlatformsBuild, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}: - - (Alpine.320.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.20-helix-amd64 - - (Alpine.318.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.18-helix-amd64 + - (Alpine.321.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.21-helix-amd64 # Linux musl arm64 - ${{ if and(eq(parameters.platform, 'linux_musl_arm64'), or(eq(parameters.jobParameters.isExtraPlatformsBuild, true), eq(parameters.jobParameters.includeAllPlatforms, true))) }}: - (Alpine.320.Arm64.Open)ubuntu.2004.armarch.open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.20-helix-arm64v8 - - (Alpine.318.Arm64.Open)ubuntu.2004.armarch.open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.18-helix-arm64v8 - - (Alpine.317.Arm64.Open)ubuntu.2004.armarch.open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.17-helix-arm64v8 # Linux x64 - ${{ if eq(parameters.platform, 'linux_x64') }}: @@ -58,21 +55,21 @@ jobs: - ${{ if and(eq(parameters.jobParameters.testScope, 'outerloop'), eq(parameters.jobParameters.runtimeFlavor, 'mono')) }}: - SLES.15.Amd64.Open - (Centos.8.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8-helix - - (Fedora.38.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-38-helix + - (Fedora.41.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-41-helix - (Ubuntu.2204.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-helix-amd64 - (Debian.11.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-helix-amd64 - ${{ if or(ne(parameters.jobParameters.testScope, 'outerloop'), ne(parameters.jobParameters.runtimeFlavor, 'mono')) }}: - ${{ if or(eq(parameters.jobParameters.isExtraPlatformsBuild, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}: - SLES.15.Amd64.Open - - (Fedora.38.Amd64.Open)ubuntu.2204.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-38-helix + - (Fedora.41.Amd64.Open)ubuntu.2204.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-41-helix - Ubuntu.2204.Amd64.Open - - (Debian.11.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-helix-amd64 + - (Debian.12.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-amd64 - (Mariner.2.0.Amd64.Open)Ubuntu.2204.Amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-helix-amd64 - (AzureLinux.3.0.Amd64.Open)Ubuntu.2204.Amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-helix-amd64 - (openSUSE.15.2.Amd64.Open)Ubuntu.2204.Amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:opensuse-15.2-helix-amd64 - ${{ if or(ne(parameters.jobParameters.isExtraPlatformsBuild, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}: - (Centos.8.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8-helix - - (Debian.11.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-11-helix-amd64 + - (Debian.12.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-amd64 - Ubuntu.2204.Amd64.Open - ${{ if or(eq(parameters.jobParameters.interpreter, 'true'), eq(parameters.jobParameters.isSingleFile, true)) }}: # Limiting interp runs as we don't need as much coverage. @@ -130,7 +127,6 @@ jobs: - ${{ if ne(parameters.jobParameters.testScope, 'outerloop') }}: - (Windows.10.Amd64.ServerRS5.Open)windows.10.amd64.serverrs5.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-ltsc2019-helix-amd64 - ${{ if or(ne(parameters.jobParameters.isExtraPlatformsBuild, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}: - - Windows.81.Amd64.Open - Windows.Amd64.Server2022.Open - Windows.11.Amd64.Client.Open - ${{ if eq(parameters.jobParameters.testScope, 'outerloop') }}: @@ -180,6 +176,6 @@ jobs: # Browser WebAssembly windows - ${{ if in(parameters.platform, 'browser_wasm_win', 'wasi_wasm_win') }}: - - (Windows.Amd64.Server2022.Open)windows.amd64.server2022.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-ltsc2022-helix-webassembly-20240702174122-7aba2af + - (Windows.Amd64.Server2022.Open)windows.amd64.server2022.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-ltsc2022-helix-webassembly ${{ insert }}: ${{ parameters.jobParameters }} diff --git a/eng/pipelines/official/jobs/prepare-signed-artifacts.yml b/eng/pipelines/official/jobs/prepare-signed-artifacts.yml index eb25d311890a98..482e2cc2b1e6f5 100644 --- a/eng/pipelines/official/jobs/prepare-signed-artifacts.yml +++ b/eng/pipelines/official/jobs/prepare-signed-artifacts.yml @@ -8,6 +8,9 @@ jobs: parameters: name: 'PrepareSignedArtifacts' displayName: 'Prepare Signed Artifacts' + + # Disable SBOM at job template level + enableSbom: false pool: name: $(DncEngInternalBuildPool) @@ -52,7 +55,11 @@ jobs: /p:DotNetSignType=$(_SignType) /bl:$(Build.SourcesDirectory)\prepare-artifacts.binlog displayName: Prepare artifacts and upload to build - + + - template: /eng/common/templates-official/steps/generate-sbom.yml + parameters: + BuildDropPath: $(Build.SourcesDirectory)\artifacts + - task: CopyFiles@2 displayName: Copy Files to $(Build.StagingDirectory)\BuildLogs inputs: diff --git a/eng/pipelines/runtime-ioslike.yml b/eng/pipelines/runtime-ioslike.yml index 1100ec500ce6ff..11477a3e175cba 100644 --- a/eng/pipelines/runtime-ioslike.yml +++ b/eng/pipelines/runtime-ioslike.yml @@ -4,6 +4,24 @@ trigger: none +# To reduce the load on the pipeline, enable it only for PRs that affect Mono LLVM related code. +pr: + branches: + include: + - main + - release/*.* + + paths: + include: + - src/mono/mono/mini/aot-*.* + - src/mono/mono/mini/llvm-*.* + - src/mono/mono/mini/mini-llvm-*.* + - src/mono/mono/mini/intrinsics.c + - src/mono/mono/mini/simd-*.* + - src/mono/mono/mini/decompose.c + - src/mono/mono/mini/method-to-ir.c + - src/mono/mono/mini/mini.c + variables: - template: /eng/pipelines/common/variables.yml diff --git a/eng/pipelines/runtime-llvm.yml b/eng/pipelines/runtime-llvm.yml index 5be2a5b063aaaa..6f3d16767ddbb3 100644 --- a/eng/pipelines/runtime-llvm.yml +++ b/eng/pipelines/runtime-llvm.yml @@ -28,6 +28,24 @@ schedules: - main always: false # run only if there were changes since the last successful scheduled run. +# To reduce the load on the pipeline, enable it only for PRs that affect Mono LLVM related code. +pr: + branches: + include: + - main + - release/*.* + + paths: + include: + - src/mono/mono/mini/aot-*.* + - src/mono/mono/mini/llvm-*.* + - src/mono/mono/mini/mini-llvm-*.* + - src/mono/mono/mini/intrinsics.c + - src/mono/mono/mini/simd-*.* + - src/mono/mono/mini/decompose.c + - src/mono/mono/mini/method-to-ir.c + - src/mono/mono/mini/mini.c + variables: - template: /eng/pipelines/common/variables.yml diff --git a/eng/pipelines/runtime-official.yml b/eng/pipelines/runtime-official.yml index 55021be6e29ed4..e3c7dc5050005f 100644 --- a/eng/pipelines/runtime-official.yml +++ b/eng/pipelines/runtime-official.yml @@ -41,11 +41,11 @@ extends: # Localization build # - - ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/release/9.0') }}: + - ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/main') }}: - template: /eng/common/templates-official/job/onelocbuild.yml parameters: MirrorRepo: runtime - MirrorBranch: release/9.0 + MirrorBranch: main LclSource: lclFilesfromPackage LclPackageId: 'LCL-JUNO-PROD-RUNTIME' @@ -661,7 +661,7 @@ extends: flattenFolders: true buildArgs: -s mono.workloads -c $(_BuildConfig) /p:PackageSource=$(Build.SourcesDirectory)/artifacts/workloadPackages /p:WorkloadOutputPath=$(Build.SourcesDirectory)/artifacts/workloads - + postBuildSteps: # Upload packages wrapping msis - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index bcab359dde5792..f06667f3e8e6e2 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -926,25 +926,25 @@ extends: # WASI/WASM - - template: /eng/pipelines/common/templates/wasm-library-tests.yml - parameters: - platforms: - - wasi_wasm - - wasi_wasm_win - nameSuffix: '_Smoke' - extraBuildArgs: /p:EnableAggressiveTrimming=true /p:RunWasmSamples=true /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) - shouldRunSmokeOnly: true - alwaysRun: ${{ variables.isRollingBuild }} - scenarios: - - WasmTestOnWasmtime - - - template: /eng/pipelines/common/templates/simple-wasm-build-tests.yml - parameters: - platforms: - - wasi_wasm - - wasi_wasm_win - extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) - alwaysRun: ${{ variables.isRollingBuild }} + # - template: /eng/pipelines/common/templates/wasm-library-tests.yml + # parameters: + # platforms: + # - wasi_wasm + # - wasi_wasm_win + # nameSuffix: '_Smoke' + # extraBuildArgs: /p:EnableAggressiveTrimming=true /p:RunWasmSamples=true /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) + # shouldRunSmokeOnly: true + # alwaysRun: ${{ variables.isRollingBuild }} + # scenarios: + # - WasmTestOnWasmtime + + # - template: /eng/pipelines/common/templates/simple-wasm-build-tests.yml + # parameters: + # platforms: + # - wasi_wasm + # - wasi_wasm_win + # extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) + # alwaysRun: ${{ variables.isRollingBuild }} # # Android devices diff --git a/eng/testing/scenarios/BuildWasiAppsJobsList.txt b/eng/testing/scenarios/BuildWasiAppsJobsList.txt index 86c0517585a480..e69de29bb2d1d6 100644 --- a/eng/testing/scenarios/BuildWasiAppsJobsList.txt +++ b/eng/testing/scenarios/BuildWasiAppsJobsList.txt @@ -1,7 +0,0 @@ -Wasi.Build.Tests.InvariantTests -Wasi.Build.Tests.ILStripTests -Wasi.Build.Tests.SdkMissingTests -Wasi.Build.Tests.RuntimeConfigTests -Wasi.Build.Tests.WasiTemplateTests -Wasi.Build.Tests.PInvokeTableGeneratorTests -Wasi.Build.Tests.WasiLibraryModeTests diff --git a/global.json b/global.json index 26b27962d3def5..ebf092e8e505d2 100644 --- a/global.json +++ b/global.json @@ -1,16 +1,16 @@ { "sdk": { - "version": "9.0.100-rc.2.24474.11", + "version": "9.0.104", "allowPrerelease": true, "rollForward": "major" }, "tools": { - "dotnet": "9.0.100-rc.2.24474.11" + "dotnet": "9.0.104" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24516.2", - "Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.24516.2", - "Microsoft.DotNet.SharedFramework.Sdk": "9.0.0-beta.24516.2", + "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.25161.4", + "Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.25161.4", + "Microsoft.DotNet.SharedFramework.Sdk": "9.0.0-beta.25161.4", "Microsoft.Build.NoTargets": "3.7.0", "Microsoft.Build.Traversal": "3.4.0", "Microsoft.NET.Sdk.IL": "9.0.0-rtm.24511.16" diff --git a/src/coreclr/.nuget/Directory.Build.props b/src/coreclr/.nuget/Directory.Build.props index 4a765f85b5bdcc..6f4d7a0cfb51dc 100644 --- a/src/coreclr/.nuget/Directory.Build.props +++ b/src/coreclr/.nuget/Directory.Build.props @@ -19,11 +19,6 @@ true - - - false - - diff --git a/src/coreclr/.nuget/Directory.Build.targets b/src/coreclr/.nuget/Directory.Build.targets index 379fbd65030b32..f30471ded8ae4f 100644 --- a/src/coreclr/.nuget/Directory.Build.targets +++ b/src/coreclr/.nuget/Directory.Build.targets @@ -4,7 +4,7 @@ $(ProductVersion) - $(PackageVersion) + $(PackageVersion) diff --git a/src/coreclr/debug/ee/controller.cpp b/src/coreclr/debug/ee/controller.cpp index fd26e7fe3135dd..1738eb5862fee7 100644 --- a/src/coreclr/debug/ee/controller.cpp +++ b/src/coreclr/debug/ee/controller.cpp @@ -25,6 +25,11 @@ const char *GetTType( TraceType tt); #define IsSingleStep(exception) ((exception) == EXCEPTION_SINGLE_STEP) +typedef enum __TailCallFunctionType { + TailCallThatReturns = 1, + StoreTailCallArgs = 2 +} TailCallFunctionType; + // ------------------------------------------------------------------------- // DebuggerController routines // ------------------------------------------------------------------------- @@ -5631,10 +5636,10 @@ static bool IsTailCallJitHelper(const BYTE * ip) // control flow will be a little peculiar in that the function will return // immediately, so we need special handling in the debugger for it. This // function detects that case to be used for those scenarios. -static bool IsTailCallThatReturns(const BYTE * ip, ControllerStackInfo* info) +static bool IsTailCall(const BYTE * ip, ControllerStackInfo* info, TailCallFunctionType type) { MethodDesc* pTailCallDispatcherMD = TailCallHelp::GetTailCallDispatcherMD(); - if (pTailCallDispatcherMD == NULL) + if (pTailCallDispatcherMD == NULL && type == TailCallFunctionType::TailCallThatReturns) { return false; } @@ -5650,6 +5655,11 @@ static bool IsTailCallThatReturns(const BYTE * ip, ControllerStackInfo* info) ? trace.GetMethodDesc() : g_pEEInterface->GetNativeCodeMethodDesc(trace.GetAddress()); + if (type == TailCallFunctionType::StoreTailCallArgs) + { + return (pTargetMD && pTargetMD->IsDynamicMethod() && pTargetMD->AsDynamicMethodDesc()->GetILStubType() == DynamicMethodDesc::StubTailCallStoreArgs); + } + if (pTargetMD != pTailCallDispatcherMD) { return false; @@ -5881,6 +5891,13 @@ bool DebuggerStepper::TrapStep(ControllerStackInfo *info, bool in) fCallingIntoFunclet = IsAddrWithinMethodIncludingFunclet(ji, info->m_activeFrame.md, walker.GetNextIP()) && ((CORDB_ADDRESS)(SIZE_T)walker.GetNextIP() != ji->m_addrOfCode); #endif + // If we are stepping into a tail call that uses the StoreTailCallArgs + // we need to enable the method enter, otherwise it will behave like a resume + if (in && IsTailCall(walker.GetNextIP(), info, TailCallFunctionType::StoreTailCallArgs)) + { + EnableMethodEnter(); + return true; + } // At this point, we know that the call/branch target is not // in the current method. The possible cases is that this is // a jump or a tailcall-via-helper. There are two separate @@ -5892,7 +5909,7 @@ bool DebuggerStepper::TrapStep(ControllerStackInfo *info, bool in) // is done by stepping out to the previous user function // (non IL stub). if ((fIsJump && !fCallingIntoFunclet) || IsTailCallJitHelper(walker.GetNextIP()) || - IsTailCallThatReturns(walker.GetNextIP(), info)) + IsTailCall(walker.GetNextIP(), info, TailCallFunctionType::TailCallThatReturns)) { // A step-over becomes a step-out for a tail call. if (!in) @@ -6038,7 +6055,7 @@ bool DebuggerStepper::TrapStep(ControllerStackInfo *info, bool in) return true; } - if (IsTailCallJitHelper(walker.GetNextIP()) || IsTailCallThatReturns(walker.GetNextIP(), info)) + if (IsTailCallJitHelper(walker.GetNextIP()) || IsTailCall(walker.GetNextIP(), info, TailCallFunctionType::TailCallThatReturns)) { if (!in) { @@ -7410,7 +7427,15 @@ bool DebuggerStepper::TriggerSingleStep(Thread *thread, const BYTE *ip) if (!g_pEEInterface->IsManagedNativeCode(ip)) { LOG((LF_CORDB,LL_INFO10000, "DS::TSS: not in managed code, Returning false (case 0)!\n")); - DisableSingleStep(); + // Sometimes we can get here with a callstack that is coming from an APC + // this will disable the single stepping and incorrectly resume an app that the user + // is stepping through. +#ifdef FEATURE_THREAD_ACTIVATION + if ((thread->m_State & Thread::TS_DebugWillSync) == 0) +#endif + { + DisableSingleStep(); + } return false; } diff --git a/src/coreclr/gc/gc.cpp b/src/coreclr/gc/gc.cpp index 217e90d38c0228..9336ae7363631a 100644 --- a/src/coreclr/gc/gc.cpp +++ b/src/coreclr/gc/gc.cpp @@ -2890,10 +2890,14 @@ bool gc_heap::trigger_initial_gen2_p = false; #ifdef BACKGROUND_GC bool gc_heap::trigger_bgc_for_rethreading_p = false; +int gc_heap::total_bgc_threads = 0; +int gc_heap::last_bgc_n_heaps = 0; +int gc_heap::last_total_bgc_threads = 0; #endif //BACKGROUND_GC #ifdef STRESS_DYNAMIC_HEAP_COUNT int gc_heap::heaps_in_this_gc = 0; +int gc_heap::bgc_to_ngc2_ratio = 0; #endif //STRESS_DYNAMIC_HEAP_COUNT #endif // DYNAMIC_HEAP_COUNT @@ -6404,7 +6408,11 @@ class heap_select if (GCToOSInterface::CanGetCurrentProcessorNumber()) { uint32_t proc_no = GCToOSInterface::GetCurrentProcessorNumber(); - proc_no_to_heap_no[proc_no] = (uint16_t)heap_number; + // For a 32-bit process running on a machine with > 64 procs, + // even though the process can only use up to 32 procs, the processor + // index can be >= 64; or in the cpu group case, if the process is not running in cpu group #0, + // the GetCurrentProcessorNumber will return a number that's >= 64. + proc_no_to_heap_no[proc_no % MAX_SUPPORTED_CPUS] = (uint16_t)heap_number; } } @@ -6426,7 +6434,11 @@ class heap_select if (GCToOSInterface::CanGetCurrentProcessorNumber()) { uint32_t proc_no = GCToOSInterface::GetCurrentProcessorNumber(); - int adjusted_heap = proc_no_to_heap_no[proc_no]; + // For a 32-bit process running on a machine with > 64 procs, + // even though the process can only use up to 32 procs, the processor + // index can be >= 64; or in the cpu group case, if the process is not running in cpu group #0, + // the GetCurrentProcessorNumber will return a number that's >= 64. + int adjusted_heap = proc_no_to_heap_no[proc_no % MAX_SUPPORTED_CPUS]; // with dynamic heap count, need to make sure the value is in range. if (adjusted_heap >= gc_heap::n_heaps) { @@ -14182,6 +14194,11 @@ HRESULT gc_heap::initialize_gc (size_t soh_segment_size, if ((dynamic_adaptation_mode == dynamic_adaptation_to_application_sizes) && (conserve_mem_setting == 0)) conserve_mem_setting = 5; + +#ifdef STRESS_DYNAMIC_HEAP_COUNT + bgc_to_ngc2_ratio = (int)GCConfig::GetGCDBGCRatio(); + dprintf (1, ("bgc_to_ngc2_ratio is %d", bgc_to_ngc2_ratio)); +#endif #endif //DYNAMIC_HEAP_COUNT if (conserve_mem_setting < 0) @@ -21071,6 +21088,18 @@ int gc_heap::joined_generation_to_condemn (BOOL should_evaluate_elevation, if (!((n == max_generation) && *blocking_collection_p)) { n = max_generation; + +#ifdef STRESS_DYNAMIC_HEAP_COUNT + if (bgc_to_ngc2_ratio) + { + int r = (int)gc_rand::get_rand ((bgc_to_ngc2_ratio + 1) * 10); + dprintf (6666, ("%d - making this full GC %s", r, ((r < 10) ? "NGC2" : "BGC"))); + if (r < 10) + { + *blocking_collection_p = TRUE; + } + } +#endif //STRESS_DYNAMIC_HEAP_COUNT } } } @@ -24332,12 +24361,37 @@ void gc_heap::garbage_collect (int n) size_t saved_bgc_th_count_creation_failed = bgc_th_count_creation_failed; #endif //DYNAMIC_HEAP_COUNT + // This is the count of threads that GCToEEInterface::CreateThread reported successful for. + int total_bgc_threads_running = 0; for (int i = 0; i < n_heaps; i++) { - prepare_bgc_thread (g_heaps[i]); + gc_heap* hp = g_heaps[i]; + if (prepare_bgc_thread (hp)) + { + assert (hp->bgc_thread_running); + if (!hp->bgc_thread_running) + { + dprintf (6666, ("h%d prepare succeeded but running is still false!", i)); + GCToOSInterface::DebugBreak(); + } + total_bgc_threads_running++; + } + else + { + break; + } } #ifdef DYNAMIC_HEAP_COUNT + // Even if we don't do a BGC, we need to record how many threads were successfully created because those will + // be running. + total_bgc_threads = max (total_bgc_threads, total_bgc_threads_running); + + if (total_bgc_threads_running != n_heaps) + { + dprintf (6666, ("wanted to have %d BGC threads but only have %d", n_heaps, total_bgc_threads_running)); + } + add_to_bgc_th_creation_history (current_gc_index, (bgc_th_count_created - saved_bgc_th_count_created), (bgc_th_count_created_th_existed - saved_bgc_th_count_created_th_existed), @@ -24369,7 +24423,15 @@ void gc_heap::garbage_collect (int n) for (int i = 0; i < n_heaps; i++) { gc_heap* hp = g_heaps[i]; - if (!(hp->bgc_thread) || !hp->commit_mark_array_bgc_init()) + + if (!(hp->bgc_thread_running)) + { + assert (!(hp->bgc_thread)); + } + + // In theory we could be in a situation where bgc_thread_running is false but bgc_thread is non NULL. We don't + // support this scenario so don't do a BGC. + if (!(hp->bgc_thread_running && hp->bgc_thread && hp->commit_mark_array_bgc_init())) { do_concurrent_p = FALSE; break; @@ -24389,8 +24451,37 @@ void gc_heap::garbage_collect (int n) } #endif //MULTIPLE_HEAPS +#ifdef DYNAMIC_HEAP_COUNT + dprintf (6666, ("last BGC saw %d heaps and %d total threads, currently %d heaps and %d total threads, %s BGC", + last_bgc_n_heaps, last_total_bgc_threads, n_heaps, total_bgc_threads, (do_concurrent_p ? "doing" : "not doing"))); +#endif //DYNAMIC_HEAP_COUNT + if (do_concurrent_p) { +#ifdef DYNAMIC_HEAP_COUNT + int diff = n_heaps - last_bgc_n_heaps; + if (diff > 0) + { + int saved_idle_bgc_thread_count = dynamic_heap_count_data.idle_bgc_thread_count; + int max_idle_event_count = min (n_heaps, last_total_bgc_threads); + int idle_events_to_set = max_idle_event_count - last_bgc_n_heaps; + if (idle_events_to_set > 0) + { + Interlocked::ExchangeAdd (&dynamic_heap_count_data.idle_bgc_thread_count, -idle_events_to_set); + dprintf (6666, ("%d BGC threads exist, setting %d idle events for h%d-h%d, total idle %d -> %d", + total_bgc_threads, idle_events_to_set, last_bgc_n_heaps, (last_bgc_n_heaps + idle_events_to_set - 1), + saved_idle_bgc_thread_count, VolatileLoadWithoutBarrier (&dynamic_heap_count_data.idle_bgc_thread_count))); + for (int heap_idx = last_bgc_n_heaps; heap_idx < max_idle_event_count; heap_idx++) + { + g_heaps[heap_idx]->bgc_idle_thread_event.Set(); + } + } + } + + last_bgc_n_heaps = n_heaps; + last_total_bgc_threads = total_bgc_threads; +#endif //DYNAMIC_HEAP_COUNT + #ifdef FEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP SoftwareWriteWatch::EnableForGCHeap(); #endif //FEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP @@ -25918,9 +26009,6 @@ void gc_heap::check_heap_count () for (int heap_idx = n_heaps; heap_idx < new_n_heaps; heap_idx++) { g_heaps[heap_idx]->gc_idle_thread_event.Set(); -#ifdef BACKGROUND_GC - g_heaps[heap_idx]->bgc_idle_thread_event.Set(); -#endif //BACKGROUND_GC } } @@ -37637,6 +37725,19 @@ void gc_heap::gc_thread_stub (void* arg) void gc_heap::bgc_thread_stub (void* arg) { gc_heap* heap = (gc_heap*)arg; + +#ifdef STRESS_DYNAMIC_HEAP_COUNT + // We should only do this every so often; otherwise we'll never be able to do a BGC + int r = (int)gc_rand::get_rand (30); + bool wait_p = (r < 10); + + if (wait_p) + { + GCToOSInterface::Sleep (100); + } + dprintf (6666, ("h%d %s", heap->heap_number, (wait_p ? "waited" : "did not wait"))); +#endif + heap->bgc_thread = GCToEEInterface::GetThread(); assert(heap->bgc_thread != nullptr); heap->bgc_thread_function(); @@ -39429,6 +39530,8 @@ void gc_heap::add_to_bgc_th_creation_history (size_t gc_index, size_t count_crea } #endif //DYNAMIC_HEAP_COUNT +// If this returns TRUE, we are saying we expect that thread to be there. However, when that thread is available to work is indeterministic. +// But when we actually start a BGC, naturally we'll need to wait till it gets to the point it can work. BOOL gc_heap::prepare_bgc_thread(gc_heap* gh) { BOOL success = FALSE; @@ -39440,7 +39543,19 @@ BOOL gc_heap::prepare_bgc_thread(gc_heap* gh) dprintf (2, ("GC thread not running")); if (gh->bgc_thread == 0) { +#ifdef STRESS_DYNAMIC_HEAP_COUNT + // to stress, we just don't actually try to create the thread to simulate a failure + int r = (int)gc_rand::get_rand (100); + bool try_to_create_p = (r > 10); + BOOL thread_created_p = (try_to_create_p ? create_bgc_thread (gh) : FALSE); + if (!thread_created_p) + { + dprintf (6666, ("h%d we failed to create the thread, %s", gh->heap_number, (try_to_create_p ? "tried" : "didn't try"))); + } + if (thread_created_p) +#else //STRESS_DYNAMIC_HEAP_COUNT if (create_bgc_thread(gh)) +#endif //STRESS_DYNAMIC_HEAP_COUNT { success = TRUE; thread_created = TRUE; @@ -39458,8 +39573,11 @@ BOOL gc_heap::prepare_bgc_thread(gc_heap* gh) else { #ifdef DYNAMIC_HEAP_COUNT + // This would be a very unusual scenario where GCToEEInterface::CreateThread told us it failed yet the thread was created. bgc_th_count_created_th_existed++; + dprintf (6666, ("h%d we cannot have a thread that runs yet CreateThread reported it failed to create it", gh->heap_number)); #endif //DYNAMIC_HEAP_COUNT + assert (!"GCToEEInterface::CreateThread returned FALSE yet the thread was created!"); } } else @@ -39657,7 +39775,7 @@ void gc_heap::bgc_thread_function() while (1) { // Wait for work to do... - dprintf (3, ("bgc thread: waiting...")); + dprintf (6666, ("h%d bgc thread: waiting...", heap_number)); cooperative_mode = enable_preemptive (); //current_thread->m_fPreemptiveGCDisabled = 0; @@ -39706,36 +39824,71 @@ void gc_heap::bgc_thread_function() continue; } } + +#ifdef STRESS_DYNAMIC_HEAP_COUNT + if (n_heaps <= heap_number) + { + uint32_t delay_ms = (uint32_t)gc_rand::get_rand (200); + GCToOSInterface::Sleep (delay_ms); + } +#endif //STRESS_DYNAMIC_HEAP_COUNT + // if we signal the thread with no concurrent work to do -> exit if (!settings.concurrent) { - dprintf (3, ("no concurrent GC needed, exiting")); + dprintf (6666, ("h%d no concurrent GC needed, exiting", heap_number)); + +#ifdef STRESS_DYNAMIC_HEAP_COUNT + flush_gc_log (true); + GCToOSInterface::DebugBreak(); +#endif break; } - gc_background_running = TRUE; - dprintf (2, (ThreadStressLog::gcStartBgcThread(), heap_number, - generation_free_list_space (generation_of (max_generation)), - generation_free_obj_space (generation_of (max_generation)), - dd_fragmentation (dynamic_data_of (max_generation)))); #ifdef DYNAMIC_HEAP_COUNT if (n_heaps <= heap_number) { + Interlocked::Increment (&dynamic_heap_count_data.idle_bgc_thread_count); add_to_bgc_hc_history (hc_record_bgc_inactive); // this is the case where we have more background GC threads than heaps // - wait until we're told to continue... - dprintf (9999, ("BGC thread %d idle (%d heaps) (gc%Id)", heap_number, n_heaps, VolatileLoadWithoutBarrier (&settings.gc_index))); + dprintf (6666, ("BGC%Id h%d going idle (%d heaps), idle count is now %d", + VolatileLoadWithoutBarrier (&settings.gc_index), heap_number, n_heaps, VolatileLoadWithoutBarrier (&dynamic_heap_count_data.idle_bgc_thread_count))); bgc_idle_thread_event.Wait(INFINITE, FALSE); - dprintf (9999, ("BGC thread %d waking from idle (%d heaps) (gc%Id)", heap_number, n_heaps, VolatileLoadWithoutBarrier (&settings.gc_index))); + dprintf (6666, ("BGC%Id h%d woke from idle (%d heaps), idle count is now %d", + VolatileLoadWithoutBarrier (&settings.gc_index), heap_number, n_heaps, VolatileLoadWithoutBarrier (&dynamic_heap_count_data.idle_bgc_thread_count))); continue; } else { + if (heap_number == 0) + { + const int spin_count = 1024; + int idle_bgc_thread_count = total_bgc_threads - n_heaps; + dprintf (6666, ("n_heaps %d, total %d bgc threads, bgc idle should be %d and is %d", + n_heaps, total_bgc_threads, idle_bgc_thread_count, VolatileLoadWithoutBarrier (&dynamic_heap_count_data.idle_bgc_thread_count))); + if (idle_bgc_thread_count != dynamic_heap_count_data.idle_bgc_thread_count) + { + dprintf (6666, ("current idle is %d, trying to get to %d", + VolatileLoadWithoutBarrier (&dynamic_heap_count_data.idle_bgc_thread_count), idle_bgc_thread_count)); + spin_and_wait (spin_count, (idle_bgc_thread_count == dynamic_heap_count_data.idle_bgc_thread_count)); + } + } + add_to_bgc_hc_history (hc_record_bgc_active); } #endif //DYNAMIC_HEAP_COUNT + if (heap_number == 0) + { + gc_background_running = TRUE; + dprintf (6666, (ThreadStressLog::gcStartBgcThread(), heap_number, + generation_free_list_space (generation_of (max_generation)), + generation_free_obj_space (generation_of (max_generation)), + dd_fragmentation (dynamic_data_of (max_generation)))); + } + gc1(); #ifndef DOUBLY_LINKED_FL diff --git a/src/coreclr/gc/gcconfig.h b/src/coreclr/gc/gcconfig.h index 6952355a677bd2..c74a3b1f286ab7 100644 --- a/src/coreclr/gc/gcconfig.h +++ b/src/coreclr/gc/gcconfig.h @@ -142,8 +142,9 @@ class GCConfigStringHolder INT_CONFIG (GCSpinCountUnit, "GCSpinCountUnit", NULL, 0, "Specifies the spin count unit used by the GC.") \ INT_CONFIG (GCDynamicAdaptationMode, "GCDynamicAdaptationMode", "System.GC.DynamicAdaptationMode", 1, "Enable the GC to dynamically adapt to application sizes.") \ INT_CONFIG (GCDTargetTCP, "GCDTargetTCP", "System.GC.DTargetTCP", 0, "Specifies the target tcp for DATAS") \ - BOOL_CONFIG (GCLogBGCThreadId, "GCLogBGCThreadId", NULL, false, "Specifies if BGC ThreadId should be logged") - + INT_CONFIG (GCDBGCRatio, " GCDBGCRatio", NULL, 0, "Specifies the ratio of BGC to NGC2 for HC change") \ + BOOL_CONFIG (GCLogBGCThreadId, "GCLogBGCThreadId", NULL, false, "Specifies if BGC ThreadId should be logged") \ + BOOL_CONFIG (GCCacheSizeFromSysConf, "GCCacheSizeFromSysConf", NULL, false, "Specifies using sysconf to retrieve the last level cache size for Unix.") // This class is responsible for retreiving configuration information // for how the GC should operate. diff --git a/src/coreclr/gc/gcpriv.h b/src/coreclr/gc/gcpriv.h index 9486645259936a..0d1d31daeb6173 100644 --- a/src/coreclr/gc/gcpriv.h +++ b/src/coreclr/gc/gcpriv.h @@ -5175,6 +5175,9 @@ class gc_heap int last_n_heaps; // don't start a GC till we see (n_max_heaps - new_n_heaps) number of threads idling VOLATILE(int32_t) idle_thread_count; +#ifdef BACKGROUND_GC + VOLATILE(int32_t) idle_bgc_thread_count; +#endif bool init_only_p; bool should_change_heap_count; @@ -5202,6 +5205,17 @@ class gc_heap // This is set when change_heap_count wants the next GC to be a BGC for rethreading gen2 FL // and reset during that BGC. PER_HEAP_ISOLATED_FIELD_MAINTAINED bool trigger_bgc_for_rethreading_p; + // BGC threads are created on demand but we don't destroy the ones we created. This + // is to track how many we've created. They may or may not be active depending on + // if they are needed. + PER_HEAP_ISOLATED_FIELD_MAINTAINED int total_bgc_threads; + + // HC last BGC observed. + PER_HEAP_ISOLATED_FIELD_MAINTAINED int last_bgc_n_heaps; + // Number of total BGC threads last BGC observed. This tells us how many new BGC threads have + // been created since. Note that just because a BGC thread is created doesn't mean it's used. + // We can fail at committing mark array and not proceed with the BGC. + PER_HEAP_ISOLATED_FIELD_MAINTAINED int last_total_bgc_threads; #endif //BACKGROUND_GC #endif //DYNAMIC_HEAP_COUNT @@ -5352,6 +5366,9 @@ class gc_heap #ifdef DYNAMIC_HEAP_COUNT PER_HEAP_ISOLATED_FIELD_INIT_ONLY int dynamic_adaptation_mode; +#ifdef STRESS_DYNAMIC_HEAP_COUNT + PER_HEAP_ISOLATED_FIELD_INIT_ONLY int bgc_to_ngc2_ratio; +#endif //STRESS_DYNAMIC_HEAP_COUNT #endif //DYNAMIC_HEAP_COUNT /********************************************/ diff --git a/src/coreclr/gc/unix/CMakeLists.txt b/src/coreclr/gc/unix/CMakeLists.txt index 83c0bf8a67d8b4..f88b039609881e 100644 --- a/src/coreclr/gc/unix/CMakeLists.txt +++ b/src/coreclr/gc/unix/CMakeLists.txt @@ -1,5 +1,6 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) include_directories("../env") +include_directories("..") include(configure.cmake) diff --git a/src/coreclr/gc/unix/gcenv.unix.cpp b/src/coreclr/gc/unix/gcenv.unix.cpp index 879397c4493c40..7c2101431c9128 100644 --- a/src/coreclr/gc/unix/gcenv.unix.cpp +++ b/src/coreclr/gc/unix/gcenv.unix.cpp @@ -18,8 +18,10 @@ #include "gcenv.structs.h" #include "gcenv.base.h" #include "gcenv.os.h" +#include "gcenv.ee.h" #include "gcenv.unix.inl" #include "volatile.h" +#include "gcconfig.h" #include "numasupport.h" #if HAVE_SWAPCTL @@ -862,10 +864,10 @@ bool ReadMemoryValueFromFile(const char* filename, uint64_t* val) return result; } -static size_t GetLogicalProcessorCacheSizeFromOS() +static void GetLogicalProcessorCacheSizeFromSysConf(size_t* cacheLevel, size_t* cacheSize) { - size_t cacheLevel = 0; - size_t cacheSize = 0; + assert (cacheLevel != nullptr); + assert (cacheSize != nullptr); #if defined(_SC_LEVEL1_DCACHE_SIZE) || defined(_SC_LEVEL2_CACHE_SIZE) || defined(_SC_LEVEL3_CACHE_SIZE) || defined(_SC_LEVEL4_CACHE_SIZE) const int cacheLevelNames[] = @@ -881,47 +883,105 @@ static size_t GetLogicalProcessorCacheSizeFromOS() long size = sysconf(cacheLevelNames[i]); if (size > 0) { - cacheSize = (size_t)size; - cacheLevel = i + 1; + *cacheSize = (size_t)size; + *cacheLevel = i + 1; break; } } #endif +} + +static void GetLogicalProcessorCacheSizeFromSysFs(size_t* cacheLevel, size_t* cacheSize) +{ + assert (cacheLevel != nullptr); + assert (cacheSize != nullptr); #if defined(TARGET_LINUX) && !defined(HOST_ARM) && !defined(HOST_X86) - if (cacheSize == 0) + // + // Retrieve cachesize via sysfs by reading the file /sys/devices/system/cpu/cpu0/cache/index{LastLevelCache}/size + // for the platform. Currently musl and arm64 should be only cases to use + // this method to determine cache size. + // + size_t level; + char path_to_size_file[] = "/sys/devices/system/cpu/cpu0/cache/index-/size"; + char path_to_level_file[] = "/sys/devices/system/cpu/cpu0/cache/index-/level"; + int index = 40; + assert(path_to_size_file[index] == '-'); + assert(path_to_level_file[index] == '-'); + + for (int i = 0; i < 5; i++) { - // - // Fallback to retrieve cachesize via /sys/.. if sysconf was not available - // for the platform. Currently musl and arm64 should be only cases to use - // this method to determine cache size. - // - size_t level; - char path_to_size_file[] = "/sys/devices/system/cpu/cpu0/cache/index-/size"; - char path_to_level_file[] = "/sys/devices/system/cpu/cpu0/cache/index-/level"; - int index = 40; - assert(path_to_size_file[index] == '-'); - assert(path_to_level_file[index] == '-'); - - for (int i = 0; i < 5; i++) - { - path_to_size_file[index] = (char)(48 + i); + path_to_size_file[index] = (char)(48 + i); - uint64_t cache_size_from_sys_file = 0; + uint64_t cache_size_from_sys_file = 0; - if (ReadMemoryValueFromFile(path_to_size_file, &cache_size_from_sys_file)) - { - cacheSize = std::max(cacheSize, (size_t)cache_size_from_sys_file); + if (ReadMemoryValueFromFile(path_to_size_file, &cache_size_from_sys_file)) + { + *cacheSize = std::max(*cacheSize, (size_t)cache_size_from_sys_file); - path_to_level_file[index] = (char)(48 + i); - if (ReadMemoryValueFromFile(path_to_level_file, &level)) - { - cacheLevel = level; - } + path_to_level_file[index] = (char)(48 + i); + if (ReadMemoryValueFromFile(path_to_level_file, &level)) + { + *cacheLevel = level; } } } +#endif +} + +static void GetLogicalProcessorCacheSizeFromHeuristic(size_t* cacheLevel, size_t* cacheSize) +{ + assert (cacheLevel != nullptr); + assert (cacheSize != nullptr); + +#if (defined(TARGET_LINUX) && !defined(TARGET_APPLE)) + { + // Use the following heuristics at best depending on the CPU count + // 1 ~ 4 : 4 MB + // 5 ~ 16 : 8 MB + // 17 ~ 64 : 16 MB + // 65+ : 32 MB + DWORD logicalCPUs = g_processAffinitySet.Count(); + if (logicalCPUs < 5) + { + *cacheSize = 4; + } + else if (logicalCPUs < 17) + { + *cacheSize = 8; + } + else if (logicalCPUs < 65) + { + *cacheSize = 16; + } + else + { + *cacheSize = 32; + } + + *cacheSize *= (1024 * 1024); + } #endif +} + +static size_t GetLogicalProcessorCacheSizeFromOS() +{ + size_t cacheLevel = 0; + size_t cacheSize = 0; + + if (GCConfig::GetGCCacheSizeFromSysConf()) + { + GetLogicalProcessorCacheSizeFromSysConf(&cacheLevel, &cacheSize); + } + + if (cacheSize == 0) + { + GetLogicalProcessorCacheSizeFromSysFs(&cacheLevel, &cacheSize); + if (cacheSize == 0) + { + GetLogicalProcessorCacheSizeFromHeuristic(&cacheLevel, &cacheSize); + } + } #if HAVE_SYSCTLBYNAME if (cacheSize == 0) @@ -948,32 +1008,7 @@ static size_t GetLogicalProcessorCacheSizeFromOS() #if (defined(HOST_ARM64) || defined(HOST_LOONGARCH64)) && !defined(TARGET_APPLE) if (cacheLevel != 3) { - // We expect to get the L3 cache size for Arm64 but currently expected to be missing that info - // from most of the machines. - // Hence, just use the following heuristics at best depending on the CPU count - // 1 ~ 4 : 4 MB - // 5 ~ 16 : 8 MB - // 17 ~ 64 : 16 MB - // 65+ : 32 MB - DWORD logicalCPUs = g_processAffinitySet.Count(); - if (logicalCPUs < 5) - { - cacheSize = 4; - } - else if (logicalCPUs < 17) - { - cacheSize = 8; - } - else if (logicalCPUs < 65) - { - cacheSize = 16; - } - else - { - cacheSize = 32; - } - - cacheSize *= (1024 * 1024); + GetLogicalProcessorCacheSizeFromHeuristic(&cacheLevel, &cacheSize); } #endif diff --git a/src/coreclr/ildasm/dasm.cpp b/src/coreclr/ildasm/dasm.cpp index f94a5846672d96..7c2b3eabd36597 100644 --- a/src/coreclr/ildasm/dasm.cpp +++ b/src/coreclr/ildasm/dasm.cpp @@ -1914,7 +1914,7 @@ BYTE* PrettyPrintCABlobValue(PCCOR_SIGNATURE &typePtr, for(n=0; n < numElements; n++) { if(n) appendStr(out," "); - sprintf_s(str, 64, "%.*g", 8, (double)(*((float*)dataPtr))); + sprintf_s(str, 64, "%#.8g", (double)(*((float*)dataPtr))); float df = (float)atof(str); // Must compare as underlying bytes, not floating point otherwise optimizer will // try to enregister and compare 80-bit precision number with 32-bit precision number!!!! @@ -1933,7 +1933,7 @@ BYTE* PrettyPrintCABlobValue(PCCOR_SIGNATURE &typePtr, { if(n) appendStr(out," "); char *pch; - sprintf_s(str, 64, "%.*g", 17, *((double*)dataPtr)); + sprintf_s(str, 64, "%#.17g", *((double*)dataPtr)); double df = strtod(str, &pch); // Must compare as underlying bytes, not floating point otherwise optimizer will // try to enregister and compare 80-bit precision number with 64-bit precision number!!!! @@ -2605,7 +2605,7 @@ void DumpDefaultValue(mdToken tok, __inout __nullterminated char* szString, void case ELEMENT_TYPE_R4: { char szf[32]; - sprintf_s(szf, 32, "%.*g", 8, (double)MDDV.m_fltValue); + sprintf_s(szf, 32, "%#.8g", (double)MDDV.m_fltValue); float df = (float)atof(szf); // Must compare as underlying bytes, not floating point otherwise optimizer will // try to enregister and compare 80-bit precision number with 32-bit precision number!!!! @@ -2619,7 +2619,7 @@ void DumpDefaultValue(mdToken tok, __inout __nullterminated char* szString, void case ELEMENT_TYPE_R8: { char szf[32], *pch; - sprintf_s(szf, 32, "%.*g", 17, MDDV.m_dblValue); + sprintf_s(szf, 32, "%#.17g", MDDV.m_dblValue); double df = strtod(szf, &pch); //atof(szf); szf[31]=0; // Must compare as underlying bytes, not floating point otherwise optimizer will diff --git a/src/coreclr/inc/corinfo.h b/src/coreclr/inc/corinfo.h index 068ee41bbb72a5..cab2f6c71d7447 100644 --- a/src/coreclr/inc/corinfo.h +++ b/src/coreclr/inc/corinfo.h @@ -2374,10 +2374,10 @@ class ICorStaticInfo bool fDoubleAlignHint = false ) = 0; - // This is only called for Value classes. It returns a boolean array - // in representing of 'cls' from a GC perspective. The class is - // assumed to be an array of machine words - // (of length // getClassSize(cls) / TARGET_POINTER_SIZE), + // Returns a boolean array representing 'cls' from a GC perspective. + // The class is assumed to be an array of machine words + // (of length getClassSize(cls) / TARGET_POINTER_SIZE for value classes + // and getHeapClassSize(cls) / TARGET_POINTER_SIZE for reference types), // 'gcPtrs' is a pointer to an array of uint8_ts of this length. // getClassGClayout fills in this array so that gcPtrs[i] is set // to one of the CorInfoGCType values which is the GC type of diff --git a/src/coreclr/inc/eetwain.h b/src/coreclr/inc/eetwain.h index c7b1be02e5c638..4ee7b9a7b84b6e 100644 --- a/src/coreclr/inc/eetwain.h +++ b/src/coreclr/inc/eetwain.h @@ -273,6 +273,7 @@ virtual GenericParamContextType GetParamContextType(PREGDISPLAY pContext, */ virtual void * GetGSCookieAddr(PREGDISPLAY pContext, EECodeInfo * pCodeInfo, + unsigned flags, CodeManState * pState) = 0; #ifndef USE_GC_INFO_DECODER @@ -541,6 +542,7 @@ PTR_VOID GetExactGenericsToken(SIZE_T baseStackSlot, virtual void * GetGSCookieAddr(PREGDISPLAY pContext, EECodeInfo * pCodeInfo, + unsigned flags, CodeManState * pState); diff --git a/src/coreclr/interop/trackerobjectmanager.cpp b/src/coreclr/interop/trackerobjectmanager.cpp index d4302054baedba..0df78164906dcc 100644 --- a/src/coreclr/interop/trackerobjectmanager.cpp +++ b/src/coreclr/interop/trackerobjectmanager.cpp @@ -84,7 +84,10 @@ namespace STDMETHODIMP HostServices::ReleaseDisconnectedReferenceSources() { - return InteropLibImports::WaitForRuntimeFinalizerForExternal(); + // We'd like to call InteropLibImports::WaitForRuntimeFinalizerForExternal() here, but this could + // lead to deadlock if the finalizer thread is trying to get back to this thread, because we are + // not pumping anymore. Disable this for now. See: https://github.com/dotnet/runtime/issues/109538. + return S_OK; } STDMETHODIMP HostServices::NotifyEndOfReferenceTrackingOnThread() diff --git a/src/coreclr/jit/assertionprop.cpp b/src/coreclr/jit/assertionprop.cpp index 3d61a698a08d5c..f720ca6c826cba 100644 --- a/src/coreclr/jit/assertionprop.cpp +++ b/src/coreclr/jit/assertionprop.cpp @@ -2211,6 +2211,22 @@ AssertionInfo Compiler::optAssertionGenJtrue(GenTree* tree) // If op1 is lcl and op2 is const or lcl, create assertion. if ((op1->gtOper == GT_LCL_VAR) && (op2->OperIsConst() || (op2->gtOper == GT_LCL_VAR))) // Fix for Dev10 851483 { + // Watch out for cases where long local(s) are implicitly truncated. + // + LclVarDsc* const lcl1Dsc = lvaGetDesc(op1->AsLclVarCommon()); + if ((lcl1Dsc->TypeGet() == TYP_LONG) && (op1->TypeGet() != TYP_LONG)) + { + return NO_ASSERTION_INDEX; + } + if (op2->OperIs(GT_LCL_VAR)) + { + LclVarDsc* const lcl2Dsc = lvaGetDesc(op2->AsLclVarCommon()); + if ((lcl2Dsc->TypeGet() == TYP_LONG) && (op2->TypeGet() != TYP_LONG)) + { + return NO_ASSERTION_INDEX; + } + } + return optCreateJtrueAssertions(op1, op2, assertionKind); } else if (!optLocalAssertionProp) diff --git a/src/coreclr/jit/block.cpp b/src/coreclr/jit/block.cpp index be2ba15e254690..b00dc1282a2900 100644 --- a/src/coreclr/jit/block.cpp +++ b/src/coreclr/jit/block.cpp @@ -267,15 +267,21 @@ FlowEdge* Compiler::BlockPredsWithEH(BasicBlock* blk) // 'blk'. // // Arguments: -// blk - Block to get dominance predecessors for. +// blk - Block to get dominance predecessors for. // // Returns: -// List of edges. +// List of edges. // // Remarks: -// Differs from BlockPredsWithEH only in the treatment of handler blocks; -// enclosed blocks are never dominance preds, while all predecessors of -// blocks in the 'try' are (currently only the first try block expected). +// Differs from BlockPredsWithEH only in the treatment of handler blocks; +// enclosed blocks are never dominance preds, while all predecessors of +// blocks in the 'try' are (currently only the first try block expected). +// +// There are additional complications due to spurious flow because of +// two-pass EH. In the flow graph with EH edges we can see entries into the +// try from filters outside the try, to blocks other than the "try-begin" +// block. Hence we need to consider the full set of blocks in the try region +// when considering the block dominance preds. // FlowEdge* Compiler::BlockDominancePreds(BasicBlock* blk) { @@ -284,14 +290,6 @@ FlowEdge* Compiler::BlockDominancePreds(BasicBlock* blk) return blk->bbPreds; } - EHblkDsc* ehblk = ehGetBlockHndDsc(blk); - if (!ehblk->HasFinallyOrFaultHandler() || (ehblk->ebdHndBeg != blk)) - { - return ehblk->ebdTryBeg->bbPreds; - } - - // Finally/fault handlers can be preceded by enclosing filters due to 2 - // pass EH, so add those and keep them cached. BlockToFlowEdgeMap* domPreds = GetDominancePreds(); FlowEdge* res; if (domPreds->Lookup(blk, &res)) @@ -299,29 +297,11 @@ FlowEdge* Compiler::BlockDominancePreds(BasicBlock* blk) return res; } - res = ehblk->ebdTryBeg->bbPreds; - if (ehblk->HasFinallyOrFaultHandler() && (ehblk->ebdHndBeg == blk)) + EHblkDsc* ehblk = ehGetBlockHndDsc(blk); + res = BlockPredsWithEH(blk); + for (BasicBlock* predBlk : ehblk->ebdTryBeg->PredBlocks()) { - // block is a finally or fault handler; all enclosing filters are predecessors - unsigned enclosing = ehblk->ebdEnclosingTryIndex; - while (enclosing != EHblkDsc::NO_ENCLOSING_INDEX) - { - EHblkDsc* enclosingDsc = ehGetDsc(enclosing); - if (enclosingDsc->HasFilter()) - { - for (BasicBlock* filterBlk = enclosingDsc->ebdFilter; filterBlk != enclosingDsc->ebdHndBeg; - filterBlk = filterBlk->Next()) - { - res = new (this, CMK_FlowEdge) FlowEdge(filterBlk, blk, res); - - assert(filterBlk->VisitEHEnclosedHandlerSecondPassSuccs(this, [blk](BasicBlock* succ) { - return succ == blk ? BasicBlockVisit::Abort : BasicBlockVisit::Continue; - }) == BasicBlockVisit::Abort); - } - } - - enclosing = enclosingDsc->ebdEnclosingTryIndex; - } + res = new (this, CMK_FlowEdge) FlowEdge(predBlk, blk, res); } domPreds->Set(blk, res); diff --git a/src/coreclr/jit/emitarm64.cpp b/src/coreclr/jit/emitarm64.cpp index 2a5c947de175c5..624a737234fcbb 100644 --- a/src/coreclr/jit/emitarm64.cpp +++ b/src/coreclr/jit/emitarm64.cpp @@ -217,7 +217,6 @@ void emitter::emitInsSanityCheck(instrDesc* id) case IF_BR_1B: // BR_1B ................ ......nnnnn..... Rn if (emitComp->IsTargetAbi(CORINFO_NATIVEAOT_ABI) && id->idIsTlsGD()) { - assert(isGeneralRegister(id->idReg1())); assert(id->idAddr()->iiaAddr != nullptr); } else @@ -9184,11 +9183,14 @@ void emitter::emitIns_Call(EmitCallType callType, if (emitComp->IsTargetAbi(CORINFO_NATIVEAOT_ABI) && EA_IS_CNS_TLSGD_RELOC(retSize)) { // For NativeAOT linux/arm64, we need to also record the relocation of methHnd. - // Since we do not have space to embed it in instrDesc, we store the register in - // reg1 and instead use the `iiaAdd` to store the method handle. Likewise, during - // emitOutputInstr, we retrieve the register from reg1 for this specific case. + // Since we do not have space to embed it in instrDesc, we use the `iiaAddr` to + // store the method handle. + // The target handle need to be always in R2 and hence the assert check. + // We cannot use reg1 and reg2 fields of instrDesc because they contain the gc + // registers (emitEncodeCallGCregs()) that are live across the call. + + assert(ireg == REG_R2); id->idSetTlsGD(); - id->idReg1(ireg); id->idAddr()->iiaAddr = (BYTE*)methHnd; } else @@ -10990,12 +10992,13 @@ size_t emitter::emitOutputInstr(insGroup* ig, instrDesc* id, BYTE** dp) { emitRecordRelocation(odst, (CORINFO_METHOD_HANDLE)id->idAddr()->iiaAddr, IMAGE_REL_AARCH64_TLSDESC_CALL); - code |= insEncodeReg_Rn(id->idReg1()); // nnnnn + code |= insEncodeReg_Rn(REG_R2); // nnnnn } else { code |= insEncodeReg_Rn(id->idReg3()); // nnnnn } + dst += emitOutputCall(ig, dst, id, code); sz = id->idIsLargeCall() ? sizeof(instrDescCGCA) : sizeof(instrDesc); break; @@ -13315,7 +13318,15 @@ void emitter::emitDispInsHelp( case IF_BR_1B: // BR_1B ................ ......nnnnn..... Rn // The size of a branch target is always EA_PTRSIZE assert(insOptsNone(id->idInsOpt())); - emitDispReg(id->idReg3(), EA_PTRSIZE, false); + + if (emitComp->IsTargetAbi(CORINFO_NATIVEAOT_ABI) && id->idIsTlsGD()) + { + emitDispReg(REG_R2, EA_PTRSIZE, false); + } + else + { + emitDispReg(id->idReg3(), EA_PTRSIZE, false); + } break; case IF_LS_1A: // LS_1A XX...V..iiiiiiii iiiiiiiiiiittttt Rt PC imm(1MB) diff --git a/src/coreclr/jit/promotion.cpp b/src/coreclr/jit/promotion.cpp index 7fe9bffa70e943..c426cf37e2e1a0 100644 --- a/src/coreclr/jit/promotion.cpp +++ b/src/coreclr/jit/promotion.cpp @@ -1885,41 +1885,79 @@ void ReplaceVisitor::InsertPreStatementReadBacks() // 3. Creating embedded stores in ReplaceLocal disables local copy prop for // that local (see ReplaceLocal). - for (GenTreeLclVarCommon* lcl : m_currentStmt->LocalsTreeList()) + // Normally, we read back only for the uses we will see. However, with + // implicit EH flow we may also read back all replacements mid-tree (see + // InsertMidTreeReadBacks). So for that case we read back everything. This + // is a correctness requirement for QMARKs, but we do it indiscriminately + // for the same reasons as mentioned above. + if (((m_currentStmt->GetRootNode()->gtFlags & (GTF_EXCEPT | GTF_CALL)) != 0) && + m_compiler->ehBlockHasExnFlowDsc(m_currentBlock)) { - if (lcl->TypeIs(TYP_STRUCT)) - { - continue; - } + JITDUMP( + "Reading back pending replacements before statement with possible exception side effect inside block in try region\n"); - AggregateInfo* agg = m_aggregates.Lookup(lcl->GetLclNum()); - if (agg == nullptr) + for (AggregateInfo* agg : m_aggregates) { - continue; + for (Replacement& rep : agg->Replacements) + { + InsertPreStatementReadBackIfNecessary(agg->LclNum, rep); + } } - - size_t index = Promotion::BinarySearch(agg->Replacements, lcl->GetLclOffs()); - if ((ssize_t)index < 0) + } + else + { + // Otherwise just read back the locals we see uses of. + for (GenTreeLclVarCommon* lcl : m_currentStmt->LocalsTreeList()) { - continue; - } + if (lcl->TypeIs(TYP_STRUCT)) + { + continue; + } - Replacement& rep = agg->Replacements[index]; - if (rep.NeedsReadBack) - { - JITDUMP("Reading back replacement V%02u.[%03u..%03u) -> V%02u before [%06u]:\n", agg->LclNum, rep.Offset, - rep.Offset + genTypeSize(rep.AccessType), rep.LclNum, - Compiler::dspTreeID(m_currentStmt->GetRootNode())); + AggregateInfo* agg = m_aggregates.Lookup(lcl->GetLclNum()); + if (agg == nullptr) + { + continue; + } - GenTree* readBack = Promotion::CreateReadBack(m_compiler, agg->LclNum, rep); - Statement* stmt = m_compiler->fgNewStmtFromTree(readBack); - DISPSTMT(stmt); - m_compiler->fgInsertStmtBefore(m_currentBlock, m_currentStmt, stmt); - ClearNeedsReadBack(rep); + size_t index = + Promotion::BinarySearch(agg->Replacements, lcl->GetLclOffs()); + if ((ssize_t)index < 0) + { + continue; + } + + InsertPreStatementReadBackIfNecessary(agg->LclNum, agg->Replacements[index]); } } } +//------------------------------------------------------------------------ +// InsertPreStatementReadBackIfNecessary: +// Insert a read back of the specified replacement before the current +// statement, if the replacement needs it. +// +// Parameters: +// aggLclNum - Struct local +// rep - The replacement +// +void ReplaceVisitor::InsertPreStatementReadBackIfNecessary(unsigned aggLclNum, Replacement& rep) +{ + if (!rep.NeedsReadBack) + { + return; + } + + JITDUMP("Reading back replacement V%02u.[%03u..%03u) -> V%02u before [%06u]:\n", aggLclNum, rep.Offset, + rep.Offset + genTypeSize(rep.AccessType), rep.LclNum, Compiler::dspTreeID(m_currentStmt->GetRootNode())); + + GenTree* readBack = Promotion::CreateReadBack(m_compiler, aggLclNum, rep); + Statement* stmt = m_compiler->fgNewStmtFromTree(readBack); + DISPSTMT(stmt); + m_compiler->fgInsertStmtBefore(m_currentBlock, m_currentStmt, stmt); + ClearNeedsReadBack(rep); +} + //------------------------------------------------------------------------ // VisitOverlappingReplacements: // Call a function for every replacement that overlaps a specified segment. diff --git a/src/coreclr/jit/promotion.h b/src/coreclr/jit/promotion.h index 28481a97eaf88b..a8c54d4000f341 100644 --- a/src/coreclr/jit/promotion.h +++ b/src/coreclr/jit/promotion.h @@ -290,6 +290,7 @@ class ReplaceVisitor : public GenTreeVisitor bool VisitOverlappingReplacements(unsigned lcl, unsigned offs, unsigned size, Func func); void InsertPreStatementReadBacks(); + void InsertPreStatementReadBackIfNecessary(unsigned aggLclNum, Replacement& rep); void InsertPreStatementWriteBacks(); GenTree** InsertMidTreeReadBacks(GenTree** use); diff --git a/src/coreclr/jit/simdashwintrinsic.cpp b/src/coreclr/jit/simdashwintrinsic.cpp index bfb24b6c7ed317..fbd4762544644d 100644 --- a/src/coreclr/jit/simdashwintrinsic.cpp +++ b/src/coreclr/jit/simdashwintrinsic.cpp @@ -917,6 +917,11 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, return gtNewSimdCeilNode(retType, op1, simdBaseJitType, simdSize); } + case NI_VectorT_Create: + { + return gtNewSimdCreateBroadcastNode(simdType, op1, simdBaseJitType, simdSize); + } + case NI_VectorT_Floor: { return gtNewSimdFloorNode(retType, op1, simdBaseJitType, simdSize); @@ -1247,15 +1252,6 @@ GenTree* Compiler::impSimdAsHWIntrinsicSpecial(NamedIntrinsic intrinsic, return gtNewSimdBinOpNode(GT_OR, retType, op1, op2, simdBaseJitType, simdSize); } - case NI_VectorT_Create: - { - assert(retType == TYP_VOID); - - copyBlkDst = op1; - copyBlkSrc = gtNewSimdCreateBroadcastNode(simdType, op2, simdBaseJitType, simdSize); - break; - } - case NI_VectorT_CreateSequence: { return gtNewSimdCreateSequenceNode(simdType, op1, op2, simdBaseJitType, simdSize); diff --git a/src/coreclr/jit/simdashwintrinsiclistarm64.h b/src/coreclr/jit/simdashwintrinsiclistarm64.h index 6bbea32494f315..2ca159110dc4c7 100644 --- a/src/coreclr/jit/simdashwintrinsiclistarm64.h +++ b/src/coreclr/jit/simdashwintrinsiclistarm64.h @@ -64,8 +64,8 @@ SIMD_AS_HWINTRINSIC_ID(VectorT, ConvertToUInt32, SIMD_AS_HWINTRINSIC_ID(VectorT, ConvertToUInt32Native, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_VectorT_ConvertToUInt32Native, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, ConvertToUInt64, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_VectorT_ConvertToUInt64}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, ConvertToUInt64Native, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_VectorT_ConvertToUInt64Native}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, Create, 1, {NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, CreateSequence, 2, {NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence}, SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) +SIMD_AS_HWINTRINSIC_ID(VectorT, Create, 1, {NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create}, SimdAsHWIntrinsicFlag::KeepBaseTypeFromRet) +SIMD_AS_HWINTRINSIC_ID(VectorT, CreateSequence, 2, {NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence}, SimdAsHWIntrinsicFlag::KeepBaseTypeFromRet | SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) SIMD_AS_HWINTRINSIC_ID(VectorT, Dot, 2, {NI_VectorT_Dot, NI_VectorT_Dot, NI_VectorT_Dot, NI_VectorT_Dot, NI_VectorT_Dot, NI_VectorT_Dot, NI_Illegal, NI_Illegal, NI_VectorT_Dot, NI_VectorT_Dot}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, Equals, 2, {NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, EqualsAny, 2, {NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny}, SimdAsHWIntrinsicFlag::None) diff --git a/src/coreclr/jit/simdashwintrinsiclistxarch.h b/src/coreclr/jit/simdashwintrinsiclistxarch.h index 1d769f27e4f97d..6baf3143cd02d3 100644 --- a/src/coreclr/jit/simdashwintrinsiclistxarch.h +++ b/src/coreclr/jit/simdashwintrinsiclistxarch.h @@ -64,8 +64,8 @@ SIMD_AS_HWINTRINSIC_ID(VectorT, ConvertToUInt32, SIMD_AS_HWINTRINSIC_ID(VectorT, ConvertToUInt32Native, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_VectorT_ConvertToUInt32Native, NI_Illegal}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, ConvertToUInt64, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_VectorT_ConvertToUInt64}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, ConvertToUInt64Native, 1, {NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_Illegal, NI_VectorT_ConvertToUInt64Native}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, Create, 1, {NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create}, SimdAsHWIntrinsicFlag::None) -SIMD_AS_HWINTRINSIC_ID(VectorT, CreateSequence, 2, {NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence}, SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) +SIMD_AS_HWINTRINSIC_ID(VectorT, Create, 1, {NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create, NI_VectorT_Create}, SimdAsHWIntrinsicFlag::KeepBaseTypeFromRet) +SIMD_AS_HWINTRINSIC_ID(VectorT, CreateSequence, 2, {NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence, NI_VectorT_CreateSequence}, SimdAsHWIntrinsicFlag::KeepBaseTypeFromRet | SimdAsHWIntrinsicFlag::SpillSideEffectsOp1) SIMD_AS_HWINTRINSIC_ID(VectorT, Dot, 2, {NI_Illegal, NI_Illegal, NI_VectorT_Dot, NI_VectorT_Dot, NI_VectorT_Dot, NI_VectorT_Dot, NI_Illegal, NI_Illegal, NI_VectorT_Dot, NI_VectorT_Dot}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, Equals, 2, {NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals, NI_VectorT_Equals}, SimdAsHWIntrinsicFlag::None) SIMD_AS_HWINTRINSIC_ID(VectorT, EqualsAny, 2, {NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny, NI_VectorT_EqualsAny}, SimdAsHWIntrinsicFlag::None) diff --git a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/CachedInterfaceDispatch.cs b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/CachedInterfaceDispatch.cs index 7a242497f30826..9a1b1ad7ef985a 100644 --- a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/CachedInterfaceDispatch.cs +++ b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/CachedInterfaceDispatch.cs @@ -82,14 +82,46 @@ private static IntPtr RhResolveDispatch(object pObject, MethodTable* interfaceTy } [RuntimeExport("RhResolveDispatchOnType")] - private static IntPtr RhResolveDispatchOnType(MethodTable* pInstanceType, MethodTable* pInterfaceType, ushort slot, MethodTable** ppGenericContext) + private static IntPtr RhResolveDispatchOnType(MethodTable* pInstanceType, MethodTable* pInterfaceType, ushort slot) { return DispatchResolve.FindInterfaceMethodImplementationTarget(pInstanceType, pInterfaceType, slot, + flags: default, + ppGenericContext: null); + } + + [RuntimeExport("RhResolveStaticDispatchOnType")] + private static IntPtr RhResolveStaticDispatchOnType(MethodTable* pInstanceType, MethodTable* pInterfaceType, ushort slot, MethodTable** ppGenericContext) + { + return DispatchResolve.FindInterfaceMethodImplementationTarget(pInstanceType, + pInterfaceType, + slot, + DispatchResolve.ResolveFlags.Static, ppGenericContext); } + [RuntimeExport("RhResolveDynamicInterfaceCastableDispatchOnType")] + private static IntPtr RhResolveDynamicInterfaceCastableDispatchOnType(MethodTable* pInstanceType, MethodTable* pInterfaceType, ushort slot, MethodTable** ppGenericContext) + { + IntPtr result = DispatchResolve.FindInterfaceMethodImplementationTarget(pInstanceType, + pInterfaceType, + slot, + DispatchResolve.ResolveFlags.IDynamicInterfaceCastable, + ppGenericContext); + + if ((result & (nint)DispatchMapCodePointerFlags.RequiresInstantiatingThunkFlag) != 0) + { + result &= ~(nint)DispatchMapCodePointerFlags.RequiresInstantiatingThunkFlag; + } + else + { + *ppGenericContext = null; + } + + return result; + } + private static unsafe IntPtr RhResolveDispatchWorker(object pObject, void* cell, ref DispatchCellInfo cellInfo) { // Type of object we're dispatching on. @@ -97,13 +129,10 @@ private static unsafe IntPtr RhResolveDispatchWorker(object pObject, void* cell, if (cellInfo.CellType == DispatchCellType.InterfaceAndSlot) { - // Type whose DispatchMap is used. Usually the same as the above but for types which implement IDynamicInterfaceCastable - // we may repeat this process with an alternate type. - MethodTable* pResolvingInstanceType = pInstanceType; - - IntPtr pTargetCode = DispatchResolve.FindInterfaceMethodImplementationTarget(pResolvingInstanceType, + IntPtr pTargetCode = DispatchResolve.FindInterfaceMethodImplementationTarget(pInstanceType, cellInfo.InterfaceType, cellInfo.InterfaceSlot, + flags: default, ppGenericContext: null); if (pTargetCode == IntPtr.Zero && pInstanceType->IsIDynamicInterfaceCastable) { diff --git a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/DispatchResolve.cs b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/DispatchResolve.cs index 349415c743aa9a..271fdd231c611a 100644 --- a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/DispatchResolve.cs +++ b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/DispatchResolve.cs @@ -13,21 +13,21 @@ internal static unsafe class DispatchResolve public static IntPtr FindInterfaceMethodImplementationTarget(MethodTable* pTgtType, MethodTable* pItfType, ushort itfSlotNumber, + ResolveFlags flags, /* out */ MethodTable** ppGenericContext) { + // We set this bit below during second pass, callers should not set it. + Debug.Assert((flags & ResolveFlags.DefaultInterfaceImplementation) == 0); + // Start at the current type and work up the inheritance chain MethodTable* pCur = pTgtType; - // We first look at non-default implementation. Default implementations are only considered - // if the "old algorithm" didn't come up with an answer. - bool fDoDefaultImplementationLookup = false; - again: while (pCur != null) { ushort implSlotNumber; if (FindImplSlotForCurrentType( - pCur, pItfType, itfSlotNumber, fDoDefaultImplementationLookup, &implSlotNumber, ppGenericContext)) + pCur, pItfType, itfSlotNumber, flags, &implSlotNumber, ppGenericContext)) { IntPtr targetMethod; if (implSlotNumber < pCur->NumVtableSlots) @@ -58,9 +58,9 @@ public static IntPtr FindInterfaceMethodImplementationTarget(MethodTable* pTgtTy } // If we haven't found an implementation, do a second pass looking for a default implementation. - if (!fDoDefaultImplementationLookup) + if ((flags & ResolveFlags.DefaultInterfaceImplementation) == 0) { - fDoDefaultImplementationLookup = true; + flags |= ResolveFlags.DefaultInterfaceImplementation; pCur = pTgtType; goto again; } @@ -72,10 +72,13 @@ public static IntPtr FindInterfaceMethodImplementationTarget(MethodTable* pTgtTy private static bool FindImplSlotForCurrentType(MethodTable* pTgtType, MethodTable* pItfType, ushort itfSlotNumber, - bool fDoDefaultImplementationLookup, + ResolveFlags flags, ushort* pImplSlotNumber, MethodTable** ppGenericContext) { + // We set this below during second pass, callers should not set this. + Debug.Assert((flags & ResolveFlags.Variant) == 0); + bool fRes = false; // If making a call and doing virtual resolution don't look into the dispatch map, @@ -96,16 +99,14 @@ private static bool FindImplSlotForCurrentType(MethodTable* pTgtType, // result in interesting behavior such as a derived type only overriding one particular instantiation // and funneling all the dispatches to it, but its the algorithm. - bool fDoVariantLookup = false; // do not check variance for first scan of dispatch map - fRes = FindImplSlotInSimpleMap( - pTgtType, pItfType, itfSlotNumber, pImplSlotNumber, ppGenericContext, fDoVariantLookup, fDoDefaultImplementationLookup); + pTgtType, pItfType, itfSlotNumber, pImplSlotNumber, ppGenericContext, flags); if (!fRes) { - fDoVariantLookup = true; // check variance for second scan of dispatch map + flags |= ResolveFlags.Variant; // check variance for second scan of dispatch map fRes = FindImplSlotInSimpleMap( - pTgtType, pItfType, itfSlotNumber, pImplSlotNumber, ppGenericContext, fDoVariantLookup, fDoDefaultImplementationLookup); + pTgtType, pItfType, itfSlotNumber, pImplSlotNumber, ppGenericContext, flags); } } @@ -117,8 +118,7 @@ private static bool FindImplSlotInSimpleMap(MethodTable* pTgtType, uint itfSlotNumber, ushort* pImplSlotNumber, MethodTable** ppGenericContext, - bool actuallyCheckVariance, - bool checkDefaultImplementations) + ResolveFlags flags) { Debug.Assert(pTgtType->HasDispatchMap, "Missing dispatch map"); @@ -130,7 +130,7 @@ private static bool FindImplSlotInSimpleMap(MethodTable* pTgtType, bool fCheckVariance = false; bool fArrayCovariance = false; - if (actuallyCheckVariance) + if ((flags & ResolveFlags.Variant) != 0) { fCheckVariance = pItfType->HasGenericVariance; fArrayCovariance = pTgtType->IsArray; @@ -166,8 +166,8 @@ private static bool FindImplSlotInSimpleMap(MethodTable* pTgtType, } } - // It only makes sense to ask for generic context if we're asking about a static method - bool fStaticDispatch = ppGenericContext != null; + bool fStaticDispatch = (flags & ResolveFlags.Static) != 0; + bool checkDefaultImplementations = (flags & ResolveFlags.DefaultInterfaceImplementation) != 0; // We either scan the instance or static portion of the dispatch map. Depends on what the caller wants. DispatchMap* pMap = pTgtType->DispatchMap; @@ -190,8 +190,11 @@ private static bool FindImplSlotInSimpleMap(MethodTable* pTgtType, // If this is a static method, the entry point is not usable without generic context. // (Instance methods acquire the generic context from their `this`.) + // Same for IDynamicInterfaceCastable (that has a `this` but it's not useful) if (fStaticDispatch) *ppGenericContext = GetGenericContextSource(pTgtType, i); + else if ((flags & ResolveFlags.IDynamicInterfaceCastable) != 0) + *ppGenericContext = pTgtType; return true; } @@ -231,8 +234,11 @@ private static bool FindImplSlotInSimpleMap(MethodTable* pTgtType, // If this is a static method, the entry point is not usable without generic context. // (Instance methods acquire the generic context from their `this`.) + // Same for IDynamicInterfaceCastable (that has a `this` but it's not useful) if (fStaticDispatch) *ppGenericContext = GetGenericContextSource(pTgtType, i); + else if ((flags & ResolveFlags.IDynamicInterfaceCastable) != 0) + *ppGenericContext = pTgtType; return true; } @@ -253,5 +259,13 @@ private static bool FindImplSlotInSimpleMap(MethodTable* pTgtType, _ => pTgtType->InterfaceMap[usEncodedValue - StaticVirtualMethodContextSource.ContextFromFirstInterface] }; } + + public enum ResolveFlags + { + Variant = 0x1, + DefaultInterfaceImplementation = 0x2, + Static = 0x4, + IDynamicInterfaceCastable = 0x8, + } } } diff --git a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/TypeCast.cs b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/TypeCast.cs index c3f92d067dd243..20427987539c39 100644 --- a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/TypeCast.cs +++ b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/TypeCast.cs @@ -1066,10 +1066,14 @@ private static unsafe bool CacheMiss(MethodTable* pSourceType, MethodTable* pTar bool result = TypeCast.AreTypesAssignableInternalUncached(pSourceType, pTargetType, variation, &newList); // - // Update the cache + // Update the cache. We only consider type-based conversion rules here. + // Therefore a negative result cannot rule out convertibility for IDynamicInterfaceCastable. // - nuint sourceAndVariation = (nuint)pSourceType + (uint)variation; - s_castCache.TrySet(sourceAndVariation, (nuint)pTargetType, result); + if (result || !(pTargetType->IsInterface && pSourceType->IsIDynamicInterfaceCastable)) + { + nuint sourceAndVariation = (nuint)pSourceType + (uint)variation; + s_castCache.TrySet(sourceAndVariation, (nuint)pTargetType, result); + } return result; } @@ -1252,13 +1256,11 @@ internal static unsafe bool AreTypesAssignableInternalUncached(MethodTable* pSou } // - // Update the cache + // Update the cache. We only consider type-based conversion rules here. + // Therefore a negative result cannot rule out convertibility for IDynamicInterfaceCastable. // - if (!pSourceType->IsIDynamicInterfaceCastable) + if (retObj != null || !(pTargetType->IsInterface && pSourceType->IsIDynamicInterfaceCastable)) { - // - // Update the cache - // nuint sourceAndVariation = (nuint)pSourceType + (uint)AssignmentVariation.BoxedSource; s_castCache.TrySet(sourceAndVariation, (nuint)pTargetType, retObj != null); } @@ -1293,14 +1295,11 @@ private static unsafe object CheckCastAny_NoCacheLookup(MethodTable* pTargetType obj = CheckCastClass(pTargetType, obj); } - if (!pSourceType->IsIDynamicInterfaceCastable) - { - // - // Update the cache - // - nuint sourceAndVariation = (nuint)pSourceType + (uint)AssignmentVariation.BoxedSource; - s_castCache.TrySet(sourceAndVariation, (nuint)pTargetType, true); - } + // + // Update the cache + // + nuint sourceAndVariation = (nuint)pSourceType + (uint)AssignmentVariation.BoxedSource; + s_castCache.TrySet(sourceAndVariation, (nuint)pTargetType, true); return obj; } diff --git a/src/coreclr/nativeaot/Runtime/EHHelpers.cpp b/src/coreclr/nativeaot/Runtime/EHHelpers.cpp index 060e19f3c525e2..569cf36e84fa50 100644 --- a/src/coreclr/nativeaot/Runtime/EHHelpers.cpp +++ b/src/coreclr/nativeaot/Runtime/EHHelpers.cpp @@ -485,6 +485,9 @@ int32_t __stdcall RhpHardwareExceptionHandler(uintptr_t faultCode, uintptr_t fau #else // TARGET_UNIX +uintptr_t GetSSP(CONTEXT *pContext); +void SetSSP(CONTEXT *pContext, uintptr_t ssp); + static bool g_ContinueOnFatalErrors = false; // Set the runtime to continue search when encountering an unhandled runtime exception. Once done it is forever. @@ -539,22 +542,16 @@ int32_t __stdcall RhpVectoredExceptionHandler(PEXCEPTION_POINTERS pExPtrs) // When the CET is enabled, the interruption happens on the ret instruction in the calee. // We need to "pop" rsp to the caller, as if the ret has consumed it. interruptedContext->SetSp(interruptedContext->GetSp() + 8); + uintptr_t ssp = GetSSP(interruptedContext); + SetSSP(interruptedContext, ssp + 8); } // Change the IP to be at the original return site, as if we have returned to the caller. // That IP is an interruptible safe point, so we can suspend right there. - uintptr_t origIp = interruptedContext->GetIp(); interruptedContext->SetIp((uintptr_t)pThread->GetHijackedReturnAddress()); pThread->InlineSuspend(interruptedContext); - if (areShadowStacksEnabled) - { - // Undo the "pop", so that the ret could now succeed. - interruptedContext->SetSp(interruptedContext->GetSp() - 8); - interruptedContext->SetIp(origIp); - } - ASSERT(!pThread->IsHijacked()); return EXCEPTION_CONTINUE_EXECUTION; } diff --git a/src/coreclr/nativeaot/Runtime/HandleTableHelpers.cpp b/src/coreclr/nativeaot/Runtime/HandleTableHelpers.cpp index 23e985357d343a..8eddc1d3440d26 100644 --- a/src/coreclr/nativeaot/Runtime/HandleTableHelpers.cpp +++ b/src/coreclr/nativeaot/Runtime/HandleTableHelpers.cpp @@ -70,3 +70,57 @@ FCIMPL2(void, RhUnregisterRefCountedHandleCallback, void * pCallout, MethodTable RestrictedCallouts::UnregisterRefCountedHandleCallback(pCallout, pTypeFilter); } FCIMPLEND + +// This structure mirrors the managed type System.Runtime.InteropServices.ComWrappers.ManagedObjectWrapper. +struct ManagedObjectWrapper +{ + intptr_t HolderHandle; + uint64_t RefCount; + + int32_t UserDefinedCount; + void* /* ComInterfaceEntry */ UserDefined; + void* /* InternalComInterfaceDispatch* */ Dispatches; + + int32_t /* CreateComInterfaceFlagsEx */ Flags; + + uint32_t AddRef() + { + return GetComCount((uint64_t)PalInterlockedIncrement64((int64_t*)&RefCount)); + } + + static const uint64_t ComRefCountMask = 0x000000007fffffffUL; + + static uint32_t GetComCount(uint64_t c) + { + return (uint32_t)(c & ComRefCountMask); + } +}; + +// This structure mirrors the managed type System.Runtime.InteropServices.ComWrappers.InternalComInterfaceDispatch. +struct InternalComInterfaceDispatch +{ + void* Vtable; + ManagedObjectWrapper* _thisPtr; +}; + +static ManagedObjectWrapper* ToManagedObjectWrapper(void* dispatchPtr) +{ + return ((InternalComInterfaceDispatch*)dispatchPtr)->_thisPtr; +} + +// +// AddRef is implemented in native code so that it does not need to synchronize with the GC. This is important because Xaml +// invokes AddRef while holding a lock that it *also* holds while a GC is in progress. If AddRef was managed, we would have +// to synchronize with the GC before entering AddRef, which would deadlock with the other thread holding Xaml's lock. +// +static uint32_t __stdcall IUnknown_AddRef(void* pComThis) +{ + ManagedObjectWrapper* wrapper = ToManagedObjectWrapper(pComThis); + return wrapper->AddRef(); +} + +FCIMPL0(void*, RhGetIUnknownAddRef) +{ + return (void*)&IUnknown_AddRef; +} +FCIMPLEND diff --git a/src/coreclr/nativeaot/Runtime/RestrictedCallouts.h b/src/coreclr/nativeaot/Runtime/RestrictedCallouts.h index 2c1a2e61e0951b..cf0295db456038 100644 --- a/src/coreclr/nativeaot/Runtime/RestrictedCallouts.h +++ b/src/coreclr/nativeaot/Runtime/RestrictedCallouts.h @@ -97,6 +97,6 @@ class RestrictedCallouts static CrstStatic s_sLock; // Prototypes for the callouts. - typedef void (F_CALL_CONV * GcRestrictedCallbackFunction)(uint32_t uiCondemnedGeneration); + typedef void (* GcRestrictedCallbackFunction)(uint32_t uiCondemnedGeneration); typedef CLR_BOOL (* HandleTableRestrictedCallbackFunction)(Object * pObject); }; diff --git a/src/coreclr/nativeaot/Runtime/unix/PalRedhawkInline.h b/src/coreclr/nativeaot/Runtime/unix/PalRedhawkInline.h index 983f17a36aba0a..2380bacdf02a1b 100644 --- a/src/coreclr/nativeaot/Runtime/unix/PalRedhawkInline.h +++ b/src/coreclr/nativeaot/Runtime/unix/PalRedhawkInline.h @@ -30,6 +30,13 @@ FORCEINLINE int32_t PalInterlockedIncrement(_Inout_ int32_t volatile *pDst) return result; } +FORCEINLINE int64_t PalInterlockedIncrement64(_Inout_ int64_t volatile *pDst) +{ + int64_t result = __sync_add_and_fetch(pDst, 1); + PalInterlockedOperationBarrier(); + return result; +} + FORCEINLINE int32_t PalInterlockedDecrement(_Inout_ int32_t volatile *pDst) { int32_t result = __sync_sub_and_fetch(pDst, 1); diff --git a/src/coreclr/nativeaot/Runtime/unix/unixasmmacrosamd64.inc b/src/coreclr/nativeaot/Runtime/unix/unixasmmacrosamd64.inc index b1a437d8b57ead..b12b4071593ab4 100644 --- a/src/coreclr/nativeaot/Runtime/unix/unixasmmacrosamd64.inc +++ b/src/coreclr/nativeaot/Runtime/unix/unixasmmacrosamd64.inc @@ -16,15 +16,6 @@ .macro NESTED_END Name, Section LEAF_END \Name, \Section -#if defined(__APPLE__) - .set LOCAL_LABEL(\Name\()_Size), . - C_FUNC(\Name) - .section __LD,__compact_unwind,regular,debug - .quad C_FUNC(\Name) - .long LOCAL_LABEL(\Name\()_Size) - .long 0x04000000 # DWARF - .quad 0 - .quad 0 -#endif .endm .macro PATCH_LABEL Name diff --git a/src/coreclr/nativeaot/Runtime/windows/PalRedhawkInline.h b/src/coreclr/nativeaot/Runtime/windows/PalRedhawkInline.h index 1f2a74dcd15100..595c7f663b9d13 100644 --- a/src/coreclr/nativeaot/Runtime/windows/PalRedhawkInline.h +++ b/src/coreclr/nativeaot/Runtime/windows/PalRedhawkInline.h @@ -67,6 +67,17 @@ FORCEINLINE int64_t PalInterlockedExchange64(_Inout_ int64_t volatile *pDst, int iOldValue) != iOldValue); return iOldValue; } + +FORCEINLINE int64_t PalInterlockedIncrement64(_Inout_ int64_t volatile *Addend) +{ + int64_t Old; + do { + Old = *Addend; + } while (PalInterlockedCompareExchange64(Addend, + Old + 1, + Old) != Old); + return Old + 1; +} #else // HOST_X86 EXTERN_C int64_t _InterlockedExchange64(int64_t volatile *, int64_t); #pragma intrinsic(_InterlockedExchange64) @@ -74,6 +85,13 @@ FORCEINLINE int64_t PalInterlockedExchange64(_Inout_ int64_t volatile *pDst, int { return _InterlockedExchange64(pDst, iValue); } + +EXTERN_C int64_t _InterlockedIncrement64(int64_t volatile *); +#pragma intrinsic(_InterlockedIncrement64) +FORCEINLINE int64_t PalInterlockedIncrement64(_Inout_ int64_t volatile *pDst) +{ + return _InterlockedIncrement64(pDst); +} #endif // HOST_X86 #if defined(HOST_AMD64) || defined(HOST_ARM64) diff --git a/src/coreclr/nativeaot/Runtime/windows/PalRedhawkMinWin.cpp b/src/coreclr/nativeaot/Runtime/windows/PalRedhawkMinWin.cpp index 86013f7a964d28..f7bfcd68bdad75 100644 --- a/src/coreclr/nativeaot/Runtime/windows/PalRedhawkMinWin.cpp +++ b/src/coreclr/nativeaot/Runtime/windows/PalRedhawkMinWin.cpp @@ -1006,3 +1006,25 @@ REDHAWK_PALEXPORT void PalFlushInstructionCache(_In_ void* pAddress, size_t size FlushInstructionCache(GetCurrentProcess(), pAddress, size); } +#ifdef TARGET_AMD64 +uintptr_t GetSSP(CONTEXT *pContext) +{ + XSAVE_CET_U_FORMAT* pCET = (XSAVE_CET_U_FORMAT*)LocateXStateFeature(pContext, XSTATE_CET_U, NULL); + if ((pCET != NULL) && (pCET->Ia32CetUMsr != 0)) + { + return pCET->Ia32Pl3SspMsr; + } + + return 0; +} + +void SetSSP(CONTEXT *pContext, uintptr_t ssp) +{ + XSAVE_CET_U_FORMAT* pCET = (XSAVE_CET_U_FORMAT*)LocateXStateFeature(pContext, XSTATE_CET_U, NULL); + if (pCET != NULL) + { + pCET->Ia32Pl3SspMsr = ssp; + pCET->Ia32CetUMsr = 1; + } +} +#endif // TARGET_AMD64 diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/CompatibilitySuppressions.xml b/src/coreclr/nativeaot/System.Private.CoreLib/src/CompatibilitySuppressions.xml index 507b4c14936921..6bfe8b6b9ffdda 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/CompatibilitySuppressions.xml +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/CompatibilitySuppressions.xml @@ -825,6 +825,10 @@ CP0001 T:System.Runtime.CompilerServices.StaticClassConstructionContext + + CP0001 + T:Internal.TypeSystem.LockFreeReaderHashtableOfPointers`2 + CP0002 M:System.Reflection.MethodBase.GetParametersAsSpan diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/Augments/RuntimeAugments.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/Augments/RuntimeAugments.cs index 7db11a82041778..4e376c5b803922 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/Augments/RuntimeAugments.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/Augments/RuntimeAugments.cs @@ -493,7 +493,7 @@ public static bool IsDynamicType(RuntimeTypeHandle typeHandle) public static unsafe IntPtr ResolveStaticDispatchOnType(RuntimeTypeHandle instanceType, RuntimeTypeHandle interfaceType, int slot, out RuntimeTypeHandle genericContext) { MethodTable* genericContextPtr = default; - IntPtr result = RuntimeImports.RhResolveDispatchOnType(instanceType.ToMethodTable(), interfaceType.ToMethodTable(), checked((ushort)slot), &genericContextPtr); + IntPtr result = RuntimeImports.RhResolveStaticDispatchOnType(instanceType.ToMethodTable(), interfaceType.ToMethodTable(), checked((ushort)slot), &genericContextPtr); if (result != IntPtr.Zero) genericContext = new RuntimeTypeHandle(genericContextPtr); else diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers/SharedCodeHelpers.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers/SharedCodeHelpers.cs index 482a9a7b357a7e..172f7a6590e35d 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers/SharedCodeHelpers.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers/SharedCodeHelpers.cs @@ -1,6 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Runtime; + using Debug = System.Diagnostics.Debug; namespace Internal.Runtime.CompilerHelpers @@ -12,15 +14,13 @@ internal static class SharedCodeHelpers { public static unsafe MethodTable* GetOrdinalInterface(MethodTable* pType, ushort interfaceIndex) { - Debug.Assert(interfaceIndex <= pType->NumInterfaces); + Debug.Assert(interfaceIndex < pType->NumInterfaces); return pType->InterfaceMap[interfaceIndex]; } public static unsafe MethodTable* GetCurrentSharedThunkContext() { - // TODO: We should return the current context from the ThunkPool - // https://github.com/dotnet/runtimelab/issues/1442 - return null; + return (MethodTable*)RuntimeImports.GetCurrentInteropThunkContext(); } } } diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/IDynamicInterfaceCastableSupport.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/IDynamicInterfaceCastableSupport.cs index 54878128ff9823..a1e146fb1b0a8c 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/IDynamicInterfaceCastableSupport.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/IDynamicInterfaceCastableSupport.cs @@ -4,6 +4,12 @@ using System; using System.Runtime; using System.Runtime.InteropServices; +using System.Threading; + +using Internal.Runtime.Augments; +using Internal.TypeSystem; + +using Debug = System.Diagnostics.Debug; namespace Internal.Runtime { @@ -15,6 +21,8 @@ internal static bool IDynamicCastableIsInterfaceImplemented(IDynamicInterfaceCas return instance.IsInterfaceImplemented(new RuntimeTypeHandle(interfaceType), throwIfNotImplemented); } + private static readonly object s_thunkPoolHeap = RuntimeAugments.CreateThunksHeap(RuntimeImports.GetInteropCommonStubAddress()); + [RuntimeExport("IDynamicCastableGetInterfaceImplementation")] internal static IntPtr IDynamicCastableGetInterfaceImplementation(IDynamicInterfaceCastable instance, MethodTable* interfaceType, ushort slot) { @@ -28,11 +36,30 @@ internal static IntPtr IDynamicCastableGetInterfaceImplementation(IDynamicInterf { ThrowInvalidOperationException(implType); } - IntPtr result = RuntimeImports.RhResolveDispatchOnType(implType, interfaceType, slot); + + MethodTable* genericContext = null; + IntPtr result = RuntimeImports.RhResolveDynamicInterfaceCastableDispatchOnType(implType, interfaceType, slot, &genericContext); if (result == IntPtr.Zero) { IDynamicCastableGetInterfaceImplementationFailure(instance, interfaceType, implType); } + + if (genericContext != null) + { + if (!s_thunkHashtable.TryGetValue(new InstantiatingThunkKey(result, (nint)genericContext), out nint thunk)) + { + thunk = RuntimeAugments.AllocateThunk(s_thunkPoolHeap); + RuntimeAugments.SetThunkData(s_thunkPoolHeap, thunk, (nint)genericContext, result); + nint thunkInHashtable = s_thunkHashtable.AddOrGetExisting(thunk); + if (thunkInHashtable != thunk) + { + RuntimeAugments.FreeThunk(s_thunkPoolHeap, thunk); + thunk = thunkInHashtable; + } + } + + result = thunk; + } return result; } @@ -67,5 +94,46 @@ private static void IDynamicCastableGetInterfaceImplementationFailure(object ins throw new EntryPointNotFoundException(); } + + private static readonly InstantiatingThunkHashtable s_thunkHashtable = new InstantiatingThunkHashtable(); + + private class InstantiatingThunkHashtable : LockFreeReaderHashtableOfPointers + { + protected override bool CompareKeyToValue(InstantiatingThunkKey key, nint value) + { + bool result = RuntimeAugments.TryGetThunkData(s_thunkPoolHeap, value, out nint context, out nint target); + Debug.Assert(result); + return key.Target == target && key.Context == context; + } + + protected override bool CompareValueToValue(nint value1, nint value2) + { + bool result1 = RuntimeAugments.TryGetThunkData(s_thunkPoolHeap, value1, out nint context1, out nint target1); + Debug.Assert(result1); + + bool result2 = RuntimeAugments.TryGetThunkData(s_thunkPoolHeap, value2, out nint context2, out nint target2); + Debug.Assert(result2); + return context1 == context2 && target1 == target2; + } + + protected override nint ConvertIntPtrToValue(nint pointer) => pointer; + protected override nint ConvertValueToIntPtr(nint value) => value; + protected override nint CreateValueFromKey(InstantiatingThunkKey key) => throw new NotImplementedException(); + protected override int GetKeyHashCode(InstantiatingThunkKey key) => HashCode.Combine(key.Target, key.Context); + + protected override int GetValueHashCode(nint value) + { + bool result = RuntimeAugments.TryGetThunkData(s_thunkPoolHeap, value, out nint context, out nint target); + Debug.Assert(result); + return HashCode.Combine(target, context); + } + } + + private struct InstantiatingThunkKey + { + public readonly nint Target; + public readonly nint Context; + public InstantiatingThunkKey(nint target, nint context) => (Target, Context) = (target, context); + } } } diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj b/src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj index fc97632716fd2a..06d92c3b8b5d5e 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj @@ -332,6 +332,9 @@ Utilities\LockFreeReaderHashtable.cs + + Utilities\LockFreeReaderHashtableOfPointers.cs + System\Collections\Generic\LowLevelList.cs diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.NativeAot.cs index cc33e85d73917c..87eb31d58022fe 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.NativeAot.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.NativeAot.cs @@ -40,37 +40,36 @@ public abstract partial class ComWrappers private static readonly Guid IID_IInspectable = new Guid(0xAF86E2E0, 0xB12D, 0x4c6a, 0x9C, 0x5A, 0xD7, 0xAA, 0x65, 0x10, 0x1E, 0x90); private static readonly Guid IID_IWeakReferenceSource = new Guid(0x00000038, 0, 0, 0xC0, 0, 0, 0, 0, 0, 0, 0x46); - private static readonly ConditionalWeakTable s_rcwTable = new ConditionalWeakTable(); + private static readonly ConditionalWeakTable s_nativeObjectWrapperTable = new ConditionalWeakTable(); private static readonly GCHandleSet s_referenceTrackerNativeObjectWrapperCache = new GCHandleSet(); - private readonly ConditionalWeakTable _ccwTable = new ConditionalWeakTable(); - private readonly Lock _lock = new Lock(useTrivialWaits: true); - private readonly Dictionary _rcwCache = new Dictionary(); + private readonly ConditionalWeakTable _managedObjectWrapperTable = new ConditionalWeakTable(); + private readonly RcwCache _rcwCache = new(); internal static bool TryGetComInstanceForIID(object obj, Guid iid, out IntPtr unknown, out long wrapperId) { if (obj == null - || !s_rcwTable.TryGetValue(obj, out NativeObjectWrapper? wrapper)) + || !s_nativeObjectWrapperTable.TryGetValue(obj, out NativeObjectWrapper? wrapper)) { unknown = IntPtr.Zero; wrapperId = 0; return false; } - wrapperId = wrapper._comWrappers.id; - return Marshal.QueryInterface(wrapper._externalComObject, iid, out unknown) == HResults.S_OK; + wrapperId = wrapper.ComWrappers.id; + return Marshal.QueryInterface(wrapper.ExternalComObject, iid, out unknown) == HResults.S_OK; } public static unsafe bool TryGetComInstance(object obj, out IntPtr unknown) { unknown = IntPtr.Zero; if (obj == null - || !s_rcwTable.TryGetValue(obj, out NativeObjectWrapper? wrapper)) + || !s_nativeObjectWrapperTable.TryGetValue(obj, out NativeObjectWrapper? wrapper)) { return false; } - return Marshal.QueryInterface(wrapper._externalComObject, IID_IUnknown, out unknown) == HResults.S_OK; + return Marshal.QueryInterface(wrapper.ExternalComObject, IID_IUnknown, out unknown) == HResults.S_OK; } public static unsafe bool TryGetObject(IntPtr unknown, [NotNullWhen(true)] out object? obj) @@ -484,9 +483,6 @@ public ManagedObjectWrapperReleaser(ManagedObjectWrapper* wrapper) // There are still outstanding references on the COM side. // This case should only be hit when an outstanding // tracker refcount exists from AddRefFromReferenceTracker. - // When implementing IReferenceTrackerHost, this should be - // reconsidered. - // https://github.com/dotnet/runtime/issues/85137 GC.ReRegisterForFinalize(this); } } @@ -494,12 +490,13 @@ public ManagedObjectWrapperReleaser(ManagedObjectWrapper* wrapper) internal unsafe class NativeObjectWrapper { - internal IntPtr _externalComObject; + private IntPtr _externalComObject; private IntPtr _inner; - internal ComWrappers _comWrappers; - internal readonly GCHandle _proxyHandle; - internal readonly GCHandle _proxyHandleTrackingResurrection; - internal readonly bool _aggregatedManagedObjectWrapper; + private ComWrappers _comWrappers; + private GCHandle _proxyHandle; + private GCHandle _proxyHandleTrackingResurrection; + private readonly bool _aggregatedManagedObjectWrapper; + private readonly bool _uniqueInstance; static NativeObjectWrapper() { @@ -522,18 +519,19 @@ public static NativeObjectWrapper Create(IntPtr externalComObject, IntPtr inner, } } - public NativeObjectWrapper(IntPtr externalComObject, IntPtr inner, ComWrappers comWrappers, object comProxy, CreateObjectFlags flags) + protected NativeObjectWrapper(IntPtr externalComObject, IntPtr inner, ComWrappers comWrappers, object comProxy, CreateObjectFlags flags) { _externalComObject = externalComObject; _inner = inner; _comWrappers = comWrappers; + _uniqueInstance = flags.HasFlag(CreateObjectFlags.UniqueInstance); _proxyHandle = GCHandle.Alloc(comProxy, GCHandleType.Weak); // We have a separate handle tracking resurrection as we want to make sure // we clean up the NativeObjectWrapper only after the RCW has been finalized // due to it can access the native object in the finalizer. At the same time, - // we want other callers which are using _proxyHandle such as the RCW cache to - // see the object as not alive once it is eligible for finalization. + // we want other callers which are using ProxyHandle such as the reference tracker runtime + // to see the object as not alive once it is eligible for finalization. _proxyHandleTrackingResurrection = GCHandle.Alloc(comProxy, GCHandleType.WeakTrackResurrection); // If this is an aggregation scenario and the identity object @@ -548,11 +546,17 @@ public NativeObjectWrapper(IntPtr externalComObject, IntPtr inner, ComWrappers c } } + internal IntPtr ExternalComObject => _externalComObject; + internal ComWrappers ComWrappers => _comWrappers; + internal GCHandle ProxyHandle => _proxyHandle; + internal bool IsUniqueInstance => _uniqueInstance; + internal bool IsAggregatedWithManagedObjectWrapper => _aggregatedManagedObjectWrapper; + public virtual void Release() { - if (_comWrappers != null) + if (!_uniqueInstance && _comWrappers is not null) { - _comWrappers.RemoveRCWFromCache(_externalComObject, _proxyHandle); + _comWrappers._rcwCache.Remove(_externalComObject, this); _comWrappers = null; } @@ -712,23 +716,23 @@ public unsafe IntPtr GetOrCreateComInterfaceForObject(object instance, CreateCom { ArgumentNullException.ThrowIfNull(instance); - ManagedObjectWrapperHolder? ccwValue; - if (_ccwTable.TryGetValue(instance, out ccwValue)) + ManagedObjectWrapperHolder? managedObjectWrapper; + if (_managedObjectWrapperTable.TryGetValue(instance, out managedObjectWrapper)) { - ccwValue.AddRef(); - return ccwValue.ComIp; + managedObjectWrapper.AddRef(); + return managedObjectWrapper.ComIp; } - ccwValue = _ccwTable.GetValue(instance, (c) => + managedObjectWrapper = _managedObjectWrapperTable.GetValue(instance, (c) => { - ManagedObjectWrapper* value = CreateCCW(c, flags); + ManagedObjectWrapper* value = CreateManagedObjectWrapper(c, flags); return new ManagedObjectWrapperHolder(value, c); }); - ccwValue.AddRef(); - return ccwValue.ComIp; + managedObjectWrapper.AddRef(); + return managedObjectWrapper.ComIp; } - private unsafe ManagedObjectWrapper* CreateCCW(object instance, CreateComInterfaceFlags flags) + private unsafe ManagedObjectWrapper* CreateManagedObjectWrapper(object instance, CreateComInterfaceFlags flags) { ComInterfaceEntry* userDefined = ComputeVtables(instance, flags, out int userDefinedCount); if ((userDefined == null && userDefinedCount != 0) || userDefinedCount < 0) @@ -799,7 +803,7 @@ public object GetOrCreateObjectForComInstance(IntPtr externalComObject, CreateOb if (!TryGetOrCreateObjectForComInstanceInternal(externalComObject, IntPtr.Zero, flags, null, out obj)) throw new ArgumentNullException(nameof(externalComObject)); - return obj!; + return obj; } /// @@ -841,7 +845,7 @@ public object GetOrRegisterObjectForComInstance(IntPtr externalComObject, Create if (!TryGetOrCreateObjectForComInstanceInternal(externalComObject, inner, flags, wrapper, out obj)) throw new ArgumentNullException(nameof(externalComObject)); - return obj!; + return obj; } private static unsafe ComInterfaceDispatch* TryGetComInterfaceDispatch(IntPtr comObject) @@ -917,7 +921,6 @@ private static void DetermineIdentityAndInner( } } -#pragma warning disable IDE0060 /// /// Get the currently registered managed object or creates a new managed object and registers it. /// @@ -932,7 +935,7 @@ private unsafe bool TryGetOrCreateObjectForComInstanceInternal( IntPtr innerMaybe, CreateObjectFlags flags, object? wrapperMaybe, - out object? retValue) + [NotNullWhen(true)] out object? retValue) { if (externalComObject == IntPtr.Zero) throw new ArgumentNullException(nameof(externalComObject)); @@ -949,137 +952,149 @@ private unsafe bool TryGetOrCreateObjectForComInstanceInternal( using ComHolder releaseIdentity = new ComHolder(identity); - if (!flags.HasFlag(CreateObjectFlags.UniqueInstance)) + // If the user has requested a unique instance, + // we will immediately create the object, register it, + // and return. + if (flags.HasFlag(CreateObjectFlags.UniqueInstance)) { - using (_lock.EnterScope()) - { - if (_rcwCache.TryGetValue(identity, out GCHandle handle)) - { - object? cachedWrapper = handle.Target; - if (cachedWrapper is not null) - { - retValue = cachedWrapper; - return true; - } - else - { - // The GCHandle has been clear out but the NativeObjectWrapper - // finalizer has not yet run to remove the entry from _rcwCache - _rcwCache.Remove(identity); - } - } + retValue = CreateAndRegisterObjectForComInstance(identity, inner, flags); + return retValue is not null; + } - if (wrapperMaybe is not null) - { - retValue = wrapperMaybe; - NativeObjectWrapper wrapper = NativeObjectWrapper.Create( - identity, - inner, - this, - retValue, - flags); - if (!s_rcwTable.TryAdd(retValue, wrapper)) - { - wrapper.Release(); - throw new NotSupportedException(); - } - _rcwCache.Add(identity, wrapper._proxyHandle); - AddWrapperToReferenceTrackerHandleCache(wrapper); - return true; - } - } - if (flags.HasFlag(CreateObjectFlags.Unwrap)) + // If we have a live cached wrapper currently, + // return that. + if (_rcwCache.FindProxyForComInstance(identity) is object liveCachedWrapper) + { + retValue = liveCachedWrapper; + return true; + } + + // If the user tried to provide a pre-created managed wrapper, try to register + // that object as the wrapper. + if (wrapperMaybe is not null) + { + retValue = RegisterObjectForComInstance(identity, inner, wrapperMaybe, flags); + return retValue is not null; + } + + // Check if the provided COM instance is actually a managed object wrapper from this + // ComWrappers instance, and use it if it is. + if (flags.HasFlag(CreateObjectFlags.Unwrap)) + { + ComInterfaceDispatch* comInterfaceDispatch = TryGetComInterfaceDispatch(identity); + if (comInterfaceDispatch != null) { - ComInterfaceDispatch* comInterfaceDispatch = TryGetComInterfaceDispatch(identity); - if (comInterfaceDispatch != null) + // If we found a managed object wrapper in this ComWrappers instance + // and it has the same identity pointer as the one we're creating a NativeObjectWrapper for, + // unwrap it. We don't AddRef the wrapper as we don't take a reference to it. + // + // A managed object can have multiple managed object wrappers, with a max of one per context. + // Let's say we have a managed object A and ComWrappers instances C1 and C2. Let B1 and B2 be the + // managed object wrappers for A created with C1 and C2 respectively. + // If we are asked to create an EOC for B1 with the unwrap flag on the C2 ComWrappers instance, + // we will create a new wrapper. In this scenario, we'll only unwrap B2. + object unwrapped = ComInterfaceDispatch.GetInstance(comInterfaceDispatch); + if (_managedObjectWrapperTable.TryGetValue(unwrapped, out ManagedObjectWrapperHolder? unwrappedWrapperInThisContext)) { - // If we found a managed object wrapper in this ComWrappers instance - // and it's has the same identity pointer as the one we're creating a NativeObjectWrapper for, - // unwrap it. We don't AddRef the wrapper as we don't take a reference to it. - // - // A managed object can have multiple managed object wrappers, with a max of one per context. - // Let's say we have a managed object A and ComWrappers instances C1 and C2. Let B1 and B2 be the - // managed object wrappers for A created with C1 and C2 respectively. - // If we are asked to create an EOC for B1 with the unwrap flag on the C2 ComWrappers instance, - // we will create a new wrapper. In this scenario, we'll only unwrap B2. - object unwrapped = ComInterfaceDispatch.GetInstance(comInterfaceDispatch); - if (_ccwTable.TryGetValue(unwrapped, out ManagedObjectWrapperHolder? unwrappedWrapperInThisContext)) + // The unwrapped object has a CCW in this context. Compare with identity + // so we can see if it's the CCW for the unwrapped object in this context. + if (unwrappedWrapperInThisContext.ComIp == identity) { - // The unwrapped object has a CCW in this context. Compare with identity - // so we can see if it's the CCW for the unwrapped object in this context. - if (unwrappedWrapperInThisContext.ComIp == identity) - { - retValue = unwrapped; - return true; - } + retValue = unwrapped; + return true; } } } } - retValue = CreateObject(identity, flags); - if (retValue == null) + // If the user didn't provide a wrapper and couldn't unwrap a managed object wrapper, + // create a new wrapper. + retValue = CreateAndRegisterObjectForComInstance(identity, inner, flags); + return retValue is not null; + } + + private object? CreateAndRegisterObjectForComInstance(IntPtr identity, IntPtr inner, CreateObjectFlags flags) + { + object? retValue = CreateObject(identity, flags); + if (retValue is null) { // If ComWrappers instance cannot create wrapper, we can do nothing here. - return false; + return null; } - if (flags.HasFlag(CreateObjectFlags.UniqueInstance)) + return RegisterObjectForComInstance(identity, inner, retValue, flags); + } + + private object RegisterObjectForComInstance(IntPtr identity, IntPtr inner, object comProxy, CreateObjectFlags flags) + { + NativeObjectWrapper nativeObjectWrapper = NativeObjectWrapper.Create( + identity, + inner, + this, + comProxy, + flags); + + object actualProxy = comProxy; + NativeObjectWrapper actualWrapper = nativeObjectWrapper; + if (!nativeObjectWrapper.IsUniqueInstance) { - NativeObjectWrapper wrapper = NativeObjectWrapper.Create( - identity, - inner, - null, // No need to cache NativeObjectWrapper for unique instances. They are not cached. - retValue, - flags); - if (!s_rcwTable.TryAdd(retValue, wrapper)) + // Add our entry to the cache here, using an already existing entry if someone else beat us to it. + (actualWrapper, actualProxy) = _rcwCache.GetOrAddProxyForComInstance(identity, nativeObjectWrapper, comProxy); + if (actualWrapper != nativeObjectWrapper) { - wrapper.Release(); - throw new NotSupportedException(); + // We raced with another thread to map identity to nativeObjectWrapper + // and lost the race. We will use the other thread's nativeObjectWrapper, so we can release ours. + nativeObjectWrapper.Release(); } - AddWrapperToReferenceTrackerHandleCache(wrapper); - return true; } - using (_lock.EnterScope()) + // At this point, actualProxy is the RCW object for the identity + // and actualWrapper is the NativeObjectWrapper that is in the RCW cache (if not unique) that associates the identity with actualProxy. + // Register the NativeObjectWrapper to handle lifetime tracking of the references to the COM object. + RegisterWrapperForObject(actualWrapper, actualProxy); + + return actualProxy; + } + + private void RegisterWrapperForObject(NativeObjectWrapper wrapper, object comProxy) + { + // When we call into RegisterWrapperForObject, there is only one valid non-"unique instance" wrapper for a given + // COM instance, which is already registered in the RCW cache. + // If we find a wrapper in the table that is a different NativeObjectWrapper instance + // then it must be for a different COM instance. + // It's possible that we could race here with another thread that is trying to register the same comProxy + // for the same COM instance, but in that case we'll be passed the same NativeObjectWrapper instance + // for both threads. In that case, it doesn't matter which thread adds the entry to the NativeObjectWrapper table + // as the entry is always the same pair. + Debug.Assert(wrapper.ProxyHandle.Target == comProxy); + Debug.Assert(wrapper.IsUniqueInstance || _rcwCache.FindProxyForComInstance(wrapper.ExternalComObject) == comProxy); + + if (s_nativeObjectWrapperTable.TryGetValue(comProxy, out NativeObjectWrapper? registeredWrapper) + && registeredWrapper != wrapper) { - object? cachedWrapper = null; - if (_rcwCache.TryGetValue(identity, out var existingHandle)) - { - cachedWrapper = existingHandle.Target; - if (cachedWrapper is null) - { - // The GCHandle has been clear out but the NativeObjectWrapper - // finalizer has not yet run to remove the entry from _rcwCache - _rcwCache.Remove(identity); - } - } + Debug.Assert(registeredWrapper.ExternalComObject != wrapper.ExternalComObject); + wrapper.Release(); + throw new NotSupportedException(); + } - if (cachedWrapper is not null) - { - retValue = cachedWrapper; - } - else - { - NativeObjectWrapper wrapper = NativeObjectWrapper.Create( - identity, - inner, - this, - retValue, - flags); - if (!s_rcwTable.TryAdd(retValue, wrapper)) - { - wrapper.Release(); - throw new NotSupportedException(); - } - _rcwCache.Add(identity, wrapper._proxyHandle); - AddWrapperToReferenceTrackerHandleCache(wrapper); - } + registeredWrapper = GetValueFromRcwTable(comProxy, wrapper); + if (registeredWrapper != wrapper) + { + Debug.Assert(registeredWrapper.ExternalComObject != wrapper.ExternalComObject); + wrapper.Release(); + throw new NotSupportedException(); } - return true; + // Always register our wrapper to the reference tracker handle cache here. + // We may not be the thread that registered the handle, but we need to ensure that the wrapper + // is registered before we return to user code. Otherwise the wrapper won't be walked by the + // TrackerObjectManager and we could end up missing a section of the object graph. + // This cache deduplicates, so it is okay that the wrapper will be registered multiple times. + AddWrapperToReferenceTrackerHandleCache(registeredWrapper); + + // Separate out into a local function to avoid the closure and delegate allocation unless we need it. + static NativeObjectWrapper GetValueFromRcwTable(object userObject, NativeObjectWrapper newWrapper) => s_nativeObjectWrapperTable.GetValue(userObject, _ => newWrapper); } -#pragma warning restore IDE0060 private static void AddWrapperToReferenceTrackerHandleCache(NativeObjectWrapper wrapper) { @@ -1089,16 +1104,94 @@ private static void AddWrapperToReferenceTrackerHandleCache(NativeObjectWrapper } } - private void RemoveRCWFromCache(IntPtr comPointer, GCHandle expectedValue) + private sealed class RcwCache { - using (_lock.EnterScope()) + private readonly Lock _lock = new Lock(useTrivialWaits: true); + private readonly Dictionary _cache = []; + + /// + /// Gets the current RCW proxy object for if it exists in the cache or inserts a new entry with . + /// + /// The com instance we want to get or record an RCW for. + /// The for . + /// The proxy object that is associated with . + /// The proxy object currently in the cache for or the proxy object owned by if no entry exists and the corresponding native wrapper. + public (NativeObjectWrapper actualWrapper, object actualProxy) GetOrAddProxyForComInstance(IntPtr comPointer, NativeObjectWrapper wrapper, object comProxy) + { + lock (_lock) + { + Debug.Assert(wrapper.ProxyHandle.Target == comProxy); + ref GCHandle rcwEntry = ref CollectionsMarshal.GetValueRefOrAddDefault(_cache, comPointer, out bool exists); + if (!exists) + { + // Someone else didn't beat us to adding the entry to the cache. + // Add our entry here. + rcwEntry = GCHandle.Alloc(wrapper, GCHandleType.Weak); + } + else if (rcwEntry.Target is not (NativeObjectWrapper cachedWrapper)) + { + Debug.Assert(rcwEntry.IsAllocated); + // The target was collected, so we need to update the cache entry. + rcwEntry.Target = wrapper; + } + else + { + object? existingProxy = cachedWrapper.ProxyHandle.Target; + // The target NativeObjectWrapper was not collected, but we need to make sure + // that the proxy object is still alive. + if (existingProxy is not null) + { + // The existing proxy object is still alive, we will use that. + return (cachedWrapper, existingProxy); + } + + // The proxy object was collected, so we need to update the cache entry. + rcwEntry.Target = wrapper; + } + + // We either added an entry to the cache or updated an existing entry that was dead. + // Return our target object. + return (wrapper, comProxy); + } + } + + public object? FindProxyForComInstance(IntPtr comPointer) { - // TryGetOrCreateObjectForComInstanceInternal may have put a new entry into the cache - // in the time between the GC cleared the contents of the GC handle but before the - // NativeObjectWrapper finalizer ran. - if (_rcwCache.TryGetValue(comPointer, out GCHandle cachedValue) && expectedValue.Equals(cachedValue)) + lock (_lock) { - _rcwCache.Remove(comPointer); + if (_cache.TryGetValue(comPointer, out GCHandle existingHandle)) + { + if (existingHandle.Target is NativeObjectWrapper { ProxyHandle.Target: object cachedProxy }) + { + // The target exists and is still alive. Return it. + return cachedProxy; + } + + // The target was collected, so we need to remove the entry from the cache. + _cache.Remove(comPointer); + existingHandle.Free(); + } + + return null; + } + } + + public void Remove(IntPtr comPointer, NativeObjectWrapper wrapper) + { + lock (_lock) + { + // TryGetOrCreateObjectForComInstanceInternal may have put a new entry into the cache + // in the time between the GC cleared the contents of the GC handle but before the + // NativeObjectWrapper finalizer ran. + // Only remove the entry if the target of the GC handle is the NativeObjectWrapper + // or is null (indicating that the corresponding NativeObjectWrapper has been scheduled for finalization). + if (_cache.TryGetValue(comPointer, out GCHandle cachedRef) + && (wrapper == cachedRef.Target + || cachedRef.Target is null)) + { + _cache.Remove(comPointer); + cachedRef.Free(); + } } } } @@ -1157,7 +1250,7 @@ public static void RegisterForMarshalling(ComWrappers instance) public static unsafe void GetIUnknownImpl(out IntPtr fpQueryInterface, out IntPtr fpAddRef, out IntPtr fpRelease) { fpQueryInterface = (IntPtr)(delegate* unmanaged)&ComWrappers.IUnknown_QueryInterface; - fpAddRef = (IntPtr)(delegate* unmanaged)&ComWrappers.IUnknown_AddRef; + fpAddRef = RuntimeImports.RhGetIUnknownAddRef(); // Implemented in C/C++ to avoid GC transitions fpRelease = (IntPtr)(delegate* unmanaged)&ComWrappers.IUnknown_Release; } @@ -1233,7 +1326,7 @@ internal static void ReleaseExternalObjectsFromCurrentThread() if (nativeObjectWrapper != null && nativeObjectWrapper._contextToken == contextToken) { - object? target = nativeObjectWrapper._proxyHandle.Target; + object? target = nativeObjectWrapper.ProxyHandle.Target; if (target != null) { objects.Add(target); @@ -1260,7 +1353,7 @@ internal static unsafe void WalkExternalTrackerObjects() if (nativeObjectWrapper != null && nativeObjectWrapper.TrackerObject != IntPtr.Zero) { - FindReferenceTargetsCallback.s_currentRootObjectHandle = nativeObjectWrapper._proxyHandle; + FindReferenceTargetsCallback.s_currentRootObjectHandle = nativeObjectWrapper.ProxyHandle; if (IReferenceTracker.FindTrackerTargets(nativeObjectWrapper.TrackerObject, TrackerObjectManager.s_findReferencesTargetCallback) != HResults.S_OK) { walkFailed = true; @@ -1287,7 +1380,7 @@ internal static void DetachNonPromotedObjects() ReferenceTrackerNativeObjectWrapper? nativeObjectWrapper = Unsafe.As(weakNativeObjectWrapperHandle.Target); if (nativeObjectWrapper != null && nativeObjectWrapper.TrackerObject != IntPtr.Zero && - !RuntimeImports.RhIsPromoted(nativeObjectWrapper._proxyHandle.Target)) + !RuntimeImports.RhIsPromoted(nativeObjectWrapper.ProxyHandle.Target)) { // Notify the wrapper it was not promoted and is being collected. TrackerObjectManager.BeforeWrapperFinalized(nativeObjectWrapper.TrackerObject); @@ -1302,13 +1395,6 @@ internal static unsafe int IUnknown_QueryInterface(IntPtr pThis, Guid* guid, Int return wrapper->QueryInterface(in *guid, out *ppObject); } - [UnmanagedCallersOnly] - internal static unsafe uint IUnknown_AddRef(IntPtr pThis) - { - ManagedObjectWrapper* wrapper = ComInterfaceDispatch.ToManagedObjectWrapper((ComInterfaceDispatch*)pThis); - return wrapper->AddRef(); - } - [UnmanagedCallersOnly] internal static unsafe uint IUnknown_Release(IntPtr pThis) { @@ -1381,8 +1467,7 @@ private static unsafe IntPtr CreateDefaultIReferenceTrackerTargetVftbl() { IntPtr* vftbl = (IntPtr*)RuntimeHelpers.AllocateTypeAssociatedMemory(typeof(ComWrappers), 7 * sizeof(IntPtr)); vftbl[0] = (IntPtr)(delegate* unmanaged)&ComWrappers.IReferenceTrackerTarget_QueryInterface; - vftbl[1] = (IntPtr)(delegate* unmanaged)&ComWrappers.IUnknown_AddRef; - vftbl[2] = (IntPtr)(delegate* unmanaged)&ComWrappers.IUnknown_Release; + GetIUnknownImpl(out _, out vftbl[1], out vftbl[2]); vftbl[3] = (IntPtr)(delegate* unmanaged)&ComWrappers.IReferenceTrackerTarget_AddRefFromReferenceTracker; vftbl[4] = (IntPtr)(delegate* unmanaged)&ComWrappers.IReferenceTrackerTarget_ReleaseFromReferenceTracker; vftbl[5] = (IntPtr)(delegate* unmanaged)&ComWrappers.IReferenceTrackerTarget_Peg; @@ -1418,15 +1503,10 @@ internal static unsafe int IReferenceTrackerHost_DisconnectUnusedReferenceSource [UnmanagedCallersOnly] internal static unsafe int IReferenceTrackerHost_ReleaseDisconnectedReferenceSources(IntPtr pThis) { - try - { - GC.WaitForPendingFinalizers(); - return HResults.S_OK; - } - catch (Exception e) - { - return Marshal.GetHRForException(e); - } + // We'd like to call GC.WaitForPendingFinalizers() here, but this could lead to deadlock + // if the finalizer thread is trying to get back to this thread, because we are not pumping + // anymore. Disable this for now. See: https://github.com/dotnet/runtime/issues/109538. + return HResults.S_OK; } [UnmanagedCallersOnly] @@ -1621,7 +1701,7 @@ private static unsafe bool PossiblyComObject(object target) // If the RCW is an aggregated RCW, then the managed object cannot be recreated from the IUnknown // as the outer IUnknown wraps the managed object. In this case, don't create a weak reference backed // by a COM weak reference. - return s_rcwTable.TryGetValue(target, out NativeObjectWrapper? wrapper) && !wrapper._aggregatedManagedObjectWrapper; + return s_nativeObjectWrapperTable.TryGetValue(target, out NativeObjectWrapper? wrapper) && !wrapper.IsAggregatedWithManagedObjectWrapper; } private static unsafe IntPtr ObjectToComWeakRef(object target, out long wrapperId) diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/RuntimeImports.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/RuntimeImports.cs index 7f833e613e5c4b..56477a7f39c83c 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/RuntimeImports.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/RuntimeImports.cs @@ -469,12 +469,15 @@ internal static unsafe int RhCompatibleReentrantWaitAny(bool alertable, int time [MethodImplAttribute(MethodImplOptions.InternalCall)] [RuntimeImport(RuntimeLibrary, "RhResolveDispatchOnType")] - internal static extern unsafe IntPtr RhResolveDispatchOnType(MethodTable* instanceType, MethodTable* interfaceType, ushort slot, MethodTable** pGenericContext); + internal static extern unsafe IntPtr RhResolveDispatchOnType(MethodTable* instanceType, MethodTable* interfaceType, ushort slot); - internal static unsafe IntPtr RhResolveDispatchOnType(MethodTable* instanceType, MethodTable* interfaceType, ushort slot) - { - return RhResolveDispatchOnType(instanceType, interfaceType, slot, null); - } + [MethodImplAttribute(MethodImplOptions.InternalCall)] + [RuntimeImport(RuntimeLibrary, "RhResolveStaticDispatchOnType")] + internal static extern unsafe IntPtr RhResolveStaticDispatchOnType(MethodTable* instanceType, MethodTable* interfaceType, ushort slot, MethodTable** pGenericContext); + + [MethodImplAttribute(MethodImplOptions.InternalCall)] + [RuntimeImport(RuntimeLibrary, "RhResolveDynamicInterfaceCastableDispatchOnType")] + internal static extern unsafe IntPtr RhResolveDynamicInterfaceCastableDispatchOnType(MethodTable* instanceType, MethodTable* interfaceType, ushort slot, MethodTable** pGenericContext); [MethodImplAttribute(MethodImplOptions.InternalCall)] [RuntimeImport(RuntimeLibrary, "RhGetRuntimeHelperForType")] @@ -508,6 +511,10 @@ internal enum GcRestrictedCalloutKind [RuntimeImport(RuntimeLibrary, "RhUnregisterRefCountedHandleCallback")] internal static extern unsafe void RhUnregisterRefCountedHandleCallback(IntPtr pCalloutMethod, MethodTable* pTypeFilter); + [MethodImplAttribute(MethodImplOptions.InternalCall)] + [RuntimeImport(RuntimeLibrary, "RhGetIUnknownAddRef")] + internal static extern IntPtr RhGetIUnknownAddRef(); + #if FEATURE_OBJCMARSHAL [MethodImplAttribute(MethodImplOptions.InternalCall)] [RuntimeImport(RuntimeLibrary, "RhRegisterObjectiveCMarshalBeginEndCallback")] diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/System.Private.TypeLoader.csproj b/src/coreclr/nativeaot/System.Private.TypeLoader/src/System.Private.TypeLoader.csproj index b00904e556f2ca..09881516e2950c 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/System.Private.TypeLoader.csproj +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/System.Private.TypeLoader.csproj @@ -200,9 +200,6 @@ Internal\TypeSystem\ThrowHelper.Common.cs - - LockFreeReaderHashtableOfPointers.cs - Internal\TypeSystem\Utilities\ExceptionTypeNameFormatter.cs diff --git a/src/coreclr/pal/inc/unixasmmacrosamd64.inc b/src/coreclr/pal/inc/unixasmmacrosamd64.inc index bc6d770a51824a..31093a4073d2ed 100644 --- a/src/coreclr/pal/inc/unixasmmacrosamd64.inc +++ b/src/coreclr/pal/inc/unixasmmacrosamd64.inc @@ -16,15 +16,6 @@ .macro NESTED_END Name, Section LEAF_END \Name, \Section -#if defined(__APPLE__) - .set LOCAL_LABEL(\Name\()_Size), . - C_FUNC(\Name) - .section __LD,__compact_unwind,regular,debug - .quad C_FUNC(\Name) - .long LOCAL_LABEL(\Name\()_Size) - .long 0x04000000 # DWARF - .quad 0 - .quad 0 -#endif .endm .macro PATCH_LABEL Name diff --git a/src/coreclr/pal/src/exception/machexception.cpp b/src/coreclr/pal/src/exception/machexception.cpp index 5f1bf97605784b..fdb3d8dc837c15 100644 --- a/src/coreclr/pal/src/exception/machexception.cpp +++ b/src/coreclr/pal/src/exception/machexception.cpp @@ -1325,7 +1325,7 @@ void MachExceptionInfo::RestoreState(mach_port_t thread) kern_return_t machret = thread_set_state(thread, x86_THREAD_STATE, (thread_state_t)&ThreadState, x86_THREAD_STATE_COUNT); CHECK_MACH("thread_set_state(thread)", machret); - machret = thread_set_state(thread, FloatState.ash.flavor, (thread_state_t)&FloatState, FloatState.ash.count); + machret = thread_set_state(thread, FloatState.ash.flavor, (thread_state_t)&FloatState.ufs, FloatState.ash.count); CHECK_MACH("thread_set_state(float)", machret); machret = thread_set_state(thread, x86_DEBUG_STATE, (thread_state_t)&DebugState, x86_DEBUG_STATE_COUNT); diff --git a/src/coreclr/tools/Common/Internal/Runtime/RuntimeConstants.cs b/src/coreclr/tools/Common/Internal/Runtime/RuntimeConstants.cs index 8ce74a03072b4d..9d356cb066813d 100644 --- a/src/coreclr/tools/Common/Internal/Runtime/RuntimeConstants.cs +++ b/src/coreclr/tools/Common/Internal/Runtime/RuntimeConstants.cs @@ -43,6 +43,11 @@ internal static class SpecialDispatchMapSlot public const ushort Reabstraction = 0xFFFF; } + internal static class DispatchMapCodePointerFlags + { + public const int RequiresInstantiatingThunkFlag = 2; + } + internal static class SpecialGVMInterfaceEntry { public const uint Diamond = 0xFFFFFFFF; diff --git a/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs b/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs index f29717b0d3a2c3..b9bdb5e55f7924 100644 --- a/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs +++ b/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs @@ -2287,6 +2287,10 @@ private int MarkGcField(byte* gcPtrs, CorInfoGCType gcType) private int GatherClassGCLayout(MetadataType type, byte* gcPtrs) { int result = 0; + + if (type.MetadataBaseType is { ContainsGCPointers: true } baseType) + result += GatherClassGCLayout(baseType, gcPtrs); + bool isInlineArray = type.IsInlineArray; foreach (var field in type.GetFields()) diff --git a/src/coreclr/tools/Common/TypeSystem/Common/Utilities/LockFreeReaderHashtableOfPointers.cs b/src/coreclr/tools/Common/TypeSystem/Common/Utilities/LockFreeReaderHashtableOfPointers.cs index 0decdff50a7a0d..af6aac636146ed 100644 --- a/src/coreclr/tools/Common/TypeSystem/Common/Utilities/LockFreeReaderHashtableOfPointers.cs +++ b/src/coreclr/tools/Common/TypeSystem/Common/Utilities/LockFreeReaderHashtableOfPointers.cs @@ -9,6 +9,8 @@ using System.Threading.Tasks; using Debug = System.Diagnostics.Debug; +#nullable disable + namespace Internal.TypeSystem { /// diff --git a/src/coreclr/tools/aot/ILCompiler.Build.Tasks/ComputeManagedAssembliesToCompileToNative.cs b/src/coreclr/tools/aot/ILCompiler.Build.Tasks/ComputeManagedAssembliesToCompileToNative.cs index 60084f4d03d1be..6d278e4b9597a8 100644 --- a/src/coreclr/tools/aot/ILCompiler.Build.Tasks/ComputeManagedAssembliesToCompileToNative.cs +++ b/src/coreclr/tools/aot/ILCompiler.Build.Tasks/ComputeManagedAssembliesToCompileToNative.cs @@ -5,6 +5,7 @@ using Microsoft.Build.Utilities; using System; using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Reflection.Metadata; using System.Reflection.PortableExecutable; @@ -99,16 +100,20 @@ public override bool Execute() var list = new List(); var assembliesToSkipPublish = new List(); var satelliteAssemblies = new List(); - var nativeAotFrameworkAssembliesToUse = new HashSet(); + var nativeAotFrameworkAssembliesToUse = new Dictionary(); foreach (ITaskItem taskItem in SdkAssemblies) { - nativeAotFrameworkAssembliesToUse.Add(Path.GetFileName(taskItem.ItemSpec)); + var fileName = Path.GetFileName(taskItem.ItemSpec); + if (!nativeAotFrameworkAssembliesToUse.ContainsKey(fileName)) + nativeAotFrameworkAssembliesToUse.Add(fileName, taskItem); } foreach (ITaskItem taskItem in FrameworkAssemblies) { - nativeAotFrameworkAssembliesToUse.Add(Path.GetFileName(taskItem.ItemSpec)); + var fileName = Path.GetFileName(taskItem.ItemSpec); + if (!nativeAotFrameworkAssembliesToUse.ContainsKey(fileName)) + nativeAotFrameworkAssembliesToUse.Add(fileName, taskItem); } foreach (ITaskItem taskItem in Assemblies) @@ -153,8 +158,21 @@ public override bool Execute() // Remove any assemblies whose implementation we want to come from NativeAOT's package. // Currently that's System.Private.* SDK assemblies and a bunch of framework assemblies. - if (nativeAotFrameworkAssembliesToUse.Contains(assemblyFileName)) + if (nativeAotFrameworkAssembliesToUse.TryGetValue(assemblyFileName, out ITaskItem frameworkItem)) { + if (GetFileVersion(itemSpec).CompareTo(GetFileVersion(frameworkItem.ItemSpec)) > 0) + { + if (assemblyFileName == "System.Private.CoreLib.dll") + { + Log.LogError($"Overriding System.Private.CoreLib.dll with a newer version is not supported. Attempted to use {itemSpec} instead of {frameworkItem.ItemSpec}."); + } + else + { + // Allow OOB references with higher version to take precedence over the framework assemblies. + list.Add(taskItem); + } + } + assembliesToSkipPublish.Add(taskItem); continue; } @@ -196,6 +214,12 @@ public override bool Execute() SatelliteAssemblies = satelliteAssemblies.ToArray(); return true; + + static Version GetFileVersion(string path) + { + var versionInfo = FileVersionInfo.GetVersionInfo(path); + return new Version(versionInfo.FileMajorPart, versionInfo.FileMinorPart, versionInfo.FileBuildPart, versionInfo.FilePrivatePart); + } } } } diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerTypeSystemContext.InterfaceThunks.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerTypeSystemContext.InterfaceThunks.cs index 51bf6a6888e2ff..b9c8f7aa3566bb 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerTypeSystemContext.InterfaceThunks.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/CompilerTypeSystemContext.InterfaceThunks.cs @@ -62,13 +62,11 @@ namespace ILCompiler // Contains functionality related to instantiating thunks for default interface methods public partial class CompilerTypeSystemContext { - private const int UseContextFromRuntime = -1; - /// /// For a shared (canonical) default interface method, gets a method that can be used to call the /// method on a specific implementing class. /// - public MethodDesc GetDefaultInterfaceMethodImplementationThunk(MethodDesc targetMethod, TypeDesc implementingClass, DefType interfaceOnDefinition) + public MethodDesc GetDefaultInterfaceMethodImplementationThunk(MethodDesc targetMethod, TypeDesc implementingClass, DefType interfaceOnDefinition, out int interfaceIndex) { Debug.Assert(targetMethod.IsSharedByGenericInstantiations); Debug.Assert(!targetMethod.Signature.IsStatic); @@ -76,11 +74,16 @@ public MethodDesc GetDefaultInterfaceMethodImplementationThunk(MethodDesc target Debug.Assert(interfaceOnDefinition.GetTypeDefinition() == targetMethod.OwningType.GetTypeDefinition()); Debug.Assert(targetMethod.OwningType.IsInterface); - int interfaceIndex; + bool useContextFromRuntime = false; if (implementingClass.IsInterface) { Debug.Assert(((MetadataType)implementingClass).IsDynamicInterfaceCastableImplementation()); - interfaceIndex = UseContextFromRuntime; + useContextFromRuntime = true; + } + + if (useContextFromRuntime && targetMethod.OwningType == implementingClass) + { + interfaceIndex = -1; } else { @@ -90,7 +93,7 @@ public MethodDesc GetDefaultInterfaceMethodImplementationThunk(MethodDesc target // Get a method that will inject the appropriate instantiation context to the // target default interface method. - var methodKey = new DefaultInterfaceMethodImplementationInstantiationThunkHashtableKey(targetMethod, interfaceIndex); + var methodKey = new DefaultInterfaceMethodImplementationInstantiationThunkHashtableKey(targetMethod, interfaceIndex, useContextFromRuntime); MethodDesc thunk = _dimThunkHashtable.GetOrCreateValue(methodKey); return thunk; @@ -117,11 +120,13 @@ private struct DefaultInterfaceMethodImplementationInstantiationThunkHashtableKe { public readonly MethodDesc TargetMethod; public readonly int InterfaceIndex; + public bool UseContextFromRuntime; - public DefaultInterfaceMethodImplementationInstantiationThunkHashtableKey(MethodDesc targetMethod, int interfaceIndex) + public DefaultInterfaceMethodImplementationInstantiationThunkHashtableKey(MethodDesc targetMethod, int interfaceIndex, bool useContextFromRuntime) { TargetMethod = targetMethod; InterfaceIndex = interfaceIndex; + UseContextFromRuntime = useContextFromRuntime; } } @@ -138,17 +143,19 @@ protected override int GetValueHashCode(DefaultInterfaceMethodImplementationInst protected override bool CompareKeyToValue(DefaultInterfaceMethodImplementationInstantiationThunkHashtableKey key, DefaultInterfaceMethodImplementationInstantiationThunk value) { return ReferenceEquals(key.TargetMethod, value.TargetMethod) && - key.InterfaceIndex == value.InterfaceIndex; + key.InterfaceIndex == value.InterfaceIndex && + key.UseContextFromRuntime == value.UseContextFromRuntime; } protected override bool CompareValueToValue(DefaultInterfaceMethodImplementationInstantiationThunk value1, DefaultInterfaceMethodImplementationInstantiationThunk value2) { return ReferenceEquals(value1.TargetMethod, value2.TargetMethod) && - value1.InterfaceIndex == value2.InterfaceIndex; + value1.InterfaceIndex == value2.InterfaceIndex && + value1.UseContextFromRuntime == value2.UseContextFromRuntime; } protected override DefaultInterfaceMethodImplementationInstantiationThunk CreateValueFromKey(DefaultInterfaceMethodImplementationInstantiationThunkHashtableKey key) { TypeDesc owningTypeOfThunks = ((CompilerTypeSystemContext)key.TargetMethod.Context).GeneratedAssembly.GetGlobalModuleType(); - return new DefaultInterfaceMethodImplementationInstantiationThunk(owningTypeOfThunks, key.TargetMethod, key.InterfaceIndex); + return new DefaultInterfaceMethodImplementationInstantiationThunk(owningTypeOfThunks, key.TargetMethod, key.InterfaceIndex, key.UseContextFromRuntime); } } private DefaultInterfaceMethodImplementationInstantiationThunkHashtable _dimThunkHashtable = new DefaultInterfaceMethodImplementationInstantiationThunkHashtable(); @@ -162,8 +169,9 @@ private sealed partial class DefaultInterfaceMethodImplementationInstantiationTh private readonly DefaultInterfaceMethodImplementationWithHiddenParameter _nakedTargetMethod; private readonly TypeDesc _owningType; private readonly int _interfaceIndex; + private readonly bool _useContextFromRuntime; - public DefaultInterfaceMethodImplementationInstantiationThunk(TypeDesc owningType, MethodDesc targetMethod, int interfaceIndex) + public DefaultInterfaceMethodImplementationInstantiationThunk(TypeDesc owningType, MethodDesc targetMethod, int interfaceIndex, bool useContextFromRuntime) { Debug.Assert(targetMethod.OwningType.IsInterface); Debug.Assert(!targetMethod.Signature.IsStatic); @@ -172,6 +180,7 @@ public DefaultInterfaceMethodImplementationInstantiationThunk(TypeDesc owningTyp _targetMethod = targetMethod; _nakedTargetMethod = new DefaultInterfaceMethodImplementationWithHiddenParameter(targetMethod, owningType); _interfaceIndex = interfaceIndex; + _useContextFromRuntime = useContextFromRuntime; } public override TypeSystemContext Context => _targetMethod.Context; @@ -180,6 +189,8 @@ public DefaultInterfaceMethodImplementationInstantiationThunk(TypeDesc owningTyp public int InterfaceIndex => _interfaceIndex; + public bool UseContextFromRuntime => _useContextFromRuntime; + public override MethodSignature Signature => _targetMethod.Signature; public MethodDesc TargetMethod => _targetMethod; @@ -202,7 +213,7 @@ public override string DiagnosticName public MethodDesc BaseMethod => _targetMethod; - public string Prefix => $"__InstantiatingStub_{_interfaceIndex}_"; + public string Prefix => $"__InstantiatingStub_{(uint)_interfaceIndex}_{(_useContextFromRuntime ? "_FromRuntime" : "")}_"; public override MethodIL EmitIL() { @@ -230,7 +241,7 @@ public override MethodIL EmitIL() } // Load the instantiating argument. - if (_interfaceIndex == UseContextFromRuntime) + if (_useContextFromRuntime) { codeStream.Emit(ILOpcode.call, emit.NewToken(getCurrentContext)); } @@ -238,6 +249,10 @@ public override MethodIL EmitIL() { codeStream.EmitLdArg(0); codeStream.Emit(ILOpcode.ldfld, emit.NewToken(eeTypeField)); + } + + if (_interfaceIndex >= 0) + { codeStream.EmitLdc(_interfaceIndex); codeStream.Emit(ILOpcode.call, emit.NewToken(getOrdinalInterfaceMethod)); } diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/EETypeNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/EETypeNode.cs index a27a77882ab130..722618c759d562 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/EETypeNode.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/EETypeNode.cs @@ -539,10 +539,10 @@ public sealed override IEnumerable GetConditionalSt if (!isStaticInterfaceMethod && defaultIntfMethod.IsCanonicalMethod(CanonicalFormKind.Any)) { // Canonical instance default methods need to go through a thunk that adds the right generic context - defaultIntfMethod = factory.TypeSystemContext.GetDefaultInterfaceMethodImplementationThunk(defaultIntfMethod, defType.ConvertToCanonForm(CanonicalFormKind.Specific), providingInterfaceDefinitionType); + defaultIntfMethod = factory.TypeSystemContext.GetDefaultInterfaceMethodImplementationThunk(defaultIntfMethod, defType.ConvertToCanonForm(CanonicalFormKind.Specific), providingInterfaceDefinitionType, out int providingInterfaceIndex); // The above thunk will index into interface list to find the right context. Make sure to keep all interfaces prior to this one - for (int i = 0; i < interfaceIndex; i++) + for (int i = 0; i <= providingInterfaceIndex; i++) { result.Add(new CombinedDependencyListEntry( factory.InterfaceUse(defTypeRuntimeInterfaces[i].GetTypeDefinition()), diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/SealedVTableNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/SealedVTableNode.cs index dfa6c0967282e2..f0b9fbf532457e 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/SealedVTableNode.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/SealedVTableNode.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using Internal.Runtime; using Internal.Text; using Internal.TypeSystem; @@ -218,10 +219,10 @@ public bool BuildSealedVTableSlots(NodeFactory factory, bool relocsOnly) { // Canonical instance default interface methods need to go through a thunk that acquires the generic context from `this`. // Static methods have their generic context passed explicitly. - canonImplMethod = factory.TypeSystemContext.GetDefaultInterfaceMethodImplementationThunk(canonImplMethod, declType.ConvertToCanonForm(CanonicalFormKind.Specific), providingInterfaceDefinitionType); + canonImplMethod = factory.TypeSystemContext.GetDefaultInterfaceMethodImplementationThunk(canonImplMethod, declType.ConvertToCanonForm(CanonicalFormKind.Specific), providingInterfaceDefinitionType, out int providingInterfaceIndex); // The above thunk will index into interface list to find the right context. Make sure to keep all interfaces prior to this one - for (int i = 0; i < interfaceIndex; i++) + for (int i = 0; i <= providingInterfaceIndex; i++) { _nonRelocationDependencies ??= new DependencyList(); _nonRelocationDependencies.Add(factory.InterfaceUse(declTypeRuntimeInterfaces[i].GetTypeDefinition()), "Interface with shared default methods folows this"); @@ -267,14 +268,20 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly) if (BuildSealedVTableSlots(factory, relocsOnly)) { + bool isSharedDynamicInterfaceCastableImpl = _type.IsInterface + && _type.IsCanonicalSubtype(CanonicalFormKind.Any) + && ((MetadataType)_type).IsDynamicInterfaceCastableImplementation(); + for (int i = 0; i < _sealedVTableEntries.Count; i++) { IMethodNode relocTarget = _sealedVTableEntries[i].Target; + int delta = isSharedDynamicInterfaceCastableImpl ? DispatchMapCodePointerFlags.RequiresInstantiatingThunkFlag : 0; + if (factory.Target.SupportsRelativePointers) - objData.EmitReloc(relocTarget, RelocType.IMAGE_REL_BASED_RELPTR32); + objData.EmitReloc(relocTarget, RelocType.IMAGE_REL_BASED_RELPTR32, delta); else - objData.EmitPointerReloc(relocTarget); + objData.EmitPointerReloc(relocTarget, delta); } } diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/TypeMetadataNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/TypeMetadataNode.cs index 87a2c829c0269b..36ec3d8b265af0 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/TypeMetadataNode.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/TypeMetadataNode.cs @@ -130,6 +130,18 @@ public static void GetMetadataDependencies(ref DependencyList dependencies, Node default: Debug.Assert(type.IsDefType); + // We generally postpone creating MethodTables until absolutely needed. + // IDynamicInterfaceCastableImplementation is special in the sense that just obtaining a System.Type + // (by e.g. browsing custom attribute metadata) gives the user enough to pass this to runtime APIs + // that need a MethodTable. We don't have a legitimate type handle without the MethodTable. Other + // kinds of APIs that expect a MethodTable have enough dataflow annotation to trigger warnings. + // There's no dataflow annotations on the IDynamicInterfaceCastable.GetInterfaceImplementation API. + if (type.IsInterface && ((MetadataType)type).IsDynamicInterfaceCastableImplementation()) + { + dependencies ??= new DependencyList(); + dependencies.Add(nodeFactory.ReflectedType(type), "Reflected IDynamicInterfaceCastableImplementation"); + } + TypeDesc typeDefinition = type.GetTypeDefinition(); if (typeDefinition != type) { diff --git a/src/coreclr/vm/eetwain.cpp b/src/coreclr/vm/eetwain.cpp index 5746c44de4a770..618077b1b105c7 100644 --- a/src/coreclr/vm/eetwain.cpp +++ b/src/coreclr/vm/eetwain.cpp @@ -1952,6 +1952,7 @@ PTR_VOID EECodeManager::GetExactGenericsToken(SIZE_T baseStackSlot, void * EECodeManager::GetGSCookieAddr(PREGDISPLAY pContext, EECodeInfo * pCodeInfo, + unsigned flags, CodeManState * pState) { CONTRACTL { @@ -1969,6 +1970,14 @@ void * EECodeManager::GetGSCookieAddr(PREGDISPLAY pContext, } #endif +#ifdef HAS_LIGHTUNWIND + // LightUnwind does not track sufficient context to compute GS cookie address + if (flags & LightUnwind) + { + return NULL; + } +#endif + #ifndef USE_GC_INFO_DECODER _ASSERTE(sizeof(CodeManStateBuf) <= sizeof(pState->stateBuf)); diff --git a/src/coreclr/vm/excep.cpp b/src/coreclr/vm/excep.cpp index 8418202b933893..9328ac24876456 100644 --- a/src/coreclr/vm/excep.cpp +++ b/src/coreclr/vm/excep.cpp @@ -6533,11 +6533,12 @@ VEH_ACTION WINAPI CLRVectoredExceptionHandler(PEXCEPTION_POINTERS pExceptionInfo // When the CET is enabled, the interruption happens on the ret instruction in the calee. // We need to "pop" rsp to the caller, as if the ret has consumed it. interruptedContext->Rsp += 8; + DWORD64 ssp = GetSSP(interruptedContext); + SetSSP(interruptedContext, ssp + 8); } // Change the IP to be at the original return site, as if we have returned to the caller. // That IP is an interruptible safe point, so we can suspend right there. - uintptr_t origIp = interruptedContext->Rip; interruptedContext->Rip = (uintptr_t)pThread->GetHijackedReturnAddress(); FrameWithCookie frame(pExceptionInfo->ContextRecord); @@ -6545,13 +6546,6 @@ VEH_ACTION WINAPI CLRVectoredExceptionHandler(PEXCEPTION_POINTERS pExceptionInfo CommonTripThread(); frame.Pop(pThread); - if (areShadowStacksEnabled) - { - // Undo the "pop", so that the ret could now succeed. - interruptedContext->Rsp = interruptedContext->Rsp - 8; - interruptedContext->Rip = origIp; - } - return VEH_CONTINUE_EXECUTION; } #endif diff --git a/src/coreclr/vm/exceptionhandling.cpp b/src/coreclr/vm/exceptionhandling.cpp index f9426d46f0029b..264a29d17bf32c 100644 --- a/src/coreclr/vm/exceptionhandling.cpp +++ b/src/coreclr/vm/exceptionhandling.cpp @@ -2054,6 +2054,7 @@ CLRUnwindStatus ExceptionTracker::ProcessOSExceptionNotification( { pGSCookie = (GSCookie*)cfThisFrame.GetCodeManager()->GetGSCookieAddr(cfThisFrame.pRD, &cfThisFrame.codeInfo, + 0 /* CodeManFlags */, &cfThisFrame.codeManState); if (pGSCookie) { diff --git a/src/coreclr/vm/methodtable.cpp b/src/coreclr/vm/methodtable.cpp index 27dfd82a691ed9..bebe82d2927835 100644 --- a/src/coreclr/vm/methodtable.cpp +++ b/src/coreclr/vm/methodtable.cpp @@ -4360,7 +4360,10 @@ void MethodTable::DoFullyLoad(Generics::RecursionGraph * const pVisited, const ClassLoader::ValidateMethodsWithCovariantReturnTypes(this); } - if ((level == CLASS_LOADED) && CORDisableJITOptimizations(this->GetModule()->GetDebuggerInfoBits()) && !HasInstantiation()) + if ((level == CLASS_LOADED) && + CORDisableJITOptimizations(this->GetModule()->GetDebuggerInfoBits()) && + !HasInstantiation() && + !GetModule()->GetDomainAssembly()->IsLoading()) // Do not do this during the vtable fixup stage of C++/CLI assembly loading. See https://github.com/dotnet/runtime/issues/110365 { if (g_fEEStarted) { diff --git a/src/coreclr/vm/peassembly.cpp b/src/coreclr/vm/peassembly.cpp index 3f54dbff556af2..8594e62c9a0e6b 100644 --- a/src/coreclr/vm/peassembly.cpp +++ b/src/coreclr/vm/peassembly.cpp @@ -518,7 +518,6 @@ BOOL PEAssembly::GetResource(LPCSTR szName, DWORD *cbResource, } CONTRACTL_END; - mdToken mdLinkRef; DWORD dwResourceFlags; DWORD dwOffset; @@ -567,30 +566,31 @@ BOOL PEAssembly::GetResource(LPCSTR szName, DWORD *cbResource, } - switch(TypeFromToken(mdLinkRef)) { + switch(TypeFromToken(mdLinkRef)) + { case mdtAssemblyRef: { if (pAssembly == NULL) return FALSE; AssemblySpec spec; - spec.InitializeSpec(mdLinkRef, GetMDImport(), pAssembly); - DomainAssembly* pDomainAssembly = spec.LoadDomainAssembly(FILE_LOADED); + spec.InitializeSpec(mdLinkRef, pAssembly->GetMDImport(), pAssembly); + Assembly* pLoadedAssembly = spec.LoadAssembly(FILE_LOADED); if (dwLocation) { if (pAssemblyRef) - *pAssemblyRef = pDomainAssembly->GetAssembly(); + *pAssemblyRef = pLoadedAssembly; *dwLocation = *dwLocation | 2; // ResourceLocation.containedInAnotherAssembly } - return GetResource(szName, - cbResource, - pbInMemoryResource, - pAssemblyRef, - szFileName, - dwLocation, - pDomainAssembly->GetAssembly()); + return pLoadedAssembly->GetResource( + szName, + cbResource, + pbInMemoryResource, + pAssemblyRef, + szFileName, + dwLocation); } case mdtFile: diff --git a/src/coreclr/vm/prestub.cpp b/src/coreclr/vm/prestub.cpp index 0ad45e1110ceb4..99086a462a26fb 100644 --- a/src/coreclr/vm/prestub.cpp +++ b/src/coreclr/vm/prestub.cpp @@ -1445,11 +1445,18 @@ namespace DWORD declArgCount; IfFailThrow(CorSigUncompressData_EndPtr(pSig1, pEndSig1, &declArgCount)); + if (pSig1 >= pEndSig1) + ThrowHR(META_E_BAD_SIGNATURE); - // UnsafeAccessors for fields require return types be byref. - // This was explicitly checked in TryGenerateUnsafeAccessor(). + // UnsafeAccessors for fields require return types be byref. However, we first need to + // consume any custom modifiers which are prior to the expected ELEMENT_TYPE_BYREF in + // the RetType signature (II.23.2.11). + _ASSERTE(state.IgnoreCustomModifiers); // We should always ignore custom modifiers for field look-up. + MetaSig::ConsumeCustomModifiers(pSig1, pEndSig1); if (pSig1 >= pEndSig1) ThrowHR(META_E_BAD_SIGNATURE); + + // The ELEMENT_TYPE_BYREF was explicitly checked in TryGenerateUnsafeAccessor(). CorElementType byRefType = CorSigUncompressElementType(pSig1); _ASSERTE(byRefType == ELEMENT_TYPE_BYREF); @@ -1497,7 +1504,7 @@ namespace TokenPairList list { nullptr }; MetaSig::CompareState state{ &list }; - state.IgnoreCustomModifiers = false; + state.IgnoreCustomModifiers = true; if (!DoesFieldMatchUnsafeAccessorDeclaration(cxt, pField, state)) continue; diff --git a/src/coreclr/vm/profilingenumerators.cpp b/src/coreclr/vm/profilingenumerators.cpp index c55d40ffbeed9e..ac924f5032c7ee 100644 --- a/src/coreclr/vm/profilingenumerators.cpp +++ b/src/coreclr/vm/profilingenumerators.cpp @@ -556,9 +556,11 @@ HRESULT ProfilerThreadEnum::Init() } CONTRACTL_END; + // If EnumThreads is called from a profiler callback where the runtime is already suspended, + // don't recursively acquire/release the ThreadStore Lock. // If a profiler has requested that the runtime suspend to do stack snapshots, it // will be holding the ThreadStore lock already - ThreadStoreLockHolder tsLock(!g_profControlBlock.fProfilerRequestedRuntimeSuspend); + ThreadStoreLockHolder tsLock(!ThreadStore::HoldingThreadStore() && !g_profControlBlock.fProfilerRequestedRuntimeSuspend); Thread * pThread = NULL; diff --git a/src/coreclr/vm/proftoeeinterfaceimpl.cpp b/src/coreclr/vm/proftoeeinterfaceimpl.cpp index e99273beb5d133..77fa9989cfac2d 100644 --- a/src/coreclr/vm/proftoeeinterfaceimpl.cpp +++ b/src/coreclr/vm/proftoeeinterfaceimpl.cpp @@ -6873,8 +6873,8 @@ HRESULT ProfToEEInterfaceImpl::SuspendRuntime() return CORPROF_E_SUSPENSION_IN_PROGRESS; } - g_profControlBlock.fProfilerRequestedRuntimeSuspend = TRUE; ThreadSuspend::SuspendEE(ThreadSuspend::SUSPEND_REASON::SUSPEND_FOR_PROFILER); + g_profControlBlock.fProfilerRequestedRuntimeSuspend = TRUE; return S_OK; } @@ -6912,8 +6912,8 @@ HRESULT ProfToEEInterfaceImpl::ResumeRuntime() return CORPROF_E_UNSUPPORTED_CALL_SEQUENCE; } - ThreadSuspend::RestartEE(FALSE /* bFinishedGC */, TRUE /* SuspendSucceeded */); g_profControlBlock.fProfilerRequestedRuntimeSuspend = FALSE; + ThreadSuspend::RestartEE(FALSE /* bFinishedGC */, TRUE /* SuspendSucceeded */); return S_OK; } @@ -7705,8 +7705,8 @@ HRESULT ProfToEEInterfaceImpl::EnumerateGCHeapObjects(ObjectCallback callback, v // SuspendEE() may race with other threads by design and this thread may block // arbitrarily long inside SuspendEE() for other threads to complete their own // suspensions. - g_profControlBlock.fProfilerRequestedRuntimeSuspend = TRUE; ThreadSuspend::SuspendEE(ThreadSuspend::SUSPEND_REASON::SUSPEND_FOR_PROFILER); + g_profControlBlock.fProfilerRequestedRuntimeSuspend = TRUE; ownEESuspension = TRUE; } @@ -7738,8 +7738,8 @@ HRESULT ProfToEEInterfaceImpl::EnumerateGCHeapObjects(ObjectCallback callback, v if (ownEESuspension) { - ThreadSuspend::RestartEE(FALSE /* bFinishedGC */, TRUE /* SuspendSucceeded */); g_profControlBlock.fProfilerRequestedRuntimeSuspend = FALSE; + ThreadSuspend::RestartEE(FALSE /* bFinishedGC */, TRUE /* SuspendSucceeded */); } return hr; diff --git a/src/coreclr/vm/siginfo.cpp b/src/coreclr/vm/siginfo.cpp index facb809cd4841a..2b50fdfcfeaa49 100644 --- a/src/coreclr/vm/siginfo.cpp +++ b/src/coreclr/vm/siginfo.cpp @@ -3604,7 +3604,7 @@ BOOL CompareTypeTokens(mdToken tk1, mdToken tk2, ModuleBase *pModule1, ModuleBas #endif //!DACCESS_COMPILE } // CompareTypeTokens -static void ConsumeCustomModifiers(PCCOR_SIGNATURE& pSig, PCCOR_SIGNATURE pEndSig) +void MetaSig::ConsumeCustomModifiers(PCCOR_SIGNATURE& pSig, PCCOR_SIGNATURE pEndSig) { mdToken tk; CorElementType type; diff --git a/src/coreclr/vm/siginfo.hpp b/src/coreclr/vm/siginfo.hpp index fab9a79260d2d1..49f14b57c34bee 100644 --- a/src/coreclr/vm/siginfo.hpp +++ b/src/coreclr/vm/siginfo.hpp @@ -945,6 +945,14 @@ class MetaSig //------------------------------------------------------------------ CorElementType GetByRefType(TypeHandle* pTy) const; + //------------------------------------------------------------------ + // Consume the custom modifiers, if any, in the current signature + // and update it. + // This is a non destructive operation if the current signature is not + // pointing at a sequence of ELEMENT_TYPE_CMOD_REQD or ELEMENT_TYPE_CMOD_OPT. + //------------------------------------------------------------------ + static void ConsumeCustomModifiers(PCCOR_SIGNATURE& pSig, PCCOR_SIGNATURE pEndSig); + // Struct used to capture in/out state during the comparison // of element types. struct CompareState diff --git a/src/coreclr/vm/stackwalk.cpp b/src/coreclr/vm/stackwalk.cpp index b333249637d37e..fcf0a2e7f64853 100644 --- a/src/coreclr/vm/stackwalk.cpp +++ b/src/coreclr/vm/stackwalk.cpp @@ -3185,6 +3185,7 @@ void StackFrameIterator::PreProcessingForManagedFrames(void) m_pCachedGSCookie = (GSCookie*)m_crawl.GetCodeManager()->GetGSCookieAddr( m_crawl.pRD, &m_crawl.codeInfo, + m_codeManFlags, &m_crawl.codeManState); #endif // !DACCESS_COMPILE diff --git a/src/coreclr/vm/threadstatics.cpp b/src/coreclr/vm/threadstatics.cpp index 885453073508c5..889e9ea3cf4c63 100644 --- a/src/coreclr/vm/threadstatics.cpp +++ b/src/coreclr/vm/threadstatics.cpp @@ -377,7 +377,7 @@ void FreeLoaderAllocatorHandlesForTLSData(Thread *pThread) #endif for (const auto& entry : g_pThreadStaticCollectibleTypeIndices->CollectibleEntries()) { - _ASSERTE((entry.TlsIndex.GetIndexOffset() <= pThread->cLoaderHandles) || allRemainingIndicesAreNotValid); + _ASSERTE((entry.TlsIndex.GetIndexOffset() >= pThread->cLoaderHandles) || !allRemainingIndicesAreNotValid); if (entry.TlsIndex.GetIndexOffset() >= pThread->cLoaderHandles) { #ifndef _DEBUG @@ -390,7 +390,9 @@ void FreeLoaderAllocatorHandlesForTLSData(Thread *pThread) { if (pThread->pLoaderHandles[entry.TlsIndex.GetIndexOffset()] != (LOADERHANDLE)NULL) { - entry.pMT->GetLoaderAllocator()->FreeHandle(pThread->pLoaderHandles[entry.TlsIndex.GetIndexOffset()]); + LoaderAllocator *pLoaderAllocator = entry.pMT->GetLoaderAllocator(); + if (pLoaderAllocator->IsExposedObjectLive()) + pLoaderAllocator->FreeHandle(pThread->pLoaderHandles[entry.TlsIndex.GetIndexOffset()]); pThread->pLoaderHandles[entry.TlsIndex.GetIndexOffset()] = (LOADERHANDLE)NULL; } } diff --git a/src/coreclr/vm/threadsuspend.cpp b/src/coreclr/vm/threadsuspend.cpp index 71f59672eba1c7..2ddc2c3b120c99 100644 --- a/src/coreclr/vm/threadsuspend.cpp +++ b/src/coreclr/vm/threadsuspend.cpp @@ -5746,8 +5746,9 @@ BOOL CheckActivationSafePoint(SIZE_T ip) Thread *pThread = GetThreadNULLOk(); // The criteria for safe activation is to be running managed code. - // Also we are not interested in handling interruption if we are already in preemptive mode. - BOOL isActivationSafePoint = pThread != NULL && + // Also we are not interested in handling interruption if we are already in preemptive mode nor if we are single stepping + BOOL isActivationSafePoint = pThread != NULL && + (pThread->m_StateNC & Thread::TSNC_DebuggerIsStepping) == 0 && pThread->PreemptiveGCDisabled() && ExecutionManager::IsManagedCode(ip); @@ -5932,7 +5933,12 @@ bool Thread::InjectActivation(ActivationReason reason) { return true; } - + // Avoid APC calls when the thread is in single step state to avoid any + // wrong resume because it's running a native code. + if ((m_StateNC & Thread::TSNC_DebuggerIsStepping) != 0) + { + return false; + } #ifdef FEATURE_SPECIAL_USER_MODE_APC _ASSERTE(UseSpecialUserModeApc()); diff --git a/src/libraries/Common/src/Interop/Interop.Ldap.cs b/src/libraries/Common/src/Interop/Interop.Ldap.cs index 90c0ba997cd962..512242230093ff 100644 --- a/src/libraries/Common/src/Interop/Interop.Ldap.cs +++ b/src/libraries/Common/src/Interop/Interop.Ldap.cs @@ -157,6 +157,8 @@ internal enum LdapOption LDAP_OPT_ROOTDSE_CACHE = 0x9a, // Not Supported in Linux LDAP_OPT_DEBUG_LEVEL = 0x5001, LDAP_OPT_URI = 0x5006, // Not Supported in Windows + LDAP_OPT_X_TLS_CACERTDIR = 0x6003, // Not Supported in Windows + LDAP_OPT_X_TLS_NEWCTX = 0x600F, // Not Supported in Windows LDAP_OPT_X_SASL_REALM = 0x6101, LDAP_OPT_X_SASL_AUTHCID = 0x6102, LDAP_OPT_X_SASL_AUTHZID = 0x6103 diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeCertContextHandleWithKeyContainerDeletion.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeCertContextHandleWithKeyContainerDeletion.cs index 7488f624b90c47..59a84bc923097c 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeCertContextHandleWithKeyContainerDeletion.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeCertContextHandleWithKeyContainerDeletion.cs @@ -50,10 +50,16 @@ internal static void DeleteKeyContainer(SafeCertContextHandle pCertContext) string providerName = Marshal.PtrToStringUni((IntPtr)(pProvInfo->pwszProvName))!; string keyContainerName = Marshal.PtrToStringUni((IntPtr)(pProvInfo->pwszContainerName))!; + CngKeyOpenOptions openOpts = CngKeyOpenOptions.None; + + if ((pProvInfo->dwFlags & Interop.Crypt32.CryptAcquireContextFlags.CRYPT_MACHINE_KEYSET) != 0) + { + openOpts = CngKeyOpenOptions.MachineKey; + } try { - using (CngKey cngKey = CngKey.Open(keyContainerName, new CngProvider(providerName))) + using (CngKey cngKey = CngKey.Open(keyContainerName, new CngProvider(providerName), openOpts)) { cngKey.Delete(); } diff --git a/src/libraries/Common/tests/System/DirectoryServices/LDAP.Configuration.xml b/src/libraries/Common/tests/System/DirectoryServices/LDAP.Configuration.xml index 3523d7762232af..1a7f36e6f047bd 100644 --- a/src/libraries/Common/tests/System/DirectoryServices/LDAP.Configuration.xml +++ b/src/libraries/Common/tests/System/DirectoryServices/LDAP.Configuration.xml @@ -1,6 +1,6 @@ -To enable the tests marked with [ConditionalFact(nameof(IsLdapConfigurationExist))], you need to setup an LDAP server and provide the needed server info here. +To enable the tests marked with [ConditionalFact(nameof(IsLdapConfigurationExist))], you need to setup an LDAP server as described below and set the environment variable LDAP_TEST_SERVER_INDEX to the appropriate offset into the XML section found at the end of this file. To ship, we should test on both an Active Directory LDAP server, and at least one other server, as behaviors are a little different. However for local testing, it is easiest to connect to an OpenDJ LDAP server in a docker container (eg., in WSL2). @@ -11,7 +11,7 @@ OPENDJ SERVER test it with this command - it should return some results in WSL2 - ldapsearch -h localhost -p 1389 -D 'cn=admin,dc=example,dc=com' -x -w password + ldapsearch -H ldap://localhost:1389 -D 'cn=admin,dc=example,dc=com' -x -w password this command views the status @@ -24,16 +24,16 @@ SLAPD OPENLDAP SERVER and to test and view status - ldapsearch -h localhost -p 390 -D 'cn=admin,dc=example,dc=com' -x -w password + ldapsearch -H ldap://localhost:390 -D 'cn=admin,dc=example,dc=com' -x -w password docker exec -it slapd01 slapcat SLAPD OPENLDAP SERVER WITH TLS ============================== -The osixia/openldap container image automatically creates a TLS lisener with a self-signed certificate. This can be used to test TLS. +The osixia/openldap container image automatically creates a TLS listener with a self-signed certificate. This can be used to test TLS. -Start the container, with TLS on port 1636, without client certificate verification: +Start the container, with TLS on port 1636, but without client certificate verification: docker run --publish 1389:389 --publish 1636:636 --name ldap --hostname ldap.local --detach --rm --env LDAP_TLS_VERIFY_CLIENT=never --env LDAP_ADMIN_PASSWORD=password osixia/openldap --loglevel debug @@ -56,6 +56,8 @@ To test and view the status: ldapsearch -H ldaps://ldap.local:1636 -b dc=example,dc=org -x -D cn=admin,dc=example,dc=org -w password +use '-d 1' or '-d 2' for debugging. + ACTIVE DIRECTORY ================ @@ -65,7 +67,7 @@ When running against Active Directory from a Windows client, you should not see If you are running your AD server as a VM on the same machine that you are running WSL2, you must execute this command on the host to bridge the two Hyper-V networks so that it is visible from WSL2: - Get-NetIPInterface | where {$_.InterfaceAlias -eq 'vEthernet (WSL)' -or $_.InterfaceAlias -eq 'vEthernet (Default Switch)'} | Set-NetIPInterface -Forwarding Enabled + Get-NetIPInterface | where {$_.InterfaceAlias -eq 'vEthernet (WSL)' -or $_.InterfaceAlias -eq 'vEthernet (Default Switch)'} | Set-NetIPInterface -Forwarding Enabled The WSL2 VM should now be able to see the AD VM by IP address. To make it visible by host name, it's probably easiest to just add it to /etc/hosts. @@ -82,7 +84,7 @@ Note: @@ -105,15 +107,6 @@ Note: ServerBind,None False - - danmose-ldap.danmose-domain.com - DC=danmose-domain,DC=com - 389 - danmose-domain\Administrator - %TESTPASSWORD% - ServerBind,None - True - ldap.local DC=example,DC=org @@ -124,5 +117,14 @@ Note: true False + + danmose-ldap.danmose-domain.com + DC=danmose-domain,DC=com + 389 + danmose-domain\Administrator + %TESTPASSWORD% + ServerBind,None + True + diff --git a/src/libraries/Common/tests/System/Net/Configuration.Http.cs b/src/libraries/Common/tests/System/Net/Configuration.Http.cs index f568e54f261d22..f7e6fc759c0dd5 100644 --- a/src/libraries/Common/tests/System/Net/Configuration.Http.cs +++ b/src/libraries/Common/tests/System/Net/Configuration.Http.cs @@ -64,9 +64,16 @@ public static Uri[] GetEchoServerList() if (PlatformDetection.IsFirefox) { // https://github.com/dotnet/runtime/issues/101115 - return [RemoteEchoServer]; + // [ActiveIssue("https://github.com/dotnet/runtime/issues/110578)] + // return [RemoteEchoServer]; + return []; } - return [RemoteEchoServer, SecureRemoteEchoServer, Http2RemoteEchoServer]; + return [ + // [ActiveIssue("https://github.com/dotnet/runtime/issues/110578)] + // RemoteEchoServer, + SecureRemoteEchoServer, + Http2RemoteEchoServer + ]; } public static readonly Uri RemoteVerifyUploadServer = new Uri("http://" + Host + "/" + VerifyUploadHandler); @@ -82,8 +89,20 @@ public static Uri[] GetEchoServerList() public static Uri RemoteLoopServer => new Uri("ws://" + RemoteLoopHost + "/" + RemoteLoopHandler); public static readonly object[][] EchoServers = GetEchoServerList().Select(x => new object[] { x }).ToArray(); - public static readonly object[][] VerifyUploadServers = { new object[] { RemoteVerifyUploadServer }, new object[] { SecureRemoteVerifyUploadServer }, new object[] { Http2RemoteVerifyUploadServer } }; - public static readonly object[][] CompressedServers = { new object[] { RemoteDeflateServer }, new object[] { RemoteGZipServer }, new object[] { Http2RemoteDeflateServer }, new object[] { Http2RemoteGZipServer } }; + public static readonly object[][] VerifyUploadServers = { + // [ActiveIssue("https://github.com/dotnet/runtime/issues/110578)] + // new object[] { RemoteVerifyUploadServer }, + new object[] { SecureRemoteVerifyUploadServer }, + new object[] { Http2RemoteVerifyUploadServer } + }; + + public static readonly object[][] CompressedServers = { + // [ActiveIssue("https://github.com/dotnet/runtime/issues/110578)] + // new object[] { RemoteDeflateServer }, + new object[] { RemoteGZipServer }, + new object[] { Http2RemoteDeflateServer }, + new object[] { Http2RemoteGZipServer } + }; public static readonly object[][] Http2Servers = { new object[] { new Uri("https://" + Http2Host) } }; public static readonly object[][] Http2NoPushServers = { new object[] { new Uri("https://" + Http2NoPushHost) } }; @@ -97,9 +116,17 @@ public static IEnumerable GetRemoteServers() if (PlatformDetection.IsFirefox) { // https://github.com/dotnet/runtime/issues/101115 - return new RemoteServer[] { RemoteHttp11Server }; + // [ActiveIssue("https://github.com/dotnet/runtime/issues/110578)] + // return new RemoteServer[] { RemoteHttp11Server }; + return []; } - return new RemoteServer[] { RemoteHttp11Server, RemoteSecureHttp11Server, RemoteHttp2Server }; + return new RemoteServer[] + { + // [ActiveIssue("https://github.com/dotnet/runtime/issues/110578)] + // RemoteHttp11Server, + RemoteSecureHttp11Server, + RemoteHttp2Server + }; } public static readonly IEnumerable RemoteServersMemberData = GetRemoteServers().Select(s => new object[] { s }); diff --git a/src/libraries/Common/tests/System/Net/Configuration.WebSockets.cs b/src/libraries/Common/tests/System/Net/Configuration.WebSockets.cs index c5686be67b4ef9..d0f1eab545177e 100644 --- a/src/libraries/Common/tests/System/Net/Configuration.WebSockets.cs +++ b/src/libraries/Common/tests/System/Net/Configuration.WebSockets.cs @@ -28,11 +28,14 @@ public static object[][] GetEchoServers() { // https://github.com/dotnet/runtime/issues/101115 return new object[][] { - new object[] { RemoteEchoServer }, + // [ActiveIssue("https://github.com/dotnet/runtime/issues/110578)] + // new object[] { RemoteEchoServer }, + }; } return new object[][] { - new object[] { RemoteEchoServer }, + // [ActiveIssue("https://github.com/dotnet/runtime/issues/110578)] + // new object[] { RemoteEchoServer }, new object[] { SecureRemoteEchoServer }, }; } @@ -43,11 +46,13 @@ public static object[][] GetEchoHeadersServers() { // https://github.com/dotnet/runtime/issues/101115 return new object[][] { - new object[] { RemoteEchoHeadersServer }, + // [ActiveIssue("https://github.com/dotnet/runtime/issues/110578)] + // new object[] { RemoteEchoHeadersServer }, }; } return new object[][] { - new object[] { RemoteEchoHeadersServer }, + // [ActiveIssue("https://github.com/dotnet/runtime/issues/110578)] + // new object[] { RemoteEchoHeadersServer }, new object[] { SecureRemoteEchoHeadersServer }, }; } diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.RemoteServer.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.RemoteServer.cs index dd9db9bbe1f087..04cfc593343f85 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.RemoteServer.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.RemoteServer.cs @@ -70,7 +70,7 @@ public async Task UseDefaultCredentials_SetToFalseAndServerNeedsAuth_StatusCodeU handler.UseDefaultCredentials = false; using (HttpClient client = CreateHttpClient(handler)) { - Uri uri = Configuration.Http.RemoteHttp11Server.NegotiateAuthUriForDefaultCreds; + Uri uri = Configuration.Http.RemoteSecureHttp11Server.NegotiateAuthUriForDefaultCreds; _output.WriteLine("Uri: {0}", uri); using (HttpResponseMessage response = await client.GetAsync(uri)) { @@ -601,9 +601,9 @@ public async Task PostAsync_CallMethod_EmptyContent(Configuration.Http.RemoteSer public static IEnumerable ExpectContinueVersion() { return - from expect in new bool?[] {true, false, null} - from version in new Version[] {new Version(1, 0), new Version(1, 1), new Version(2, 0)} - select new object[] {expect, version}; + from expect in new bool?[] { true, false, null } + from version in new Version[] { new Version(1, 0), new Version(1, 1), new Version(2, 0) } + select new object[] { expect, version }; } [OuterLoop("Uses external servers", typeof(PlatformDetection), nameof(PlatformDetection.LocalEchoServerIsNotAvailable))] @@ -775,7 +775,8 @@ public async Task SendAsync_SendRequestUsingMethodToEchoServerWithNoContent_Meth { var request = new HttpRequestMessage( new HttpMethod(method), - serverUri) { Version = UseVersion }; + serverUri) + { Version = UseVersion }; using (HttpResponseMessage response = await client.SendAsync(TestAsync, request)) { @@ -801,7 +802,8 @@ public async Task SendAsync_SendRequestUsingMethodToEchoServerWithContent_Succes { var request = new HttpRequestMessage( new HttpMethod(method), - serverUri) { Version = UseVersion }; + serverUri) + { Version = UseVersion }; request.Content = new StringContent(ExpectedContent); using (HttpResponseMessage response = await client.SendAsync(TestAsync, request)) { @@ -980,6 +982,7 @@ public async Task GetAsync_AllowAutoRedirectTrue_RedirectFromHttpToHttp_StatusCo [OuterLoop("Uses external servers")] [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/55083", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/110578")] public async Task GetAsync_AllowAutoRedirectTrue_RedirectFromHttpToHttps_StatusCodeOK() { HttpClientHandler handler = CreateHttpClientHandler(); @@ -1064,9 +1067,9 @@ public async Task GetAsync_MaxAutomaticRedirectionsNServerHops_ThrowsIfTooMany(i handler.MaxAutomaticRedirections = maxHops; using (HttpClient client = CreateHttpClient(handler)) { - Task t = client.GetAsync(Configuration.Http.RemoteHttp11Server.RedirectUriForDestinationUri( + Task t = client.GetAsync(Configuration.Http.RemoteSecureHttp11Server.RedirectUriForDestinationUri( statusCode: 302, - destinationUri: Configuration.Http.RemoteHttp11Server.EchoUri, + destinationUri: Configuration.Http.RemoteSecureHttp11Server.EchoUri, hops: hops)); if (hops <= maxHops) @@ -1074,7 +1077,7 @@ public async Task GetAsync_MaxAutomaticRedirectionsNServerHops_ThrowsIfTooMany(i using (HttpResponseMessage response = await t) { Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Equal(Configuration.Http.RemoteEchoServer, response.RequestMessage.RequestUri); + Assert.Equal(Configuration.Http.SecureRemoteEchoServer, response.RequestMessage.RequestUri); } } else diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ServerCertificates.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ServerCertificates.cs index 4dc2eb3fcfdeaf..95ba0752a5daa4 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ServerCertificates.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ServerCertificates.cs @@ -97,6 +97,7 @@ public async Task NoCallback_ValidCertificate_SuccessAndExpectedPropertyBehavior [OuterLoop("Uses external servers")] [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/110578")] public async Task UseCallback_NotSecureConnection_CallbackNotCalled() { HttpClientHandler handler = CreateHttpClientHandler(); diff --git a/src/libraries/Common/tests/System/TimeProviderTests.cs b/src/libraries/Common/tests/System/TimeProviderTests.cs index 119a35610f1f51..e0840f09d1cdbb 100644 --- a/src/libraries/Common/tests/System/TimeProviderTests.cs +++ b/src/libraries/Common/tests/System/TimeProviderTests.cs @@ -143,7 +143,9 @@ public void TestProviderTimer(TimeProvider provider, int minMilliseconds) state.TokenSource.Token.WaitHandle.WaitOne(Timeout.InfiniteTimeSpan); state.TokenSource.Dispose(); - Assert.Equal(4, state.Counter); + // In normal conditions, the timer callback should be called 4 times. Sometimes the timer callback could be queued and fired after the timer was disposed. + Assert.True(state.Counter >= 4, $"The timer callback was expected to be called at least 4 times, but was called {state.Counter} times"); + Assert.Equal(400, state.Period); Assert.True(minMilliseconds <= state.Stopwatch.ElapsedMilliseconds, $"The total fired periods {state.Stopwatch.ElapsedMilliseconds}ms expected to be greater then the expected min {minMilliseconds}ms"); } diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Windows.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Windows.cs index 6a166b298cd517..1cd57d147a77ed 100644 --- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Windows.cs +++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Windows.cs @@ -26,6 +26,7 @@ public static partial class PlatformDetection public static bool IsWindows10OrLater => IsWindowsVersionOrLater(10, 0); public static bool IsWindowsServer2019 => IsWindows && IsNotWindowsNanoServer && GetWindowsVersion() == 10 && GetWindowsMinorVersion() == 0 && GetWindowsBuildVersion() == 17763; public static bool IsWindowsServer2022 => IsWindows && IsNotWindowsNanoServer && GetWindowsVersion() == 10 && GetWindowsMinorVersion() == 0 && GetWindowsBuildVersion() == 20348; + public static bool IsWindowsServer2025 => IsWindows && IsNotWindowsNanoServer && GetWindowsVersion() == 10 && GetWindowsMinorVersion() == 0 && GetWindowsBuildVersion() == 26100; public static bool IsWindowsNanoServer => IsWindows && (IsNotWindowsIoTCore && GetWindowsInstallationType().Equals("Nano Server", StringComparison.OrdinalIgnoreCase)); public static bool IsWindowsServerCore => IsWindows && GetWindowsInstallationType().Equals("Server Core", StringComparison.OrdinalIgnoreCase); public static int WindowsVersion => IsWindows ? (int)GetWindowsVersion() : -1; diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs index 67cde84c48389b..29118142d279fa 100644 --- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs +++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs @@ -168,8 +168,8 @@ private static bool GetLinqExpressionsBuiltWithIsInterpretingOnly() return !(bool)typeof(LambdaExpression).GetMethod("get_CanCompileToIL").Invoke(null, Array.Empty()); } - // Drawing is not supported on non windows platforms in .NET 7.0+. - public static bool IsDrawingSupported => IsWindows && IsNotWindowsNanoServer && IsNotWindowsServerCore; + // Drawing is not supported on non windows platforms in .NET 7.0+ and on Mono. + public static bool IsDrawingSupported => IsWindows && IsNotWindowsNanoServer && IsNotWindowsServerCore && IsNotMonoRuntime; public static bool IsAsyncFileIOSupported => !IsBrowser && !IsWasi; diff --git a/src/libraries/Directory.Build.props b/src/libraries/Directory.Build.props index 7ccc19377a2efb..77b995afb43bef 100644 --- a/src/libraries/Directory.Build.props +++ b/src/libraries/Directory.Build.props @@ -35,8 +35,6 @@ false false - - true diff --git a/src/libraries/Directory.Build.targets b/src/libraries/Directory.Build.targets index 5a3fff449e7bba..631ee908d4723e 100644 --- a/src/libraries/Directory.Build.targets +++ b/src/libraries/Directory.Build.targets @@ -72,12 +72,11 @@ + '$(IsPackable)' == 'true'"> <_IsWindowsDesktopApp Condition="$(WindowsDesktopCoreAppLibrary.Contains('$(AssemblyName);'))">true <_IsAspNetCoreApp Condition="$(AspNetCoreAppLibrary.Contains('$(AssemblyName);'))">true <_AssemblyInTargetingPack Condition="('$(IsNETCoreAppSrc)' == 'true' or '$(IsNetCoreAppRef)' == 'true' or '$(_IsAspNetCoreApp)' == 'true' or '$(_IsWindowsDesktopApp)' == 'true') and '$(TargetFrameworkIdentifier)' != '.NETFramework'">true - $(MajorVersion).$(MinorVersion).0.$(ServicingVersion) + $(MajorVersion).$(MinorVersion).0.$(PatchVersion) diff --git a/src/libraries/Microsoft.Bcl.Cryptography/src/System/Security/Cryptography/NetStandardShims.cs b/src/libraries/Microsoft.Bcl.Cryptography/src/System/Security/Cryptography/NetStandardShims.cs index 1e81d7a01b023c..d35c4738c5cb6e 100644 --- a/src/libraries/Microsoft.Bcl.Cryptography/src/System/Security/Cryptography/NetStandardShims.cs +++ b/src/libraries/Microsoft.Bcl.Cryptography/src/System/Security/Cryptography/NetStandardShims.cs @@ -100,25 +100,14 @@ internal static bool TryGetHashAndReset( Span destination, out int bytesWritten) { - int hashSize = hash.AlgorithmName.Name switch - { - nameof(HashAlgorithmName.MD5) => 128 >> 3, - nameof(HashAlgorithmName.SHA1) => 160 >> 3, - nameof(HashAlgorithmName.SHA256) => 256 >> 3, - nameof(HashAlgorithmName.SHA384) => 384 >> 3, - nameof(HashAlgorithmName.SHA512) => 512 >> 3, - _ => throw new CryptographicException(), - }; - - if (destination.Length < hashSize) + byte[] actual = hash.GetHashAndReset(); + + if (destination.Length < actual.Length) { bytesWritten = 0; return false; } - byte[] actual = hash.GetHashAndReset(); - Debug.Assert(actual.Length == hashSize); - actual.AsSpan().CopyTo(destination); bytesWritten = actual.Length; return true; diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/Microsoft.Extensions.Logging.Console.Tests.csproj b/src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/Microsoft.Extensions.Logging.Console.Tests.csproj index 2beeab918e6969..6c3acbcaeb4f43 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/Microsoft.Extensions.Logging.Console.Tests.csproj +++ b/src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/Microsoft.Extensions.Logging.Console.Tests.csproj @@ -10,6 +10,6 @@ - + diff --git a/src/libraries/Microsoft.NET.WebAssembly.Threading/src/CompatibilitySuppressions.xml b/src/libraries/Microsoft.NET.WebAssembly.Threading/src/CompatibilitySuppressions.xml deleted file mode 100644 index 8af156c8764265..00000000000000 --- a/src/libraries/Microsoft.NET.WebAssembly.Threading/src/CompatibilitySuppressions.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PKV006 - net8.0 - - \ No newline at end of file diff --git a/src/libraries/Microsoft.XmlSerializer.Generator/tests/Expected.SerializableAssembly.XmlSerializers.cs b/src/libraries/Microsoft.XmlSerializer.Generator/tests/Expected.SerializableAssembly.XmlSerializers.cs index 593096b7a7a35a..5a4382b34bb960 100644 --- a/src/libraries/Microsoft.XmlSerializer.Generator/tests/Expected.SerializableAssembly.XmlSerializers.cs +++ b/src/libraries/Microsoft.XmlSerializer.Generator/tests/Expected.SerializableAssembly.XmlSerializers.cs @@ -6,7 +6,7 @@ namespace Microsoft.Xml.Serialization.GeneratedAssembly { public class XmlSerializationWriter1 : System.Xml.Serialization.XmlSerializationWriter { - public void Write107_TypeWithXmlElementProperty(object o) { + public void Write111_TypeWithXmlElementProperty(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithXmlElementProperty", @""); @@ -16,7 +16,7 @@ public void Write107_TypeWithXmlElementProperty(object o) { Write2_TypeWithXmlElementProperty(@"TypeWithXmlElementProperty", @"", ((global::TypeWithXmlElementProperty)o), true, false); } - public void Write108_TypeWithXmlDocumentProperty(object o) { + public void Write112_TypeWithXmlDocumentProperty(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithXmlDocumentProperty", @""); @@ -26,7 +26,7 @@ public void Write108_TypeWithXmlDocumentProperty(object o) { Write3_TypeWithXmlDocumentProperty(@"TypeWithXmlDocumentProperty", @"", ((global::TypeWithXmlDocumentProperty)o), true, false); } - public void Write109_TypeWithBinaryProperty(object o) { + public void Write113_TypeWithBinaryProperty(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithBinaryProperty", @""); @@ -36,7 +36,7 @@ public void Write109_TypeWithBinaryProperty(object o) { Write4_TypeWithBinaryProperty(@"TypeWithBinaryProperty", @"", ((global::TypeWithBinaryProperty)o), true, false); } - public void Write110_Item(object o) { + public void Write114_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithDateTimeOffsetProperties", @""); @@ -46,7 +46,7 @@ public void Write110_Item(object o) { Write5_Item(@"TypeWithDateTimeOffsetProperties", @"", ((global::TypeWithDateTimeOffsetProperties)o), true, false); } - public void Write111_TypeWithTimeSpanProperty(object o) { + public void Write115_TypeWithTimeSpanProperty(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithTimeSpanProperty", @""); @@ -56,7 +56,7 @@ public void Write111_TypeWithTimeSpanProperty(object o) { Write6_TypeWithTimeSpanProperty(@"TypeWithTimeSpanProperty", @"", ((global::TypeWithTimeSpanProperty)o), true, false); } - public void Write112_Item(object o) { + public void Write116_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithDefaultTimeSpanProperty", @""); @@ -66,7 +66,7 @@ public void Write112_Item(object o) { Write7_Item(@"TypeWithDefaultTimeSpanProperty", @"", ((global::TypeWithDefaultTimeSpanProperty)o), true, false); } - public void Write113_TypeWithByteProperty(object o) { + public void Write117_TypeWithByteProperty(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithByteProperty", @""); @@ -76,7 +76,7 @@ public void Write113_TypeWithByteProperty(object o) { Write8_TypeWithByteProperty(@"TypeWithByteProperty", @"", ((global::TypeWithByteProperty)o), true, false); } - public void Write114_TypeWithXmlNodeArrayProperty(object o) { + public void Write118_TypeWithXmlNodeArrayProperty(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithXmlNodeArrayProperty", @""); @@ -86,7 +86,7 @@ public void Write114_TypeWithXmlNodeArrayProperty(object o) { Write9_TypeWithXmlNodeArrayProperty(@"TypeWithXmlNodeArrayProperty", @"", ((global::TypeWithXmlNodeArrayProperty)o), true, false); } - public void Write115_Animal(object o) { + public void Write119_Animal(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"Animal", @""); @@ -96,7 +96,7 @@ public void Write115_Animal(object o) { Write10_Animal(@"Animal", @"", ((global::Animal)o), true, false); } - public void Write116_Dog(object o) { + public void Write120_Dog(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"Dog", @""); @@ -106,7 +106,7 @@ public void Write116_Dog(object o) { Write12_Dog(@"Dog", @"", ((global::Dog)o), true, false); } - public void Write117_DogBreed(object o) { + public void Write121_DogBreed(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"DogBreed", @""); @@ -115,7 +115,7 @@ public void Write117_DogBreed(object o) { WriteElementString(@"DogBreed", @"", Write11_DogBreed(((global::DogBreed)o))); } - public void Write118_Group(object o) { + public void Write122_Group(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"Group", @""); @@ -125,7 +125,7 @@ public void Write118_Group(object o) { Write14_Group(@"Group", @"", ((global::Group)o), true, false); } - public void Write119_Vehicle(object o) { + public void Write123_Vehicle(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"Vehicle", @""); @@ -135,7 +135,7 @@ public void Write119_Vehicle(object o) { Write13_Vehicle(@"Vehicle", @"", ((global::Vehicle)o), true, false); } - public void Write120_Employee(object o) { + public void Write124_Employee(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"Employee", @""); @@ -145,7 +145,7 @@ public void Write120_Employee(object o) { Write15_Employee(@"Employee", @"", ((global::Employee)o), true, false); } - public void Write121_BaseClass(object o) { + public void Write125_BaseClass(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"BaseClass", @""); @@ -155,7 +155,7 @@ public void Write121_BaseClass(object o) { Write17_BaseClass(@"BaseClass", @"", ((global::BaseClass)o), true, false); } - public void Write122_DerivedClass(object o) { + public void Write126_DerivedClass(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"DerivedClass", @""); @@ -165,7 +165,7 @@ public void Write122_DerivedClass(object o) { Write16_DerivedClass(@"DerivedClass", @"", ((global::DerivedClass)o), true, false); } - public void Write123_PurchaseOrder(object o) { + public void Write127_PurchaseOrder(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"PurchaseOrder", @"http://www.contoso1.com"); @@ -175,7 +175,7 @@ public void Write123_PurchaseOrder(object o) { Write20_PurchaseOrder(@"PurchaseOrder", @"http://www.contoso1.com", ((global::PurchaseOrder)o), false, false); } - public void Write124_Address(object o) { + public void Write128_Address(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"Address", @""); @@ -185,7 +185,7 @@ public void Write124_Address(object o) { Write21_Address(@"Address", @"", ((global::Address)o), true, false); } - public void Write125_OrderedItem(object o) { + public void Write129_OrderedItem(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"OrderedItem", @""); @@ -195,7 +195,7 @@ public void Write125_OrderedItem(object o) { Write22_OrderedItem(@"OrderedItem", @"", ((global::OrderedItem)o), true, false); } - public void Write126_AliasedTestType(object o) { + public void Write130_AliasedTestType(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"AliasedTestType", @""); @@ -205,7 +205,7 @@ public void Write126_AliasedTestType(object o) { Write23_AliasedTestType(@"AliasedTestType", @"", ((global::AliasedTestType)o), true, false); } - public void Write127_BaseClass1(object o) { + public void Write131_BaseClass1(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"BaseClass1", @""); @@ -215,7 +215,7 @@ public void Write127_BaseClass1(object o) { Write24_BaseClass1(@"BaseClass1", @"", ((global::BaseClass1)o), true, false); } - public void Write128_DerivedClass1(object o) { + public void Write132_DerivedClass1(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"DerivedClass1", @""); @@ -225,7 +225,7 @@ public void Write128_DerivedClass1(object o) { Write25_DerivedClass1(@"DerivedClass1", @"", ((global::DerivedClass1)o), true, false); } - public void Write129_ArrayOfDateTime(object o) { + public void Write133_ArrayOfDateTime(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"ArrayOfDateTime", @""); @@ -250,7 +250,7 @@ public void Write129_ArrayOfDateTime(object o) { } } - public void Write130_Orchestra(object o) { + public void Write134_Orchestra(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"Orchestra", @""); @@ -260,7 +260,7 @@ public void Write130_Orchestra(object o) { Write27_Orchestra(@"Orchestra", @"", ((global::Orchestra)o), true, false); } - public void Write131_Instrument(object o) { + public void Write135_Instrument(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"Instrument", @""); @@ -270,7 +270,7 @@ public void Write131_Instrument(object o) { Write26_Instrument(@"Instrument", @"", ((global::Instrument)o), true, false); } - public void Write132_Brass(object o) { + public void Write136_Brass(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"Brass", @""); @@ -280,7 +280,7 @@ public void Write132_Brass(object o) { Write28_Brass(@"Brass", @"", ((global::Brass)o), true, false); } - public void Write133_Trumpet(object o) { + public void Write137_Trumpet(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"Trumpet", @""); @@ -290,7 +290,7 @@ public void Write133_Trumpet(object o) { Write29_Trumpet(@"Trumpet", @"", ((global::Trumpet)o), true, false); } - public void Write134_Pet(object o) { + public void Write138_Pet(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"Pet", @""); @@ -300,7 +300,7 @@ public void Write134_Pet(object o) { Write30_Pet(@"Pet", @"", ((global::Pet)o), true, false); } - public void Write135_DefaultValuesSetToNaN(object o) { + public void Write139_DefaultValuesSetToNaN(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"DefaultValuesSetToNaN", @""); @@ -310,7 +310,7 @@ public void Write135_DefaultValuesSetToNaN(object o) { Write31_DefaultValuesSetToNaN(@"DefaultValuesSetToNaN", @"", ((global::DefaultValuesSetToNaN)o), true, false); } - public void Write136_Item(object o) { + public void Write140_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"DefaultValuesSetToPositiveInfinity", @""); @@ -320,7 +320,7 @@ public void Write136_Item(object o) { Write32_Item(@"DefaultValuesSetToPositiveInfinity", @"", ((global::DefaultValuesSetToPositiveInfinity)o), true, false); } - public void Write137_Item(object o) { + public void Write141_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"DefaultValuesSetToNegativeInfinity", @""); @@ -330,7 +330,7 @@ public void Write137_Item(object o) { Write33_Item(@"DefaultValuesSetToNegativeInfinity", @"", ((global::DefaultValuesSetToNegativeInfinity)o), true, false); } - public void Write138_RootElement(object o) { + public void Write142_RootElement(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"RootElement", @""); @@ -340,7 +340,7 @@ public void Write138_RootElement(object o) { Write34_Item(@"RootElement", @"", ((global::TypeWithMismatchBetweenAttributeAndPropertyType)o), true, false); } - public void Write139_TypeWithLinkedProperty(object o) { + public void Write143_TypeWithLinkedProperty(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithLinkedProperty", @""); @@ -350,7 +350,7 @@ public void Write139_TypeWithLinkedProperty(object o) { Write35_TypeWithLinkedProperty(@"TypeWithLinkedProperty", @"", ((global::TypeWithLinkedProperty)o), true, false); } - public void Write140_Document(object o) { + public void Write144_Document(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"Document", @"http://example.com"); @@ -360,7 +360,7 @@ public void Write140_Document(object o) { Write36_MsgDocumentType(@"Document", @"http://example.com", ((global::MsgDocumentType)o), true, false); } - public void Write141_RootClass(object o) { + public void Write145_RootClass(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"RootClass", @""); @@ -370,7 +370,7 @@ public void Write141_RootClass(object o) { Write39_RootClass(@"RootClass", @"", ((global::RootClass)o), true, false); } - public void Write142_Parameter(object o) { + public void Write146_Parameter(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"Parameter", @""); @@ -380,7 +380,7 @@ public void Write142_Parameter(object o) { Write38_Parameter(@"Parameter", @"", ((global::Parameter)o), true, false); } - public void Write143_XElementWrapper(object o) { + public void Write147_XElementWrapper(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"XElementWrapper", @""); @@ -390,7 +390,7 @@ public void Write143_XElementWrapper(object o) { Write40_XElementWrapper(@"XElementWrapper", @"", ((global::XElementWrapper)o), true, false); } - public void Write144_XElementStruct(object o) { + public void Write148_XElementStruct(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"XElementStruct", @""); @@ -399,7 +399,7 @@ public void Write144_XElementStruct(object o) { Write41_XElementStruct(@"XElementStruct", @"", ((global::XElementStruct)o), false); } - public void Write145_XElementArrayWrapper(object o) { + public void Write149_XElementArrayWrapper(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"XElementArrayWrapper", @""); @@ -409,7 +409,7 @@ public void Write145_XElementArrayWrapper(object o) { Write42_XElementArrayWrapper(@"XElementArrayWrapper", @"", ((global::XElementArrayWrapper)o), true, false); } - public void Write146_TypeWithDateTimeStringProperty(object o) { + public void Write150_TypeWithDateTimeStringProperty(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithDateTimeStringProperty", @""); @@ -419,7 +419,7 @@ public void Write146_TypeWithDateTimeStringProperty(object o) { Write43_TypeWithDateTimeStringProperty(@"TypeWithDateTimeStringProperty", @"", ((global::SerializationTypes.TypeWithDateTimeStringProperty)o), true, false); } - public void Write147_SimpleType(object o) { + public void Write151_SimpleType(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"SimpleType", @""); @@ -429,7 +429,7 @@ public void Write147_SimpleType(object o) { Write44_SimpleType(@"SimpleType", @"", ((global::SerializationTypes.SimpleType)o), true, false); } - public void Write148_TypeWithGetSetArrayMembers(object o) { + public void Write152_TypeWithGetSetArrayMembers(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithGetSetArrayMembers", @""); @@ -439,7 +439,7 @@ public void Write148_TypeWithGetSetArrayMembers(object o) { Write45_TypeWithGetSetArrayMembers(@"TypeWithGetSetArrayMembers", @"", ((global::SerializationTypes.TypeWithGetSetArrayMembers)o), true, false); } - public void Write149_TypeWithGetOnlyArrayProperties(object o) { + public void Write153_TypeWithGetOnlyArrayProperties(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithGetOnlyArrayProperties", @""); @@ -449,36 +449,46 @@ public void Write149_TypeWithGetOnlyArrayProperties(object o) { Write46_TypeWithGetOnlyArrayProperties(@"TypeWithGetOnlyArrayProperties", @"", ((global::SerializationTypes.TypeWithGetOnlyArrayProperties)o), true, false); } - public void Write150_StructNotSerializable(object o) { + public void Write154_TypeWithArraylikeMembers(object o) { + WriteStartDocument(); + if (o == null) { + WriteNullTagLiteral(@"TypeWithArraylikeMembers", @""); + return; + } + TopLevelElement(); + Write47_TypeWithArraylikeMembers(@"TypeWithArraylikeMembers", @"", ((global::SerializationTypes.TypeWithArraylikeMembers)o), true, false); + } + + public void Write155_StructNotSerializable(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"StructNotSerializable", @""); return; } - Write47_StructNotSerializable(@"StructNotSerializable", @"", ((global::SerializationTypes.StructNotSerializable)o), false); + Write48_StructNotSerializable(@"StructNotSerializable", @"", ((global::SerializationTypes.StructNotSerializable)o), false); } - public void Write151_TypeWithMyCollectionField(object o) { + public void Write156_TypeWithMyCollectionField(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithMyCollectionField", @""); return; } TopLevelElement(); - Write48_TypeWithMyCollectionField(@"TypeWithMyCollectionField", @"", ((global::SerializationTypes.TypeWithMyCollectionField)o), true, false); + Write49_TypeWithMyCollectionField(@"TypeWithMyCollectionField", @"", ((global::SerializationTypes.TypeWithMyCollectionField)o), true, false); } - public void Write152_Item(object o) { + public void Write157_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithReadOnlyMyCollectionProperty", @""); return; } TopLevelElement(); - Write49_Item(@"TypeWithReadOnlyMyCollectionProperty", @"", ((global::SerializationTypes.TypeWithReadOnlyMyCollectionProperty)o), true, false); + Write50_Item(@"TypeWithReadOnlyMyCollectionProperty", @"", ((global::SerializationTypes.TypeWithReadOnlyMyCollectionProperty)o), true, false); } - public void Write153_ArrayOfAnyType(object o) { + public void Write158_ArrayOfAnyType(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"ArrayOfAnyType", @""); @@ -500,335 +510,335 @@ public void Write153_ArrayOfAnyType(object o) { } } - public void Write154_MyEnum(object o) { + public void Write159_MyEnum(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"MyEnum", @""); return; } - WriteElementString(@"MyEnum", @"", Write50_MyEnum(((global::SerializationTypes.MyEnum)o))); + WriteElementString(@"MyEnum", @"", Write51_MyEnum(((global::SerializationTypes.MyEnum)o))); } - public void Write155_TypeWithEnumMembers(object o) { + public void Write160_TypeWithEnumMembers(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithEnumMembers", @""); return; } TopLevelElement(); - Write51_TypeWithEnumMembers(@"TypeWithEnumMembers", @"", ((global::SerializationTypes.TypeWithEnumMembers)o), true, false); + Write52_TypeWithEnumMembers(@"TypeWithEnumMembers", @"", ((global::SerializationTypes.TypeWithEnumMembers)o), true, false); } - public void Write156_DCStruct(object o) { + public void Write161_DCStruct(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"DCStruct", @""); return; } - Write52_DCStruct(@"DCStruct", @"", ((global::SerializationTypes.DCStruct)o), false); + Write53_DCStruct(@"DCStruct", @"", ((global::SerializationTypes.DCStruct)o), false); } - public void Write157_DCClassWithEnumAndStruct(object o) { + public void Write162_DCClassWithEnumAndStruct(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"DCClassWithEnumAndStruct", @""); return; } TopLevelElement(); - Write53_DCClassWithEnumAndStruct(@"DCClassWithEnumAndStruct", @"", ((global::SerializationTypes.DCClassWithEnumAndStruct)o), true, false); + Write54_DCClassWithEnumAndStruct(@"DCClassWithEnumAndStruct", @"", ((global::SerializationTypes.DCClassWithEnumAndStruct)o), true, false); } - public void Write158_BuiltInTypes(object o) { + public void Write163_BuiltInTypes(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"BuiltInTypes", @""); return; } TopLevelElement(); - Write54_BuiltInTypes(@"BuiltInTypes", @"", ((global::SerializationTypes.BuiltInTypes)o), true, false); + Write55_BuiltInTypes(@"BuiltInTypes", @"", ((global::SerializationTypes.BuiltInTypes)o), true, false); } - public void Write159_TypeA(object o) { + public void Write164_TypeA(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeA", @""); return; } TopLevelElement(); - Write55_TypeA(@"TypeA", @"", ((global::SerializationTypes.TypeA)o), true, false); + Write56_TypeA(@"TypeA", @"", ((global::SerializationTypes.TypeA)o), true, false); } - public void Write160_TypeB(object o) { + public void Write165_TypeB(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeB", @""); return; } TopLevelElement(); - Write56_TypeB(@"TypeB", @"", ((global::SerializationTypes.TypeB)o), true, false); + Write57_TypeB(@"TypeB", @"", ((global::SerializationTypes.TypeB)o), true, false); } - public void Write161_TypeHasArrayOfASerializedAsB(object o) { + public void Write166_TypeHasArrayOfASerializedAsB(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeHasArrayOfASerializedAsB", @""); return; } TopLevelElement(); - Write57_TypeHasArrayOfASerializedAsB(@"TypeHasArrayOfASerializedAsB", @"", ((global::SerializationTypes.TypeHasArrayOfASerializedAsB)o), true, false); + Write58_TypeHasArrayOfASerializedAsB(@"TypeHasArrayOfASerializedAsB", @"", ((global::SerializationTypes.TypeHasArrayOfASerializedAsB)o), true, false); } - public void Write162_Item(object o) { + public void Write167_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"__TypeNameWithSpecialCharacters漢ñ", @""); return; } TopLevelElement(); - Write58_Item(@"__TypeNameWithSpecialCharacters漢ñ", @"", ((global::SerializationTypes.@__TypeNameWithSpecialCharacters漢ñ)o), true, false); + Write59_Item(@"__TypeNameWithSpecialCharacters漢ñ", @"", ((global::SerializationTypes.@__TypeNameWithSpecialCharacters漢ñ)o), true, false); } - public void Write163_BaseClassWithSamePropertyName(object o) { + public void Write168_BaseClassWithSamePropertyName(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"BaseClassWithSamePropertyName", @""); return; } TopLevelElement(); - Write59_BaseClassWithSamePropertyName(@"BaseClassWithSamePropertyName", @"", ((global::SerializationTypes.BaseClassWithSamePropertyName)o), true, false); + Write60_BaseClassWithSamePropertyName(@"BaseClassWithSamePropertyName", @"", ((global::SerializationTypes.BaseClassWithSamePropertyName)o), true, false); } - public void Write164_DerivedClassWithSameProperty(object o) { + public void Write169_DerivedClassWithSameProperty(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"DerivedClassWithSameProperty", @""); return; } TopLevelElement(); - Write60_DerivedClassWithSameProperty(@"DerivedClassWithSameProperty", @"", ((global::SerializationTypes.DerivedClassWithSameProperty)o), true, false); + Write61_DerivedClassWithSameProperty(@"DerivedClassWithSameProperty", @"", ((global::SerializationTypes.DerivedClassWithSameProperty)o), true, false); } - public void Write165_DerivedClassWithSameProperty2(object o) { + public void Write170_DerivedClassWithSameProperty2(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"DerivedClassWithSameProperty2", @""); return; } TopLevelElement(); - Write61_DerivedClassWithSameProperty2(@"DerivedClassWithSameProperty2", @"", ((global::SerializationTypes.DerivedClassWithSameProperty2)o), true, false); + Write62_DerivedClassWithSameProperty2(@"DerivedClassWithSameProperty2", @"", ((global::SerializationTypes.DerivedClassWithSameProperty2)o), true, false); } - public void Write166_Item(object o) { + public void Write171_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithDateTimePropertyAsXmlTime", @""); return; } TopLevelElement(); - Write62_Item(@"TypeWithDateTimePropertyAsXmlTime", @"", ((global::SerializationTypes.TypeWithDateTimePropertyAsXmlTime)o), true, false); + Write63_Item(@"TypeWithDateTimePropertyAsXmlTime", @"", ((global::SerializationTypes.TypeWithDateTimePropertyAsXmlTime)o), true, false); } - public void Write167_TypeWithByteArrayAsXmlText(object o) { + public void Write172_TypeWithByteArrayAsXmlText(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithByteArrayAsXmlText", @""); return; } TopLevelElement(); - Write63_TypeWithByteArrayAsXmlText(@"TypeWithByteArrayAsXmlText", @"", ((global::SerializationTypes.TypeWithByteArrayAsXmlText)o), true, false); + Write64_TypeWithByteArrayAsXmlText(@"TypeWithByteArrayAsXmlText", @"", ((global::SerializationTypes.TypeWithByteArrayAsXmlText)o), true, false); } - public void Write168_SimpleDC(object o) { + public void Write173_SimpleDC(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"SimpleDC", @""); return; } TopLevelElement(); - Write64_SimpleDC(@"SimpleDC", @"", ((global::SerializationTypes.SimpleDC)o), true, false); + Write65_SimpleDC(@"SimpleDC", @"", ((global::SerializationTypes.SimpleDC)o), true, false); } - public void Write169_Item(object o) { + public void Write174_Item(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"TypeWithXmlTextAttributeOnArray", @"http://schemas.xmlsoap.org/ws/2005/04/discovery"); return; } TopLevelElement(); - Write65_Item(@"TypeWithXmlTextAttributeOnArray", @"http://schemas.xmlsoap.org/ws/2005/04/discovery", ((global::SerializationTypes.TypeWithXmlTextAttributeOnArray)o), false, false); + Write66_Item(@"TypeWithXmlTextAttributeOnArray", @"http://schemas.xmlsoap.org/ws/2005/04/discovery", ((global::SerializationTypes.TypeWithXmlTextAttributeOnArray)o), false, false); } - public void Write170_EnumFlags(object o) { + public void Write175_EnumFlags(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"EnumFlags", @""); return; } - WriteElementString(@"EnumFlags", @"", Write66_EnumFlags(((global::SerializationTypes.EnumFlags)o))); + WriteElementString(@"EnumFlags", @"", Write67_EnumFlags(((global::SerializationTypes.EnumFlags)o))); } - public void Write171_ClassImplementsInterface(object o) { + public void Write176_ClassImplementsInterface(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"ClassImplementsInterface", @""); return; } TopLevelElement(); - Write67_ClassImplementsInterface(@"ClassImplementsInterface", @"", ((global::SerializationTypes.ClassImplementsInterface)o), true, false); + Write68_ClassImplementsInterface(@"ClassImplementsInterface", @"", ((global::SerializationTypes.ClassImplementsInterface)o), true, false); } - public void Write172_WithStruct(object o) { + public void Write177_WithStruct(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"WithStruct", @""); return; } TopLevelElement(); - Write69_WithStruct(@"WithStruct", @"", ((global::SerializationTypes.WithStruct)o), true, false); + Write70_WithStruct(@"WithStruct", @"", ((global::SerializationTypes.WithStruct)o), true, false); } - public void Write173_SomeStruct(object o) { + public void Write178_SomeStruct(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"SomeStruct", @""); return; } - Write68_SomeStruct(@"SomeStruct", @"", ((global::SerializationTypes.SomeStruct)o), false); + Write69_SomeStruct(@"SomeStruct", @"", ((global::SerializationTypes.SomeStruct)o), false); } - public void Write174_WithEnums(object o) { + public void Write179_WithEnums(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"WithEnums", @""); return; } TopLevelElement(); - Write72_WithEnums(@"WithEnums", @"", ((global::SerializationTypes.WithEnums)o), true, false); + Write73_WithEnums(@"WithEnums", @"", ((global::SerializationTypes.WithEnums)o), true, false); } - public void Write175_WithNullables(object o) { + public void Write180_WithNullables(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"WithNullables", @""); return; } TopLevelElement(); - Write73_WithNullables(@"WithNullables", @"", ((global::SerializationTypes.WithNullables)o), true, false); + Write74_WithNullables(@"WithNullables", @"", ((global::SerializationTypes.WithNullables)o), true, false); } - public void Write176_ByteEnum(object o) { + public void Write181_ByteEnum(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"ByteEnum", @""); return; } - WriteElementString(@"ByteEnum", @"", Write74_ByteEnum(((global::SerializationTypes.ByteEnum)o))); + WriteElementString(@"ByteEnum", @"", Write75_ByteEnum(((global::SerializationTypes.ByteEnum)o))); } - public void Write177_SByteEnum(object o) { + public void Write182_SByteEnum(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"SByteEnum", @""); return; } - WriteElementString(@"SByteEnum", @"", Write75_SByteEnum(((global::SerializationTypes.SByteEnum)o))); + WriteElementString(@"SByteEnum", @"", Write76_SByteEnum(((global::SerializationTypes.SByteEnum)o))); } - public void Write178_ShortEnum(object o) { + public void Write183_ShortEnum(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"ShortEnum", @""); return; } - WriteElementString(@"ShortEnum", @"", Write71_ShortEnum(((global::SerializationTypes.ShortEnum)o))); + WriteElementString(@"ShortEnum", @"", Write72_ShortEnum(((global::SerializationTypes.ShortEnum)o))); } - public void Write179_IntEnum(object o) { + public void Write184_IntEnum(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"IntEnum", @""); return; } - WriteElementString(@"IntEnum", @"", Write70_IntEnum(((global::SerializationTypes.IntEnum)o))); + WriteElementString(@"IntEnum", @"", Write71_IntEnum(((global::SerializationTypes.IntEnum)o))); } - public void Write180_UIntEnum(object o) { + public void Write185_UIntEnum(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"UIntEnum", @""); return; } - WriteElementString(@"UIntEnum", @"", Write76_UIntEnum(((global::SerializationTypes.UIntEnum)o))); + WriteElementString(@"UIntEnum", @"", Write77_UIntEnum(((global::SerializationTypes.UIntEnum)o))); } - public void Write181_LongEnum(object o) { + public void Write186_LongEnum(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"LongEnum", @""); return; } - WriteElementString(@"LongEnum", @"", Write77_LongEnum(((global::SerializationTypes.LongEnum)o))); + WriteElementString(@"LongEnum", @"", Write78_LongEnum(((global::SerializationTypes.LongEnum)o))); } - public void Write182_ULongEnum(object o) { + public void Write187_ULongEnum(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"ULongEnum", @""); return; } - WriteElementString(@"ULongEnum", @"", Write78_ULongEnum(((global::SerializationTypes.ULongEnum)o))); + WriteElementString(@"ULongEnum", @"", Write79_ULongEnum(((global::SerializationTypes.ULongEnum)o))); } - public void Write183_AttributeTesting(object o) { + public void Write188_AttributeTesting(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"AttributeTesting", @""); return; } TopLevelElement(); - Write80_XmlSerializerAttributes(@"AttributeTesting", @"", ((global::SerializationTypes.XmlSerializerAttributes)o), false, false); + Write81_XmlSerializerAttributes(@"AttributeTesting", @"", ((global::SerializationTypes.XmlSerializerAttributes)o), false, false); } - public void Write184_ItemChoiceType(object o) { + public void Write189_ItemChoiceType(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"ItemChoiceType", @""); return; } - WriteElementString(@"ItemChoiceType", @"", Write79_ItemChoiceType(((global::SerializationTypes.ItemChoiceType)o))); + WriteElementString(@"ItemChoiceType", @"", Write80_ItemChoiceType(((global::SerializationTypes.ItemChoiceType)o))); } - public void Write185_TypeWithAnyAttribute(object o) { + public void Write190_TypeWithAnyAttribute(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithAnyAttribute", @""); return; } TopLevelElement(); - Write81_TypeWithAnyAttribute(@"TypeWithAnyAttribute", @"", ((global::SerializationTypes.TypeWithAnyAttribute)o), true, false); + Write82_TypeWithAnyAttribute(@"TypeWithAnyAttribute", @"", ((global::SerializationTypes.TypeWithAnyAttribute)o), true, false); } - public void Write186_KnownTypesThroughConstructor(object o) { + public void Write191_KnownTypesThroughConstructor(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"KnownTypesThroughConstructor", @""); return; } TopLevelElement(); - Write82_KnownTypesThroughConstructor(@"KnownTypesThroughConstructor", @"", ((global::SerializationTypes.KnownTypesThroughConstructor)o), true, false); + Write83_KnownTypesThroughConstructor(@"KnownTypesThroughConstructor", @"", ((global::SerializationTypes.KnownTypesThroughConstructor)o), true, false); } - public void Write187_SimpleKnownTypeValue(object o) { + public void Write192_SimpleKnownTypeValue(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"SimpleKnownTypeValue", @""); return; } TopLevelElement(); - Write83_SimpleKnownTypeValue(@"SimpleKnownTypeValue", @"", ((global::SerializationTypes.SimpleKnownTypeValue)o), true, false); + Write84_SimpleKnownTypeValue(@"SimpleKnownTypeValue", @"", ((global::SerializationTypes.SimpleKnownTypeValue)o), true, false); } - public void Write188_Item(object o) { + public void Write193_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"ClassImplementingIXmlSerialiable", @""); @@ -838,236 +848,266 @@ public void Write188_Item(object o) { WriteSerializable((System.Xml.Serialization.IXmlSerializable)((global::SerializationTypes.ClassImplementingIXmlSerialiable)o), @"ClassImplementingIXmlSerialiable", @"", true, true); } - public void Write189_TypeWithPropertyNameSpecified(object o) { + public void Write194_TypeWithPropertyNameSpecified(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithPropertyNameSpecified", @""); return; } TopLevelElement(); - Write84_TypeWithPropertyNameSpecified(@"TypeWithPropertyNameSpecified", @"", ((global::SerializationTypes.TypeWithPropertyNameSpecified)o), true, false); + Write85_TypeWithPropertyNameSpecified(@"TypeWithPropertyNameSpecified", @"", ((global::SerializationTypes.TypeWithPropertyNameSpecified)o), true, false); } - public void Write190_TypeWithXmlSchemaFormAttribute(object o) { + public void Write195_TypeWithXmlSchemaFormAttribute(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithXmlSchemaFormAttribute", @""); return; } TopLevelElement(); - Write85_TypeWithXmlSchemaFormAttribute(@"TypeWithXmlSchemaFormAttribute", @"", ((global::SerializationTypes.TypeWithXmlSchemaFormAttribute)o), true, false); + Write86_TypeWithXmlSchemaFormAttribute(@"TypeWithXmlSchemaFormAttribute", @"", ((global::SerializationTypes.TypeWithXmlSchemaFormAttribute)o), true, false); } - public void Write191_MyXmlType(object o) { + public void Write196_MyXmlType(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"MyXmlType", @""); return; } TopLevelElement(); - Write86_Item(@"MyXmlType", @"", ((global::SerializationTypes.TypeWithTypeNameInXmlTypeAttribute)o), true, false); + Write87_Item(@"MyXmlType", @"", ((global::SerializationTypes.TypeWithTypeNameInXmlTypeAttribute)o), true, false); } - public void Write192_Item(object o) { + public void Write197_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithSchemaFormInXmlAttribute", @""); return; } TopLevelElement(); - Write87_Item(@"TypeWithSchemaFormInXmlAttribute", @"", ((global::SerializationTypes.TypeWithSchemaFormInXmlAttribute)o), true, false); + Write88_Item(@"TypeWithSchemaFormInXmlAttribute", @"", ((global::SerializationTypes.TypeWithSchemaFormInXmlAttribute)o), true, false); } - public void Write193_Item(object o) { + public void Write198_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithNonPublicDefaultConstructor", @""); return; } TopLevelElement(); - Write88_Item(@"TypeWithNonPublicDefaultConstructor", @"", ((global::SerializationTypes.TypeWithNonPublicDefaultConstructor)o), true, false); + Write89_Item(@"TypeWithNonPublicDefaultConstructor", @"", ((global::SerializationTypes.TypeWithNonPublicDefaultConstructor)o), true, false); } - public void Write194_ServerSettings(object o) { + public void Write199_ServerSettings(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"ServerSettings", @""); return; } TopLevelElement(); - Write89_ServerSettings(@"ServerSettings", @"", ((global::SerializationTypes.ServerSettings)o), true, false); + Write90_ServerSettings(@"ServerSettings", @"", ((global::SerializationTypes.ServerSettings)o), true, false); } - public void Write195_TypeWithXmlQualifiedName(object o) { + public void Write200_TypeWithXmlQualifiedName(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithXmlQualifiedName", @""); return; } TopLevelElement(); - Write90_TypeWithXmlQualifiedName(@"TypeWithXmlQualifiedName", @"", ((global::SerializationTypes.TypeWithXmlQualifiedName)o), true, false); + Write91_TypeWithXmlQualifiedName(@"TypeWithXmlQualifiedName", @"", ((global::SerializationTypes.TypeWithXmlQualifiedName)o), true, false); } - public void Write196_TypeWith2DArrayProperty2(object o) { + public void Write201_TypeWith2DArrayProperty2(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWith2DArrayProperty2", @""); return; } TopLevelElement(); - Write91_TypeWith2DArrayProperty2(@"TypeWith2DArrayProperty2", @"", ((global::SerializationTypes.TypeWith2DArrayProperty2)o), true, false); + Write92_TypeWith2DArrayProperty2(@"TypeWith2DArrayProperty2", @"", ((global::SerializationTypes.TypeWith2DArrayProperty2)o), true, false); } - public void Write197_Item(object o) { + public void Write202_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithPropertiesHavingDefaultValue", @""); return; } TopLevelElement(); - Write92_Item(@"TypeWithPropertiesHavingDefaultValue", @"", ((global::SerializationTypes.TypeWithPropertiesHavingDefaultValue)o), true, false); + Write93_Item(@"TypeWithPropertiesHavingDefaultValue", @"", ((global::SerializationTypes.TypeWithPropertiesHavingDefaultValue)o), true, false); } - public void Write198_Item(object o) { + public void Write203_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithEnumPropertyHavingDefaultValue", @""); return; } TopLevelElement(); - Write93_Item(@"TypeWithEnumPropertyHavingDefaultValue", @"", ((global::SerializationTypes.TypeWithEnumPropertyHavingDefaultValue)o), true, false); + Write94_Item(@"TypeWithEnumPropertyHavingDefaultValue", @"", ((global::SerializationTypes.TypeWithEnumPropertyHavingDefaultValue)o), true, false); } - public void Write199_Item(object o) { + public void Write204_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithEnumFlagPropertyHavingDefaultValue", @""); return; } TopLevelElement(); - Write94_Item(@"TypeWithEnumFlagPropertyHavingDefaultValue", @"", ((global::SerializationTypes.TypeWithEnumFlagPropertyHavingDefaultValue)o), true, false); + Write95_Item(@"TypeWithEnumFlagPropertyHavingDefaultValue", @"", ((global::SerializationTypes.TypeWithEnumFlagPropertyHavingDefaultValue)o), true, false); } - public void Write200_TypeWithShouldSerializeMethod(object o) { + public void Write205_TypeWithShouldSerializeMethod(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithShouldSerializeMethod", @""); return; } TopLevelElement(); - Write95_TypeWithShouldSerializeMethod(@"TypeWithShouldSerializeMethod", @"", ((global::SerializationTypes.TypeWithShouldSerializeMethod)o), true, false); + Write96_TypeWithShouldSerializeMethod(@"TypeWithShouldSerializeMethod", @"", ((global::SerializationTypes.TypeWithShouldSerializeMethod)o), true, false); } - public void Write201_Item(object o) { + public void Write206_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"KnownTypesThroughConstructorWithArrayProperties", @""); return; } TopLevelElement(); - Write96_Item(@"KnownTypesThroughConstructorWithArrayProperties", @"", ((global::SerializationTypes.KnownTypesThroughConstructorWithArrayProperties)o), true, false); + Write97_Item(@"KnownTypesThroughConstructorWithArrayProperties", @"", ((global::SerializationTypes.KnownTypesThroughConstructorWithArrayProperties)o), true, false); } - public void Write202_Item(object o) { + public void Write207_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"KnownTypesThroughConstructorWithValue", @""); return; } TopLevelElement(); - Write97_Item(@"KnownTypesThroughConstructorWithValue", @"", ((global::SerializationTypes.KnownTypesThroughConstructorWithValue)o), true, false); + Write98_Item(@"KnownTypesThroughConstructorWithValue", @"", ((global::SerializationTypes.KnownTypesThroughConstructorWithValue)o), true, false); } - public void Write203_Item(object o) { + public void Write208_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithTypesHavingCustomFormatter", @""); return; } TopLevelElement(); - Write98_Item(@"TypeWithTypesHavingCustomFormatter", @"", ((global::SerializationTypes.TypeWithTypesHavingCustomFormatter)o), true, false); + Write99_Item(@"TypeWithTypesHavingCustomFormatter", @"", ((global::SerializationTypes.TypeWithTypesHavingCustomFormatter)o), true, false); } - public void Write204_Item(object o) { + public void Write209_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithArrayPropertyHavingChoice", @""); return; } TopLevelElement(); - Write100_Item(@"TypeWithArrayPropertyHavingChoice", @"", ((global::SerializationTypes.TypeWithArrayPropertyHavingChoice)o), true, false); + Write101_Item(@"TypeWithArrayPropertyHavingChoice", @"", ((global::SerializationTypes.TypeWithArrayPropertyHavingChoice)o), true, false); + } + + public void Write210_Item(object o) { + WriteStartDocument(); + if (o == null) { + WriteNullTagLiteral(@"TypeWithPropertyHavingComplexChoice", @""); + return; + } + TopLevelElement(); + Write104_Item(@"TypeWithPropertyHavingComplexChoice", @"", ((global::SerializationTypes.TypeWithPropertyHavingComplexChoice)o), true, false); } - public void Write205_MoreChoices(object o) { + public void Write211_MoreChoices(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"MoreChoices", @""); return; } - WriteElementString(@"MoreChoices", @"", Write99_MoreChoices(((global::SerializationTypes.MoreChoices)o))); + WriteElementString(@"MoreChoices", @"", Write100_MoreChoices(((global::SerializationTypes.MoreChoices)o))); + } + + public void Write212_ComplexChoiceA(object o) { + WriteStartDocument(); + if (o == null) { + WriteNullTagLiteral(@"ComplexChoiceA", @""); + return; + } + TopLevelElement(); + Write103_ComplexChoiceA(@"ComplexChoiceA", @"", ((global::SerializationTypes.ComplexChoiceA)o), true, false); + } + + public void Write213_ComplexChoiceB(object o) { + WriteStartDocument(); + if (o == null) { + WriteNullTagLiteral(@"ComplexChoiceB", @""); + return; + } + TopLevelElement(); + Write102_ComplexChoiceB(@"ComplexChoiceB", @"", ((global::SerializationTypes.ComplexChoiceB)o), true, false); } - public void Write206_TypeWithFieldsOrdered(object o) { + public void Write214_TypeWithFieldsOrdered(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithFieldsOrdered", @""); return; } TopLevelElement(); - Write101_TypeWithFieldsOrdered(@"TypeWithFieldsOrdered", @"", ((global::SerializationTypes.TypeWithFieldsOrdered)o), true, false); + Write105_TypeWithFieldsOrdered(@"TypeWithFieldsOrdered", @"", ((global::SerializationTypes.TypeWithFieldsOrdered)o), true, false); } - public void Write207_Item(object o) { + public void Write215_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithKnownTypesOfCollectionsWithConflictingXmlName", @""); return; } TopLevelElement(); - Write102_Item(@"TypeWithKnownTypesOfCollectionsWithConflictingXmlName", @"", ((global::SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName)o), true, false); + Write106_Item(@"TypeWithKnownTypesOfCollectionsWithConflictingXmlName", @"", ((global::SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName)o), true, false); } - public void Write208_Root(object o) { + public void Write216_Root(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"Root", @""); return; } TopLevelElement(); - Write105_Item(@"Root", @"", ((global::SerializationTypes.NamespaceTypeNameClashContainer)o), true, false); + Write109_Item(@"Root", @"", ((global::SerializationTypes.NamespaceTypeNameClashContainer)o), true, false); } - public void Write209_TypeClashB(object o) { + public void Write217_TypeClashB(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeClashB", @""); return; } TopLevelElement(); - Write104_TypeNameClash(@"TypeClashB", @"", ((global::SerializationTypes.TypeNameClashB.TypeNameClash)o), true, false); + Write108_TypeNameClash(@"TypeClashB", @"", ((global::SerializationTypes.TypeNameClashB.TypeNameClash)o), true, false); } - public void Write210_TypeClashA(object o) { + public void Write218_TypeClashA(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeClashA", @""); return; } TopLevelElement(); - Write103_TypeNameClash(@"TypeClashA", @"", ((global::SerializationTypes.TypeNameClashA.TypeNameClash)o), true, false); + Write107_TypeNameClash(@"TypeClashA", @"", ((global::SerializationTypes.TypeNameClashA.TypeNameClash)o), true, false); } - public void Write211_Person(object o) { + public void Write219_Person(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"Person", @""); return; } TopLevelElement(); - Write106_Person(@"Person", @"", ((global::Outer.Person)o), true, false); + Write110_Person(@"Person", @"", ((global::Outer.Person)o), true, false); } - void Write106_Person(string n, string ns, global::Outer.Person o, bool isNullable, bool needType) { + void Write110_Person(string n, string ns, global::Outer.Person o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -1088,7 +1128,7 @@ void Write106_Person(string n, string ns, global::Outer.Person o, bool isNullabl WriteEndElement(o); } - void Write103_TypeNameClash(string n, string ns, global::SerializationTypes.TypeNameClashA.TypeNameClash o, bool isNullable, bool needType) { + void Write107_TypeNameClash(string n, string ns, global::SerializationTypes.TypeNameClashA.TypeNameClash o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -1107,7 +1147,7 @@ void Write103_TypeNameClash(string n, string ns, global::SerializationTypes.Type WriteEndElement(o); } - void Write104_TypeNameClash(string n, string ns, global::SerializationTypes.TypeNameClashB.TypeNameClash o, bool isNullable, bool needType) { + void Write108_TypeNameClash(string n, string ns, global::SerializationTypes.TypeNameClashB.TypeNameClash o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -1126,7 +1166,7 @@ void Write104_TypeNameClash(string n, string ns, global::SerializationTypes.Type WriteEndElement(o); } - void Write105_Item(string n, string ns, global::SerializationTypes.NamespaceTypeNameClashContainer o, bool isNullable, bool needType) { + void Write109_Item(string n, string ns, global::SerializationTypes.NamespaceTypeNameClashContainer o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -1145,7 +1185,7 @@ void Write105_Item(string n, string ns, global::SerializationTypes.NamespaceType global::SerializationTypes.TypeNameClashA.TypeNameClash[] a = (global::SerializationTypes.TypeNameClashA.TypeNameClash[])o.@A; if (a != null) { for (int ia = 0; ia < a.Length; ia++) { - Write103_TypeNameClash(@"A", @"", ((global::SerializationTypes.TypeNameClashA.TypeNameClash)a[ia]), false, false); + Write107_TypeNameClash(@"A", @"", ((global::SerializationTypes.TypeNameClashA.TypeNameClash)a[ia]), false, false); } } } @@ -1153,14 +1193,14 @@ void Write105_Item(string n, string ns, global::SerializationTypes.NamespaceType global::SerializationTypes.TypeNameClashB.TypeNameClash[] a = (global::SerializationTypes.TypeNameClashB.TypeNameClash[])o.@B; if (a != null) { for (int ia = 0; ia < a.Length; ia++) { - Write104_TypeNameClash(@"B", @"", ((global::SerializationTypes.TypeNameClashB.TypeNameClash)a[ia]), false, false); + Write108_TypeNameClash(@"B", @"", ((global::SerializationTypes.TypeNameClashB.TypeNameClash)a[ia]), false, false); } } } WriteEndElement(o); } - void Write102_Item(string n, string ns, global::SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName o, bool isNullable, bool needType) { + void Write106_Item(string n, string ns, global::SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -1191,195 +1231,211 @@ void Write1_Object(string n, string ns, global::System.Object o, bool isNullable } else { if (t == typeof(global::Outer.Person)) { - Write106_Person(n, ns,(global::Outer.Person)o, isNullable, true); + Write110_Person(n, ns,(global::Outer.Person)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.NamespaceTypeNameClashContainer)) { - Write105_Item(n, ns,(global::SerializationTypes.NamespaceTypeNameClashContainer)o, isNullable, true); + Write109_Item(n, ns,(global::SerializationTypes.NamespaceTypeNameClashContainer)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeNameClashB.TypeNameClash)) { - Write104_TypeNameClash(n, ns,(global::SerializationTypes.TypeNameClashB.TypeNameClash)o, isNullable, true); + Write108_TypeNameClash(n, ns,(global::SerializationTypes.TypeNameClashB.TypeNameClash)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeNameClashA.TypeNameClash)) { - Write103_TypeNameClash(n, ns,(global::SerializationTypes.TypeNameClashA.TypeNameClash)o, isNullable, true); + Write107_TypeNameClash(n, ns,(global::SerializationTypes.TypeNameClashA.TypeNameClash)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName)) { - Write102_Item(n, ns,(global::SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName)o, isNullable, true); + Write106_Item(n, ns,(global::SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithFieldsOrdered)) { - Write101_TypeWithFieldsOrdered(n, ns,(global::SerializationTypes.TypeWithFieldsOrdered)o, isNullable, true); + Write105_TypeWithFieldsOrdered(n, ns,(global::SerializationTypes.TypeWithFieldsOrdered)o, isNullable, true); + return; + } + if (t == typeof(global::SerializationTypes.TypeWithPropertyHavingComplexChoice)) { + Write104_Item(n, ns,(global::SerializationTypes.TypeWithPropertyHavingComplexChoice)o, isNullable, true); + return; + } + if (t == typeof(global::SerializationTypes.ComplexChoiceA)) { + Write103_ComplexChoiceA(n, ns,(global::SerializationTypes.ComplexChoiceA)o, isNullable, true); + return; + } + if (t == typeof(global::SerializationTypes.ComplexChoiceB)) { + Write102_ComplexChoiceB(n, ns,(global::SerializationTypes.ComplexChoiceB)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithArrayPropertyHavingChoice)) { - Write100_Item(n, ns,(global::SerializationTypes.TypeWithArrayPropertyHavingChoice)o, isNullable, true); + Write101_Item(n, ns,(global::SerializationTypes.TypeWithArrayPropertyHavingChoice)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithTypesHavingCustomFormatter)) { - Write98_Item(n, ns,(global::SerializationTypes.TypeWithTypesHavingCustomFormatter)o, isNullable, true); + Write99_Item(n, ns,(global::SerializationTypes.TypeWithTypesHavingCustomFormatter)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.KnownTypesThroughConstructorWithValue)) { - Write97_Item(n, ns,(global::SerializationTypes.KnownTypesThroughConstructorWithValue)o, isNullable, true); + Write98_Item(n, ns,(global::SerializationTypes.KnownTypesThroughConstructorWithValue)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.KnownTypesThroughConstructorWithArrayProperties)) { - Write96_Item(n, ns,(global::SerializationTypes.KnownTypesThroughConstructorWithArrayProperties)o, isNullable, true); + Write97_Item(n, ns,(global::SerializationTypes.KnownTypesThroughConstructorWithArrayProperties)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithShouldSerializeMethod)) { - Write95_TypeWithShouldSerializeMethod(n, ns,(global::SerializationTypes.TypeWithShouldSerializeMethod)o, isNullable, true); + Write96_TypeWithShouldSerializeMethod(n, ns,(global::SerializationTypes.TypeWithShouldSerializeMethod)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithEnumFlagPropertyHavingDefaultValue)) { - Write94_Item(n, ns,(global::SerializationTypes.TypeWithEnumFlagPropertyHavingDefaultValue)o, isNullable, true); + Write95_Item(n, ns,(global::SerializationTypes.TypeWithEnumFlagPropertyHavingDefaultValue)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithEnumPropertyHavingDefaultValue)) { - Write93_Item(n, ns,(global::SerializationTypes.TypeWithEnumPropertyHavingDefaultValue)o, isNullable, true); + Write94_Item(n, ns,(global::SerializationTypes.TypeWithEnumPropertyHavingDefaultValue)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithPropertiesHavingDefaultValue)) { - Write92_Item(n, ns,(global::SerializationTypes.TypeWithPropertiesHavingDefaultValue)o, isNullable, true); + Write93_Item(n, ns,(global::SerializationTypes.TypeWithPropertiesHavingDefaultValue)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWith2DArrayProperty2)) { - Write91_TypeWith2DArrayProperty2(n, ns,(global::SerializationTypes.TypeWith2DArrayProperty2)o, isNullable, true); + Write92_TypeWith2DArrayProperty2(n, ns,(global::SerializationTypes.TypeWith2DArrayProperty2)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithXmlQualifiedName)) { - Write90_TypeWithXmlQualifiedName(n, ns,(global::SerializationTypes.TypeWithXmlQualifiedName)o, isNullable, true); + Write91_TypeWithXmlQualifiedName(n, ns,(global::SerializationTypes.TypeWithXmlQualifiedName)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.ServerSettings)) { - Write89_ServerSettings(n, ns,(global::SerializationTypes.ServerSettings)o, isNullable, true); + Write90_ServerSettings(n, ns,(global::SerializationTypes.ServerSettings)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithNonPublicDefaultConstructor)) { - Write88_Item(n, ns,(global::SerializationTypes.TypeWithNonPublicDefaultConstructor)o, isNullable, true); + Write89_Item(n, ns,(global::SerializationTypes.TypeWithNonPublicDefaultConstructor)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithTypeNameInXmlTypeAttribute)) { - Write86_Item(n, ns,(global::SerializationTypes.TypeWithTypeNameInXmlTypeAttribute)o, isNullable, true); + Write87_Item(n, ns,(global::SerializationTypes.TypeWithTypeNameInXmlTypeAttribute)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithXmlSchemaFormAttribute)) { - Write85_TypeWithXmlSchemaFormAttribute(n, ns,(global::SerializationTypes.TypeWithXmlSchemaFormAttribute)o, isNullable, true); + Write86_TypeWithXmlSchemaFormAttribute(n, ns,(global::SerializationTypes.TypeWithXmlSchemaFormAttribute)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithPropertyNameSpecified)) { - Write84_TypeWithPropertyNameSpecified(n, ns,(global::SerializationTypes.TypeWithPropertyNameSpecified)o, isNullable, true); + Write85_TypeWithPropertyNameSpecified(n, ns,(global::SerializationTypes.TypeWithPropertyNameSpecified)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.SimpleKnownTypeValue)) { - Write83_SimpleKnownTypeValue(n, ns,(global::SerializationTypes.SimpleKnownTypeValue)o, isNullable, true); + Write84_SimpleKnownTypeValue(n, ns,(global::SerializationTypes.SimpleKnownTypeValue)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.KnownTypesThroughConstructor)) { - Write82_KnownTypesThroughConstructor(n, ns,(global::SerializationTypes.KnownTypesThroughConstructor)o, isNullable, true); + Write83_KnownTypesThroughConstructor(n, ns,(global::SerializationTypes.KnownTypesThroughConstructor)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithAnyAttribute)) { - Write81_TypeWithAnyAttribute(n, ns,(global::SerializationTypes.TypeWithAnyAttribute)o, isNullable, true); + Write82_TypeWithAnyAttribute(n, ns,(global::SerializationTypes.TypeWithAnyAttribute)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.XmlSerializerAttributes)) { - Write80_XmlSerializerAttributes(n, ns,(global::SerializationTypes.XmlSerializerAttributes)o, isNullable, true); + Write81_XmlSerializerAttributes(n, ns,(global::SerializationTypes.XmlSerializerAttributes)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.WithNullables)) { - Write73_WithNullables(n, ns,(global::SerializationTypes.WithNullables)o, isNullable, true); + Write74_WithNullables(n, ns,(global::SerializationTypes.WithNullables)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.WithEnums)) { - Write72_WithEnums(n, ns,(global::SerializationTypes.WithEnums)o, isNullable, true); + Write73_WithEnums(n, ns,(global::SerializationTypes.WithEnums)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.WithStruct)) { - Write69_WithStruct(n, ns,(global::SerializationTypes.WithStruct)o, isNullable, true); + Write70_WithStruct(n, ns,(global::SerializationTypes.WithStruct)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.SomeStruct)) { - Write68_SomeStruct(n, ns,(global::SerializationTypes.SomeStruct)o, true); + Write69_SomeStruct(n, ns,(global::SerializationTypes.SomeStruct)o, true); return; } if (t == typeof(global::SerializationTypes.ClassImplementsInterface)) { - Write67_ClassImplementsInterface(n, ns,(global::SerializationTypes.ClassImplementsInterface)o, isNullable, true); + Write68_ClassImplementsInterface(n, ns,(global::SerializationTypes.ClassImplementsInterface)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithXmlTextAttributeOnArray)) { - Write65_Item(n, ns,(global::SerializationTypes.TypeWithXmlTextAttributeOnArray)o, isNullable, true); + Write66_Item(n, ns,(global::SerializationTypes.TypeWithXmlTextAttributeOnArray)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.SimpleDC)) { - Write64_SimpleDC(n, ns,(global::SerializationTypes.SimpleDC)o, isNullable, true); + Write65_SimpleDC(n, ns,(global::SerializationTypes.SimpleDC)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithByteArrayAsXmlText)) { - Write63_TypeWithByteArrayAsXmlText(n, ns,(global::SerializationTypes.TypeWithByteArrayAsXmlText)o, isNullable, true); + Write64_TypeWithByteArrayAsXmlText(n, ns,(global::SerializationTypes.TypeWithByteArrayAsXmlText)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithDateTimePropertyAsXmlTime)) { - Write62_Item(n, ns,(global::SerializationTypes.TypeWithDateTimePropertyAsXmlTime)o, isNullable, true); + Write63_Item(n, ns,(global::SerializationTypes.TypeWithDateTimePropertyAsXmlTime)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.BaseClassWithSamePropertyName)) { - Write59_BaseClassWithSamePropertyName(n, ns,(global::SerializationTypes.BaseClassWithSamePropertyName)o, isNullable, true); + Write60_BaseClassWithSamePropertyName(n, ns,(global::SerializationTypes.BaseClassWithSamePropertyName)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.DerivedClassWithSameProperty)) { - Write60_DerivedClassWithSameProperty(n, ns,(global::SerializationTypes.DerivedClassWithSameProperty)o, isNullable, true); + Write61_DerivedClassWithSameProperty(n, ns,(global::SerializationTypes.DerivedClassWithSameProperty)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.DerivedClassWithSameProperty2)) { - Write61_DerivedClassWithSameProperty2(n, ns,(global::SerializationTypes.DerivedClassWithSameProperty2)o, isNullable, true); + Write62_DerivedClassWithSameProperty2(n, ns,(global::SerializationTypes.DerivedClassWithSameProperty2)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.@__TypeNameWithSpecialCharacters漢ñ)) { - Write58_Item(n, ns,(global::SerializationTypes.@__TypeNameWithSpecialCharacters漢ñ)o, isNullable, true); + Write59_Item(n, ns,(global::SerializationTypes.@__TypeNameWithSpecialCharacters漢ñ)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeHasArrayOfASerializedAsB)) { - Write57_TypeHasArrayOfASerializedAsB(n, ns,(global::SerializationTypes.TypeHasArrayOfASerializedAsB)o, isNullable, true); + Write58_TypeHasArrayOfASerializedAsB(n, ns,(global::SerializationTypes.TypeHasArrayOfASerializedAsB)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeB)) { - Write56_TypeB(n, ns,(global::SerializationTypes.TypeB)o, isNullable, true); + Write57_TypeB(n, ns,(global::SerializationTypes.TypeB)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeA)) { - Write55_TypeA(n, ns,(global::SerializationTypes.TypeA)o, isNullable, true); + Write56_TypeA(n, ns,(global::SerializationTypes.TypeA)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.BuiltInTypes)) { - Write54_BuiltInTypes(n, ns,(global::SerializationTypes.BuiltInTypes)o, isNullable, true); + Write55_BuiltInTypes(n, ns,(global::SerializationTypes.BuiltInTypes)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.DCClassWithEnumAndStruct)) { - Write53_DCClassWithEnumAndStruct(n, ns,(global::SerializationTypes.DCClassWithEnumAndStruct)o, isNullable, true); + Write54_DCClassWithEnumAndStruct(n, ns,(global::SerializationTypes.DCClassWithEnumAndStruct)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.DCStruct)) { - Write52_DCStruct(n, ns,(global::SerializationTypes.DCStruct)o, true); + Write53_DCStruct(n, ns,(global::SerializationTypes.DCStruct)o, true); return; } if (t == typeof(global::SerializationTypes.TypeWithEnumMembers)) { - Write51_TypeWithEnumMembers(n, ns,(global::SerializationTypes.TypeWithEnumMembers)o, isNullable, true); + Write52_TypeWithEnumMembers(n, ns,(global::SerializationTypes.TypeWithEnumMembers)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithReadOnlyMyCollectionProperty)) { - Write49_Item(n, ns,(global::SerializationTypes.TypeWithReadOnlyMyCollectionProperty)o, isNullable, true); + Write50_Item(n, ns,(global::SerializationTypes.TypeWithReadOnlyMyCollectionProperty)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithMyCollectionField)) { - Write48_TypeWithMyCollectionField(n, ns,(global::SerializationTypes.TypeWithMyCollectionField)o, isNullable, true); + Write49_TypeWithMyCollectionField(n, ns,(global::SerializationTypes.TypeWithMyCollectionField)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.StructNotSerializable)) { - Write47_StructNotSerializable(n, ns,(global::SerializationTypes.StructNotSerializable)o, true); + Write48_StructNotSerializable(n, ns,(global::SerializationTypes.StructNotSerializable)o, true); + return; + } + if (t == typeof(global::SerializationTypes.TypeWithArraylikeMembers)) { + Write47_TypeWithArraylikeMembers(n, ns,(global::SerializationTypes.TypeWithArraylikeMembers)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithGetOnlyArrayProperties)) { @@ -1725,7 +1781,7 @@ void Write1_Object(string n, string ns, global::System.Object o, bool isNullable if (t == typeof(global::SerializationTypes.MyEnum)) { Writer.WriteStartElement(n, ns); WriteXsiType(@"MyEnum", @""); - Writer.WriteString(Write50_MyEnum((global::SerializationTypes.MyEnum)o)); + Writer.WriteString(Write51_MyEnum((global::SerializationTypes.MyEnum)o)); Writer.WriteEndElement(); return; } @@ -1736,7 +1792,7 @@ void Write1_Object(string n, string ns, global::System.Object o, bool isNullable global::SerializationTypes.TypeA[] a = (global::SerializationTypes.TypeA[])o; if (a != null) { for (int ia = 0; ia < a.Length; ia++) { - Write55_TypeA(@"TypeA", @"", ((global::SerializationTypes.TypeA)a[ia]), true, false); + Write56_TypeA(@"TypeA", @"", ((global::SerializationTypes.TypeA)a[ia]), true, false); } } } @@ -1746,63 +1802,63 @@ void Write1_Object(string n, string ns, global::System.Object o, bool isNullable if (t == typeof(global::SerializationTypes.EnumFlags)) { Writer.WriteStartElement(n, ns); WriteXsiType(@"EnumFlags", @""); - Writer.WriteString(Write66_EnumFlags((global::SerializationTypes.EnumFlags)o)); + Writer.WriteString(Write67_EnumFlags((global::SerializationTypes.EnumFlags)o)); Writer.WriteEndElement(); return; } if (t == typeof(global::SerializationTypes.IntEnum)) { Writer.WriteStartElement(n, ns); WriteXsiType(@"IntEnum", @""); - Writer.WriteString(Write70_IntEnum((global::SerializationTypes.IntEnum)o)); + Writer.WriteString(Write71_IntEnum((global::SerializationTypes.IntEnum)o)); Writer.WriteEndElement(); return; } if (t == typeof(global::SerializationTypes.ShortEnum)) { Writer.WriteStartElement(n, ns); WriteXsiType(@"ShortEnum", @""); - Writer.WriteString(Write71_ShortEnum((global::SerializationTypes.ShortEnum)o)); + Writer.WriteString(Write72_ShortEnum((global::SerializationTypes.ShortEnum)o)); Writer.WriteEndElement(); return; } if (t == typeof(global::SerializationTypes.ByteEnum)) { Writer.WriteStartElement(n, ns); WriteXsiType(@"ByteEnum", @""); - Writer.WriteString(Write74_ByteEnum((global::SerializationTypes.ByteEnum)o)); + Writer.WriteString(Write75_ByteEnum((global::SerializationTypes.ByteEnum)o)); Writer.WriteEndElement(); return; } if (t == typeof(global::SerializationTypes.SByteEnum)) { Writer.WriteStartElement(n, ns); WriteXsiType(@"SByteEnum", @""); - Writer.WriteString(Write75_SByteEnum((global::SerializationTypes.SByteEnum)o)); + Writer.WriteString(Write76_SByteEnum((global::SerializationTypes.SByteEnum)o)); Writer.WriteEndElement(); return; } if (t == typeof(global::SerializationTypes.UIntEnum)) { Writer.WriteStartElement(n, ns); WriteXsiType(@"UIntEnum", @""); - Writer.WriteString(Write76_UIntEnum((global::SerializationTypes.UIntEnum)o)); + Writer.WriteString(Write77_UIntEnum((global::SerializationTypes.UIntEnum)o)); Writer.WriteEndElement(); return; } if (t == typeof(global::SerializationTypes.LongEnum)) { Writer.WriteStartElement(n, ns); WriteXsiType(@"LongEnum", @""); - Writer.WriteString(Write77_LongEnum((global::SerializationTypes.LongEnum)o)); + Writer.WriteString(Write78_LongEnum((global::SerializationTypes.LongEnum)o)); Writer.WriteEndElement(); return; } if (t == typeof(global::SerializationTypes.ULongEnum)) { Writer.WriteStartElement(n, ns); WriteXsiType(@"ULongEnum", @""); - Writer.WriteString(Write78_ULongEnum((global::SerializationTypes.ULongEnum)o)); + Writer.WriteString(Write79_ULongEnum((global::SerializationTypes.ULongEnum)o)); Writer.WriteEndElement(); return; } if (t == typeof(global::SerializationTypes.ItemChoiceType)) { Writer.WriteStartElement(n, ns); WriteXsiType(@"ItemChoiceType", @""); - Writer.WriteString(Write79_ItemChoiceType((global::SerializationTypes.ItemChoiceType)o)); + Writer.WriteString(Write80_ItemChoiceType((global::SerializationTypes.ItemChoiceType)o)); Writer.WriteEndElement(); return; } @@ -1813,7 +1869,7 @@ void Write1_Object(string n, string ns, global::System.Object o, bool isNullable global::SerializationTypes.ItemChoiceType[] a = (global::SerializationTypes.ItemChoiceType[])o; if (a != null) { for (int ia = 0; ia < a.Length; ia++) { - WriteElementString(@"ItemChoiceType", @"", Write79_ItemChoiceType(((global::SerializationTypes.ItemChoiceType)a[ia]))); + WriteElementString(@"ItemChoiceType", @"", Write80_ItemChoiceType(((global::SerializationTypes.ItemChoiceType)a[ia]))); } } } @@ -1881,7 +1937,7 @@ void Write1_Object(string n, string ns, global::System.Object o, bool isNullable if (t == typeof(global::SerializationTypes.MoreChoices)) { Writer.WriteStartElement(n, ns); WriteXsiType(@"MoreChoices", @""); - Writer.WriteString(Write99_MoreChoices((global::SerializationTypes.MoreChoices)o)); + Writer.WriteString(Write100_MoreChoices((global::SerializationTypes.MoreChoices)o)); Writer.WriteEndElement(); return; } @@ -1893,7 +1949,7 @@ void Write1_Object(string n, string ns, global::System.Object o, bool isNullable WriteEndElement(o); } - string Write99_MoreChoices(global::SerializationTypes.MoreChoices v) { + string Write100_MoreChoices(global::SerializationTypes.MoreChoices v) { string s = null; switch (v) { case global::SerializationTypes.MoreChoices.@None: s = @"None"; break; @@ -1924,7 +1980,7 @@ void Write44_SimpleType(string n, string ns, global::SerializationTypes.SimpleTy WriteEndElement(o); } - string Write79_ItemChoiceType(global::SerializationTypes.ItemChoiceType v) { + string Write80_ItemChoiceType(global::SerializationTypes.ItemChoiceType v) { string s = null; switch (v) { case global::SerializationTypes.ItemChoiceType.@None: s = @"None"; break; @@ -1936,7 +1992,7 @@ string Write79_ItemChoiceType(global::SerializationTypes.ItemChoiceType v) { return s; } - string Write78_ULongEnum(global::SerializationTypes.ULongEnum v) { + string Write79_ULongEnum(global::SerializationTypes.ULongEnum v) { string s = null; switch (v) { case global::SerializationTypes.ULongEnum.@Option0: s = @"Option0"; break; @@ -1947,7 +2003,7 @@ string Write78_ULongEnum(global::SerializationTypes.ULongEnum v) { return s; } - string Write77_LongEnum(global::SerializationTypes.LongEnum v) { + string Write78_LongEnum(global::SerializationTypes.LongEnum v) { string s = null; switch (v) { case global::SerializationTypes.LongEnum.@Option0: s = @"Option0"; break; @@ -1958,7 +2014,7 @@ string Write77_LongEnum(global::SerializationTypes.LongEnum v) { return s; } - string Write76_UIntEnum(global::SerializationTypes.UIntEnum v) { + string Write77_UIntEnum(global::SerializationTypes.UIntEnum v) { string s = null; switch (v) { case global::SerializationTypes.UIntEnum.@Option0: s = @"Option0"; break; @@ -1969,7 +2025,7 @@ string Write76_UIntEnum(global::SerializationTypes.UIntEnum v) { return s; } - string Write75_SByteEnum(global::SerializationTypes.SByteEnum v) { + string Write76_SByteEnum(global::SerializationTypes.SByteEnum v) { string s = null; switch (v) { case global::SerializationTypes.SByteEnum.@Option0: s = @"Option0"; break; @@ -1980,7 +2036,7 @@ string Write75_SByteEnum(global::SerializationTypes.SByteEnum v) { return s; } - string Write74_ByteEnum(global::SerializationTypes.ByteEnum v) { + string Write75_ByteEnum(global::SerializationTypes.ByteEnum v) { string s = null; switch (v) { case global::SerializationTypes.ByteEnum.@Option0: s = @"Option0"; break; @@ -1991,7 +2047,7 @@ string Write74_ByteEnum(global::SerializationTypes.ByteEnum v) { return s; } - string Write71_ShortEnum(global::SerializationTypes.ShortEnum v) { + string Write72_ShortEnum(global::SerializationTypes.ShortEnum v) { string s = null; switch (v) { case global::SerializationTypes.ShortEnum.@Option0: s = @"Option0"; break; @@ -2002,7 +2058,7 @@ string Write71_ShortEnum(global::SerializationTypes.ShortEnum v) { return s; } - string Write70_IntEnum(global::SerializationTypes.IntEnum v) { + string Write71_IntEnum(global::SerializationTypes.IntEnum v) { string s = null; switch (v) { case global::SerializationTypes.IntEnum.@Option0: s = @"Option0"; break; @@ -2013,7 +2069,7 @@ string Write70_IntEnum(global::SerializationTypes.IntEnum v) { return s; } - string Write66_EnumFlags(global::SerializationTypes.EnumFlags v) { + string Write67_EnumFlags(global::SerializationTypes.EnumFlags v) { string s = null; switch (v) { case global::SerializationTypes.EnumFlags.@One: s = @"One"; break; @@ -2031,7 +2087,7 @@ string Write66_EnumFlags(global::SerializationTypes.EnumFlags v) { return s; } - void Write55_TypeA(string n, string ns, global::SerializationTypes.TypeA o, bool isNullable, bool needType) { + void Write56_TypeA(string n, string ns, global::SerializationTypes.TypeA o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -2050,7 +2106,7 @@ void Write55_TypeA(string n, string ns, global::SerializationTypes.TypeA o, bool WriteEndElement(o); } - string Write50_MyEnum(global::SerializationTypes.MyEnum v) { + string Write51_MyEnum(global::SerializationTypes.MyEnum v) { string s = null; switch (v) { case global::SerializationTypes.MyEnum.@One: s = @"One"; break; @@ -3186,7 +3242,111 @@ void Write46_TypeWithGetOnlyArrayProperties(string n, string ns, global::Seriali WriteEndElement(o); } - void Write47_StructNotSerializable(string n, string ns, global::SerializationTypes.StructNotSerializable o, bool needType) { + void Write47_TypeWithArraylikeMembers(string n, string ns, global::SerializationTypes.TypeWithArraylikeMembers o, bool isNullable, bool needType) { + if ((object)o == null) { + if (isNullable) WriteNullTagLiteral(n, ns); + return; + } + if (!needType) { + System.Type t = o.GetType(); + if (t == typeof(global::SerializationTypes.TypeWithArraylikeMembers)) { + } + else { + throw CreateUnknownTypeException(o); + } + } + WriteStartElement(n, ns, o, false, null); + if (needType) WriteXsiType(@"TypeWithArraylikeMembers", @""); + { + global::System.Int32[] a = (global::System.Int32[])((global::System.Int32[])o.@IntAField); + if (a != null){ + WriteStartElement(@"IntAField", @"", null, false); + for (int ia = 0; ia < a.Length; ia++) { + WriteElementStringRaw(@"int", @"", System.Xml.XmlConvert.ToString((global::System.Int32)((global::System.Int32)a[ia]))); + } + WriteEndElement(); + } + } + { + global::System.Int32[] a = (global::System.Int32[])((global::System.Int32[])o.@NIntAField); + if (a != null){ + WriteStartElement(@"NIntAField", @"", null, false); + for (int ia = 0; ia < a.Length; ia++) { + WriteElementStringRaw(@"int", @"", System.Xml.XmlConvert.ToString((global::System.Int32)((global::System.Int32)a[ia]))); + } + WriteEndElement(); + } + } + { + global::System.Collections.Generic.List a = (global::System.Collections.Generic.List)((global::System.Collections.Generic.List)o.@IntLField); + if (a != null){ + WriteStartElement(@"IntLField", @"", null, false); + for (int ia = 0; ia < ((System.Collections.ICollection)a).Count; ia++) { + WriteElementStringRaw(@"int", @"", System.Xml.XmlConvert.ToString((global::System.Int32)((global::System.Int32)a[ia]))); + } + WriteEndElement(); + } + } + { + global::System.Collections.Generic.List a = (global::System.Collections.Generic.List)((global::System.Collections.Generic.List)o.@NIntLField); + if ((object)(a) == null) { + WriteNullTagLiteral(@"NIntLField", @""); + } + else { + WriteStartElement(@"NIntLField", @"", null, false); + for (int ia = 0; ia < ((System.Collections.ICollection)a).Count; ia++) { + WriteElementStringRaw(@"int", @"", System.Xml.XmlConvert.ToString((global::System.Int32)((global::System.Int32)a[ia]))); + } + WriteEndElement(); + } + } + { + global::System.Int32[] a = (global::System.Int32[])((global::System.Int32[])o.@IntAProp); + if (a != null){ + WriteStartElement(@"IntAProp", @"", null, false); + for (int ia = 0; ia < a.Length; ia++) { + WriteElementStringRaw(@"int", @"", System.Xml.XmlConvert.ToString((global::System.Int32)((global::System.Int32)a[ia]))); + } + WriteEndElement(); + } + } + { + global::System.Int32[] a = (global::System.Int32[])((global::System.Int32[])o.@NIntAProp); + if ((object)(a) == null) { + WriteNullTagLiteral(@"NIntAProp", @""); + } + else { + WriteStartElement(@"NIntAProp", @"", null, false); + for (int ia = 0; ia < a.Length; ia++) { + WriteElementStringRaw(@"int", @"", System.Xml.XmlConvert.ToString((global::System.Int32)((global::System.Int32)a[ia]))); + } + WriteEndElement(); + } + } + { + global::System.Collections.Generic.List a = (global::System.Collections.Generic.List)((global::System.Collections.Generic.List)o.@IntLProp); + if (a != null){ + WriteStartElement(@"IntLProp", @"", null, false); + for (int ia = 0; ia < ((System.Collections.ICollection)a).Count; ia++) { + WriteElementStringRaw(@"int", @"", System.Xml.XmlConvert.ToString((global::System.Int32)((global::System.Int32)a[ia]))); + } + WriteEndElement(); + } + } + { + global::System.Collections.Generic.List a = (global::System.Collections.Generic.List)((global::System.Collections.Generic.List)o.@NIntLProp); + if (a != null){ + WriteStartElement(@"NIntLProp", @"", null, false); + for (int ia = 0; ia < ((System.Collections.ICollection)a).Count; ia++) { + WriteElementStringRaw(@"int", @"", System.Xml.XmlConvert.ToString((global::System.Int32)((global::System.Int32)a[ia]))); + } + WriteEndElement(); + } + } + WriteEndElement(o); + } + + void Write48_StructNotSerializable(string n, string ns, global::SerializationTypes.StructNotSerializable o, bool needType) { if (!needType) { System.Type t = o.GetType(); if (t == typeof(global::SerializationTypes.StructNotSerializable)) { @@ -3201,7 +3361,7 @@ void Write47_StructNotSerializable(string n, string ns, global::SerializationTyp WriteEndElement(o); } - void Write48_TypeWithMyCollectionField(string n, string ns, global::SerializationTypes.TypeWithMyCollectionField o, bool isNullable, bool needType) { + void Write49_TypeWithMyCollectionField(string n, string ns, global::SerializationTypes.TypeWithMyCollectionField o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3232,7 +3392,7 @@ void Write48_TypeWithMyCollectionField(string n, string ns, global::Serializatio WriteEndElement(o); } - void Write49_Item(string n, string ns, global::SerializationTypes.TypeWithReadOnlyMyCollectionProperty o, bool isNullable, bool needType) { + void Write50_Item(string n, string ns, global::SerializationTypes.TypeWithReadOnlyMyCollectionProperty o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3263,7 +3423,7 @@ void Write49_Item(string n, string ns, global::SerializationTypes.TypeWithReadOn WriteEndElement(o); } - void Write51_TypeWithEnumMembers(string n, string ns, global::SerializationTypes.TypeWithEnumMembers o, bool isNullable, bool needType) { + void Write52_TypeWithEnumMembers(string n, string ns, global::SerializationTypes.TypeWithEnumMembers o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3278,12 +3438,12 @@ void Write51_TypeWithEnumMembers(string n, string ns, global::SerializationTypes } WriteStartElement(n, ns, o, false, null); if (needType) WriteXsiType(@"TypeWithEnumMembers", @""); - WriteElementString(@"F1", @"", Write50_MyEnum(((global::SerializationTypes.MyEnum)o.@F1))); - WriteElementString(@"P1", @"", Write50_MyEnum(((global::SerializationTypes.MyEnum)o.@P1))); + WriteElementString(@"F1", @"", Write51_MyEnum(((global::SerializationTypes.MyEnum)o.@F1))); + WriteElementString(@"P1", @"", Write51_MyEnum(((global::SerializationTypes.MyEnum)o.@P1))); WriteEndElement(o); } - void Write52_DCStruct(string n, string ns, global::SerializationTypes.DCStruct o, bool needType) { + void Write53_DCStruct(string n, string ns, global::SerializationTypes.DCStruct o, bool needType) { if (!needType) { System.Type t = o.GetType(); if (t == typeof(global::SerializationTypes.DCStruct)) { @@ -3298,7 +3458,7 @@ void Write52_DCStruct(string n, string ns, global::SerializationTypes.DCStruct o WriteEndElement(o); } - void Write53_DCClassWithEnumAndStruct(string n, string ns, global::SerializationTypes.DCClassWithEnumAndStruct o, bool isNullable, bool needType) { + void Write54_DCClassWithEnumAndStruct(string n, string ns, global::SerializationTypes.DCClassWithEnumAndStruct o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3313,12 +3473,12 @@ void Write53_DCClassWithEnumAndStruct(string n, string ns, global::Serialization } WriteStartElement(n, ns, o, false, null); if (needType) WriteXsiType(@"DCClassWithEnumAndStruct", @""); - Write52_DCStruct(@"MyStruct", @"", ((global::SerializationTypes.DCStruct)o.@MyStruct), false); - WriteElementString(@"MyEnum1", @"", Write50_MyEnum(((global::SerializationTypes.MyEnum)o.@MyEnum1))); + Write53_DCStruct(@"MyStruct", @"", ((global::SerializationTypes.DCStruct)o.@MyStruct), false); + WriteElementString(@"MyEnum1", @"", Write51_MyEnum(((global::SerializationTypes.MyEnum)o.@MyEnum1))); WriteEndElement(o); } - void Write54_BuiltInTypes(string n, string ns, global::SerializationTypes.BuiltInTypes o, bool isNullable, bool needType) { + void Write55_BuiltInTypes(string n, string ns, global::SerializationTypes.BuiltInTypes o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3337,7 +3497,7 @@ void Write54_BuiltInTypes(string n, string ns, global::SerializationTypes.BuiltI WriteEndElement(o); } - void Write56_TypeB(string n, string ns, global::SerializationTypes.TypeB o, bool isNullable, bool needType) { + void Write57_TypeB(string n, string ns, global::SerializationTypes.TypeB o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3356,7 +3516,7 @@ void Write56_TypeB(string n, string ns, global::SerializationTypes.TypeB o, bool WriteEndElement(o); } - void Write57_TypeHasArrayOfASerializedAsB(string n, string ns, global::SerializationTypes.TypeHasArrayOfASerializedAsB o, bool isNullable, bool needType) { + void Write58_TypeHasArrayOfASerializedAsB(string n, string ns, global::SerializationTypes.TypeHasArrayOfASerializedAsB o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3376,7 +3536,7 @@ void Write57_TypeHasArrayOfASerializedAsB(string n, string ns, global::Serializa if (a != null){ WriteStartElement(@"Items", @"", null, false); for (int ia = 0; ia < a.Length; ia++) { - Write55_TypeA(@"TypeA", @"", ((global::SerializationTypes.TypeA)a[ia]), true, false); + Write56_TypeA(@"TypeA", @"", ((global::SerializationTypes.TypeA)a[ia]), true, false); } WriteEndElement(); } @@ -3384,7 +3544,7 @@ void Write57_TypeHasArrayOfASerializedAsB(string n, string ns, global::Serializa WriteEndElement(o); } - void Write58_Item(string n, string ns, global::SerializationTypes.@__TypeNameWithSpecialCharacters漢ñ o, bool isNullable, bool needType) { + void Write59_Item(string n, string ns, global::SerializationTypes.@__TypeNameWithSpecialCharacters漢ñ o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3403,7 +3563,7 @@ void Write58_Item(string n, string ns, global::SerializationTypes.@__TypeNameWit WriteEndElement(o); } - void Write61_DerivedClassWithSameProperty2(string n, string ns, global::SerializationTypes.DerivedClassWithSameProperty2 o, bool isNullable, bool needType) { + void Write62_DerivedClassWithSameProperty2(string n, string ns, global::SerializationTypes.DerivedClassWithSameProperty2 o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3434,7 +3594,7 @@ void Write61_DerivedClassWithSameProperty2(string n, string ns, global::Serializ WriteEndElement(o); } - void Write60_DerivedClassWithSameProperty(string n, string ns, global::SerializationTypes.DerivedClassWithSameProperty o, bool isNullable, bool needType) { + void Write61_DerivedClassWithSameProperty(string n, string ns, global::SerializationTypes.DerivedClassWithSameProperty o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3445,7 +3605,7 @@ void Write60_DerivedClassWithSameProperty(string n, string ns, global::Serializa } else { if (t == typeof(global::SerializationTypes.DerivedClassWithSameProperty2)) { - Write61_DerivedClassWithSameProperty2(n, ns,(global::SerializationTypes.DerivedClassWithSameProperty2)o, isNullable, true); + Write62_DerivedClassWithSameProperty2(n, ns,(global::SerializationTypes.DerivedClassWithSameProperty2)o, isNullable, true); return; } throw CreateUnknownTypeException(o); @@ -3469,7 +3629,7 @@ void Write60_DerivedClassWithSameProperty(string n, string ns, global::Serializa WriteEndElement(o); } - void Write59_BaseClassWithSamePropertyName(string n, string ns, global::SerializationTypes.BaseClassWithSamePropertyName o, bool isNullable, bool needType) { + void Write60_BaseClassWithSamePropertyName(string n, string ns, global::SerializationTypes.BaseClassWithSamePropertyName o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3480,11 +3640,11 @@ void Write59_BaseClassWithSamePropertyName(string n, string ns, global::Serializ } else { if (t == typeof(global::SerializationTypes.DerivedClassWithSameProperty)) { - Write60_DerivedClassWithSameProperty(n, ns,(global::SerializationTypes.DerivedClassWithSameProperty)o, isNullable, true); + Write61_DerivedClassWithSameProperty(n, ns,(global::SerializationTypes.DerivedClassWithSameProperty)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.DerivedClassWithSameProperty2)) { - Write61_DerivedClassWithSameProperty2(n, ns,(global::SerializationTypes.DerivedClassWithSameProperty2)o, isNullable, true); + Write62_DerivedClassWithSameProperty2(n, ns,(global::SerializationTypes.DerivedClassWithSameProperty2)o, isNullable, true); return; } throw CreateUnknownTypeException(o); @@ -3508,7 +3668,7 @@ void Write59_BaseClassWithSamePropertyName(string n, string ns, global::Serializ WriteEndElement(o); } - void Write62_Item(string n, string ns, global::SerializationTypes.TypeWithDateTimePropertyAsXmlTime o, bool isNullable, bool needType) { + void Write63_Item(string n, string ns, global::SerializationTypes.TypeWithDateTimePropertyAsXmlTime o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3529,7 +3689,7 @@ void Write62_Item(string n, string ns, global::SerializationTypes.TypeWithDateTi WriteEndElement(o); } - void Write63_TypeWithByteArrayAsXmlText(string n, string ns, global::SerializationTypes.TypeWithByteArrayAsXmlText o, bool isNullable, bool needType) { + void Write64_TypeWithByteArrayAsXmlText(string n, string ns, global::SerializationTypes.TypeWithByteArrayAsXmlText o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3550,7 +3710,7 @@ void Write63_TypeWithByteArrayAsXmlText(string n, string ns, global::Serializati WriteEndElement(o); } - void Write64_SimpleDC(string n, string ns, global::SerializationTypes.SimpleDC o, bool isNullable, bool needType) { + void Write65_SimpleDC(string n, string ns, global::SerializationTypes.SimpleDC o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3569,7 +3729,7 @@ void Write64_SimpleDC(string n, string ns, global::SerializationTypes.SimpleDC o WriteEndElement(o); } - void Write65_Item(string n, string ns, global::SerializationTypes.TypeWithXmlTextAttributeOnArray o, bool isNullable, bool needType) { + void Write66_Item(string n, string ns, global::SerializationTypes.TypeWithXmlTextAttributeOnArray o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3597,7 +3757,7 @@ void Write65_Item(string n, string ns, global::SerializationTypes.TypeWithXmlTex WriteEndElement(o); } - void Write67_ClassImplementsInterface(string n, string ns, global::SerializationTypes.ClassImplementsInterface o, bool isNullable, bool needType) { + void Write68_ClassImplementsInterface(string n, string ns, global::SerializationTypes.ClassImplementsInterface o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3619,7 +3779,7 @@ void Write67_ClassImplementsInterface(string n, string ns, global::Serialization WriteEndElement(o); } - void Write68_SomeStruct(string n, string ns, global::SerializationTypes.SomeStruct o, bool needType) { + void Write69_SomeStruct(string n, string ns, global::SerializationTypes.SomeStruct o, bool needType) { if (!needType) { System.Type t = o.GetType(); if (t == typeof(global::SerializationTypes.SomeStruct)) { @@ -3635,7 +3795,7 @@ void Write68_SomeStruct(string n, string ns, global::SerializationTypes.SomeStru WriteEndElement(o); } - void Write69_WithStruct(string n, string ns, global::SerializationTypes.WithStruct o, bool isNullable, bool needType) { + void Write70_WithStruct(string n, string ns, global::SerializationTypes.WithStruct o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3650,11 +3810,11 @@ void Write69_WithStruct(string n, string ns, global::SerializationTypes.WithStru } WriteStartElement(n, ns, o, false, null); if (needType) WriteXsiType(@"WithStruct", @""); - Write68_SomeStruct(@"Some", @"", ((global::SerializationTypes.SomeStruct)o.@Some), false); + Write69_SomeStruct(@"Some", @"", ((global::SerializationTypes.SomeStruct)o.@Some), false); WriteEndElement(o); } - void Write72_WithEnums(string n, string ns, global::SerializationTypes.WithEnums o, bool isNullable, bool needType) { + void Write73_WithEnums(string n, string ns, global::SerializationTypes.WithEnums o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3669,12 +3829,12 @@ void Write72_WithEnums(string n, string ns, global::SerializationTypes.WithEnums } WriteStartElement(n, ns, o, false, null); if (needType) WriteXsiType(@"WithEnums", @""); - WriteElementString(@"Int", @"", Write70_IntEnum(((global::SerializationTypes.IntEnum)o.@Int))); - WriteElementString(@"Short", @"", Write71_ShortEnum(((global::SerializationTypes.ShortEnum)o.@Short))); + WriteElementString(@"Int", @"", Write71_IntEnum(((global::SerializationTypes.IntEnum)o.@Int))); + WriteElementString(@"Short", @"", Write72_ShortEnum(((global::SerializationTypes.ShortEnum)o.@Short))); WriteEndElement(o); } - void Write73_WithNullables(string n, string ns, global::SerializationTypes.WithNullables o, bool isNullable, bool needType) { + void Write74_WithNullables(string n, string ns, global::SerializationTypes.WithNullables o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3690,13 +3850,13 @@ void Write73_WithNullables(string n, string ns, global::SerializationTypes.WithN WriteStartElement(n, ns, o, false, null); if (needType) WriteXsiType(@"WithNullables", @""); if (o.@Optional != null) { - WriteElementString(@"Optional", @"", Write70_IntEnum(((global::SerializationTypes.IntEnum)o.@Optional))); + WriteElementString(@"Optional", @"", Write71_IntEnum(((global::SerializationTypes.IntEnum)o.@Optional))); } else { WriteNullTagLiteral(@"Optional", @""); } if (o.@Optionull != null) { - WriteElementString(@"Optionull", @"", Write70_IntEnum(((global::SerializationTypes.IntEnum)o.@Optionull))); + WriteElementString(@"Optionull", @"", Write71_IntEnum(((global::SerializationTypes.IntEnum)o.@Optionull))); } else { WriteNullTagLiteral(@"Optionull", @""); @@ -3714,13 +3874,13 @@ void Write73_WithNullables(string n, string ns, global::SerializationTypes.WithN WriteNullTagLiteral(@"OptionullInt", @""); } if (o.@Struct1 != null) { - Write68_SomeStruct(@"Struct1", @"", ((global::SerializationTypes.SomeStruct)o.@Struct1), false); + Write69_SomeStruct(@"Struct1", @"", ((global::SerializationTypes.SomeStruct)o.@Struct1), false); } else { WriteNullTagLiteral(@"Struct1", @""); } if (o.@Struct2 != null) { - Write68_SomeStruct(@"Struct2", @"", ((global::SerializationTypes.SomeStruct)o.@Struct2), false); + Write69_SomeStruct(@"Struct2", @"", ((global::SerializationTypes.SomeStruct)o.@Struct2), false); } else { WriteNullTagLiteral(@"Struct2", @""); @@ -3728,7 +3888,7 @@ void Write73_WithNullables(string n, string ns, global::SerializationTypes.WithN WriteEndElement(o); } - void Write80_XmlSerializerAttributes(string n, string ns, global::SerializationTypes.XmlSerializerAttributes o, bool isNullable, bool needType) { + void Write81_XmlSerializerAttributes(string n, string ns, global::SerializationTypes.XmlSerializerAttributes o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3767,7 +3927,7 @@ void Write80_XmlSerializerAttributes(string n, string ns, global::SerializationT if (a != null){ WriteStartElement(@"XmlEnumProperty", @"", null, false); for (int ia = 0; ia < a.Length; ia++) { - WriteElementString(@"ItemChoiceType", @"", Write79_ItemChoiceType(((global::SerializationTypes.ItemChoiceType)a[ia]))); + WriteElementString(@"ItemChoiceType", @"", Write80_ItemChoiceType(((global::SerializationTypes.ItemChoiceType)a[ia]))); } WriteEndElement(); } @@ -3790,7 +3950,7 @@ void Write80_XmlSerializerAttributes(string n, string ns, global::SerializationT WriteEndElement(o); } - void Write81_TypeWithAnyAttribute(string n, string ns, global::SerializationTypes.TypeWithAnyAttribute o, bool isNullable, bool needType) { + void Write82_TypeWithAnyAttribute(string n, string ns, global::SerializationTypes.TypeWithAnyAttribute o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3819,7 +3979,7 @@ void Write81_TypeWithAnyAttribute(string n, string ns, global::SerializationType WriteEndElement(o); } - void Write82_KnownTypesThroughConstructor(string n, string ns, global::SerializationTypes.KnownTypesThroughConstructor o, bool isNullable, bool needType) { + void Write83_KnownTypesThroughConstructor(string n, string ns, global::SerializationTypes.KnownTypesThroughConstructor o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3839,7 +3999,7 @@ void Write82_KnownTypesThroughConstructor(string n, string ns, global::Serializa WriteEndElement(o); } - void Write83_SimpleKnownTypeValue(string n, string ns, global::SerializationTypes.SimpleKnownTypeValue o, bool isNullable, bool needType) { + void Write84_SimpleKnownTypeValue(string n, string ns, global::SerializationTypes.SimpleKnownTypeValue o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3858,7 +4018,7 @@ void Write83_SimpleKnownTypeValue(string n, string ns, global::SerializationType WriteEndElement(o); } - void Write84_TypeWithPropertyNameSpecified(string n, string ns, global::SerializationTypes.TypeWithPropertyNameSpecified o, bool isNullable, bool needType) { + void Write85_TypeWithPropertyNameSpecified(string n, string ns, global::SerializationTypes.TypeWithPropertyNameSpecified o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3882,7 +4042,7 @@ void Write84_TypeWithPropertyNameSpecified(string n, string ns, global::Serializ WriteEndElement(o); } - void Write85_TypeWithXmlSchemaFormAttribute(string n, string ns, global::SerializationTypes.TypeWithXmlSchemaFormAttribute o, bool isNullable, bool needType) { + void Write86_TypeWithXmlSchemaFormAttribute(string n, string ns, global::SerializationTypes.TypeWithXmlSchemaFormAttribute o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3930,7 +4090,7 @@ void Write85_TypeWithXmlSchemaFormAttribute(string n, string ns, global::Seriali WriteEndElement(o); } - void Write86_Item(string n, string ns, global::SerializationTypes.TypeWithTypeNameInXmlTypeAttribute o, bool isNullable, bool needType) { + void Write87_Item(string n, string ns, global::SerializationTypes.TypeWithTypeNameInXmlTypeAttribute o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3949,7 +4109,7 @@ void Write86_Item(string n, string ns, global::SerializationTypes.TypeWithTypeNa WriteEndElement(o); } - void Write88_Item(string n, string ns, global::SerializationTypes.TypeWithNonPublicDefaultConstructor o, bool isNullable, bool needType) { + void Write89_Item(string n, string ns, global::SerializationTypes.TypeWithNonPublicDefaultConstructor o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3968,7 +4128,7 @@ void Write88_Item(string n, string ns, global::SerializationTypes.TypeWithNonPub WriteEndElement(o); } - void Write89_ServerSettings(string n, string ns, global::SerializationTypes.ServerSettings o, bool isNullable, bool needType) { + void Write90_ServerSettings(string n, string ns, global::SerializationTypes.ServerSettings o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3988,7 +4148,7 @@ void Write89_ServerSettings(string n, string ns, global::SerializationTypes.Serv WriteEndElement(o); } - void Write90_TypeWithXmlQualifiedName(string n, string ns, global::SerializationTypes.TypeWithXmlQualifiedName o, bool isNullable, bool needType) { + void Write91_TypeWithXmlQualifiedName(string n, string ns, global::SerializationTypes.TypeWithXmlQualifiedName o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -4007,7 +4167,7 @@ void Write90_TypeWithXmlQualifiedName(string n, string ns, global::Serialization WriteEndElement(o); } - void Write91_TypeWith2DArrayProperty2(string n, string ns, global::SerializationTypes.TypeWith2DArrayProperty2 o, bool isNullable, bool needType) { + void Write92_TypeWith2DArrayProperty2(string n, string ns, global::SerializationTypes.TypeWith2DArrayProperty2 o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -4044,7 +4204,7 @@ void Write91_TypeWith2DArrayProperty2(string n, string ns, global::Serialization WriteEndElement(o); } - void Write92_Item(string n, string ns, global::SerializationTypes.TypeWithPropertiesHavingDefaultValue o, bool isNullable, bool needType) { + void Write93_Item(string n, string ns, global::SerializationTypes.TypeWithPropertiesHavingDefaultValue o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -4072,7 +4232,7 @@ void Write92_Item(string n, string ns, global::SerializationTypes.TypeWithProper WriteEndElement(o); } - void Write93_Item(string n, string ns, global::SerializationTypes.TypeWithEnumPropertyHavingDefaultValue o, bool isNullable, bool needType) { + void Write94_Item(string n, string ns, global::SerializationTypes.TypeWithEnumPropertyHavingDefaultValue o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -4088,12 +4248,12 @@ void Write93_Item(string n, string ns, global::SerializationTypes.TypeWithEnumPr WriteStartElement(n, ns, o, false, null); if (needType) WriteXsiType(@"TypeWithEnumPropertyHavingDefaultValue", @""); if (((global::SerializationTypes.IntEnum)o.@EnumProperty) != global::SerializationTypes.IntEnum.@Option1) { - WriteElementString(@"EnumProperty", @"", Write70_IntEnum(((global::SerializationTypes.IntEnum)o.@EnumProperty))); + WriteElementString(@"EnumProperty", @"", Write71_IntEnum(((global::SerializationTypes.IntEnum)o.@EnumProperty))); } WriteEndElement(o); } - void Write94_Item(string n, string ns, global::SerializationTypes.TypeWithEnumFlagPropertyHavingDefaultValue o, bool isNullable, bool needType) { + void Write95_Item(string n, string ns, global::SerializationTypes.TypeWithEnumFlagPropertyHavingDefaultValue o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -4110,12 +4270,12 @@ void Write94_Item(string n, string ns, global::SerializationTypes.TypeWithEnumFl if (needType) WriteXsiType(@"TypeWithEnumFlagPropertyHavingDefaultValue", @""); if (((global::SerializationTypes.EnumFlags)o.@EnumProperty) != (global::SerializationTypes.EnumFlags.@One | global::SerializationTypes.EnumFlags.@Four)) { - WriteElementString(@"EnumProperty", @"", Write66_EnumFlags(((global::SerializationTypes.EnumFlags)o.@EnumProperty))); + WriteElementString(@"EnumProperty", @"", Write67_EnumFlags(((global::SerializationTypes.EnumFlags)o.@EnumProperty))); } WriteEndElement(o); } - void Write95_TypeWithShouldSerializeMethod(string n, string ns, global::SerializationTypes.TypeWithShouldSerializeMethod o, bool isNullable, bool needType) { + void Write96_TypeWithShouldSerializeMethod(string n, string ns, global::SerializationTypes.TypeWithShouldSerializeMethod o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -4136,7 +4296,7 @@ void Write95_TypeWithShouldSerializeMethod(string n, string ns, global::Serializ WriteEndElement(o); } - void Write96_Item(string n, string ns, global::SerializationTypes.KnownTypesThroughConstructorWithArrayProperties o, bool isNullable, bool needType) { + void Write97_Item(string n, string ns, global::SerializationTypes.KnownTypesThroughConstructorWithArrayProperties o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -4156,7 +4316,7 @@ void Write96_Item(string n, string ns, global::SerializationTypes.KnownTypesThro WriteEndElement(o); } - void Write97_Item(string n, string ns, global::SerializationTypes.KnownTypesThroughConstructorWithValue o, bool isNullable, bool needType) { + void Write98_Item(string n, string ns, global::SerializationTypes.KnownTypesThroughConstructorWithValue o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -4175,7 +4335,7 @@ void Write97_Item(string n, string ns, global::SerializationTypes.KnownTypesThro WriteEndElement(o); } - void Write98_Item(string n, string ns, global::SerializationTypes.TypeWithTypesHavingCustomFormatter o, bool isNullable, bool needType) { + void Write99_Item(string n, string ns, global::SerializationTypes.TypeWithTypesHavingCustomFormatter o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -4202,7 +4362,7 @@ void Write98_Item(string n, string ns, global::SerializationTypes.TypeWithTypesH WriteEndElement(o); } - void Write100_Item(string n, string ns, global::SerializationTypes.TypeWithArrayPropertyHavingChoice o, bool isNullable, bool needType) { + void Write101_Item(string n, string ns, global::SerializationTypes.TypeWithArrayPropertyHavingChoice o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -4245,7 +4405,92 @@ void Write100_Item(string n, string ns, global::SerializationTypes.TypeWithArray WriteEndElement(o); } - void Write101_TypeWithFieldsOrdered(string n, string ns, global::SerializationTypes.TypeWithFieldsOrdered o, bool isNullable, bool needType) { + void Write102_ComplexChoiceB(string n, string ns, global::SerializationTypes.ComplexChoiceB o, bool isNullable, bool needType) { + if ((object)o == null) { + if (isNullable) WriteNullTagLiteral(n, ns); + return; + } + if (!needType) { + System.Type t = o.GetType(); + if (t == typeof(global::SerializationTypes.ComplexChoiceB)) { + } + else { + throw CreateUnknownTypeException(o); + } + } + WriteStartElement(n, ns, o, false, null); + if (needType) WriteXsiType(@"ComplexChoiceB", @""); + WriteElementString(@"Name", @"", ((global::System.String)o.@Name)); + WriteEndElement(o); + } + + void Write103_ComplexChoiceA(string n, string ns, global::SerializationTypes.ComplexChoiceA o, bool isNullable, bool needType) { + if ((object)o == null) { + if (isNullable) WriteNullTagLiteral(n, ns); + return; + } + if (!needType) { + System.Type t = o.GetType(); + if (t == typeof(global::SerializationTypes.ComplexChoiceA)) { + } + else { + if (t == typeof(global::SerializationTypes.ComplexChoiceB)) { + Write102_ComplexChoiceB(n, ns,(global::SerializationTypes.ComplexChoiceB)o, isNullable, true); + return; + } + throw CreateUnknownTypeException(o); + } + } + WriteStartElement(n, ns, o, false, null); + if (needType) WriteXsiType(@"ComplexChoiceA", @""); + WriteElementString(@"Name", @"", ((global::System.String)o.@Name)); + WriteEndElement(o); + } + + void Write104_Item(string n, string ns, global::SerializationTypes.TypeWithPropertyHavingComplexChoice o, bool isNullable, bool needType) { + if ((object)o == null) { + if (isNullable) WriteNullTagLiteral(n, ns); + return; + } + if (!needType) { + System.Type t = o.GetType(); + if (t == typeof(global::SerializationTypes.TypeWithPropertyHavingComplexChoice)) { + } + else { + throw CreateUnknownTypeException(o); + } + } + WriteStartElement(n, ns, o, false, null); + if (needType) WriteXsiType(@"TypeWithPropertyHavingComplexChoice", @""); + { + global::System.Object[] a = (global::System.Object[])o.@ManyChoices; + if (a != null) { + global::SerializationTypes.MoreChoices[] c = (global::SerializationTypes.MoreChoices[])o.@ChoiceArray; + if (c == null || c.Length < a.Length) { + throw CreateInvalidChoiceIdentifierValueException(@"SerializationTypes.MoreChoices", @"ChoiceArray");} + for (int ia = 0; ia < a.Length; ia++) { + global::System.Object ai = (global::System.Object)a[ia]; + global::SerializationTypes.MoreChoices ci = (global::SerializationTypes.MoreChoices)c[ia]; + { + if (ci == SerializationTypes.MoreChoices.@Amount && ((object)(ai) != null)) { + if (((object)ai) != null && !(ai is global::System.Int32)) throw CreateMismatchChoiceException(@"System.Int32", @"ChoiceArray", @"SerializationTypes.MoreChoices.@Amount"); + WriteElementStringRaw(@"Amount", @"", System.Xml.XmlConvert.ToString((global::System.Int32)((global::System.Int32)ai))); + } + else if (ci == SerializationTypes.MoreChoices.@Item && ((object)(ai) != null)) { + if (((object)ai) != null && !(ai is global::SerializationTypes.ComplexChoiceA)) throw CreateMismatchChoiceException(@"SerializationTypes.ComplexChoiceA", @"ChoiceArray", @"SerializationTypes.MoreChoices.@Item"); + Write103_ComplexChoiceA(@"Item", @"", ((global::SerializationTypes.ComplexChoiceA)ai), false, false); + } + else if ((object)(ai) != null){ + throw CreateUnknownTypeException(ai); + } + } + } + } + } + WriteEndElement(o); + } + + void Write105_TypeWithFieldsOrdered(string n, string ns, global::SerializationTypes.TypeWithFieldsOrdered o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -4267,7 +4512,7 @@ void Write101_TypeWithFieldsOrdered(string n, string ns, global::SerializationTy WriteEndElement(o); } - void Write87_Item(string n, string ns, global::SerializationTypes.TypeWithSchemaFormInXmlAttribute o, bool isNullable, bool needType) { + void Write88_Item(string n, string ns, global::SerializationTypes.TypeWithSchemaFormInXmlAttribute o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -4292,7 +4537,7 @@ protected override void InitCallbacks() { public class XmlSerializationReader1 : System.Xml.Serialization.XmlSerializationReader { - public object Read111_TypeWithXmlElementProperty() { + public object Read115_TypeWithXmlElementProperty() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4310,7 +4555,7 @@ public object Read111_TypeWithXmlElementProperty() { return (object)o; } - public object Read112_TypeWithXmlDocumentProperty() { + public object Read116_TypeWithXmlDocumentProperty() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4328,7 +4573,7 @@ public object Read112_TypeWithXmlDocumentProperty() { return (object)o; } - public object Read113_TypeWithBinaryProperty() { + public object Read117_TypeWithBinaryProperty() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4346,7 +4591,7 @@ public object Read113_TypeWithBinaryProperty() { return (object)o; } - public object Read114_Item() { + public object Read118_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4364,7 +4609,7 @@ public object Read114_Item() { return (object)o; } - public object Read115_TypeWithTimeSpanProperty() { + public object Read119_TypeWithTimeSpanProperty() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4382,7 +4627,7 @@ public object Read115_TypeWithTimeSpanProperty() { return (object)o; } - public object Read116_Item() { + public object Read120_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4400,7 +4645,7 @@ public object Read116_Item() { return (object)o; } - public object Read117_TypeWithByteProperty() { + public object Read121_TypeWithByteProperty() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4418,7 +4663,7 @@ public object Read117_TypeWithByteProperty() { return (object)o; } - public object Read118_TypeWithXmlNodeArrayProperty() { + public object Read122_TypeWithXmlNodeArrayProperty() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4436,7 +4681,7 @@ public object Read118_TypeWithXmlNodeArrayProperty() { return (object)o; } - public object Read119_Animal() { + public object Read123_Animal() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4454,7 +4699,7 @@ public object Read119_Animal() { return (object)o; } - public object Read120_Dog() { + public object Read124_Dog() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4472,7 +4717,7 @@ public object Read120_Dog() { return (object)o; } - public object Read121_DogBreed() { + public object Read125_DogBreed() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4492,7 +4737,7 @@ public object Read121_DogBreed() { return (object)o; } - public object Read122_Group() { + public object Read126_Group() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4510,7 +4755,7 @@ public object Read122_Group() { return (object)o; } - public object Read123_Vehicle() { + public object Read127_Vehicle() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4528,7 +4773,7 @@ public object Read123_Vehicle() { return (object)o; } - public object Read124_Employee() { + public object Read128_Employee() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4546,7 +4791,7 @@ public object Read124_Employee() { return (object)o; } - public object Read125_BaseClass() { + public object Read129_BaseClass() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4564,7 +4809,7 @@ public object Read125_BaseClass() { return (object)o; } - public object Read126_DerivedClass() { + public object Read130_DerivedClass() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4582,7 +4827,7 @@ public object Read126_DerivedClass() { return (object)o; } - public object Read127_PurchaseOrder() { + public object Read131_PurchaseOrder() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4600,7 +4845,7 @@ public object Read127_PurchaseOrder() { return (object)o; } - public object Read128_Address() { + public object Read132_Address() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4618,7 +4863,7 @@ public object Read128_Address() { return (object)o; } - public object Read129_OrderedItem() { + public object Read133_OrderedItem() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4636,7 +4881,7 @@ public object Read129_OrderedItem() { return (object)o; } - public object Read130_AliasedTestType() { + public object Read134_AliasedTestType() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4654,7 +4899,7 @@ public object Read130_AliasedTestType() { return (object)o; } - public object Read131_BaseClass1() { + public object Read135_BaseClass1() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4672,7 +4917,7 @@ public object Read131_BaseClass1() { return (object)o; } - public object Read132_DerivedClass1() { + public object Read136_DerivedClass1() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4690,7 +4935,7 @@ public object Read132_DerivedClass1() { return (object)o; } - public object Read133_ArrayOfDateTime() { + public object Read137_ArrayOfDateTime() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4740,7 +4985,7 @@ public object Read133_ArrayOfDateTime() { return (object)o; } - public object Read134_Orchestra() { + public object Read138_Orchestra() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4758,7 +5003,7 @@ public object Read134_Orchestra() { return (object)o; } - public object Read135_Instrument() { + public object Read139_Instrument() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4776,7 +5021,7 @@ public object Read135_Instrument() { return (object)o; } - public object Read136_Brass() { + public object Read140_Brass() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4794,7 +5039,7 @@ public object Read136_Brass() { return (object)o; } - public object Read137_Trumpet() { + public object Read141_Trumpet() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4812,7 +5057,7 @@ public object Read137_Trumpet() { return (object)o; } - public object Read138_Pet() { + public object Read142_Pet() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4830,7 +5075,7 @@ public object Read138_Pet() { return (object)o; } - public object Read139_DefaultValuesSetToNaN() { + public object Read143_DefaultValuesSetToNaN() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4848,7 +5093,7 @@ public object Read139_DefaultValuesSetToNaN() { return (object)o; } - public object Read140_Item() { + public object Read144_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4866,7 +5111,7 @@ public object Read140_Item() { return (object)o; } - public object Read141_Item() { + public object Read145_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4884,7 +5129,7 @@ public object Read141_Item() { return (object)o; } - public object Read142_RootElement() { + public object Read146_RootElement() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4902,7 +5147,7 @@ public object Read142_RootElement() { return (object)o; } - public object Read143_TypeWithLinkedProperty() { + public object Read147_TypeWithLinkedProperty() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4920,7 +5165,7 @@ public object Read143_TypeWithLinkedProperty() { return (object)o; } - public object Read144_Document() { + public object Read148_Document() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4938,7 +5183,7 @@ public object Read144_Document() { return (object)o; } - public object Read145_RootClass() { + public object Read149_RootClass() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4956,7 +5201,7 @@ public object Read145_RootClass() { return (object)o; } - public object Read146_Parameter() { + public object Read150_Parameter() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4974,7 +5219,7 @@ public object Read146_Parameter() { return (object)o; } - public object Read147_XElementWrapper() { + public object Read151_XElementWrapper() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4992,7 +5237,7 @@ public object Read147_XElementWrapper() { return (object)o; } - public object Read148_XElementStruct() { + public object Read152_XElementStruct() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -5010,7 +5255,7 @@ public object Read148_XElementStruct() { return (object)o; } - public object Read149_XElementArrayWrapper() { + public object Read153_XElementArrayWrapper() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -5028,7 +5273,7 @@ public object Read149_XElementArrayWrapper() { return (object)o; } - public object Read150_TypeWithDateTimeStringProperty() { + public object Read154_TypeWithDateTimeStringProperty() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -5046,7 +5291,7 @@ public object Read150_TypeWithDateTimeStringProperty() { return (object)o; } - public object Read151_SimpleType() { + public object Read155_SimpleType() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -5064,7 +5309,7 @@ public object Read151_SimpleType() { return (object)o; } - public object Read152_TypeWithGetSetArrayMembers() { + public object Read156_TypeWithGetSetArrayMembers() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -5082,7 +5327,7 @@ public object Read152_TypeWithGetSetArrayMembers() { return (object)o; } - public object Read153_TypeWithGetOnlyArrayProperties() { + public object Read157_TypeWithGetOnlyArrayProperties() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -5100,13 +5345,31 @@ public object Read153_TypeWithGetOnlyArrayProperties() { return (object)o; } - public object Read154_StructNotSerializable() { + public object Read158_TypeWithArraylikeMembers() { + object o = null; + Reader.MoveToContent(); + if (Reader.NodeType == System.Xml.XmlNodeType.Element) { + do { + if (((object) Reader.LocalName == (object)id48_TypeWithArraylikeMembers && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read48_TypeWithArraylikeMembers(true, true); + break; + } + throw CreateUnknownNodeException(); + } while (false); + } + else { + UnknownNode(null, @":TypeWithArraylikeMembers"); + } + return (object)o; + } + + public object Read159_StructNotSerializable() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id48_StructNotSerializable && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read48_StructNotSerializable(true); + if (((object) Reader.LocalName == (object)id49_StructNotSerializable && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read49_StructNotSerializable(true); break; } throw CreateUnknownNodeException(); @@ -5118,13 +5381,13 @@ public object Read154_StructNotSerializable() { return (object)o; } - public object Read155_TypeWithMyCollectionField() { + public object Read160_TypeWithMyCollectionField() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id49_TypeWithMyCollectionField && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read49_TypeWithMyCollectionField(true, true); + if (((object) Reader.LocalName == (object)id50_TypeWithMyCollectionField && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read50_TypeWithMyCollectionField(true, true); break; } throw CreateUnknownNodeException(); @@ -5136,13 +5399,13 @@ public object Read155_TypeWithMyCollectionField() { return (object)o; } - public object Read156_Item() { + public object Read161_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id50_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read50_Item(true, true); + if (((object) Reader.LocalName == (object)id51_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read51_Item(true, true); break; } throw CreateUnknownNodeException(); @@ -5154,12 +5417,12 @@ public object Read156_Item() { return (object)o; } - public object Read157_ArrayOfAnyType() { + public object Read162_ArrayOfAnyType() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id51_ArrayOfAnyType && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id52_ArrayOfAnyType && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { if ((object)(o) == null) o = new global::SerializationTypes.MyList(); global::SerializationTypes.MyList a_0_0 = (global::SerializationTypes.MyList)o; @@ -5172,7 +5435,7 @@ public object Read157_ArrayOfAnyType() { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id52_anyType && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id53_anyType && (object) Reader.NamespaceURI == (object)id2_Item)) { if ((object)(a_0_0) == null) Reader.Skip(); else a_0_0.Add(Read1_Object(true, true)); break; } @@ -5202,14 +5465,14 @@ public object Read157_ArrayOfAnyType() { return (object)o; } - public object Read158_MyEnum() { + public object Read163_MyEnum() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id53_MyEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id54_MyEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { { - o = Read51_MyEnum(Reader.ReadElementString()); + o = Read52_MyEnum(Reader.ReadElementString()); } break; } @@ -5222,13 +5485,13 @@ public object Read158_MyEnum() { return (object)o; } - public object Read159_TypeWithEnumMembers() { + public object Read164_TypeWithEnumMembers() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id54_TypeWithEnumMembers && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read52_TypeWithEnumMembers(true, true); + if (((object) Reader.LocalName == (object)id55_TypeWithEnumMembers && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read53_TypeWithEnumMembers(true, true); break; } throw CreateUnknownNodeException(); @@ -5240,13 +5503,13 @@ public object Read159_TypeWithEnumMembers() { return (object)o; } - public object Read160_DCStruct() { + public object Read165_DCStruct() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id55_DCStruct && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read53_DCStruct(true); + if (((object) Reader.LocalName == (object)id56_DCStruct && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read54_DCStruct(true); break; } throw CreateUnknownNodeException(); @@ -5258,13 +5521,13 @@ public object Read160_DCStruct() { return (object)o; } - public object Read161_DCClassWithEnumAndStruct() { + public object Read166_DCClassWithEnumAndStruct() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id56_DCClassWithEnumAndStruct && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read54_DCClassWithEnumAndStruct(true, true); + if (((object) Reader.LocalName == (object)id57_DCClassWithEnumAndStruct && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read55_DCClassWithEnumAndStruct(true, true); break; } throw CreateUnknownNodeException(); @@ -5276,13 +5539,13 @@ public object Read161_DCClassWithEnumAndStruct() { return (object)o; } - public object Read162_BuiltInTypes() { + public object Read167_BuiltInTypes() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id57_BuiltInTypes && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read55_BuiltInTypes(true, true); + if (((object) Reader.LocalName == (object)id58_BuiltInTypes && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read56_BuiltInTypes(true, true); break; } throw CreateUnknownNodeException(); @@ -5294,13 +5557,13 @@ public object Read162_BuiltInTypes() { return (object)o; } - public object Read163_TypeA() { + public object Read168_TypeA() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id58_TypeA && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read56_TypeA(true, true); + if (((object) Reader.LocalName == (object)id59_TypeA && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read57_TypeA(true, true); break; } throw CreateUnknownNodeException(); @@ -5312,13 +5575,13 @@ public object Read163_TypeA() { return (object)o; } - public object Read164_TypeB() { + public object Read169_TypeB() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id59_TypeB && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read57_TypeB(true, true); + if (((object) Reader.LocalName == (object)id60_TypeB && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read58_TypeB(true, true); break; } throw CreateUnknownNodeException(); @@ -5330,13 +5593,13 @@ public object Read164_TypeB() { return (object)o; } - public object Read165_TypeHasArrayOfASerializedAsB() { + public object Read170_TypeHasArrayOfASerializedAsB() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id60_TypeHasArrayOfASerializedAsB && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read58_TypeHasArrayOfASerializedAsB(true, true); + if (((object) Reader.LocalName == (object)id61_TypeHasArrayOfASerializedAsB && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read59_TypeHasArrayOfASerializedAsB(true, true); break; } throw CreateUnknownNodeException(); @@ -5348,13 +5611,13 @@ public object Read165_TypeHasArrayOfASerializedAsB() { return (object)o; } - public object Read166_Item() { + public object Read171_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id61_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read59_Item(true, true); + if (((object) Reader.LocalName == (object)id62_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read60_Item(true, true); break; } throw CreateUnknownNodeException(); @@ -5366,13 +5629,13 @@ public object Read166_Item() { return (object)o; } - public object Read167_BaseClassWithSamePropertyName() { + public object Read172_BaseClassWithSamePropertyName() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id62_BaseClassWithSamePropertyName && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read60_BaseClassWithSamePropertyName(true, true); + if (((object) Reader.LocalName == (object)id63_BaseClassWithSamePropertyName && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read61_BaseClassWithSamePropertyName(true, true); break; } throw CreateUnknownNodeException(); @@ -5384,13 +5647,13 @@ public object Read167_BaseClassWithSamePropertyName() { return (object)o; } - public object Read168_DerivedClassWithSameProperty() { + public object Read173_DerivedClassWithSameProperty() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id63_DerivedClassWithSameProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read61_DerivedClassWithSameProperty(true, true); + if (((object) Reader.LocalName == (object)id64_DerivedClassWithSameProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read62_DerivedClassWithSameProperty(true, true); break; } throw CreateUnknownNodeException(); @@ -5402,13 +5665,13 @@ public object Read168_DerivedClassWithSameProperty() { return (object)o; } - public object Read169_DerivedClassWithSameProperty2() { + public object Read174_DerivedClassWithSameProperty2() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id64_DerivedClassWithSameProperty2 && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read62_DerivedClassWithSameProperty2(true, true); + if (((object) Reader.LocalName == (object)id65_DerivedClassWithSameProperty2 && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read63_DerivedClassWithSameProperty2(true, true); break; } throw CreateUnknownNodeException(); @@ -5420,13 +5683,13 @@ public object Read169_DerivedClassWithSameProperty2() { return (object)o; } - public object Read170_Item() { + public object Read175_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id65_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read63_Item(true, true); + if (((object) Reader.LocalName == (object)id66_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read64_Item(true, true); break; } throw CreateUnknownNodeException(); @@ -5438,13 +5701,13 @@ public object Read170_Item() { return (object)o; } - public object Read171_TypeWithByteArrayAsXmlText() { + public object Read176_TypeWithByteArrayAsXmlText() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id66_TypeWithByteArrayAsXmlText && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read64_TypeWithByteArrayAsXmlText(true, true); + if (((object) Reader.LocalName == (object)id67_TypeWithByteArrayAsXmlText && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read65_TypeWithByteArrayAsXmlText(true, true); break; } throw CreateUnknownNodeException(); @@ -5456,13 +5719,13 @@ public object Read171_TypeWithByteArrayAsXmlText() { return (object)o; } - public object Read172_SimpleDC() { + public object Read177_SimpleDC() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id67_SimpleDC && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read65_SimpleDC(true, true); + if (((object) Reader.LocalName == (object)id68_SimpleDC && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read66_SimpleDC(true, true); break; } throw CreateUnknownNodeException(); @@ -5474,13 +5737,13 @@ public object Read172_SimpleDC() { return (object)o; } - public object Read173_Item() { + public object Read178_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id68_Item && (object) Reader.NamespaceURI == (object)id69_Item)) { - o = Read66_Item(false, true); + if (((object) Reader.LocalName == (object)id69_Item && (object) Reader.NamespaceURI == (object)id70_Item)) { + o = Read67_Item(false, true); break; } throw CreateUnknownNodeException(); @@ -5492,14 +5755,14 @@ public object Read173_Item() { return (object)o; } - public object Read174_EnumFlags() { + public object Read179_EnumFlags() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id70_EnumFlags && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id71_EnumFlags && (object) Reader.NamespaceURI == (object)id2_Item)) { { - o = Read67_EnumFlags(Reader.ReadElementString()); + o = Read68_EnumFlags(Reader.ReadElementString()); } break; } @@ -5512,13 +5775,13 @@ public object Read174_EnumFlags() { return (object)o; } - public object Read175_ClassImplementsInterface() { + public object Read180_ClassImplementsInterface() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id71_ClassImplementsInterface && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read68_ClassImplementsInterface(true, true); + if (((object) Reader.LocalName == (object)id72_ClassImplementsInterface && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read69_ClassImplementsInterface(true, true); break; } throw CreateUnknownNodeException(); @@ -5530,13 +5793,13 @@ public object Read175_ClassImplementsInterface() { return (object)o; } - public object Read176_WithStruct() { + public object Read181_WithStruct() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id72_WithStruct && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read70_WithStruct(true, true); + if (((object) Reader.LocalName == (object)id73_WithStruct && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read71_WithStruct(true, true); break; } throw CreateUnknownNodeException(); @@ -5548,13 +5811,13 @@ public object Read176_WithStruct() { return (object)o; } - public object Read177_SomeStruct() { + public object Read182_SomeStruct() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id73_SomeStruct && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read69_SomeStruct(true); + if (((object) Reader.LocalName == (object)id74_SomeStruct && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read70_SomeStruct(true); break; } throw CreateUnknownNodeException(); @@ -5566,13 +5829,13 @@ public object Read177_SomeStruct() { return (object)o; } - public object Read178_WithEnums() { + public object Read183_WithEnums() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id74_WithEnums && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read73_WithEnums(true, true); + if (((object) Reader.LocalName == (object)id75_WithEnums && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read74_WithEnums(true, true); break; } throw CreateUnknownNodeException(); @@ -5584,13 +5847,13 @@ public object Read178_WithEnums() { return (object)o; } - public object Read179_WithNullables() { + public object Read184_WithNullables() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id75_WithNullables && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read77_WithNullables(true, true); + if (((object) Reader.LocalName == (object)id76_WithNullables && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read78_WithNullables(true, true); break; } throw CreateUnknownNodeException(); @@ -5602,14 +5865,14 @@ public object Read179_WithNullables() { return (object)o; } - public object Read180_ByteEnum() { + public object Read185_ByteEnum() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id76_ByteEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id77_ByteEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { { - o = Read78_ByteEnum(Reader.ReadElementString()); + o = Read79_ByteEnum(Reader.ReadElementString()); } break; } @@ -5622,14 +5885,14 @@ public object Read180_ByteEnum() { return (object)o; } - public object Read181_SByteEnum() { + public object Read186_SByteEnum() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id77_SByteEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id78_SByteEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { { - o = Read79_SByteEnum(Reader.ReadElementString()); + o = Read80_SByteEnum(Reader.ReadElementString()); } break; } @@ -5642,14 +5905,14 @@ public object Read181_SByteEnum() { return (object)o; } - public object Read182_ShortEnum() { + public object Read187_ShortEnum() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id78_ShortEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id79_ShortEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { { - o = Read72_ShortEnum(Reader.ReadElementString()); + o = Read73_ShortEnum(Reader.ReadElementString()); } break; } @@ -5662,14 +5925,14 @@ public object Read182_ShortEnum() { return (object)o; } - public object Read183_IntEnum() { + public object Read188_IntEnum() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id79_IntEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id80_IntEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { { - o = Read71_IntEnum(Reader.ReadElementString()); + o = Read72_IntEnum(Reader.ReadElementString()); } break; } @@ -5682,14 +5945,14 @@ public object Read183_IntEnum() { return (object)o; } - public object Read184_UIntEnum() { + public object Read189_UIntEnum() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id80_UIntEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id81_UIntEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { { - o = Read80_UIntEnum(Reader.ReadElementString()); + o = Read81_UIntEnum(Reader.ReadElementString()); } break; } @@ -5702,14 +5965,14 @@ public object Read184_UIntEnum() { return (object)o; } - public object Read185_LongEnum() { + public object Read190_LongEnum() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id81_LongEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id82_LongEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { { - o = Read81_LongEnum(Reader.ReadElementString()); + o = Read82_LongEnum(Reader.ReadElementString()); } break; } @@ -5722,14 +5985,14 @@ public object Read185_LongEnum() { return (object)o; } - public object Read186_ULongEnum() { + public object Read191_ULongEnum() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id82_ULongEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id83_ULongEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { { - o = Read82_ULongEnum(Reader.ReadElementString()); + o = Read83_ULongEnum(Reader.ReadElementString()); } break; } @@ -5742,13 +6005,13 @@ public object Read186_ULongEnum() { return (object)o; } - public object Read187_AttributeTesting() { + public object Read192_AttributeTesting() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id83_AttributeTesting && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read84_XmlSerializerAttributes(false, true); + if (((object) Reader.LocalName == (object)id84_AttributeTesting && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read85_XmlSerializerAttributes(false, true); break; } throw CreateUnknownNodeException(); @@ -5760,14 +6023,14 @@ public object Read187_AttributeTesting() { return (object)o; } - public object Read188_ItemChoiceType() { + public object Read193_ItemChoiceType() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id84_ItemChoiceType && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id85_ItemChoiceType && (object) Reader.NamespaceURI == (object)id2_Item)) { { - o = Read83_ItemChoiceType(Reader.ReadElementString()); + o = Read84_ItemChoiceType(Reader.ReadElementString()); } break; } @@ -5780,13 +6043,13 @@ public object Read188_ItemChoiceType() { return (object)o; } - public object Read189_TypeWithAnyAttribute() { + public object Read194_TypeWithAnyAttribute() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id85_TypeWithAnyAttribute && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read85_TypeWithAnyAttribute(true, true); + if (((object) Reader.LocalName == (object)id86_TypeWithAnyAttribute && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read86_TypeWithAnyAttribute(true, true); break; } throw CreateUnknownNodeException(); @@ -5798,13 +6061,13 @@ public object Read189_TypeWithAnyAttribute() { return (object)o; } - public object Read190_KnownTypesThroughConstructor() { + public object Read195_KnownTypesThroughConstructor() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id86_KnownTypesThroughConstructor && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read86_KnownTypesThroughConstructor(true, true); + if (((object) Reader.LocalName == (object)id87_KnownTypesThroughConstructor && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read87_KnownTypesThroughConstructor(true, true); break; } throw CreateUnknownNodeException(); @@ -5816,13 +6079,13 @@ public object Read190_KnownTypesThroughConstructor() { return (object)o; } - public object Read191_SimpleKnownTypeValue() { + public object Read196_SimpleKnownTypeValue() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id87_SimpleKnownTypeValue && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read87_SimpleKnownTypeValue(true, true); + if (((object) Reader.LocalName == (object)id88_SimpleKnownTypeValue && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read88_SimpleKnownTypeValue(true, true); break; } throw CreateUnknownNodeException(); @@ -5834,12 +6097,12 @@ public object Read191_SimpleKnownTypeValue() { return (object)o; } - public object Read192_Item() { + public object Read197_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id88_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id89_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { o = (global::SerializationTypes.ClassImplementingIXmlSerialiable)ReadSerializable(( System.Xml.Serialization.IXmlSerializable)new global::SerializationTypes.ClassImplementingIXmlSerialiable()); break; } @@ -5852,13 +6115,13 @@ public object Read192_Item() { return (object)o; } - public object Read193_TypeWithPropertyNameSpecified() { + public object Read198_TypeWithPropertyNameSpecified() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id89_TypeWithPropertyNameSpecified && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read88_TypeWithPropertyNameSpecified(true, true); + if (((object) Reader.LocalName == (object)id90_TypeWithPropertyNameSpecified && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read89_TypeWithPropertyNameSpecified(true, true); break; } throw CreateUnknownNodeException(); @@ -5870,13 +6133,13 @@ public object Read193_TypeWithPropertyNameSpecified() { return (object)o; } - public object Read194_TypeWithXmlSchemaFormAttribute() { + public object Read199_TypeWithXmlSchemaFormAttribute() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id90_TypeWithXmlSchemaFormAttribute && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read89_TypeWithXmlSchemaFormAttribute(true, true); + if (((object) Reader.LocalName == (object)id91_TypeWithXmlSchemaFormAttribute && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read90_TypeWithXmlSchemaFormAttribute(true, true); break; } throw CreateUnknownNodeException(); @@ -5888,13 +6151,13 @@ public object Read194_TypeWithXmlSchemaFormAttribute() { return (object)o; } - public object Read195_MyXmlType() { + public object Read200_MyXmlType() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id91_MyXmlType && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read90_Item(true, true); + if (((object) Reader.LocalName == (object)id92_MyXmlType && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read91_Item(true, true); break; } throw CreateUnknownNodeException(); @@ -5906,13 +6169,13 @@ public object Read195_MyXmlType() { return (object)o; } - public object Read196_Item() { + public object Read201_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id92_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read91_Item(true, true); + if (((object) Reader.LocalName == (object)id93_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read92_Item(true, true); break; } throw CreateUnknownNodeException(); @@ -5924,13 +6187,13 @@ public object Read196_Item() { return (object)o; } - public object Read197_Item() { + public object Read202_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id93_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read92_Item(true, true); + if (((object) Reader.LocalName == (object)id94_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read93_Item(true, true); break; } throw CreateUnknownNodeException(); @@ -5942,13 +6205,13 @@ public object Read197_Item() { return (object)o; } - public object Read198_ServerSettings() { + public object Read203_ServerSettings() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id94_ServerSettings && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read93_ServerSettings(true, true); + if (((object) Reader.LocalName == (object)id95_ServerSettings && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read94_ServerSettings(true, true); break; } throw CreateUnknownNodeException(); @@ -5960,13 +6223,13 @@ public object Read198_ServerSettings() { return (object)o; } - public object Read199_TypeWithXmlQualifiedName() { + public object Read204_TypeWithXmlQualifiedName() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id95_TypeWithXmlQualifiedName && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read94_TypeWithXmlQualifiedName(true, true); + if (((object) Reader.LocalName == (object)id96_TypeWithXmlQualifiedName && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read95_TypeWithXmlQualifiedName(true, true); break; } throw CreateUnknownNodeException(); @@ -5978,13 +6241,13 @@ public object Read199_TypeWithXmlQualifiedName() { return (object)o; } - public object Read200_TypeWith2DArrayProperty2() { + public object Read205_TypeWith2DArrayProperty2() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id96_TypeWith2DArrayProperty2 && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read95_TypeWith2DArrayProperty2(true, true); + if (((object) Reader.LocalName == (object)id97_TypeWith2DArrayProperty2 && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read96_TypeWith2DArrayProperty2(true, true); break; } throw CreateUnknownNodeException(); @@ -5996,13 +6259,13 @@ public object Read200_TypeWith2DArrayProperty2() { return (object)o; } - public object Read201_Item() { + public object Read206_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id97_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read96_Item(true, true); + if (((object) Reader.LocalName == (object)id98_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read97_Item(true, true); break; } throw CreateUnknownNodeException(); @@ -6014,13 +6277,13 @@ public object Read201_Item() { return (object)o; } - public object Read202_Item() { + public object Read207_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id98_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read97_Item(true, true); + if (((object) Reader.LocalName == (object)id99_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read98_Item(true, true); break; } throw CreateUnknownNodeException(); @@ -6032,13 +6295,13 @@ public object Read202_Item() { return (object)o; } - public object Read203_Item() { + public object Read208_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id99_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read98_Item(true, true); + if (((object) Reader.LocalName == (object)id100_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read99_Item(true, true); break; } throw CreateUnknownNodeException(); @@ -6050,13 +6313,13 @@ public object Read203_Item() { return (object)o; } - public object Read204_TypeWithShouldSerializeMethod() { + public object Read209_TypeWithShouldSerializeMethod() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id100_TypeWithShouldSerializeMethod && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read99_TypeWithShouldSerializeMethod(true, true); + if (((object) Reader.LocalName == (object)id101_TypeWithShouldSerializeMethod && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read100_TypeWithShouldSerializeMethod(true, true); break; } throw CreateUnknownNodeException(); @@ -6068,13 +6331,13 @@ public object Read204_TypeWithShouldSerializeMethod() { return (object)o; } - public object Read205_Item() { + public object Read210_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id101_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read100_Item(true, true); + if (((object) Reader.LocalName == (object)id102_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read101_Item(true, true); break; } throw CreateUnknownNodeException(); @@ -6086,13 +6349,13 @@ public object Read205_Item() { return (object)o; } - public object Read206_Item() { + public object Read211_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id102_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read101_Item(true, true); + if (((object) Reader.LocalName == (object)id103_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read102_Item(true, true); break; } throw CreateUnknownNodeException(); @@ -6104,13 +6367,13 @@ public object Read206_Item() { return (object)o; } - public object Read207_Item() { + public object Read212_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id103_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read102_Item(true, true); + if (((object) Reader.LocalName == (object)id104_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read103_Item(true, true); break; } throw CreateUnknownNodeException(); @@ -6122,13 +6385,13 @@ public object Read207_Item() { return (object)o; } - public object Read208_Item() { + public object Read213_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id104_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read104_Item(true, true); + if (((object) Reader.LocalName == (object)id105_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read105_Item(true, true); break; } throw CreateUnknownNodeException(); @@ -6140,15 +6403,33 @@ public object Read208_Item() { return (object)o; } - public object Read209_MoreChoices() { + public object Read214_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id105_MoreChoices && (object) Reader.NamespaceURI == (object)id2_Item)) { - { - o = Read103_MoreChoices(Reader.ReadElementString()); - } + if (((object) Reader.LocalName == (object)id106_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read108_Item(true, true); + break; + } + throw CreateUnknownNodeException(); + } while (false); + } + else { + UnknownNode(null, @":TypeWithPropertyHavingComplexChoice"); + } + return (object)o; + } + + public object Read215_MoreChoices() { + object o = null; + Reader.MoveToContent(); + if (Reader.NodeType == System.Xml.XmlNodeType.Element) { + do { + if (((object) Reader.LocalName == (object)id107_MoreChoices && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + o = Read104_MoreChoices(Reader.ReadElementString()); + } break; } throw CreateUnknownNodeException(); @@ -6160,13 +6441,49 @@ public object Read209_MoreChoices() { return (object)o; } - public object Read210_TypeWithFieldsOrdered() { + public object Read216_ComplexChoiceA() { + object o = null; + Reader.MoveToContent(); + if (Reader.NodeType == System.Xml.XmlNodeType.Element) { + do { + if (((object) Reader.LocalName == (object)id108_ComplexChoiceA && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read107_ComplexChoiceA(true, true); + break; + } + throw CreateUnknownNodeException(); + } while (false); + } + else { + UnknownNode(null, @":ComplexChoiceA"); + } + return (object)o; + } + + public object Read217_ComplexChoiceB() { + object o = null; + Reader.MoveToContent(); + if (Reader.NodeType == System.Xml.XmlNodeType.Element) { + do { + if (((object) Reader.LocalName == (object)id109_ComplexChoiceB && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read106_ComplexChoiceB(true, true); + break; + } + throw CreateUnknownNodeException(); + } while (false); + } + else { + UnknownNode(null, @":ComplexChoiceB"); + } + return (object)o; + } + + public object Read218_TypeWithFieldsOrdered() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id106_TypeWithFieldsOrdered && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read105_TypeWithFieldsOrdered(true, true); + if (((object) Reader.LocalName == (object)id110_TypeWithFieldsOrdered && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read109_TypeWithFieldsOrdered(true, true); break; } throw CreateUnknownNodeException(); @@ -6178,13 +6495,13 @@ public object Read210_TypeWithFieldsOrdered() { return (object)o; } - public object Read211_Item() { + public object Read219_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id107_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read106_Item(true, true); + if (((object) Reader.LocalName == (object)id111_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read110_Item(true, true); break; } throw CreateUnknownNodeException(); @@ -6196,13 +6513,13 @@ public object Read211_Item() { return (object)o; } - public object Read212_Root() { + public object Read220_Root() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id108_Root && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read109_Item(true, true); + if (((object) Reader.LocalName == (object)id112_Root && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read113_Item(true, true); break; } throw CreateUnknownNodeException(); @@ -6214,13 +6531,13 @@ public object Read212_Root() { return (object)o; } - public object Read213_TypeClashB() { + public object Read221_TypeClashB() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id109_TypeClashB && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read108_TypeNameClash(true, true); + if (((object) Reader.LocalName == (object)id113_TypeClashB && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read112_TypeNameClash(true, true); break; } throw CreateUnknownNodeException(); @@ -6232,13 +6549,13 @@ public object Read213_TypeClashB() { return (object)o; } - public object Read214_TypeClashA() { + public object Read222_TypeClashA() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id110_TypeClashA && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read107_TypeNameClash(true, true); + if (((object) Reader.LocalName == (object)id114_TypeClashA && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read111_TypeNameClash(true, true); break; } throw CreateUnknownNodeException(); @@ -6250,13 +6567,13 @@ public object Read214_TypeClashA() { return (object)o; } - public object Read215_Person() { + public object Read223_Person() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id111_Person && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read110_Person(true, true); + if (((object) Reader.LocalName == (object)id115_Person && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read114_Person(true, true); break; } throw CreateUnknownNodeException(); @@ -6268,12 +6585,12 @@ public object Read215_Person() { return (object)o; } - global::Outer.Person Read110_Person(bool isNullable, bool checkType) { + global::Outer.Person Read114_Person(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id111_Person && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id115_Person && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -6298,21 +6615,21 @@ public object Read215_Person() { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id112_FirstName && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id116_FirstName && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@FirstName = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id113_MiddleName && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id117_MiddleName && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@MiddleName = Reader.ReadElementString(); } paramsRead[1] = true; break; } - if (!paramsRead[2] && ((object) Reader.LocalName == (object)id114_LastName && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id118_LastName && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@LastName = Reader.ReadElementString(); } @@ -6331,12 +6648,12 @@ public object Read215_Person() { return o; } - global::SerializationTypes.TypeNameClashA.TypeNameClash Read107_TypeNameClash(bool isNullable, bool checkType) { + global::SerializationTypes.TypeNameClashA.TypeNameClash Read111_TypeNameClash(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id110_TypeClashA && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id114_TypeClashA && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -6361,7 +6678,7 @@ public object Read215_Person() { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id115_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id119_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Name = Reader.ReadElementString(); } @@ -6380,12 +6697,12 @@ public object Read215_Person() { return o; } - global::SerializationTypes.TypeNameClashB.TypeNameClash Read108_TypeNameClash(bool isNullable, bool checkType) { + global::SerializationTypes.TypeNameClashB.TypeNameClash Read112_TypeNameClash(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id109_TypeClashB && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id113_TypeClashB && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -6410,7 +6727,7 @@ public object Read215_Person() { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id115_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id119_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Name = Reader.ReadElementString(); } @@ -6429,12 +6746,12 @@ public object Read215_Person() { return o; } - global::SerializationTypes.NamespaceTypeNameClashContainer Read109_Item(bool isNullable, bool checkType) { + global::SerializationTypes.NamespaceTypeNameClashContainer Read113_Item(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id116_ContainerType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id120_ContainerType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -6465,12 +6782,12 @@ public object Read215_Person() { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id117_A && (object) Reader.NamespaceURI == (object)id2_Item)) { - a_0 = (global::SerializationTypes.TypeNameClashA.TypeNameClash[])EnsureArrayIndex(a_0, ca_0, typeof(global::SerializationTypes.TypeNameClashA.TypeNameClash));a_0[ca_0++] = Read107_TypeNameClash(false, true); + if (((object) Reader.LocalName == (object)id121_A && (object) Reader.NamespaceURI == (object)id2_Item)) { + a_0 = (global::SerializationTypes.TypeNameClashA.TypeNameClash[])EnsureArrayIndex(a_0, ca_0, typeof(global::SerializationTypes.TypeNameClashA.TypeNameClash));a_0[ca_0++] = Read111_TypeNameClash(false, true); break; } - if (((object) Reader.LocalName == (object)id118_B && (object) Reader.NamespaceURI == (object)id2_Item)) { - a_1 = (global::SerializationTypes.TypeNameClashB.TypeNameClash[])EnsureArrayIndex(a_1, ca_1, typeof(global::SerializationTypes.TypeNameClashB.TypeNameClash));a_1[ca_1++] = Read108_TypeNameClash(false, true); + if (((object) Reader.LocalName == (object)id122_B && (object) Reader.NamespaceURI == (object)id2_Item)) { + a_1 = (global::SerializationTypes.TypeNameClashB.TypeNameClash[])EnsureArrayIndex(a_1, ca_1, typeof(global::SerializationTypes.TypeNameClashB.TypeNameClash));a_1[ca_1++] = Read112_TypeNameClash(false, true); break; } UnknownNode((object)o, @":A, :B"); @@ -6487,12 +6804,12 @@ public object Read215_Person() { return o; } - global::SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName Read106_Item(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName Read110_Item(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id107_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id111_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -6517,12 +6834,12 @@ public object Read215_Person() { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id119_Value1 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id123_Value1 && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@Value1 = Read1_Object(false, true); paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id120_Value2 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id124_Value2 && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@Value2 = Read1_Object(false, true); paramsRead[1] = true; break; @@ -6552,102 +6869,110 @@ public object Read215_Person() { return ReadTypedPrimitive(new System.Xml.XmlQualifiedName("anyType", "http://www.w3.org/2001/XMLSchema")); } else { - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id111_Person && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read110_Person(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id116_ContainerType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read109_Item(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id109_TypeClashB && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read108_TypeNameClash(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id110_TypeClashA && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read107_TypeNameClash(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id107_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read106_Item(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id106_TypeWithFieldsOrdered && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read105_TypeWithFieldsOrdered(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id115_Person && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read114_Person(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id120_ContainerType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read113_Item(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id113_TypeClashB && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read112_TypeNameClash(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id114_TypeClashA && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read111_TypeNameClash(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id111_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read110_Item(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id110_TypeWithFieldsOrdered && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read109_TypeWithFieldsOrdered(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id106_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read108_Item(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id108_ComplexChoiceA && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read107_ComplexChoiceA(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id109_ComplexChoiceB && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read106_ComplexChoiceB(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id105_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read105_Item(isNullable, false); if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id104_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read104_Item(isNullable, false); + return Read103_Item(isNullable, false); if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id103_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) return Read102_Item(isNullable, false); if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id102_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) return Read101_Item(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id101_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read100_Item(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id100_TypeWithShouldSerializeMethod && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read99_TypeWithShouldSerializeMethod(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id101_TypeWithShouldSerializeMethod && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read100_TypeWithShouldSerializeMethod(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id100_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read99_Item(isNullable, false); if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id99_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) return Read98_Item(isNullable, false); if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id98_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) return Read97_Item(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id97_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read96_Item(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id96_TypeWith2DArrayProperty2 && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read95_TypeWith2DArrayProperty2(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id95_TypeWithXmlQualifiedName && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read94_TypeWithXmlQualifiedName(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id94_ServerSettings && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read93_ServerSettings(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id93_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read92_Item(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id91_MyXmlType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read90_Item(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id90_TypeWithXmlSchemaFormAttribute && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read89_TypeWithXmlSchemaFormAttribute(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id89_TypeWithPropertyNameSpecified && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read88_TypeWithPropertyNameSpecified(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id87_SimpleKnownTypeValue && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read87_SimpleKnownTypeValue(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id86_KnownTypesThroughConstructor && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read86_KnownTypesThroughConstructor(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id85_TypeWithAnyAttribute && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read85_TypeWithAnyAttribute(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id121_XmlSerializerAttributes && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read84_XmlSerializerAttributes(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id75_WithNullables && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read77_WithNullables(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id74_WithEnums && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read73_WithEnums(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id72_WithStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read70_WithStruct(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id73_SomeStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read69_SomeStruct(false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id71_ClassImplementsInterface && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read68_ClassImplementsInterface(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id68_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id69_Item)) - return Read66_Item(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id67_SimpleDC && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read65_SimpleDC(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id66_TypeWithByteArrayAsXmlText && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read64_TypeWithByteArrayAsXmlText(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id65_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read63_Item(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id62_BaseClassWithSamePropertyName && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read60_BaseClassWithSamePropertyName(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id63_DerivedClassWithSameProperty && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read61_DerivedClassWithSameProperty(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id64_DerivedClassWithSameProperty2 && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read62_DerivedClassWithSameProperty2(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id61_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read59_Item(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id60_TypeHasArrayOfASerializedAsB && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read58_TypeHasArrayOfASerializedAsB(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id59_TypeB && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read57_TypeB(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id58_TypeA && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read56_TypeA(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id57_BuiltInTypes && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read55_BuiltInTypes(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id56_DCClassWithEnumAndStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read54_DCClassWithEnumAndStruct(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id55_DCStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read53_DCStruct(false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id54_TypeWithEnumMembers && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read52_TypeWithEnumMembers(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id50_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read50_Item(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id49_TypeWithMyCollectionField && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read49_TypeWithMyCollectionField(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id48_StructNotSerializable && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read48_StructNotSerializable(false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id97_TypeWith2DArrayProperty2 && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read96_TypeWith2DArrayProperty2(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id96_TypeWithXmlQualifiedName && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read95_TypeWithXmlQualifiedName(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id95_ServerSettings && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read94_ServerSettings(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id94_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read93_Item(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id92_MyXmlType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read91_Item(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id91_TypeWithXmlSchemaFormAttribute && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read90_TypeWithXmlSchemaFormAttribute(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id90_TypeWithPropertyNameSpecified && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read89_TypeWithPropertyNameSpecified(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id88_SimpleKnownTypeValue && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read88_SimpleKnownTypeValue(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id87_KnownTypesThroughConstructor && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read87_KnownTypesThroughConstructor(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id86_TypeWithAnyAttribute && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read86_TypeWithAnyAttribute(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id125_XmlSerializerAttributes && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read85_XmlSerializerAttributes(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id76_WithNullables && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read78_WithNullables(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id75_WithEnums && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read74_WithEnums(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id73_WithStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read71_WithStruct(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id74_SomeStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read70_SomeStruct(false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id72_ClassImplementsInterface && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read69_ClassImplementsInterface(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id69_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id70_Item)) + return Read67_Item(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id68_SimpleDC && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read66_SimpleDC(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id67_TypeWithByteArrayAsXmlText && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read65_TypeWithByteArrayAsXmlText(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id66_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read64_Item(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id63_BaseClassWithSamePropertyName && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read61_BaseClassWithSamePropertyName(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id64_DerivedClassWithSameProperty && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read62_DerivedClassWithSameProperty(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id65_DerivedClassWithSameProperty2 && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read63_DerivedClassWithSameProperty2(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id62_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read60_Item(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id61_TypeHasArrayOfASerializedAsB && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read59_TypeHasArrayOfASerializedAsB(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id60_TypeB && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read58_TypeB(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id59_TypeA && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read57_TypeA(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id58_BuiltInTypes && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read56_BuiltInTypes(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id57_DCClassWithEnumAndStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read55_DCClassWithEnumAndStruct(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id56_DCStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read54_DCStruct(false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id55_TypeWithEnumMembers && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read53_TypeWithEnumMembers(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id51_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read51_Item(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id50_TypeWithMyCollectionField && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read50_TypeWithMyCollectionField(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id49_StructNotSerializable && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read49_StructNotSerializable(false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id48_TypeWithArraylikeMembers && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read48_TypeWithArraylikeMembers(isNullable, false); if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id47_TypeWithGetOnlyArrayProperties && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) return Read47_TypeWithGetOnlyArrayProperties(isNullable, false); if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id46_TypeWithGetSetArrayMembers && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) @@ -6666,13 +6991,13 @@ public object Read215_Person() { return Read40_RootClass(isNullable, false); if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id40_Parameter && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) return Read39_Parameter(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id122_ParameterOfString && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id126_ParameterOfString && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) return Read38_ParameterOfString(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id123_MsgDocumentType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id38_httpexamplecom)) + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id127_MsgDocumentType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id38_httpexamplecom)) return Read37_MsgDocumentType(isNullable, false); if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id36_TypeWithLinkedProperty && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) return Read36_TypeWithLinkedProperty(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id124_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id128_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) return Read35_Item(isNullable, false); if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id34_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) return Read34_Item(isNullable, false); @@ -6742,7 +7067,7 @@ public object Read215_Person() { ReadEndElement(); return e; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id125_ArrayOfOrderedItem && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id19_httpwwwcontoso1com)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id129_ArrayOfOrderedItem && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id19_httpwwwcontoso1com)) { global::OrderedItem[] a = null; if (!ReadNull()) { global::OrderedItem[] z_0_0 = null; @@ -6774,7 +7099,7 @@ public object Read215_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id126_ArrayOfInt && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id130_ArrayOfInt && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { global::System.Collections.Generic.List a = null; if (!ReadNull()) { if ((object)(a) == null) a = new global::System.Collections.Generic.List(); @@ -6788,7 +7113,7 @@ public object Read215_Person() { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id127_int && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id131_int && (object) Reader.NamespaceURI == (object)id2_Item)) { { z_0_0.Add(System.Xml.XmlConvert.ToInt32(Reader.ReadElementString())); } @@ -6807,7 +7132,7 @@ public object Read215_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id128_ArrayOfString && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id132_ArrayOfString && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { global::System.Collections.Generic.List a = null; if (!ReadNull()) { if ((object)(a) == null) a = new global::System.Collections.Generic.List(); @@ -6821,7 +7146,7 @@ public object Read215_Person() { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id129_string && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id133_string && (object) Reader.NamespaceURI == (object)id2_Item)) { if (ReadNull()) { z_0_0.Add(null); } @@ -6843,7 +7168,7 @@ public object Read215_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id130_ArrayOfDouble && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id134_ArrayOfDouble && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { global::System.Collections.Generic.List a = null; if (!ReadNull()) { if ((object)(a) == null) a = new global::System.Collections.Generic.List(); @@ -6857,7 +7182,7 @@ public object Read215_Person() { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id131_double && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id135_double && (object) Reader.NamespaceURI == (object)id2_Item)) { { z_0_0.Add(System.Xml.XmlConvert.ToDouble(Reader.ReadElementString())); } @@ -6909,7 +7234,7 @@ public object Read215_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id132_ArrayOfInstrument && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id136_ArrayOfInstrument && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { global::Instrument[] a = null; if (!ReadNull()) { global::Instrument[] z_0_0 = null; @@ -6941,7 +7266,7 @@ public object Read215_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id133_ArrayOfTypeWithLinkedProperty && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id137_ArrayOfTypeWithLinkedProperty && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { global::System.Collections.Generic.List a = null; if (!ReadNull()) { if ((object)(a) == null) a = new global::System.Collections.Generic.List(); @@ -6972,7 +7297,7 @@ public object Read215_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id134_ArrayOfParameter && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id138_ArrayOfParameter && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { global::System.Collections.Generic.List a = null; if (!ReadNull()) { if ((object)(a) == null) a = new global::System.Collections.Generic.List(); @@ -7003,7 +7328,7 @@ public object Read215_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id135_ArrayOfXElement && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id139_ArrayOfXElement && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { global::System.Xml.Linq.XElement[] a = null; if (!ReadNull()) { global::System.Xml.Linq.XElement[] z_0_0 = null; @@ -7017,7 +7342,7 @@ public object Read215_Person() { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id136_XElement && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id140_XElement && (object) Reader.NamespaceURI == (object)id2_Item)) { z_0_0 = (global::System.Xml.Linq.XElement[])EnsureArrayIndex(z_0_0, cz_0_0, typeof(global::System.Xml.Linq.XElement));z_0_0[cz_0_0++] = (global::System.Xml.Linq.XElement)ReadSerializable(( System.Xml.Serialization.IXmlSerializable)new global::System.Xml.Linq.XElement("default"), true ); break; @@ -7036,7 +7361,7 @@ public object Read215_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id137_ArrayOfSimpleType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id141_ArrayOfSimpleType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { global::SerializationTypes.SimpleType[] a = null; if (!ReadNull()) { global::SerializationTypes.SimpleType[] z_0_0 = null; @@ -7068,7 +7393,7 @@ public object Read215_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id51_ArrayOfAnyType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id52_ArrayOfAnyType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { global::SerializationTypes.MyList a = null; if (!ReadNull()) { if ((object)(a) == null) a = new global::SerializationTypes.MyList(); @@ -7082,7 +7407,7 @@ public object Read215_Person() { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id52_anyType && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id53_anyType && (object) Reader.NamespaceURI == (object)id2_Item)) { if ((object)(z_0_0) == null) Reader.Skip(); else z_0_0.Add(Read1_Object(true, true)); break; } @@ -7099,13 +7424,13 @@ public object Read215_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id53_MyEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id54_MyEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { Reader.ReadStartElement(); - object e = Read51_MyEnum(CollapseWhitespace(Reader.ReadString())); + object e = Read52_MyEnum(CollapseWhitespace(Reader.ReadString())); ReadEndElement(); return e; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id138_ArrayOfTypeA && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id142_ArrayOfTypeA && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { global::SerializationTypes.TypeA[] a = null; if (!ReadNull()) { global::SerializationTypes.TypeA[] z_0_0 = null; @@ -7119,8 +7444,8 @@ public object Read215_Person() { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id58_TypeA && (object) Reader.NamespaceURI == (object)id2_Item)) { - z_0_0 = (global::SerializationTypes.TypeA[])EnsureArrayIndex(z_0_0, cz_0_0, typeof(global::SerializationTypes.TypeA));z_0_0[cz_0_0++] = Read56_TypeA(true, true); + if (((object) Reader.LocalName == (object)id59_TypeA && (object) Reader.NamespaceURI == (object)id2_Item)) { + z_0_0 = (global::SerializationTypes.TypeA[])EnsureArrayIndex(z_0_0, cz_0_0, typeof(global::SerializationTypes.TypeA));z_0_0[cz_0_0++] = Read57_TypeA(true, true); break; } UnknownNode(null, @":TypeA"); @@ -7137,61 +7462,61 @@ public object Read215_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id70_EnumFlags && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id71_EnumFlags && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { Reader.ReadStartElement(); - object e = Read67_EnumFlags(CollapseWhitespace(Reader.ReadString())); + object e = Read68_EnumFlags(CollapseWhitespace(Reader.ReadString())); ReadEndElement(); return e; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id79_IntEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id80_IntEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { Reader.ReadStartElement(); - object e = Read71_IntEnum(CollapseWhitespace(Reader.ReadString())); + object e = Read72_IntEnum(CollapseWhitespace(Reader.ReadString())); ReadEndElement(); return e; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id78_ShortEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id79_ShortEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { Reader.ReadStartElement(); - object e = Read72_ShortEnum(CollapseWhitespace(Reader.ReadString())); + object e = Read73_ShortEnum(CollapseWhitespace(Reader.ReadString())); ReadEndElement(); return e; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id76_ByteEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id77_ByteEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { Reader.ReadStartElement(); - object e = Read78_ByteEnum(CollapseWhitespace(Reader.ReadString())); + object e = Read79_ByteEnum(CollapseWhitespace(Reader.ReadString())); ReadEndElement(); return e; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id77_SByteEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id78_SByteEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { Reader.ReadStartElement(); - object e = Read79_SByteEnum(CollapseWhitespace(Reader.ReadString())); + object e = Read80_SByteEnum(CollapseWhitespace(Reader.ReadString())); ReadEndElement(); return e; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id80_UIntEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id81_UIntEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { Reader.ReadStartElement(); - object e = Read80_UIntEnum(CollapseWhitespace(Reader.ReadString())); + object e = Read81_UIntEnum(CollapseWhitespace(Reader.ReadString())); ReadEndElement(); return e; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id81_LongEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id82_LongEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { Reader.ReadStartElement(); - object e = Read81_LongEnum(CollapseWhitespace(Reader.ReadString())); + object e = Read82_LongEnum(CollapseWhitespace(Reader.ReadString())); ReadEndElement(); return e; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id82_ULongEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id83_ULongEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { Reader.ReadStartElement(); - object e = Read82_ULongEnum(CollapseWhitespace(Reader.ReadString())); + object e = Read83_ULongEnum(CollapseWhitespace(Reader.ReadString())); ReadEndElement(); return e; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id84_ItemChoiceType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id85_ItemChoiceType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { Reader.ReadStartElement(); - object e = Read83_ItemChoiceType(CollapseWhitespace(Reader.ReadString())); + object e = Read84_ItemChoiceType(CollapseWhitespace(Reader.ReadString())); ReadEndElement(); return e; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id139_ArrayOfItemChoiceType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id143_ArrayOfItemChoiceType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { global::SerializationTypes.ItemChoiceType[] a = null; if (!ReadNull()) { global::SerializationTypes.ItemChoiceType[] z_0_0 = null; @@ -7205,9 +7530,9 @@ public object Read215_Person() { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id84_ItemChoiceType && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id85_ItemChoiceType && (object) Reader.NamespaceURI == (object)id2_Item)) { { - z_0_0 = (global::SerializationTypes.ItemChoiceType[])EnsureArrayIndex(z_0_0, cz_0_0, typeof(global::SerializationTypes.ItemChoiceType));z_0_0[cz_0_0++] = Read83_ItemChoiceType(Reader.ReadElementString()); + z_0_0 = (global::SerializationTypes.ItemChoiceType[])EnsureArrayIndex(z_0_0, cz_0_0, typeof(global::SerializationTypes.ItemChoiceType));z_0_0[cz_0_0++] = Read84_ItemChoiceType(Reader.ReadElementString()); } break; } @@ -7225,7 +7550,7 @@ public object Read215_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id128_ArrayOfString && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id140_httpmynamespace)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id132_ArrayOfString && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id144_httpmynamespace)) { global::System.Object[] a = null; if (!ReadNull()) { global::System.Object[] z_0_0 = null; @@ -7239,7 +7564,7 @@ public object Read215_Person() { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id129_string && (object) Reader.NamespaceURI == (object)id140_httpmynamespace)) { + if (((object) Reader.LocalName == (object)id133_string && (object) Reader.NamespaceURI == (object)id144_httpmynamespace)) { if (ReadNull()) { z_0_0 = (global::System.Object[])EnsureArrayIndex(z_0_0, cz_0_0, typeof(global::System.Object));z_0_0[cz_0_0++] = null; } @@ -7262,7 +7587,7 @@ public object Read215_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id141_ArrayOfString1 && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id145_ArrayOfString1 && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { global::System.Collections.Generic.List a = null; if (!ReadNull()) { if ((object)(a) == null) a = new global::System.Collections.Generic.List(); @@ -7276,7 +7601,7 @@ public object Read215_Person() { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id142_NoneParameter && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id146_NoneParameter && (object) Reader.NamespaceURI == (object)id2_Item)) { { z_0_0.Add(Reader.ReadElementString()); } @@ -7295,7 +7620,7 @@ public object Read215_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id143_ArrayOfBoolean && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id147_ArrayOfBoolean && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { global::System.Collections.Generic.List a = null; if (!ReadNull()) { if ((object)(a) == null) a = new global::System.Collections.Generic.List(); @@ -7309,7 +7634,7 @@ public object Read215_Person() { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id144_QualifiedParameter && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id148_QualifiedParameter && (object) Reader.NamespaceURI == (object)id2_Item)) { { z_0_0.Add(System.Xml.XmlConvert.ToBoolean(Reader.ReadElementString())); } @@ -7328,7 +7653,7 @@ public object Read215_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id145_ArrayOfArrayOfSimpleType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id149_ArrayOfArrayOfSimpleType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { global::SerializationTypes.SimpleType[][] a = null; if (!ReadNull()) { global::SerializationTypes.SimpleType[][] z_0_0 = null; @@ -7387,9 +7712,9 @@ public object Read215_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id105_MoreChoices && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id107_MoreChoices && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { Reader.ReadStartElement(); - object e = Read103_MoreChoices(CollapseWhitespace(Reader.ReadString())); + object e = Read104_MoreChoices(CollapseWhitespace(Reader.ReadString())); ReadEndElement(); return e; } @@ -7425,7 +7750,7 @@ public object Read215_Person() { return o; } - global::SerializationTypes.MoreChoices Read103_MoreChoices(string s) { + global::SerializationTypes.MoreChoices Read104_MoreChoices(string s) { switch (s) { case @"None": return global::SerializationTypes.MoreChoices.@None; case @"Item": return global::SerializationTypes.MoreChoices.@Item; @@ -7464,14 +7789,14 @@ public object Read215_Person() { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id146_P1 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id150_P1 && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@P1 = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id147_P2 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id151_P2 && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@P2 = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); } @@ -7490,7 +7815,7 @@ public object Read215_Person() { return o; } - global::SerializationTypes.ItemChoiceType Read83_ItemChoiceType(string s) { + global::SerializationTypes.ItemChoiceType Read84_ItemChoiceType(string s) { switch (s) { case @"None": return global::SerializationTypes.ItemChoiceType.@None; case @"Word": return global::SerializationTypes.ItemChoiceType.@Word; @@ -7500,7 +7825,7 @@ public object Read215_Person() { } } - global::SerializationTypes.ULongEnum Read82_ULongEnum(string s) { + global::SerializationTypes.ULongEnum Read83_ULongEnum(string s) { switch (s) { case @"Option0": return global::SerializationTypes.ULongEnum.@Option0; case @"Option1": return global::SerializationTypes.ULongEnum.@Option1; @@ -7509,7 +7834,7 @@ public object Read215_Person() { } } - global::SerializationTypes.LongEnum Read81_LongEnum(string s) { + global::SerializationTypes.LongEnum Read82_LongEnum(string s) { switch (s) { case @"Option0": return global::SerializationTypes.LongEnum.@Option0; case @"Option1": return global::SerializationTypes.LongEnum.@Option1; @@ -7518,7 +7843,7 @@ public object Read215_Person() { } } - global::SerializationTypes.UIntEnum Read80_UIntEnum(string s) { + global::SerializationTypes.UIntEnum Read81_UIntEnum(string s) { switch (s) { case @"Option0": return global::SerializationTypes.UIntEnum.@Option0; case @"Option1": return global::SerializationTypes.UIntEnum.@Option1; @@ -7527,7 +7852,7 @@ public object Read215_Person() { } } - global::SerializationTypes.SByteEnum Read79_SByteEnum(string s) { + global::SerializationTypes.SByteEnum Read80_SByteEnum(string s) { switch (s) { case @"Option0": return global::SerializationTypes.SByteEnum.@Option0; case @"Option1": return global::SerializationTypes.SByteEnum.@Option1; @@ -7536,7 +7861,7 @@ public object Read215_Person() { } } - global::SerializationTypes.ByteEnum Read78_ByteEnum(string s) { + global::SerializationTypes.ByteEnum Read79_ByteEnum(string s) { switch (s) { case @"Option0": return global::SerializationTypes.ByteEnum.@Option0; case @"Option1": return global::SerializationTypes.ByteEnum.@Option1; @@ -7545,7 +7870,7 @@ public object Read215_Person() { } } - global::SerializationTypes.ShortEnum Read72_ShortEnum(string s) { + global::SerializationTypes.ShortEnum Read73_ShortEnum(string s) { switch (s) { case @"Option0": return global::SerializationTypes.ShortEnum.@Option0; case @"Option1": return global::SerializationTypes.ShortEnum.@Option1; @@ -7554,7 +7879,7 @@ public object Read215_Person() { } } - global::SerializationTypes.IntEnum Read71_IntEnum(string s) { + global::SerializationTypes.IntEnum Read72_IntEnum(string s) { switch (s) { case @"Option0": return global::SerializationTypes.IntEnum.@Option0; case @"Option1": return global::SerializationTypes.IntEnum.@Option1; @@ -7579,16 +7904,16 @@ internal System.Collections.Hashtable EnumFlagsValues { } } - global::SerializationTypes.EnumFlags Read67_EnumFlags(string s) { + global::SerializationTypes.EnumFlags Read68_EnumFlags(string s) { return (global::SerializationTypes.EnumFlags)ToEnum(s, EnumFlagsValues, @"global::SerializationTypes.EnumFlags"); } - global::SerializationTypes.TypeA Read56_TypeA(bool isNullable, bool checkType) { + global::SerializationTypes.TypeA Read57_TypeA(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id58_TypeA && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id59_TypeA && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -7613,7 +7938,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id115_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id119_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Name = Reader.ReadElementString(); } @@ -7632,7 +7957,7 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.MyEnum Read51_MyEnum(string s) { + global::SerializationTypes.MyEnum Read52_MyEnum(string s) { switch (s) { case @"One": return global::SerializationTypes.MyEnum.@One; case @"Two": return global::SerializationTypes.MyEnum.@Two; @@ -7649,7 +7974,7 @@ internal System.Collections.Hashtable EnumFlagsValues { if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id40_Parameter && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id122_ParameterOfString && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id126_ParameterOfString && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) return Read38_ParameterOfString(isNullable, false); throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); } @@ -7659,7 +7984,7 @@ internal System.Collections.Hashtable EnumFlagsValues { o = new global::Parameter(); System.Span paramsRead = stackalloc bool[1]; while (Reader.MoveToNextAttribute()) { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id115_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id119_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@Name = Reader.Value; paramsRead[0] = true; } @@ -7692,7 +8017,7 @@ internal System.Collections.Hashtable EnumFlagsValues { bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id122_ParameterOfString && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id126_ParameterOfString && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -7703,7 +8028,7 @@ internal System.Collections.Hashtable EnumFlagsValues { o = new global::Parameter(); System.Span paramsRead = stackalloc bool[2]; while (Reader.MoveToNextAttribute()) { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id115_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id119_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@Name = Reader.Value; paramsRead[0] = true; } @@ -7721,7 +8046,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id148_Value && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id152_Value && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Value = Reader.ReadElementString(); } @@ -7772,12 +8097,12 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id149_Child && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id153_Child && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@Child = Read36_TypeWithLinkedProperty(false, true); paramsRead[0] = true; break; } - if (((object) Reader.LocalName == (object)id150_Children && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id154_Children && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { if ((object)(o.@Children) == null) o.@Children = new global::System.Collections.Generic.List(); global::System.Collections.Generic.List a_1_0 = (global::System.Collections.Generic.List)o.@Children; @@ -7853,7 +8178,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id115_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id119_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Name = Reader.ReadElementString(); } @@ -7902,21 +8227,21 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id115_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id119_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Name = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id151_IsValved && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id155_IsValved && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@IsValved = System.Xml.XmlConvert.ToBoolean(Reader.ReadElementString()); } paramsRead[1] = true; break; } - if (!paramsRead[2] && ((object) Reader.LocalName == (object)id152_Modulation && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id156_Modulation && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Modulation = ToChar(Reader.ReadElementString()); } @@ -7967,14 +8292,14 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id115_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id119_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Name = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id151_IsValved && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id155_IsValved && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@IsValved = System.Xml.XmlConvert.ToBoolean(Reader.ReadElementString()); } @@ -8023,35 +8348,35 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id153_ItemName && (object) Reader.NamespaceURI == (object)id19_httpwwwcontoso1com)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id157_ItemName && (object) Reader.NamespaceURI == (object)id19_httpwwwcontoso1com)) { { o.@ItemName = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id154_Description && (object) Reader.NamespaceURI == (object)id19_httpwwwcontoso1com)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id158_Description && (object) Reader.NamespaceURI == (object)id19_httpwwwcontoso1com)) { { o.@Description = Reader.ReadElementString(); } paramsRead[1] = true; break; } - if (!paramsRead[2] && ((object) Reader.LocalName == (object)id155_UnitPrice && (object) Reader.NamespaceURI == (object)id19_httpwwwcontoso1com)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id159_UnitPrice && (object) Reader.NamespaceURI == (object)id19_httpwwwcontoso1com)) { { o.@UnitPrice = System.Xml.XmlConvert.ToDecimal(Reader.ReadElementString()); } paramsRead[2] = true; break; } - if (!paramsRead[3] && ((object) Reader.LocalName == (object)id156_Quantity && (object) Reader.NamespaceURI == (object)id19_httpwwwcontoso1com)) { + if (!paramsRead[3] && ((object) Reader.LocalName == (object)id160_Quantity && (object) Reader.NamespaceURI == (object)id19_httpwwwcontoso1com)) { { o.@Quantity = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); } paramsRead[3] = true; break; } - if (!paramsRead[4] && ((object) Reader.LocalName == (object)id157_LineTotal && (object) Reader.NamespaceURI == (object)id19_httpwwwcontoso1com)) { + if (!paramsRead[4] && ((object) Reader.LocalName == (object)id161_LineTotal && (object) Reader.NamespaceURI == (object)id19_httpwwwcontoso1com)) { { o.@LineTotal = System.Xml.XmlConvert.ToDecimal(Reader.ReadElementString()); } @@ -8199,14 +8524,14 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id158_BinaryHexContent && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id162_BinaryHexContent && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@BinaryHexContent = ToByteArrayHex(false); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id159_Base64Content && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id163_Base64Content && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Base64Content = ToByteArrayBase64(false); } @@ -8255,7 +8580,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id160_DTO && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id164_DTO && (object) Reader.NamespaceURI == (object)id2_Item)) { { if (Reader.IsEmptyElement) { Reader.Skip(); @@ -8268,7 +8593,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id161_DTO2 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id165_DTO2 && (object) Reader.NamespaceURI == (object)id2_Item)) { { if (Reader.IsEmptyElement) { Reader.Skip(); @@ -8281,7 +8606,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[1] = true; break; } - if (!paramsRead[2] && ((object) Reader.LocalName == (object)id162_DefaultDTO && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id166_DefaultDTO && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -8297,12 +8622,12 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[2] = true; break; } - if (!paramsRead[3] && ((object) Reader.LocalName == (object)id163_NullableDTO && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[3] && ((object) Reader.LocalName == (object)id167_NullableDTO && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@NullableDTO = Read5_NullableOfDateTimeOffset(true); paramsRead[3] = true; break; } - if (!paramsRead[4] && ((object) Reader.LocalName == (object)id164_NullableDefaultDTO && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[4] && ((object) Reader.LocalName == (object)id168_NullableDefaultDTO && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@NullableDTOWithDefault = Read5_NullableOfDateTimeOffset(true); paramsRead[4] = true; break; @@ -8365,7 +8690,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id165_TimeSpanProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id169_TimeSpanProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { { if (Reader.IsEmptyElement) { Reader.Skip(); @@ -8420,7 +8745,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id165_TimeSpanProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id169_TimeSpanProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -8436,7 +8761,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id166_TimeSpanProperty2 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id170_TimeSpanProperty2 && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -8494,7 +8819,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id167_ByteProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id171_ByteProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@ByteProperty = System.Xml.XmlConvert.ToByte(Reader.ReadElementString()); } @@ -8594,21 +8919,21 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id168_Age && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id172_Age && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Age = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id115_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id119_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Name = Reader.ReadElementString(); } paramsRead[1] = true; break; } - if (!paramsRead[2] && ((object) Reader.LocalName == (object)id169_Breed && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id173_Breed && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Breed = Read12_DogBreed(Reader.ReadElementString()); } @@ -8659,14 +8984,14 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id168_Age && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id172_Age && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Age = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id115_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id119_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Name = Reader.ReadElementString(); } @@ -8715,7 +9040,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id170_LicenseNumber && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id174_LicenseNumber && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@LicenseNumber = Reader.ReadElementString(); } @@ -8764,14 +9089,14 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id171_GroupName && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id175_GroupName && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@GroupName = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id172_GroupVehicle && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id176_GroupVehicle && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@GroupVehicle = Read14_Vehicle(false, true); paramsRead[1] = true; break; @@ -8818,7 +9143,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id173_EmployeeName && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id177_EmployeeName && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@EmployeeName = Reader.ReadElementString(); } @@ -8867,14 +9192,14 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id148_Value && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id152_Value && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Value = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id174_value && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id178_value && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@value = Reader.ReadElementString(); } @@ -8925,14 +9250,14 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id148_Value && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id152_Value && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Value = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id174_value && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id178_value && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@value = Reader.ReadElementString(); } @@ -8967,7 +9292,7 @@ internal System.Collections.Hashtable EnumFlagsValues { o = new global::Address(); System.Span paramsRead = stackalloc bool[5]; while (Reader.MoveToNextAttribute()) { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id115_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id119_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@Name = Reader.Value; paramsRead[0] = true; } @@ -8985,28 +9310,28 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id175_Line1 && (object) Reader.NamespaceURI == (object)id19_httpwwwcontoso1com)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id179_Line1 && (object) Reader.NamespaceURI == (object)id19_httpwwwcontoso1com)) { { o.@Line1 = Reader.ReadElementString(); } paramsRead[1] = true; break; } - if (!paramsRead[2] && ((object) Reader.LocalName == (object)id176_City && (object) Reader.NamespaceURI == (object)id19_httpwwwcontoso1com)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id180_City && (object) Reader.NamespaceURI == (object)id19_httpwwwcontoso1com)) { { o.@City = Reader.ReadElementString(); } paramsRead[2] = true; break; } - if (!paramsRead[3] && ((object) Reader.LocalName == (object)id177_State && (object) Reader.NamespaceURI == (object)id19_httpwwwcontoso1com)) { + if (!paramsRead[3] && ((object) Reader.LocalName == (object)id181_State && (object) Reader.NamespaceURI == (object)id19_httpwwwcontoso1com)) { { o.@State = Reader.ReadElementString(); } paramsRead[3] = true; break; } - if (!paramsRead[4] && ((object) Reader.LocalName == (object)id178_Zip && (object) Reader.NamespaceURI == (object)id19_httpwwwcontoso1com)) { + if (!paramsRead[4] && ((object) Reader.LocalName == (object)id182_Zip && (object) Reader.NamespaceURI == (object)id19_httpwwwcontoso1com)) { { o.@Zip = Reader.ReadElementString(); } @@ -9057,19 +9382,19 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id179_ShipTo && (object) Reader.NamespaceURI == (object)id19_httpwwwcontoso1com)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id183_ShipTo && (object) Reader.NamespaceURI == (object)id19_httpwwwcontoso1com)) { o.@ShipTo = Read19_Address(false, true); paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id180_OrderDate && (object) Reader.NamespaceURI == (object)id19_httpwwwcontoso1com)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id184_OrderDate && (object) Reader.NamespaceURI == (object)id19_httpwwwcontoso1com)) { { o.@OrderDate = Reader.ReadElementString(); } paramsRead[1] = true; break; } - if (((object) Reader.LocalName == (object)id181_Items && (object) Reader.NamespaceURI == (object)id19_httpwwwcontoso1com)) { + if (((object) Reader.LocalName == (object)id185_Items && (object) Reader.NamespaceURI == (object)id19_httpwwwcontoso1com)) { if (!ReadNull()) { global::OrderedItem[] a_2_0 = null; int ca_2_0 = 0; @@ -9100,21 +9425,21 @@ internal System.Collections.Hashtable EnumFlagsValues { } break; } - if (!paramsRead[3] && ((object) Reader.LocalName == (object)id182_SubTotal && (object) Reader.NamespaceURI == (object)id19_httpwwwcontoso1com)) { + if (!paramsRead[3] && ((object) Reader.LocalName == (object)id186_SubTotal && (object) Reader.NamespaceURI == (object)id19_httpwwwcontoso1com)) { { o.@SubTotal = System.Xml.XmlConvert.ToDecimal(Reader.ReadElementString()); } paramsRead[3] = true; break; } - if (!paramsRead[4] && ((object) Reader.LocalName == (object)id183_ShipCost && (object) Reader.NamespaceURI == (object)id19_httpwwwcontoso1com)) { + if (!paramsRead[4] && ((object) Reader.LocalName == (object)id187_ShipCost && (object) Reader.NamespaceURI == (object)id19_httpwwwcontoso1com)) { { o.@ShipCost = System.Xml.XmlConvert.ToDecimal(Reader.ReadElementString()); } paramsRead[4] = true; break; } - if (!paramsRead[5] && ((object) Reader.LocalName == (object)id184_TotalCost && (object) Reader.NamespaceURI == (object)id19_httpwwwcontoso1com)) { + if (!paramsRead[5] && ((object) Reader.LocalName == (object)id188_TotalCost && (object) Reader.NamespaceURI == (object)id19_httpwwwcontoso1com)) { { o.@TotalCost = System.Xml.XmlConvert.ToDecimal(Reader.ReadElementString()); } @@ -9149,7 +9474,7 @@ internal System.Collections.Hashtable EnumFlagsValues { o = new global::Address(); System.Span paramsRead = stackalloc bool[5]; while (Reader.MoveToNextAttribute()) { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id115_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id119_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@Name = Reader.Value; paramsRead[0] = true; } @@ -9167,28 +9492,28 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id175_Line1 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id179_Line1 && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Line1 = Reader.ReadElementString(); } paramsRead[1] = true; break; } - if (!paramsRead[2] && ((object) Reader.LocalName == (object)id176_City && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id180_City && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@City = Reader.ReadElementString(); } paramsRead[2] = true; break; } - if (!paramsRead[3] && ((object) Reader.LocalName == (object)id177_State && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[3] && ((object) Reader.LocalName == (object)id181_State && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@State = Reader.ReadElementString(); } paramsRead[3] = true; break; } - if (!paramsRead[4] && ((object) Reader.LocalName == (object)id178_Zip && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[4] && ((object) Reader.LocalName == (object)id182_Zip && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Zip = Reader.ReadElementString(); } @@ -9237,35 +9562,35 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id153_ItemName && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id157_ItemName && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@ItemName = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id154_Description && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id158_Description && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Description = Reader.ReadElementString(); } paramsRead[1] = true; break; } - if (!paramsRead[2] && ((object) Reader.LocalName == (object)id155_UnitPrice && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id159_UnitPrice && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@UnitPrice = System.Xml.XmlConvert.ToDecimal(Reader.ReadElementString()); } paramsRead[2] = true; break; } - if (!paramsRead[3] && ((object) Reader.LocalName == (object)id156_Quantity && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[3] && ((object) Reader.LocalName == (object)id160_Quantity && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Quantity = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); } paramsRead[3] = true; break; } - if (!paramsRead[4] && ((object) Reader.LocalName == (object)id157_LineTotal && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[4] && ((object) Reader.LocalName == (object)id161_LineTotal && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@LineTotal = System.Xml.XmlConvert.ToDecimal(Reader.ReadElementString()); } @@ -9314,7 +9639,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id185_X && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id189_X && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { if ((object)(o.@Aliased) == null) o.@Aliased = new global::System.Collections.Generic.List(); global::System.Collections.Generic.List a_0_0 = (global::System.Collections.Generic.List)o.@Aliased; @@ -9327,7 +9652,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id127_int && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id131_int && (object) Reader.NamespaceURI == (object)id2_Item)) { { a_0_0.Add(System.Xml.XmlConvert.ToInt32(Reader.ReadElementString())); } @@ -9347,7 +9672,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[0] = true; break; } - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id186_Y && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id190_Y && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { if ((object)(o.@Aliased) == null) o.@Aliased = new global::System.Collections.Generic.List(); global::System.Collections.Generic.List a_0_0 = (global::System.Collections.Generic.List)o.@Aliased; @@ -9360,7 +9685,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id129_string && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id133_string && (object) Reader.NamespaceURI == (object)id2_Item)) { if (ReadNull()) { a_0_0.Add(null); } @@ -9383,7 +9708,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[0] = true; break; } - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id187_Z && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id191_Z && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { if ((object)(o.@Aliased) == null) o.@Aliased = new global::System.Collections.Generic.List(); global::System.Collections.Generic.List a_0_0 = (global::System.Collections.Generic.List)o.@Aliased; @@ -9396,7 +9721,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id131_double && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id135_double && (object) Reader.NamespaceURI == (object)id2_Item)) { { a_0_0.Add(System.Xml.XmlConvert.ToDouble(Reader.ReadElementString())); } @@ -9460,7 +9785,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id188_Prop && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id192_Prop && (object) Reader.NamespaceURI == (object)id2_Item)) { { a_0.Add(ToDateTime(Reader.ReadElementString())); } @@ -9512,7 +9837,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id188_Prop && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id192_Prop && (object) Reader.NamespaceURI == (object)id2_Item)) { { a_0.Add(ToDateTime(Reader.ReadElementString())); } @@ -9562,7 +9887,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id189_Instruments && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id193_Instruments && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { global::Instrument[] a_0_0 = null; int ca_0_0 = 0; @@ -9642,7 +9967,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id190_Comment2 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id194_Comment2 && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Comment2 = Reader.ReadElementString(); } @@ -9691,7 +10016,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id191_DoubleField && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id195_DoubleField && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -9701,7 +10026,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id192_SingleField && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id196_SingleField && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -9711,7 +10036,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[1] = true; break; } - if (!paramsRead[2] && ((object) Reader.LocalName == (object)id193_DoubleProp && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id197_DoubleProp && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -9721,7 +10046,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[2] = true; break; } - if (!paramsRead[3] && ((object) Reader.LocalName == (object)id194_FloatProp && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[3] && ((object) Reader.LocalName == (object)id198_FloatProp && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -9773,7 +10098,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id191_DoubleField && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id195_DoubleField && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -9783,7 +10108,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id192_SingleField && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id196_SingleField && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -9793,7 +10118,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[1] = true; break; } - if (!paramsRead[2] && ((object) Reader.LocalName == (object)id193_DoubleProp && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id197_DoubleProp && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -9803,7 +10128,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[2] = true; break; } - if (!paramsRead[3] && ((object) Reader.LocalName == (object)id194_FloatProp && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[3] && ((object) Reader.LocalName == (object)id198_FloatProp && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -9855,7 +10180,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id191_DoubleField && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id195_DoubleField && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -9865,7 +10190,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id192_SingleField && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id196_SingleField && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -9875,7 +10200,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[1] = true; break; } - if (!paramsRead[2] && ((object) Reader.LocalName == (object)id193_DoubleProp && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id197_DoubleProp && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -9885,7 +10210,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[2] = true; break; } - if (!paramsRead[3] && ((object) Reader.LocalName == (object)id194_FloatProp && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[3] && ((object) Reader.LocalName == (object)id198_FloatProp && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -9912,7 +10237,7 @@ internal System.Collections.Hashtable EnumFlagsValues { bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id124_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id128_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -9923,7 +10248,7 @@ internal System.Collections.Hashtable EnumFlagsValues { o = new global::TypeWithMismatchBetweenAttributeAndPropertyType(); System.Span paramsRead = stackalloc bool[1]; while (Reader.MoveToNextAttribute()) { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id195_IntValue && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id199_IntValue && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@IntValue = System.Xml.XmlConvert.ToInt32(Reader.Value); paramsRead[0] = true; } @@ -9956,7 +10281,7 @@ internal System.Collections.Hashtable EnumFlagsValues { bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id123_MsgDocumentType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id38_httpexamplecom)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id127_MsgDocumentType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id38_httpexamplecom)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -9969,11 +10294,11 @@ internal System.Collections.Hashtable EnumFlagsValues { int ca_1 = 0; System.Span paramsRead = stackalloc bool[2]; while (Reader.MoveToNextAttribute()) { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id196_id && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id200_id && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@Id = CollapseWhitespace(Reader.Value); paramsRead[0] = true; } - else if (((object) Reader.LocalName == (object)id197_refs && (object) Reader.NamespaceURI == (object)id2_Item)) { + else if (((object) Reader.LocalName == (object)id201_refs && (object) Reader.NamespaceURI == (object)id2_Item)) { string listValues = Reader.Value; string[] vals = listValues.Split(null); for (int i = 0; i < vals.Length; i++) { @@ -10038,7 +10363,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id198_Parameters && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id202_Parameters && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { if ((object)(o.@Parameters) == null) o.@Parameters = new global::System.Collections.Generic.List(); global::System.Collections.Generic.List a_0_0 = (global::System.Collections.Generic.List)o.@Parameters; @@ -10110,7 +10435,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id148_Value && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id152_Value && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@Value = (global::System.Xml.Linq.XElement)ReadSerializable(( System.Xml.Serialization.IXmlSerializable)new global::System.Xml.Linq.XElement("default"), true ); paramsRead[0] = true; @@ -10164,7 +10489,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id199_xelement && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id203_xelement && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@xelement = (global::System.Xml.Linq.XElement)ReadSerializable(( System.Xml.Serialization.IXmlSerializable)new global::System.Xml.Linq.XElement("default"), true ); paramsRead[0] = true; @@ -10214,7 +10539,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id200_xelements && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id204_xelements && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { global::System.Xml.Linq.XElement[] a_0_0 = null; int ca_0_0 = 0; @@ -10227,7 +10552,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id136_XElement && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id140_XElement && (object) Reader.NamespaceURI == (object)id2_Item)) { a_0_0 = (global::System.Xml.Linq.XElement[])EnsureArrayIndex(a_0_0, ca_0_0, typeof(global::System.Xml.Linq.XElement));a_0_0[ca_0_0++] = (global::System.Xml.Linq.XElement)ReadSerializable(( System.Xml.Serialization.IXmlSerializable)new global::System.Xml.Linq.XElement("default"), true ); break; @@ -10288,14 +10613,14 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id201_DateTimeString && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id205_DateTimeString && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@DateTimeString = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id202_CurrentDateTime && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id206_CurrentDateTime && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@CurrentDateTime = ToDateTime(Reader.ReadElementString()); } @@ -10352,7 +10677,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id203_F1 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id207_F1 && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { global::SerializationTypes.SimpleType[] a_0_0 = null; int ca_0_0 = 0; @@ -10383,7 +10708,7 @@ internal System.Collections.Hashtable EnumFlagsValues { } break; } - if (((object) Reader.LocalName == (object)id204_F2 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id208_F2 && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { global::System.Int32[] a_1_0 = null; int ca_1_0 = 0; @@ -10396,7 +10721,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id127_int && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id131_int && (object) Reader.NamespaceURI == (object)id2_Item)) { { a_1_0 = (global::System.Int32[])EnsureArrayIndex(a_1_0, ca_1_0, typeof(global::System.Int32));a_1_0[ca_1_0++] = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); } @@ -10416,7 +10741,7 @@ internal System.Collections.Hashtable EnumFlagsValues { } break; } - if (((object) Reader.LocalName == (object)id146_P1 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id150_P1 && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { global::SerializationTypes.SimpleType[] a_2_0 = null; int ca_2_0 = 0; @@ -10447,7 +10772,7 @@ internal System.Collections.Hashtable EnumFlagsValues { } break; } - if (((object) Reader.LocalName == (object)id147_P2 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id151_P2 && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { global::System.Int32[] a_3_0 = null; int ca_3_0 = 0; @@ -10460,7 +10785,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id127_int && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id131_int && (object) Reader.NamespaceURI == (object)id2_Item)) { { a_3_0 = (global::System.Int32[])EnsureArrayIndex(a_3_0, ca_3_0, typeof(global::System.Int32));a_3_0[ca_3_0++] = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); } @@ -10532,78 +10857,37 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.StructNotSerializable Read48_StructNotSerializable(bool checkType) { - System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; - bool isNull = false; - if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id48_StructNotSerializable && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { - } - else { - throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); - } - } - global::SerializationTypes.StructNotSerializable o; - try { - o = (global::SerializationTypes.StructNotSerializable)System.Activator.CreateInstance(typeof(global::SerializationTypes.StructNotSerializable), System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.CreateInstance | System.Reflection.BindingFlags.NonPublic, null, new object[0], null); - } - catch (System.MissingMethodException) { - throw CreateInaccessibleConstructorException(@"global::SerializationTypes.StructNotSerializable"); - } - catch (System.Security.SecurityException) { - throw CreateCtorHasSecurityException(@"global::SerializationTypes.StructNotSerializable"); - } - System.Span paramsRead = stackalloc bool[1]; - while (Reader.MoveToNextAttribute()) { - if (!IsXmlnsAttribute(Reader.Name)) { - UnknownNode((object)o); - } - } - Reader.MoveToElement(); - if (Reader.IsEmptyElement) { - Reader.Skip(); - return o; - } - Reader.ReadStartElement(); - Reader.MoveToContent(); - while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { - if (Reader.NodeType == System.Xml.XmlNodeType.Element) { - do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id174_value && (object) Reader.NamespaceURI == (object)id2_Item)) { - { - o.@value = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); - } - paramsRead[0] = true; - break; - } - UnknownNode((object)o, @":value"); - } while (false); - } - else { - UnknownNode((object)o, @":value"); - } - Reader.MoveToContent(); - } - ReadEndElement(); - return o; - } - - global::SerializationTypes.TypeWithMyCollectionField Read49_TypeWithMyCollectionField(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithArraylikeMembers Read48_TypeWithArraylikeMembers(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id49_TypeWithMyCollectionField && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id48_TypeWithArraylikeMembers && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); } } if (isNull) return null; - global::SerializationTypes.TypeWithMyCollectionField o; - o = new global::SerializationTypes.TypeWithMyCollectionField(); - if ((object)(o.@Collection) == null) o.@Collection = new global::SerializationTypes.MyCollection(); - global::SerializationTypes.MyCollection a_0 = (global::SerializationTypes.MyCollection)o.@Collection; - System.Span paramsRead = stackalloc bool[1]; + global::SerializationTypes.TypeWithArraylikeMembers o; + o = new global::SerializationTypes.TypeWithArraylikeMembers(); + global::System.Int32[] a_0 = null; + int ca_0 = 0; + global::System.Int32[] a_1 = null; + int ca_1 = 0; + if ((object)(o.@IntLField) == null) o.@IntLField = new global::System.Collections.Generic.List(); + global::System.Collections.Generic.List a_2 = (global::System.Collections.Generic.List)o.@IntLField; + if ((object)(o.@NIntLField) == null) o.@NIntLField = new global::System.Collections.Generic.List(); + global::System.Collections.Generic.List a_3 = (global::System.Collections.Generic.List)o.@NIntLField; + global::System.Int32[] a_4 = null; + int ca_4 = 0; + global::System.Int32[] a_5 = null; + int ca_5 = 0; + if ((object)(o.@IntLProp) == null) o.@IntLProp = new global::System.Collections.Generic.List(); + global::System.Collections.Generic.List a_6 = (global::System.Collections.Generic.List)o.@IntLProp; + if ((object)(o.@NIntLProp) == null) o.@NIntLProp = new global::System.Collections.Generic.List(); + global::System.Collections.Generic.List a_7 = (global::System.Collections.Generic.List)o.@NIntLProp; + System.Span paramsRead = stackalloc bool[8]; while (Reader.MoveToNextAttribute()) { if (!IsXmlnsAttribute(Reader.Name)) { UnknownNode((object)o); @@ -10619,10 +10903,10 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id205_Collection && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id209_IntAField && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { - if ((object)(o.@Collection) == null) o.@Collection = new global::SerializationTypes.MyCollection(); - global::SerializationTypes.MyCollection a_0_0 = (global::SerializationTypes.MyCollection)o.@Collection; + global::System.Int32[] a_0_0 = null; + int ca_0_0 = 0; if ((Reader.IsEmptyElement)) { Reader.Skip(); } @@ -10632,75 +10916,31 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id129_string && (object) Reader.NamespaceURI == (object)id2_Item)) { - if (ReadNull()) { - a_0_0.Add(null); - } - else { - a_0_0.Add(Reader.ReadElementString()); + if (((object) Reader.LocalName == (object)id131_int && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + a_0_0 = (global::System.Int32[])EnsureArrayIndex(a_0_0, ca_0_0, typeof(global::System.Int32));a_0_0[ca_0_0++] = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); } break; } - UnknownNode(null, @":string"); + UnknownNode(null, @":int"); } while (false); } else { - UnknownNode(null, @":string"); + UnknownNode(null, @":int"); } Reader.MoveToContent(); } ReadEndElement(); } + o.@IntAField = (global::System.Int32[])ShrinkArray(a_0_0, ca_0_0, typeof(global::System.Int32), false); } break; } - UnknownNode((object)o, @":Collection"); - } while (false); - } - else { - UnknownNode((object)o, @":Collection"); - } - Reader.MoveToContent(); - } - ReadEndElement(); - return o; - } - - global::SerializationTypes.TypeWithReadOnlyMyCollectionProperty Read50_Item(bool isNullable, bool checkType) { - System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; - bool isNull = false; - if (isNullable) isNull = ReadNull(); - if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id50_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { - } - else { - throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); - } - } - if (isNull) return null; - global::SerializationTypes.TypeWithReadOnlyMyCollectionProperty o; - o = new global::SerializationTypes.TypeWithReadOnlyMyCollectionProperty(); - global::SerializationTypes.MyCollection a_0 = (global::SerializationTypes.MyCollection)o.@Collection; - System.Span paramsRead = stackalloc bool[1]; - while (Reader.MoveToNextAttribute()) { - if (!IsXmlnsAttribute(Reader.Name)) { - UnknownNode((object)o); - } - } - Reader.MoveToElement(); - if (Reader.IsEmptyElement) { - Reader.Skip(); - return o; - } - Reader.ReadStartElement(); - Reader.MoveToContent(); - while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { - if (Reader.NodeType == System.Xml.XmlNodeType.Element) { - do { - if (((object) Reader.LocalName == (object)id205_Collection && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id210_NIntAField && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { - global::SerializationTypes.MyCollection a_0_0 = (global::SerializationTypes.MyCollection)o.@Collection; - if (((object)(a_0_0) == null) || (Reader.IsEmptyElement)) { + global::System.Int32[] a_1_0 = null; + int ca_1_0 = 0; + if ((Reader.IsEmptyElement)) { Reader.Skip(); } else { @@ -10709,101 +10949,513 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id129_string && (object) Reader.NamespaceURI == (object)id2_Item)) { - if (ReadNull()) { - a_0_0.Add(null); - } - else { - a_0_0.Add(Reader.ReadElementString()); + if (((object) Reader.LocalName == (object)id131_int && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + a_1_0 = (global::System.Int32[])EnsureArrayIndex(a_1_0, ca_1_0, typeof(global::System.Int32));a_1_0[ca_1_0++] = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); } break; } - UnknownNode(null, @":string"); + UnknownNode(null, @":int"); } while (false); } else { - UnknownNode(null, @":string"); + UnknownNode(null, @":int"); } Reader.MoveToContent(); } ReadEndElement(); } + o.@NIntAField = (global::System.Int32[])ShrinkArray(a_1_0, ca_1_0, typeof(global::System.Int32), false); } break; } - UnknownNode((object)o, @":Collection"); - } while (false); - } - else { - UnknownNode((object)o, @":Collection"); - } - Reader.MoveToContent(); - } - ReadEndElement(); - return o; - } - - global::SerializationTypes.TypeWithEnumMembers Read52_TypeWithEnumMembers(bool isNullable, bool checkType) { - System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; - bool isNull = false; - if (isNullable) isNull = ReadNull(); - if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id54_TypeWithEnumMembers && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { - } - else { - throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); - } - } - if (isNull) return null; - global::SerializationTypes.TypeWithEnumMembers o; - o = new global::SerializationTypes.TypeWithEnumMembers(); - System.Span paramsRead = stackalloc bool[2]; - while (Reader.MoveToNextAttribute()) { - if (!IsXmlnsAttribute(Reader.Name)) { - UnknownNode((object)o); - } - } - Reader.MoveToElement(); - if (Reader.IsEmptyElement) { - Reader.Skip(); - return o; - } - Reader.ReadStartElement(); - Reader.MoveToContent(); - while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { - if (Reader.NodeType == System.Xml.XmlNodeType.Element) { - do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id203_F1 && (object) Reader.NamespaceURI == (object)id2_Item)) { - { - o.@F1 = Read51_MyEnum(Reader.ReadElementString()); - } - paramsRead[0] = true; - break; - } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id146_P1 && (object) Reader.NamespaceURI == (object)id2_Item)) { - { - o.@P1 = Read51_MyEnum(Reader.ReadElementString()); + if (((object) Reader.LocalName == (object)id211_IntLField && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!ReadNull()) { + if ((object)(o.@IntLField) == null) o.@IntLField = new global::System.Collections.Generic.List(); + global::System.Collections.Generic.List a_2_0 = (global::System.Collections.Generic.List)o.@IntLField; + if ((Reader.IsEmptyElement)) { + Reader.Skip(); + } + else { + Reader.ReadStartElement(); + Reader.MoveToContent(); + while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { + if (Reader.NodeType == System.Xml.XmlNodeType.Element) { + do { + if (((object) Reader.LocalName == (object)id131_int && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + a_2_0.Add(System.Xml.XmlConvert.ToInt32(Reader.ReadElementString())); + } + break; + } + UnknownNode(null, @":int"); + } while (false); + } + else { + UnknownNode(null, @":int"); + } + Reader.MoveToContent(); + } + ReadEndElement(); + } } - paramsRead[1] = true; break; } - UnknownNode((object)o, @":F1, :P1"); - } while (false); - } - else { - UnknownNode((object)o, @":F1, :P1"); - } - Reader.MoveToContent(); - } - ReadEndElement(); + if (((object) Reader.LocalName == (object)id212_NIntLField && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!ReadNull()) { + if ((object)(o.@NIntLField) == null) o.@NIntLField = new global::System.Collections.Generic.List(); + global::System.Collections.Generic.List a_3_0 = (global::System.Collections.Generic.List)o.@NIntLField; + if ((Reader.IsEmptyElement)) { + Reader.Skip(); + } + else { + Reader.ReadStartElement(); + Reader.MoveToContent(); + while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { + if (Reader.NodeType == System.Xml.XmlNodeType.Element) { + do { + if (((object) Reader.LocalName == (object)id131_int && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + a_3_0.Add(System.Xml.XmlConvert.ToInt32(Reader.ReadElementString())); + } + break; + } + UnknownNode(null, @":int"); + } while (false); + } + else { + UnknownNode(null, @":int"); + } + Reader.MoveToContent(); + } + ReadEndElement(); + } + } + else { + if ((object)(o.@NIntLField) == null) o.@NIntLField = new global::System.Collections.Generic.List(); + global::System.Collections.Generic.List a_3_0 = (global::System.Collections.Generic.List)o.@NIntLField; + } + break; + } + if (((object) Reader.LocalName == (object)id213_IntAProp && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!ReadNull()) { + global::System.Int32[] a_4_0 = null; + int ca_4_0 = 0; + if ((Reader.IsEmptyElement)) { + Reader.Skip(); + } + else { + Reader.ReadStartElement(); + Reader.MoveToContent(); + while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { + if (Reader.NodeType == System.Xml.XmlNodeType.Element) { + do { + if (((object) Reader.LocalName == (object)id131_int && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + a_4_0 = (global::System.Int32[])EnsureArrayIndex(a_4_0, ca_4_0, typeof(global::System.Int32));a_4_0[ca_4_0++] = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); + } + break; + } + UnknownNode(null, @":int"); + } while (false); + } + else { + UnknownNode(null, @":int"); + } + Reader.MoveToContent(); + } + ReadEndElement(); + } + o.@IntAProp = (global::System.Int32[])ShrinkArray(a_4_0, ca_4_0, typeof(global::System.Int32), false); + } + break; + } + if (((object) Reader.LocalName == (object)id214_NIntAProp && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!ReadNull()) { + global::System.Int32[] a_5_0 = null; + int ca_5_0 = 0; + if ((Reader.IsEmptyElement)) { + Reader.Skip(); + } + else { + Reader.ReadStartElement(); + Reader.MoveToContent(); + while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { + if (Reader.NodeType == System.Xml.XmlNodeType.Element) { + do { + if (((object) Reader.LocalName == (object)id131_int && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + a_5_0 = (global::System.Int32[])EnsureArrayIndex(a_5_0, ca_5_0, typeof(global::System.Int32));a_5_0[ca_5_0++] = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); + } + break; + } + UnknownNode(null, @":int"); + } while (false); + } + else { + UnknownNode(null, @":int"); + } + Reader.MoveToContent(); + } + ReadEndElement(); + } + o.@NIntAProp = (global::System.Int32[])ShrinkArray(a_5_0, ca_5_0, typeof(global::System.Int32), false); + } + else { + global::System.Int32[] a_5_0 = null; + int ca_5_0 = 0; + o.@NIntAProp = (global::System.Int32[])ShrinkArray(a_5_0, ca_5_0, typeof(global::System.Int32), true); + } + break; + } + if (((object) Reader.LocalName == (object)id215_IntLProp && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!ReadNull()) { + if ((object)(o.@IntLProp) == null) o.@IntLProp = new global::System.Collections.Generic.List(); + global::System.Collections.Generic.List a_6_0 = (global::System.Collections.Generic.List)o.@IntLProp; + if ((Reader.IsEmptyElement)) { + Reader.Skip(); + } + else { + Reader.ReadStartElement(); + Reader.MoveToContent(); + while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { + if (Reader.NodeType == System.Xml.XmlNodeType.Element) { + do { + if (((object) Reader.LocalName == (object)id131_int && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + a_6_0.Add(System.Xml.XmlConvert.ToInt32(Reader.ReadElementString())); + } + break; + } + UnknownNode(null, @":int"); + } while (false); + } + else { + UnknownNode(null, @":int"); + } + Reader.MoveToContent(); + } + ReadEndElement(); + } + } + break; + } + if (((object) Reader.LocalName == (object)id216_NIntLProp && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!ReadNull()) { + if ((object)(o.@NIntLProp) == null) o.@NIntLProp = new global::System.Collections.Generic.List(); + global::System.Collections.Generic.List a_7_0 = (global::System.Collections.Generic.List)o.@NIntLProp; + if ((Reader.IsEmptyElement)) { + Reader.Skip(); + } + else { + Reader.ReadStartElement(); + Reader.MoveToContent(); + while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { + if (Reader.NodeType == System.Xml.XmlNodeType.Element) { + do { + if (((object) Reader.LocalName == (object)id131_int && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + a_7_0.Add(System.Xml.XmlConvert.ToInt32(Reader.ReadElementString())); + } + break; + } + UnknownNode(null, @":int"); + } while (false); + } + else { + UnknownNode(null, @":int"); + } + Reader.MoveToContent(); + } + ReadEndElement(); + } + } + break; + } + UnknownNode((object)o, @":IntAField, :NIntAField, :IntLField, :NIntLField, :IntAProp, :NIntAProp, :IntLProp, :NIntLProp"); + } while (false); + } + else { + UnknownNode((object)o, @":IntAField, :NIntAField, :IntLField, :NIntLField, :IntAProp, :NIntAProp, :IntLProp, :NIntLProp"); + } + Reader.MoveToContent(); + } + ReadEndElement(); + return o; + } + + global::SerializationTypes.StructNotSerializable Read49_StructNotSerializable(bool checkType) { + System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; + bool isNull = false; + if (checkType) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id49_StructNotSerializable && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + } + else { + throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); + } + } + global::SerializationTypes.StructNotSerializable o; + try { + o = (global::SerializationTypes.StructNotSerializable)System.Activator.CreateInstance(typeof(global::SerializationTypes.StructNotSerializable), System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.CreateInstance | System.Reflection.BindingFlags.NonPublic, null, new object[0], null); + } + catch (System.MissingMethodException) { + throw CreateInaccessibleConstructorException(@"global::SerializationTypes.StructNotSerializable"); + } + catch (System.Security.SecurityException) { + throw CreateCtorHasSecurityException(@"global::SerializationTypes.StructNotSerializable"); + } + System.Span paramsRead = stackalloc bool[1]; + while (Reader.MoveToNextAttribute()) { + if (!IsXmlnsAttribute(Reader.Name)) { + UnknownNode((object)o); + } + } + Reader.MoveToElement(); + if (Reader.IsEmptyElement) { + Reader.Skip(); + return o; + } + Reader.ReadStartElement(); + Reader.MoveToContent(); + while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { + if (Reader.NodeType == System.Xml.XmlNodeType.Element) { + do { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id178_value && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + o.@value = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); + } + paramsRead[0] = true; + break; + } + UnknownNode((object)o, @":value"); + } while (false); + } + else { + UnknownNode((object)o, @":value"); + } + Reader.MoveToContent(); + } + ReadEndElement(); + return o; + } + + global::SerializationTypes.TypeWithMyCollectionField Read50_TypeWithMyCollectionField(bool isNullable, bool checkType) { + System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; + bool isNull = false; + if (isNullable) isNull = ReadNull(); + if (checkType) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id50_TypeWithMyCollectionField && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + } + else { + throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); + } + } + if (isNull) return null; + global::SerializationTypes.TypeWithMyCollectionField o; + o = new global::SerializationTypes.TypeWithMyCollectionField(); + if ((object)(o.@Collection) == null) o.@Collection = new global::SerializationTypes.MyCollection(); + global::SerializationTypes.MyCollection a_0 = (global::SerializationTypes.MyCollection)o.@Collection; + System.Span paramsRead = stackalloc bool[1]; + while (Reader.MoveToNextAttribute()) { + if (!IsXmlnsAttribute(Reader.Name)) { + UnknownNode((object)o); + } + } + Reader.MoveToElement(); + if (Reader.IsEmptyElement) { + Reader.Skip(); + return o; + } + Reader.ReadStartElement(); + Reader.MoveToContent(); + while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { + if (Reader.NodeType == System.Xml.XmlNodeType.Element) { + do { + if (((object) Reader.LocalName == (object)id217_Collection && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!ReadNull()) { + if ((object)(o.@Collection) == null) o.@Collection = new global::SerializationTypes.MyCollection(); + global::SerializationTypes.MyCollection a_0_0 = (global::SerializationTypes.MyCollection)o.@Collection; + if ((Reader.IsEmptyElement)) { + Reader.Skip(); + } + else { + Reader.ReadStartElement(); + Reader.MoveToContent(); + while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { + if (Reader.NodeType == System.Xml.XmlNodeType.Element) { + do { + if (((object) Reader.LocalName == (object)id133_string && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (ReadNull()) { + a_0_0.Add(null); + } + else { + a_0_0.Add(Reader.ReadElementString()); + } + break; + } + UnknownNode(null, @":string"); + } while (false); + } + else { + UnknownNode(null, @":string"); + } + Reader.MoveToContent(); + } + ReadEndElement(); + } + } + break; + } + UnknownNode((object)o, @":Collection"); + } while (false); + } + else { + UnknownNode((object)o, @":Collection"); + } + Reader.MoveToContent(); + } + ReadEndElement(); + return o; + } + + global::SerializationTypes.TypeWithReadOnlyMyCollectionProperty Read51_Item(bool isNullable, bool checkType) { + System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; + bool isNull = false; + if (isNullable) isNull = ReadNull(); + if (checkType) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id51_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + } + else { + throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); + } + } + if (isNull) return null; + global::SerializationTypes.TypeWithReadOnlyMyCollectionProperty o; + o = new global::SerializationTypes.TypeWithReadOnlyMyCollectionProperty(); + global::SerializationTypes.MyCollection a_0 = (global::SerializationTypes.MyCollection)o.@Collection; + System.Span paramsRead = stackalloc bool[1]; + while (Reader.MoveToNextAttribute()) { + if (!IsXmlnsAttribute(Reader.Name)) { + UnknownNode((object)o); + } + } + Reader.MoveToElement(); + if (Reader.IsEmptyElement) { + Reader.Skip(); + return o; + } + Reader.ReadStartElement(); + Reader.MoveToContent(); + while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { + if (Reader.NodeType == System.Xml.XmlNodeType.Element) { + do { + if (((object) Reader.LocalName == (object)id217_Collection && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!ReadNull()) { + global::SerializationTypes.MyCollection a_0_0 = (global::SerializationTypes.MyCollection)o.@Collection; + if (((object)(a_0_0) == null) || (Reader.IsEmptyElement)) { + Reader.Skip(); + } + else { + Reader.ReadStartElement(); + Reader.MoveToContent(); + while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { + if (Reader.NodeType == System.Xml.XmlNodeType.Element) { + do { + if (((object) Reader.LocalName == (object)id133_string && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (ReadNull()) { + a_0_0.Add(null); + } + else { + a_0_0.Add(Reader.ReadElementString()); + } + break; + } + UnknownNode(null, @":string"); + } while (false); + } + else { + UnknownNode(null, @":string"); + } + Reader.MoveToContent(); + } + ReadEndElement(); + } + } + break; + } + UnknownNode((object)o, @":Collection"); + } while (false); + } + else { + UnknownNode((object)o, @":Collection"); + } + Reader.MoveToContent(); + } + ReadEndElement(); + return o; + } + + global::SerializationTypes.TypeWithEnumMembers Read53_TypeWithEnumMembers(bool isNullable, bool checkType) { + System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; + bool isNull = false; + if (isNullable) isNull = ReadNull(); + if (checkType) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id55_TypeWithEnumMembers && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + } + else { + throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); + } + } + if (isNull) return null; + global::SerializationTypes.TypeWithEnumMembers o; + o = new global::SerializationTypes.TypeWithEnumMembers(); + System.Span paramsRead = stackalloc bool[2]; + while (Reader.MoveToNextAttribute()) { + if (!IsXmlnsAttribute(Reader.Name)) { + UnknownNode((object)o); + } + } + Reader.MoveToElement(); + if (Reader.IsEmptyElement) { + Reader.Skip(); + return o; + } + Reader.ReadStartElement(); + Reader.MoveToContent(); + while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { + if (Reader.NodeType == System.Xml.XmlNodeType.Element) { + do { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id207_F1 && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + o.@F1 = Read52_MyEnum(Reader.ReadElementString()); + } + paramsRead[0] = true; + break; + } + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id150_P1 && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + o.@P1 = Read52_MyEnum(Reader.ReadElementString()); + } + paramsRead[1] = true; + break; + } + UnknownNode((object)o, @":F1, :P1"); + } while (false); + } + else { + UnknownNode((object)o, @":F1, :P1"); + } + Reader.MoveToContent(); + } + ReadEndElement(); return o; } - global::SerializationTypes.DCStruct Read53_DCStruct(bool checkType) { + global::SerializationTypes.DCStruct Read54_DCStruct(bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id55_DCStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id56_DCStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -10835,7 +11487,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id206_Data && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id218_Data && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Data = Reader.ReadElementString(); } @@ -10854,12 +11506,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.DCClassWithEnumAndStruct Read54_DCClassWithEnumAndStruct(bool isNullable, bool checkType) { + global::SerializationTypes.DCClassWithEnumAndStruct Read55_DCClassWithEnumAndStruct(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id56_DCClassWithEnumAndStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id57_DCClassWithEnumAndStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -10884,14 +11536,14 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id207_MyStruct && (object) Reader.NamespaceURI == (object)id2_Item)) { - o.@MyStruct = Read53_DCStruct(true); + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id219_MyStruct && (object) Reader.NamespaceURI == (object)id2_Item)) { + o.@MyStruct = Read54_DCStruct(true); paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id208_MyEnum1 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id220_MyEnum1 && (object) Reader.NamespaceURI == (object)id2_Item)) { { - o.@MyEnum1 = Read51_MyEnum(Reader.ReadElementString()); + o.@MyEnum1 = Read52_MyEnum(Reader.ReadElementString()); } paramsRead[1] = true; break; @@ -10908,12 +11560,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.BuiltInTypes Read55_BuiltInTypes(bool isNullable, bool checkType) { + global::SerializationTypes.BuiltInTypes Read56_BuiltInTypes(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id57_BuiltInTypes && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id58_BuiltInTypes && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -10938,7 +11590,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id209_ByteArray && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id221_ByteArray && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@ByteArray = ToByteArrayBase64(false); } @@ -10957,12 +11609,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeB Read57_TypeB(bool isNullable, bool checkType) { + global::SerializationTypes.TypeB Read58_TypeB(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id59_TypeB && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id60_TypeB && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -10987,7 +11639,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id115_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id119_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Name = Reader.ReadElementString(); } @@ -11006,12 +11658,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeHasArrayOfASerializedAsB Read58_TypeHasArrayOfASerializedAsB(bool isNullable, bool checkType) { + global::SerializationTypes.TypeHasArrayOfASerializedAsB Read59_TypeHasArrayOfASerializedAsB(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id60_TypeHasArrayOfASerializedAsB && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id61_TypeHasArrayOfASerializedAsB && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -11038,7 +11690,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id181_Items && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id185_Items && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { global::SerializationTypes.TypeA[] a_0_0 = null; int ca_0_0 = 0; @@ -11051,8 +11703,8 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id58_TypeA && (object) Reader.NamespaceURI == (object)id2_Item)) { - a_0_0 = (global::SerializationTypes.TypeA[])EnsureArrayIndex(a_0_0, ca_0_0, typeof(global::SerializationTypes.TypeA));a_0_0[ca_0_0++] = Read56_TypeA(true, true); + if (((object) Reader.LocalName == (object)id59_TypeA && (object) Reader.NamespaceURI == (object)id2_Item)) { + a_0_0 = (global::SerializationTypes.TypeA[])EnsureArrayIndex(a_0_0, ca_0_0, typeof(global::SerializationTypes.TypeA));a_0_0[ca_0_0++] = Read57_TypeA(true, true); break; } UnknownNode(null, @":TypeA"); @@ -11081,12 +11733,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.@__TypeNameWithSpecialCharacters漢ñ Read59_Item(bool isNullable, bool checkType) { + global::SerializationTypes.@__TypeNameWithSpecialCharacters漢ñ Read60_Item(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id61_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id62_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -11111,7 +11763,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id210_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id222_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@PropertyNameWithSpecialCharacters漢ñ = Reader.ReadElementString(); } @@ -11130,12 +11782,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.DerivedClassWithSameProperty2 Read62_DerivedClassWithSameProperty2(bool isNullable, bool checkType) { + global::SerializationTypes.DerivedClassWithSameProperty2 Read63_DerivedClassWithSameProperty2(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id64_DerivedClassWithSameProperty2 && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id65_DerivedClassWithSameProperty2 && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -11162,28 +11814,28 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id211_StringProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id223_StringProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@StringProperty = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id212_IntProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id224_IntProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@IntProperty = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); } paramsRead[1] = true; break; } - if (!paramsRead[2] && ((object) Reader.LocalName == (object)id213_DateTimeProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id225_DateTimeProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@DateTimeProperty = ToDateTime(Reader.ReadElementString()); } paramsRead[2] = true; break; } - if (((object) Reader.LocalName == (object)id214_ListProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id226_ListProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { if ((object)(o.@ListProperty) == null) o.@ListProperty = new global::System.Collections.Generic.List(); global::System.Collections.Generic.List a_3_0 = (global::System.Collections.Generic.List)o.@ListProperty; @@ -11196,7 +11848,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id129_string && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id133_string && (object) Reader.NamespaceURI == (object)id2_Item)) { if (ReadNull()) { a_3_0.Add(null); } @@ -11230,16 +11882,16 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.DerivedClassWithSameProperty Read61_DerivedClassWithSameProperty(bool isNullable, bool checkType) { + global::SerializationTypes.DerivedClassWithSameProperty Read62_DerivedClassWithSameProperty(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id63_DerivedClassWithSameProperty && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id64_DerivedClassWithSameProperty && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id64_DerivedClassWithSameProperty2 && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read62_DerivedClassWithSameProperty2(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id65_DerivedClassWithSameProperty2 && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read63_DerivedClassWithSameProperty2(isNullable, false); throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); } } @@ -11264,28 +11916,28 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id211_StringProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id223_StringProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@StringProperty = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id212_IntProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id224_IntProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@IntProperty = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); } paramsRead[1] = true; break; } - if (!paramsRead[2] && ((object) Reader.LocalName == (object)id213_DateTimeProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id225_DateTimeProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@DateTimeProperty = ToDateTime(Reader.ReadElementString()); } paramsRead[2] = true; break; } - if (((object) Reader.LocalName == (object)id214_ListProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id226_ListProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { if ((object)(o.@ListProperty) == null) o.@ListProperty = new global::System.Collections.Generic.List(); global::System.Collections.Generic.List a_3_0 = (global::System.Collections.Generic.List)o.@ListProperty; @@ -11298,7 +11950,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id129_string && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id133_string && (object) Reader.NamespaceURI == (object)id2_Item)) { if (ReadNull()) { a_3_0.Add(null); } @@ -11332,18 +11984,18 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.BaseClassWithSamePropertyName Read60_BaseClassWithSamePropertyName(bool isNullable, bool checkType) { + global::SerializationTypes.BaseClassWithSamePropertyName Read61_BaseClassWithSamePropertyName(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id62_BaseClassWithSamePropertyName && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id63_BaseClassWithSamePropertyName && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id63_DerivedClassWithSameProperty && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read61_DerivedClassWithSameProperty(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id64_DerivedClassWithSameProperty2 && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read62_DerivedClassWithSameProperty2(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id64_DerivedClassWithSameProperty && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read62_DerivedClassWithSameProperty(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id65_DerivedClassWithSameProperty2 && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read63_DerivedClassWithSameProperty2(isNullable, false); throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); } } @@ -11368,28 +12020,28 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id211_StringProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id223_StringProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@StringProperty = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id212_IntProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id224_IntProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@IntProperty = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); } paramsRead[1] = true; break; } - if (!paramsRead[2] && ((object) Reader.LocalName == (object)id213_DateTimeProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id225_DateTimeProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@DateTimeProperty = ToDateTime(Reader.ReadElementString()); } paramsRead[2] = true; break; } - if (((object) Reader.LocalName == (object)id214_ListProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id226_ListProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { if ((object)(o.@ListProperty) == null) o.@ListProperty = new global::System.Collections.Generic.List(); global::System.Collections.Generic.List a_3_0 = (global::System.Collections.Generic.List)o.@ListProperty; @@ -11402,7 +12054,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id129_string && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id133_string && (object) Reader.NamespaceURI == (object)id2_Item)) { if (ReadNull()) { a_3_0.Add(null); } @@ -11436,12 +12088,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithDateTimePropertyAsXmlTime Read63_Item(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithDateTimePropertyAsXmlTime Read64_Item(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id65_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id66_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -11483,12 +12135,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithByteArrayAsXmlText Read64_TypeWithByteArrayAsXmlText(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithByteArrayAsXmlText Read65_TypeWithByteArrayAsXmlText(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id66_TypeWithByteArrayAsXmlText && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id67_TypeWithByteArrayAsXmlText && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -11530,12 +12182,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.SimpleDC Read65_SimpleDC(bool isNullable, bool checkType) { + global::SerializationTypes.SimpleDC Read66_SimpleDC(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id67_SimpleDC && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id68_SimpleDC && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -11560,7 +12212,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id206_Data && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id218_Data && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Data = Reader.ReadElementString(); } @@ -11579,12 +12231,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithXmlTextAttributeOnArray Read66_Item(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithXmlTextAttributeOnArray Read67_Item(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id68_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id69_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id69_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id70_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -11630,12 +12282,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.ClassImplementsInterface Read68_ClassImplementsInterface(bool isNullable, bool checkType) { + global::SerializationTypes.ClassImplementsInterface Read69_ClassImplementsInterface(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id71_ClassImplementsInterface && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id72_ClassImplementsInterface && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -11660,28 +12312,28 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id215_ClassID && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id227_ClassID && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@ClassID = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id216_DisplayName && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id228_DisplayName && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@DisplayName = Reader.ReadElementString(); } paramsRead[1] = true; break; } - if (!paramsRead[2] && ((object) Reader.LocalName == (object)id217_Id && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id229_Id && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Id = Reader.ReadElementString(); } paramsRead[2] = true; break; } - if (!paramsRead[3] && ((object) Reader.LocalName == (object)id218_IsLoaded && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[3] && ((object) Reader.LocalName == (object)id230_IsLoaded && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@IsLoaded = System.Xml.XmlConvert.ToBoolean(Reader.ReadElementString()); } @@ -11700,11 +12352,11 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.SomeStruct Read69_SomeStruct(bool checkType) { + global::SerializationTypes.SomeStruct Read70_SomeStruct(bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id73_SomeStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id74_SomeStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -11736,14 +12388,14 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id117_A && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id121_A && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@A = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id118_B && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id122_B && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@B = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); } @@ -11762,12 +12414,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.WithStruct Read70_WithStruct(bool isNullable, bool checkType) { + global::SerializationTypes.WithStruct Read71_WithStruct(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id72_WithStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id73_WithStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -11792,8 +12444,8 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id219_Some && (object) Reader.NamespaceURI == (object)id2_Item)) { - o.@Some = Read69_SomeStruct(true); + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id231_Some && (object) Reader.NamespaceURI == (object)id2_Item)) { + o.@Some = Read70_SomeStruct(true); paramsRead[0] = true; break; } @@ -11809,12 +12461,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.WithEnums Read73_WithEnums(bool isNullable, bool checkType) { + global::SerializationTypes.WithEnums Read74_WithEnums(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id74_WithEnums && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id75_WithEnums && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -11839,16 +12491,16 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id220_Int && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id232_Int && (object) Reader.NamespaceURI == (object)id2_Item)) { { - o.@Int = Read71_IntEnum(Reader.ReadElementString()); + o.@Int = Read72_IntEnum(Reader.ReadElementString()); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id221_Short && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id233_Short && (object) Reader.NamespaceURI == (object)id2_Item)) { { - o.@Short = Read72_ShortEnum(Reader.ReadElementString()); + o.@Short = Read73_ShortEnum(Reader.ReadElementString()); } paramsRead[1] = true; break; @@ -11865,12 +12517,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.WithNullables Read77_WithNullables(bool isNullable, bool checkType) { + global::SerializationTypes.WithNullables Read78_WithNullables(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id75_WithNullables && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id76_WithNullables && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -11895,33 +12547,33 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id222_Optional && (object) Reader.NamespaceURI == (object)id2_Item)) { - o.@Optional = Read74_NullableOfIntEnum(true); + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id234_Optional && (object) Reader.NamespaceURI == (object)id2_Item)) { + o.@Optional = Read75_NullableOfIntEnum(true); paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id223_Optionull && (object) Reader.NamespaceURI == (object)id2_Item)) { - o.@Optionull = Read74_NullableOfIntEnum(true); + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id235_Optionull && (object) Reader.NamespaceURI == (object)id2_Item)) { + o.@Optionull = Read75_NullableOfIntEnum(true); paramsRead[1] = true; break; } - if (!paramsRead[2] && ((object) Reader.LocalName == (object)id224_OptionalInt && (object) Reader.NamespaceURI == (object)id2_Item)) { - o.@OptionalInt = Read75_NullableOfInt32(true); + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id236_OptionalInt && (object) Reader.NamespaceURI == (object)id2_Item)) { + o.@OptionalInt = Read76_NullableOfInt32(true); paramsRead[2] = true; break; } - if (!paramsRead[3] && ((object) Reader.LocalName == (object)id225_OptionullInt && (object) Reader.NamespaceURI == (object)id2_Item)) { - o.@OptionullInt = Read75_NullableOfInt32(true); + if (!paramsRead[3] && ((object) Reader.LocalName == (object)id237_OptionullInt && (object) Reader.NamespaceURI == (object)id2_Item)) { + o.@OptionullInt = Read76_NullableOfInt32(true); paramsRead[3] = true; break; } - if (!paramsRead[4] && ((object) Reader.LocalName == (object)id226_Struct1 && (object) Reader.NamespaceURI == (object)id2_Item)) { - o.@Struct1 = Read76_NullableOfSomeStruct(true); + if (!paramsRead[4] && ((object) Reader.LocalName == (object)id238_Struct1 && (object) Reader.NamespaceURI == (object)id2_Item)) { + o.@Struct1 = Read77_NullableOfSomeStruct(true); paramsRead[4] = true; break; } - if (!paramsRead[5] && ((object) Reader.LocalName == (object)id227_Struct2 && (object) Reader.NamespaceURI == (object)id2_Item)) { - o.@Struct2 = Read76_NullableOfSomeStruct(true); + if (!paramsRead[5] && ((object) Reader.LocalName == (object)id239_Struct2 && (object) Reader.NamespaceURI == (object)id2_Item)) { + o.@Struct2 = Read77_NullableOfSomeStruct(true); paramsRead[5] = true; break; } @@ -11937,15 +12589,15 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::System.Nullable Read76_NullableOfSomeStruct(bool checkType) { + global::System.Nullable Read77_NullableOfSomeStruct(bool checkType) { global::System.Nullable o = default(global::System.Nullable); if (ReadNull()) return o; - o = Read69_SomeStruct(true); + o = Read70_SomeStruct(true); return o; } - global::System.Nullable Read75_NullableOfInt32(bool checkType) { + global::System.Nullable Read76_NullableOfInt32(bool checkType) { global::System.Nullable o = default(global::System.Nullable); if (ReadNull()) return o; @@ -11955,22 +12607,22 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::System.Nullable Read74_NullableOfIntEnum(bool checkType) { + global::System.Nullable Read75_NullableOfIntEnum(bool checkType) { global::System.Nullable o = default(global::System.Nullable); if (ReadNull()) return o; { - o = Read71_IntEnum(Reader.ReadElementString()); + o = Read72_IntEnum(Reader.ReadElementString()); } return o; } - global::SerializationTypes.XmlSerializerAttributes Read84_XmlSerializerAttributes(bool isNullable, bool checkType) { + global::SerializationTypes.XmlSerializerAttributes Read85_XmlSerializerAttributes(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id121_XmlSerializerAttributes && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id125_XmlSerializerAttributes && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -11985,7 +12637,7 @@ internal System.Collections.Hashtable EnumFlagsValues { int ca_7 = 0; System.Span paramsRead = stackalloc bool[8]; while (Reader.MoveToNextAttribute()) { - if (!paramsRead[6] && ((object) Reader.LocalName == (object)id228_XmlAttributeName && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[6] && ((object) Reader.LocalName == (object)id240_XmlAttributeName && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@XmlAttributeProperty = System.Xml.XmlConvert.ToInt32(Reader.Value); paramsRead[6] = true; } @@ -12004,7 +12656,7 @@ internal System.Collections.Hashtable EnumFlagsValues { string tmp = null; if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id229_Word && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id241_Word && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@MyChoice = Reader.ReadElementString(); } @@ -12012,7 +12664,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[0] = true; break; } - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id230_Number && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id242_Number && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@MyChoice = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); } @@ -12020,7 +12672,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[0] = true; break; } - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id231_DecimalNumber && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id243_DecimalNumber && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@MyChoice = System.Xml.XmlConvert.ToDouble(Reader.ReadElementString()); } @@ -12028,12 +12680,12 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id232_XmlIncludeProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id244_XmlIncludeProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@XmlIncludeProperty = Read1_Object(false, true); paramsRead[1] = true; break; } - if (((object) Reader.LocalName == (object)id233_XmlEnumProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id245_XmlEnumProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { global::SerializationTypes.ItemChoiceType[] a_2_0 = null; int ca_2_0 = 0; @@ -12046,9 +12698,9 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id84_ItemChoiceType && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id85_ItemChoiceType && (object) Reader.NamespaceURI == (object)id2_Item)) { { - a_2_0 = (global::SerializationTypes.ItemChoiceType[])EnsureArrayIndex(a_2_0, ca_2_0, typeof(global::SerializationTypes.ItemChoiceType));a_2_0[ca_2_0++] = Read83_ItemChoiceType(Reader.ReadElementString()); + a_2_0 = (global::SerializationTypes.ItemChoiceType[])EnsureArrayIndex(a_2_0, ca_2_0, typeof(global::SerializationTypes.ItemChoiceType));a_2_0[ca_2_0++] = Read84_ItemChoiceType(Reader.ReadElementString()); } break; } @@ -12066,21 +12718,21 @@ internal System.Collections.Hashtable EnumFlagsValues { } break; } - if (!paramsRead[4] && ((object) Reader.LocalName == (object)id234_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[4] && ((object) Reader.LocalName == (object)id246_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@XmlNamespaceDeclarationsProperty = Reader.ReadElementString(); } paramsRead[4] = true; break; } - if (!paramsRead[5] && ((object) Reader.LocalName == (object)id235_XmlElementPropertyNode && (object) Reader.NamespaceURI == (object)id236_httpelement)) { + if (!paramsRead[5] && ((object) Reader.LocalName == (object)id247_XmlElementPropertyNode && (object) Reader.NamespaceURI == (object)id248_httpelement)) { { o.@XmlElementProperty = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); } paramsRead[5] = true; break; } - if (((object) Reader.LocalName == (object)id237_CustomXmlArrayProperty && (object) Reader.NamespaceURI == (object)id140_httpmynamespace)) { + if (((object) Reader.LocalName == (object)id249_CustomXmlArrayProperty && (object) Reader.NamespaceURI == (object)id144_httpmynamespace)) { if (!ReadNull()) { global::System.Object[] a_7_0 = null; int ca_7_0 = 0; @@ -12093,7 +12745,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id129_string && (object) Reader.NamespaceURI == (object)id140_httpmynamespace)) { + if (((object) Reader.LocalName == (object)id133_string && (object) Reader.NamespaceURI == (object)id144_httpmynamespace)) { if (ReadNull()) { a_7_0 = (global::System.Object[])EnsureArrayIndex(a_7_0, ca_7_0, typeof(global::System.Object));a_7_0[ca_7_0++] = null; } @@ -12135,12 +12787,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithAnyAttribute Read85_TypeWithAnyAttribute(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithAnyAttribute Read86_TypeWithAnyAttribute(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id85_TypeWithAnyAttribute && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id86_TypeWithAnyAttribute && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -12153,7 +12805,7 @@ internal System.Collections.Hashtable EnumFlagsValues { int ca_2 = 0; System.Span paramsRead = stackalloc bool[3]; while (Reader.MoveToNextAttribute()) { - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id212_IntProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id224_IntProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@IntProperty = System.Xml.XmlConvert.ToInt32(Reader.Value); paramsRead[1] = true; } @@ -12175,7 +12827,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id115_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id119_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Name = Reader.ReadElementString(); } @@ -12195,12 +12847,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.KnownTypesThroughConstructor Read86_KnownTypesThroughConstructor(bool isNullable, bool checkType) { + global::SerializationTypes.KnownTypesThroughConstructor Read87_KnownTypesThroughConstructor(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id86_KnownTypesThroughConstructor && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id87_KnownTypesThroughConstructor && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -12225,12 +12877,12 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id238_EnumValue && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id250_EnumValue && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@EnumValue = Read1_Object(false, true); paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id239_SimpleTypeValue && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id251_SimpleTypeValue && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@SimpleTypeValue = Read1_Object(false, true); paramsRead[1] = true; break; @@ -12247,12 +12899,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.SimpleKnownTypeValue Read87_SimpleKnownTypeValue(bool isNullable, bool checkType) { + global::SerializationTypes.SimpleKnownTypeValue Read88_SimpleKnownTypeValue(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id87_SimpleKnownTypeValue && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id88_SimpleKnownTypeValue && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -12277,7 +12929,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id240_StrProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id252_StrProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@StrProperty = Reader.ReadElementString(); } @@ -12296,12 +12948,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithPropertyNameSpecified Read88_TypeWithPropertyNameSpecified(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithPropertyNameSpecified Read89_TypeWithPropertyNameSpecified(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id89_TypeWithPropertyNameSpecified && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id90_TypeWithPropertyNameSpecified && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -12326,7 +12978,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id241_MyField && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id253_MyField && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@MyFieldSpecified = true; { o.@MyField = Reader.ReadElementString(); @@ -12334,7 +12986,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id242_MyFieldIgnored && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id254_MyFieldIgnored && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@MyFieldIgnoredSpecified = true; { o.@MyFieldIgnored = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); @@ -12354,12 +13006,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithXmlSchemaFormAttribute Read89_TypeWithXmlSchemaFormAttribute(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithXmlSchemaFormAttribute Read90_TypeWithXmlSchemaFormAttribute(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id90_TypeWithXmlSchemaFormAttribute && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id91_TypeWithXmlSchemaFormAttribute && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -12390,7 +13042,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id243_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id255_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { if ((object)(o.@UnqualifiedSchemaFormListProperty) == null) o.@UnqualifiedSchemaFormListProperty = new global::System.Collections.Generic.List(); global::System.Collections.Generic.List a_0_0 = (global::System.Collections.Generic.List)o.@UnqualifiedSchemaFormListProperty; @@ -12403,7 +13055,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id127_int && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id131_int && (object) Reader.NamespaceURI == (object)id2_Item)) { { a_0_0.Add(System.Xml.XmlConvert.ToInt32(Reader.ReadElementString())); } @@ -12422,7 +13074,7 @@ internal System.Collections.Hashtable EnumFlagsValues { } break; } - if (((object) Reader.LocalName == (object)id244_NoneSchemaFormListProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id256_NoneSchemaFormListProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { if ((object)(o.@NoneSchemaFormListProperty) == null) o.@NoneSchemaFormListProperty = new global::System.Collections.Generic.List(); global::System.Collections.Generic.List a_1_0 = (global::System.Collections.Generic.List)o.@NoneSchemaFormListProperty; @@ -12435,7 +13087,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id142_NoneParameter && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id146_NoneParameter && (object) Reader.NamespaceURI == (object)id2_Item)) { { a_1_0.Add(Reader.ReadElementString()); } @@ -12454,7 +13106,7 @@ internal System.Collections.Hashtable EnumFlagsValues { } break; } - if (((object) Reader.LocalName == (object)id245_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id257_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { if ((object)(o.@QualifiedSchemaFormListProperty) == null) o.@QualifiedSchemaFormListProperty = new global::System.Collections.Generic.List(); global::System.Collections.Generic.List a_2_0 = (global::System.Collections.Generic.List)o.@QualifiedSchemaFormListProperty; @@ -12467,7 +13119,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id144_QualifiedParameter && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id148_QualifiedParameter && (object) Reader.NamespaceURI == (object)id2_Item)) { { a_2_0.Add(System.Xml.XmlConvert.ToBoolean(Reader.ReadElementString())); } @@ -12498,12 +13150,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithTypeNameInXmlTypeAttribute Read90_Item(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithTypeNameInXmlTypeAttribute Read91_Item(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id91_MyXmlType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id92_MyXmlType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -12514,7 +13166,7 @@ internal System.Collections.Hashtable EnumFlagsValues { o = new global::SerializationTypes.TypeWithTypeNameInXmlTypeAttribute(); System.Span paramsRead = stackalloc bool[1]; while (Reader.MoveToNextAttribute()) { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id246_XmlAttributeForm && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id258_XmlAttributeForm && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@XmlAttributeForm = Reader.Value; paramsRead[0] = true; } @@ -12542,12 +13194,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithNonPublicDefaultConstructor Read92_Item(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithNonPublicDefaultConstructor Read93_Item(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id93_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id94_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -12580,7 +13232,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id115_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id119_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Name = Reader.ReadElementString(); } @@ -12599,12 +13251,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.ServerSettings Read93_ServerSettings(bool isNullable, bool checkType) { + global::SerializationTypes.ServerSettings Read94_ServerSettings(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id94_ServerSettings && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id95_ServerSettings && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -12629,14 +13281,14 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id247_DS2Root && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id259_DS2Root && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@DS2Root = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id248_MetricConfigUrl && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id260_MetricConfigUrl && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@MetricConfigUrl = Reader.ReadElementString(); } @@ -12655,12 +13307,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithXmlQualifiedName Read94_TypeWithXmlQualifiedName(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithXmlQualifiedName Read95_TypeWithXmlQualifiedName(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id95_TypeWithXmlQualifiedName && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id96_TypeWithXmlQualifiedName && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -12685,7 +13337,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id148_Value && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id152_Value && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Value = ReadElementQualifiedName(); } @@ -12704,12 +13356,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWith2DArrayProperty2 Read95_TypeWith2DArrayProperty2(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWith2DArrayProperty2 Read96_TypeWith2DArrayProperty2(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id96_TypeWith2DArrayProperty2 && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id97_TypeWith2DArrayProperty2 && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -12736,7 +13388,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id249_TwoDArrayOfSimpleType && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id261_TwoDArrayOfSimpleType && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { global::SerializationTypes.SimpleType[][] a_0_0 = null; int ca_0_0 = 0; @@ -12806,12 +13458,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithPropertiesHavingDefaultValue Read96_Item(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithPropertiesHavingDefaultValue Read97_Item(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id97_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id98_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -12836,21 +13488,21 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id250_EmptyStringProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id262_EmptyStringProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@EmptyStringProperty = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id211_StringProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id223_StringProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@StringProperty = Reader.ReadElementString(); } paramsRead[1] = true; break; } - if (!paramsRead[2] && ((object) Reader.LocalName == (object)id212_IntProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id224_IntProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -12860,7 +13512,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[2] = true; break; } - if (!paramsRead[3] && ((object) Reader.LocalName == (object)id251_CharProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[3] && ((object) Reader.LocalName == (object)id263_CharProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -12882,12 +13534,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithEnumPropertyHavingDefaultValue Read97_Item(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithEnumPropertyHavingDefaultValue Read98_Item(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id98_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id99_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -12912,12 +13564,12 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id252_EnumProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id264_EnumProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } else { - o.@EnumProperty = Read71_IntEnum(Reader.ReadElementString()); + o.@EnumProperty = Read72_IntEnum(Reader.ReadElementString()); } paramsRead[0] = true; break; @@ -12934,12 +13586,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithEnumFlagPropertyHavingDefaultValue Read98_Item(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithEnumFlagPropertyHavingDefaultValue Read99_Item(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id99_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id100_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -12964,12 +13616,12 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id252_EnumProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id264_EnumProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } else { - o.@EnumProperty = Read67_EnumFlags(Reader.ReadElementString()); + o.@EnumProperty = Read68_EnumFlags(Reader.ReadElementString()); } paramsRead[0] = true; break; @@ -12986,12 +13638,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithShouldSerializeMethod Read99_TypeWithShouldSerializeMethod(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithShouldSerializeMethod Read100_TypeWithShouldSerializeMethod(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id100_TypeWithShouldSerializeMethod && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id101_TypeWithShouldSerializeMethod && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -13016,7 +13668,7 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id253_Foo && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id265_Foo && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Foo = Reader.ReadElementString(); } @@ -13035,21 +13687,229 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.KnownTypesThroughConstructorWithArrayProperties Read100_Item(bool isNullable, bool checkType) { + global::SerializationTypes.KnownTypesThroughConstructorWithArrayProperties Read101_Item(bool isNullable, bool checkType) { + System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; + bool isNull = false; + if (isNullable) isNull = ReadNull(); + if (checkType) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id102_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + } + else { + throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); + } + } + if (isNull) return null; + global::SerializationTypes.KnownTypesThroughConstructorWithArrayProperties o; + o = new global::SerializationTypes.KnownTypesThroughConstructorWithArrayProperties(); + System.Span paramsRead = stackalloc bool[2]; + while (Reader.MoveToNextAttribute()) { + if (!IsXmlnsAttribute(Reader.Name)) { + UnknownNode((object)o); + } + } + Reader.MoveToElement(); + if (Reader.IsEmptyElement) { + Reader.Skip(); + return o; + } + Reader.ReadStartElement(); + Reader.MoveToContent(); + while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { + if (Reader.NodeType == System.Xml.XmlNodeType.Element) { + do { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id266_StringArrayValue && (object) Reader.NamespaceURI == (object)id2_Item)) { + o.@StringArrayValue = Read1_Object(false, true); + paramsRead[0] = true; + break; + } + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id267_IntArrayValue && (object) Reader.NamespaceURI == (object)id2_Item)) { + o.@IntArrayValue = Read1_Object(false, true); + paramsRead[1] = true; + break; + } + UnknownNode((object)o, @":StringArrayValue, :IntArrayValue"); + } while (false); + } + else { + UnknownNode((object)o, @":StringArrayValue, :IntArrayValue"); + } + Reader.MoveToContent(); + } + ReadEndElement(); + return o; + } + + global::SerializationTypes.KnownTypesThroughConstructorWithValue Read102_Item(bool isNullable, bool checkType) { + System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; + bool isNull = false; + if (isNullable) isNull = ReadNull(); + if (checkType) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id103_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + } + else { + throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); + } + } + if (isNull) return null; + global::SerializationTypes.KnownTypesThroughConstructorWithValue o; + o = new global::SerializationTypes.KnownTypesThroughConstructorWithValue(); + System.Span paramsRead = stackalloc bool[1]; + while (Reader.MoveToNextAttribute()) { + if (!IsXmlnsAttribute(Reader.Name)) { + UnknownNode((object)o); + } + } + Reader.MoveToElement(); + if (Reader.IsEmptyElement) { + Reader.Skip(); + return o; + } + Reader.ReadStartElement(); + Reader.MoveToContent(); + while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { + if (Reader.NodeType == System.Xml.XmlNodeType.Element) { + do { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id152_Value && (object) Reader.NamespaceURI == (object)id2_Item)) { + o.@Value = Read1_Object(false, true); + paramsRead[0] = true; + break; + } + UnknownNode((object)o, @":Value"); + } while (false); + } + else { + UnknownNode((object)o, @":Value"); + } + Reader.MoveToContent(); + } + ReadEndElement(); + return o; + } + + global::SerializationTypes.TypeWithTypesHavingCustomFormatter Read103_Item(bool isNullable, bool checkType) { + System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; + bool isNull = false; + if (isNullable) isNull = ReadNull(); + if (checkType) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id104_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + } + else { + throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); + } + } + if (isNull) return null; + global::SerializationTypes.TypeWithTypesHavingCustomFormatter o; + o = new global::SerializationTypes.TypeWithTypesHavingCustomFormatter(); + System.Span paramsRead = stackalloc bool[9]; + while (Reader.MoveToNextAttribute()) { + if (!IsXmlnsAttribute(Reader.Name)) { + UnknownNode((object)o); + } + } + Reader.MoveToElement(); + if (Reader.IsEmptyElement) { + Reader.Skip(); + return o; + } + Reader.ReadStartElement(); + Reader.MoveToContent(); + while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { + if (Reader.NodeType == System.Xml.XmlNodeType.Element) { + do { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id268_DateTimeContent && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + o.@DateTimeContent = ToDateTime(Reader.ReadElementString()); + } + paramsRead[0] = true; + break; + } + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id269_QNameContent && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + o.@QNameContent = ReadElementQualifiedName(); + } + paramsRead[1] = true; + break; + } + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id270_DateContent && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + o.@DateContent = ToDate(Reader.ReadElementString()); + } + paramsRead[2] = true; + break; + } + if (!paramsRead[3] && ((object) Reader.LocalName == (object)id271_NameContent && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + o.@NameContent = ToXmlName(Reader.ReadElementString()); + } + paramsRead[3] = true; + break; + } + if (!paramsRead[4] && ((object) Reader.LocalName == (object)id272_NCNameContent && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + o.@NCNameContent = ToXmlNCName(Reader.ReadElementString()); + } + paramsRead[4] = true; + break; + } + if (!paramsRead[5] && ((object) Reader.LocalName == (object)id273_NMTOKENContent && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + o.@NMTOKENContent = ToXmlNmToken(Reader.ReadElementString()); + } + paramsRead[5] = true; + break; + } + if (!paramsRead[6] && ((object) Reader.LocalName == (object)id274_NMTOKENSContent && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + o.@NMTOKENSContent = ToXmlNmTokens(Reader.ReadElementString()); + } + paramsRead[6] = true; + break; + } + if (!paramsRead[7] && ((object) Reader.LocalName == (object)id275_Base64BinaryContent && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + o.@Base64BinaryContent = ToByteArrayBase64(false); + } + paramsRead[7] = true; + break; + } + if (!paramsRead[8] && ((object) Reader.LocalName == (object)id276_HexBinaryContent && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + o.@HexBinaryContent = ToByteArrayHex(false); + } + paramsRead[8] = true; + break; + } + UnknownNode((object)o, @":DateTimeContent, :QNameContent, :DateContent, :NameContent, :NCNameContent, :NMTOKENContent, :NMTOKENSContent, :Base64BinaryContent, :HexBinaryContent"); + } while (false); + } + else { + UnknownNode((object)o, @":DateTimeContent, :QNameContent, :DateContent, :NameContent, :NCNameContent, :NMTOKENContent, :NMTOKENSContent, :Base64BinaryContent, :HexBinaryContent"); + } + Reader.MoveToContent(); + } + ReadEndElement(); + return o; + } + + global::SerializationTypes.TypeWithArrayPropertyHavingChoice Read105_Item(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id101_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id105_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); } } if (isNull) return null; - global::SerializationTypes.KnownTypesThroughConstructorWithArrayProperties o; - o = new global::SerializationTypes.KnownTypesThroughConstructorWithArrayProperties(); - System.Span paramsRead = stackalloc bool[2]; + global::SerializationTypes.TypeWithArrayPropertyHavingChoice o; + o = new global::SerializationTypes.TypeWithArrayPropertyHavingChoice(); + global::System.Object[] a_0 = null; + int ca_0 = 0; + global::SerializationTypes.MoreChoices[] choice_a_0 = null; + int cchoice_a_0 = 0; + System.Span paramsRead = stackalloc bool[1]; while (Reader.MoveToNextAttribute()) { if (!IsXmlnsAttribute(Reader.Name)) { UnknownNode((object)o); @@ -13058,6 +13918,8 @@ internal System.Collections.Hashtable EnumFlagsValues { Reader.MoveToElement(); if (Reader.IsEmptyElement) { Reader.Skip(); + o.@ManyChoices = (global::System.Object[])ShrinkArray(a_0, ca_0, typeof(global::System.Object), true); + o.@ChoiceArray = (global::SerializationTypes.MoreChoices[])ShrinkArray(choice_a_0, cchoice_a_0, typeof(global::SerializationTypes.MoreChoices), true); return o; } Reader.ReadStartElement(); @@ -13065,42 +13927,48 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id254_StringArrayValue && (object) Reader.NamespaceURI == (object)id2_Item)) { - o.@StringArrayValue = Read1_Object(false, true); - paramsRead[0] = true; + if (((object) Reader.LocalName == (object)id277_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + a_0 = (global::System.Object[])EnsureArrayIndex(a_0, ca_0, typeof(global::System.Object));a_0[ca_0++] = Reader.ReadElementString(); + } + choice_a_0 = (global::SerializationTypes.MoreChoices[])EnsureArrayIndex(choice_a_0, cchoice_a_0, typeof(global::SerializationTypes.MoreChoices));choice_a_0[cchoice_a_0++] = global::SerializationTypes.MoreChoices.@Item; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id255_IntArrayValue && (object) Reader.NamespaceURI == (object)id2_Item)) { - o.@IntArrayValue = Read1_Object(false, true); - paramsRead[1] = true; + if (((object) Reader.LocalName == (object)id278_Amount && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + a_0 = (global::System.Object[])EnsureArrayIndex(a_0, ca_0, typeof(global::System.Object));a_0[ca_0++] = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); + } + choice_a_0 = (global::SerializationTypes.MoreChoices[])EnsureArrayIndex(choice_a_0, cchoice_a_0, typeof(global::SerializationTypes.MoreChoices));choice_a_0[cchoice_a_0++] = global::SerializationTypes.MoreChoices.@Amount; break; } - UnknownNode((object)o, @":StringArrayValue, :IntArrayValue"); + UnknownNode((object)o, @":Item, :Amount"); } while (false); } else { - UnknownNode((object)o, @":StringArrayValue, :IntArrayValue"); + UnknownNode((object)o, @":Item, :Amount"); } Reader.MoveToContent(); } + o.@ManyChoices = (global::System.Object[])ShrinkArray(a_0, ca_0, typeof(global::System.Object), true); + o.@ChoiceArray = (global::SerializationTypes.MoreChoices[])ShrinkArray(choice_a_0, cchoice_a_0, typeof(global::SerializationTypes.MoreChoices), true); ReadEndElement(); return o; } - global::SerializationTypes.KnownTypesThroughConstructorWithValue Read101_Item(bool isNullable, bool checkType) { + global::SerializationTypes.ComplexChoiceB Read106_ComplexChoiceB(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id102_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id109_ComplexChoiceB && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); } } if (isNull) return null; - global::SerializationTypes.KnownTypesThroughConstructorWithValue o; - o = new global::SerializationTypes.KnownTypesThroughConstructorWithValue(); + global::SerializationTypes.ComplexChoiceB o; + o = new global::SerializationTypes.ComplexChoiceB(); System.Span paramsRead = stackalloc bool[1]; while (Reader.MoveToNextAttribute()) { if (!IsXmlnsAttribute(Reader.Name)) { @@ -13117,16 +13985,18 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id148_Value && (object) Reader.NamespaceURI == (object)id2_Item)) { - o.@Value = Read1_Object(false, true); + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id119_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + o.@Name = Reader.ReadElementString(); + } paramsRead[0] = true; break; } - UnknownNode((object)o, @":Value"); + UnknownNode((object)o, @":Name"); } while (false); } else { - UnknownNode((object)o, @":Value"); + UnknownNode((object)o, @":Name"); } Reader.MoveToContent(); } @@ -13134,21 +14004,23 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithTypesHavingCustomFormatter Read102_Item(bool isNullable, bool checkType) { + global::SerializationTypes.ComplexChoiceA Read107_ComplexChoiceA(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id103_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id108_ComplexChoiceA && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id109_ComplexChoiceB && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read106_ComplexChoiceB(isNullable, false); throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); } } if (isNull) return null; - global::SerializationTypes.TypeWithTypesHavingCustomFormatter o; - o = new global::SerializationTypes.TypeWithTypesHavingCustomFormatter(); - System.Span paramsRead = stackalloc bool[9]; + global::SerializationTypes.ComplexChoiceA o; + o = new global::SerializationTypes.ComplexChoiceA(); + System.Span paramsRead = stackalloc bool[1]; while (Reader.MoveToNextAttribute()) { if (!IsXmlnsAttribute(Reader.Name)) { UnknownNode((object)o); @@ -13164,74 +14036,18 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id256_DateTimeContent && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id119_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { { - o.@DateTimeContent = ToDateTime(Reader.ReadElementString()); + o.@Name = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id257_QNameContent && (object) Reader.NamespaceURI == (object)id2_Item)) { - { - o.@QNameContent = ReadElementQualifiedName(); - } - paramsRead[1] = true; - break; - } - if (!paramsRead[2] && ((object) Reader.LocalName == (object)id258_DateContent && (object) Reader.NamespaceURI == (object)id2_Item)) { - { - o.@DateContent = ToDate(Reader.ReadElementString()); - } - paramsRead[2] = true; - break; - } - if (!paramsRead[3] && ((object) Reader.LocalName == (object)id259_NameContent && (object) Reader.NamespaceURI == (object)id2_Item)) { - { - o.@NameContent = ToXmlName(Reader.ReadElementString()); - } - paramsRead[3] = true; - break; - } - if (!paramsRead[4] && ((object) Reader.LocalName == (object)id260_NCNameContent && (object) Reader.NamespaceURI == (object)id2_Item)) { - { - o.@NCNameContent = ToXmlNCName(Reader.ReadElementString()); - } - paramsRead[4] = true; - break; - } - if (!paramsRead[5] && ((object) Reader.LocalName == (object)id261_NMTOKENContent && (object) Reader.NamespaceURI == (object)id2_Item)) { - { - o.@NMTOKENContent = ToXmlNmToken(Reader.ReadElementString()); - } - paramsRead[5] = true; - break; - } - if (!paramsRead[6] && ((object) Reader.LocalName == (object)id262_NMTOKENSContent && (object) Reader.NamespaceURI == (object)id2_Item)) { - { - o.@NMTOKENSContent = ToXmlNmTokens(Reader.ReadElementString()); - } - paramsRead[6] = true; - break; - } - if (!paramsRead[7] && ((object) Reader.LocalName == (object)id263_Base64BinaryContent && (object) Reader.NamespaceURI == (object)id2_Item)) { - { - o.@Base64BinaryContent = ToByteArrayBase64(false); - } - paramsRead[7] = true; - break; - } - if (!paramsRead[8] && ((object) Reader.LocalName == (object)id264_HexBinaryContent && (object) Reader.NamespaceURI == (object)id2_Item)) { - { - o.@HexBinaryContent = ToByteArrayHex(false); - } - paramsRead[8] = true; - break; - } - UnknownNode((object)o, @":DateTimeContent, :QNameContent, :DateContent, :NameContent, :NCNameContent, :NMTOKENContent, :NMTOKENSContent, :Base64BinaryContent, :HexBinaryContent"); + UnknownNode((object)o, @":Name"); } while (false); } else { - UnknownNode((object)o, @":DateTimeContent, :QNameContent, :DateContent, :NameContent, :NCNameContent, :NMTOKENContent, :NMTOKENSContent, :Base64BinaryContent, :HexBinaryContent"); + UnknownNode((object)o, @":Name"); } Reader.MoveToContent(); } @@ -13239,20 +14055,20 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithArrayPropertyHavingChoice Read104_Item(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithPropertyHavingComplexChoice Read108_Item(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id104_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id106_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); } } if (isNull) return null; - global::SerializationTypes.TypeWithArrayPropertyHavingChoice o; - o = new global::SerializationTypes.TypeWithArrayPropertyHavingChoice(); + global::SerializationTypes.TypeWithPropertyHavingComplexChoice o; + o = new global::SerializationTypes.TypeWithPropertyHavingComplexChoice(); global::System.Object[] a_0 = null; int ca_0 = 0; global::SerializationTypes.MoreChoices[] choice_a_0 = null; @@ -13275,14 +14091,12 @@ internal System.Collections.Hashtable EnumFlagsValues { while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id265_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { - { - a_0 = (global::System.Object[])EnsureArrayIndex(a_0, ca_0, typeof(global::System.Object));a_0[ca_0++] = Reader.ReadElementString(); - } + if (((object) Reader.LocalName == (object)id277_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + a_0 = (global::System.Object[])EnsureArrayIndex(a_0, ca_0, typeof(global::System.Object));a_0[ca_0++] = Read107_ComplexChoiceA(false, true); choice_a_0 = (global::SerializationTypes.MoreChoices[])EnsureArrayIndex(choice_a_0, cchoice_a_0, typeof(global::SerializationTypes.MoreChoices));choice_a_0[cchoice_a_0++] = global::SerializationTypes.MoreChoices.@Item; break; } - if (((object) Reader.LocalName == (object)id266_Amount && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id278_Amount && (object) Reader.NamespaceURI == (object)id2_Item)) { { a_0 = (global::System.Object[])EnsureArrayIndex(a_0, ca_0, typeof(global::System.Object));a_0[ca_0++] = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); } @@ -13303,12 +14117,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithFieldsOrdered Read105_TypeWithFieldsOrdered(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithFieldsOrdered Read109_TypeWithFieldsOrdered(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); if (checkType) { - if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id106_TypeWithFieldsOrdered && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id110_TypeWithFieldsOrdered && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -13335,7 +14149,7 @@ internal System.Collections.Hashtable EnumFlagsValues { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { switch (state) { case 0: - if (((object) Reader.LocalName == (object)id267_IntField1 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id279_IntField1 && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@IntField1 = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); } @@ -13343,7 +14157,7 @@ internal System.Collections.Hashtable EnumFlagsValues { state = 1; break; case 1: - if (((object) Reader.LocalName == (object)id268_IntField2 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id280_IntField2 && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@IntField2 = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); } @@ -13351,7 +14165,7 @@ internal System.Collections.Hashtable EnumFlagsValues { state = 2; break; case 2: - if (((object) Reader.LocalName == (object)id269_StringField2 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id281_StringField2 && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@StringField2 = Reader.ReadElementString(); } @@ -13359,7 +14173,7 @@ internal System.Collections.Hashtable EnumFlagsValues { state = 3; break; case 3: - if (((object) Reader.LocalName == (object)id270_StringField1 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id282_StringField1 && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@StringField1 = Reader.ReadElementString(); } @@ -13380,7 +14194,7 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithSchemaFormInXmlAttribute Read91_Item(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithSchemaFormInXmlAttribute Read92_Item(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); @@ -13396,7 +14210,7 @@ internal System.Collections.Hashtable EnumFlagsValues { o = new global::SerializationTypes.TypeWithSchemaFormInXmlAttribute(); System.Span paramsRead = stackalloc bool[1]; while (Reader.MoveToNextAttribute()) { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id271_TestProperty && (object) Reader.NamespaceURI == (object)id272_httptestcom)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id283_TestProperty && (object) Reader.NamespaceURI == (object)id284_httptestcom)) { o.@TestProperty = Reader.Value; paramsRead[0] = true; } @@ -13427,552 +14241,576 @@ internal System.Collections.Hashtable EnumFlagsValues { protected override void InitCallbacks() { } - string id168_Age; - string id201_DateTimeString; - string id194_FloatProp; - string id33_Item; - string id214_ListProperty; - string id216_DisplayName; - string id118_B; - string id53_MyEnum; - string id263_Base64BinaryContent; - string id68_Item; - string id196_id; - string id161_DTO2; - string id234_Item; - string id260_NCNameContent; - string id55_DCStruct; - string id10_Animal; - string id165_TimeSpanProperty; - string id186_Y; - string id228_XmlAttributeName; - string id250_EmptyStringProperty; - string id79_IntEnum; - string id187_Z; - string id117_A; - string id212_IntProperty; - string id231_DecimalNumber; - string id66_TypeWithByteArrayAsXmlText; - string id235_XmlElementPropertyNode; - string id210_Item; + string id211_IntLField; + string id230_IsLoaded; + string id39_RootClass; + string id235_Optionull; + string id119_Name; + string id245_XmlEnumProperty; + string id263_CharProperty; + string id188_TotalCost; + string id262_EmptyStringProperty; + string id156_Modulation; + string id104_Item; + string id76_WithNullables; + string id123_Value1; + string id179_Line1; + string id228_DisplayName; + string id163_Base64Content; + string id208_F2; + string id149_ArrayOfArrayOfSimpleType; + string id171_ByteProperty; + string id203_xelement; + string id111_Item; + string id72_ClassImplementsInterface; + string id103_Item; + string id105_Item; + string id9_TypeWithXmlNodeArrayProperty; + string id234_Optional; + string id180_City; + string id128_Item; + string id250_EnumValue; + string id169_TimeSpanProperty; + string id268_DateTimeContent; + string id229_Id; + string id267_IntArrayValue; + string id151_P2; + string id73_WithStruct; + string id190_Y; + string id15_Employee; + string id265_Foo; + string id68_SimpleDC; + string id197_DoubleProp; + string id167_NullableDTO; + string id71_EnumFlags; + string id84_AttributeTesting; + string id11_Dog; + string id212_NIntLField; + string id74_SomeStruct; + string id140_XElement; + string id213_IntAProp; + string id278_Amount; + string id261_TwoDArrayOfSimpleType; + string id67_TypeWithByteArrayAsXmlText; + string id225_DateTimeProperty; + string id181_State; + string id232_Int; + string id122_B; + string id2_Item; + string id17_DerivedClass; + string id252_StrProperty; + string id196_SingleField; + string id281_StringField2; + string id247_XmlElementPropertyNode; string id43_XElementArrayWrapper; - string id129_string; - string id252_EnumProperty; + string id260_MetricConfigUrl; + string id47_TypeWithGetOnlyArrayProperties; + string id95_ServerSettings; + string id88_SimpleKnownTypeValue; + string id284_httptestcom; + string id60_TypeB; + string id107_MoreChoices; + string id25_ArrayOfDateTime; + string id133_string; + string id200_id; + string id273_NMTOKENContent; + string id86_TypeWithAnyAttribute; + string id216_NIntLProp; + string id162_BinaryHexContent; + string id58_BuiltInTypes; + string id131_int; + string id283_TestProperty; + string id62_Item; string id31_Pet; - string id128_ArrayOfString; - string id18_PurchaseOrder; - string id271_TestProperty; - string id241_MyField; - string id170_LicenseNumber; - string id78_ShortEnum; - string id211_StringProperty; - string id243_Item; - string id207_MyStruct; - string id21_OrderedItem; - string id208_MyEnum1; - string id160_DTO; - string id169_Breed; - string id35_RootElement; - string id265_Item; - string id142_NoneParameter; - string id141_ArrayOfString1; - string id215_ClassID; - string id100_TypeWithShouldSerializeMethod; - string id26_dateTime; + string id90_TypeWithPropertyNameSpecified; + string id1_TypeWithXmlElementProperty; + string id127_MsgDocumentType; + string id130_ArrayOfInt; + string id182_Zip; + string id175_GroupName; + string id204_xelements; + string id187_ShipCost; + string id173_Breed; + string id33_Item; + string id242_Number; + string id96_TypeWithXmlQualifiedName; + string id231_Some; string id6_TypeWithTimeSpanProperty; - string id162_DefaultDTO; - string id114_LastName; - string id105_MoreChoices; - string id206_Data; - string id172_GroupVehicle; - string id192_SingleField; - string id87_SimpleKnownTypeValue; - string id97_Item; - string id232_XmlIncludeProperty; - string id99_Item; - string id74_WithEnums; - string id264_HexBinaryContent; - string id37_Document; + string id113_TypeClashB; + string id59_TypeA; + string id274_NMTOKENSContent; + string id91_TypeWithXmlSchemaFormAttribute; + string id56_DCStruct; + string id178_value; + string id100_Item; + string id238_Struct1; + string id27_Orchestra; + string id155_IsValved; + string id8_TypeWithByteProperty; + string id239_Struct2; + string id83_ULongEnum; + string id53_anyType; + string id176_GroupVehicle; + string id195_DoubleField; + string id264_EnumProperty; + string id120_ContainerType; + string id144_httpmynamespace; + string id157_ItemName; + string id244_XmlIncludeProperty; + string id209_IntAField; + string id142_ArrayOfTypeA; + string id150_P1; + string id40_Parameter; + string id202_Parameters; + string id48_TypeWithArraylikeMembers; + string id77_ByteEnum; + string id14_Vehicle; string id42_XElementStruct; - string id113_MiddleName; + string id271_NameContent; + string id16_BaseClass; + string id226_ListProperty; + string id82_LongEnum; + string id272_NCNameContent; + string id138_ArrayOfParameter; + string id153_Child; + string id26_dateTime; + string id257_Item; + string id21_OrderedItem; + string id134_ArrayOfDouble; + string id75_WithEnums; + string id102_Item; + string id240_XmlAttributeName; + string id222_Item; + string id55_TypeWithEnumMembers; + string id20_Address; + string id277_Item; + string id112_Root; + string id147_ArrayOfBoolean; + string id165_DTO2; string id41_XElementWrapper; + string id227_ClassID; + string id248_httpelement; + string id236_OptionalInt; + string id186_SubTotal; + string id246_Item; + string id270_DateContent; + string id218_Data; + string id3_TypeWithXmlDocumentProperty; + string id87_KnownTypesThroughConstructor; + string id141_ArrayOfSimpleType; + string id137_ArrayOfTypeWithLinkedProperty; + string id101_TypeWithShouldSerializeMethod; + string id201_refs; + string id161_LineTotal; + string id215_IntLProp; + string id109_ComplexChoiceB; + string id10_Animal; + string id280_IntField2; + string id174_LicenseNumber; + string id93_Item; + string id66_Item; + string id164_DTO; string id44_TypeWithDateTimeStringProperty; - string id226_Struct1; - string id183_ShipCost; - string id145_ArrayOfArrayOfSimpleType; + string id35_RootElement; + string id223_StringProperty; + string id170_TimeSpanProperty2; string id22_AliasedTestType; - string id32_DefaultValuesSetToNaN; - string id167_ByteProperty; - string id151_IsValved; - string id34_Item; - string id209_ByteArray; - string id152_Modulation; - string id111_Person; - string id188_Prop; - string id29_Brass; - string id25_ArrayOfDateTime; - string id184_TotalCost; - string id268_IntField2; - string id204_F2; - string id15_Employee; - string id195_IntValue; - string id147_P2; + string id206_CurrentDateTime; + string id210_NIntAField; + string id132_ArrayOfString; + string id154_Children; + string id126_ParameterOfString; + string id184_OrderDate; + string id205_DateTimeString; + string id269_QNameContent; + string id237_OptionullInt; + string id241_Word; + string id168_NullableDefaultDTO; + string id172_Age; + string id19_httpwwwcontoso1com; + string id220_MyEnum1; + string id18_PurchaseOrder; + string id199_IntValue; + string id159_UnitPrice; + string id92_MyXmlType; string id36_TypeWithLinkedProperty; - string id136_XElement; - string id199_xelement; - string id50_Item; - string id236_httpelement; - string id112_FirstName; - string id58_TypeA; - string id85_TypeWithAnyAttribute; - string id153_ItemName; - string id48_StructNotSerializable; - string id116_ContainerType; - string id227_Struct2; - string id163_NullableDTO; - string id110_TypeClashA; - string id11_Dog; - string id8_TypeWithByteProperty; - string id127_int; - string id185_X; - string id139_ArrayOfItemChoiceType; - string id137_ArrayOfSimpleType; - string id23_BaseClass1; - string id123_MsgDocumentType; - string id173_EmployeeName; - string id150_Children; - string id131_double; - string id119_Value1; - string id38_httpexamplecom; - string id12_DogBreed; - string id175_Line1; - string id115_Name; - string id166_TimeSpanProperty2; - string id91_MyXmlType; - string id248_MetricConfigUrl; - string id5_Item; - string id217_Id; + string id253_MyField; string id98_Item; - string id126_ArrayOfInt; - string id237_CustomXmlArrayProperty; - string id242_MyFieldIgnored; - string id213_DateTimeProperty; - string id77_SByteEnum; - string id102_Item; - string id156_Quantity; - string id164_NullableDefaultDTO; - string id17_DerivedClass; - string id262_NMTOKENSContent; - string id82_ULongEnum; - string id223_Optionull; - string id54_TypeWithEnumMembers; - string id178_Zip; - string id224_OptionalInt; - string id272_httptestcom; - string id190_Comment2; - string id83_AttributeTesting; - string id30_Trumpet; - string id47_TypeWithGetOnlyArrayProperties; - string id65_Item; - string id51_ArrayOfAnyType; - string id255_IntArrayValue; - string id222_Optional; - string id28_Instrument; - string id253_Foo; - string id13_Group; + string id69_Item; + string id148_QualifiedParameter; + string id145_ArrayOfString1; + string id4_TypeWithBinaryProperty; + string id251_SimpleTypeValue; string id24_DerivedClass1; - string id81_LongEnum; - string id94_ServerSettings; - string id62_BaseClassWithSamePropertyName; - string id146_P1; - string id133_ArrayOfTypeWithLinkedProperty; - string id230_Number; - string id239_SimpleTypeValue; - string id89_TypeWithPropertyNameSpecified; - string id269_StringField2; - string id159_Base64Content; - string id122_ParameterOfString; - string id155_UnitPrice; - string id233_XmlEnumProperty; - string id134_ArrayOfParameter; - string id174_value; - string id246_XmlAttributeForm; - string id198_Parameters; - string id130_ArrayOfDouble; - string id193_DoubleProp; - string id101_Item; - string id219_Some; - string id138_ArrayOfTypeA; - string id59_TypeB; - string id2_Item; - string id45_SimpleType; - string id181_Items; - string id154_Description; - string id240_StrProperty; - string id106_TypeWithFieldsOrdered; - string id256_DateTimeContent; - string id63_DerivedClassWithSameProperty; - string id261_NMTOKENContent; + string id97_TypeWith2DArrayProperty2; + string id30_Trumpet; + string id63_BaseClassWithSamePropertyName; + string id217_Collection; + string id224_IntProperty; + string id185_Items; + string id183_ShipTo; + string id193_Instruments; + string id275_Base64BinaryContent; + string id80_IntEnum; + string id12_DogBreed; string id7_Item; - string id86_KnownTypesThroughConstructor; - string id247_DS2Root; - string id1_TypeWithXmlElementProperty; - string id225_OptionullInt; - string id177_State; - string id67_SimpleDC; - string id14_Vehicle; - string id84_ItemChoiceType; - string id60_TypeHasArrayOfASerializedAsB; - string id49_TypeWithMyCollectionField; - string id176_City; - string id52_anyType; - string id75_WithNullables; - string id27_Orchestra; - string id251_CharProperty; - string id197_refs; - string id19_httpwwwcontoso1com; - string id218_IsLoaded; - string id40_Parameter; - string id238_EnumValue; - string id148_Value; - string id73_SomeStruct; - string id92_Item; - string id88_Item; - string id135_ArrayOfXElement; - string id244_NoneSchemaFormListProperty; - string id71_ClassImplementsInterface; - string id109_TypeClashB; - string id140_httpmynamespace; - string id96_TypeWith2DArrayProperty2; - string id143_ArrayOfBoolean; - string id103_Item; - string id245_Item; - string id267_IntField1; - string id90_TypeWithXmlSchemaFormAttribute; - string id76_ByteEnum; - string id93_Item; - string id202_CurrentDateTime; - string id200_xelements; - string id189_Instruments; - string id171_GroupName; - string id80_UIntEnum; - string id16_BaseClass; - string id72_WithStruct; - string id205_Collection; - string id95_TypeWithXmlQualifiedName; - string id257_QNameContent; - string id179_ShipTo; - string id132_ArrayOfInstrument; - string id57_BuiltInTypes; - string id61_Item; - string id158_BinaryHexContent; - string id104_Item; - string id124_Item; - string id249_TwoDArrayOfSimpleType; - string id191_DoubleField; + string id136_ArrayOfInstrument; + string id135_double; + string id50_TypeWithMyCollectionField; + string id124_Value2; + string id110_TypeWithFieldsOrdered; + string id146_NoneParameter; + string id37_Document; + string id254_MyFieldIgnored; + string id279_IntField1; + string id249_CustomXmlArrayProperty; + string id54_MyEnum; + string id207_F1; + string id143_ArrayOfItemChoiceType; + string id108_ComplexChoiceA; + string id94_Item; + string id121_A; + string id5_Item; + string id256_NoneSchemaFormListProperty; + string id166_DefaultDTO; + string id65_DerivedClassWithSameProperty2; + string id34_Item; + string id32_DefaultValuesSetToNaN; + string id219_MyStruct; + string id23_BaseClass1; string id46_TypeWithGetSetArrayMembers; - string id4_TypeWithBinaryProperty; - string id221_Short; - string id144_QualifiedParameter; - string id149_Child; - string id203_F1; - string id69_Item; - string id229_Word; - string id3_TypeWithXmlDocumentProperty; - string id20_Address; - string id120_Value2; - string id121_XmlSerializerAttributes; - string id180_OrderDate; - string id70_EnumFlags; - string id266_Amount; - string id9_TypeWithXmlNodeArrayProperty; - string id259_NameContent; - string id220_Int; - string id64_DerivedClassWithSameProperty2; - string id125_ArrayOfOrderedItem; - string id157_LineTotal; - string id254_StringArrayValue; - string id107_Item; - string id56_DCClassWithEnumAndStruct; - string id270_StringField1; - string id182_SubTotal; - string id108_Root; - string id39_RootClass; - string id258_DateContent; + string id266_StringArrayValue; + string id160_Quantity; + string id78_SByteEnum; + string id45_SimpleType; + string id258_XmlAttributeForm; + string id118_LastName; + string id282_StringField1; + string id49_StructNotSerializable; + string id52_ArrayOfAnyType; + string id152_Value; + string id28_Instrument; + string id29_Brass; + string id117_MiddleName; + string id276_HexBinaryContent; + string id194_Comment2; + string id70_Item; + string id89_Item; + string id116_FirstName; + string id192_Prop; + string id139_ArrayOfXElement; + string id79_ShortEnum; + string id85_ItemChoiceType; + string id106_Item; + string id61_TypeHasArrayOfASerializedAsB; + string id255_Item; + string id51_Item; + string id99_Item; + string id114_TypeClashA; + string id259_DS2Root; + string id115_Person; + string id13_Group; + string id81_UIntEnum; + string id38_httpexamplecom; + string id177_EmployeeName; + string id129_ArrayOfOrderedItem; + string id221_ByteArray; + string id214_NIntAProp; + string id233_Short; + string id189_X; + string id243_DecimalNumber; + string id191_Z; + string id158_Description; + string id198_FloatProp; + string id64_DerivedClassWithSameProperty; + string id57_DCClassWithEnumAndStruct; + string id125_XmlSerializerAttributes; protected override void InitIDs() { - id168_Age = Reader.NameTable.Add(@"Age"); - id201_DateTimeString = Reader.NameTable.Add(@"DateTimeString"); - id194_FloatProp = Reader.NameTable.Add(@"FloatProp"); - id33_Item = Reader.NameTable.Add(@"DefaultValuesSetToPositiveInfinity"); - id214_ListProperty = Reader.NameTable.Add(@"ListProperty"); - id216_DisplayName = Reader.NameTable.Add(@"DisplayName"); - id118_B = Reader.NameTable.Add(@"B"); - id53_MyEnum = Reader.NameTable.Add(@"MyEnum"); - id263_Base64BinaryContent = Reader.NameTable.Add(@"Base64BinaryContent"); - id68_Item = Reader.NameTable.Add(@"TypeWithXmlTextAttributeOnArray"); - id196_id = Reader.NameTable.Add(@"id"); - id161_DTO2 = Reader.NameTable.Add(@"DTO2"); - id234_Item = Reader.NameTable.Add(@"XmlNamespaceDeclarationsProperty"); - id260_NCNameContent = Reader.NameTable.Add(@"NCNameContent"); - id55_DCStruct = Reader.NameTable.Add(@"DCStruct"); - id10_Animal = Reader.NameTable.Add(@"Animal"); - id165_TimeSpanProperty = Reader.NameTable.Add(@"TimeSpanProperty"); - id186_Y = Reader.NameTable.Add(@"Y"); - id228_XmlAttributeName = Reader.NameTable.Add(@"XmlAttributeName"); - id250_EmptyStringProperty = Reader.NameTable.Add(@"EmptyStringProperty"); - id79_IntEnum = Reader.NameTable.Add(@"IntEnum"); - id187_Z = Reader.NameTable.Add(@"Z"); - id117_A = Reader.NameTable.Add(@"A"); - id212_IntProperty = Reader.NameTable.Add(@"IntProperty"); - id231_DecimalNumber = Reader.NameTable.Add(@"DecimalNumber"); - id66_TypeWithByteArrayAsXmlText = Reader.NameTable.Add(@"TypeWithByteArrayAsXmlText"); - id235_XmlElementPropertyNode = Reader.NameTable.Add(@"XmlElementPropertyNode"); - id210_Item = Reader.NameTable.Add(@"PropertyNameWithSpecialCharacters漢ñ"); + id211_IntLField = Reader.NameTable.Add(@"IntLField"); + id230_IsLoaded = Reader.NameTable.Add(@"IsLoaded"); + id39_RootClass = Reader.NameTable.Add(@"RootClass"); + id235_Optionull = Reader.NameTable.Add(@"Optionull"); + id119_Name = Reader.NameTable.Add(@"Name"); + id245_XmlEnumProperty = Reader.NameTable.Add(@"XmlEnumProperty"); + id263_CharProperty = Reader.NameTable.Add(@"CharProperty"); + id188_TotalCost = Reader.NameTable.Add(@"TotalCost"); + id262_EmptyStringProperty = Reader.NameTable.Add(@"EmptyStringProperty"); + id156_Modulation = Reader.NameTable.Add(@"Modulation"); + id104_Item = Reader.NameTable.Add(@"TypeWithTypesHavingCustomFormatter"); + id76_WithNullables = Reader.NameTable.Add(@"WithNullables"); + id123_Value1 = Reader.NameTable.Add(@"Value1"); + id179_Line1 = Reader.NameTable.Add(@"Line1"); + id228_DisplayName = Reader.NameTable.Add(@"DisplayName"); + id163_Base64Content = Reader.NameTable.Add(@"Base64Content"); + id208_F2 = Reader.NameTable.Add(@"F2"); + id149_ArrayOfArrayOfSimpleType = Reader.NameTable.Add(@"ArrayOfArrayOfSimpleType"); + id171_ByteProperty = Reader.NameTable.Add(@"ByteProperty"); + id203_xelement = Reader.NameTable.Add(@"xelement"); + id111_Item = Reader.NameTable.Add(@"TypeWithKnownTypesOfCollectionsWithConflictingXmlName"); + id72_ClassImplementsInterface = Reader.NameTable.Add(@"ClassImplementsInterface"); + id103_Item = Reader.NameTable.Add(@"KnownTypesThroughConstructorWithValue"); + id105_Item = Reader.NameTable.Add(@"TypeWithArrayPropertyHavingChoice"); + id9_TypeWithXmlNodeArrayProperty = Reader.NameTable.Add(@"TypeWithXmlNodeArrayProperty"); + id234_Optional = Reader.NameTable.Add(@"Optional"); + id180_City = Reader.NameTable.Add(@"City"); + id128_Item = Reader.NameTable.Add(@"TypeWithMismatchBetweenAttributeAndPropertyType"); + id250_EnumValue = Reader.NameTable.Add(@"EnumValue"); + id169_TimeSpanProperty = Reader.NameTable.Add(@"TimeSpanProperty"); + id268_DateTimeContent = Reader.NameTable.Add(@"DateTimeContent"); + id229_Id = Reader.NameTable.Add(@"Id"); + id267_IntArrayValue = Reader.NameTable.Add(@"IntArrayValue"); + id151_P2 = Reader.NameTable.Add(@"P2"); + id73_WithStruct = Reader.NameTable.Add(@"WithStruct"); + id190_Y = Reader.NameTable.Add(@"Y"); + id15_Employee = Reader.NameTable.Add(@"Employee"); + id265_Foo = Reader.NameTable.Add(@"Foo"); + id68_SimpleDC = Reader.NameTable.Add(@"SimpleDC"); + id197_DoubleProp = Reader.NameTable.Add(@"DoubleProp"); + id167_NullableDTO = Reader.NameTable.Add(@"NullableDTO"); + id71_EnumFlags = Reader.NameTable.Add(@"EnumFlags"); + id84_AttributeTesting = Reader.NameTable.Add(@"AttributeTesting"); + id11_Dog = Reader.NameTable.Add(@"Dog"); + id212_NIntLField = Reader.NameTable.Add(@"NIntLField"); + id74_SomeStruct = Reader.NameTable.Add(@"SomeStruct"); + id140_XElement = Reader.NameTable.Add(@"XElement"); + id213_IntAProp = Reader.NameTable.Add(@"IntAProp"); + id278_Amount = Reader.NameTable.Add(@"Amount"); + id261_TwoDArrayOfSimpleType = Reader.NameTable.Add(@"TwoDArrayOfSimpleType"); + id67_TypeWithByteArrayAsXmlText = Reader.NameTable.Add(@"TypeWithByteArrayAsXmlText"); + id225_DateTimeProperty = Reader.NameTable.Add(@"DateTimeProperty"); + id181_State = Reader.NameTable.Add(@"State"); + id232_Int = Reader.NameTable.Add(@"Int"); + id122_B = Reader.NameTable.Add(@"B"); + id2_Item = Reader.NameTable.Add(@""); + id17_DerivedClass = Reader.NameTable.Add(@"DerivedClass"); + id252_StrProperty = Reader.NameTable.Add(@"StrProperty"); + id196_SingleField = Reader.NameTable.Add(@"SingleField"); + id281_StringField2 = Reader.NameTable.Add(@"StringField2"); + id247_XmlElementPropertyNode = Reader.NameTable.Add(@"XmlElementPropertyNode"); id43_XElementArrayWrapper = Reader.NameTable.Add(@"XElementArrayWrapper"); - id129_string = Reader.NameTable.Add(@"string"); - id252_EnumProperty = Reader.NameTable.Add(@"EnumProperty"); + id260_MetricConfigUrl = Reader.NameTable.Add(@"MetricConfigUrl"); + id47_TypeWithGetOnlyArrayProperties = Reader.NameTable.Add(@"TypeWithGetOnlyArrayProperties"); + id95_ServerSettings = Reader.NameTable.Add(@"ServerSettings"); + id88_SimpleKnownTypeValue = Reader.NameTable.Add(@"SimpleKnownTypeValue"); + id284_httptestcom = Reader.NameTable.Add(@"http://test.com"); + id60_TypeB = Reader.NameTable.Add(@"TypeB"); + id107_MoreChoices = Reader.NameTable.Add(@"MoreChoices"); + id25_ArrayOfDateTime = Reader.NameTable.Add(@"ArrayOfDateTime"); + id133_string = Reader.NameTable.Add(@"string"); + id200_id = Reader.NameTable.Add(@"id"); + id273_NMTOKENContent = Reader.NameTable.Add(@"NMTOKENContent"); + id86_TypeWithAnyAttribute = Reader.NameTable.Add(@"TypeWithAnyAttribute"); + id216_NIntLProp = Reader.NameTable.Add(@"NIntLProp"); + id162_BinaryHexContent = Reader.NameTable.Add(@"BinaryHexContent"); + id58_BuiltInTypes = Reader.NameTable.Add(@"BuiltInTypes"); + id131_int = Reader.NameTable.Add(@"int"); + id283_TestProperty = Reader.NameTable.Add(@"TestProperty"); + id62_Item = Reader.NameTable.Add(@"__TypeNameWithSpecialCharacters漢ñ"); id31_Pet = Reader.NameTable.Add(@"Pet"); - id128_ArrayOfString = Reader.NameTable.Add(@"ArrayOfString"); - id18_PurchaseOrder = Reader.NameTable.Add(@"PurchaseOrder"); - id271_TestProperty = Reader.NameTable.Add(@"TestProperty"); - id241_MyField = Reader.NameTable.Add(@"MyField"); - id170_LicenseNumber = Reader.NameTable.Add(@"LicenseNumber"); - id78_ShortEnum = Reader.NameTable.Add(@"ShortEnum"); - id211_StringProperty = Reader.NameTable.Add(@"StringProperty"); - id243_Item = Reader.NameTable.Add(@"UnqualifiedSchemaFormListProperty"); - id207_MyStruct = Reader.NameTable.Add(@"MyStruct"); - id21_OrderedItem = Reader.NameTable.Add(@"OrderedItem"); - id208_MyEnum1 = Reader.NameTable.Add(@"MyEnum1"); - id160_DTO = Reader.NameTable.Add(@"DTO"); - id169_Breed = Reader.NameTable.Add(@"Breed"); - id35_RootElement = Reader.NameTable.Add(@"RootElement"); - id265_Item = Reader.NameTable.Add(@"Item"); - id142_NoneParameter = Reader.NameTable.Add(@"NoneParameter"); - id141_ArrayOfString1 = Reader.NameTable.Add(@"ArrayOfString1"); - id215_ClassID = Reader.NameTable.Add(@"ClassID"); - id100_TypeWithShouldSerializeMethod = Reader.NameTable.Add(@"TypeWithShouldSerializeMethod"); - id26_dateTime = Reader.NameTable.Add(@"dateTime"); + id90_TypeWithPropertyNameSpecified = Reader.NameTable.Add(@"TypeWithPropertyNameSpecified"); + id1_TypeWithXmlElementProperty = Reader.NameTable.Add(@"TypeWithXmlElementProperty"); + id127_MsgDocumentType = Reader.NameTable.Add(@"MsgDocumentType"); + id130_ArrayOfInt = Reader.NameTable.Add(@"ArrayOfInt"); + id182_Zip = Reader.NameTable.Add(@"Zip"); + id175_GroupName = Reader.NameTable.Add(@"GroupName"); + id204_xelements = Reader.NameTable.Add(@"xelements"); + id187_ShipCost = Reader.NameTable.Add(@"ShipCost"); + id173_Breed = Reader.NameTable.Add(@"Breed"); + id33_Item = Reader.NameTable.Add(@"DefaultValuesSetToPositiveInfinity"); + id242_Number = Reader.NameTable.Add(@"Number"); + id96_TypeWithXmlQualifiedName = Reader.NameTable.Add(@"TypeWithXmlQualifiedName"); + id231_Some = Reader.NameTable.Add(@"Some"); id6_TypeWithTimeSpanProperty = Reader.NameTable.Add(@"TypeWithTimeSpanProperty"); - id162_DefaultDTO = Reader.NameTable.Add(@"DefaultDTO"); - id114_LastName = Reader.NameTable.Add(@"LastName"); - id105_MoreChoices = Reader.NameTable.Add(@"MoreChoices"); - id206_Data = Reader.NameTable.Add(@"Data"); - id172_GroupVehicle = Reader.NameTable.Add(@"GroupVehicle"); - id192_SingleField = Reader.NameTable.Add(@"SingleField"); - id87_SimpleKnownTypeValue = Reader.NameTable.Add(@"SimpleKnownTypeValue"); - id97_Item = Reader.NameTable.Add(@"TypeWithPropertiesHavingDefaultValue"); - id232_XmlIncludeProperty = Reader.NameTable.Add(@"XmlIncludeProperty"); - id99_Item = Reader.NameTable.Add(@"TypeWithEnumFlagPropertyHavingDefaultValue"); - id74_WithEnums = Reader.NameTable.Add(@"WithEnums"); - id264_HexBinaryContent = Reader.NameTable.Add(@"HexBinaryContent"); - id37_Document = Reader.NameTable.Add(@"Document"); + id113_TypeClashB = Reader.NameTable.Add(@"TypeClashB"); + id59_TypeA = Reader.NameTable.Add(@"TypeA"); + id274_NMTOKENSContent = Reader.NameTable.Add(@"NMTOKENSContent"); + id91_TypeWithXmlSchemaFormAttribute = Reader.NameTable.Add(@"TypeWithXmlSchemaFormAttribute"); + id56_DCStruct = Reader.NameTable.Add(@"DCStruct"); + id178_value = Reader.NameTable.Add(@"value"); + id100_Item = Reader.NameTable.Add(@"TypeWithEnumFlagPropertyHavingDefaultValue"); + id238_Struct1 = Reader.NameTable.Add(@"Struct1"); + id27_Orchestra = Reader.NameTable.Add(@"Orchestra"); + id155_IsValved = Reader.NameTable.Add(@"IsValved"); + id8_TypeWithByteProperty = Reader.NameTable.Add(@"TypeWithByteProperty"); + id239_Struct2 = Reader.NameTable.Add(@"Struct2"); + id83_ULongEnum = Reader.NameTable.Add(@"ULongEnum"); + id53_anyType = Reader.NameTable.Add(@"anyType"); + id176_GroupVehicle = Reader.NameTable.Add(@"GroupVehicle"); + id195_DoubleField = Reader.NameTable.Add(@"DoubleField"); + id264_EnumProperty = Reader.NameTable.Add(@"EnumProperty"); + id120_ContainerType = Reader.NameTable.Add(@"ContainerType"); + id144_httpmynamespace = Reader.NameTable.Add(@"http://mynamespace"); + id157_ItemName = Reader.NameTable.Add(@"ItemName"); + id244_XmlIncludeProperty = Reader.NameTable.Add(@"XmlIncludeProperty"); + id209_IntAField = Reader.NameTable.Add(@"IntAField"); + id142_ArrayOfTypeA = Reader.NameTable.Add(@"ArrayOfTypeA"); + id150_P1 = Reader.NameTable.Add(@"P1"); + id40_Parameter = Reader.NameTable.Add(@"Parameter"); + id202_Parameters = Reader.NameTable.Add(@"Parameters"); + id48_TypeWithArraylikeMembers = Reader.NameTable.Add(@"TypeWithArraylikeMembers"); + id77_ByteEnum = Reader.NameTable.Add(@"ByteEnum"); + id14_Vehicle = Reader.NameTable.Add(@"Vehicle"); id42_XElementStruct = Reader.NameTable.Add(@"XElementStruct"); - id113_MiddleName = Reader.NameTable.Add(@"MiddleName"); + id271_NameContent = Reader.NameTable.Add(@"NameContent"); + id16_BaseClass = Reader.NameTable.Add(@"BaseClass"); + id226_ListProperty = Reader.NameTable.Add(@"ListProperty"); + id82_LongEnum = Reader.NameTable.Add(@"LongEnum"); + id272_NCNameContent = Reader.NameTable.Add(@"NCNameContent"); + id138_ArrayOfParameter = Reader.NameTable.Add(@"ArrayOfParameter"); + id153_Child = Reader.NameTable.Add(@"Child"); + id26_dateTime = Reader.NameTable.Add(@"dateTime"); + id257_Item = Reader.NameTable.Add(@"QualifiedSchemaFormListProperty"); + id21_OrderedItem = Reader.NameTable.Add(@"OrderedItem"); + id134_ArrayOfDouble = Reader.NameTable.Add(@"ArrayOfDouble"); + id75_WithEnums = Reader.NameTable.Add(@"WithEnums"); + id102_Item = Reader.NameTable.Add(@"KnownTypesThroughConstructorWithArrayProperties"); + id240_XmlAttributeName = Reader.NameTable.Add(@"XmlAttributeName"); + id222_Item = Reader.NameTable.Add(@"PropertyNameWithSpecialCharacters漢ñ"); + id55_TypeWithEnumMembers = Reader.NameTable.Add(@"TypeWithEnumMembers"); + id20_Address = Reader.NameTable.Add(@"Address"); + id277_Item = Reader.NameTable.Add(@"Item"); + id112_Root = Reader.NameTable.Add(@"Root"); + id147_ArrayOfBoolean = Reader.NameTable.Add(@"ArrayOfBoolean"); + id165_DTO2 = Reader.NameTable.Add(@"DTO2"); id41_XElementWrapper = Reader.NameTable.Add(@"XElementWrapper"); + id227_ClassID = Reader.NameTable.Add(@"ClassID"); + id248_httpelement = Reader.NameTable.Add(@"http://element"); + id236_OptionalInt = Reader.NameTable.Add(@"OptionalInt"); + id186_SubTotal = Reader.NameTable.Add(@"SubTotal"); + id246_Item = Reader.NameTable.Add(@"XmlNamespaceDeclarationsProperty"); + id270_DateContent = Reader.NameTable.Add(@"DateContent"); + id218_Data = Reader.NameTable.Add(@"Data"); + id3_TypeWithXmlDocumentProperty = Reader.NameTable.Add(@"TypeWithXmlDocumentProperty"); + id87_KnownTypesThroughConstructor = Reader.NameTable.Add(@"KnownTypesThroughConstructor"); + id141_ArrayOfSimpleType = Reader.NameTable.Add(@"ArrayOfSimpleType"); + id137_ArrayOfTypeWithLinkedProperty = Reader.NameTable.Add(@"ArrayOfTypeWithLinkedProperty"); + id101_TypeWithShouldSerializeMethod = Reader.NameTable.Add(@"TypeWithShouldSerializeMethod"); + id201_refs = Reader.NameTable.Add(@"refs"); + id161_LineTotal = Reader.NameTable.Add(@"LineTotal"); + id215_IntLProp = Reader.NameTable.Add(@"IntLProp"); + id109_ComplexChoiceB = Reader.NameTable.Add(@"ComplexChoiceB"); + id10_Animal = Reader.NameTable.Add(@"Animal"); + id280_IntField2 = Reader.NameTable.Add(@"IntField2"); + id174_LicenseNumber = Reader.NameTable.Add(@"LicenseNumber"); + id93_Item = Reader.NameTable.Add(@"TypeWithSchemaFormInXmlAttribute"); + id66_Item = Reader.NameTable.Add(@"TypeWithDateTimePropertyAsXmlTime"); + id164_DTO = Reader.NameTable.Add(@"DTO"); id44_TypeWithDateTimeStringProperty = Reader.NameTable.Add(@"TypeWithDateTimeStringProperty"); - id226_Struct1 = Reader.NameTable.Add(@"Struct1"); - id183_ShipCost = Reader.NameTable.Add(@"ShipCost"); - id145_ArrayOfArrayOfSimpleType = Reader.NameTable.Add(@"ArrayOfArrayOfSimpleType"); + id35_RootElement = Reader.NameTable.Add(@"RootElement"); + id223_StringProperty = Reader.NameTable.Add(@"StringProperty"); + id170_TimeSpanProperty2 = Reader.NameTable.Add(@"TimeSpanProperty2"); id22_AliasedTestType = Reader.NameTable.Add(@"AliasedTestType"); - id32_DefaultValuesSetToNaN = Reader.NameTable.Add(@"DefaultValuesSetToNaN"); - id167_ByteProperty = Reader.NameTable.Add(@"ByteProperty"); - id151_IsValved = Reader.NameTable.Add(@"IsValved"); - id34_Item = Reader.NameTable.Add(@"DefaultValuesSetToNegativeInfinity"); - id209_ByteArray = Reader.NameTable.Add(@"ByteArray"); - id152_Modulation = Reader.NameTable.Add(@"Modulation"); - id111_Person = Reader.NameTable.Add(@"Person"); - id188_Prop = Reader.NameTable.Add(@"Prop"); - id29_Brass = Reader.NameTable.Add(@"Brass"); - id25_ArrayOfDateTime = Reader.NameTable.Add(@"ArrayOfDateTime"); - id184_TotalCost = Reader.NameTable.Add(@"TotalCost"); - id268_IntField2 = Reader.NameTable.Add(@"IntField2"); - id204_F2 = Reader.NameTable.Add(@"F2"); - id15_Employee = Reader.NameTable.Add(@"Employee"); - id195_IntValue = Reader.NameTable.Add(@"IntValue"); - id147_P2 = Reader.NameTable.Add(@"P2"); + id206_CurrentDateTime = Reader.NameTable.Add(@"CurrentDateTime"); + id210_NIntAField = Reader.NameTable.Add(@"NIntAField"); + id132_ArrayOfString = Reader.NameTable.Add(@"ArrayOfString"); + id154_Children = Reader.NameTable.Add(@"Children"); + id126_ParameterOfString = Reader.NameTable.Add(@"ParameterOfString"); + id184_OrderDate = Reader.NameTable.Add(@"OrderDate"); + id205_DateTimeString = Reader.NameTable.Add(@"DateTimeString"); + id269_QNameContent = Reader.NameTable.Add(@"QNameContent"); + id237_OptionullInt = Reader.NameTable.Add(@"OptionullInt"); + id241_Word = Reader.NameTable.Add(@"Word"); + id168_NullableDefaultDTO = Reader.NameTable.Add(@"NullableDefaultDTO"); + id172_Age = Reader.NameTable.Add(@"Age"); + id19_httpwwwcontoso1com = Reader.NameTable.Add(@"http://www.contoso1.com"); + id220_MyEnum1 = Reader.NameTable.Add(@"MyEnum1"); + id18_PurchaseOrder = Reader.NameTable.Add(@"PurchaseOrder"); + id199_IntValue = Reader.NameTable.Add(@"IntValue"); + id159_UnitPrice = Reader.NameTable.Add(@"UnitPrice"); + id92_MyXmlType = Reader.NameTable.Add(@"MyXmlType"); id36_TypeWithLinkedProperty = Reader.NameTable.Add(@"TypeWithLinkedProperty"); - id136_XElement = Reader.NameTable.Add(@"XElement"); - id199_xelement = Reader.NameTable.Add(@"xelement"); - id50_Item = Reader.NameTable.Add(@"TypeWithReadOnlyMyCollectionProperty"); - id236_httpelement = Reader.NameTable.Add(@"http://element"); - id112_FirstName = Reader.NameTable.Add(@"FirstName"); - id58_TypeA = Reader.NameTable.Add(@"TypeA"); - id85_TypeWithAnyAttribute = Reader.NameTable.Add(@"TypeWithAnyAttribute"); - id153_ItemName = Reader.NameTable.Add(@"ItemName"); - id48_StructNotSerializable = Reader.NameTable.Add(@"StructNotSerializable"); - id116_ContainerType = Reader.NameTable.Add(@"ContainerType"); - id227_Struct2 = Reader.NameTable.Add(@"Struct2"); - id163_NullableDTO = Reader.NameTable.Add(@"NullableDTO"); - id110_TypeClashA = Reader.NameTable.Add(@"TypeClashA"); - id11_Dog = Reader.NameTable.Add(@"Dog"); - id8_TypeWithByteProperty = Reader.NameTable.Add(@"TypeWithByteProperty"); - id127_int = Reader.NameTable.Add(@"int"); - id185_X = Reader.NameTable.Add(@"X"); - id139_ArrayOfItemChoiceType = Reader.NameTable.Add(@"ArrayOfItemChoiceType"); - id137_ArrayOfSimpleType = Reader.NameTable.Add(@"ArrayOfSimpleType"); - id23_BaseClass1 = Reader.NameTable.Add(@"BaseClass1"); - id123_MsgDocumentType = Reader.NameTable.Add(@"MsgDocumentType"); - id173_EmployeeName = Reader.NameTable.Add(@"EmployeeName"); - id150_Children = Reader.NameTable.Add(@"Children"); - id131_double = Reader.NameTable.Add(@"double"); - id119_Value1 = Reader.NameTable.Add(@"Value1"); - id38_httpexamplecom = Reader.NameTable.Add(@"http://example.com"); - id12_DogBreed = Reader.NameTable.Add(@"DogBreed"); - id175_Line1 = Reader.NameTable.Add(@"Line1"); - id115_Name = Reader.NameTable.Add(@"Name"); - id166_TimeSpanProperty2 = Reader.NameTable.Add(@"TimeSpanProperty2"); - id91_MyXmlType = Reader.NameTable.Add(@"MyXmlType"); - id248_MetricConfigUrl = Reader.NameTable.Add(@"MetricConfigUrl"); - id5_Item = Reader.NameTable.Add(@"TypeWithDateTimeOffsetProperties"); - id217_Id = Reader.NameTable.Add(@"Id"); - id98_Item = Reader.NameTable.Add(@"TypeWithEnumPropertyHavingDefaultValue"); - id126_ArrayOfInt = Reader.NameTable.Add(@"ArrayOfInt"); - id237_CustomXmlArrayProperty = Reader.NameTable.Add(@"CustomXmlArrayProperty"); - id242_MyFieldIgnored = Reader.NameTable.Add(@"MyFieldIgnored"); - id213_DateTimeProperty = Reader.NameTable.Add(@"DateTimeProperty"); - id77_SByteEnum = Reader.NameTable.Add(@"SByteEnum"); - id102_Item = Reader.NameTable.Add(@"KnownTypesThroughConstructorWithValue"); - id156_Quantity = Reader.NameTable.Add(@"Quantity"); - id164_NullableDefaultDTO = Reader.NameTable.Add(@"NullableDefaultDTO"); - id17_DerivedClass = Reader.NameTable.Add(@"DerivedClass"); - id262_NMTOKENSContent = Reader.NameTable.Add(@"NMTOKENSContent"); - id82_ULongEnum = Reader.NameTable.Add(@"ULongEnum"); - id223_Optionull = Reader.NameTable.Add(@"Optionull"); - id54_TypeWithEnumMembers = Reader.NameTable.Add(@"TypeWithEnumMembers"); - id178_Zip = Reader.NameTable.Add(@"Zip"); - id224_OptionalInt = Reader.NameTable.Add(@"OptionalInt"); - id272_httptestcom = Reader.NameTable.Add(@"http://test.com"); - id190_Comment2 = Reader.NameTable.Add(@"Comment2"); - id83_AttributeTesting = Reader.NameTable.Add(@"AttributeTesting"); - id30_Trumpet = Reader.NameTable.Add(@"Trumpet"); - id47_TypeWithGetOnlyArrayProperties = Reader.NameTable.Add(@"TypeWithGetOnlyArrayProperties"); - id65_Item = Reader.NameTable.Add(@"TypeWithDateTimePropertyAsXmlTime"); - id51_ArrayOfAnyType = Reader.NameTable.Add(@"ArrayOfAnyType"); - id255_IntArrayValue = Reader.NameTable.Add(@"IntArrayValue"); - id222_Optional = Reader.NameTable.Add(@"Optional"); - id28_Instrument = Reader.NameTable.Add(@"Instrument"); - id253_Foo = Reader.NameTable.Add(@"Foo"); - id13_Group = Reader.NameTable.Add(@"Group"); + id253_MyField = Reader.NameTable.Add(@"MyField"); + id98_Item = Reader.NameTable.Add(@"TypeWithPropertiesHavingDefaultValue"); + id69_Item = Reader.NameTable.Add(@"TypeWithXmlTextAttributeOnArray"); + id148_QualifiedParameter = Reader.NameTable.Add(@"QualifiedParameter"); + id145_ArrayOfString1 = Reader.NameTable.Add(@"ArrayOfString1"); + id4_TypeWithBinaryProperty = Reader.NameTable.Add(@"TypeWithBinaryProperty"); + id251_SimpleTypeValue = Reader.NameTable.Add(@"SimpleTypeValue"); id24_DerivedClass1 = Reader.NameTable.Add(@"DerivedClass1"); - id81_LongEnum = Reader.NameTable.Add(@"LongEnum"); - id94_ServerSettings = Reader.NameTable.Add(@"ServerSettings"); - id62_BaseClassWithSamePropertyName = Reader.NameTable.Add(@"BaseClassWithSamePropertyName"); - id146_P1 = Reader.NameTable.Add(@"P1"); - id133_ArrayOfTypeWithLinkedProperty = Reader.NameTable.Add(@"ArrayOfTypeWithLinkedProperty"); - id230_Number = Reader.NameTable.Add(@"Number"); - id239_SimpleTypeValue = Reader.NameTable.Add(@"SimpleTypeValue"); - id89_TypeWithPropertyNameSpecified = Reader.NameTable.Add(@"TypeWithPropertyNameSpecified"); - id269_StringField2 = Reader.NameTable.Add(@"StringField2"); - id159_Base64Content = Reader.NameTable.Add(@"Base64Content"); - id122_ParameterOfString = Reader.NameTable.Add(@"ParameterOfString"); - id155_UnitPrice = Reader.NameTable.Add(@"UnitPrice"); - id233_XmlEnumProperty = Reader.NameTable.Add(@"XmlEnumProperty"); - id134_ArrayOfParameter = Reader.NameTable.Add(@"ArrayOfParameter"); - id174_value = Reader.NameTable.Add(@"value"); - id246_XmlAttributeForm = Reader.NameTable.Add(@"XmlAttributeForm"); - id198_Parameters = Reader.NameTable.Add(@"Parameters"); - id130_ArrayOfDouble = Reader.NameTable.Add(@"ArrayOfDouble"); - id193_DoubleProp = Reader.NameTable.Add(@"DoubleProp"); - id101_Item = Reader.NameTable.Add(@"KnownTypesThroughConstructorWithArrayProperties"); - id219_Some = Reader.NameTable.Add(@"Some"); - id138_ArrayOfTypeA = Reader.NameTable.Add(@"ArrayOfTypeA"); - id59_TypeB = Reader.NameTable.Add(@"TypeB"); - id2_Item = Reader.NameTable.Add(@""); - id45_SimpleType = Reader.NameTable.Add(@"SimpleType"); - id181_Items = Reader.NameTable.Add(@"Items"); - id154_Description = Reader.NameTable.Add(@"Description"); - id240_StrProperty = Reader.NameTable.Add(@"StrProperty"); - id106_TypeWithFieldsOrdered = Reader.NameTable.Add(@"TypeWithFieldsOrdered"); - id256_DateTimeContent = Reader.NameTable.Add(@"DateTimeContent"); - id63_DerivedClassWithSameProperty = Reader.NameTable.Add(@"DerivedClassWithSameProperty"); - id261_NMTOKENContent = Reader.NameTable.Add(@"NMTOKENContent"); + id97_TypeWith2DArrayProperty2 = Reader.NameTable.Add(@"TypeWith2DArrayProperty2"); + id30_Trumpet = Reader.NameTable.Add(@"Trumpet"); + id63_BaseClassWithSamePropertyName = Reader.NameTable.Add(@"BaseClassWithSamePropertyName"); + id217_Collection = Reader.NameTable.Add(@"Collection"); + id224_IntProperty = Reader.NameTable.Add(@"IntProperty"); + id185_Items = Reader.NameTable.Add(@"Items"); + id183_ShipTo = Reader.NameTable.Add(@"ShipTo"); + id193_Instruments = Reader.NameTable.Add(@"Instruments"); + id275_Base64BinaryContent = Reader.NameTable.Add(@"Base64BinaryContent"); + id80_IntEnum = Reader.NameTable.Add(@"IntEnum"); + id12_DogBreed = Reader.NameTable.Add(@"DogBreed"); id7_Item = Reader.NameTable.Add(@"TypeWithDefaultTimeSpanProperty"); - id86_KnownTypesThroughConstructor = Reader.NameTable.Add(@"KnownTypesThroughConstructor"); - id247_DS2Root = Reader.NameTable.Add(@"DS2Root"); - id1_TypeWithXmlElementProperty = Reader.NameTable.Add(@"TypeWithXmlElementProperty"); - id225_OptionullInt = Reader.NameTable.Add(@"OptionullInt"); - id177_State = Reader.NameTable.Add(@"State"); - id67_SimpleDC = Reader.NameTable.Add(@"SimpleDC"); - id14_Vehicle = Reader.NameTable.Add(@"Vehicle"); - id84_ItemChoiceType = Reader.NameTable.Add(@"ItemChoiceType"); - id60_TypeHasArrayOfASerializedAsB = Reader.NameTable.Add(@"TypeHasArrayOfASerializedAsB"); - id49_TypeWithMyCollectionField = Reader.NameTable.Add(@"TypeWithMyCollectionField"); - id176_City = Reader.NameTable.Add(@"City"); - id52_anyType = Reader.NameTable.Add(@"anyType"); - id75_WithNullables = Reader.NameTable.Add(@"WithNullables"); - id27_Orchestra = Reader.NameTable.Add(@"Orchestra"); - id251_CharProperty = Reader.NameTable.Add(@"CharProperty"); - id197_refs = Reader.NameTable.Add(@"refs"); - id19_httpwwwcontoso1com = Reader.NameTable.Add(@"http://www.contoso1.com"); - id218_IsLoaded = Reader.NameTable.Add(@"IsLoaded"); - id40_Parameter = Reader.NameTable.Add(@"Parameter"); - id238_EnumValue = Reader.NameTable.Add(@"EnumValue"); - id148_Value = Reader.NameTable.Add(@"Value"); - id73_SomeStruct = Reader.NameTable.Add(@"SomeStruct"); - id92_Item = Reader.NameTable.Add(@"TypeWithSchemaFormInXmlAttribute"); - id88_Item = Reader.NameTable.Add(@"ClassImplementingIXmlSerialiable"); - id135_ArrayOfXElement = Reader.NameTable.Add(@"ArrayOfXElement"); - id244_NoneSchemaFormListProperty = Reader.NameTable.Add(@"NoneSchemaFormListProperty"); - id71_ClassImplementsInterface = Reader.NameTable.Add(@"ClassImplementsInterface"); - id109_TypeClashB = Reader.NameTable.Add(@"TypeClashB"); - id140_httpmynamespace = Reader.NameTable.Add(@"http://mynamespace"); - id96_TypeWith2DArrayProperty2 = Reader.NameTable.Add(@"TypeWith2DArrayProperty2"); - id143_ArrayOfBoolean = Reader.NameTable.Add(@"ArrayOfBoolean"); - id103_Item = Reader.NameTable.Add(@"TypeWithTypesHavingCustomFormatter"); - id245_Item = Reader.NameTable.Add(@"QualifiedSchemaFormListProperty"); - id267_IntField1 = Reader.NameTable.Add(@"IntField1"); - id90_TypeWithXmlSchemaFormAttribute = Reader.NameTable.Add(@"TypeWithXmlSchemaFormAttribute"); - id76_ByteEnum = Reader.NameTable.Add(@"ByteEnum"); - id93_Item = Reader.NameTable.Add(@"TypeWithNonPublicDefaultConstructor"); - id202_CurrentDateTime = Reader.NameTable.Add(@"CurrentDateTime"); - id200_xelements = Reader.NameTable.Add(@"xelements"); - id189_Instruments = Reader.NameTable.Add(@"Instruments"); - id171_GroupName = Reader.NameTable.Add(@"GroupName"); - id80_UIntEnum = Reader.NameTable.Add(@"UIntEnum"); - id16_BaseClass = Reader.NameTable.Add(@"BaseClass"); - id72_WithStruct = Reader.NameTable.Add(@"WithStruct"); - id205_Collection = Reader.NameTable.Add(@"Collection"); - id95_TypeWithXmlQualifiedName = Reader.NameTable.Add(@"TypeWithXmlQualifiedName"); - id257_QNameContent = Reader.NameTable.Add(@"QNameContent"); - id179_ShipTo = Reader.NameTable.Add(@"ShipTo"); - id132_ArrayOfInstrument = Reader.NameTable.Add(@"ArrayOfInstrument"); - id57_BuiltInTypes = Reader.NameTable.Add(@"BuiltInTypes"); - id61_Item = Reader.NameTable.Add(@"__TypeNameWithSpecialCharacters漢ñ"); - id158_BinaryHexContent = Reader.NameTable.Add(@"BinaryHexContent"); - id104_Item = Reader.NameTable.Add(@"TypeWithArrayPropertyHavingChoice"); - id124_Item = Reader.NameTable.Add(@"TypeWithMismatchBetweenAttributeAndPropertyType"); - id249_TwoDArrayOfSimpleType = Reader.NameTable.Add(@"TwoDArrayOfSimpleType"); - id191_DoubleField = Reader.NameTable.Add(@"DoubleField"); - id46_TypeWithGetSetArrayMembers = Reader.NameTable.Add(@"TypeWithGetSetArrayMembers"); - id4_TypeWithBinaryProperty = Reader.NameTable.Add(@"TypeWithBinaryProperty"); - id221_Short = Reader.NameTable.Add(@"Short"); - id144_QualifiedParameter = Reader.NameTable.Add(@"QualifiedParameter"); - id149_Child = Reader.NameTable.Add(@"Child"); - id203_F1 = Reader.NameTable.Add(@"F1"); - id69_Item = Reader.NameTable.Add(@"http://schemas.xmlsoap.org/ws/2005/04/discovery"); - id229_Word = Reader.NameTable.Add(@"Word"); - id3_TypeWithXmlDocumentProperty = Reader.NameTable.Add(@"TypeWithXmlDocumentProperty"); - id20_Address = Reader.NameTable.Add(@"Address"); - id120_Value2 = Reader.NameTable.Add(@"Value2"); - id121_XmlSerializerAttributes = Reader.NameTable.Add(@"XmlSerializerAttributes"); - id180_OrderDate = Reader.NameTable.Add(@"OrderDate"); - id70_EnumFlags = Reader.NameTable.Add(@"EnumFlags"); - id266_Amount = Reader.NameTable.Add(@"Amount"); - id9_TypeWithXmlNodeArrayProperty = Reader.NameTable.Add(@"TypeWithXmlNodeArrayProperty"); - id259_NameContent = Reader.NameTable.Add(@"NameContent"); - id220_Int = Reader.NameTable.Add(@"Int"); - id64_DerivedClassWithSameProperty2 = Reader.NameTable.Add(@"DerivedClassWithSameProperty2"); - id125_ArrayOfOrderedItem = Reader.NameTable.Add(@"ArrayOfOrderedItem"); - id157_LineTotal = Reader.NameTable.Add(@"LineTotal"); - id254_StringArrayValue = Reader.NameTable.Add(@"StringArrayValue"); - id107_Item = Reader.NameTable.Add(@"TypeWithKnownTypesOfCollectionsWithConflictingXmlName"); - id56_DCClassWithEnumAndStruct = Reader.NameTable.Add(@"DCClassWithEnumAndStruct"); - id270_StringField1 = Reader.NameTable.Add(@"StringField1"); - id182_SubTotal = Reader.NameTable.Add(@"SubTotal"); - id108_Root = Reader.NameTable.Add(@"Root"); - id39_RootClass = Reader.NameTable.Add(@"RootClass"); - id258_DateContent = Reader.NameTable.Add(@"DateContent"); + id136_ArrayOfInstrument = Reader.NameTable.Add(@"ArrayOfInstrument"); + id135_double = Reader.NameTable.Add(@"double"); + id50_TypeWithMyCollectionField = Reader.NameTable.Add(@"TypeWithMyCollectionField"); + id124_Value2 = Reader.NameTable.Add(@"Value2"); + id110_TypeWithFieldsOrdered = Reader.NameTable.Add(@"TypeWithFieldsOrdered"); + id146_NoneParameter = Reader.NameTable.Add(@"NoneParameter"); + id37_Document = Reader.NameTable.Add(@"Document"); + id254_MyFieldIgnored = Reader.NameTable.Add(@"MyFieldIgnored"); + id279_IntField1 = Reader.NameTable.Add(@"IntField1"); + id249_CustomXmlArrayProperty = Reader.NameTable.Add(@"CustomXmlArrayProperty"); + id54_MyEnum = Reader.NameTable.Add(@"MyEnum"); + id207_F1 = Reader.NameTable.Add(@"F1"); + id143_ArrayOfItemChoiceType = Reader.NameTable.Add(@"ArrayOfItemChoiceType"); + id108_ComplexChoiceA = Reader.NameTable.Add(@"ComplexChoiceA"); + id94_Item = Reader.NameTable.Add(@"TypeWithNonPublicDefaultConstructor"); + id121_A = Reader.NameTable.Add(@"A"); + id5_Item = Reader.NameTable.Add(@"TypeWithDateTimeOffsetProperties"); + id256_NoneSchemaFormListProperty = Reader.NameTable.Add(@"NoneSchemaFormListProperty"); + id166_DefaultDTO = Reader.NameTable.Add(@"DefaultDTO"); + id65_DerivedClassWithSameProperty2 = Reader.NameTable.Add(@"DerivedClassWithSameProperty2"); + id34_Item = Reader.NameTable.Add(@"DefaultValuesSetToNegativeInfinity"); + id32_DefaultValuesSetToNaN = Reader.NameTable.Add(@"DefaultValuesSetToNaN"); + id219_MyStruct = Reader.NameTable.Add(@"MyStruct"); + id23_BaseClass1 = Reader.NameTable.Add(@"BaseClass1"); + id46_TypeWithGetSetArrayMembers = Reader.NameTable.Add(@"TypeWithGetSetArrayMembers"); + id266_StringArrayValue = Reader.NameTable.Add(@"StringArrayValue"); + id160_Quantity = Reader.NameTable.Add(@"Quantity"); + id78_SByteEnum = Reader.NameTable.Add(@"SByteEnum"); + id45_SimpleType = Reader.NameTable.Add(@"SimpleType"); + id258_XmlAttributeForm = Reader.NameTable.Add(@"XmlAttributeForm"); + id118_LastName = Reader.NameTable.Add(@"LastName"); + id282_StringField1 = Reader.NameTable.Add(@"StringField1"); + id49_StructNotSerializable = Reader.NameTable.Add(@"StructNotSerializable"); + id52_ArrayOfAnyType = Reader.NameTable.Add(@"ArrayOfAnyType"); + id152_Value = Reader.NameTable.Add(@"Value"); + id28_Instrument = Reader.NameTable.Add(@"Instrument"); + id29_Brass = Reader.NameTable.Add(@"Brass"); + id117_MiddleName = Reader.NameTable.Add(@"MiddleName"); + id276_HexBinaryContent = Reader.NameTable.Add(@"HexBinaryContent"); + id194_Comment2 = Reader.NameTable.Add(@"Comment2"); + id70_Item = Reader.NameTable.Add(@"http://schemas.xmlsoap.org/ws/2005/04/discovery"); + id89_Item = Reader.NameTable.Add(@"ClassImplementingIXmlSerialiable"); + id116_FirstName = Reader.NameTable.Add(@"FirstName"); + id192_Prop = Reader.NameTable.Add(@"Prop"); + id139_ArrayOfXElement = Reader.NameTable.Add(@"ArrayOfXElement"); + id79_ShortEnum = Reader.NameTable.Add(@"ShortEnum"); + id85_ItemChoiceType = Reader.NameTable.Add(@"ItemChoiceType"); + id106_Item = Reader.NameTable.Add(@"TypeWithPropertyHavingComplexChoice"); + id61_TypeHasArrayOfASerializedAsB = Reader.NameTable.Add(@"TypeHasArrayOfASerializedAsB"); + id255_Item = Reader.NameTable.Add(@"UnqualifiedSchemaFormListProperty"); + id51_Item = Reader.NameTable.Add(@"TypeWithReadOnlyMyCollectionProperty"); + id99_Item = Reader.NameTable.Add(@"TypeWithEnumPropertyHavingDefaultValue"); + id114_TypeClashA = Reader.NameTable.Add(@"TypeClashA"); + id259_DS2Root = Reader.NameTable.Add(@"DS2Root"); + id115_Person = Reader.NameTable.Add(@"Person"); + id13_Group = Reader.NameTable.Add(@"Group"); + id81_UIntEnum = Reader.NameTable.Add(@"UIntEnum"); + id38_httpexamplecom = Reader.NameTable.Add(@"http://example.com"); + id177_EmployeeName = Reader.NameTable.Add(@"EmployeeName"); + id129_ArrayOfOrderedItem = Reader.NameTable.Add(@"ArrayOfOrderedItem"); + id221_ByteArray = Reader.NameTable.Add(@"ByteArray"); + id214_NIntAProp = Reader.NameTable.Add(@"NIntAProp"); + id233_Short = Reader.NameTable.Add(@"Short"); + id189_X = Reader.NameTable.Add(@"X"); + id243_DecimalNumber = Reader.NameTable.Add(@"DecimalNumber"); + id191_Z = Reader.NameTable.Add(@"Z"); + id158_Description = Reader.NameTable.Add(@"Description"); + id198_FloatProp = Reader.NameTable.Add(@"FloatProp"); + id64_DerivedClassWithSameProperty = Reader.NameTable.Add(@"DerivedClassWithSameProperty"); + id57_DCClassWithEnumAndStruct = Reader.NameTable.Add(@"DCClassWithEnumAndStruct"); + id125_XmlSerializerAttributes = Reader.NameTable.Add(@"XmlSerializerAttributes"); } } @@ -13992,11 +14830,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write107_TypeWithXmlElementProperty(objectToSerialize); + ((XmlSerializationWriter1)writer).Write111_TypeWithXmlElementProperty(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read111_TypeWithXmlElementProperty(); + return ((XmlSerializationReader1)reader).Read115_TypeWithXmlElementProperty(); } } @@ -14007,11 +14845,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write108_TypeWithXmlDocumentProperty(objectToSerialize); + ((XmlSerializationWriter1)writer).Write112_TypeWithXmlDocumentProperty(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read112_TypeWithXmlDocumentProperty(); + return ((XmlSerializationReader1)reader).Read116_TypeWithXmlDocumentProperty(); } } @@ -14022,11 +14860,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write109_TypeWithBinaryProperty(objectToSerialize); + ((XmlSerializationWriter1)writer).Write113_TypeWithBinaryProperty(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read113_TypeWithBinaryProperty(); + return ((XmlSerializationReader1)reader).Read117_TypeWithBinaryProperty(); } } @@ -14037,11 +14875,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write110_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write114_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read114_Item(); + return ((XmlSerializationReader1)reader).Read118_Item(); } } @@ -14052,11 +14890,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write111_TypeWithTimeSpanProperty(objectToSerialize); + ((XmlSerializationWriter1)writer).Write115_TypeWithTimeSpanProperty(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read115_TypeWithTimeSpanProperty(); + return ((XmlSerializationReader1)reader).Read119_TypeWithTimeSpanProperty(); } } @@ -14067,11 +14905,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write112_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write116_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read116_Item(); + return ((XmlSerializationReader1)reader).Read120_Item(); } } @@ -14082,11 +14920,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write113_TypeWithByteProperty(objectToSerialize); + ((XmlSerializationWriter1)writer).Write117_TypeWithByteProperty(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read117_TypeWithByteProperty(); + return ((XmlSerializationReader1)reader).Read121_TypeWithByteProperty(); } } @@ -14097,11 +14935,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write114_TypeWithXmlNodeArrayProperty(objectToSerialize); + ((XmlSerializationWriter1)writer).Write118_TypeWithXmlNodeArrayProperty(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read118_TypeWithXmlNodeArrayProperty(); + return ((XmlSerializationReader1)reader).Read122_TypeWithXmlNodeArrayProperty(); } } @@ -14112,11 +14950,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write115_Animal(objectToSerialize); + ((XmlSerializationWriter1)writer).Write119_Animal(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read119_Animal(); + return ((XmlSerializationReader1)reader).Read123_Animal(); } } @@ -14127,11 +14965,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write116_Dog(objectToSerialize); + ((XmlSerializationWriter1)writer).Write120_Dog(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read120_Dog(); + return ((XmlSerializationReader1)reader).Read124_Dog(); } } @@ -14142,11 +14980,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write117_DogBreed(objectToSerialize); + ((XmlSerializationWriter1)writer).Write121_DogBreed(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read121_DogBreed(); + return ((XmlSerializationReader1)reader).Read125_DogBreed(); } } @@ -14157,11 +14995,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write118_Group(objectToSerialize); + ((XmlSerializationWriter1)writer).Write122_Group(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read122_Group(); + return ((XmlSerializationReader1)reader).Read126_Group(); } } @@ -14172,11 +15010,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write119_Vehicle(objectToSerialize); + ((XmlSerializationWriter1)writer).Write123_Vehicle(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read123_Vehicle(); + return ((XmlSerializationReader1)reader).Read127_Vehicle(); } } @@ -14187,11 +15025,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write120_Employee(objectToSerialize); + ((XmlSerializationWriter1)writer).Write124_Employee(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read124_Employee(); + return ((XmlSerializationReader1)reader).Read128_Employee(); } } @@ -14202,11 +15040,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write121_BaseClass(objectToSerialize); + ((XmlSerializationWriter1)writer).Write125_BaseClass(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read125_BaseClass(); + return ((XmlSerializationReader1)reader).Read129_BaseClass(); } } @@ -14217,11 +15055,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write122_DerivedClass(objectToSerialize); + ((XmlSerializationWriter1)writer).Write126_DerivedClass(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read126_DerivedClass(); + return ((XmlSerializationReader1)reader).Read130_DerivedClass(); } } @@ -14232,11 +15070,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write123_PurchaseOrder(objectToSerialize); + ((XmlSerializationWriter1)writer).Write127_PurchaseOrder(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read127_PurchaseOrder(); + return ((XmlSerializationReader1)reader).Read131_PurchaseOrder(); } } @@ -14247,11 +15085,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write124_Address(objectToSerialize); + ((XmlSerializationWriter1)writer).Write128_Address(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read128_Address(); + return ((XmlSerializationReader1)reader).Read132_Address(); } } @@ -14262,11 +15100,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write125_OrderedItem(objectToSerialize); + ((XmlSerializationWriter1)writer).Write129_OrderedItem(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read129_OrderedItem(); + return ((XmlSerializationReader1)reader).Read133_OrderedItem(); } } @@ -14277,11 +15115,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write126_AliasedTestType(objectToSerialize); + ((XmlSerializationWriter1)writer).Write130_AliasedTestType(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read130_AliasedTestType(); + return ((XmlSerializationReader1)reader).Read134_AliasedTestType(); } } @@ -14292,11 +15130,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write127_BaseClass1(objectToSerialize); + ((XmlSerializationWriter1)writer).Write131_BaseClass1(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read131_BaseClass1(); + return ((XmlSerializationReader1)reader).Read135_BaseClass1(); } } @@ -14307,11 +15145,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write128_DerivedClass1(objectToSerialize); + ((XmlSerializationWriter1)writer).Write132_DerivedClass1(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read132_DerivedClass1(); + return ((XmlSerializationReader1)reader).Read136_DerivedClass1(); } } @@ -14322,11 +15160,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write129_ArrayOfDateTime(objectToSerialize); + ((XmlSerializationWriter1)writer).Write133_ArrayOfDateTime(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read133_ArrayOfDateTime(); + return ((XmlSerializationReader1)reader).Read137_ArrayOfDateTime(); } } @@ -14337,11 +15175,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write130_Orchestra(objectToSerialize); + ((XmlSerializationWriter1)writer).Write134_Orchestra(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read134_Orchestra(); + return ((XmlSerializationReader1)reader).Read138_Orchestra(); } } @@ -14352,11 +15190,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write131_Instrument(objectToSerialize); + ((XmlSerializationWriter1)writer).Write135_Instrument(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read135_Instrument(); + return ((XmlSerializationReader1)reader).Read139_Instrument(); } } @@ -14367,11 +15205,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write132_Brass(objectToSerialize); + ((XmlSerializationWriter1)writer).Write136_Brass(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read136_Brass(); + return ((XmlSerializationReader1)reader).Read140_Brass(); } } @@ -14382,11 +15220,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write133_Trumpet(objectToSerialize); + ((XmlSerializationWriter1)writer).Write137_Trumpet(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read137_Trumpet(); + return ((XmlSerializationReader1)reader).Read141_Trumpet(); } } @@ -14397,11 +15235,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write134_Pet(objectToSerialize); + ((XmlSerializationWriter1)writer).Write138_Pet(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read138_Pet(); + return ((XmlSerializationReader1)reader).Read142_Pet(); } } @@ -14412,11 +15250,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write135_DefaultValuesSetToNaN(objectToSerialize); + ((XmlSerializationWriter1)writer).Write139_DefaultValuesSetToNaN(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read139_DefaultValuesSetToNaN(); + return ((XmlSerializationReader1)reader).Read143_DefaultValuesSetToNaN(); } } @@ -14427,11 +15265,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write136_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write140_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read140_Item(); + return ((XmlSerializationReader1)reader).Read144_Item(); } } @@ -14442,11 +15280,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write137_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write141_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read141_Item(); + return ((XmlSerializationReader1)reader).Read145_Item(); } } @@ -14457,11 +15295,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write138_RootElement(objectToSerialize); + ((XmlSerializationWriter1)writer).Write142_RootElement(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read142_RootElement(); + return ((XmlSerializationReader1)reader).Read146_RootElement(); } } @@ -14472,11 +15310,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write139_TypeWithLinkedProperty(objectToSerialize); + ((XmlSerializationWriter1)writer).Write143_TypeWithLinkedProperty(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read143_TypeWithLinkedProperty(); + return ((XmlSerializationReader1)reader).Read147_TypeWithLinkedProperty(); } } @@ -14487,11 +15325,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write140_Document(objectToSerialize); + ((XmlSerializationWriter1)writer).Write144_Document(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read144_Document(); + return ((XmlSerializationReader1)reader).Read148_Document(); } } @@ -14502,11 +15340,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write141_RootClass(objectToSerialize); + ((XmlSerializationWriter1)writer).Write145_RootClass(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read145_RootClass(); + return ((XmlSerializationReader1)reader).Read149_RootClass(); } } @@ -14517,11 +15355,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write142_Parameter(objectToSerialize); + ((XmlSerializationWriter1)writer).Write146_Parameter(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read146_Parameter(); + return ((XmlSerializationReader1)reader).Read150_Parameter(); } } @@ -14532,11 +15370,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write143_XElementWrapper(objectToSerialize); + ((XmlSerializationWriter1)writer).Write147_XElementWrapper(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read147_XElementWrapper(); + return ((XmlSerializationReader1)reader).Read151_XElementWrapper(); } } @@ -14547,11 +15385,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write144_XElementStruct(objectToSerialize); + ((XmlSerializationWriter1)writer).Write148_XElementStruct(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read148_XElementStruct(); + return ((XmlSerializationReader1)reader).Read152_XElementStruct(); } } @@ -14562,11 +15400,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write145_XElementArrayWrapper(objectToSerialize); + ((XmlSerializationWriter1)writer).Write149_XElementArrayWrapper(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read149_XElementArrayWrapper(); + return ((XmlSerializationReader1)reader).Read153_XElementArrayWrapper(); } } @@ -14577,11 +15415,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write146_TypeWithDateTimeStringProperty(objectToSerialize); + ((XmlSerializationWriter1)writer).Write150_TypeWithDateTimeStringProperty(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read150_TypeWithDateTimeStringProperty(); + return ((XmlSerializationReader1)reader).Read154_TypeWithDateTimeStringProperty(); } } @@ -14592,11 +15430,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write147_SimpleType(objectToSerialize); + ((XmlSerializationWriter1)writer).Write151_SimpleType(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read151_SimpleType(); + return ((XmlSerializationReader1)reader).Read155_SimpleType(); } } @@ -14607,11 +15445,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write148_TypeWithGetSetArrayMembers(objectToSerialize); + ((XmlSerializationWriter1)writer).Write152_TypeWithGetSetArrayMembers(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read152_TypeWithGetSetArrayMembers(); + return ((XmlSerializationReader1)reader).Read156_TypeWithGetSetArrayMembers(); } } @@ -14622,11 +15460,26 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write149_TypeWithGetOnlyArrayProperties(objectToSerialize); + ((XmlSerializationWriter1)writer).Write153_TypeWithGetOnlyArrayProperties(objectToSerialize); + } + + protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { + return ((XmlSerializationReader1)reader).Read157_TypeWithGetOnlyArrayProperties(); + } + } + + public sealed class TypeWithArraylikeMembersSerializer : XmlSerializer1 { + + public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { + return xmlReader.IsStartElement(@"TypeWithArraylikeMembers", @""); + } + + protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { + ((XmlSerializationWriter1)writer).Write154_TypeWithArraylikeMembers(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read153_TypeWithGetOnlyArrayProperties(); + return ((XmlSerializationReader1)reader).Read158_TypeWithArraylikeMembers(); } } @@ -14637,11 +15490,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write150_StructNotSerializable(objectToSerialize); + ((XmlSerializationWriter1)writer).Write155_StructNotSerializable(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read154_StructNotSerializable(); + return ((XmlSerializationReader1)reader).Read159_StructNotSerializable(); } } @@ -14652,11 +15505,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write151_TypeWithMyCollectionField(objectToSerialize); + ((XmlSerializationWriter1)writer).Write156_TypeWithMyCollectionField(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read155_TypeWithMyCollectionField(); + return ((XmlSerializationReader1)reader).Read160_TypeWithMyCollectionField(); } } @@ -14667,11 +15520,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write152_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write157_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read156_Item(); + return ((XmlSerializationReader1)reader).Read161_Item(); } } @@ -14682,11 +15535,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write153_ArrayOfAnyType(objectToSerialize); + ((XmlSerializationWriter1)writer).Write158_ArrayOfAnyType(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read157_ArrayOfAnyType(); + return ((XmlSerializationReader1)reader).Read162_ArrayOfAnyType(); } } @@ -14697,11 +15550,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write154_MyEnum(objectToSerialize); + ((XmlSerializationWriter1)writer).Write159_MyEnum(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read158_MyEnum(); + return ((XmlSerializationReader1)reader).Read163_MyEnum(); } } @@ -14712,11 +15565,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write155_TypeWithEnumMembers(objectToSerialize); + ((XmlSerializationWriter1)writer).Write160_TypeWithEnumMembers(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read159_TypeWithEnumMembers(); + return ((XmlSerializationReader1)reader).Read164_TypeWithEnumMembers(); } } @@ -14727,11 +15580,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write156_DCStruct(objectToSerialize); + ((XmlSerializationWriter1)writer).Write161_DCStruct(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read160_DCStruct(); + return ((XmlSerializationReader1)reader).Read165_DCStruct(); } } @@ -14742,11 +15595,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write157_DCClassWithEnumAndStruct(objectToSerialize); + ((XmlSerializationWriter1)writer).Write162_DCClassWithEnumAndStruct(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read161_DCClassWithEnumAndStruct(); + return ((XmlSerializationReader1)reader).Read166_DCClassWithEnumAndStruct(); } } @@ -14757,11 +15610,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write158_BuiltInTypes(objectToSerialize); + ((XmlSerializationWriter1)writer).Write163_BuiltInTypes(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read162_BuiltInTypes(); + return ((XmlSerializationReader1)reader).Read167_BuiltInTypes(); } } @@ -14772,11 +15625,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write159_TypeA(objectToSerialize); + ((XmlSerializationWriter1)writer).Write164_TypeA(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read163_TypeA(); + return ((XmlSerializationReader1)reader).Read168_TypeA(); } } @@ -14787,11 +15640,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write160_TypeB(objectToSerialize); + ((XmlSerializationWriter1)writer).Write165_TypeB(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read164_TypeB(); + return ((XmlSerializationReader1)reader).Read169_TypeB(); } } @@ -14802,11 +15655,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write161_TypeHasArrayOfASerializedAsB(objectToSerialize); + ((XmlSerializationWriter1)writer).Write166_TypeHasArrayOfASerializedAsB(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read165_TypeHasArrayOfASerializedAsB(); + return ((XmlSerializationReader1)reader).Read170_TypeHasArrayOfASerializedAsB(); } } @@ -14817,11 +15670,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write162_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write167_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read166_Item(); + return ((XmlSerializationReader1)reader).Read171_Item(); } } @@ -14832,11 +15685,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write163_BaseClassWithSamePropertyName(objectToSerialize); + ((XmlSerializationWriter1)writer).Write168_BaseClassWithSamePropertyName(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read167_BaseClassWithSamePropertyName(); + return ((XmlSerializationReader1)reader).Read172_BaseClassWithSamePropertyName(); } } @@ -14847,11 +15700,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write164_DerivedClassWithSameProperty(objectToSerialize); + ((XmlSerializationWriter1)writer).Write169_DerivedClassWithSameProperty(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read168_DerivedClassWithSameProperty(); + return ((XmlSerializationReader1)reader).Read173_DerivedClassWithSameProperty(); } } @@ -14862,11 +15715,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write165_DerivedClassWithSameProperty2(objectToSerialize); + ((XmlSerializationWriter1)writer).Write170_DerivedClassWithSameProperty2(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read169_DerivedClassWithSameProperty2(); + return ((XmlSerializationReader1)reader).Read174_DerivedClassWithSameProperty2(); } } @@ -14877,11 +15730,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write166_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write171_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read170_Item(); + return ((XmlSerializationReader1)reader).Read175_Item(); } } @@ -14892,11 +15745,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write167_TypeWithByteArrayAsXmlText(objectToSerialize); + ((XmlSerializationWriter1)writer).Write172_TypeWithByteArrayAsXmlText(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read171_TypeWithByteArrayAsXmlText(); + return ((XmlSerializationReader1)reader).Read176_TypeWithByteArrayAsXmlText(); } } @@ -14907,11 +15760,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write168_SimpleDC(objectToSerialize); + ((XmlSerializationWriter1)writer).Write173_SimpleDC(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read172_SimpleDC(); + return ((XmlSerializationReader1)reader).Read177_SimpleDC(); } } @@ -14922,11 +15775,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write169_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write174_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read173_Item(); + return ((XmlSerializationReader1)reader).Read178_Item(); } } @@ -14937,11 +15790,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write170_EnumFlags(objectToSerialize); + ((XmlSerializationWriter1)writer).Write175_EnumFlags(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read174_EnumFlags(); + return ((XmlSerializationReader1)reader).Read179_EnumFlags(); } } @@ -14952,11 +15805,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write171_ClassImplementsInterface(objectToSerialize); + ((XmlSerializationWriter1)writer).Write176_ClassImplementsInterface(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read175_ClassImplementsInterface(); + return ((XmlSerializationReader1)reader).Read180_ClassImplementsInterface(); } } @@ -14967,11 +15820,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write172_WithStruct(objectToSerialize); + ((XmlSerializationWriter1)writer).Write177_WithStruct(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read176_WithStruct(); + return ((XmlSerializationReader1)reader).Read181_WithStruct(); } } @@ -14982,11 +15835,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write173_SomeStruct(objectToSerialize); + ((XmlSerializationWriter1)writer).Write178_SomeStruct(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read177_SomeStruct(); + return ((XmlSerializationReader1)reader).Read182_SomeStruct(); } } @@ -14997,11 +15850,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write174_WithEnums(objectToSerialize); + ((XmlSerializationWriter1)writer).Write179_WithEnums(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read178_WithEnums(); + return ((XmlSerializationReader1)reader).Read183_WithEnums(); } } @@ -15012,11 +15865,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write175_WithNullables(objectToSerialize); + ((XmlSerializationWriter1)writer).Write180_WithNullables(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read179_WithNullables(); + return ((XmlSerializationReader1)reader).Read184_WithNullables(); } } @@ -15027,11 +15880,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write176_ByteEnum(objectToSerialize); + ((XmlSerializationWriter1)writer).Write181_ByteEnum(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read180_ByteEnum(); + return ((XmlSerializationReader1)reader).Read185_ByteEnum(); } } @@ -15042,11 +15895,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write177_SByteEnum(objectToSerialize); + ((XmlSerializationWriter1)writer).Write182_SByteEnum(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read181_SByteEnum(); + return ((XmlSerializationReader1)reader).Read186_SByteEnum(); } } @@ -15057,11 +15910,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write178_ShortEnum(objectToSerialize); + ((XmlSerializationWriter1)writer).Write183_ShortEnum(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read182_ShortEnum(); + return ((XmlSerializationReader1)reader).Read187_ShortEnum(); } } @@ -15072,11 +15925,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write179_IntEnum(objectToSerialize); + ((XmlSerializationWriter1)writer).Write184_IntEnum(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read183_IntEnum(); + return ((XmlSerializationReader1)reader).Read188_IntEnum(); } } @@ -15087,11 +15940,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write180_UIntEnum(objectToSerialize); + ((XmlSerializationWriter1)writer).Write185_UIntEnum(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read184_UIntEnum(); + return ((XmlSerializationReader1)reader).Read189_UIntEnum(); } } @@ -15102,11 +15955,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write181_LongEnum(objectToSerialize); + ((XmlSerializationWriter1)writer).Write186_LongEnum(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read185_LongEnum(); + return ((XmlSerializationReader1)reader).Read190_LongEnum(); } } @@ -15117,11 +15970,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write182_ULongEnum(objectToSerialize); + ((XmlSerializationWriter1)writer).Write187_ULongEnum(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read186_ULongEnum(); + return ((XmlSerializationReader1)reader).Read191_ULongEnum(); } } @@ -15132,11 +15985,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write183_AttributeTesting(objectToSerialize); + ((XmlSerializationWriter1)writer).Write188_AttributeTesting(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read187_AttributeTesting(); + return ((XmlSerializationReader1)reader).Read192_AttributeTesting(); } } @@ -15147,11 +16000,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write184_ItemChoiceType(objectToSerialize); + ((XmlSerializationWriter1)writer).Write189_ItemChoiceType(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read188_ItemChoiceType(); + return ((XmlSerializationReader1)reader).Read193_ItemChoiceType(); } } @@ -15162,11 +16015,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write185_TypeWithAnyAttribute(objectToSerialize); + ((XmlSerializationWriter1)writer).Write190_TypeWithAnyAttribute(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read189_TypeWithAnyAttribute(); + return ((XmlSerializationReader1)reader).Read194_TypeWithAnyAttribute(); } } @@ -15177,11 +16030,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write186_KnownTypesThroughConstructor(objectToSerialize); + ((XmlSerializationWriter1)writer).Write191_KnownTypesThroughConstructor(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read190_KnownTypesThroughConstructor(); + return ((XmlSerializationReader1)reader).Read195_KnownTypesThroughConstructor(); } } @@ -15192,11 +16045,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write187_SimpleKnownTypeValue(objectToSerialize); + ((XmlSerializationWriter1)writer).Write192_SimpleKnownTypeValue(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read191_SimpleKnownTypeValue(); + return ((XmlSerializationReader1)reader).Read196_SimpleKnownTypeValue(); } } @@ -15207,11 +16060,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write188_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write193_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read192_Item(); + return ((XmlSerializationReader1)reader).Read197_Item(); } } @@ -15222,11 +16075,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write189_TypeWithPropertyNameSpecified(objectToSerialize); + ((XmlSerializationWriter1)writer).Write194_TypeWithPropertyNameSpecified(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read193_TypeWithPropertyNameSpecified(); + return ((XmlSerializationReader1)reader).Read198_TypeWithPropertyNameSpecified(); } } @@ -15237,11 +16090,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write190_TypeWithXmlSchemaFormAttribute(objectToSerialize); + ((XmlSerializationWriter1)writer).Write195_TypeWithXmlSchemaFormAttribute(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read194_TypeWithXmlSchemaFormAttribute(); + return ((XmlSerializationReader1)reader).Read199_TypeWithXmlSchemaFormAttribute(); } } @@ -15252,11 +16105,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write191_MyXmlType(objectToSerialize); + ((XmlSerializationWriter1)writer).Write196_MyXmlType(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read195_MyXmlType(); + return ((XmlSerializationReader1)reader).Read200_MyXmlType(); } } @@ -15267,11 +16120,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write192_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write197_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read196_Item(); + return ((XmlSerializationReader1)reader).Read201_Item(); } } @@ -15282,11 +16135,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write193_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write198_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read197_Item(); + return ((XmlSerializationReader1)reader).Read202_Item(); } } @@ -15297,11 +16150,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write194_ServerSettings(objectToSerialize); + ((XmlSerializationWriter1)writer).Write199_ServerSettings(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read198_ServerSettings(); + return ((XmlSerializationReader1)reader).Read203_ServerSettings(); } } @@ -15312,11 +16165,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write195_TypeWithXmlQualifiedName(objectToSerialize); + ((XmlSerializationWriter1)writer).Write200_TypeWithXmlQualifiedName(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read199_TypeWithXmlQualifiedName(); + return ((XmlSerializationReader1)reader).Read204_TypeWithXmlQualifiedName(); } } @@ -15327,11 +16180,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write196_TypeWith2DArrayProperty2(objectToSerialize); + ((XmlSerializationWriter1)writer).Write201_TypeWith2DArrayProperty2(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read200_TypeWith2DArrayProperty2(); + return ((XmlSerializationReader1)reader).Read205_TypeWith2DArrayProperty2(); } } @@ -15342,11 +16195,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write197_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write202_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read201_Item(); + return ((XmlSerializationReader1)reader).Read206_Item(); } } @@ -15357,11 +16210,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write198_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write203_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read202_Item(); + return ((XmlSerializationReader1)reader).Read207_Item(); } } @@ -15372,11 +16225,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write199_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write204_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read203_Item(); + return ((XmlSerializationReader1)reader).Read208_Item(); } } @@ -15387,11 +16240,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write200_TypeWithShouldSerializeMethod(objectToSerialize); + ((XmlSerializationWriter1)writer).Write205_TypeWithShouldSerializeMethod(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read204_TypeWithShouldSerializeMethod(); + return ((XmlSerializationReader1)reader).Read209_TypeWithShouldSerializeMethod(); } } @@ -15402,11 +16255,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write201_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write206_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read205_Item(); + return ((XmlSerializationReader1)reader).Read210_Item(); } } @@ -15417,11 +16270,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write202_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write207_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read206_Item(); + return ((XmlSerializationReader1)reader).Read211_Item(); } } @@ -15432,11 +16285,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write203_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write208_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read207_Item(); + return ((XmlSerializationReader1)reader).Read212_Item(); } } @@ -15447,11 +16300,26 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write204_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write209_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read208_Item(); + return ((XmlSerializationReader1)reader).Read213_Item(); + } + } + + public sealed class TypeWithPropertyHavingComplexChoiceSerializer : XmlSerializer1 { + + public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { + return xmlReader.IsStartElement(@"TypeWithPropertyHavingComplexChoice", @""); + } + + protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { + ((XmlSerializationWriter1)writer).Write210_Item(objectToSerialize); + } + + protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { + return ((XmlSerializationReader1)reader).Read214_Item(); } } @@ -15462,11 +16330,41 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write205_MoreChoices(objectToSerialize); + ((XmlSerializationWriter1)writer).Write211_MoreChoices(objectToSerialize); + } + + protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { + return ((XmlSerializationReader1)reader).Read215_MoreChoices(); + } + } + + public sealed class ComplexChoiceASerializer : XmlSerializer1 { + + public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { + return xmlReader.IsStartElement(@"ComplexChoiceA", @""); + } + + protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { + ((XmlSerializationWriter1)writer).Write212_ComplexChoiceA(objectToSerialize); + } + + protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { + return ((XmlSerializationReader1)reader).Read216_ComplexChoiceA(); + } + } + + public sealed class ComplexChoiceBSerializer : XmlSerializer1 { + + public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { + return xmlReader.IsStartElement(@"ComplexChoiceB", @""); + } + + protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { + ((XmlSerializationWriter1)writer).Write213_ComplexChoiceB(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read209_MoreChoices(); + return ((XmlSerializationReader1)reader).Read217_ComplexChoiceB(); } } @@ -15477,11 +16375,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write206_TypeWithFieldsOrdered(objectToSerialize); + ((XmlSerializationWriter1)writer).Write214_TypeWithFieldsOrdered(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read210_TypeWithFieldsOrdered(); + return ((XmlSerializationReader1)reader).Read218_TypeWithFieldsOrdered(); } } @@ -15492,11 +16390,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write207_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write215_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read211_Item(); + return ((XmlSerializationReader1)reader).Read219_Item(); } } @@ -15507,11 +16405,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write208_Root(objectToSerialize); + ((XmlSerializationWriter1)writer).Write216_Root(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read212_Root(); + return ((XmlSerializationReader1)reader).Read220_Root(); } } @@ -15522,11 +16420,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write209_TypeClashB(objectToSerialize); + ((XmlSerializationWriter1)writer).Write217_TypeClashB(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read213_TypeClashB(); + return ((XmlSerializationReader1)reader).Read221_TypeClashB(); } } @@ -15537,11 +16435,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write210_TypeClashA(objectToSerialize); + ((XmlSerializationWriter1)writer).Write218_TypeClashA(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read214_TypeClashA(); + return ((XmlSerializationReader1)reader).Read222_TypeClashA(); } } @@ -15552,11 +16450,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write211_Person(objectToSerialize); + ((XmlSerializationWriter1)writer).Write219_Person(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read215_Person(); + return ((XmlSerializationReader1)reader).Read223_Person(); } } @@ -15568,111 +16466,115 @@ public override System.Collections.Hashtable ReadMethods { get { if (readMethods == null) { System.Collections.Hashtable _tmp = new System.Collections.Hashtable(); - _tmp[@"TypeWithXmlElementProperty::"] = @"Read111_TypeWithXmlElementProperty"; - _tmp[@"TypeWithXmlDocumentProperty::"] = @"Read112_TypeWithXmlDocumentProperty"; - _tmp[@"TypeWithBinaryProperty::"] = @"Read113_TypeWithBinaryProperty"; - _tmp[@"TypeWithDateTimeOffsetProperties::"] = @"Read114_Item"; - _tmp[@"TypeWithTimeSpanProperty::"] = @"Read115_TypeWithTimeSpanProperty"; - _tmp[@"TypeWithDefaultTimeSpanProperty::"] = @"Read116_Item"; - _tmp[@"TypeWithByteProperty::"] = @"Read117_TypeWithByteProperty"; - _tmp[@"TypeWithXmlNodeArrayProperty:::True:"] = @"Read118_TypeWithXmlNodeArrayProperty"; - _tmp[@"Animal::"] = @"Read119_Animal"; - _tmp[@"Dog::"] = @"Read120_Dog"; - _tmp[@"DogBreed::"] = @"Read121_DogBreed"; - _tmp[@"Group::"] = @"Read122_Group"; - _tmp[@"Vehicle::"] = @"Read123_Vehicle"; - _tmp[@"Employee::"] = @"Read124_Employee"; - _tmp[@"BaseClass::"] = @"Read125_BaseClass"; - _tmp[@"DerivedClass::"] = @"Read126_DerivedClass"; - _tmp[@"PurchaseOrder:http://www.contoso1.com:PurchaseOrder:False:"] = @"Read127_PurchaseOrder"; - _tmp[@"Address::"] = @"Read128_Address"; - _tmp[@"OrderedItem::"] = @"Read129_OrderedItem"; - _tmp[@"AliasedTestType::"] = @"Read130_AliasedTestType"; - _tmp[@"BaseClass1::"] = @"Read131_BaseClass1"; - _tmp[@"DerivedClass1::"] = @"Read132_DerivedClass1"; - _tmp[@"MyCollection1::"] = @"Read133_ArrayOfDateTime"; - _tmp[@"Orchestra::"] = @"Read134_Orchestra"; - _tmp[@"Instrument::"] = @"Read135_Instrument"; - _tmp[@"Brass::"] = @"Read136_Brass"; - _tmp[@"Trumpet::"] = @"Read137_Trumpet"; - _tmp[@"Pet::"] = @"Read138_Pet"; - _tmp[@"DefaultValuesSetToNaN::"] = @"Read139_DefaultValuesSetToNaN"; - _tmp[@"DefaultValuesSetToPositiveInfinity::"] = @"Read140_Item"; - _tmp[@"DefaultValuesSetToNegativeInfinity::"] = @"Read141_Item"; - _tmp[@"TypeWithMismatchBetweenAttributeAndPropertyType::RootElement:True:"] = @"Read142_RootElement"; - _tmp[@"TypeWithLinkedProperty::"] = @"Read143_TypeWithLinkedProperty"; - _tmp[@"MsgDocumentType:http://example.com:Document:True:"] = @"Read144_Document"; - _tmp[@"RootClass::"] = @"Read145_RootClass"; - _tmp[@"Parameter::"] = @"Read146_Parameter"; - _tmp[@"XElementWrapper::"] = @"Read147_XElementWrapper"; - _tmp[@"XElementStruct::"] = @"Read148_XElementStruct"; - _tmp[@"XElementArrayWrapper::"] = @"Read149_XElementArrayWrapper"; - _tmp[@"SerializationTypes.TypeWithDateTimeStringProperty::"] = @"Read150_TypeWithDateTimeStringProperty"; - _tmp[@"SerializationTypes.SimpleType::"] = @"Read151_SimpleType"; - _tmp[@"SerializationTypes.TypeWithGetSetArrayMembers::"] = @"Read152_TypeWithGetSetArrayMembers"; - _tmp[@"SerializationTypes.TypeWithGetOnlyArrayProperties::"] = @"Read153_TypeWithGetOnlyArrayProperties"; - _tmp[@"SerializationTypes.StructNotSerializable::"] = @"Read154_StructNotSerializable"; - _tmp[@"SerializationTypes.TypeWithMyCollectionField::"] = @"Read155_TypeWithMyCollectionField"; - _tmp[@"SerializationTypes.TypeWithReadOnlyMyCollectionProperty::"] = @"Read156_Item"; - _tmp[@"SerializationTypes.MyList::"] = @"Read157_ArrayOfAnyType"; - _tmp[@"SerializationTypes.MyEnum::"] = @"Read158_MyEnum"; - _tmp[@"SerializationTypes.TypeWithEnumMembers::"] = @"Read159_TypeWithEnumMembers"; - _tmp[@"SerializationTypes.DCStruct::"] = @"Read160_DCStruct"; - _tmp[@"SerializationTypes.DCClassWithEnumAndStruct::"] = @"Read161_DCClassWithEnumAndStruct"; - _tmp[@"SerializationTypes.BuiltInTypes::"] = @"Read162_BuiltInTypes"; - _tmp[@"SerializationTypes.TypeA::"] = @"Read163_TypeA"; - _tmp[@"SerializationTypes.TypeB::"] = @"Read164_TypeB"; - _tmp[@"SerializationTypes.TypeHasArrayOfASerializedAsB::"] = @"Read165_TypeHasArrayOfASerializedAsB"; - _tmp[@"SerializationTypes.__TypeNameWithSpecialCharacters漢ñ::"] = @"Read166_Item"; - _tmp[@"SerializationTypes.BaseClassWithSamePropertyName::"] = @"Read167_BaseClassWithSamePropertyName"; - _tmp[@"SerializationTypes.DerivedClassWithSameProperty::"] = @"Read168_DerivedClassWithSameProperty"; - _tmp[@"SerializationTypes.DerivedClassWithSameProperty2::"] = @"Read169_DerivedClassWithSameProperty2"; - _tmp[@"SerializationTypes.TypeWithDateTimePropertyAsXmlTime::"] = @"Read170_Item"; - _tmp[@"SerializationTypes.TypeWithByteArrayAsXmlText::"] = @"Read171_TypeWithByteArrayAsXmlText"; - _tmp[@"SerializationTypes.SimpleDC::"] = @"Read172_SimpleDC"; - _tmp[@"SerializationTypes.TypeWithXmlTextAttributeOnArray:http://schemas.xmlsoap.org/ws/2005/04/discovery::False:"] = @"Read173_Item"; - _tmp[@"SerializationTypes.EnumFlags::"] = @"Read174_EnumFlags"; - _tmp[@"SerializationTypes.ClassImplementsInterface::"] = @"Read175_ClassImplementsInterface"; - _tmp[@"SerializationTypes.WithStruct::"] = @"Read176_WithStruct"; - _tmp[@"SerializationTypes.SomeStruct::"] = @"Read177_SomeStruct"; - _tmp[@"SerializationTypes.WithEnums::"] = @"Read178_WithEnums"; - _tmp[@"SerializationTypes.WithNullables::"] = @"Read179_WithNullables"; - _tmp[@"SerializationTypes.ByteEnum::"] = @"Read180_ByteEnum"; - _tmp[@"SerializationTypes.SByteEnum::"] = @"Read181_SByteEnum"; - _tmp[@"SerializationTypes.ShortEnum::"] = @"Read182_ShortEnum"; - _tmp[@"SerializationTypes.IntEnum::"] = @"Read183_IntEnum"; - _tmp[@"SerializationTypes.UIntEnum::"] = @"Read184_UIntEnum"; - _tmp[@"SerializationTypes.LongEnum::"] = @"Read185_LongEnum"; - _tmp[@"SerializationTypes.ULongEnum::"] = @"Read186_ULongEnum"; - _tmp[@"SerializationTypes.XmlSerializerAttributes::AttributeTesting:False:"] = @"Read187_AttributeTesting"; - _tmp[@"SerializationTypes.ItemChoiceType::"] = @"Read188_ItemChoiceType"; - _tmp[@"SerializationTypes.TypeWithAnyAttribute::"] = @"Read189_TypeWithAnyAttribute"; - _tmp[@"SerializationTypes.KnownTypesThroughConstructor::"] = @"Read190_KnownTypesThroughConstructor"; - _tmp[@"SerializationTypes.SimpleKnownTypeValue::"] = @"Read191_SimpleKnownTypeValue"; - _tmp[@"SerializationTypes.ClassImplementingIXmlSerialiable::"] = @"Read192_Item"; - _tmp[@"SerializationTypes.TypeWithPropertyNameSpecified::"] = @"Read193_TypeWithPropertyNameSpecified"; - _tmp[@"SerializationTypes.TypeWithXmlSchemaFormAttribute:::True:"] = @"Read194_TypeWithXmlSchemaFormAttribute"; - _tmp[@"SerializationTypes.TypeWithTypeNameInXmlTypeAttribute::"] = @"Read195_MyXmlType"; - _tmp[@"SerializationTypes.TypeWithSchemaFormInXmlAttribute::"] = @"Read196_Item"; - _tmp[@"SerializationTypes.TypeWithNonPublicDefaultConstructor::"] = @"Read197_Item"; - _tmp[@"SerializationTypes.ServerSettings::"] = @"Read198_ServerSettings"; - _tmp[@"SerializationTypes.TypeWithXmlQualifiedName::"] = @"Read199_TypeWithXmlQualifiedName"; - _tmp[@"SerializationTypes.TypeWith2DArrayProperty2::"] = @"Read200_TypeWith2DArrayProperty2"; - _tmp[@"SerializationTypes.TypeWithPropertiesHavingDefaultValue::"] = @"Read201_Item"; - _tmp[@"SerializationTypes.TypeWithEnumPropertyHavingDefaultValue::"] = @"Read202_Item"; - _tmp[@"SerializationTypes.TypeWithEnumFlagPropertyHavingDefaultValue::"] = @"Read203_Item"; - _tmp[@"SerializationTypes.TypeWithShouldSerializeMethod::"] = @"Read204_TypeWithShouldSerializeMethod"; - _tmp[@"SerializationTypes.KnownTypesThroughConstructorWithArrayProperties::"] = @"Read205_Item"; - _tmp[@"SerializationTypes.KnownTypesThroughConstructorWithValue::"] = @"Read206_Item"; - _tmp[@"SerializationTypes.TypeWithTypesHavingCustomFormatter::"] = @"Read207_Item"; - _tmp[@"SerializationTypes.TypeWithArrayPropertyHavingChoice::"] = @"Read208_Item"; - _tmp[@"SerializationTypes.MoreChoices::"] = @"Read209_MoreChoices"; - _tmp[@"SerializationTypes.TypeWithFieldsOrdered::"] = @"Read210_TypeWithFieldsOrdered"; - _tmp[@"SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName::"] = @"Read211_Item"; - _tmp[@"SerializationTypes.NamespaceTypeNameClashContainer::Root:True:"] = @"Read212_Root"; - _tmp[@"SerializationTypes.TypeNameClashB.TypeNameClash::"] = @"Read213_TypeClashB"; - _tmp[@"SerializationTypes.TypeNameClashA.TypeNameClash::"] = @"Read214_TypeClashA"; - _tmp[@"Outer+Person::"] = @"Read215_Person"; + _tmp[@"TypeWithXmlElementProperty::"] = @"Read115_TypeWithXmlElementProperty"; + _tmp[@"TypeWithXmlDocumentProperty::"] = @"Read116_TypeWithXmlDocumentProperty"; + _tmp[@"TypeWithBinaryProperty::"] = @"Read117_TypeWithBinaryProperty"; + _tmp[@"TypeWithDateTimeOffsetProperties::"] = @"Read118_Item"; + _tmp[@"TypeWithTimeSpanProperty::"] = @"Read119_TypeWithTimeSpanProperty"; + _tmp[@"TypeWithDefaultTimeSpanProperty::"] = @"Read120_Item"; + _tmp[@"TypeWithByteProperty::"] = @"Read121_TypeWithByteProperty"; + _tmp[@"TypeWithXmlNodeArrayProperty:::True:"] = @"Read122_TypeWithXmlNodeArrayProperty"; + _tmp[@"Animal::"] = @"Read123_Animal"; + _tmp[@"Dog::"] = @"Read124_Dog"; + _tmp[@"DogBreed::"] = @"Read125_DogBreed"; + _tmp[@"Group::"] = @"Read126_Group"; + _tmp[@"Vehicle::"] = @"Read127_Vehicle"; + _tmp[@"Employee::"] = @"Read128_Employee"; + _tmp[@"BaseClass::"] = @"Read129_BaseClass"; + _tmp[@"DerivedClass::"] = @"Read130_DerivedClass"; + _tmp[@"PurchaseOrder:http://www.contoso1.com:PurchaseOrder:False:"] = @"Read131_PurchaseOrder"; + _tmp[@"Address::"] = @"Read132_Address"; + _tmp[@"OrderedItem::"] = @"Read133_OrderedItem"; + _tmp[@"AliasedTestType::"] = @"Read134_AliasedTestType"; + _tmp[@"BaseClass1::"] = @"Read135_BaseClass1"; + _tmp[@"DerivedClass1::"] = @"Read136_DerivedClass1"; + _tmp[@"MyCollection1::"] = @"Read137_ArrayOfDateTime"; + _tmp[@"Orchestra::"] = @"Read138_Orchestra"; + _tmp[@"Instrument::"] = @"Read139_Instrument"; + _tmp[@"Brass::"] = @"Read140_Brass"; + _tmp[@"Trumpet::"] = @"Read141_Trumpet"; + _tmp[@"Pet::"] = @"Read142_Pet"; + _tmp[@"DefaultValuesSetToNaN::"] = @"Read143_DefaultValuesSetToNaN"; + _tmp[@"DefaultValuesSetToPositiveInfinity::"] = @"Read144_Item"; + _tmp[@"DefaultValuesSetToNegativeInfinity::"] = @"Read145_Item"; + _tmp[@"TypeWithMismatchBetweenAttributeAndPropertyType::RootElement:True:"] = @"Read146_RootElement"; + _tmp[@"TypeWithLinkedProperty::"] = @"Read147_TypeWithLinkedProperty"; + _tmp[@"MsgDocumentType:http://example.com:Document:True:"] = @"Read148_Document"; + _tmp[@"RootClass::"] = @"Read149_RootClass"; + _tmp[@"Parameter::"] = @"Read150_Parameter"; + _tmp[@"XElementWrapper::"] = @"Read151_XElementWrapper"; + _tmp[@"XElementStruct::"] = @"Read152_XElementStruct"; + _tmp[@"XElementArrayWrapper::"] = @"Read153_XElementArrayWrapper"; + _tmp[@"SerializationTypes.TypeWithDateTimeStringProperty::"] = @"Read154_TypeWithDateTimeStringProperty"; + _tmp[@"SerializationTypes.SimpleType::"] = @"Read155_SimpleType"; + _tmp[@"SerializationTypes.TypeWithGetSetArrayMembers::"] = @"Read156_TypeWithGetSetArrayMembers"; + _tmp[@"SerializationTypes.TypeWithGetOnlyArrayProperties::"] = @"Read157_TypeWithGetOnlyArrayProperties"; + _tmp[@"SerializationTypes.TypeWithArraylikeMembers::"] = @"Read158_TypeWithArraylikeMembers"; + _tmp[@"SerializationTypes.StructNotSerializable::"] = @"Read159_StructNotSerializable"; + _tmp[@"SerializationTypes.TypeWithMyCollectionField::"] = @"Read160_TypeWithMyCollectionField"; + _tmp[@"SerializationTypes.TypeWithReadOnlyMyCollectionProperty::"] = @"Read161_Item"; + _tmp[@"SerializationTypes.MyList::"] = @"Read162_ArrayOfAnyType"; + _tmp[@"SerializationTypes.MyEnum::"] = @"Read163_MyEnum"; + _tmp[@"SerializationTypes.TypeWithEnumMembers::"] = @"Read164_TypeWithEnumMembers"; + _tmp[@"SerializationTypes.DCStruct::"] = @"Read165_DCStruct"; + _tmp[@"SerializationTypes.DCClassWithEnumAndStruct::"] = @"Read166_DCClassWithEnumAndStruct"; + _tmp[@"SerializationTypes.BuiltInTypes::"] = @"Read167_BuiltInTypes"; + _tmp[@"SerializationTypes.TypeA::"] = @"Read168_TypeA"; + _tmp[@"SerializationTypes.TypeB::"] = @"Read169_TypeB"; + _tmp[@"SerializationTypes.TypeHasArrayOfASerializedAsB::"] = @"Read170_TypeHasArrayOfASerializedAsB"; + _tmp[@"SerializationTypes.__TypeNameWithSpecialCharacters漢ñ::"] = @"Read171_Item"; + _tmp[@"SerializationTypes.BaseClassWithSamePropertyName::"] = @"Read172_BaseClassWithSamePropertyName"; + _tmp[@"SerializationTypes.DerivedClassWithSameProperty::"] = @"Read173_DerivedClassWithSameProperty"; + _tmp[@"SerializationTypes.DerivedClassWithSameProperty2::"] = @"Read174_DerivedClassWithSameProperty2"; + _tmp[@"SerializationTypes.TypeWithDateTimePropertyAsXmlTime::"] = @"Read175_Item"; + _tmp[@"SerializationTypes.TypeWithByteArrayAsXmlText::"] = @"Read176_TypeWithByteArrayAsXmlText"; + _tmp[@"SerializationTypes.SimpleDC::"] = @"Read177_SimpleDC"; + _tmp[@"SerializationTypes.TypeWithXmlTextAttributeOnArray:http://schemas.xmlsoap.org/ws/2005/04/discovery::False:"] = @"Read178_Item"; + _tmp[@"SerializationTypes.EnumFlags::"] = @"Read179_EnumFlags"; + _tmp[@"SerializationTypes.ClassImplementsInterface::"] = @"Read180_ClassImplementsInterface"; + _tmp[@"SerializationTypes.WithStruct::"] = @"Read181_WithStruct"; + _tmp[@"SerializationTypes.SomeStruct::"] = @"Read182_SomeStruct"; + _tmp[@"SerializationTypes.WithEnums::"] = @"Read183_WithEnums"; + _tmp[@"SerializationTypes.WithNullables::"] = @"Read184_WithNullables"; + _tmp[@"SerializationTypes.ByteEnum::"] = @"Read185_ByteEnum"; + _tmp[@"SerializationTypes.SByteEnum::"] = @"Read186_SByteEnum"; + _tmp[@"SerializationTypes.ShortEnum::"] = @"Read187_ShortEnum"; + _tmp[@"SerializationTypes.IntEnum::"] = @"Read188_IntEnum"; + _tmp[@"SerializationTypes.UIntEnum::"] = @"Read189_UIntEnum"; + _tmp[@"SerializationTypes.LongEnum::"] = @"Read190_LongEnum"; + _tmp[@"SerializationTypes.ULongEnum::"] = @"Read191_ULongEnum"; + _tmp[@"SerializationTypes.XmlSerializerAttributes::AttributeTesting:False:"] = @"Read192_AttributeTesting"; + _tmp[@"SerializationTypes.ItemChoiceType::"] = @"Read193_ItemChoiceType"; + _tmp[@"SerializationTypes.TypeWithAnyAttribute::"] = @"Read194_TypeWithAnyAttribute"; + _tmp[@"SerializationTypes.KnownTypesThroughConstructor::"] = @"Read195_KnownTypesThroughConstructor"; + _tmp[@"SerializationTypes.SimpleKnownTypeValue::"] = @"Read196_SimpleKnownTypeValue"; + _tmp[@"SerializationTypes.ClassImplementingIXmlSerialiable::"] = @"Read197_Item"; + _tmp[@"SerializationTypes.TypeWithPropertyNameSpecified::"] = @"Read198_TypeWithPropertyNameSpecified"; + _tmp[@"SerializationTypes.TypeWithXmlSchemaFormAttribute:::True:"] = @"Read199_TypeWithXmlSchemaFormAttribute"; + _tmp[@"SerializationTypes.TypeWithTypeNameInXmlTypeAttribute::"] = @"Read200_MyXmlType"; + _tmp[@"SerializationTypes.TypeWithSchemaFormInXmlAttribute::"] = @"Read201_Item"; + _tmp[@"SerializationTypes.TypeWithNonPublicDefaultConstructor::"] = @"Read202_Item"; + _tmp[@"SerializationTypes.ServerSettings::"] = @"Read203_ServerSettings"; + _tmp[@"SerializationTypes.TypeWithXmlQualifiedName::"] = @"Read204_TypeWithXmlQualifiedName"; + _tmp[@"SerializationTypes.TypeWith2DArrayProperty2::"] = @"Read205_TypeWith2DArrayProperty2"; + _tmp[@"SerializationTypes.TypeWithPropertiesHavingDefaultValue::"] = @"Read206_Item"; + _tmp[@"SerializationTypes.TypeWithEnumPropertyHavingDefaultValue::"] = @"Read207_Item"; + _tmp[@"SerializationTypes.TypeWithEnumFlagPropertyHavingDefaultValue::"] = @"Read208_Item"; + _tmp[@"SerializationTypes.TypeWithShouldSerializeMethod::"] = @"Read209_TypeWithShouldSerializeMethod"; + _tmp[@"SerializationTypes.KnownTypesThroughConstructorWithArrayProperties::"] = @"Read210_Item"; + _tmp[@"SerializationTypes.KnownTypesThroughConstructorWithValue::"] = @"Read211_Item"; + _tmp[@"SerializationTypes.TypeWithTypesHavingCustomFormatter::"] = @"Read212_Item"; + _tmp[@"SerializationTypes.TypeWithArrayPropertyHavingChoice::"] = @"Read213_Item"; + _tmp[@"SerializationTypes.TypeWithPropertyHavingComplexChoice::"] = @"Read214_Item"; + _tmp[@"SerializationTypes.MoreChoices::"] = @"Read215_MoreChoices"; + _tmp[@"SerializationTypes.ComplexChoiceA::"] = @"Read216_ComplexChoiceA"; + _tmp[@"SerializationTypes.ComplexChoiceB::"] = @"Read217_ComplexChoiceB"; + _tmp[@"SerializationTypes.TypeWithFieldsOrdered::"] = @"Read218_TypeWithFieldsOrdered"; + _tmp[@"SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName::"] = @"Read219_Item"; + _tmp[@"SerializationTypes.NamespaceTypeNameClashContainer::Root:True:"] = @"Read220_Root"; + _tmp[@"SerializationTypes.TypeNameClashB.TypeNameClash::"] = @"Read221_TypeClashB"; + _tmp[@"SerializationTypes.TypeNameClashA.TypeNameClash::"] = @"Read222_TypeClashA"; + _tmp[@"Outer+Person::"] = @"Read223_Person"; if (readMethods == null) readMethods = _tmp; } return readMethods; @@ -15683,111 +16585,115 @@ public override System.Collections.Hashtable WriteMethods { get { if (writeMethods == null) { System.Collections.Hashtable _tmp = new System.Collections.Hashtable(); - _tmp[@"TypeWithXmlElementProperty::"] = @"Write107_TypeWithXmlElementProperty"; - _tmp[@"TypeWithXmlDocumentProperty::"] = @"Write108_TypeWithXmlDocumentProperty"; - _tmp[@"TypeWithBinaryProperty::"] = @"Write109_TypeWithBinaryProperty"; - _tmp[@"TypeWithDateTimeOffsetProperties::"] = @"Write110_Item"; - _tmp[@"TypeWithTimeSpanProperty::"] = @"Write111_TypeWithTimeSpanProperty"; - _tmp[@"TypeWithDefaultTimeSpanProperty::"] = @"Write112_Item"; - _tmp[@"TypeWithByteProperty::"] = @"Write113_TypeWithByteProperty"; - _tmp[@"TypeWithXmlNodeArrayProperty:::True:"] = @"Write114_TypeWithXmlNodeArrayProperty"; - _tmp[@"Animal::"] = @"Write115_Animal"; - _tmp[@"Dog::"] = @"Write116_Dog"; - _tmp[@"DogBreed::"] = @"Write117_DogBreed"; - _tmp[@"Group::"] = @"Write118_Group"; - _tmp[@"Vehicle::"] = @"Write119_Vehicle"; - _tmp[@"Employee::"] = @"Write120_Employee"; - _tmp[@"BaseClass::"] = @"Write121_BaseClass"; - _tmp[@"DerivedClass::"] = @"Write122_DerivedClass"; - _tmp[@"PurchaseOrder:http://www.contoso1.com:PurchaseOrder:False:"] = @"Write123_PurchaseOrder"; - _tmp[@"Address::"] = @"Write124_Address"; - _tmp[@"OrderedItem::"] = @"Write125_OrderedItem"; - _tmp[@"AliasedTestType::"] = @"Write126_AliasedTestType"; - _tmp[@"BaseClass1::"] = @"Write127_BaseClass1"; - _tmp[@"DerivedClass1::"] = @"Write128_DerivedClass1"; - _tmp[@"MyCollection1::"] = @"Write129_ArrayOfDateTime"; - _tmp[@"Orchestra::"] = @"Write130_Orchestra"; - _tmp[@"Instrument::"] = @"Write131_Instrument"; - _tmp[@"Brass::"] = @"Write132_Brass"; - _tmp[@"Trumpet::"] = @"Write133_Trumpet"; - _tmp[@"Pet::"] = @"Write134_Pet"; - _tmp[@"DefaultValuesSetToNaN::"] = @"Write135_DefaultValuesSetToNaN"; - _tmp[@"DefaultValuesSetToPositiveInfinity::"] = @"Write136_Item"; - _tmp[@"DefaultValuesSetToNegativeInfinity::"] = @"Write137_Item"; - _tmp[@"TypeWithMismatchBetweenAttributeAndPropertyType::RootElement:True:"] = @"Write138_RootElement"; - _tmp[@"TypeWithLinkedProperty::"] = @"Write139_TypeWithLinkedProperty"; - _tmp[@"MsgDocumentType:http://example.com:Document:True:"] = @"Write140_Document"; - _tmp[@"RootClass::"] = @"Write141_RootClass"; - _tmp[@"Parameter::"] = @"Write142_Parameter"; - _tmp[@"XElementWrapper::"] = @"Write143_XElementWrapper"; - _tmp[@"XElementStruct::"] = @"Write144_XElementStruct"; - _tmp[@"XElementArrayWrapper::"] = @"Write145_XElementArrayWrapper"; - _tmp[@"SerializationTypes.TypeWithDateTimeStringProperty::"] = @"Write146_TypeWithDateTimeStringProperty"; - _tmp[@"SerializationTypes.SimpleType::"] = @"Write147_SimpleType"; - _tmp[@"SerializationTypes.TypeWithGetSetArrayMembers::"] = @"Write148_TypeWithGetSetArrayMembers"; - _tmp[@"SerializationTypes.TypeWithGetOnlyArrayProperties::"] = @"Write149_TypeWithGetOnlyArrayProperties"; - _tmp[@"SerializationTypes.StructNotSerializable::"] = @"Write150_StructNotSerializable"; - _tmp[@"SerializationTypes.TypeWithMyCollectionField::"] = @"Write151_TypeWithMyCollectionField"; - _tmp[@"SerializationTypes.TypeWithReadOnlyMyCollectionProperty::"] = @"Write152_Item"; - _tmp[@"SerializationTypes.MyList::"] = @"Write153_ArrayOfAnyType"; - _tmp[@"SerializationTypes.MyEnum::"] = @"Write154_MyEnum"; - _tmp[@"SerializationTypes.TypeWithEnumMembers::"] = @"Write155_TypeWithEnumMembers"; - _tmp[@"SerializationTypes.DCStruct::"] = @"Write156_DCStruct"; - _tmp[@"SerializationTypes.DCClassWithEnumAndStruct::"] = @"Write157_DCClassWithEnumAndStruct"; - _tmp[@"SerializationTypes.BuiltInTypes::"] = @"Write158_BuiltInTypes"; - _tmp[@"SerializationTypes.TypeA::"] = @"Write159_TypeA"; - _tmp[@"SerializationTypes.TypeB::"] = @"Write160_TypeB"; - _tmp[@"SerializationTypes.TypeHasArrayOfASerializedAsB::"] = @"Write161_TypeHasArrayOfASerializedAsB"; - _tmp[@"SerializationTypes.__TypeNameWithSpecialCharacters漢ñ::"] = @"Write162_Item"; - _tmp[@"SerializationTypes.BaseClassWithSamePropertyName::"] = @"Write163_BaseClassWithSamePropertyName"; - _tmp[@"SerializationTypes.DerivedClassWithSameProperty::"] = @"Write164_DerivedClassWithSameProperty"; - _tmp[@"SerializationTypes.DerivedClassWithSameProperty2::"] = @"Write165_DerivedClassWithSameProperty2"; - _tmp[@"SerializationTypes.TypeWithDateTimePropertyAsXmlTime::"] = @"Write166_Item"; - _tmp[@"SerializationTypes.TypeWithByteArrayAsXmlText::"] = @"Write167_TypeWithByteArrayAsXmlText"; - _tmp[@"SerializationTypes.SimpleDC::"] = @"Write168_SimpleDC"; - _tmp[@"SerializationTypes.TypeWithXmlTextAttributeOnArray:http://schemas.xmlsoap.org/ws/2005/04/discovery::False:"] = @"Write169_Item"; - _tmp[@"SerializationTypes.EnumFlags::"] = @"Write170_EnumFlags"; - _tmp[@"SerializationTypes.ClassImplementsInterface::"] = @"Write171_ClassImplementsInterface"; - _tmp[@"SerializationTypes.WithStruct::"] = @"Write172_WithStruct"; - _tmp[@"SerializationTypes.SomeStruct::"] = @"Write173_SomeStruct"; - _tmp[@"SerializationTypes.WithEnums::"] = @"Write174_WithEnums"; - _tmp[@"SerializationTypes.WithNullables::"] = @"Write175_WithNullables"; - _tmp[@"SerializationTypes.ByteEnum::"] = @"Write176_ByteEnum"; - _tmp[@"SerializationTypes.SByteEnum::"] = @"Write177_SByteEnum"; - _tmp[@"SerializationTypes.ShortEnum::"] = @"Write178_ShortEnum"; - _tmp[@"SerializationTypes.IntEnum::"] = @"Write179_IntEnum"; - _tmp[@"SerializationTypes.UIntEnum::"] = @"Write180_UIntEnum"; - _tmp[@"SerializationTypes.LongEnum::"] = @"Write181_LongEnum"; - _tmp[@"SerializationTypes.ULongEnum::"] = @"Write182_ULongEnum"; - _tmp[@"SerializationTypes.XmlSerializerAttributes::AttributeTesting:False:"] = @"Write183_AttributeTesting"; - _tmp[@"SerializationTypes.ItemChoiceType::"] = @"Write184_ItemChoiceType"; - _tmp[@"SerializationTypes.TypeWithAnyAttribute::"] = @"Write185_TypeWithAnyAttribute"; - _tmp[@"SerializationTypes.KnownTypesThroughConstructor::"] = @"Write186_KnownTypesThroughConstructor"; - _tmp[@"SerializationTypes.SimpleKnownTypeValue::"] = @"Write187_SimpleKnownTypeValue"; - _tmp[@"SerializationTypes.ClassImplementingIXmlSerialiable::"] = @"Write188_Item"; - _tmp[@"SerializationTypes.TypeWithPropertyNameSpecified::"] = @"Write189_TypeWithPropertyNameSpecified"; - _tmp[@"SerializationTypes.TypeWithXmlSchemaFormAttribute:::True:"] = @"Write190_TypeWithXmlSchemaFormAttribute"; - _tmp[@"SerializationTypes.TypeWithTypeNameInXmlTypeAttribute::"] = @"Write191_MyXmlType"; - _tmp[@"SerializationTypes.TypeWithSchemaFormInXmlAttribute::"] = @"Write192_Item"; - _tmp[@"SerializationTypes.TypeWithNonPublicDefaultConstructor::"] = @"Write193_Item"; - _tmp[@"SerializationTypes.ServerSettings::"] = @"Write194_ServerSettings"; - _tmp[@"SerializationTypes.TypeWithXmlQualifiedName::"] = @"Write195_TypeWithXmlQualifiedName"; - _tmp[@"SerializationTypes.TypeWith2DArrayProperty2::"] = @"Write196_TypeWith2DArrayProperty2"; - _tmp[@"SerializationTypes.TypeWithPropertiesHavingDefaultValue::"] = @"Write197_Item"; - _tmp[@"SerializationTypes.TypeWithEnumPropertyHavingDefaultValue::"] = @"Write198_Item"; - _tmp[@"SerializationTypes.TypeWithEnumFlagPropertyHavingDefaultValue::"] = @"Write199_Item"; - _tmp[@"SerializationTypes.TypeWithShouldSerializeMethod::"] = @"Write200_TypeWithShouldSerializeMethod"; - _tmp[@"SerializationTypes.KnownTypesThroughConstructorWithArrayProperties::"] = @"Write201_Item"; - _tmp[@"SerializationTypes.KnownTypesThroughConstructorWithValue::"] = @"Write202_Item"; - _tmp[@"SerializationTypes.TypeWithTypesHavingCustomFormatter::"] = @"Write203_Item"; - _tmp[@"SerializationTypes.TypeWithArrayPropertyHavingChoice::"] = @"Write204_Item"; - _tmp[@"SerializationTypes.MoreChoices::"] = @"Write205_MoreChoices"; - _tmp[@"SerializationTypes.TypeWithFieldsOrdered::"] = @"Write206_TypeWithFieldsOrdered"; - _tmp[@"SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName::"] = @"Write207_Item"; - _tmp[@"SerializationTypes.NamespaceTypeNameClashContainer::Root:True:"] = @"Write208_Root"; - _tmp[@"SerializationTypes.TypeNameClashB.TypeNameClash::"] = @"Write209_TypeClashB"; - _tmp[@"SerializationTypes.TypeNameClashA.TypeNameClash::"] = @"Write210_TypeClashA"; - _tmp[@"Outer+Person::"] = @"Write211_Person"; + _tmp[@"TypeWithXmlElementProperty::"] = @"Write111_TypeWithXmlElementProperty"; + _tmp[@"TypeWithXmlDocumentProperty::"] = @"Write112_TypeWithXmlDocumentProperty"; + _tmp[@"TypeWithBinaryProperty::"] = @"Write113_TypeWithBinaryProperty"; + _tmp[@"TypeWithDateTimeOffsetProperties::"] = @"Write114_Item"; + _tmp[@"TypeWithTimeSpanProperty::"] = @"Write115_TypeWithTimeSpanProperty"; + _tmp[@"TypeWithDefaultTimeSpanProperty::"] = @"Write116_Item"; + _tmp[@"TypeWithByteProperty::"] = @"Write117_TypeWithByteProperty"; + _tmp[@"TypeWithXmlNodeArrayProperty:::True:"] = @"Write118_TypeWithXmlNodeArrayProperty"; + _tmp[@"Animal::"] = @"Write119_Animal"; + _tmp[@"Dog::"] = @"Write120_Dog"; + _tmp[@"DogBreed::"] = @"Write121_DogBreed"; + _tmp[@"Group::"] = @"Write122_Group"; + _tmp[@"Vehicle::"] = @"Write123_Vehicle"; + _tmp[@"Employee::"] = @"Write124_Employee"; + _tmp[@"BaseClass::"] = @"Write125_BaseClass"; + _tmp[@"DerivedClass::"] = @"Write126_DerivedClass"; + _tmp[@"PurchaseOrder:http://www.contoso1.com:PurchaseOrder:False:"] = @"Write127_PurchaseOrder"; + _tmp[@"Address::"] = @"Write128_Address"; + _tmp[@"OrderedItem::"] = @"Write129_OrderedItem"; + _tmp[@"AliasedTestType::"] = @"Write130_AliasedTestType"; + _tmp[@"BaseClass1::"] = @"Write131_BaseClass1"; + _tmp[@"DerivedClass1::"] = @"Write132_DerivedClass1"; + _tmp[@"MyCollection1::"] = @"Write133_ArrayOfDateTime"; + _tmp[@"Orchestra::"] = @"Write134_Orchestra"; + _tmp[@"Instrument::"] = @"Write135_Instrument"; + _tmp[@"Brass::"] = @"Write136_Brass"; + _tmp[@"Trumpet::"] = @"Write137_Trumpet"; + _tmp[@"Pet::"] = @"Write138_Pet"; + _tmp[@"DefaultValuesSetToNaN::"] = @"Write139_DefaultValuesSetToNaN"; + _tmp[@"DefaultValuesSetToPositiveInfinity::"] = @"Write140_Item"; + _tmp[@"DefaultValuesSetToNegativeInfinity::"] = @"Write141_Item"; + _tmp[@"TypeWithMismatchBetweenAttributeAndPropertyType::RootElement:True:"] = @"Write142_RootElement"; + _tmp[@"TypeWithLinkedProperty::"] = @"Write143_TypeWithLinkedProperty"; + _tmp[@"MsgDocumentType:http://example.com:Document:True:"] = @"Write144_Document"; + _tmp[@"RootClass::"] = @"Write145_RootClass"; + _tmp[@"Parameter::"] = @"Write146_Parameter"; + _tmp[@"XElementWrapper::"] = @"Write147_XElementWrapper"; + _tmp[@"XElementStruct::"] = @"Write148_XElementStruct"; + _tmp[@"XElementArrayWrapper::"] = @"Write149_XElementArrayWrapper"; + _tmp[@"SerializationTypes.TypeWithDateTimeStringProperty::"] = @"Write150_TypeWithDateTimeStringProperty"; + _tmp[@"SerializationTypes.SimpleType::"] = @"Write151_SimpleType"; + _tmp[@"SerializationTypes.TypeWithGetSetArrayMembers::"] = @"Write152_TypeWithGetSetArrayMembers"; + _tmp[@"SerializationTypes.TypeWithGetOnlyArrayProperties::"] = @"Write153_TypeWithGetOnlyArrayProperties"; + _tmp[@"SerializationTypes.TypeWithArraylikeMembers::"] = @"Write154_TypeWithArraylikeMembers"; + _tmp[@"SerializationTypes.StructNotSerializable::"] = @"Write155_StructNotSerializable"; + _tmp[@"SerializationTypes.TypeWithMyCollectionField::"] = @"Write156_TypeWithMyCollectionField"; + _tmp[@"SerializationTypes.TypeWithReadOnlyMyCollectionProperty::"] = @"Write157_Item"; + _tmp[@"SerializationTypes.MyList::"] = @"Write158_ArrayOfAnyType"; + _tmp[@"SerializationTypes.MyEnum::"] = @"Write159_MyEnum"; + _tmp[@"SerializationTypes.TypeWithEnumMembers::"] = @"Write160_TypeWithEnumMembers"; + _tmp[@"SerializationTypes.DCStruct::"] = @"Write161_DCStruct"; + _tmp[@"SerializationTypes.DCClassWithEnumAndStruct::"] = @"Write162_DCClassWithEnumAndStruct"; + _tmp[@"SerializationTypes.BuiltInTypes::"] = @"Write163_BuiltInTypes"; + _tmp[@"SerializationTypes.TypeA::"] = @"Write164_TypeA"; + _tmp[@"SerializationTypes.TypeB::"] = @"Write165_TypeB"; + _tmp[@"SerializationTypes.TypeHasArrayOfASerializedAsB::"] = @"Write166_TypeHasArrayOfASerializedAsB"; + _tmp[@"SerializationTypes.__TypeNameWithSpecialCharacters漢ñ::"] = @"Write167_Item"; + _tmp[@"SerializationTypes.BaseClassWithSamePropertyName::"] = @"Write168_BaseClassWithSamePropertyName"; + _tmp[@"SerializationTypes.DerivedClassWithSameProperty::"] = @"Write169_DerivedClassWithSameProperty"; + _tmp[@"SerializationTypes.DerivedClassWithSameProperty2::"] = @"Write170_DerivedClassWithSameProperty2"; + _tmp[@"SerializationTypes.TypeWithDateTimePropertyAsXmlTime::"] = @"Write171_Item"; + _tmp[@"SerializationTypes.TypeWithByteArrayAsXmlText::"] = @"Write172_TypeWithByteArrayAsXmlText"; + _tmp[@"SerializationTypes.SimpleDC::"] = @"Write173_SimpleDC"; + _tmp[@"SerializationTypes.TypeWithXmlTextAttributeOnArray:http://schemas.xmlsoap.org/ws/2005/04/discovery::False:"] = @"Write174_Item"; + _tmp[@"SerializationTypes.EnumFlags::"] = @"Write175_EnumFlags"; + _tmp[@"SerializationTypes.ClassImplementsInterface::"] = @"Write176_ClassImplementsInterface"; + _tmp[@"SerializationTypes.WithStruct::"] = @"Write177_WithStruct"; + _tmp[@"SerializationTypes.SomeStruct::"] = @"Write178_SomeStruct"; + _tmp[@"SerializationTypes.WithEnums::"] = @"Write179_WithEnums"; + _tmp[@"SerializationTypes.WithNullables::"] = @"Write180_WithNullables"; + _tmp[@"SerializationTypes.ByteEnum::"] = @"Write181_ByteEnum"; + _tmp[@"SerializationTypes.SByteEnum::"] = @"Write182_SByteEnum"; + _tmp[@"SerializationTypes.ShortEnum::"] = @"Write183_ShortEnum"; + _tmp[@"SerializationTypes.IntEnum::"] = @"Write184_IntEnum"; + _tmp[@"SerializationTypes.UIntEnum::"] = @"Write185_UIntEnum"; + _tmp[@"SerializationTypes.LongEnum::"] = @"Write186_LongEnum"; + _tmp[@"SerializationTypes.ULongEnum::"] = @"Write187_ULongEnum"; + _tmp[@"SerializationTypes.XmlSerializerAttributes::AttributeTesting:False:"] = @"Write188_AttributeTesting"; + _tmp[@"SerializationTypes.ItemChoiceType::"] = @"Write189_ItemChoiceType"; + _tmp[@"SerializationTypes.TypeWithAnyAttribute::"] = @"Write190_TypeWithAnyAttribute"; + _tmp[@"SerializationTypes.KnownTypesThroughConstructor::"] = @"Write191_KnownTypesThroughConstructor"; + _tmp[@"SerializationTypes.SimpleKnownTypeValue::"] = @"Write192_SimpleKnownTypeValue"; + _tmp[@"SerializationTypes.ClassImplementingIXmlSerialiable::"] = @"Write193_Item"; + _tmp[@"SerializationTypes.TypeWithPropertyNameSpecified::"] = @"Write194_TypeWithPropertyNameSpecified"; + _tmp[@"SerializationTypes.TypeWithXmlSchemaFormAttribute:::True:"] = @"Write195_TypeWithXmlSchemaFormAttribute"; + _tmp[@"SerializationTypes.TypeWithTypeNameInXmlTypeAttribute::"] = @"Write196_MyXmlType"; + _tmp[@"SerializationTypes.TypeWithSchemaFormInXmlAttribute::"] = @"Write197_Item"; + _tmp[@"SerializationTypes.TypeWithNonPublicDefaultConstructor::"] = @"Write198_Item"; + _tmp[@"SerializationTypes.ServerSettings::"] = @"Write199_ServerSettings"; + _tmp[@"SerializationTypes.TypeWithXmlQualifiedName::"] = @"Write200_TypeWithXmlQualifiedName"; + _tmp[@"SerializationTypes.TypeWith2DArrayProperty2::"] = @"Write201_TypeWith2DArrayProperty2"; + _tmp[@"SerializationTypes.TypeWithPropertiesHavingDefaultValue::"] = @"Write202_Item"; + _tmp[@"SerializationTypes.TypeWithEnumPropertyHavingDefaultValue::"] = @"Write203_Item"; + _tmp[@"SerializationTypes.TypeWithEnumFlagPropertyHavingDefaultValue::"] = @"Write204_Item"; + _tmp[@"SerializationTypes.TypeWithShouldSerializeMethod::"] = @"Write205_TypeWithShouldSerializeMethod"; + _tmp[@"SerializationTypes.KnownTypesThroughConstructorWithArrayProperties::"] = @"Write206_Item"; + _tmp[@"SerializationTypes.KnownTypesThroughConstructorWithValue::"] = @"Write207_Item"; + _tmp[@"SerializationTypes.TypeWithTypesHavingCustomFormatter::"] = @"Write208_Item"; + _tmp[@"SerializationTypes.TypeWithArrayPropertyHavingChoice::"] = @"Write209_Item"; + _tmp[@"SerializationTypes.TypeWithPropertyHavingComplexChoice::"] = @"Write210_Item"; + _tmp[@"SerializationTypes.MoreChoices::"] = @"Write211_MoreChoices"; + _tmp[@"SerializationTypes.ComplexChoiceA::"] = @"Write212_ComplexChoiceA"; + _tmp[@"SerializationTypes.ComplexChoiceB::"] = @"Write213_ComplexChoiceB"; + _tmp[@"SerializationTypes.TypeWithFieldsOrdered::"] = @"Write214_TypeWithFieldsOrdered"; + _tmp[@"SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName::"] = @"Write215_Item"; + _tmp[@"SerializationTypes.NamespaceTypeNameClashContainer::Root:True:"] = @"Write216_Root"; + _tmp[@"SerializationTypes.TypeNameClashB.TypeNameClash::"] = @"Write217_TypeClashB"; + _tmp[@"SerializationTypes.TypeNameClashA.TypeNameClash::"] = @"Write218_TypeClashA"; + _tmp[@"Outer+Person::"] = @"Write219_Person"; if (writeMethods == null) writeMethods = _tmp; } return writeMethods; @@ -15798,111 +16704,115 @@ public override System.Collections.Hashtable TypedSerializers { get { if (typedSerializers == null) { System.Collections.Hashtable _tmp = new System.Collections.Hashtable(); + _tmp.Add(@"SerializationTypes.TypeWithArraylikeMembers::", new TypeWithArraylikeMembersSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithGetSetArrayMembers::", new TypeWithGetSetArrayMembersSerializer()); + _tmp.Add(@"SerializationTypes.MyList::", new MyListSerializer()); + _tmp.Add(@"SerializationTypes.StructNotSerializable::", new StructNotSerializableSerializer()); + _tmp.Add(@"PurchaseOrder:http://www.contoso1.com:PurchaseOrder:False:", new PurchaseOrderSerializer()); + _tmp.Add(@"SerializationTypes.SimpleDC::", new SimpleDCSerializer()); + _tmp.Add(@"SerializationTypes.SimpleKnownTypeValue::", new SimpleKnownTypeValueSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithAnyAttribute::", new TypeWithAnyAttributeSerializer()); + _tmp.Add(@"TypeWithXmlElementProperty::", new TypeWithXmlElementPropertySerializer()); + _tmp.Add(@"SerializationTypes.TypeWithEnumPropertyHavingDefaultValue::", new TypeWithEnumPropertyHavingDefaultValueSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithByteArrayAsXmlText::", new TypeWithByteArrayAsXmlTextSerializer()); _tmp.Add(@"XElementArrayWrapper::", new XElementArrayWrapperSerializer()); - _tmp.Add(@"TypeWithDefaultTimeSpanProperty::", new TypeWithDefaultTimeSpanPropertySerializer()); - _tmp.Add(@"SerializationTypes.ClassImplementsInterface::", new ClassImplementsInterfaceSerializer()); - _tmp.Add(@"MsgDocumentType:http://example.com:Document:True:", new MsgDocumentTypeSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithTypeNameInXmlTypeAttribute::", new TypeWithTypeNameInXmlTypeAttributeSerializer()); + _tmp.Add(@"Dog::", new DogSerializer()); _tmp.Add(@"SerializationTypes.TypeWithEnumMembers::", new TypeWithEnumMembersSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithDateTimePropertyAsXmlTime::", new TypeWithDateTimePropertyAsXmlTimeSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName::", new TypeWithKnownTypesOfCollectionsWithConflictingXmlNameSerializer()); - _tmp.Add(@"Vehicle::", new VehicleSerializer()); _tmp.Add(@"TypeWithByteProperty::", new TypeWithBytePropertySerializer()); - _tmp.Add(@"SerializationTypes.ItemChoiceType::", new ItemChoiceTypeSerializer()); - _tmp.Add(@"SerializationTypes.ServerSettings::", new ServerSettingsSerializer()); - _tmp.Add(@"Address::", new AddressSerializer()); _tmp.Add(@"DerivedClass::", new DerivedClassSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithMyCollectionField::", new TypeWithMyCollectionFieldSerializer()); - _tmp.Add(@"Brass::", new BrassSerializer()); - _tmp.Add(@"SerializationTypes.ClassImplementingIXmlSerialiable::", new ClassImplementingIXmlSerialiableSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithNonPublicDefaultConstructor::", new TypeWithNonPublicDefaultConstructorSerializer()); - _tmp.Add(@"SerializationTypes.WithEnums::", new WithEnumsSerializer()); - _tmp.Add(@"SerializationTypes.MoreChoices::", new MoreChoicesSerializer()); - _tmp.Add(@"AliasedTestType::", new AliasedTestTypeSerializer()); - _tmp.Add(@"TypeWithXmlElementProperty::", new TypeWithXmlElementPropertySerializer()); - _tmp.Add(@"SerializationTypes.TypeWith2DArrayProperty2::", new TypeWith2DArrayProperty2Serializer()); + _tmp.Add(@"TypeWithXmlDocumentProperty::", new TypeWithXmlDocumentPropertySerializer()); + _tmp.Add(@"SerializationTypes.WithNullables::", new WithNullablesSerializer()); + _tmp.Add(@"DefaultValuesSetToNegativeInfinity::", new DefaultValuesSetToNegativeInfinitySerializer()); + _tmp.Add(@"SerializationTypes.NamespaceTypeNameClashContainer::Root:True:", new NamespaceTypeNameClashContainerSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithArrayPropertyHavingChoice::", new TypeWithArrayPropertyHavingChoiceSerializer()); _tmp.Add(@"SerializationTypes.XmlSerializerAttributes::AttributeTesting:False:", new XmlSerializerAttributesSerializer()); - _tmp.Add(@"SerializationTypes.ULongEnum::", new ULongEnumSerializer()); - _tmp.Add(@"SerializationTypes.KnownTypesThroughConstructorWithArrayProperties::", new KnownTypesThroughConstructorWithArrayPropertiesSerializer()); - _tmp.Add(@"Pet::", new PetSerializer()); - _tmp.Add(@"TypeWithMismatchBetweenAttributeAndPropertyType::RootElement:True:", new TypeWithMismatchBetweenAttributeAndPropertyTypeSerializer()); - _tmp.Add(@"Instrument::", new InstrumentSerializer()); - _tmp.Add(@"SerializationTypes.__TypeNameWithSpecialCharacters漢ñ::", new __TypeNameWithSpecialCharacters漢ñSerializer()); - _tmp.Add(@"Outer+Person::", new PersonSerializer()); - _tmp.Add(@"TypeWithBinaryProperty::", new TypeWithBinaryPropertySerializer()); - _tmp.Add(@"SerializationTypes.TypeWithPropertyNameSpecified::", new TypeWithPropertyNameSpecifiedSerializer()); - _tmp.Add(@"SerializationTypes.SimpleKnownTypeValue::", new SimpleKnownTypeValueSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithXmlQualifiedName::", new TypeWithXmlQualifiedNameSerializer()); - _tmp.Add(@"TypeWithDateTimeOffsetProperties::", new TypeWithDateTimeOffsetPropertiesSerializer()); - _tmp.Add(@"MyCollection1::", new MyCollection1Serializer()); - _tmp.Add(@"SerializationTypes.TypeWithSchemaFormInXmlAttribute::", new TypeWithSchemaFormInXmlAttributeSerializer()); - _tmp.Add(@"DefaultValuesSetToPositiveInfinity::", new DefaultValuesSetToPositiveInfinitySerializer()); - _tmp.Add(@"TypeWithTimeSpanProperty::", new TypeWithTimeSpanPropertySerializer()); - _tmp.Add(@"DerivedClass1::", new DerivedClass1Serializer()); - _tmp.Add(@"SerializationTypes.UIntEnum::", new UIntEnumSerializer()); - _tmp.Add(@"BaseClass::", new BaseClassSerializer()); - _tmp.Add(@"PurchaseOrder:http://www.contoso1.com:PurchaseOrder:False:", new PurchaseOrderSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithReadOnlyMyCollectionProperty::", new TypeWithReadOnlyMyCollectionPropertySerializer()); + _tmp.Add(@"SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName::", new TypeWithKnownTypesOfCollectionsWithConflictingXmlNameSerializer()); _tmp.Add(@"SerializationTypes.TypeA::", new TypeASerializer()); - _tmp.Add(@"Trumpet::", new TrumpetSerializer()); - _tmp.Add(@"SerializationTypes.BaseClassWithSamePropertyName::", new BaseClassWithSamePropertyNameSerializer()); - _tmp.Add(@"BaseClass1::", new BaseClass1Serializer()); - _tmp.Add(@"SerializationTypes.ShortEnum::", new ShortEnumSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithTypeNameInXmlTypeAttribute::", new TypeWithTypeNameInXmlTypeAttributeSerializer()); - _tmp.Add(@"SerializationTypes.WithStruct::", new WithStructSerializer()); - _tmp.Add(@"Group::", new GroupSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithGetSetArrayMembers::", new TypeWithGetSetArrayMembersSerializer()); + _tmp.Add(@"SerializationTypes.DCStruct::", new DCStructSerializer()); _tmp.Add(@"Animal::", new AnimalSerializer()); - _tmp.Add(@"OrderedItem::", new OrderedItemSerializer()); - _tmp.Add(@"SerializationTypes.IntEnum::", new IntEnumSerializer()); + _tmp.Add(@"BaseClass1::", new BaseClass1Serializer()); + _tmp.Add(@"SerializationTypes.TypeWithXmlQualifiedName::", new TypeWithXmlQualifiedNameSerializer()); + _tmp.Add(@"SerializationTypes.KnownTypesThroughConstructorWithValue::", new KnownTypesThroughConstructorWithValueSerializer()); + _tmp.Add(@"SerializationTypes.LongEnum::", new LongEnumSerializer()); + _tmp.Add(@"TypeWithXmlNodeArrayProperty:::True:", new TypeWithXmlNodeArrayPropertySerializer()); + _tmp.Add(@"SerializationTypes.ComplexChoiceA::", new ComplexChoiceASerializer()); + _tmp.Add(@"SerializationTypes.EnumFlags::", new EnumFlagsSerializer()); + _tmp.Add(@"SerializationTypes.UIntEnum::", new UIntEnumSerializer()); + _tmp.Add(@"SerializationTypes.TypeHasArrayOfASerializedAsB::", new TypeHasArrayOfASerializedAsBSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithDateTimePropertyAsXmlTime::", new TypeWithDateTimePropertyAsXmlTimeSerializer()); + _tmp.Add(@"DogBreed::", new DogBreedSerializer()); + _tmp.Add(@"SerializationTypes.ByteEnum::", new ByteEnumSerializer()); _tmp.Add(@"TypeWithLinkedProperty::", new TypeWithLinkedPropertySerializer()); - _tmp.Add(@"SerializationTypes.TypeWithByteArrayAsXmlText::", new TypeWithByteArrayAsXmlTextSerializer()); - _tmp.Add(@"SerializationTypes.TypeNameClashA.TypeNameClash::", new TypeNameClashSerializer1()); - _tmp.Add(@"TypeWithXmlDocumentProperty::", new TypeWithXmlDocumentPropertySerializer()); - _tmp.Add(@"Employee::", new EmployeeSerializer()); + _tmp.Add(@"SerializationTypes.ClassImplementingIXmlSerialiable::", new ClassImplementingIXmlSerialiableSerializer()); + _tmp.Add(@"SerializationTypes.IntEnum::", new IntEnumSerializer()); + _tmp.Add(@"Instrument::", new InstrumentSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithNonPublicDefaultConstructor::", new TypeWithNonPublicDefaultConstructorSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithTypesHavingCustomFormatter::", new TypeWithTypesHavingCustomFormatterSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithMyCollectionField::", new TypeWithMyCollectionFieldSerializer()); + _tmp.Add(@"Address::", new AddressSerializer()); + _tmp.Add(@"SerializationTypes.KnownTypesThroughConstructor::", new KnownTypesThroughConstructorSerializer()); + _tmp.Add(@"SerializationTypes.ServerSettings::", new ServerSettingsSerializer()); _tmp.Add(@"SerializationTypes.TypeWithDateTimeStringProperty::", new TypeWithDateTimeStringPropertySerializer()); + _tmp.Add(@"Vehicle::", new VehicleSerializer()); + _tmp.Add(@"TypeWithTimeSpanProperty::", new TypeWithTimeSpanPropertySerializer()); + _tmp.Add(@"SerializationTypes.ItemChoiceType::", new ItemChoiceTypeSerializer()); + _tmp.Add(@"SerializationTypes.DerivedClassWithSameProperty2::", new DerivedClassWithSameProperty2Serializer()); + _tmp.Add(@"Outer+Person::", new PersonSerializer()); + _tmp.Add(@"MyCollection1::", new MyCollection1Serializer()); + _tmp.Add(@"SerializationTypes.MoreChoices::", new MoreChoicesSerializer()); + _tmp.Add(@"AliasedTestType::", new AliasedTestTypeSerializer()); + _tmp.Add(@"Orchestra::", new OrchestraSerializer()); + _tmp.Add(@"SerializationTypes.ShortEnum::", new ShortEnumSerializer()); + _tmp.Add(@"Trumpet::", new TrumpetSerializer()); _tmp.Add(@"XElementStruct::", new XElementStructSerializer()); - _tmp.Add(@"SerializationTypes.SomeStruct::", new SomeStructSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithAnyAttribute::", new TypeWithAnyAttributeSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithXmlSchemaFormAttribute:::True:", new TypeWithXmlSchemaFormAttributeSerializer()); - _tmp.Add(@"SerializationTypes.TypeB::", new TypeBSerializer()); - _tmp.Add(@"SerializationTypes.SimpleType::", new SimpleTypeSerializer()); - _tmp.Add(@"SerializationTypes.MyList::", new MyListSerializer()); - _tmp.Add(@"SerializationTypes.SimpleDC::", new SimpleDCSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithTypesHavingCustomFormatter::", new TypeWithTypesHavingCustomFormatterSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithEnumFlagPropertyHavingDefaultValue::", new TypeWithEnumFlagPropertyHavingDefaultValueSerializer()); + _tmp.Add(@"SerializationTypes.ComplexChoiceB::", new ComplexChoiceBSerializer()); + _tmp.Add(@"MsgDocumentType:http://example.com:Document:True:", new MsgDocumentTypeSerializer()); _tmp.Add(@"SerializationTypes.MyEnum::", new MyEnumSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithGetOnlyArrayProperties::", new TypeWithGetOnlyArrayPropertiesSerializer()); - _tmp.Add(@"SerializationTypes.StructNotSerializable::", new StructNotSerializableSerializer()); - _tmp.Add(@"SerializationTypes.NamespaceTypeNameClashContainer::Root:True:", new NamespaceTypeNameClashContainerSerializer()); - _tmp.Add(@"SerializationTypes.BuiltInTypes::", new BuiltInTypesSerializer()); + _tmp.Add(@"OrderedItem::", new OrderedItemSerializer()); + _tmp.Add(@"TypeWithBinaryProperty::", new TypeWithBinaryPropertySerializer()); + _tmp.Add(@"TypeWithDefaultTimeSpanProperty::", new TypeWithDefaultTimeSpanPropertySerializer()); + _tmp.Add(@"Brass::", new BrassSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithPropertiesHavingDefaultValue::", new TypeWithPropertiesHavingDefaultValueSerializer()); _tmp.Add(@"RootClass::", new RootClassSerializer()); + _tmp.Add(@"DerivedClass1::", new DerivedClass1Serializer()); + _tmp.Add(@"SerializationTypes.TypeWithShouldSerializeMethod::", new TypeWithShouldSerializeMethodSerializer()); + _tmp.Add(@"SerializationTypes.DCClassWithEnumAndStruct::", new DCClassWithEnumAndStructSerializer()); _tmp.Add(@"SerializationTypes.SByteEnum::", new SByteEnumSerializer()); + _tmp.Add(@"Pet::", new PetSerializer()); + _tmp.Add(@"SerializationTypes.ULongEnum::", new ULongEnumSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithXmlSchemaFormAttribute:::True:", new TypeWithXmlSchemaFormAttributeSerializer()); + _tmp.Add(@"BaseClass::", new BaseClassSerializer()); + _tmp.Add(@"TypeWithMismatchBetweenAttributeAndPropertyType::RootElement:True:", new TypeWithMismatchBetweenAttributeAndPropertyTypeSerializer()); + _tmp.Add(@"Parameter::", new ParameterSerializer()); + _tmp.Add(@"SerializationTypes.KnownTypesThroughConstructorWithArrayProperties::", new KnownTypesThroughConstructorWithArrayPropertiesSerializer()); + _tmp.Add(@"SerializationTypes.TypeNameClashA.TypeNameClash::", new TypeNameClashSerializer1()); + _tmp.Add(@"SerializationTypes.BuiltInTypes::", new BuiltInTypesSerializer()); + _tmp.Add(@"TypeWithDateTimeOffsetProperties::", new TypeWithDateTimeOffsetPropertiesSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithPropertyHavingComplexChoice::", new TypeWithPropertyHavingComplexChoiceSerializer()); + _tmp.Add(@"SerializationTypes.DerivedClassWithSameProperty::", new DerivedClassWithSamePropertySerializer()); + _tmp.Add(@"SerializationTypes.TypeWithGetOnlyArrayProperties::", new TypeWithGetOnlyArrayPropertiesSerializer()); + _tmp.Add(@"SerializationTypes.WithEnums::", new WithEnumsSerializer()); + _tmp.Add(@"SerializationTypes.__TypeNameWithSpecialCharacters漢ñ::", new __TypeNameWithSpecialCharacters漢ñSerializer()); + _tmp.Add(@"SerializationTypes.SimpleType::", new SimpleTypeSerializer()); + _tmp.Add(@"SerializationTypes.TypeWith2DArrayProperty2::", new TypeWith2DArrayProperty2Serializer()); + _tmp.Add(@"SerializationTypes.WithStruct::", new WithStructSerializer()); + _tmp.Add(@"DefaultValuesSetToPositiveInfinity::", new DefaultValuesSetToPositiveInfinitySerializer()); _tmp.Add(@"XElementWrapper::", new XElementWrapperSerializer()); - _tmp.Add(@"SerializationTypes.DCStruct::", new DCStructSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithPropertyNameSpecified::", new TypeWithPropertyNameSpecifiedSerializer()); + _tmp.Add(@"SerializationTypes.TypeB::", new TypeBSerializer()); + _tmp.Add(@"DefaultValuesSetToNaN::", new DefaultValuesSetToNaNSerializer()); + _tmp.Add(@"Employee::", new EmployeeSerializer()); + _tmp.Add(@"SerializationTypes.SomeStruct::", new SomeStructSerializer()); _tmp.Add(@"SerializationTypes.TypeWithXmlTextAttributeOnArray:http://schemas.xmlsoap.org/ws/2005/04/discovery::False:", new TypeWithXmlTextAttributeOnArraySerializer()); - _tmp.Add(@"SerializationTypes.KnownTypesThroughConstructor::", new KnownTypesThroughConstructorSerializer()); - _tmp.Add(@"SerializationTypes.DerivedClassWithSameProperty::", new DerivedClassWithSamePropertySerializer()); - _tmp.Add(@"SerializationTypes.DCClassWithEnumAndStruct::", new DCClassWithEnumAndStructSerializer()); - _tmp.Add(@"DogBreed::", new DogBreedSerializer()); - _tmp.Add(@"SerializationTypes.DerivedClassWithSameProperty2::", new DerivedClassWithSameProperty2Serializer()); _tmp.Add(@"SerializationTypes.TypeWithFieldsOrdered::", new TypeWithFieldsOrderedSerializer()); - _tmp.Add(@"DefaultValuesSetToNegativeInfinity::", new DefaultValuesSetToNegativeInfinitySerializer()); - _tmp.Add(@"Dog::", new DogSerializer()); - _tmp.Add(@"TypeWithXmlNodeArrayProperty:::True:", new TypeWithXmlNodeArrayPropertySerializer()); - _tmp.Add(@"SerializationTypes.TypeWithEnumPropertyHavingDefaultValue::", new TypeWithEnumPropertyHavingDefaultValueSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithEnumFlagPropertyHavingDefaultValue::", new TypeWithEnumFlagPropertyHavingDefaultValueSerializer()); - _tmp.Add(@"SerializationTypes.WithNullables::", new WithNullablesSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithSchemaFormInXmlAttribute::", new TypeWithSchemaFormInXmlAttributeSerializer()); + _tmp.Add(@"SerializationTypes.ClassImplementsInterface::", new ClassImplementsInterfaceSerializer()); _tmp.Add(@"SerializationTypes.TypeNameClashB.TypeNameClash::", new TypeNameClashSerializer()); - _tmp.Add(@"SerializationTypes.ByteEnum::", new ByteEnumSerializer()); - _tmp.Add(@"DefaultValuesSetToNaN::", new DefaultValuesSetToNaNSerializer()); - _tmp.Add(@"Orchestra::", new OrchestraSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithArrayPropertyHavingChoice::", new TypeWithArrayPropertyHavingChoiceSerializer()); - _tmp.Add(@"Parameter::", new ParameterSerializer()); - _tmp.Add(@"SerializationTypes.EnumFlags::", new EnumFlagsSerializer()); - _tmp.Add(@"SerializationTypes.KnownTypesThroughConstructorWithValue::", new KnownTypesThroughConstructorWithValueSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithPropertiesHavingDefaultValue::", new TypeWithPropertiesHavingDefaultValueSerializer()); - _tmp.Add(@"SerializationTypes.LongEnum::", new LongEnumSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithShouldSerializeMethod::", new TypeWithShouldSerializeMethodSerializer()); - _tmp.Add(@"SerializationTypes.TypeHasArrayOfASerializedAsB::", new TypeHasArrayOfASerializedAsBSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithReadOnlyMyCollectionProperty::", new TypeWithReadOnlyMyCollectionPropertySerializer()); + _tmp.Add(@"SerializationTypes.BaseClassWithSamePropertyName::", new BaseClassWithSamePropertyNameSerializer()); + _tmp.Add(@"Group::", new GroupSerializer()); if (typedSerializers == null) typedSerializers = _tmp; } return typedSerializers; @@ -15952,6 +16862,7 @@ public override System.Boolean CanSerialize(System.Type type) { if (type == typeof(global::SerializationTypes.SimpleType)) return true; if (type == typeof(global::SerializationTypes.TypeWithGetSetArrayMembers)) return true; if (type == typeof(global::SerializationTypes.TypeWithGetOnlyArrayProperties)) return true; + if (type == typeof(global::SerializationTypes.TypeWithArraylikeMembers)) return true; if (type == typeof(global::SerializationTypes.StructNotSerializable)) return true; if (type == typeof(global::SerializationTypes.TypeWithMyCollectionField)) return true; if (type == typeof(global::SerializationTypes.TypeWithReadOnlyMyCollectionProperty)) return true; @@ -16007,7 +16918,10 @@ public override System.Boolean CanSerialize(System.Type type) { if (type == typeof(global::SerializationTypes.KnownTypesThroughConstructorWithValue)) return true; if (type == typeof(global::SerializationTypes.TypeWithTypesHavingCustomFormatter)) return true; if (type == typeof(global::SerializationTypes.TypeWithArrayPropertyHavingChoice)) return true; + if (type == typeof(global::SerializationTypes.TypeWithPropertyHavingComplexChoice)) return true; if (type == typeof(global::SerializationTypes.MoreChoices)) return true; + if (type == typeof(global::SerializationTypes.ComplexChoiceA)) return true; + if (type == typeof(global::SerializationTypes.ComplexChoiceB)) return true; if (type == typeof(global::SerializationTypes.TypeWithFieldsOrdered)) return true; if (type == typeof(global::SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName)) return true; if (type == typeof(global::SerializationTypes.NamespaceTypeNameClashContainer)) return true; @@ -16060,6 +16974,7 @@ public override System.Xml.Serialization.XmlSerializer GetSerializer(System.Type if (type == typeof(global::SerializationTypes.SimpleType)) return new SimpleTypeSerializer(); if (type == typeof(global::SerializationTypes.TypeWithGetSetArrayMembers)) return new TypeWithGetSetArrayMembersSerializer(); if (type == typeof(global::SerializationTypes.TypeWithGetOnlyArrayProperties)) return new TypeWithGetOnlyArrayPropertiesSerializer(); + if (type == typeof(global::SerializationTypes.TypeWithArraylikeMembers)) return new TypeWithArraylikeMembersSerializer(); if (type == typeof(global::SerializationTypes.StructNotSerializable)) return new StructNotSerializableSerializer(); if (type == typeof(global::SerializationTypes.TypeWithMyCollectionField)) return new TypeWithMyCollectionFieldSerializer(); if (type == typeof(global::SerializationTypes.TypeWithReadOnlyMyCollectionProperty)) return new TypeWithReadOnlyMyCollectionPropertySerializer(); @@ -16115,7 +17030,10 @@ public override System.Xml.Serialization.XmlSerializer GetSerializer(System.Type if (type == typeof(global::SerializationTypes.KnownTypesThroughConstructorWithValue)) return new KnownTypesThroughConstructorWithValueSerializer(); if (type == typeof(global::SerializationTypes.TypeWithTypesHavingCustomFormatter)) return new TypeWithTypesHavingCustomFormatterSerializer(); if (type == typeof(global::SerializationTypes.TypeWithArrayPropertyHavingChoice)) return new TypeWithArrayPropertyHavingChoiceSerializer(); + if (type == typeof(global::SerializationTypes.TypeWithPropertyHavingComplexChoice)) return new TypeWithPropertyHavingComplexChoiceSerializer(); if (type == typeof(global::SerializationTypes.MoreChoices)) return new MoreChoicesSerializer(); + if (type == typeof(global::SerializationTypes.ComplexChoiceA)) return new ComplexChoiceASerializer(); + if (type == typeof(global::SerializationTypes.ComplexChoiceB)) return new ComplexChoiceBSerializer(); if (type == typeof(global::SerializationTypes.TypeWithFieldsOrdered)) return new TypeWithFieldsOrderedSerializer(); if (type == typeof(global::SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName)) return new TypeWithKnownTypesOfCollectionsWithConflictingXmlNameSerializer(); if (type == typeof(global::SerializationTypes.NamespaceTypeNameClashContainer)) return new NamespaceTypeNameClashContainerSerializer(); diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System.Diagnostics.DiagnosticSource.csproj b/src/libraries/System.Diagnostics.DiagnosticSource/src/System.Diagnostics.DiagnosticSource.csproj index 2316c532efb58b..f110b765c8adcd 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System.Diagnostics.DiagnosticSource.csproj +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System.Diagnostics.DiagnosticSource.csproj @@ -25,7 +25,7 @@ System.Diagnostics.DiagnosticSource - + diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivitySource.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivitySource.cs index ebaddab4ec80cc..f82e54e65d5b5e 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivitySource.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivitySource.cs @@ -407,105 +407,94 @@ internal void NotifyActivityAddException(Activity activity, Exception exception, } } - // SynchronizedList is a helper collection which ensure thread safety on the collection - // and allow enumerating the collection items and execute some action on the enumerated item and can detect any change in the collection - // during the enumeration which force restarting the enumeration again. - // Caution: We can have the action executed on the same item more than once which is ok in our scenarios. + // This class uses a copy-on-write design to ensure thread safety all operations are thread safe. + // However, it is possible for read-only operations to see stale versions of the item while a change + // is occurring. internal sealed class SynchronizedList { - private readonly List _list; - private uint _version; - - public SynchronizedList() => _list = new List(); + private readonly object _writeLock; + // This array must not be mutated directly. To mutate, obtain the lock, copy the array and then replace it with the new array. + private T[] _volatileArray; + public SynchronizedList() + { + _volatileArray = []; + _writeLock = new(); + } public void Add(T item) { - lock (_list) + lock (_writeLock) { - _list.Add(item); - _version++; + T[] newArray = new T[_volatileArray.Length + 1]; + + Array.Copy(_volatileArray, newArray, _volatileArray.Length);// copy existing items + newArray[_volatileArray.Length] = item;// copy new item + + _volatileArray = newArray; } } public bool AddIfNotExist(T item) { - lock (_list) + lock (_writeLock) { - if (!_list.Contains(item)) + int index = Array.IndexOf(_volatileArray, item); + + if (index >= 0) { - _list.Add(item); - _version++; - return true; + return false; } - return false; + + T[] newArray = new T[_volatileArray.Length + 1]; + + Array.Copy(_volatileArray, newArray, _volatileArray.Length);// copy existing items + newArray[_volatileArray.Length] = item;// copy new item + + _volatileArray = newArray; + + return true; } } public bool Remove(T item) { - lock (_list) + lock (_writeLock) { - if (_list.Remove(item)) + int index = Array.IndexOf(_volatileArray, item); + + if (index < 0) { - _version++; - return true; + return false; } - return false; + + T[] newArray = new T[_volatileArray.Length - 1]; + + Array.Copy(_volatileArray, newArray, index);// copy existing items before index + + Array.Copy( + _volatileArray, index + 1, // position after the index, skipping it + newArray, index, _volatileArray.Length - index - 1// remaining items accounting for removed item + ); + + _volatileArray = newArray; + return true; } } - public int Count => _list.Count; + public int Count => _volatileArray.Length; public void EnumWithFunc(ActivitySource.Function func, ref ActivityCreationOptions data, ref ActivitySamplingResult samplingResult, ref ActivityCreationOptions dataWithContext) { - uint version = _version; - int index = 0; - - while (index < _list.Count) + foreach (T item in _volatileArray) { - T item; - lock (_list) - { - if (version != _version) - { - version = _version; - index = 0; - continue; - } - - item = _list[index]; - index++; - } - - // Important to call the func outside the lock. - // This is the whole point we are having this wrapper class. func(item, ref data, ref samplingResult, ref dataWithContext); } } public void EnumWithAction(Action action, object arg) { - uint version = _version; - int index = 0; - - while (index < _list.Count) + foreach (T item in _volatileArray) { - T item; - lock (_list) - { - if (version != _version) - { - version = _version; - index = 0; - continue; - } - - item = _list[index]; - index++; - } - - // Important to call the action outside the lock. - // This is the whole point we are having this wrapper class. action(item, arg); } } @@ -517,27 +506,8 @@ public void EnumWithExceptionNotification(Activity activity, Exception exception return; } - uint version = _version; - int index = 0; - - while (index < _list.Count) + foreach (T item in _volatileArray) { - T item; - lock (_list) - { - if (version != _version) - { - version = _version; - index = 0; - continue; - } - - item = _list[index]; - index++; - } - - // Important to notify outside the lock. - // This is the whole point we are having this wrapper class. (item as ActivityListener)!.ExceptionRecorder?.Invoke(activity, exception, ref tags); } } diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/tests/HttpHandlerDiagnosticListenerTests.cs b/src/libraries/System.Diagnostics.DiagnosticSource/tests/HttpHandlerDiagnosticListenerTests.cs index 0c23059c17ae88..ecfe219e072843 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/tests/HttpHandlerDiagnosticListenerTests.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/tests/HttpHandlerDiagnosticListenerTests.cs @@ -145,6 +145,7 @@ public async Task TestBasicReceiveAndResponseEvents() } } + [ActiveIssue("https://github.com/dotnet/runtime/issues/112792")] [OuterLoop] [ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] public void TestW3CHeaders() @@ -194,6 +195,7 @@ public void TestW3CHeadersTraceStateAndCorrelationContext() { using (var eventRecords = new EventObserverAndRecorder()) { + Activity.DefaultIdFormat = ActivityIdFormat.W3C; var parent = new Activity("w3c activity"); parent.SetParentId(ActivityTraceId.CreateRandom(), ActivitySpanId.CreateRandom()); parent.TraceStateString = "some=state"; diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreCtx.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreCtx.cs index e1a28506696ccf..fb844377ea4c64 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreCtx.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreCtx.cs @@ -2405,6 +2405,9 @@ protected enum StoreCapabilityMap // Must be called inside of lock(domainInfoLock) protected virtual void LoadDomainInfo() { + const int LdapDefaultPort = 389; + const int LdapsDefaultPort = 636; + GlobalDebug.WriteLineIf(GlobalDebug.Info, "ADStoreCtx", "LoadComputerInfo"); Debug.Assert(this.ctxBase != null); @@ -2418,12 +2421,22 @@ protected virtual void LoadDomainInfo() this.dnsHostName = ADUtils.GetServerName(this.ctxBase); // Pull the requested port number - Uri ldapUri = new Uri(this.ctxBase.Path); - int port = ldapUri.Port != -1 ? ldapUri.Port : (ldapUri.Scheme.ToUpperInvariant() == "LDAPS" ? 636 : 389); + int port = LdapDefaultPort; + if (Uri.TryCreate(ctxBase.Path, UriKind.Absolute, out Uri ldapUri)) + { + if (ldapUri.Port != -1) + { + port = ldapUri.Port; + } + else if (string.Equals(ldapUri.Scheme, "LDAPS", StringComparison.OrdinalIgnoreCase)) + { + port = LdapsDefaultPort; + } + } string dnsDomainName = ""; - using (DirectoryEntry rootDse = new DirectoryEntry("LDAP://" + this.dnsHostName + ":" + port + "/rootDse", "", "", AuthenticationTypes.Anonymous)) + using (DirectoryEntry rootDse = new DirectoryEntry($"LDAP://{this.dnsHostName}:{port}/rootDse", "", "", AuthenticationTypes.Anonymous)) { this.defaultNamingContext = (string)rootDse.Properties["defaultNamingContext"][0]; this.contextBasePartitionDN = this.defaultNamingContext; diff --git a/src/libraries/System.DirectoryServices.Protocols/ref/System.DirectoryServices.Protocols.cs b/src/libraries/System.DirectoryServices.Protocols/ref/System.DirectoryServices.Protocols.cs index 32262da81be3e2..126be30b3ddb26 100644 --- a/src/libraries/System.DirectoryServices.Protocols/ref/System.DirectoryServices.Protocols.cs +++ b/src/libraries/System.DirectoryServices.Protocols/ref/System.DirectoryServices.Protocols.cs @@ -382,6 +382,8 @@ public partial class LdapSessionOptions internal LdapSessionOptions() { } public bool AutoReconnect { get { throw null; } set { } } public string DomainName { get { throw null; } set { } } + [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("windows")] + public string TrustedCertificatesDirectory { get { throw null; } set { } } public string HostName { get { throw null; } set { } } public bool HostReachable { get { throw null; } } public System.DirectoryServices.Protocols.LocatorFlags LocatorFlag { get { throw null; } set { } } @@ -402,6 +404,8 @@ internal LdapSessionOptions() { } public bool Signing { get { throw null; } set { } } public System.DirectoryServices.Protocols.SecurityPackageContextConnectionInformation SslInformation { get { throw null; } } public int SspiFlag { get { throw null; } set { } } + [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("windows")] + public void StartNewTlsSessionContext() { } public bool TcpKeepAlive { get { throw null; } set { } } public System.DirectoryServices.Protocols.VerifyServerCertificateCallback VerifyServerCertificate { get { throw null; } set { } } public void FastConcurrentBind() { } diff --git a/src/libraries/System.DirectoryServices.Protocols/src/CompatibilitySuppressions.xml b/src/libraries/System.DirectoryServices.Protocols/src/CompatibilitySuppressions.xml new file mode 100644 index 00000000000000..2647f901c1a47e --- /dev/null +++ b/src/libraries/System.DirectoryServices.Protocols/src/CompatibilitySuppressions.xml @@ -0,0 +1,67 @@ + + + + + CP0002 + M:System.DirectoryServices.Protocols.LdapSessionOptions.get_TrustedCertificatesDirectory + lib/net8.0/System.DirectoryServices.Protocols.dll + lib/net8.0/System.DirectoryServices.Protocols.dll + true + + + CP0002 + M:System.DirectoryServices.Protocols.LdapSessionOptions.set_TrustedCertificatesDirectory(System.String) + lib/net8.0/System.DirectoryServices.Protocols.dll + lib/net8.0/System.DirectoryServices.Protocols.dll + true + + + CP0002 + M:System.DirectoryServices.Protocols.LdapSessionOptions.StartNewTlsSessionContext + lib/net8.0/System.DirectoryServices.Protocols.dll + lib/net8.0/System.DirectoryServices.Protocols.dll + true + + + CP0002 + M:System.DirectoryServices.Protocols.LdapSessionOptions.get_TrustedCertificatesDirectory + lib/net9.0/System.DirectoryServices.Protocols.dll + lib/net9.0/System.DirectoryServices.Protocols.dll + true + + + CP0002 + M:System.DirectoryServices.Protocols.LdapSessionOptions.set_TrustedCertificatesDirectory(System.String) + lib/net9.0/System.DirectoryServices.Protocols.dll + lib/net9.0/System.DirectoryServices.Protocols.dll + true + + + CP0002 + M:System.DirectoryServices.Protocols.LdapSessionOptions.StartNewTlsSessionContext + lib/net9.0/System.DirectoryServices.Protocols.dll + lib/net9.0/System.DirectoryServices.Protocols.dll + true + + + CP0002 + M:System.DirectoryServices.Protocols.LdapSessionOptions.get_TrustedCertificatesDirectory + lib/netstandard2.0/System.DirectoryServices.Protocols.dll + lib/netstandard2.0/System.DirectoryServices.Protocols.dll + true + + + CP0002 + M:System.DirectoryServices.Protocols.LdapSessionOptions.set_TrustedCertificatesDirectory(System.String) + lib/netstandard2.0/System.DirectoryServices.Protocols.dll + lib/netstandard2.0/System.DirectoryServices.Protocols.dll + true + + + CP0002 + M:System.DirectoryServices.Protocols.LdapSessionOptions.StartNewTlsSessionContext + lib/netstandard2.0/System.DirectoryServices.Protocols.dll + lib/netstandard2.0/System.DirectoryServices.Protocols.dll + true + + \ No newline at end of file diff --git a/src/libraries/System.DirectoryServices.Protocols/src/Resources/Strings.resx b/src/libraries/System.DirectoryServices.Protocols/src/Resources/Strings.resx index b63f103619fbdb..1f6c9734a7384c 100644 --- a/src/libraries/System.DirectoryServices.Protocols/src/Resources/Strings.resx +++ b/src/libraries/System.DirectoryServices.Protocols/src/Resources/Strings.resx @@ -426,4 +426,7 @@ Only ReferralChasingOptions.None and ReferralChasingOptions.All are supported on Linux. + + The directory '{0}' does not exist. + \ No newline at end of file diff --git a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapConnection.cs b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapConnection.cs index 1125bfd568d385..facdfc6a484bb9 100644 --- a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapConnection.cs +++ b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapConnection.cs @@ -955,13 +955,13 @@ private unsafe Interop.BOOL ProcessClientCertificate(IntPtr ldapHandle, IntPtr C private void Connect() { - //Ccurrently ldap does not accept more than one certificate. + // Currently ldap does not accept more than one certificate. if (ClientCertificates.Count > 1) { throw new InvalidOperationException(SR.InvalidClientCertificates); } - // Set the certificate callback routine here if user adds the certifcate to the certificate collection. + // Set the certificate callback routine here if user adds the certificate to the certificate collection. if (ClientCertificates.Count != 0) { int certError = LdapPal.SetClientCertOption(_ldapHandle, LdapOption.LDAP_OPT_CLIENT_CERTIFICATE, _clientCertificateRoutine); diff --git a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Linux.cs b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Linux.cs index e1cfffebb531fc..5059c40499d5c6 100644 --- a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Linux.cs +++ b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Linux.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.ComponentModel; +using System.IO; +using System.Runtime.Versioning; namespace System.DirectoryServices.Protocols { @@ -11,6 +13,34 @@ public partial class LdapSessionOptions private bool _secureSocketLayer; + /// + /// Specifies the path of the directory containing CA certificates in the PEM format. + /// Multiple directories may be specified by separating with a semi-colon. + /// + /// + /// The certificate files are looked up by the CA subject name hash value where that hash can be + /// obtained by using, for example, openssl x509 -hash -noout -in CA.crt. + /// It is a common practice to have the certificate file be a symbolic link to the actual certificate file + /// which can be done by using openssl rehash . or c_rehash . in the directory + /// containing the certificate files. + /// + /// The directory not exist. + [UnsupportedOSPlatform("windows")] + public string TrustedCertificatesDirectory + { + get => GetStringValueHelper(LdapOption.LDAP_OPT_X_TLS_CACERTDIR, releasePtr: true); + + set + { + if (!Directory.Exists(value)) + { + throw new DirectoryNotFoundException(SR.Format(SR.DirectoryNotFound, value)); + } + + SetStringOptionHelper(LdapOption.LDAP_OPT_X_TLS_CACERTDIR, value); + } + } + public bool SecureSocketLayer { get @@ -52,6 +82,16 @@ public ReferralChasingOptions ReferralChasing } } + /// + /// Create a new TLS library context. + /// Calling this is necessary after setting TLS-based options, such as TrustedCertificatesDirectory. + /// + [UnsupportedOSPlatform("windows")] + public void StartNewTlsSessionContext() + { + SetIntValueHelper(LdapOption.LDAP_OPT_X_TLS_NEWCTX, 0); + } + private bool GetBoolValueHelper(LdapOption option) { if (_connection._disposed) throw new ObjectDisposedException(GetType().Name); @@ -71,5 +111,14 @@ private void SetBoolValueHelper(LdapOption option, bool value) ErrorChecking.CheckAndSetLdapError(error); } + + private void SetStringOptionHelper(LdapOption option, string value) + { + if (_connection._disposed) throw new ObjectDisposedException(GetType().Name); + + int error = LdapPal.SetStringOption(_connection._ldapHandle, option, value); + + ErrorChecking.CheckAndSetLdapError(error); + } } } diff --git a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Windows.cs b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Windows.cs index 813005c5ecb72b..cc73449104adf4 100644 --- a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Windows.cs +++ b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Windows.cs @@ -10,6 +10,13 @@ public partial class LdapSessionOptions { private static void PALCertFreeCRLContext(IntPtr certPtr) => Interop.Ldap.CertFreeCRLContext(certPtr); + [UnsupportedOSPlatform("windows")] + public string TrustedCertificatesDirectory + { + get => throw new PlatformNotSupportedException(); + set => throw new PlatformNotSupportedException(); + } + public bool SecureSocketLayer { get @@ -24,6 +31,9 @@ public bool SecureSocketLayer } } + [UnsupportedOSPlatform("windows")] + public void StartNewTlsSessionContext() => throw new PlatformNotSupportedException(); + public int ProtocolVersion { get => GetIntValueHelper(LdapOption.LDAP_OPT_VERSION); diff --git a/src/libraries/System.DirectoryServices.Protocols/tests/DirectoryServicesProtocolsTests.cs b/src/libraries/System.DirectoryServices.Protocols/tests/DirectoryServicesProtocolsTests.cs index 00433bae9875c2..05dda66bbda001 100644 --- a/src/libraries/System.DirectoryServices.Protocols/tests/DirectoryServicesProtocolsTests.cs +++ b/src/libraries/System.DirectoryServices.Protocols/tests/DirectoryServicesProtocolsTests.cs @@ -2,12 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; -using System.Diagnostics; using System.DirectoryServices.Tests; using System.Globalization; +using System.IO; using System.Net; -using System.Text; -using System.Threading; using Xunit; namespace System.DirectoryServices.Protocols.Tests @@ -16,6 +14,7 @@ public partial class DirectoryServicesProtocolsTests { internal static bool LdapConfigurationExists => LdapConfiguration.Configuration != null; internal static bool IsActiveDirectoryServer => LdapConfigurationExists && LdapConfiguration.Configuration.IsActiveDirectoryServer; + internal static bool UseTls => LdapConfigurationExists && LdapConfiguration.Configuration.UseTls; internal static bool IsServerSideSortSupported => LdapConfigurationExists && LdapConfiguration.Configuration.SupportsServerSideSort; @@ -706,6 +705,64 @@ public void TestMultipleServerBind() connection.Timeout = new TimeSpan(0, 3, 0); } +#if NET + [ConditionalFact(nameof(UseTls))] + [PlatformSpecific(TestPlatforms.Linux)] + public void StartNewTlsSessionContext() + { + using (var connection = GetConnection(bind: false)) + { + // We use "." as the directory since it must be a valid directory for StartNewTlsSessionContext() + Bind() to be successful even + // though there are no client certificates in ".". + connection.SessionOptions.TrustedCertificatesDirectory = "."; + + // For a real-world scenario, we would call 'StartTransportLayerSecurity(null)' here which would do the TLS handshake including + // providing the client certificate to the server and validating the server certificate. However, this requires additional + // setup that we don't have including trusting the server certificate and by specifying "demand" in the setup of the server + // via 'LDAP_TLS_VERIFY_CLIENT=demand' to force the TLS handshake to occur. + + connection.SessionOptions.StartNewTlsSessionContext(); + connection.Bind(); + + SearchRequest searchRequest = new (LdapConfiguration.Configuration.SearchDn, "(objectClass=*)", SearchScope.Subtree); + _ = (SearchResponse)connection.SendRequest(searchRequest); + } + } + + [ConditionalFact(nameof(UseTls))] + [PlatformSpecific(TestPlatforms.Linux)] + public void StartNewTlsSessionContext_ThrowsLdapException() + { + using (var connection = GetConnection(bind: false)) + { + // Create a new session context without setting TrustedCertificatesDirectory. + connection.SessionOptions.StartNewTlsSessionContext(); + Assert.Throws(() => connection.Bind()); + } + } + + [ConditionalFact(nameof(LdapConfigurationExists))] + [PlatformSpecific(TestPlatforms.Linux)] + public void TrustedCertificatesDirectory_ThrowsDirectoryNotFoundException() + { + using (var connection = GetConnection(bind: false)) + { + Assert.Throws(() => connection.SessionOptions.TrustedCertificatesDirectory = "nonexistent"); + } + } + + [ConditionalFact(nameof(LdapConfigurationExists))] + [PlatformSpecific(TestPlatforms.Windows)] + public void StartNewTlsSessionContext_ThrowsPlatformNotSupportedException() + { + using (var connection = new LdapConnection("server")) + { + LdapSessionOptions options = connection.SessionOptions; + Assert.Throws(() => options.StartNewTlsSessionContext()); + } + } +#endif + private void DeleteAttribute(LdapConnection connection, string entryDn, string attributeName) { string dn = entryDn + "," + LdapConfiguration.Configuration.SearchDn; @@ -786,24 +843,24 @@ private SearchResultEntry SearchUser(LdapConnection connection, string rootDn, s return null; } - private LdapConnection GetConnection(string server) + private static LdapConnection GetConnection(string server) { LdapDirectoryIdentifier directoryIdentifier = new LdapDirectoryIdentifier(server, fullyQualifiedDnsHostName: true, connectionless: false); return GetConnection(directoryIdentifier); } - private LdapConnection GetConnection() + private static LdapConnection GetConnection(bool bind = true) { LdapDirectoryIdentifier directoryIdentifier = string.IsNullOrEmpty(LdapConfiguration.Configuration.Port) ? new LdapDirectoryIdentifier(LdapConfiguration.Configuration.ServerName, fullyQualifiedDnsHostName: true, connectionless: false) : new LdapDirectoryIdentifier(LdapConfiguration.Configuration.ServerName, int.Parse(LdapConfiguration.Configuration.Port, NumberStyles.None, CultureInfo.InvariantCulture), fullyQualifiedDnsHostName: true, connectionless: false); - return GetConnection(directoryIdentifier); + return GetConnection(directoryIdentifier, bind); } - private static LdapConnection GetConnection(LdapDirectoryIdentifier directoryIdentifier) + private static LdapConnection GetConnection(LdapDirectoryIdentifier directoryIdentifier, bool bind = true) { NetworkCredential credential = new NetworkCredential(LdapConfiguration.Configuration.UserName, LdapConfiguration.Configuration.Password); @@ -816,7 +873,11 @@ private static LdapConnection GetConnection(LdapDirectoryIdentifier directoryIde // to LDAP v2, which we do not support, and will return LDAP_PROTOCOL_ERROR connection.SessionOptions.ProtocolVersion = 3; connection.SessionOptions.SecureSocketLayer = LdapConfiguration.Configuration.UseTls; - connection.Bind(); + + if (bind) + { + connection.Bind(); + } connection.Timeout = new TimeSpan(0, 3, 0); return connection; diff --git a/src/libraries/System.DirectoryServices.Protocols/tests/LdapSessionOptionsTests.cs b/src/libraries/System.DirectoryServices.Protocols/tests/LdapSessionOptionsTests.cs index 5f6a737834ac23..2a8ab23a16d421 100644 --- a/src/libraries/System.DirectoryServices.Protocols/tests/LdapSessionOptionsTests.cs +++ b/src/libraries/System.DirectoryServices.Protocols/tests/LdapSessionOptionsTests.cs @@ -7,6 +7,8 @@ namespace System.DirectoryServices.Protocols.Tests { + // To enable these tests locally for Mono, comment out this line in DirectoryServicesTestHelpers.cs: + // [assembly: ActiveIssue("https://github.com/dotnet/runtime/issues/35912", TestRuntimes.Mono)] [ConditionalClass(typeof(DirectoryServicesTestHelpers), nameof(DirectoryServicesTestHelpers.IsWindowsOrLibLdapIsInstalled))] public class LdapSessionOptionsTests { @@ -27,6 +29,7 @@ public void ReferralChasing_Set_GetReturnsExpected_On_Windows(ReferralChasingOpt } [Theory] + [ActiveIssue("https://github.com/dotnet/runtime/issues/112146")] [PlatformSpecific(TestPlatforms.Linux)] [InlineData(ReferralChasingOptions.None)] [InlineData(ReferralChasingOptions.All)] @@ -756,5 +759,32 @@ public void StopTransportLayerSecurity_Disposed_ThrowsObjectDisposedException() Assert.Throws(() => connection.SessionOptions.StopTransportLayerSecurity()); } + +#if NET + [Fact] + [PlatformSpecific(TestPlatforms.Linux)] + public void CertificateDirectoryProperty() + { + using (var connection = new LdapConnection("server")) + { + LdapSessionOptions options = connection.SessionOptions; + Assert.Null(options.TrustedCertificatesDirectory); + + options.TrustedCertificatesDirectory = "."; + Assert.Equal(".", options.TrustedCertificatesDirectory); + } + } + + [Fact] + [PlatformSpecific(TestPlatforms.Windows)] + public void CertificateDirectoryProperty_ThrowsPlatformNotSupportedException() + { + using (var connection = new LdapConnection("server")) + { + LdapSessionOptions options = connection.SessionOptions; + Assert.Throws(() => options.TrustedCertificatesDirectory = "CertificateDirectory"); + } + } +#endif } } diff --git a/src/libraries/System.Formats.Asn1/src/System/Formats/Asn1/AsnDecoder.Sequence.cs b/src/libraries/System.Formats.Asn1/src/System/Formats/Asn1/AsnDecoder.Sequence.cs index f66ffcb85ad1a6..7b26e725de3e85 100644 --- a/src/libraries/System.Formats.Asn1/src/System/Formats/Asn1/AsnDecoder.Sequence.cs +++ b/src/libraries/System.Formats.Asn1/src/System/Formats/Asn1/AsnDecoder.Sequence.cs @@ -75,7 +75,7 @@ public static void ReadSequence( if (length.HasValue) { - if (length.Value + headerLength > source.Length) + if (length.Value > source.Length - headerLength) { throw GetValidityException(LengthValidity.LengthExceedsInput); } diff --git a/src/libraries/System.Formats.Asn1/tests/Decoder/ReadEncodedValueTests.cs b/src/libraries/System.Formats.Asn1/tests/Decoder/ReadEncodedValueTests.cs new file mode 100644 index 00000000000000..82f8afc382771e --- /dev/null +++ b/src/libraries/System.Formats.Asn1/tests/Decoder/ReadEncodedValueTests.cs @@ -0,0 +1,237 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Test.Cryptography; +using Xunit; + +namespace System.Formats.Asn1.Tests.Decoder +{ + public sealed class ReadEncodedValueTests + { + [Theory] + [InlineData(AsnEncodingRules.BER)] + [InlineData(AsnEncodingRules.CER)] + [InlineData(AsnEncodingRules.DER)] + public static void ReadEncodedValue_Primitive(AsnEncodingRules ruleSet) + { + // OCTET STRING (6 content bytes) + // NULL + ReadOnlySpan data = + [ + 0x04, 0x06, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, + 0x05, 0x00, + ]; + + ExpectSuccess(data, ruleSet, Asn1Tag.PrimitiveOctetString, 2, 6); + } + + [Theory] + [InlineData(AsnEncodingRules.BER)] + [InlineData(AsnEncodingRules.CER)] + [InlineData(AsnEncodingRules.DER)] + public static void ReadEncodedValue_Indefinite(AsnEncodingRules ruleSet) + { + // CONSTRUCTED OCTET STRING (indefinite) + // OCTET STRING (1 byte) + // OCTET STRING (5 bytes) + // END OF CONTENTS + // NULL + ReadOnlySpan data = + [ + 0x24, 0x80, + 0x04, 0x01, 0x01, + 0x04, 0x05, 0x02, 0x03, 0x04, 0x05, 0x06, + 0x00, 0x00, + 0x05, 0x00, + ]; + + // BER: Indefinite length encoding is OK, no requirements on the contents. + // CER: Indefinite length encoding is required for CONSTRUCTED, the contents are invalid for OCTET STRING, + // but (Try)ReadEncodedValue doesn't pay attention to that. + // DER: Indefinite length encoding is never permitted. + + if (ruleSet == AsnEncodingRules.DER) + { + ExpectFailure(data, ruleSet); + } + else + { + ExpectSuccess(data, ruleSet, Asn1Tag.ConstructedOctetString, 2, 10, indefiniteLength: true); + } + } + + [Theory] + [InlineData(AsnEncodingRules.BER)] + [InlineData(AsnEncodingRules.CER)] + [InlineData(AsnEncodingRules.DER)] + public static void ReadEncodedValue_DefiniteConstructed(AsnEncodingRules ruleSet) + { + // CONSTRUCTED OCTET STRING (11 bytes) + // OCTET STRING (1 byte) + // OCTET STRING (5 bytes) + // NULL + ReadOnlySpan data = + [ + 0x24, 0x0A, + 0x04, 0x01, 0x01, + 0x04, 0x05, 0x02, 0x03, 0x04, 0x05, 0x06, + 0x05, 0x00, + ]; + + // BER: Indefinite length encoding is OK, no requirements on the contents. + // CER: Indefinite length encoding is required for CONSTRUCTED, so fail. + // DER: CONSTRUCTED OCTET STRING is not permitted, but ReadEncodedValue doesn't check for that, + // since the length is in minimal representation, the read is successful + + if (ruleSet == AsnEncodingRules.CER) + { + ExpectFailure(data, ruleSet); + } + else + { + ExpectSuccess(data, ruleSet, Asn1Tag.ConstructedOctetString, 2, 10); + } + } + + [Theory] + [InlineData(AsnEncodingRules.BER)] + [InlineData(AsnEncodingRules.CER)] + [InlineData(AsnEncodingRules.DER)] + public static void ReadEncodedValue_OutOfBoundsLength(AsnEncodingRules ruleSet) + { + // SEQUENCE (3 bytes), but only one byte remains. + ReadOnlySpan data = [0x30, 0x03, 0x00]; + + ExpectFailure(data, ruleSet); + } + + [Theory] + [InlineData(AsnEncodingRules.BER)] + [InlineData(AsnEncodingRules.CER)] + [InlineData(AsnEncodingRules.DER)] + public static void ReadEncodedValue_LargeOutOfBoundsLength(AsnEncodingRules ruleSet) + { + // SEQUENCE (int.MaxValue bytes), but no bytes remain. + ReadOnlySpan data = [0x30, 0x84, 0x7F, 0xFF, 0xFF, 0xFF]; + + ExpectFailure(data, ruleSet); + } + + [Theory] + [InlineData(AsnEncodingRules.BER)] + [InlineData(AsnEncodingRules.CER)] + [InlineData(AsnEncodingRules.DER)] + public static void ReadEncodedValue_ExtremelyLargeLength(AsnEncodingRules ruleSet) + { + if (!Environment.Is64BitProcess) + { + return; + } + + // OCTET STRING ((int.MaxValue - 6) bytes), span will be inflated to make it look valid. + byte[] data = "04847FFFFFF9".HexToByteArray(); + + unsafe + { + fixed (byte* ptr = data) + { + // Verify that the length can be interpreted this large, but that it doesn't read that far. + ReadOnlySpan span = new ReadOnlySpan(ptr, int.MaxValue); + ExpectSuccess(span, ruleSet, Asn1Tag.PrimitiveOctetString, 6, int.MaxValue - 6); + } + } + } + + private static void ExpectSuccess( + ReadOnlySpan data, + AsnEncodingRules ruleSet, + Asn1Tag expectedTag, + int expectedContentOffset, + int expectedContentLength, + bool indefiniteLength = false) + { + Asn1Tag tag; + int contentOffset; + int contentLength; + int bytesConsumed; + + bool read = AsnDecoder.TryReadEncodedValue( + data, + ruleSet, + out tag, + out contentOffset, + out contentLength, + out bytesConsumed); + + Assert.True(read, "AsnDecoder.TryReadEncodedValue unexpectedly returned false"); + Assert.Equal(expectedTag, tag); + Assert.Equal(expectedContentOffset, contentOffset); + Assert.Equal(expectedContentLength, contentLength); + + int expectedBytesConsumed = expectedContentOffset + expectedContentLength + (indefiniteLength ? 2 : 0); + Assert.Equal(expectedBytesConsumed, bytesConsumed); + + contentOffset = contentLength = bytesConsumed = default; + + tag = AsnDecoder.ReadEncodedValue( + data, + ruleSet, + out contentOffset, + out contentLength, + out bytesConsumed); + + Assert.Equal(expectedTag, tag); + Assert.Equal(expectedContentOffset, contentOffset); + Assert.Equal(expectedContentLength, contentLength); + Assert.Equal(expectedBytesConsumed, bytesConsumed); + } + + private static void ExpectFailure(ReadOnlySpan data, AsnEncodingRules ruleSet) + { + Asn1Tag tag; + int contentOffset; + int contentLength; + int bytesConsumed; + + bool read = AsnDecoder.TryReadEncodedValue( + data, + ruleSet, + out tag, + out contentOffset, + out contentLength, + out bytesConsumed); + + Assert.False(read, "AsnDecoder.TryReadEncodedValue unexpectedly returned true"); + Assert.Equal(default, tag); + Assert.Equal(default, contentOffset); + Assert.Equal(default, contentLength); + Assert.Equal(default, bytesConsumed); + + int seed = Environment.CurrentManagedThreadId; + Asn1Tag seedTag = new Asn1Tag(TagClass.Private, seed, (seed & 1) == 0); + tag = seedTag; + contentOffset = contentLength = bytesConsumed = seed; + + try + { + tag = AsnDecoder.ReadEncodedValue( + data, + ruleSet, + out contentOffset, + out contentLength, + out bytesConsumed); + + Assert.Fail("ReadEncodedValue should have thrown AsnContentException"); + } + catch (AsnContentException e) + { + Assert.IsType(e); + } + + Assert.Equal(seedTag, tag); + Assert.Equal(seed, contentOffset); + Assert.Equal(seed, contentLength); + Assert.Equal(seed, bytesConsumed); + } + } +} diff --git a/src/libraries/System.Formats.Asn1/tests/Reader/ReadSequence.cs b/src/libraries/System.Formats.Asn1/tests/Reader/ReadSequence.cs index c1f5e620625efb..058b01216299eb 100644 --- a/src/libraries/System.Formats.Asn1/tests/Reader/ReadSequence.cs +++ b/src/libraries/System.Formats.Asn1/tests/Reader/ReadSequence.cs @@ -405,5 +405,33 @@ public static void ReadSequenceOf_PreservesOptions(AsnEncodingRules ruleSet) outer.ThrowIfNotEmpty(); initial.ThrowIfNotEmpty(); } + + [Theory] + [InlineData(AsnEncodingRules.BER)] + [InlineData(AsnEncodingRules.CER)] + [InlineData(AsnEncodingRules.DER)] + public static void ExtremelyLargeContentLength(AsnEncodingRules ruleSet) + { + int start = Environment.CurrentManagedThreadId; + int contentOffset = start; + int contentLength = start; + int bytesConsumed = start; + + ReadOnlySpan input = [0x30, 0x84, 0x7F, 0xFF, 0xFF, 0xFF, 0x00, 0x00]; + + try + { + AsnDecoder.ReadSequence(input, ruleSet, out contentOffset, out contentLength, out bytesConsumed); + Assert.Fail("ReadSequence should have thrown AsnContentException"); + } + catch (AsnContentException e) + { + Assert.IsType(e); + } + + Assert.Equal(start, contentOffset); + Assert.Equal(start, contentLength); + Assert.Equal(start, bytesConsumed); + } } } diff --git a/src/libraries/System.Formats.Asn1/tests/Reader/ReadSetOf.cs b/src/libraries/System.Formats.Asn1/tests/Reader/ReadSetOf.cs index f5b38dc0e16b62..90058b9f487a4f 100644 --- a/src/libraries/System.Formats.Asn1/tests/Reader/ReadSetOf.cs +++ b/src/libraries/System.Formats.Asn1/tests/Reader/ReadSetOf.cs @@ -390,5 +390,33 @@ public static void ReadSetOf_PreservesOptions(AsnEncodingRules ruleSet) outer.ThrowIfNotEmpty(); initial.ThrowIfNotEmpty(); } + + [Theory] + [InlineData(AsnEncodingRules.BER)] + [InlineData(AsnEncodingRules.CER)] + [InlineData(AsnEncodingRules.DER)] + public static void ExtremelyLargeContentLength(AsnEncodingRules ruleSet) + { + int start = Environment.CurrentManagedThreadId; + int contentOffset = start; + int contentLength = start; + int bytesConsumed = start; + + ReadOnlySpan input = [0x31, 0x84, 0x7F, 0xFF, 0xFF, 0xFF, 0x00, 0x00]; + + try + { + AsnDecoder.ReadSetOf(input, ruleSet, out contentOffset, out contentLength, out bytesConsumed); + Assert.Fail("ReadSetOf should have thrown AsnContentException"); + } + catch (AsnContentException e) + { + Assert.IsType(e); + } + + Assert.Equal(start, contentOffset); + Assert.Equal(start, contentLength); + Assert.Equal(start, bytesConsumed); + } } } diff --git a/src/libraries/System.Formats.Asn1/tests/System.Formats.Asn1.Tests.csproj b/src/libraries/System.Formats.Asn1/tests/System.Formats.Asn1.Tests.csproj index 68bdc72edf895f..3626af0c77d1a5 100644 --- a/src/libraries/System.Formats.Asn1/tests/System.Formats.Asn1.Tests.csproj +++ b/src/libraries/System.Formats.Asn1/tests/System.Formats.Asn1.Tests.csproj @@ -5,6 +5,7 @@ + diff --git a/src/libraries/System.Formats.Nrbf/tests/ArraySinglePrimitiveRecordTests.cs b/src/libraries/System.Formats.Nrbf/tests/ArraySinglePrimitiveRecordTests.cs index 7ef801808e4e95..9f714c9dddac15 100644 --- a/src/libraries/System.Formats.Nrbf/tests/ArraySinglePrimitiveRecordTests.cs +++ b/src/libraries/System.Formats.Nrbf/tests/ArraySinglePrimitiveRecordTests.cs @@ -20,7 +20,7 @@ public NonSeekableStream(byte[] buffer) : base(buffer) { } public static IEnumerable GetCanReadArrayOfAnySizeArgs() { - foreach (int size in new[] { 1, 127, 128, 512_001, 512_001 }) + foreach (int size in new[] { 1, 127, 128, 20_001 }) { yield return new object[] { size, true }; yield return new object[] { size, false }; diff --git a/src/libraries/System.Linq/src/System/Linq/SkipTake.SpeedOpt.cs b/src/libraries/System.Linq/src/System/Linq/SkipTake.SpeedOpt.cs index 5cb53aa2997e06..ef043f9f6755e7 100644 --- a/src/libraries/System.Linq/src/System/Linq/SkipTake.SpeedOpt.cs +++ b/src/libraries/System.Linq/src/System/Linq/SkipTake.SpeedOpt.cs @@ -430,9 +430,12 @@ public override Iterator Take(int count) { if (_source is Iterator iterator && iterator.GetCount(onlyIfCheap: true) is int count && - count >= _minIndexInclusive) + count > _minIndexInclusive) { - return !HasLimit ? + // If there's no upper bound, or if there are fewer items in the list + // than the upper bound allows, just return the last element of the list. + // Otherwise, get the element at the upper bound. + return (uint)count <= (uint)_maxIndexInclusive ? iterator.TryGetLast(out found) : iterator.TryGetElementAt(_maxIndexInclusive, out found); } diff --git a/src/libraries/System.Linq/tests/AggregateByTests.cs b/src/libraries/System.Linq/tests/AggregateByTests.cs index b574660c9e5ac8..43b9262f78b813 100644 --- a/src/libraries/System.Linq/tests/AggregateByTests.cs +++ b/src/libraries/System.Linq/tests/AggregateByTests.cs @@ -11,10 +11,10 @@ public class AggregateByTests : EnumerableTests [Fact] public void Empty() { - Assert.All(IdentityTransforms(), transform => + Assert.All(CreateSources([]), source => { - Assert.Equal(Enumerable.Empty>(), transform(Enumerable.Empty()).AggregateBy(i => i, i => i, (a, i) => a + i)); - Assert.Equal(Enumerable.Empty>(), transform(Enumerable.Empty()).AggregateBy(i => i, 0, (a, i) => a + i)); + Assert.Equal([], source.AggregateBy(i => i, i => i, (a, i) => a + i)); + Assert.Equal([], source.AggregateBy(i => i, 0, (a, i) => a + i)); }); } diff --git a/src/libraries/System.Linq/tests/ChunkTests.cs b/src/libraries/System.Linq/tests/ChunkTests.cs index 31433ddabff30f..1a12ac7fd6765d 100644 --- a/src/libraries/System.Linq/tests/ChunkTests.cs +++ b/src/libraries/System.Linq/tests/ChunkTests.cs @@ -42,10 +42,8 @@ public void ChunkSourceLazily() [InlineData(new[] {9999, 0, 888, -1, 66, -777, 1, 2, -12345})] public void ChunkSourceRepeatCalls(int[] array) { - Assert.All(IdentityTransforms(), t => + Assert.All(CreateSources(array), source => { - IEnumerable source = t(array); - Assert.Equal(source.Chunk(3), source.Chunk(3)); }); } @@ -54,10 +52,8 @@ public void ChunkSourceRepeatCalls(int[] array) [InlineData(new[] {9999, 0, 888, -1, 66, -777, 1, 2, -12345})] public void ChunkSourceEvenly(int[] array) { - Assert.All(IdentityTransforms(), t => + Assert.All(CreateSources(array), source => { - IEnumerable source = t(array); - using IEnumerator chunks = source.Chunk(3).GetEnumerator(); chunks.MoveNext(); Assert.Equal(new[] { 9999, 0, 888 }, chunks.Current); @@ -73,10 +69,8 @@ public void ChunkSourceEvenly(int[] array) [InlineData(new[] {9999, 0, 888, -1, 66, -777, 1, 2})] public void ChunkSourceUnevenly(int[] array) { - Assert.All(IdentityTransforms(), t => + Assert.All(CreateSources(array), source => { - IEnumerable source = t(array); - using IEnumerator chunks = source.Chunk(3).GetEnumerator(); chunks.MoveNext(); Assert.Equal(new[] { 9999, 0, 888 }, chunks.Current); @@ -92,10 +86,8 @@ public void ChunkSourceUnevenly(int[] array) [InlineData(new[] {9999, 0})] public void ChunkSourceSmallerThanMaxSize(int[] array) { - Assert.All(IdentityTransforms(), t => + Assert.All(CreateSources(array), source => { - IEnumerable source = t(array); - using IEnumerator chunks = source.Chunk(3).GetEnumerator(); chunks.MoveNext(); Assert.Equal(new[] { 9999, 0 }, chunks.Current); @@ -107,10 +99,8 @@ public void ChunkSourceSmallerThanMaxSize(int[] array) [InlineData(new int[0])] public void EmptySourceYieldsNoChunks(int[] array) { - Assert.All(IdentityTransforms(), t => + Assert.All(CreateSources(array), source => { - IEnumerable source = t(array); - using IEnumerator chunks = source.Chunk(3).GetEnumerator(); Assert.False(chunks.MoveNext()); }); diff --git a/src/libraries/System.Linq/tests/ConcatTests.cs b/src/libraries/System.Linq/tests/ConcatTests.cs index 544027450d80c2..4069bbdf5de5a4 100644 --- a/src/libraries/System.Linq/tests/ConcatTests.cs +++ b/src/libraries/System.Linq/tests/ConcatTests.cs @@ -31,8 +31,8 @@ private static void SameResultsWithQueryAndRepeatCallsWorker(IEnumerable f first = from item in first select item; second = from item in second select item; - VerifyEqualsWorker(first.Concat(second), first.Concat(second)); - VerifyEqualsWorker(second.Concat(first), second.Concat(first)); + Assert.Equal(first.Concat(second), first.Concat(second)); + Assert.Equal(second.Concat(first), second.Concat(first)); } [Theory] @@ -41,8 +41,8 @@ private static void SameResultsWithQueryAndRepeatCallsWorker(IEnumerable f [InlineData(new int[] { 2, 3, 5, 9 }, new int[] { 8, 10 }, new int[] { 2, 3, 5, 9, 8, 10 })] // Neither side is empty public void PossiblyEmptyInputs(IEnumerable first, IEnumerable second, IEnumerable expected) { - VerifyEqualsWorker(expected, first.Concat(second)); - VerifyEqualsWorker(expected.Skip(first.Count()).Concat(expected.Take(first.Count())), second.Concat(first)); // Swap the inputs around + Assert.Equal(expected, first.Concat(second)); + Assert.Equal(expected.Skip(first.Count()).Concat(expected.Take(first.Count())), second.Concat(first)); // Swap the inputs around } [Fact] @@ -80,7 +80,7 @@ public void SecondNull() public void VerifyEquals(IEnumerable expected, IEnumerable actual) { // workaround: xUnit type inference doesn't work if the input type is not T (like IEnumerable) - VerifyEqualsWorker(expected, actual); + Assert.Equal(expected, actual); } [Theory] @@ -133,23 +133,6 @@ public void First_Last_ElementAt(IEnumerable _, IEnumerable actual) } } - private static void VerifyEqualsWorker(IEnumerable expected, IEnumerable actual) - { - // Returns a list of functions that, when applied to enumerable, should return - // another one that has equivalent contents. - var identityTransforms = IdentityTransforms(); - - // We run the transforms N^2 times, by testing all transforms - // of expected against all transforms of actual. - foreach (var outTransform in identityTransforms) - { - foreach (var inTransform in identityTransforms) - { - Assert.Equal(outTransform(expected), inTransform(actual)); - } - } - } - public static IEnumerable ArraySourcesData() => GenerateSourcesData(outerTransform: e => e.ToArray()); public static IEnumerable SelectArraySourcesData() => GenerateSourcesData(outerTransform: e => e.Select(i => i).ToArray()); @@ -292,7 +275,7 @@ public void ManyConcats(IEnumerable> sources) } Assert.Equal(sources.Sum(s => s.Count()), concatee.Count()); - VerifyEqualsWorker(sources.SelectMany(s => s), concatee); + Assert.Equal(sources.SelectMany(s => s), concatee); } } diff --git a/src/libraries/System.Linq/tests/CountTests.cs b/src/libraries/System.Linq/tests/CountTests.cs index 5b0730163721db..2937f116367f71 100644 --- a/src/libraries/System.Linq/tests/CountTests.cs +++ b/src/libraries/System.Linq/tests/CountTests.cs @@ -99,9 +99,9 @@ public void RunOnce(int count, IEnumerable enumerable) private static IEnumerable EnumerateCollectionTypesAndCounts(int count, IEnumerable enumerable) { - foreach (var transform in IdentityTransforms()) + foreach (IEnumerable source in CreateSources(enumerable)) { - yield return new object[] { count, transform(enumerable) }; + yield return [count, source]; } } diff --git a/src/libraries/System.Linq/tests/EnumerableTests.cs b/src/libraries/System.Linq/tests/EnumerableTests.cs index d28ace92a4026b..66bc25861e080e 100644 --- a/src/libraries/System.Linq/tests/EnumerableTests.cs +++ b/src/libraries/System.Linq/tests/EnumerableTests.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using Xunit; +using Xunit.Sdk; namespace System.Linq.Tests { @@ -243,6 +244,7 @@ protected static IEnumerable FlipIsCollection(IEnumerable source) { return source is ICollection ? ForceNotCollection(source) : new List(source); } + protected static T[] Repeat(Func factory, int count) { T[] results = new T[count]; @@ -316,26 +318,83 @@ protected static IEnumerable> CreateSources(IEnumerable sou } } - protected static List, IEnumerable>> IdentityTransforms() + protected static IEnumerable, IEnumerable>> IdentityTransforms() { - // All of these transforms should take an enumerable and produce - // another enumerable with the same contents. - return new List, IEnumerable>> + // Various collection types all representing the same source. + List, IEnumerable>> sources = + [ + e => e, // original + e => e.ToArray(), // T[] + e => e.ToList(), // List + e => new ReadOnlyCollection(e.ToArray()), // IList that's not List/T[] + e => new TestCollection(e.ToArray()), // ICollection that's not IList + e => new TestReadOnlyCollection(e.ToArray()), // IReadOnlyCollection that's not ICollection + e => ForceNotCollection(e), // IEnumerable with no other interfaces + ]; + if (typeof(T) == typeof(char)) { - e => e, - e => e.ToArray(), - e => e.ToList(), - e => e.ToList().Take(int.MaxValue), + sources.Add(e => (IEnumerable)(object)string.Concat((IEnumerable)(object)e)); // string + } + + // Various transforms that all yield the same elements as the source. + List, IEnumerable>> transforms = + [ + // Append + e => + { + T[] values = e.ToArray(); + return values.Length == 0 ? [] : values[0..^1].Append(values[^1]); + }, + + // Concat + e => e.Concat(ForceNotCollection([])), + e => ForceNotCollection([]).Concat(e), + + // Prepend + e => + { + T[] values = e.ToArray(); + return values.Length == 0 ? [] : values[1..].Prepend(values[0]); + }, + + // Reverse + e => e.Reverse().Reverse(), + + // Select e => e.Select(i => i), - e => e.Select(i => i).Take(int.MaxValue), - e => e.Select(i => i).Where(i => true), + + // SelectMany + e => e.SelectMany(i => [i]), + + // Take + e => e.Take(int.MaxValue), + e => e.TakeLast(int.MaxValue), + e => e.TakeWhile(i => true), + + // Skip + e => e.SkipWhile(i => false), + + // Where e => e.Where(i => true), - e => e.Concat(Array.Empty()), - e => e.Concat(ForceNotCollection(Array.Empty())), - e => ForceNotCollection(e), - e => ForceNotCollection(e).Skip(0), - e => new ReadOnlyCollection(e.ToArray()), - }; + ]; + + foreach (Func, IEnumerable> source in sources) + { + // Yield the source itself. + yield return source; + + foreach (Func, IEnumerable> transform in transforms) + { + // Yield a single transform on the source + yield return e => transform(source(e)); + + foreach (Func, IEnumerable> transform2 in transforms) + { + // Yield a second transform on the first transform on the source. + yield return e => transform2(transform(source(e))); + } + } + } } protected sealed class DelegateIterator : IEnumerable, IEnumerator diff --git a/src/libraries/System.Linq/tests/SelectManyTests.cs b/src/libraries/System.Linq/tests/SelectManyTests.cs index cb359f067848ba..98f2e37e54e32b 100644 --- a/src/libraries/System.Linq/tests/SelectManyTests.cs +++ b/src/libraries/System.Linq/tests/SelectManyTests.cs @@ -372,31 +372,23 @@ public void ForcedToEnumeratorDoesntEnumerateIndexedResultSel() Assert.False(en is not null && en.MoveNext()); } - [Theory] - [MemberData(nameof(ParameterizedTestsData))] - public void ParameterizedTests(IEnumerable source, Func> selector) + [Fact] + public void ParameterizedTests() { - Assert.All(CreateSources(source), source => + for (int i = 1; i <= 20; i++) { - var expected = source.Select(i => selector(i)).Aggregate((l, r) => l.Concat(r)); - var actual = source.SelectMany(selector); + Assert.All(CreateSources(Enumerable.Range(1, i)), source => + { + Func> selector = n => Enumerable.Range(i, n); - Assert.Equal(expected, actual); - Assert.Equal(expected.Count(), actual.Count()); // SelectMany may employ an optimized Count implementation. - Assert.Equal(expected.ToArray(), actual.ToArray()); - Assert.Equal(expected.ToList(), actual.ToList()); - }); - } + var expected = source.Select(i => selector(i)).Aggregate((l, r) => l.Concat(r)).ToArray(); + var actual = source.SelectMany(selector); - public static IEnumerable ParameterizedTestsData() - { - foreach (Func, IEnumerable> transform in IdentityTransforms()) - { - for (int i = 1; i <= 20; i++) - { - Func> selector = n => transform(Enumerable.Range(i, n)); - yield return new object[] { Enumerable.Range(1, i), selector }; - } + Assert.Equal(expected, actual); + Assert.Equal(expected.Length, actual.Count()); // SelectMany may employ an optimized Count implementation. + Assert.Equal(expected, actual.ToArray()); + Assert.Equal(expected, actual.ToList()); + }); } } diff --git a/src/libraries/System.Linq/tests/SingleOrDefaultTests.cs b/src/libraries/System.Linq/tests/SingleOrDefaultTests.cs index 8441f8a3c68a34..e04279bd00eac4 100644 --- a/src/libraries/System.Linq/tests/SingleOrDefaultTests.cs +++ b/src/libraries/System.Linq/tests/SingleOrDefaultTests.cs @@ -27,81 +27,33 @@ public void SameResultsRepeatCallsStringQuery() } [Fact] - public void EmptyIList() + public void Empty() { - int?[] source = { }; - int? expected = null; - - Assert.Equal(expected, source.SingleOrDefault()); - } - - [Fact] - public void EmptyIListDefault() - { - int?[] source = { }; - int expected = 5; - - Assert.Equal(expected, source.SingleOrDefault(5)); - } - - [Fact] - public void SingleElementIList() - { - int[] source = { 4 }; - int expected = 4; - - Assert.Equal(expected, source.SingleOrDefault()); + foreach (IEnumerable source in CreateSources([])) + { + Assert.Null(source.SingleOrDefault()); + Assert.Equal(5, source.SingleOrDefault(5)); + } } [Fact] - public void SingleElementIListDefault() + public void SingleElement() { - int[] source = { 4 }; - int expected = 4; - - Assert.Equal(expected, source.SingleOrDefault(5)); + foreach (IEnumerable source in CreateSources([4])) + { + Assert.Equal(4, source.SingleOrDefault()); + Assert.Equal(4, source.SingleOrDefault(5)); + } } [Fact] public void ManyElementIList() { - int[] source = { 4, 4, 4, 4, 4 }; - - Assert.Throws(() => source.SingleOrDefault()); - } - - [Fact] - public void ManyElementIListDefault() - { - int[] source = { 4, 4, 4, 4, 4 }; - - Assert.Throws(() => source.SingleOrDefault(5)); - } - - [Fact] - public void EmptyNotIList() - { - IEnumerable source = RepeatedNumberGuaranteedNotCollectionType(0, 0); - int expected = default(int); - - Assert.Equal(expected, source.SingleOrDefault()); - } - - [Fact] - public void SingleElementNotIList() - { - IEnumerable source = RepeatedNumberGuaranteedNotCollectionType(-5, 1); - int expected = -5; - - Assert.Equal(expected, source.SingleOrDefault()); - } - - [Fact] - public void ManyElementNotIList() - { - IEnumerable source = RepeatedNumberGuaranteedNotCollectionType(3, 5); - - Assert.Throws(() => source.SingleOrDefault()); + foreach (IEnumerable source in CreateSources([4, 4, 4, 4, 4])) + { + Assert.Throws(() => source.SingleOrDefault()); + Assert.Throws(() => source.SingleOrDefault(4)); + } } [Fact] diff --git a/src/libraries/System.Linq/tests/SingleTests.cs b/src/libraries/System.Linq/tests/SingleTests.cs index 09e49daae1c099..21028511505289 100644 --- a/src/libraries/System.Linq/tests/SingleTests.cs +++ b/src/libraries/System.Linq/tests/SingleTests.cs @@ -37,53 +37,31 @@ public void SameResultsRepeatCallsIntQueryWithZero() } [Fact] - public void EmptyIList() + public void Empty() { - int[] source = { }; - - Assert.Throws(() => source.Single()); + foreach (IEnumerable source in CreateSources([])) + { + Assert.Throws(() => source.Single()); + } } [Fact] - public void SingleElementIList() + public void SingleElement() { - int[] source = { 4 }; int expected = 4; - - Assert.Equal(expected, source.Single()); - } - - [Fact] - public void ManyElementIList() - { - int[] source = { 4, 4, 4, 4, 4 }; - - Assert.Throws(() => source.Single()); - } - - [Fact] - public void EmptyNotIList() - { - IEnumerable source = RepeatedNumberGuaranteedNotCollectionType(0, 0); - - Assert.Throws(() => source.Single()); - } - - [Fact] - public void SingleElementNotIList() - { - IEnumerable source = RepeatedNumberGuaranteedNotCollectionType(-5, 1); - int expected = -5; - - Assert.Equal(expected, source.Single()); + foreach (IEnumerable source in CreateSources([4])) + { + Assert.Equal(expected, source.Single()); + } } [Fact] - public void ManyElementNotIList() + public void ManyElement() { - IEnumerable source = RepeatedNumberGuaranteedNotCollectionType(3, 5); - - Assert.Throws(() => source.Single()); + foreach (IEnumerable source in CreateSources([4, 4, 4, 4, 4])) + { + Assert.Throws(() => source.Single()); + } } [Fact] diff --git a/src/libraries/System.Linq/tests/SkipLastTests.cs b/src/libraries/System.Linq/tests/SkipLastTests.cs index c4770410870d47..0a2080a1ad37af 100644 --- a/src/libraries/System.Linq/tests/SkipLastTests.cs +++ b/src/libraries/System.Linq/tests/SkipLastTests.cs @@ -19,25 +19,26 @@ public void SkipLastThrowsOnNull() [MemberData(nameof(EnumerableData), MemberType = typeof(SkipTakeData))] public void SkipLast(IEnumerable source, int count) { - Assert.All(IdentityTransforms(), transform => - { - IEnumerable equivalent = transform(source); + int[] expected = source.Reverse().Skip(count).Reverse().ToArray(); - IEnumerable expected = equivalent.Reverse().Skip(count).Reverse(); - IEnumerable actual = equivalent.SkipLast(count); + Assert.All(CreateSources(source), source => + { + IEnumerable actual = source.SkipLast(count); Assert.Equal(expected, actual); - Assert.Equal(expected.Count(), actual.Count()); + + Assert.Equal(expected.Length, actual.Count()); Assert.Equal(expected, actual.ToArray()); Assert.Equal(expected, actual.ToList()); - Assert.Equal(expected.FirstOrDefault(), actual.FirstOrDefault()); Assert.Equal(expected.LastOrDefault(), actual.LastOrDefault()); - Assert.All(Enumerable.Range(0, expected.Count()), index => + if (expected.Length > 0) { - Assert.Equal(expected.ElementAt(index), actual.ElementAt(index)); - }); + Assert.Equal(expected[0], actual.ElementAt(0)); + Assert.Equal(expected[^1], actual.ElementAt(expected.Length - 1)); + Assert.Equal(expected[expected.Length / 2], actual.ElementAt(expected.Length / 2)); + } Assert.Equal(0, actual.ElementAtOrDefault(-1)); Assert.Equal(0, actual.ElementAtOrDefault(actual.Count())); diff --git a/src/libraries/System.Linq/tests/SkipTests.cs b/src/libraries/System.Linq/tests/SkipTests.cs index cf4d16b1309907..226c8f6b9152f8 100644 --- a/src/libraries/System.Linq/tests/SkipTests.cs +++ b/src/libraries/System.Linq/tests/SkipTests.cs @@ -10,12 +10,6 @@ namespace System.Linq.Tests { public class SkipTests : EnumerableTests { - private static IEnumerable GuaranteeNotIList(IEnumerable source) - { - foreach (T element in source) - yield return element; - } - [Fact] public void SkipSome() { @@ -87,139 +81,95 @@ public void SkipThrowsOnNullIList() [Fact] public void SkipOnEmpty() { - Assert.Equal(Enumerable.Empty(), GuaranteeNotIList(Enumerable.Empty()).Skip(0)); - Assert.Equal(Enumerable.Empty(), GuaranteeNotIList(Enumerable.Empty()).Skip(-1)); - Assert.Equal(Enumerable.Empty(), GuaranteeNotIList(Enumerable.Empty()).Skip(1)); - } + foreach (IEnumerable source in CreateSources([])) + { + Assert.Equal([], source.Skip(0)); + Assert.Equal([], source.Skip(-1)); + Assert.Equal([], source.Skip(1)); + } - [Fact] - public void SkipOnEmptyIList() - { - // Enumerable.Empty does return an IList, but not guaranteed as such - // by the spec. - Assert.Equal(Enumerable.Empty(), Enumerable.Empty().ToList().Skip(0)); - Assert.Equal(Enumerable.Empty(), Enumerable.Empty().ToList().Skip(-1)); - Assert.Equal(Enumerable.Empty(), Enumerable.Empty().ToList().Skip(1)); + foreach (IEnumerable source in CreateSources([])) + { + Assert.Equal([], source.Skip(0)); + Assert.Equal([], source.Skip(-1)); + Assert.Equal([], source.Skip(1)); + } } [Fact] public void SkipNegative() { - Assert.Equal(Enumerable.Range(0, 20), NumberRangeGuaranteedNotCollectionType(0, 20).Skip(-42)); - } - - [Fact] - public void SkipNegativeIList() - { - Assert.Equal(Enumerable.Range(0, 20), NumberRangeGuaranteedNotCollectionType(0, 20).ToList().Skip(-42)); + foreach (IEnumerable source in CreateSources(Enumerable.Range(0, 20))) + { + Assert.Equal(Enumerable.Range(0, 20), source.Skip(-42)); + } } [Fact] public void SameResultsRepeatCallsIntQuery() { - var q = GuaranteeNotIList(from x in new[] { 9999, 0, 888, -1, 66, -777, 1, 2, -12345 } - where x > int.MinValue - select x); - - Assert.Equal(q.Skip(0), q.Skip(0)); - } - - [Fact] - public void SameResultsRepeatCallsIntQueryIList() - { - var q = (from x in new[] { 9999, 0, 888, -1, 66, -777, 1, 2, -12345 } - where x > Int32.MinValue - select x).ToList(); + foreach (IEnumerable source in CreateSources([9999, 0, 888, -1, 66, -777, 1, 2, -12345])) + { + IEnumerable q = from x in source + where x > int.MinValue + select x; - Assert.Equal(q.Skip(0), q.Skip(0)); + Assert.Equal(q.Skip(0), q.Skip(0)); + } } [Fact] public void SameResultsRepeatCallsStringQuery() { - var q = GuaranteeNotIList(from x in new[] { "!@#$%^", "C", "AAA", "", "Calling Twice", "SoS", string.Empty } - where !string.IsNullOrEmpty(x) - select x); - - Assert.Equal(q.Skip(0), q.Skip(0)); - } - - [Fact] - public void SameResultsRepeatCallsStringQueryIList() - { - var q = (from x in new[] { "!@#$%^", "C", "AAA", "", "Calling Twice", "SoS", String.Empty } - where !String.IsNullOrEmpty(x) - select x).ToList(); + foreach (IEnumerable source in CreateSources(["!@#$%^", "C", "AAA", "", "Calling Twice", "SoS", string.Empty])) + { + IEnumerable q = from x in source + where !string.IsNullOrEmpty(x) + select x; - Assert.Equal(q.Skip(0), q.Skip(0)); + Assert.Equal(q.Skip(0), q.Skip(0)); + } } [Fact] public void SkipOne() { - int?[] source = { 3, 100, 4, null, 10 }; - int?[] expected = { 100, 4, null, 10 }; - - Assert.Equal(expected, source.Skip(1)); - } - - [Fact] - public void SkipOneNotIList() - { - int?[] source = { 3, 100, 4, null, 10 }; - int?[] expected = { 100, 4, null, 10 }; - - Assert.Equal(expected, GuaranteeNotIList(source).Skip(1)); + int?[] expected = [100, 4, null, 10]; + foreach (IEnumerable source in CreateSources([3, 100, 4, null, 10])) + { + Assert.Equal(expected, source.Skip(1)); + } } [Fact] public void SkipAllButOne() { - int?[] source = { 3, 100, null, 4, 10 }; - int?[] expected = { 10 }; - - Assert.Equal(expected, source.Skip(source.Length - 1)); - } - - [Fact] - public void SkipAllButOneNotIList() - { - int?[] source = { 3, 100, null, 4, 10 }; - int?[] expected = { 10 }; - - Assert.Equal(expected, GuaranteeNotIList(source.Skip(source.Length - 1))); + int?[] expected = [10]; + foreach (IEnumerable source in CreateSources([3, 100, 4, null, 10])) + { + Assert.Equal(expected, source.Skip(4)); + } } [Fact] public void SkipOneMoreThanAll() { - int[] source = { 3, 100, 4, 10 }; - Assert.Empty(source.Skip(source.Length + 1)); - } - - [Fact] - public void SkipOneMoreThanAllNotIList() - { - int[] source = { 3, 100, 4, 10 }; - Assert.Empty(GuaranteeNotIList(source).Skip(source.Length + 1)); + foreach (IEnumerable source in CreateSources([3, 100, 4, 10])) + { + Assert.Empty(source.Skip(5)); + } } [Fact] public void ForcedToEnumeratorDoesntEnumerate() { - var iterator = NumberRangeGuaranteedNotCollectionType(0, 3).Skip(2); - // Don't insist on this behaviour, but check it's correct if it happens - var en = iterator as IEnumerator; - Assert.False(en is not null && en.MoveNext()); - } - - [Fact] - public void ForcedToEnumeratorDoesntEnumerateIList() - { - var iterator = (new[] { 0, 1, 2 }).Skip(2); - // Don't insist on this behaviour, but check it's correct if it happens - var en = iterator as IEnumerator; - Assert.False(en is not null && en.MoveNext()); + foreach (IEnumerable source in CreateSources(Enumerable.Range(0, 3))) + { + // Don't insist on this behaviour, but check it's correct if it happens + IEnumerable iterator = source.Skip(2); + var en = iterator as IEnumerator; + Assert.False(en is not null && en.MoveNext()); + } } [Fact] @@ -232,243 +182,150 @@ public void Count() [Fact] public void FollowWithTake() { - var source = new[] { 5, 6, 7, 8 }; - var expected = new[] { 6, 7 }; - Assert.Equal(expected, source.Skip(1).Take(2)); - } - - [Fact] - public void FollowWithTakeNotIList() - { - var source = NumberRangeGuaranteedNotCollectionType(5, 4); - var expected = new[] { 6, 7 }; - Assert.Equal(expected, source.Skip(1).Take(2)); + int[] expected = [6, 7]; + foreach (IEnumerable source in CreateSources(Enumerable.Range(5, 4))) + { + Assert.Equal(expected, source.Skip(1).Take(2)); + } } [Fact] public void FollowWithTakeThenMassiveTake() { - var source = new[] { 5, 6, 7, 8 }; - var expected = new[] { 7 }; - Assert.Equal(expected, source.Skip(2).Take(1).Take(int.MaxValue)); - } - [Fact] - public void FollowWithTakeThenMassiveTakeNotIList() - { - var source = NumberRangeGuaranteedNotCollectionType(5, 4); - var expected = new[] { 7 }; - Assert.Equal(expected, source.Skip(2).Take(1).Take(int.MaxValue)); + int[] expected = [7]; + foreach (IEnumerable source in CreateSources([5, 6, 7, 8])) + { + Assert.Equal(expected, source.Skip(2).Take(1).Take(int.MaxValue)); + } } [Fact] public void FollowWithSkip() { - var source = new[] { 1, 2, 3, 4, 5, 6 }; - var expected = new[] { 4, 5, 6 }; - Assert.Equal(expected, source.Skip(1).Skip(2).Skip(-4)); - } - - [Fact] - public void FollowWithSkipNotIList() - { - var source = NumberRangeGuaranteedNotCollectionType(1, 6); - var expected = new[] { 4, 5, 6 }; - Assert.Equal(expected, source.Skip(1).Skip(2).Skip(-4)); + int[] expected = [4, 5, 6]; + foreach (IEnumerable source in CreateSources([1, 2, 3, 4, 5, 6])) + { + Assert.Equal(expected, source.Skip(1).Skip(2).Skip(-4)); + } } [Fact] public void ElementAt() { - var source = new[] { 1, 2, 3, 4, 5, 6 }; - var remaining = source.Skip(2); - Assert.Equal(3, remaining.ElementAt(0)); - Assert.Equal(4, remaining.ElementAt(1)); - Assert.Equal(6, remaining.ElementAt(3)); - AssertExtensions.Throws("index", () => remaining.ElementAt(-1)); - AssertExtensions.Throws("index", () => remaining.ElementAt(4)); - } - - [Fact] - public void ElementAtNotIList() - { - var source = GuaranteeNotIList(new[] { 1, 2, 3, 4, 5, 6 }); - var remaining = source.Skip(2); - Assert.Equal(3, remaining.ElementAt(0)); - Assert.Equal(4, remaining.ElementAt(1)); - Assert.Equal(6, remaining.ElementAt(3)); - AssertExtensions.Throws("index", () => remaining.ElementAt(-1)); - AssertExtensions.Throws("index", () => remaining.ElementAt(4)); + foreach (IEnumerable source in CreateSources([1, 2, 3, 4, 5, 6])) + { + IEnumerable remaining = source.Skip(2); + Assert.Equal(3, remaining.ElementAt(0)); + Assert.Equal(4, remaining.ElementAt(1)); + Assert.Equal(6, remaining.ElementAt(3)); + AssertExtensions.Throws("index", () => remaining.ElementAt(-1)); + AssertExtensions.Throws("index", () => remaining.ElementAt(4)); + } } [Fact] public void ElementAtOrDefault() { - var source = new[] { 1, 2, 3, 4, 5, 6 }; - var remaining = source.Skip(2); - Assert.Equal(3, remaining.ElementAtOrDefault(0)); - Assert.Equal(4, remaining.ElementAtOrDefault(1)); - Assert.Equal(6, remaining.ElementAtOrDefault(3)); - Assert.Equal(0, remaining.ElementAtOrDefault(-1)); - Assert.Equal(0, remaining.ElementAtOrDefault(4)); - } - - [Fact] - public void ElementAtOrDefaultNotIList() - { - var source = GuaranteeNotIList(new[] { 1, 2, 3, 4, 5, 6 }); - var remaining = source.Skip(2); - Assert.Equal(3, remaining.ElementAtOrDefault(0)); - Assert.Equal(4, remaining.ElementAtOrDefault(1)); - Assert.Equal(6, remaining.ElementAtOrDefault(3)); - Assert.Equal(0, remaining.ElementAtOrDefault(-1)); - Assert.Equal(0, remaining.ElementAtOrDefault(4)); + foreach (IEnumerable source in CreateSources([1, 2, 3, 4, 5, 6])) + { + IEnumerable remaining = source.Skip(2); + Assert.Equal(3, remaining.ElementAtOrDefault(0)); + Assert.Equal(4, remaining.ElementAtOrDefault(1)); + Assert.Equal(6, remaining.ElementAtOrDefault(3)); + Assert.Equal(0, remaining.ElementAtOrDefault(-1)); + Assert.Equal(0, remaining.ElementAtOrDefault(4)); + } } [Fact] public void First() { - var source = new[] { 1, 2, 3, 4, 5 }; - Assert.Equal(1, source.Skip(0).First()); - Assert.Equal(3, source.Skip(2).First()); - Assert.Equal(5, source.Skip(4).First()); - Assert.Throws(() => source.Skip(5).First()); - } - - [Fact] - public void FirstNotIList() - { - var source = GuaranteeNotIList(new[] { 1, 2, 3, 4, 5 }); - Assert.Equal(1, source.Skip(0).First()); - Assert.Equal(3, source.Skip(2).First()); - Assert.Equal(5, source.Skip(4).First()); - Assert.Throws(() => source.Skip(5).First()); + foreach (IEnumerable source in CreateSources([1, 2, 3, 4, 5])) + { + Assert.Equal(1, source.Skip(0).First()); + Assert.Equal(3, source.Skip(2).First()); + Assert.Equal(5, source.Skip(4).First()); + Assert.Throws(() => source.Skip(5).First()); + } } [Fact] public void FirstOrDefault() { - var source = new[] { 1, 2, 3, 4, 5 }; - Assert.Equal(1, source.Skip(0).FirstOrDefault()); - Assert.Equal(3, source.Skip(2).FirstOrDefault()); - Assert.Equal(5, source.Skip(4).FirstOrDefault()); - Assert.Equal(0, source.Skip(5).FirstOrDefault()); - } - - [Fact] - public void FirstOrDefaultNotIList() - { - var source = GuaranteeNotIList(new[] { 1, 2, 3, 4, 5 }); - Assert.Equal(1, source.Skip(0).FirstOrDefault()); - Assert.Equal(3, source.Skip(2).FirstOrDefault()); - Assert.Equal(5, source.Skip(4).FirstOrDefault()); - Assert.Equal(0, source.Skip(5).FirstOrDefault()); + foreach (IEnumerable source in CreateSources([1, 2, 3, 4, 5])) + { + Assert.Equal(1, source.Skip(0).FirstOrDefault()); + Assert.Equal(3, source.Skip(2).FirstOrDefault()); + Assert.Equal(5, source.Skip(4).FirstOrDefault()); + Assert.Equal(0, source.Skip(5).FirstOrDefault()); + } } [Fact] public void Last() { - var source = new[] { 1, 2, 3, 4, 5 }; - Assert.Equal(5, source.Skip(0).Last()); - Assert.Equal(5, source.Skip(1).Last()); - Assert.Equal(5, source.Skip(4).Last()); - Assert.Throws(() => source.Skip(5).Last()); - } - - [Fact] - public void LastNotList() - { - var source = GuaranteeNotIList(new[] { 1, 2, 3, 4, 5 }); - Assert.Equal(5, source.Skip(0).Last()); - Assert.Equal(5, source.Skip(1).Last()); - Assert.Equal(5, source.Skip(4).Last()); - Assert.Throws(() => source.Skip(5).Last()); + foreach (IEnumerable source in CreateSources([1, 2, 3, 4, 5])) + { + Assert.Equal(5, source.Skip(0).Last()); + Assert.Equal(5, source.Skip(1).Last()); + Assert.Equal(5, source.Skip(4).Last()); + Assert.Throws(() => source.Skip(5).Last()); + } } [Fact] public void LastOrDefault() { - var source = new[] { 1, 2, 3, 4, 5 }; - Assert.Equal(5, source.Skip(0).LastOrDefault()); - Assert.Equal(5, source.Skip(1).LastOrDefault()); - Assert.Equal(5, source.Skip(4).LastOrDefault()); - Assert.Equal(0, source.Skip(5).LastOrDefault()); - } - - [Fact] - public void LastOrDefaultNotList() - { - var source = GuaranteeNotIList(new[] { 1, 2, 3, 4, 5 }); - Assert.Equal(5, source.Skip(0).LastOrDefault()); - Assert.Equal(5, source.Skip(1).LastOrDefault()); - Assert.Equal(5, source.Skip(4).LastOrDefault()); - Assert.Equal(0, source.Skip(5).LastOrDefault()); + foreach (IEnumerable source in CreateSources([1, 2, 3, 4, 5])) + { + Assert.Equal(5, source.Skip(0).LastOrDefault()); + Assert.Equal(5, source.Skip(1).LastOrDefault()); + Assert.Equal(5, source.Skip(4).LastOrDefault()); + Assert.Equal(0, source.Skip(5).LastOrDefault()); + } } [Fact] public void ToArray() { - var source = new[] { 1, 2, 3, 4, 5 }; - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Skip(0).ToArray()); - Assert.Equal(new[] { 2, 3, 4, 5 }, source.Skip(1).ToArray()); - Assert.Equal(5, source.Skip(4).ToArray().Single()); - Assert.Empty(source.Skip(5).ToArray()); - Assert.Empty(source.Skip(40).ToArray()); - } - - [Fact] - public void ToArrayNotList() - { - var source = GuaranteeNotIList(new[] { 1, 2, 3, 4, 5 }); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Skip(0).ToArray()); - Assert.Equal(new[] { 2, 3, 4, 5 }, source.Skip(1).ToArray()); - Assert.Equal(5, source.Skip(4).ToArray().Single()); - Assert.Empty(source.Skip(5).ToArray()); - Assert.Empty(source.Skip(40).ToArray()); + foreach (IEnumerable source in CreateSources([1, 2, 3, 4, 5])) + { + Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Skip(0).ToArray()); + Assert.Equal(new[] { 2, 3, 4, 5 }, source.Skip(1).ToArray()); + Assert.Equal(5, source.Skip(4).ToArray().Single()); + Assert.Empty(source.Skip(5).ToArray()); + Assert.Empty(source.Skip(40).ToArray()); + } } [Fact] public void ToList() { - var source = new[] { 1, 2, 3, 4, 5 }; - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Skip(0).ToList()); - Assert.Equal(new[] { 2, 3, 4, 5 }, source.Skip(1).ToList()); - Assert.Equal(5, source.Skip(4).ToList().Single()); - Assert.Empty(source.Skip(5).ToList()); - Assert.Empty(source.Skip(40).ToList()); - } - - [Fact] - public void ToListNotList() - { - var source = GuaranteeNotIList(new[] { 1, 2, 3, 4, 5 }); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Skip(0).ToList()); - Assert.Equal(new[] { 2, 3, 4, 5 }, source.Skip(1).ToList()); - Assert.Equal(5, source.Skip(4).ToList().Single()); - Assert.Empty(source.Skip(5).ToList()); - Assert.Empty(source.Skip(40).ToList()); + foreach (IEnumerable source in CreateSources([1, 2, 3, 4, 5])) + { + Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Skip(0).ToList()); + Assert.Equal(new[] { 2, 3, 4, 5 }, source.Skip(1).ToList()); + Assert.Equal(5, source.Skip(4).ToList().Single()); + Assert.Empty(source.Skip(5).ToList()); + Assert.Empty(source.Skip(40).ToList()); + } } [Fact] public void RepeatEnumerating() { - var source = new[] { 1, 2, 3, 4, 5 }; - var remaining = source.Skip(1); - Assert.Equal(remaining, remaining); - } - - [Fact] - public void RepeatEnumeratingNotList() - { - var source = GuaranteeNotIList(new[] { 1, 2, 3, 4, 5 }); - var remaining = source.Skip(1); - Assert.Equal(remaining, remaining); + foreach (IEnumerable source in CreateSources([1, 2, 3, 4, 5])) + { + IEnumerable remaining = source.Skip(1); + Assert.Equal(remaining, remaining); + } } [Fact] public void LazySkipMoreThan32Bits() { - var range = NumberRangeGuaranteedNotCollectionType(1, 100); - var skipped = range.Skip(50).Skip(int.MaxValue); // Could cause an integer overflow. + IEnumerable range = NumberRangeGuaranteedNotCollectionType(1, 100); + IEnumerable skipped = range.Skip(50).Skip(int.MaxValue); // Could cause an integer overflow. Assert.Empty(skipped); Assert.Equal(0, skipped.Count()); Assert.Empty(skipped.ToArray()); @@ -489,7 +346,7 @@ public void IteratorStateShouldNotChangeIfNumberOfElementsIsUnbounded() // so that it does not overflow to a negative number and enumeration does not // stop prematurely. - var iterator = new FastInfiniteEnumerator().Skip(1).GetEnumerator(); + using IEnumerator iterator = new FastInfiniteEnumerator().Skip(1).GetEnumerator(); iterator.MoveNext(); // Make sure the underlying enumerator has been initialized. FieldInfo state = iterator.GetType().GetTypeInfo() diff --git a/src/libraries/System.Linq/tests/TakeLastTests.cs b/src/libraries/System.Linq/tests/TakeLastTests.cs index b39d59e94263a6..4d011d50cfd63c 100644 --- a/src/libraries/System.Linq/tests/TakeLastTests.cs +++ b/src/libraries/System.Linq/tests/TakeLastTests.cs @@ -19,25 +19,26 @@ public void SkipLastThrowsOnNull() [MemberData(nameof(EnumerableData), MemberType = typeof(SkipTakeData))] public void TakeLast(IEnumerable source, int count) { - Assert.All(IdentityTransforms(), transform => - { - IEnumerable equivalent = transform(source); + int[] expected = source.Reverse().Take(count).Reverse().ToArray(); - IEnumerable expected = equivalent.Reverse().Take(count).Reverse(); - IEnumerable actual = equivalent.TakeLast(count); + Assert.All(CreateSources(source), source => + { + IEnumerable actual = source.TakeLast(count); Assert.Equal(expected, actual); - Assert.Equal(expected.Count(), actual.Count()); + + Assert.Equal(expected.Length, actual.Count()); Assert.Equal(expected, actual.ToArray()); Assert.Equal(expected, actual.ToList()); - Assert.Equal(expected.FirstOrDefault(), actual.FirstOrDefault()); Assert.Equal(expected.LastOrDefault(), actual.LastOrDefault()); - Assert.All(Enumerable.Range(0, expected.Count()), index => + if (expected.Length > 0) { - Assert.Equal(expected.ElementAt(index), actual.ElementAt(index)); - }); + Assert.Equal(expected[0], actual.ElementAt(0)); + Assert.Equal(expected[^1], actual.ElementAt(expected.Length - 1)); + Assert.Equal(expected[expected.Length / 2], actual.ElementAt(expected.Length / 2)); + } Assert.Equal(0, actual.ElementAtOrDefault(-1)); Assert.Equal(0, actual.ElementAtOrDefault(actual.Count())); diff --git a/src/libraries/System.Linq/tests/TakeTests.cs b/src/libraries/System.Linq/tests/TakeTests.cs index d9408a157124bf..c39c9357ea7c57 100644 --- a/src/libraries/System.Linq/tests/TakeTests.cs +++ b/src/libraries/System.Linq/tests/TakeTests.cs @@ -72,135 +72,85 @@ public void SameResultsRepeatCallsStringQueryIList() [Fact] public void SourceEmptyCountPositive() { - var source = new int[] { }; - Assert.Empty(source.Take(5)); - - Assert.Empty(source.Take(0..5)); - Assert.Empty(source.Take(^5..5)); - Assert.Empty(source.Take(0..^0)); - Assert.Empty(source.Take(^5..^0)); - } - - [Fact] - public void SourceEmptyCountPositiveNotIList() - { - var source = NumberRangeGuaranteedNotCollectionType(0, 0); - Assert.Empty(source.Take(5)); + foreach (IEnumerable source in CreateSources([])) + { + Assert.Empty(source.Take(5)); - Assert.Empty(source.Take(0..5)); - Assert.Empty(source.Take(^5..5)); - Assert.Empty(source.Take(0..^0)); - Assert.Empty(source.Take(^5..^0)); + Assert.Empty(source.Take(0..5)); + Assert.Empty(source.Take(^5..5)); + Assert.Empty(source.Take(0..^0)); + Assert.Empty(source.Take(^5..^0)); + } } [Fact] public void SourceNonEmptyCountNegative() { - var source = new[] { 2, 5, 9, 1 }; - Assert.Empty(source.Take(-5)); - - Assert.Empty(source.Take(^9..0)); - } - - [Fact] - public void SourceNonEmptyCountNegativeNotIList() - { - var source = ForceNotCollection(new[] { 2, 5, 9, 1 }); - Assert.Empty(source.Take(-5)); - - Assert.Empty(source.Take(^9..0)); + foreach (IEnumerable source in CreateSources([2, 5, 9, 1])) + { + Assert.Empty(source.Take(-5)); + Assert.Empty(source.Take(^9..0)); + } } [Fact] public void SourceNonEmptyCountZero() { - var source = new[] { 2, 5, 9, 1 }; - Assert.Empty(source.Take(0)); - - Assert.Empty(source.Take(0..0)); - Assert.Empty(source.Take(^4..0)); - Assert.Empty(source.Take(0..^4)); - Assert.Empty(source.Take(^4..^4)); - } - - [Fact] - public void SourceNonEmptyCountZeroNotIList() - { - var source = ForceNotCollection(new[] { 2, 5, 9, 1 }); - Assert.Empty(source.Take(0)); + foreach (IEnumerable source in CreateSources([2, 5, 9, 1])) + { + Assert.Empty(source.Take(0)); - Assert.Empty(source.Take(0..0)); - Assert.Empty(source.Take(^4..0)); - Assert.Empty(source.Take(0..^4)); - Assert.Empty(source.Take(^4..^4)); + Assert.Empty(source.Take(0..0)); + Assert.Empty(source.Take(^4..0)); + Assert.Empty(source.Take(0..^4)); + Assert.Empty(source.Take(^4..^4)); + } } [Fact] public void SourceNonEmptyCountOne() { - var source = new[] { 2, 5, 9, 1 }; - int[] expected = { 2 }; + int[] expected = [2]; - Assert.Equal(expected, source.Take(1)); - - Assert.Equal(expected, source.Take(0..1)); - Assert.Equal(expected, source.Take(^4..1)); - Assert.Equal(expected, source.Take(0..^3)); - Assert.Equal(expected, source.Take(^4..^3)); - } - - [Fact] - public void SourceNonEmptyCountOneNotIList() - { - var source = ForceNotCollection(new[] { 2, 5, 9, 1 }); - int[] expected = { 2 }; - - Assert.Equal(expected, source.Take(1)); + foreach (IEnumerable source in CreateSources([2, 5, 9, 1])) + { + Assert.Equal(expected, source.Take(1)); - Assert.Equal(expected, source.Take(0..1)); - Assert.Equal(expected, source.Take(^4..1)); - Assert.Equal(expected, source.Take(0..^3)); - Assert.Equal(expected, source.Take(^4..^3)); + Assert.Equal(expected, source.Take(0..1)); + Assert.Equal(expected, source.Take(^4..1)); + Assert.Equal(expected, source.Take(0..^3)); + Assert.Equal(expected, source.Take(^4..^3)); + } } [Fact] public void SourceNonEmptyTakeAllExactly() { - var source = new[] { 2, 5, 9, 1 }; - - Assert.Equal(source, source.Take(source.Length)); - - Assert.Equal(source, source.Take(0..source.Length)); - Assert.Equal(source, source.Take(^source.Length..source.Length)); - Assert.Equal(source, source.Take(0..^0)); - Assert.Equal(source, source.Take(^source.Length..^0)); - } - - [Fact] - public void SourceNonEmptyTakeAllExactlyNotIList() - { - var source = ForceNotCollection(new[] { 2, 5, 9, 1 }); - - Assert.Equal(source, source.Take(source.Count())); + foreach (IEnumerable source in CreateSources([2, 5, 9, 1])) + { + Assert.Equal(source, source.Take(4)); - Assert.Equal(source, source.Take(0..source.Count())); - Assert.Equal(source, source.Take(^source.Count()..source.Count())); - Assert.Equal(source, source.Take(0..^0)); - Assert.Equal(source, source.Take(^source.Count()..^0)); + Assert.Equal(source, source.Take(0..4)); + Assert.Equal(source, source.Take(^4..4)); + Assert.Equal(source, source.Take(0..^0)); + Assert.Equal(source, source.Take(^4..^0)); + } } [Fact] public void SourceNonEmptyTakeAllButOne() { - var source = new[] { 2, 5, 9, 1 }; - int[] expected = { 2, 5, 9 }; + int[] expected = [2, 5, 9]; - Assert.Equal(expected, source.Take(3)); + foreach (IEnumerable source in CreateSources([2, 5, 9, 1])) + { + Assert.Equal(expected, source.Take(3)); - Assert.Equal(expected, source.Take(0..3)); - Assert.Equal(expected, source.Take(^4..3)); - Assert.Equal(expected, source.Take(0..^1)); - Assert.Equal(expected, source.Take(^4..^1)); + Assert.Equal(expected, source.Take(0..3)); + Assert.Equal(expected, source.Take(^4..3)); + Assert.Equal(expected, source.Take(0..^1)); + Assert.Equal(expected, source.Take(^4..^1)); + } } [Fact] @@ -217,40 +167,16 @@ public void RunOnce() Assert.Equal(expected, source.RunOnce().Take(^4..^1)); } - [Fact] - public void SourceNonEmptyTakeAllButOneNotIList() - { - var source = ForceNotCollection(new[] { 2, 5, 9, 1 }); - int[] expected = { 2, 5, 9 }; - - Assert.Equal(expected, source.RunOnce().Take(3)); - - Assert.Equal(expected, source.RunOnce().Take(0..3)); - Assert.Equal(expected, source.RunOnce().Take(^4..3)); - Assert.Equal(expected, source.RunOnce().Take(0..^1)); - Assert.Equal(expected, source.RunOnce().Take(^4..^1)); - } - [Fact] public void SourceNonEmptyTakeExcessive() { - var source = new int?[] { 2, 5, null, 9, 1 }; - - Assert.Equal(source, source.Take(source.Length + 1)); - - Assert.Equal(source, source.Take(0..(source.Length + 1))); - Assert.Equal(source, source.Take(^(source.Length + 1)..(source.Length + 1))); - } - - [Fact] - public void SourceNonEmptyTakeExcessiveNotIList() - { - var source = ForceNotCollection(new int?[] { 2, 5, null, 9, 1 }); - - Assert.Equal(source, source.Take(source.Count() + 1)); + foreach (IEnumerable source in CreateSources([2, 5, null, 9, 1])) + { + Assert.Equal(source, source.Take(5)); - Assert.Equal(source, source.Take(0..(source.Count() + 1))); - Assert.Equal(source, source.Take(^(source.Count() + 1)..(source.Count() + 1))); + Assert.Equal(source, source.Take(0..5)); + Assert.Equal(source, source.Take(^6..6)); + } } [Fact] @@ -342,741 +268,405 @@ public void ForcedToEnumeratorDoesntEnumerateIList() [Fact] public void FollowWithTake() { - var source = new[] { 5, 6, 7, 8 }; var expected = new[] { 5, 6 }; - Assert.Equal(expected, source.Take(5).Take(3).Take(2).Take(40)); - Assert.Equal(expected, source.Take(0..5).Take(0..3).Take(0..2).Take(0..40)); - Assert.Equal(expected, source.Take(^4..5).Take(^4..3).Take(^3..2).Take(^2..40)); - Assert.Equal(expected, source.Take(0..^0).Take(0..^1).Take(0..^1).Take(0..^0)); - Assert.Equal(expected, source.Take(^4..^0).Take(^4..^1).Take(^3..^1).Take(^2..^0)); - } - - [Fact] - public void FollowWithTakeNotIList() - { - var source = NumberRangeGuaranteedNotCollectionType(5, 4); - var expected = new[] { 5, 6 }; - Assert.Equal(expected, source.Take(5).Take(3).Take(2)); + foreach (IEnumerable source in CreateSources([5, 6, 7, 8])) + { + Assert.Equal(expected, source.Take(5).Take(3).Take(2).Take(40)); - Assert.Equal(expected, source.Take(0..5).Take(0..3).Take(0..2)); - Assert.Equal(expected, source.Take(^4..5).Take(^4..3).Take(^3..2)); - Assert.Equal(expected, source.Take(0..^0).Take(0..^1).Take(0..^1)); - Assert.Equal(expected, source.Take(^4..^0).Take(^4..^1).Take(^3..^1)); + Assert.Equal(expected, source.Take(0..5).Take(0..3).Take(0..2).Take(0..40)); + Assert.Equal(expected, source.Take(^4..5).Take(^4..3).Take(^3..2).Take(^2..40)); + Assert.Equal(expected, source.Take(0..^0).Take(0..^1).Take(0..^1).Take(0..^0)); + Assert.Equal(expected, source.Take(^4..^0).Take(^4..^1).Take(^3..^1).Take(^2..^0)); + } } [Fact] public void FollowWithSkip() { - var source = new[] { 1, 2, 3, 4, 5, 6 }; var expected = new[] { 3, 4, 5 }; - Assert.Equal(expected, source.Take(5).Skip(2).Skip(-4)); - - Assert.Equal(expected, source.Take(0..5).Skip(2).Skip(-4)); - Assert.Equal(expected, source.Take(^6..5).Skip(2).Skip(-4)); - Assert.Equal(expected, source.Take(0..^1).Skip(2).Skip(-4)); - Assert.Equal(expected, source.Take(^6..^1).Skip(2).Skip(-4)); - } - [Fact] - public void FollowWithSkipNotIList() - { - var source = NumberRangeGuaranteedNotCollectionType(1, 6); - var expected = new[] { 3, 4, 5 }; - Assert.Equal(expected, source.Take(5).Skip(2).Skip(-4)); + foreach (IEnumerable source in CreateSources([1, 2, 3, 4, 5, 6])) + { + Assert.Equal(expected, source.Take(5).Skip(2).Skip(-4)); - Assert.Equal(expected, source.Take(0..5).Skip(2).Skip(-4)); - Assert.Equal(expected, source.Take(^6..5).Skip(2).Skip(-4)); - Assert.Equal(expected, source.Take(0..^1).Skip(2).Skip(-4)); - Assert.Equal(expected, source.Take(^6..^1).Skip(2).Skip(-4)); + Assert.Equal(expected, source.Take(0..5).Skip(2).Skip(-4)); + Assert.Equal(expected, source.Take(^6..5).Skip(2).Skip(-4)); + Assert.Equal(expected, source.Take(0..^1).Skip(2).Skip(-4)); + Assert.Equal(expected, source.Take(^6..^1).Skip(2).Skip(-4)); + } } [Fact] public void ElementAt() { - var source = new[] { 1, 2, 3, 4, 5, 6 }; - var taken0 = source.Take(3); - Assert.Equal(1, taken0.ElementAt(0)); - Assert.Equal(3, taken0.ElementAt(2)); - Assert.Throws("index", () => taken0.ElementAt(-1)); - Assert.Throws("index", () => taken0.ElementAt(3)); - - var taken1 = source.Take(0..3); - Assert.Equal(1, taken1.ElementAt(0)); - Assert.Equal(3, taken1.ElementAt(2)); - Assert.Throws("index", () => taken1.ElementAt(-1)); - Assert.Throws("index", () => taken1.ElementAt(3)); - - var taken2 = source.Take(^6..3); - Assert.Equal(1, taken2.ElementAt(0)); - Assert.Equal(3, taken2.ElementAt(2)); - Assert.Throws("index", () => taken2.ElementAt(-1)); - Assert.Throws("index", () => taken2.ElementAt(3)); - - var taken3 = source.Take(0..^3); - Assert.Equal(1, taken3.ElementAt(0)); - Assert.Equal(3, taken3.ElementAt(2)); - Assert.Throws("index", () => taken3.ElementAt(-1)); - Assert.Throws("index", () => taken3.ElementAt(3)); - - var taken4 = source.Take(^6..^3); - Assert.Equal(1, taken4.ElementAt(0)); - Assert.Equal(3, taken4.ElementAt(2)); - Assert.Throws("index", () => taken4.ElementAt(-1)); - Assert.Throws("index", () => taken4.ElementAt(3)); - } - - [Fact] - public void ElementAtNotIList() - { - var source = ForceNotCollection(new[] { 1, 2, 3, 4, 5, 6 }); - var taken0 = source.Take(3); - Assert.Equal(1, taken0.ElementAt(0)); - Assert.Equal(3, taken0.ElementAt(2)); - Assert.Throws("index", () => taken0.ElementAt(-1)); - Assert.Throws("index", () => taken0.ElementAt(3)); - - var taken1 = source.Take(0..3); - Assert.Equal(1, taken1.ElementAt(0)); - Assert.Equal(3, taken1.ElementAt(2)); - Assert.Throws("index", () => taken1.ElementAt(-1)); - Assert.Throws("index", () => taken1.ElementAt(3)); - - var taken2 = source.Take(^6..3); - Assert.Equal(1, taken2.ElementAt(0)); - Assert.Equal(3, taken2.ElementAt(2)); - Assert.Throws("index", () => taken2.ElementAt(-1)); - Assert.Throws("index", () => taken2.ElementAt(3)); - - var taken3 = source.Take(0..^3); - Assert.Equal(1, taken3.ElementAt(0)); - Assert.Equal(3, taken3.ElementAt(2)); - Assert.Throws("index", () => taken3.ElementAt(-1)); - Assert.Throws("index", () => taken3.ElementAt(3)); - - var taken4 = source.Take(^6..^3); - Assert.Equal(1, taken4.ElementAt(0)); - Assert.Equal(3, taken4.ElementAt(2)); - Assert.Throws("index", () => taken4.ElementAt(-1)); - Assert.Throws("index", () => taken4.ElementAt(3)); + foreach (IEnumerable source in CreateSources([1, 2, 3, 4, 5, 6])) + { + var taken0 = source.Take(3); + Assert.Equal(1, taken0.ElementAt(0)); + Assert.Equal(3, taken0.ElementAt(2)); + Assert.Throws("index", () => taken0.ElementAt(-1)); + Assert.Throws("index", () => taken0.ElementAt(3)); + + var taken1 = source.Take(0..3); + Assert.Equal(1, taken1.ElementAt(0)); + Assert.Equal(3, taken1.ElementAt(2)); + Assert.Throws("index", () => taken1.ElementAt(-1)); + Assert.Throws("index", () => taken1.ElementAt(3)); + + var taken2 = source.Take(^6..3); + Assert.Equal(1, taken2.ElementAt(0)); + Assert.Equal(3, taken2.ElementAt(2)); + Assert.Throws("index", () => taken2.ElementAt(-1)); + Assert.Throws("index", () => taken2.ElementAt(3)); + + var taken3 = source.Take(0..^3); + Assert.Equal(1, taken3.ElementAt(0)); + Assert.Equal(3, taken3.ElementAt(2)); + Assert.Throws("index", () => taken3.ElementAt(-1)); + Assert.Throws("index", () => taken3.ElementAt(3)); + + var taken4 = source.Take(^6..^3); + Assert.Equal(1, taken4.ElementAt(0)); + Assert.Equal(3, taken4.ElementAt(2)); + Assert.Throws("index", () => taken4.ElementAt(-1)); + Assert.Throws("index", () => taken4.ElementAt(3)); + } } [Fact] public void ElementAtOrDefault() { - var source = new[] { 1, 2, 3, 4, 5, 6 }; - var taken0 = source.Take(3); - Assert.Equal(1, taken0.ElementAtOrDefault(0)); - Assert.Equal(3, taken0.ElementAtOrDefault(2)); - Assert.Equal(0, taken0.ElementAtOrDefault(-1)); - Assert.Equal(0, taken0.ElementAtOrDefault(3)); - - var taken1 = source.Take(0..3); - Assert.Equal(1, taken1.ElementAtOrDefault(0)); - Assert.Equal(3, taken1.ElementAtOrDefault(2)); - Assert.Equal(0, taken1.ElementAtOrDefault(-1)); - Assert.Equal(0, taken1.ElementAtOrDefault(3)); - - var taken2 = source.Take(^6..3); - Assert.Equal(1, taken2.ElementAtOrDefault(0)); - Assert.Equal(3, taken2.ElementAtOrDefault(2)); - Assert.Equal(0, taken2.ElementAtOrDefault(-1)); - Assert.Equal(0, taken2.ElementAtOrDefault(3)); - - var taken3 = source.Take(0..^3); - Assert.Equal(1, taken3.ElementAtOrDefault(0)); - Assert.Equal(3, taken3.ElementAtOrDefault(2)); - Assert.Equal(0, taken3.ElementAtOrDefault(-1)); - Assert.Equal(0, taken3.ElementAtOrDefault(3)); - - var taken4 = source.Take(^6..^3); - Assert.Equal(1, taken4.ElementAtOrDefault(0)); - Assert.Equal(3, taken4.ElementAtOrDefault(2)); - Assert.Equal(0, taken4.ElementAtOrDefault(-1)); - Assert.Equal(0, taken4.ElementAtOrDefault(3)); - } - - [Fact] - public void ElementAtOrDefaultNotIList() - { - var source = ForceNotCollection(new[] { 1, 2, 3, 4, 5, 6 }); - var taken0 = source.Take(3); - Assert.Equal(1, taken0.ElementAtOrDefault(0)); - Assert.Equal(3, taken0.ElementAtOrDefault(2)); - Assert.Equal(0, taken0.ElementAtOrDefault(-1)); - Assert.Equal(0, taken0.ElementAtOrDefault(3)); - - var taken1 = source.Take(0..3); - Assert.Equal(1, taken1.ElementAtOrDefault(0)); - Assert.Equal(3, taken1.ElementAtOrDefault(2)); - Assert.Equal(0, taken1.ElementAtOrDefault(-1)); - Assert.Equal(0, taken1.ElementAtOrDefault(3)); - - var taken2 = source.Take(^6..3); - Assert.Equal(1, taken2.ElementAtOrDefault(0)); - Assert.Equal(3, taken2.ElementAtOrDefault(2)); - Assert.Equal(0, taken2.ElementAtOrDefault(-1)); - Assert.Equal(0, taken2.ElementAtOrDefault(3)); - - var taken3 = source.Take(0..^3); - Assert.Equal(1, taken3.ElementAtOrDefault(0)); - Assert.Equal(3, taken3.ElementAtOrDefault(2)); - Assert.Equal(0, taken3.ElementAtOrDefault(-1)); - Assert.Equal(0, taken3.ElementAtOrDefault(3)); - - var taken4 = source.Take(^6..^3); - Assert.Equal(1, taken4.ElementAtOrDefault(0)); - Assert.Equal(3, taken4.ElementAtOrDefault(2)); - Assert.Equal(0, taken4.ElementAtOrDefault(-1)); - Assert.Equal(0, taken4.ElementAtOrDefault(3)); + foreach (IEnumerable source in CreateSources([1, 2, 3, 4, 5, 6])) + { + var taken0 = source.Take(3); + Assert.Equal(1, taken0.ElementAtOrDefault(0)); + Assert.Equal(3, taken0.ElementAtOrDefault(2)); + Assert.Equal(0, taken0.ElementAtOrDefault(-1)); + Assert.Equal(0, taken0.ElementAtOrDefault(3)); + + var taken1 = source.Take(0..3); + Assert.Equal(1, taken1.ElementAtOrDefault(0)); + Assert.Equal(3, taken1.ElementAtOrDefault(2)); + Assert.Equal(0, taken1.ElementAtOrDefault(-1)); + Assert.Equal(0, taken1.ElementAtOrDefault(3)); + + var taken2 = source.Take(^6..3); + Assert.Equal(1, taken2.ElementAtOrDefault(0)); + Assert.Equal(3, taken2.ElementAtOrDefault(2)); + Assert.Equal(0, taken2.ElementAtOrDefault(-1)); + Assert.Equal(0, taken2.ElementAtOrDefault(3)); + + var taken3 = source.Take(0..^3); + Assert.Equal(1, taken3.ElementAtOrDefault(0)); + Assert.Equal(3, taken3.ElementAtOrDefault(2)); + Assert.Equal(0, taken3.ElementAtOrDefault(-1)); + Assert.Equal(0, taken3.ElementAtOrDefault(3)); + + var taken4 = source.Take(^6..^3); + Assert.Equal(1, taken4.ElementAtOrDefault(0)); + Assert.Equal(3, taken4.ElementAtOrDefault(2)); + Assert.Equal(0, taken4.ElementAtOrDefault(-1)); + Assert.Equal(0, taken4.ElementAtOrDefault(3)); + } } [Fact] public void First() { - var source = new[] { 1, 2, 3, 4, 5 }; - Assert.Equal(1, source.Take(1).First()); - Assert.Equal(1, source.Take(4).First()); - Assert.Equal(1, source.Take(40).First()); - Assert.Throws(() => source.Take(0).First()); - Assert.Throws(() => source.Skip(5).Take(10).First()); - - Assert.Equal(1, source.Take(0..1).First()); - Assert.Equal(1, source.Take(0..4).First()); - Assert.Equal(1, source.Take(0..40).First()); - Assert.Throws(() => source.Take(0..0).First()); - Assert.Throws(() => source.Skip(5).Take(0..10).First()); - - Assert.Equal(1, source.Take(^5..1).First()); - Assert.Equal(1, source.Take(^5..4).First()); - Assert.Equal(1, source.Take(^5..40).First()); - Assert.Throws(() => source.Take(^5..0).First()); - Assert.Throws(() => source.Skip(5).Take(^5..10).First()); - - Assert.Equal(1, source.Take(0..^4).First()); - Assert.Equal(1, source.Take(0..^1).First()); - Assert.Equal(1, source.Take(0..^0).First()); - Assert.Throws(() => source.Take(0..^5).First()); - Assert.Throws(() => source.Skip(5).Take(0..^5).First()); - - Assert.Equal(1, source.Take(^5..^4).First()); - Assert.Equal(1, source.Take(^5..^1).First()); - Assert.Equal(1, source.Take(^5..^0).First()); - Assert.Throws(() => source.Take(^5..^5).First()); - Assert.Throws(() => source.Skip(5).Take(^10..^0).First()); - } - - [Fact] - public void FirstNotIList() - { - var source = ForceNotCollection(new[] { 1, 2, 3, 4, 5 }); - Assert.Equal(1, source.Take(1).First()); - Assert.Equal(1, source.Take(4).First()); - Assert.Equal(1, source.Take(40).First()); - Assert.Throws(() => source.Take(0).First()); - Assert.Throws(() => source.Skip(5).Take(10).First()); - - Assert.Equal(1, source.Take(0..1).First()); - Assert.Equal(1, source.Take(0..4).First()); - Assert.Equal(1, source.Take(0..40).First()); - Assert.Throws(() => source.Take(0..0).First()); - Assert.Throws(() => source.Skip(5).Take(0..10).First()); - - Assert.Equal(1, source.Take(^5..1).First()); - Assert.Equal(1, source.Take(^5..4).First()); - Assert.Equal(1, source.Take(^5..40).First()); - Assert.Throws(() => source.Take(^5..0).First()); - Assert.Throws(() => source.Skip(5).Take(^5..10).First()); - - Assert.Equal(1, source.Take(0..^4).First()); - Assert.Equal(1, source.Take(0..^1).First()); - Assert.Equal(1, source.Take(0..^0).First()); - Assert.Throws(() => source.Take(0..^5).First()); - Assert.Throws(() => source.Skip(5).Take(0..^5).First()); - - Assert.Equal(1, source.Take(^5..^4).First()); - Assert.Equal(1, source.Take(^5..^1).First()); - Assert.Equal(1, source.Take(^5..^0).First()); - Assert.Throws(() => source.Take(^5..^5).First()); - Assert.Throws(() => source.Skip(5).Take(^10..^0).First()); + foreach (IEnumerable source in CreateSources([1, 2, 3, 4, 5])) + { + Assert.Equal(1, source.Take(1).First()); + Assert.Equal(1, source.Take(4).First()); + Assert.Equal(1, source.Take(40).First()); + Assert.Throws(() => source.Take(0).First()); + Assert.Throws(() => source.Skip(5).Take(10).First()); + + Assert.Equal(1, source.Take(0..1).First()); + Assert.Equal(1, source.Take(0..4).First()); + Assert.Equal(1, source.Take(0..40).First()); + Assert.Throws(() => source.Take(0..0).First()); + Assert.Throws(() => source.Skip(5).Take(0..10).First()); + + Assert.Equal(1, source.Take(^5..1).First()); + Assert.Equal(1, source.Take(^5..4).First()); + Assert.Equal(1, source.Take(^5..40).First()); + Assert.Throws(() => source.Take(^5..0).First()); + Assert.Throws(() => source.Skip(5).Take(^5..10).First()); + + Assert.Equal(1, source.Take(0..^4).First()); + Assert.Equal(1, source.Take(0..^1).First()); + Assert.Equal(1, source.Take(0..^0).First()); + Assert.Throws(() => source.Take(0..^5).First()); + Assert.Throws(() => source.Skip(5).Take(0..^5).First()); + + Assert.Equal(1, source.Take(^5..^4).First()); + Assert.Equal(1, source.Take(^5..^1).First()); + Assert.Equal(1, source.Take(^5..^0).First()); + Assert.Throws(() => source.Take(^5..^5).First()); + Assert.Throws(() => source.Skip(5).Take(^10..^0).First()); + } } [Fact] public void FirstOrDefault() { - var source = new[] { 1, 2, 3, 4, 5 }; - Assert.Equal(1, source.Take(1).FirstOrDefault()); - Assert.Equal(1, source.Take(4).FirstOrDefault()); - Assert.Equal(1, source.Take(40).FirstOrDefault()); - Assert.Equal(0, source.Take(0).FirstOrDefault()); - Assert.Equal(0, source.Skip(5).Take(10).FirstOrDefault()); - - Assert.Equal(1, source.Take(0..1).FirstOrDefault()); - Assert.Equal(1, source.Take(0..4).FirstOrDefault()); - Assert.Equal(1, source.Take(0..40).FirstOrDefault()); - Assert.Equal(0, source.Take(0..0).FirstOrDefault()); - Assert.Equal(0, source.Skip(5).Take(0..10).FirstOrDefault()); - - Assert.Equal(1, source.Take(^5..1).FirstOrDefault()); - Assert.Equal(1, source.Take(^5..4).FirstOrDefault()); - Assert.Equal(1, source.Take(^5..40).FirstOrDefault()); - Assert.Equal(0, source.Take(^5..0).FirstOrDefault()); - Assert.Equal(0, source.Skip(5).Take(^10..10).FirstOrDefault()); - - Assert.Equal(1, source.Take(0..^4).FirstOrDefault()); - Assert.Equal(1, source.Take(0..^1).FirstOrDefault()); - Assert.Equal(1, source.Take(0..^0).FirstOrDefault()); - Assert.Equal(0, source.Take(0..^5).FirstOrDefault()); - Assert.Equal(0, source.Skip(5).Take(0..^10).FirstOrDefault()); - - Assert.Equal(1, source.Take(^5..^4).FirstOrDefault()); - Assert.Equal(1, source.Take(^5..^1).FirstOrDefault()); - Assert.Equal(1, source.Take(^5..^0).FirstOrDefault()); - Assert.Equal(0, source.Take(^5..^5).FirstOrDefault()); - Assert.Equal(0, source.Skip(5).Take(^10..^0).FirstOrDefault()); - } - - [Fact] - public void FirstOrDefaultNotIList() - { - var source = ForceNotCollection(new[] { 1, 2, 3, 4, 5 }); - Assert.Equal(1, source.Take(1).FirstOrDefault()); - Assert.Equal(1, source.Take(4).FirstOrDefault()); - Assert.Equal(1, source.Take(40).FirstOrDefault()); - Assert.Equal(0, source.Take(0).FirstOrDefault()); - Assert.Equal(0, source.Skip(5).Take(10).FirstOrDefault()); - - Assert.Equal(1, source.Take(0..1).FirstOrDefault()); - Assert.Equal(1, source.Take(0..4).FirstOrDefault()); - Assert.Equal(1, source.Take(0..40).FirstOrDefault()); - Assert.Equal(0, source.Take(0..0).FirstOrDefault()); - Assert.Equal(0, source.Skip(5).Take(0..10).FirstOrDefault()); - - Assert.Equal(1, source.Take(^5..1).FirstOrDefault()); - Assert.Equal(1, source.Take(^5..4).FirstOrDefault()); - Assert.Equal(1, source.Take(^5..40).FirstOrDefault()); - Assert.Equal(0, source.Take(^5..0).FirstOrDefault()); - Assert.Equal(0, source.Skip(5).Take(^10..10).FirstOrDefault()); - - Assert.Equal(1, source.Take(0..^4).FirstOrDefault()); - Assert.Equal(1, source.Take(0..^1).FirstOrDefault()); - Assert.Equal(1, source.Take(0..^0).FirstOrDefault()); - Assert.Equal(0, source.Take(0..^5).FirstOrDefault()); - Assert.Equal(0, source.Skip(5).Take(0..^10).FirstOrDefault()); - - Assert.Equal(1, source.Take(^5..^4).FirstOrDefault()); - Assert.Equal(1, source.Take(^5..^1).FirstOrDefault()); - Assert.Equal(1, source.Take(^5..^0).FirstOrDefault()); - Assert.Equal(0, source.Take(^5..^5).FirstOrDefault()); - Assert.Equal(0, source.Skip(5).Take(^10..^0).FirstOrDefault()); + foreach (IEnumerable source in CreateSources([1, 2, 3, 4, 5])) + { + Assert.Equal(1, source.Take(1).FirstOrDefault()); + Assert.Equal(1, source.Take(4).FirstOrDefault()); + Assert.Equal(1, source.Take(40).FirstOrDefault()); + Assert.Equal(0, source.Take(0).FirstOrDefault()); + Assert.Equal(0, source.Skip(5).Take(10).FirstOrDefault()); + + Assert.Equal(1, source.Take(0..1).FirstOrDefault()); + Assert.Equal(1, source.Take(0..4).FirstOrDefault()); + Assert.Equal(1, source.Take(0..40).FirstOrDefault()); + Assert.Equal(0, source.Take(0..0).FirstOrDefault()); + Assert.Equal(0, source.Skip(5).Take(0..10).FirstOrDefault()); + + Assert.Equal(1, source.Take(^5..1).FirstOrDefault()); + Assert.Equal(1, source.Take(^5..4).FirstOrDefault()); + Assert.Equal(1, source.Take(^5..40).FirstOrDefault()); + Assert.Equal(0, source.Take(^5..0).FirstOrDefault()); + Assert.Equal(0, source.Skip(5).Take(^10..10).FirstOrDefault()); + + Assert.Equal(1, source.Take(0..^4).FirstOrDefault()); + Assert.Equal(1, source.Take(0..^1).FirstOrDefault()); + Assert.Equal(1, source.Take(0..^0).FirstOrDefault()); + Assert.Equal(0, source.Take(0..^5).FirstOrDefault()); + Assert.Equal(0, source.Skip(5).Take(0..^10).FirstOrDefault()); + + Assert.Equal(1, source.Take(^5..^4).FirstOrDefault()); + Assert.Equal(1, source.Take(^5..^1).FirstOrDefault()); + Assert.Equal(1, source.Take(^5..^0).FirstOrDefault()); + Assert.Equal(0, source.Take(^5..^5).FirstOrDefault()); + Assert.Equal(0, source.Skip(5).Take(^10..^0).FirstOrDefault()); + } } [Fact] public void Last() { - var source = new[] { 1, 2, 3, 4, 5 }; - Assert.Equal(1, source.Take(1).Last()); - Assert.Equal(5, source.Take(5).Last()); - Assert.Equal(5, source.Take(40).Last()); - Assert.Throws(() => source.Take(0).Last()); - Assert.Throws(() => Array.Empty().Take(40).Last()); - - Assert.Equal(1, source.Take(0..1).Last()); - Assert.Equal(5, source.Take(0..5).Last()); - Assert.Equal(5, source.Take(0..40).Last()); - Assert.Throws(() => source.Take(0..0).Last()); - Assert.Throws(() => Array.Empty().Take(0..40).Last()); - - Assert.Equal(1, source.Take(^5..1).Last()); - Assert.Equal(5, source.Take(^5..5).Last()); - Assert.Equal(5, source.Take(^5..40).Last()); - Assert.Throws(() => source.Take(^5..0).Last()); - Assert.Throws(() => Array.Empty().Take(^5..40).Last()); - - Assert.Equal(1, source.Take(0..^4).Last()); - Assert.Equal(5, source.Take(0..^0).Last()); - Assert.Equal(5, source.Take(3..^0).Last()); - Assert.Throws(() => source.Take(0..^5).Last()); - Assert.Throws(() => Array.Empty().Take(0..^0).Last()); - - Assert.Equal(1, source.Take(^5..^4).Last()); - Assert.Equal(5, source.Take(^5..^0).Last()); - Assert.Equal(5, source.Take(^5..^0).Last()); - Assert.Throws(() => source.Take(^5..^5).Last()); - Assert.Throws(() => Array.Empty().Take(^40..^0).Last()); - } - - [Fact] - public void LastNotIList() - { - var source = ForceNotCollection(new[] { 1, 2, 3, 4, 5 }); - Assert.Equal(1, source.Take(1).Last()); - Assert.Equal(5, source.Take(5).Last()); - Assert.Equal(5, source.Take(40).Last()); - Assert.Throws(() => source.Take(0).Last()); - Assert.Throws(() => ForceNotCollection(Array.Empty()).Take(40).Last()); - - Assert.Equal(1, source.Take(0..1).Last()); - Assert.Equal(5, source.Take(0..5).Last()); - Assert.Equal(5, source.Take(0..40).Last()); - Assert.Throws(() => source.Take(0..0).Last()); - Assert.Throws(() => ForceNotCollection(Array.Empty()).Take(0..40).Last()); - - Assert.Equal(1, source.Take(^5..1).Last()); - Assert.Equal(5, source.Take(^5..5).Last()); - Assert.Equal(5, source.Take(^5..40).Last()); - Assert.Throws(() => source.Take(^5..0).Last()); - Assert.Throws(() => ForceNotCollection(Array.Empty()).Take(^5..40).Last()); - - Assert.Equal(1, source.Take(0..^4).Last()); - Assert.Equal(5, source.Take(0..^0).Last()); - Assert.Equal(5, source.Take(3..^0).Last()); - Assert.Throws(() => source.Take(0..^5).Last()); - Assert.Throws(() => ForceNotCollection(Array.Empty()).Take(0..^0).Last()); - - Assert.Equal(1, source.Take(^5..^4).Last()); - Assert.Equal(5, source.Take(^5..^0).Last()); - Assert.Equal(5, source.Take(^5..^0).Last()); - Assert.Throws(() => source.Take(^5..^5).Last()); - Assert.Throws(() => ForceNotCollection(Array.Empty()).Take(^40..^0).Last()); + foreach (var source in CreateSources([1, 2, 3, 4, 5])) + { + Assert.Equal(1, source.Take(1).Last()); + Assert.Equal(2, source.Take(2).Last()); + Assert.Equal(3, source.Take(3).Last()); + Assert.Equal(4, source.Take(4).Last()); + Assert.Equal(5, source.Take(5).Last()); + Assert.Equal(5, source.Take(6).Last()); + Assert.Equal(5, source.Take(40).Last()); + Assert.Throws(() => source.Take(0).Last()); + Assert.Throws(() => Array.Empty().Take(40).Last()); + + Assert.Equal(1, source.Take(0..1).Last()); + Assert.Equal(5, source.Take(0..5).Last()); + Assert.Equal(5, source.Take(0..40).Last()); + Assert.Throws(() => source.Take(0..0).Last()); + Assert.Throws(() => Array.Empty().Take(0..40).Last()); + + Assert.Equal(1, source.Take(^5..1).Last()); + Assert.Equal(5, source.Take(^5..5).Last()); + Assert.Equal(5, source.Take(^5..40).Last()); + Assert.Throws(() => source.Take(^5..0).Last()); + Assert.Throws(() => Array.Empty().Take(^5..40).Last()); + + Assert.Equal(1, source.Take(0..^4).Last()); + Assert.Equal(5, source.Take(0..^0).Last()); + Assert.Equal(5, source.Take(3..^0).Last()); + Assert.Throws(() => source.Take(0..^5).Last()); + Assert.Throws(() => Array.Empty().Take(0..^0).Last()); + + Assert.Equal(1, source.Take(^5..^4).Last()); + Assert.Equal(5, source.Take(^5..^0).Last()); + Assert.Equal(5, source.Take(^5..^0).Last()); + Assert.Throws(() => source.Take(^5..^5).Last()); + Assert.Throws(() => Array.Empty().Take(^40..^0).Last()); + } } [Fact] public void LastOrDefault() { - var source = new[] { 1, 2, 3, 4, 5 }; - Assert.Equal(1, source.Take(1).LastOrDefault()); - Assert.Equal(5, source.Take(5).LastOrDefault()); - Assert.Equal(5, source.Take(40).LastOrDefault()); - Assert.Equal(0, source.Take(0).LastOrDefault()); - Assert.Equal(0, Array.Empty().Take(40).LastOrDefault()); - - Assert.Equal(1, source.Take(0..1).LastOrDefault()); - Assert.Equal(5, source.Take(0..5).LastOrDefault()); - Assert.Equal(5, source.Take(0..40).LastOrDefault()); - Assert.Equal(0, source.Take(0..0).LastOrDefault()); - Assert.Equal(0, Array.Empty().Take(0..40).LastOrDefault()); - - Assert.Equal(1, source.Take(^5..1).LastOrDefault()); - Assert.Equal(5, source.Take(^5..5).LastOrDefault()); - Assert.Equal(5, source.Take(^5..40).LastOrDefault()); - Assert.Equal(0, source.Take(^5..0).LastOrDefault()); - Assert.Equal(0, Array.Empty().Take(^5..40).LastOrDefault()); - - Assert.Equal(1, source.Take(0..^4).LastOrDefault()); - Assert.Equal(5, source.Take(0..^0).LastOrDefault()); - Assert.Equal(5, source.Take(3..^0).LastOrDefault()); - Assert.Equal(0, source.Take(0..^5).LastOrDefault()); - Assert.Equal(0, Array.Empty().Take(0..^0).LastOrDefault()); - - Assert.Equal(1, source.Take(^5..^4).LastOrDefault()); - Assert.Equal(5, source.Take(^5..^0).LastOrDefault()); - Assert.Equal(5, source.Take(^40..^0).LastOrDefault()); - Assert.Equal(0, source.Take(^5..^5).LastOrDefault()); - Assert.Equal(0, Array.Empty().Take(^40..^0).LastOrDefault()); - } - - [Fact] - public void LastOrDefaultNotIList() - { - var source = ForceNotCollection(new[] { 1, 2, 3, 4, 5 }); - Assert.Equal(1, source.Take(1).LastOrDefault()); - Assert.Equal(5, source.Take(5).LastOrDefault()); - Assert.Equal(5, source.Take(40).LastOrDefault()); - Assert.Equal(0, source.Take(0).LastOrDefault()); - Assert.Equal(0, ForceNotCollection(Array.Empty()).Take(40).LastOrDefault()); - - Assert.Equal(1, source.Take(0..1).LastOrDefault()); - Assert.Equal(5, source.Take(0..5).LastOrDefault()); - Assert.Equal(5, source.Take(0..40).LastOrDefault()); - Assert.Equal(0, source.Take(0..0).LastOrDefault()); - Assert.Equal(0, ForceNotCollection(Array.Empty()).Take(0..40).LastOrDefault()); - - Assert.Equal(1, source.Take(^5..1).LastOrDefault()); - Assert.Equal(5, source.Take(^5..5).LastOrDefault()); - Assert.Equal(5, source.Take(^5..40).LastOrDefault()); - Assert.Equal(0, source.Take(^5..0).LastOrDefault()); - Assert.Equal(0, ForceNotCollection(Array.Empty()).Take(^5..40).LastOrDefault()); - - Assert.Equal(1, source.Take(0..^4).LastOrDefault()); - Assert.Equal(5, source.Take(0..^0).LastOrDefault()); - Assert.Equal(5, source.Take(3..^0).LastOrDefault()); - Assert.Equal(0, source.Take(0..^5).LastOrDefault()); - Assert.Equal(0, ForceNotCollection(Array.Empty()).Take(0..^0).LastOrDefault()); - - Assert.Equal(1, source.Take(^5..^4).LastOrDefault()); - Assert.Equal(5, source.Take(^5..^0).LastOrDefault()); - Assert.Equal(5, source.Take(^40..^0).LastOrDefault()); - Assert.Equal(0, source.Take(^5..^5).LastOrDefault()); - Assert.Equal(0, ForceNotCollection(Array.Empty()).Take(^40..^0).LastOrDefault()); + foreach (var source in CreateSources([1, 2, 3, 4, 5])) + { + Assert.Equal(1, source.Take(1).LastOrDefault()); + Assert.Equal(2, source.Take(2).LastOrDefault()); + Assert.Equal(3, source.Take(3).LastOrDefault()); + Assert.Equal(4, source.Take(4).LastOrDefault()); + Assert.Equal(5, source.Take(5).LastOrDefault()); + Assert.Equal(5, source.Take(6).LastOrDefault()); + Assert.Equal(5, source.Take(40).LastOrDefault()); + Assert.Equal(0, source.Take(0).LastOrDefault()); + Assert.Equal(0, Array.Empty().Take(40).LastOrDefault()); + + Assert.Equal(1, source.Take(0..1).LastOrDefault()); + Assert.Equal(5, source.Take(0..5).LastOrDefault()); + Assert.Equal(5, source.Take(0..40).LastOrDefault()); + Assert.Equal(0, source.Take(0..0).LastOrDefault()); + Assert.Equal(0, Array.Empty().Take(0..40).LastOrDefault()); + + Assert.Equal(1, source.Take(^5..1).LastOrDefault()); + Assert.Equal(5, source.Take(^5..5).LastOrDefault()); + Assert.Equal(5, source.Take(^5..40).LastOrDefault()); + Assert.Equal(0, source.Take(^5..0).LastOrDefault()); + Assert.Equal(0, Array.Empty().Take(^5..40).LastOrDefault()); + + Assert.Equal(1, source.Take(0..^4).LastOrDefault()); + Assert.Equal(5, source.Take(0..^0).LastOrDefault()); + Assert.Equal(5, source.Take(3..^0).LastOrDefault()); + Assert.Equal(0, source.Take(0..^5).LastOrDefault()); + Assert.Equal(0, Array.Empty().Take(0..^0).LastOrDefault()); + + Assert.Equal(1, source.Take(^5..^4).LastOrDefault()); + Assert.Equal(5, source.Take(^5..^0).LastOrDefault()); + Assert.Equal(5, source.Take(^40..^0).LastOrDefault()); + Assert.Equal(0, source.Take(^5..^5).LastOrDefault()); + Assert.Equal(0, Array.Empty().Take(^40..^0).LastOrDefault()); + } } [Fact] public void ToArray() { - var source = new[] { 1, 2, 3, 4, 5 }; - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(5).ToArray()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(6).ToArray()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(40).ToArray()); - Assert.Equal(new[] { 1, 2, 3, 4 }, source.Take(4).ToArray()); - Assert.Equal(1, source.Take(1).ToArray().Single()); - Assert.Empty(source.Take(0).ToArray()); - Assert.Empty(source.Take(-10).ToArray()); - - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(0..5).ToArray()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(0..6).ToArray()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(0..40).ToArray()); - Assert.Equal(new[] { 1, 2, 3, 4 }, source.Take(0..4).ToArray()); - Assert.Equal(1, source.Take(0..1).ToArray().Single()); - Assert.Empty(source.Take(0..0).ToArray()); - - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^5..5).ToArray()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^5..6).ToArray()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^5..40).ToArray()); - Assert.Equal(new[] { 1, 2, 3, 4 }, source.Take(^5..4).ToArray()); - Assert.Equal(1, source.Take(^5..1).ToArray().Single()); - Assert.Empty(source.Take(^5..0).ToArray()); - Assert.Empty(source.Take(^15..0).ToArray()); - - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(0..^0).ToArray()); - Assert.Equal(new[] { 1, 2, 3, 4 }, source.Take(0..^1).ToArray()); - Assert.Equal(1, source.Take(0..^4).ToArray().Single()); - Assert.Empty(source.Take(0..^5).ToArray()); - Assert.Empty(source.Take(0..^15).ToArray()); - - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^5..^0).ToArray()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^6..^0).ToArray()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^45..^0).ToArray()); - Assert.Equal(new[] { 1, 2, 3, 4 }, source.Take(^5..^1).ToArray()); - Assert.Equal(1, source.Take(^5..^4).ToArray().Single()); - Assert.Empty(source.Take(^5..^5).ToArray()); - Assert.Empty(source.Take(^15..^5).ToArray()); - } - - [Fact] - public void ToArrayNotList() - { - var source = ForceNotCollection(new[] { 1, 2, 3, 4, 5 }); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(5).ToArray()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(6).ToArray()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(40).ToArray()); - Assert.Equal(new[] { 1, 2, 3, 4 }, source.Take(4).ToArray()); - Assert.Equal(1, source.Take(1).ToArray().Single()); - Assert.Empty(source.Take(0).ToArray()); - Assert.Empty(source.Take(-10).ToArray()); - - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(0..5).ToArray()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(0..6).ToArray()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(0..40).ToArray()); - Assert.Equal(new[] { 1, 2, 3, 4 }, source.Take(0..4).ToArray()); - Assert.Equal(1, source.Take(0..1).ToArray().Single()); - Assert.Empty(source.Take(0..0).ToArray()); - - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^5..5).ToArray()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^5..6).ToArray()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^5..40).ToArray()); - Assert.Equal(new[] { 1, 2, 3, 4 }, source.Take(^5..4).ToArray()); - Assert.Equal(1, source.Take(^5..1).ToArray().Single()); - Assert.Empty(source.Take(^5..0).ToArray()); - Assert.Empty(source.Take(^15..0).ToArray()); - - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(0..^0).ToArray()); - Assert.Equal(new[] { 1, 2, 3, 4 }, source.Take(0..^1).ToArray()); - Assert.Equal(1, source.Take(0..^4).ToArray().Single()); - Assert.Empty(source.Take(0..^5).ToArray()); - Assert.Empty(source.Take(0..^15).ToArray()); - - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^5..^0).ToArray()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^6..^0).ToArray()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^45..^0).ToArray()); - Assert.Equal(new[] { 1, 2, 3, 4 }, source.Take(^5..^1).ToArray()); - Assert.Equal(1, source.Take(^5..^4).ToArray().Single()); - Assert.Empty(source.Take(^5..^5).ToArray()); - Assert.Empty(source.Take(^15..^5).ToArray()); + foreach (var source in CreateSources([1, 2, 3, 4, 5])) + { + Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(5).ToArray()); + Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(6).ToArray()); + Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(40).ToArray()); + Assert.Equal(new[] { 1, 2, 3, 4 }, source.Take(4).ToArray()); + Assert.Equal(1, source.Take(1).ToArray().Single()); + Assert.Empty(source.Take(0).ToArray()); + Assert.Empty(source.Take(-10).ToArray()); + + Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(0..5).ToArray()); + Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(0..6).ToArray()); + Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(0..40).ToArray()); + Assert.Equal(new[] { 1, 2, 3, 4 }, source.Take(0..4).ToArray()); + Assert.Equal(1, source.Take(0..1).ToArray().Single()); + Assert.Empty(source.Take(0..0).ToArray()); + + Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^5..5).ToArray()); + Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^5..6).ToArray()); + Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^5..40).ToArray()); + Assert.Equal(new[] { 1, 2, 3, 4 }, source.Take(^5..4).ToArray()); + Assert.Equal(1, source.Take(^5..1).ToArray().Single()); + Assert.Empty(source.Take(^5..0).ToArray()); + Assert.Empty(source.Take(^15..0).ToArray()); + + Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(0..^0).ToArray()); + Assert.Equal(new[] { 1, 2, 3, 4 }, source.Take(0..^1).ToArray()); + Assert.Equal(1, source.Take(0..^4).ToArray().Single()); + Assert.Empty(source.Take(0..^5).ToArray()); + Assert.Empty(source.Take(0..^15).ToArray()); + + Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^5..^0).ToArray()); + Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^6..^0).ToArray()); + Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^45..^0).ToArray()); + Assert.Equal(new[] { 1, 2, 3, 4 }, source.Take(^5..^1).ToArray()); + Assert.Equal(1, source.Take(^5..^4).ToArray().Single()); + Assert.Empty(source.Take(^5..^5).ToArray()); + Assert.Empty(source.Take(^15..^5).ToArray()); + } } [Fact] public void ToList() { - var source = new[] { 1, 2, 3, 4, 5 }; - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(5).ToList()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(6).ToList()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(40).ToList()); - Assert.Equal(new[] { 1, 2, 3, 4 }, source.Take(4).ToList()); - Assert.Equal(1, source.Take(1).ToList().Single()); - Assert.Empty(source.Take(0).ToList()); - Assert.Empty(source.Take(-10).ToList()); - - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(0..5).ToList()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(0..6).ToList()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(0..40).ToList()); - Assert.Equal(new[] { 1, 2, 3, 4 }, source.Take(0..4).ToList()); - Assert.Equal(1, source.Take(0..1).ToList().Single()); - Assert.Empty(source.Take(0..0).ToList()); - - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^5..5).ToList()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^5..6).ToList()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^5..40).ToList()); - Assert.Equal(new[] { 1, 2, 3, 4 }, source.Take(^5..4).ToList()); - Assert.Equal(1, source.Take(^5..1).ToList().Single()); - Assert.Empty(source.Take(^5..0).ToList()); - Assert.Empty(source.Take(^15..0).ToList()); - - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(0..^0).ToList()); - Assert.Equal(new[] { 1, 2, 3, 4 }, source.Take(0..^1).ToList()); - Assert.Equal(1, source.Take(0..^4).ToList().Single()); - Assert.Empty(source.Take(0..^5).ToList()); - Assert.Empty(source.Take(0..^15).ToList()); - - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^5..^0).ToList()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^6..^0).ToList()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^45..^0).ToList()); - Assert.Equal(new[] { 1, 2, 3, 4 }, source.Take(^5..^1).ToList()); - Assert.Equal(1, source.Take(^5..^4).ToList().Single()); - Assert.Empty(source.Take(^5..^5).ToList()); - Assert.Empty(source.Take(^15..^5).ToList()); - } - - [Fact] - public void ToListNotList() - { - var source = ForceNotCollection(new[] { 1, 2, 3, 4, 5 }); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(5).ToList()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(6).ToList()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(40).ToList()); - Assert.Equal(new[] { 1, 2, 3, 4 }, source.Take(4).ToList()); - Assert.Equal(1, source.Take(1).ToList().Single()); - Assert.Empty(source.Take(0).ToList()); - Assert.Empty(source.Take(-10).ToList()); - - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(0..5).ToList()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(0..6).ToList()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(0..40).ToList()); - Assert.Equal(new[] { 1, 2, 3, 4 }, source.Take(0..4).ToList()); - Assert.Equal(1, source.Take(0..1).ToList().Single()); - Assert.Empty(source.Take(0..0).ToList()); - - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^5..5).ToList()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^5..6).ToList()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^5..40).ToList()); - Assert.Equal(new[] { 1, 2, 3, 4 }, source.Take(^5..4).ToList()); - Assert.Equal(1, source.Take(^5..1).ToList().Single()); - Assert.Empty(source.Take(^5..0).ToList()); - Assert.Empty(source.Take(^15..0).ToList()); - - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(0..^0).ToList()); - Assert.Equal(new[] { 1, 2, 3, 4 }, source.Take(0..^1).ToList()); - Assert.Equal(1, source.Take(0..^4).ToList().Single()); - Assert.Empty(source.Take(0..^5).ToList()); - Assert.Empty(source.Take(0..^15).ToList()); - - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^5..^0).ToList()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^6..^0).ToList()); - Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^45..^0).ToList()); - Assert.Equal(new[] { 1, 2, 3, 4 }, source.Take(^5..^1).ToList()); - Assert.Equal(1, source.Take(^5..^4).ToList().Single()); - Assert.Empty(source.Take(^5..^5).ToList()); - Assert.Empty(source.Take(^15..^5).ToList()); + foreach (var source in CreateSources([1, 2, 3, 4, 5])) + { + Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(5).ToList()); + Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(6).ToList()); + Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(40).ToList()); + Assert.Equal(new[] { 1, 2, 3, 4 }, source.Take(4).ToList()); + Assert.Equal(1, source.Take(1).ToList().Single()); + Assert.Empty(source.Take(0).ToList()); + Assert.Empty(source.Take(-10).ToList()); + + Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(0..5).ToList()); + Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(0..6).ToList()); + Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(0..40).ToList()); + Assert.Equal(new[] { 1, 2, 3, 4 }, source.Take(0..4).ToList()); + Assert.Equal(1, source.Take(0..1).ToList().Single()); + Assert.Empty(source.Take(0..0).ToList()); + + Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^5..5).ToList()); + Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^5..6).ToList()); + Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^5..40).ToList()); + Assert.Equal(new[] { 1, 2, 3, 4 }, source.Take(^5..4).ToList()); + Assert.Equal(1, source.Take(^5..1).ToList().Single()); + Assert.Empty(source.Take(^5..0).ToList()); + Assert.Empty(source.Take(^15..0).ToList()); + + Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(0..^0).ToList()); + Assert.Equal(new[] { 1, 2, 3, 4 }, source.Take(0..^1).ToList()); + Assert.Equal(1, source.Take(0..^4).ToList().Single()); + Assert.Empty(source.Take(0..^5).ToList()); + Assert.Empty(source.Take(0..^15).ToList()); + + Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^5..^0).ToList()); + Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^6..^0).ToList()); + Assert.Equal(new[] { 1, 2, 3, 4, 5 }, source.Take(^45..^0).ToList()); + Assert.Equal(new[] { 1, 2, 3, 4 }, source.Take(^5..^1).ToList()); + Assert.Equal(1, source.Take(^5..^4).ToList().Single()); + Assert.Empty(source.Take(^5..^5).ToList()); + Assert.Empty(source.Take(^15..^5).ToList()); + } } [Fact] public void TakeCanOnlyBeOneList() { - var source = new[] { 2, 4, 6, 8, 10 }; - Assert.Equal(new[] { 2 }, source.Take(1)); - Assert.Equal(new[] { 4 }, source.Skip(1).Take(1)); - Assert.Equal(new[] { 6 }, source.Take(3).Skip(2)); - Assert.Equal(new[] { 2 }, source.Take(3).Take(1)); - - Assert.Equal(new[] { 2 }, source.Take(0..1)); - Assert.Equal(new[] { 4 }, source.Skip(1).Take(0..1)); - Assert.Equal(new[] { 6 }, source.Take(0..3).Skip(2)); - Assert.Equal(new[] { 2 }, source.Take(0..3).Take(0..1)); - - Assert.Equal(new[] { 2 }, source.Take(^5..1)); - Assert.Equal(new[] { 4 }, source.Skip(1).Take(^4..1)); - Assert.Equal(new[] { 6 }, source.Take(^5..3).Skip(2)); - Assert.Equal(new[] { 2 }, source.Take(^5..3).Take(^4..1)); - - Assert.Equal(new[] { 2 }, source.Take(0..^4)); - Assert.Equal(new[] { 4 }, source.Skip(1).Take(0..^3)); - Assert.Equal(new[] { 6 }, source.Take(0..^2).Skip(2)); - Assert.Equal(new[] { 2 }, source.Take(0..^2).Take(0..^2)); - - Assert.Equal(new[] { 2 }, source.Take(^5..^4)); - Assert.Equal(new[] { 4 }, source.Skip(1).Take(^4..^3)); - Assert.Equal(new[] { 6 }, source.Take(^5..^2).Skip(2)); - Assert.Equal(new[] { 2 }, source.Take(^5..^2).Take(^4..^2)); - } - - [Fact] - public void TakeCanOnlyBeOneNotList() - { - var source = ForceNotCollection(new[] { 2, 4, 6, 8, 10 }); - Assert.Equal(new[] { 2 }, source.Take(1)); - Assert.Equal(new[] { 4 }, source.Skip(1).Take(1)); - Assert.Equal(new[] { 6 }, source.Take(3).Skip(2)); - Assert.Equal(new[] { 2 }, source.Take(3).Take(1)); - - Assert.Equal(new[] { 2 }, source.Take(0..1)); - Assert.Equal(new[] { 4 }, source.Skip(1).Take(0..1)); - Assert.Equal(new[] { 6 }, source.Take(0..3).Skip(2)); - Assert.Equal(new[] { 2 }, source.Take(0..3).Take(0..1)); - - Assert.Equal(new[] { 2 }, source.Take(^5..1)); - Assert.Equal(new[] { 4 }, source.Skip(1).Take(^4..1)); - Assert.Equal(new[] { 6 }, source.Take(^5..3).Skip(2)); - Assert.Equal(new[] { 2 }, source.Take(^5..3).Take(^4..1)); - - Assert.Equal(new[] { 2 }, source.Take(0..^4)); - Assert.Equal(new[] { 4 }, source.Skip(1).Take(0..^3)); - Assert.Equal(new[] { 6 }, source.Take(0..^2).Skip(2)); - Assert.Equal(new[] { 2 }, source.Take(0..^2).Take(0..^2)); - - Assert.Equal(new[] { 2 }, source.Take(^5..^4)); - Assert.Equal(new[] { 4 }, source.Skip(1).Take(^4..^3)); - Assert.Equal(new[] { 6 }, source.Take(^5..^2).Skip(2)); - Assert.Equal(new[] { 2 }, source.Take(^5..^2).Take(^4..^2)); + foreach (var source in CreateSources([2, 4, 6, 8, 10])) + { + Assert.Equal([2], source.Take(1)); + Assert.Equal([4], source.Skip(1).Take(1)); + Assert.Equal([6], source.Take(3).Skip(2)); + Assert.Equal([2], source.Take(3).Take(1)); + + Assert.Equal([2], source.Take(0..1)); + Assert.Equal([4], source.Skip(1).Take(0..1)); + Assert.Equal([6], source.Take(0..3).Skip(2)); + Assert.Equal([2], source.Take(0..3).Take(0..1)); + + Assert.Equal([2], source.Take(^5..1)); + Assert.Equal([4], source.Skip(1).Take(^4..1)); + Assert.Equal([6], source.Take(^5..3).Skip(2)); + Assert.Equal([2], source.Take(^5..3).Take(^4..1)); + + Assert.Equal([2], source.Take(0..^4)); + Assert.Equal([4], source.Skip(1).Take(0..^3)); + Assert.Equal([6], source.Take(0..^2).Skip(2)); + Assert.Equal([2], source.Take(0..^2).Take(0..^2)); + + Assert.Equal([2], source.Take(^5..^4)); + Assert.Equal([4], source.Skip(1).Take(^4..^3)); + Assert.Equal([6], source.Take(^5..^2).Skip(2)); + Assert.Equal([2], source.Take(^5..^2).Take(^4..^2)); + } } [Fact] public void RepeatEnumerating() { - var source = new[] { 1, 2, 3, 4, 5 }; - var taken1 = source.Take(3); - Assert.Equal(taken1, taken1); - - var taken2 = source.Take(0..3); - Assert.Equal(taken2, taken2); - - var taken3 = source.Take(^5..3); - Assert.Equal(taken3, taken3); - - var taken4 = source.Take(0..^2); - Assert.Equal(taken4, taken4); - - var taken5 = source.Take(^5..^2); - Assert.Equal(taken5, taken5); - } - - [Fact] - public void RepeatEnumeratingNotList() - { - var source = ForceNotCollection(new[] { 1, 2, 3, 4, 5 }); - var taken1 = source.Take(3); - Assert.Equal(taken1, taken1); + foreach (var source in CreateSources([1, 2, 3, 4, 5])) + { + var taken1 = source.Take(3); + Assert.Equal(taken1, taken1); - var taken2 = source.Take(0..3); - Assert.Equal(taken2, taken2); + var taken2 = source.Take(0..3); + Assert.Equal(taken2, taken2); - var taken3 = source.Take(^5..3); - Assert.Equal(taken3, taken3); + var taken3 = source.Take(^5..3); + Assert.Equal(taken3, taken3); - var taken4 = source.Take(0..^2); - Assert.Equal(taken4, taken4); + var taken4 = source.Take(0..^2); + Assert.Equal(taken4, taken4); - var taken5 = source.Take(^5..^2); - Assert.Equal(taken5, taken5); + var taken5 = source.Take(^5..^2); + Assert.Equal(taken5, taken5); + } } [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsSpeedOptimized))] diff --git a/src/libraries/System.Linq/tests/WhereTests.cs b/src/libraries/System.Linq/tests/WhereTests.cs index 0cf0ff50cd38a2..a80e8076629ce2 100644 --- a/src/libraries/System.Linq/tests/WhereTests.cs +++ b/src/libraries/System.Linq/tests/WhereTests.cs @@ -1097,44 +1097,40 @@ public void ToCollection(IEnumerable source) [Fact] public void WhereFirstLast() { - Assert.All(IdentityTransforms(), transform => + Assert.All(CreateSources(Enumerable.Range(0, 10)), source => { - IEnumerable data = transform(Enumerable.Range(0, 10)); + Assert.Equal(3, source.Where(i => i == 3).First()); + Assert.Equal(0, source.Where(i => i % 2 == 0).First()); - Assert.Equal(3, data.Where(i => i == 3).First()); - Assert.Equal(0, data.Where(i => i % 2 == 0).First()); + Assert.Equal(3, source.Where(i => i == 3).Last()); + Assert.Equal(8, source.Where(i => i % 2 == 0).Last()); - Assert.Equal(3, data.Where(i => i == 3).Last()); - Assert.Equal(8, data.Where(i => i % 2 == 0).Last()); + Assert.Equal(3, source.Where(i => i == 3).ElementAt(0)); + Assert.Equal(8, source.Where(i => i % 2 == 0).ElementAt(4)); - Assert.Equal(3, data.Where(i => i == 3).ElementAt(0)); - Assert.Equal(8, data.Where(i => i % 2 == 0).ElementAt(4)); - - Assert.Throws(() => data.Where(i => i == 10).First()); - Assert.Throws(() => data.Where(i => i == 10).Last()); - Assert.Throws(() => data.Where(i => i == 10).ElementAt(0)); + Assert.Throws(() => source.Where(i => i == 10).First()); + Assert.Throws(() => source.Where(i => i == 10).Last()); + Assert.Throws(() => source.Where(i => i == 10).ElementAt(0)); }); } [Fact] public void WhereSelectFirstLast() { - Assert.All(IdentityTransforms(), transform => + Assert.All(CreateSources(Enumerable.Range(0, 10)), source => { - IEnumerable data = transform(Enumerable.Range(0, 10)); - - Assert.Equal(6, data.Where(i => i == 3).Select(i => i * 2).First()); - Assert.Equal(0, data.Where(i => i % 2 == 0).Select(i => i * 2).First()); + Assert.Equal(6, source.Where(i => i == 3).Select(i => i * 2).First()); + Assert.Equal(0, source.Where(i => i % 2 == 0).Select(i => i * 2).First()); - Assert.Equal(6, data.Where(i => i == 3).Select(i => i * 2).Last()); - Assert.Equal(16, data.Where(i => i % 2 == 0).Select(i => i * 2).Last()); + Assert.Equal(6, source.Where(i => i == 3).Select(i => i * 2).Last()); + Assert.Equal(16, source.Where(i => i % 2 == 0).Select(i => i * 2).Last()); - Assert.Equal(6, data.Where(i => i == 3).Select(i => i * 2).ElementAt(0)); - Assert.Equal(16, data.Where(i => i % 2 == 0).Select(i => i * 2).ElementAt(4)); + Assert.Equal(6, source.Where(i => i == 3).Select(i => i * 2).ElementAt(0)); + Assert.Equal(16, source.Where(i => i % 2 == 0).Select(i => i * 2).ElementAt(4)); - Assert.Throws(() => data.Where(i => i == 10).Select(i => i * 2).First()); - Assert.Throws(() => data.Where(i => i == 10).Select(i => i * 2).Last()); - Assert.Throws(() => data.Where(i => i == 10).Select(i => i * 2).ElementAt(0)); + Assert.Throws(() => source.Where(i => i == 10).Select(i => i * 2).First()); + Assert.Throws(() => source.Where(i => i == 10).Select(i => i * 2).Last()); + Assert.Throws(() => source.Where(i => i == 10).Select(i => i * 2).ElementAt(0)); }); } @@ -1142,7 +1138,7 @@ public static IEnumerable ToCollectionData() { IEnumerable seq = GenerateRandomSequnce(seed: 0xdeadbeef, count: 10); - foreach (IEnumerable seq2 in IdentityTransforms().Select(t => t(seq))) + foreach (IEnumerable seq2 in CreateSources(seq)) { yield return new object[] { seq2 }; } diff --git a/src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/ServerCertificateTest.cs b/src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/ServerCertificateTest.cs index df73619bf8dad8..4f7d573df68b09 100644 --- a/src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/ServerCertificateTest.cs +++ b/src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/ServerCertificateTest.cs @@ -32,6 +32,7 @@ public async Task NoCallback_ValidCertificate_CallbackNotCalled() [OuterLoop] [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/110578")] public async Task UseCallback_NotSecureConnection_CallbackNotCalled() { var handler = new WinHttpHandler(); diff --git a/src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/WinHttpHandlerTest.cs b/src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/WinHttpHandlerTest.cs index 0abe14c11887bf..cc2b97bdde6da7 100644 --- a/src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/WinHttpHandlerTest.cs +++ b/src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/WinHttpHandlerTest.cs @@ -55,7 +55,7 @@ public async Task GetAsync_RedirectResponseHasCookie_CookieSentToFinalUri( string cookieName, string cookieValue) { - Uri uri = System.Net.Test.Common.Configuration.Http.RemoteHttp11Server.RedirectUriForDestinationUri(302, System.Net.Test.Common.Configuration.Http.RemoteEchoServer, 1); + Uri uri = System.Net.Test.Common.Configuration.Http.RemoteSecureHttp11Server.RedirectUriForDestinationUri(302, System.Net.Test.Common.Configuration.Http.SecureRemoteEchoServer, 1); var handler = new WinHttpHandler(); handler.WindowsProxyUsePolicy = WindowsProxyUsePolicy.UseWinInetProxy; handler.CookieUsePolicy = cookieUsePolicy; diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/Metrics/HttpMetricsEnrichmentContext.cs b/src/libraries/System.Net.Http/src/System/Net/Http/Metrics/HttpMetricsEnrichmentContext.cs index 89a5d1fd1bfacd..34f274d98aa73d 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/Metrics/HttpMetricsEnrichmentContext.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/Metrics/HttpMetricsEnrichmentContext.cs @@ -1,12 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.Metrics; -using System.Runtime.InteropServices; -using System.Threading; namespace System.Net.Http.Metrics { @@ -19,22 +16,18 @@ namespace System.Net.Http.Metrics /// information exposed on the instance. /// /// > [!IMPORTANT] - /// > The intance must not be used from outside of the enrichment callbacks. + /// > The instance must not be used from outside of the enrichment callbacks. /// public sealed class HttpMetricsEnrichmentContext { - private static readonly HttpRequestOptionsKey s_optionsKeyForContext = new(nameof(HttpMetricsEnrichmentContext)); - private static readonly ConcurrentQueue s_pool = new(); - private static int s_poolItemCount; - private const int PoolCapacity = 1024; + private static readonly HttpRequestOptionsKey>> s_optionsKeyForCallbacks = new(nameof(HttpMetricsEnrichmentContext)); - private readonly List> _callbacks = new(); private HttpRequestMessage? _request; private HttpResponseMessage? _response; private Exception? _exception; - private List> _tags = new(capacity: 16); + private TagList _tags; - internal HttpMetricsEnrichmentContext() { } // Hide the default parameterless constructor. + private HttpMetricsEnrichmentContext() { } // Hide the default parameterless constructor. /// /// Gets the that has been sent. @@ -68,7 +61,7 @@ public sealed class HttpMetricsEnrichmentContext /// /// This method must not be used from outside of the enrichment callbacks. /// - public void AddCustomTag(string name, object? value) => _tags.Add(new KeyValuePair(name, value)); + public void AddCustomTag(string name, object? value) => _tags.Add(name, value); /// /// Adds a callback to register custom tags for request metrics `http-client-request-duration` and `http-client-failed-requests`. @@ -77,85 +70,55 @@ public sealed class HttpMetricsEnrichmentContext /// The callback responsible to add custom tags via . public static void AddCallback(HttpRequestMessage request, Action callback) { + ArgumentNullException.ThrowIfNull(request); + ArgumentNullException.ThrowIfNull(callback); + HttpRequestOptions options = request.Options; - // We associate an HttpMetricsEnrichmentContext with the request on the first call to AddCallback(), - // and store the callbacks in the context. This allows us to cache all the enrichment objects together. - if (!options.TryGetValue(s_optionsKeyForContext, out HttpMetricsEnrichmentContext? context)) + if (options.TryGetValue(s_optionsKeyForCallbacks, out List>? callbacks)) + { + callbacks.Add(callback); + } + else { - if (s_pool.TryDequeue(out context)) - { - Debug.Assert(context._callbacks.Count == 0); - Interlocked.Decrement(ref s_poolItemCount); - } - else - { - context = new HttpMetricsEnrichmentContext(); - } - - options.Set(s_optionsKeyForContext, context); + options.Set(s_optionsKeyForCallbacks, [callback]); } - context._callbacks.Add(callback); } - internal static HttpMetricsEnrichmentContext? GetEnrichmentContextForRequest(HttpRequestMessage request) + internal static List>? GetEnrichmentCallbacksForRequest(HttpRequestMessage request) { - if (request._options is null) + if (request._options is HttpRequestOptions options && + options.Remove(s_optionsKeyForCallbacks.Key, out object? callbacks)) { - return null; + return (List>)callbacks!; } - request._options.TryGetValue(s_optionsKeyForContext, out HttpMetricsEnrichmentContext? context); - return context; + + return null; } - internal void RecordDurationWithEnrichment(HttpRequestMessage request, + internal static void RecordDurationWithEnrichment( + List> callbacks, + HttpRequestMessage request, HttpResponseMessage? response, Exception? exception, TimeSpan durationTime, in TagList commonTags, Histogram requestDuration) { - _request = request; - _response = response; - _exception = exception; - - Debug.Assert(_tags.Count == 0); - - // Adding the enrichment tags to the TagList would likely exceed its' on-stack capacity, leading to an allocation. - // To avoid this, we add all the tags to a List which is cached together with HttpMetricsEnrichmentContext. - // Use a for loop to iterate over the TagList, since TagList.GetEnumerator() allocates, see - // https://github.com/dotnet/runtime/issues/87022. - for (int i = 0; i < commonTags.Count; i++) + var context = new HttpMetricsEnrichmentContext { - _tags.Add(commonTags[i]); - } + _request = request, + _response = response, + _exception = exception, + _tags = commonTags, + }; - try + foreach (Action callback in callbacks) { - foreach (Action callback in _callbacks) - { - callback(this); - } - - requestDuration.Record(durationTime.TotalSeconds, CollectionsMarshal.AsSpan(_tags)); - } - finally - { - _request = null; - _response = null; - _exception = null; - _callbacks.Clear(); - _tags.Clear(); - - if (Interlocked.Increment(ref s_poolItemCount) <= PoolCapacity) - { - s_pool.Enqueue(this); - } - else - { - Interlocked.Decrement(ref s_poolItemCount); - } + callback(context); } + + requestDuration.Record(durationTime.TotalSeconds, context._tags); } } } diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/Metrics/MetricsHandler.cs b/src/libraries/System.Net.Http/src/System/Net/Http/Metrics/MetricsHandler.cs index 7a381483099d4d..79a544816ccb09 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/Metrics/MetricsHandler.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/Metrics/MetricsHandler.cs @@ -121,14 +121,14 @@ private void RequestStop(HttpRequestMessage request, HttpResponseMessage? respon TimeSpan durationTime = Stopwatch.GetElapsedTime(startTimestamp, Stopwatch.GetTimestamp()); - HttpMetricsEnrichmentContext? enrichmentContext = HttpMetricsEnrichmentContext.GetEnrichmentContextForRequest(request); - if (enrichmentContext is null) + List>? callbacks = HttpMetricsEnrichmentContext.GetEnrichmentCallbacksForRequest(request); + if (callbacks is null) { _requestsDuration.Record(durationTime.TotalSeconds, tags); } else { - enrichmentContext.RecordDurationWithEnrichment(request, response, exception, durationTime, tags, _requestsDuration); + HttpMetricsEnrichmentContext.RecordDurationWithEnrichment(callbacks, request, response, exception, durationTime, tags, _requestsDuration); } } diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionPool/HttpConnectionPool.Http1.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionPool/HttpConnectionPool.Http1.cs index d65e1b6486de21..af78d4d4cb9a9c 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionPool/HttpConnectionPool.Http1.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionPool/HttpConnectionPool.Http1.cs @@ -259,8 +259,7 @@ private async Task InjectNewHttp11ConnectionAsync(RequestQueue.Q HttpConnection? connection = null; Exception? connectionException = null; - CancellationTokenSource cts = GetConnectTimeoutCancellationTokenSource(); - waiter.ConnectionCancellationTokenSource = cts; + CancellationTokenSource cts = GetConnectTimeoutCancellationTokenSource(waiter); try { connection = await CreateHttp11ConnectionAsync(queueItem.Request, true, cts.Token).ConfigureAwait(false); diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionPool/HttpConnectionPool.Http2.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionPool/HttpConnectionPool.Http2.cs index c3999c520f0f24..33155f12d8b73b 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionPool/HttpConnectionPool.Http2.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionPool/HttpConnectionPool.Http2.cs @@ -181,8 +181,7 @@ private async Task InjectNewHttp2ConnectionAsync(RequestQueue. Exception? connectionException = null; HttpConnectionWaiter waiter = queueItem.Waiter; - CancellationTokenSource cts = GetConnectTimeoutCancellationTokenSource(); - waiter.ConnectionCancellationTokenSource = cts; + CancellationTokenSource cts = GetConnectTimeoutCancellationTokenSource(waiter); try { (Stream stream, TransportContext? transportContext, Activity? activity, IPEndPoint? remoteEndPoint) = await ConnectAsync(queueItem.Request, true, cts.Token).ConfigureAwait(false); diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionPool/HttpConnectionPool.Http3.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionPool/HttpConnectionPool.Http3.cs index bae0ef38952555..b9e2bc2a98edf1 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionPool/HttpConnectionPool.Http3.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionPool/HttpConnectionPool.Http3.cs @@ -75,52 +75,60 @@ internal sealed partial class HttpConnectionPool // Loop in case we get a 421 and need to send the request to a different authority. while (true) { - if (!TryGetHttp3Authority(request, out HttpAuthority? authority, out Exception? reasonException)) + HttpConnectionWaiter? http3ConnectionWaiter = null; + try { - if (reasonException is null) + if (!TryGetHttp3Authority(request, out HttpAuthority? authority, out Exception? reasonException)) { - return null; + if (reasonException is null) + { + return null; + } + ThrowGetVersionException(request, 3, reasonException); } - ThrowGetVersionException(request, 3, reasonException); - } - long queueStartingTimestamp = HttpTelemetry.Log.IsEnabled() || Settings._metrics!.RequestsQueueDuration.Enabled ? Stopwatch.GetTimestamp() : 0; - Activity? waitForConnectionActivity = ConnectionSetupDistributedTracing.StartWaitForConnectionActivity(authority); + long queueStartingTimestamp = HttpTelemetry.Log.IsEnabled() || Settings._metrics!.RequestsQueueDuration.Enabled ? Stopwatch.GetTimestamp() : 0; + Activity? waitForConnectionActivity = ConnectionSetupDistributedTracing.StartWaitForConnectionActivity(authority); - if (!TryGetPooledHttp3Connection(request, out Http3Connection? connection, out HttpConnectionWaiter? http3ConnectionWaiter)) - { - try + if (!TryGetPooledHttp3Connection(request, out Http3Connection? connection, out http3ConnectionWaiter)) { - connection = await http3ConnectionWaiter.WaitWithCancellationAsync(cancellationToken).ConfigureAwait(false); + try + { + connection = await http3ConnectionWaiter.WaitWithCancellationAsync(cancellationToken).ConfigureAwait(false); + } + catch (Exception ex) + { + ConnectionSetupDistributedTracing.ReportError(waitForConnectionActivity, ex); + waitForConnectionActivity?.Stop(); + throw; + } } - catch (Exception ex) + + // Request cannot be sent over H/3 connection, try downgrade or report failure. + // Note that if there's an H/3 suitable origin authority but is unavailable or blocked via Alt-Svc, exception is thrown instead. + if (connection is null) { - ConnectionSetupDistributedTracing.ReportError(waitForConnectionActivity, ex); - waitForConnectionActivity?.Stop(); - throw; + return null; } - } - // Request cannot be sent over H/3 connection, try downgrade or report failure. - // Note that if there's an H/3 suitable origin authority but is unavailable or blocked via Alt-Svc, exception is thrown instead. - if (connection is null) - { - return null; - } + HttpResponseMessage response = await connection.SendAsync(request, queueStartingTimestamp, waitForConnectionActivity, cancellationToken).ConfigureAwait(false); - HttpResponseMessage response = await connection.SendAsync(request, queueStartingTimestamp, waitForConnectionActivity, cancellationToken).ConfigureAwait(false); + // If an Alt-Svc authority returns 421, it means it can't actually handle the request. + // An authority is supposed to be able to handle ALL requests to the origin, so this is a server bug. + // In this case, we blocklist the authority and retry the request at the origin. + if (response.StatusCode == HttpStatusCode.MisdirectedRequest && connection.Authority != _originAuthority) + { + response.Dispose(); + BlocklistAuthority(connection.Authority); + continue; + } - // If an Alt-Svc authority returns 421, it means it can't actually handle the request. - // An authority is supposed to be able to handle ALL requests to the origin, so this is a server bug. - // In this case, we blocklist the authority and retry the request at the origin. - if (response.StatusCode == HttpStatusCode.MisdirectedRequest && connection.Authority != _originAuthority) + return response; + } + finally { - response.Dispose(); - BlocklistAuthority(connection.Authority); - continue; + http3ConnectionWaiter?.CancelIfNecessary(this, cancellationToken.IsCancellationRequested); } - - return response; } } @@ -253,8 +261,7 @@ private async Task InjectNewHttp3ConnectionAsync(RequestQueue. HttpAuthority? authority = null; HttpConnectionWaiter waiter = queueItem.Waiter; - CancellationTokenSource cts = GetConnectTimeoutCancellationTokenSource(); - waiter.ConnectionCancellationTokenSource = cts; + CancellationTokenSource cts = GetConnectTimeoutCancellationTokenSource(waiter); Activity? connectionSetupActivity = null; try { diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionPool/HttpConnectionPool.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionPool/HttpConnectionPool.cs index 3c91fc4ccde43f..e72c048b717b2f 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionPool/HttpConnectionPool.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionPool/HttpConnectionPool.cs @@ -827,7 +827,27 @@ private async ValueTask EstablishSocksTunnel(HttpRequestMessage request, return stream; } - private CancellationTokenSource GetConnectTimeoutCancellationTokenSource() => new CancellationTokenSource(Settings._connectTimeout); + private CancellationTokenSource GetConnectTimeoutCancellationTokenSource(HttpConnectionWaiter waiter) + where T : HttpConnectionBase? + { + var cts = new CancellationTokenSource(Settings._connectTimeout); + + lock (waiter) + { + waiter.ConnectionCancellationTokenSource = cts; + + // The initiating request for this connection attempt may complete concurrently at any time. + // If it completed before we've set the CTS, CancelIfNecessary would no-op. + // Check it again now that we're holding the lock and ensure we always set a timeout. + if (waiter.Task.IsCompleted) + { + waiter.CancelIfNecessary(this, requestCancelled: waiter.Task.IsCanceled); + waiter.ConnectionCancellationTokenSource = null; + } + } + + return cts; + } private static Exception CreateConnectTimeoutException(OperationCanceledException oce) { diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/MetricsTest.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/MetricsTest.cs index 161b1e793b78bc..473be2724c65da 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/MetricsTest.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/MetricsTest.cs @@ -381,7 +381,7 @@ public async Task ExternalServer_DurationMetrics_Recorded() using InstrumentRecorder openConnectionsRecorder = SetupInstrumentRecorder(InstrumentNames.OpenConnections); Uri uri = UseVersion == HttpVersion.Version11 - ? Test.Common.Configuration.Http.RemoteHttp11Server.EchoUri + ? Test.Common.Configuration.Http.RemoteSecureHttp11Server.EchoUri : Test.Common.Configuration.Http.RemoteHttp2Server.EchoUri; IPAddress[] addresses = await Dns.GetHostAddressesAsync(uri.Host); addresses = addresses.Union(addresses.Select(a => a.MapToIPv6())).ToArray(); @@ -467,6 +467,49 @@ public Task RequestDuration_CustomTags_Recorded() VerifyRequestDuration(m, uri, UseVersion, 200); Assert.Equal("/test", m.Tags.ToArray().Single(t => t.Key == "route").Value); + }, async server => + { + await server.HandleRequestAsync(); + }); + } + + [Fact] + public Task RequestDuration_MultipleCallbacksPerRequest_AllCalledInOrder() + { + return LoopbackServerFactory.CreateClientAndServerAsync(async uri => + { + using HttpMessageInvoker client = CreateHttpMessageInvoker(); + using InstrumentRecorder recorder = SetupInstrumentRecorder(InstrumentNames.RequestDuration); + using HttpRequestMessage request = new(HttpMethod.Get, uri) { Version = UseVersion }; + + int lastCallback = -1; + + HttpMetricsEnrichmentContext.AddCallback(request, ctx => + { + Assert.Equal(-1, lastCallback); + lastCallback = 1; + ctx.AddCustomTag("custom1", "foo"); + }); + HttpMetricsEnrichmentContext.AddCallback(request, ctx => + { + Assert.Equal(1, lastCallback); + lastCallback = 2; + ctx.AddCustomTag("custom2", "bar"); + }); + HttpMetricsEnrichmentContext.AddCallback(request, ctx => + { + Assert.Equal(2, lastCallback); + ctx.AddCustomTag("custom3", "baz"); + }); + + using HttpResponseMessage response = await SendAsync(client, request); + + Measurement m = Assert.Single(recorder.GetMeasurements()); + VerifyRequestDuration(m, uri, UseVersion, 200); + Assert.Equal("foo", Assert.Single(m.Tags.ToArray(), t => t.Key == "custom1").Value); + Assert.Equal("bar", Assert.Single(m.Tags.ToArray(), t => t.Key == "custom2").Value); + Assert.Equal("baz", Assert.Single(m.Tags.ToArray(), t => t.Key == "custom3").Value); + }, async server => { await server.AcceptConnectionSendResponseAndCloseAsync(); @@ -1075,6 +1118,96 @@ public class HttpMetricsTest_Http11_Async_HttpMessageInvoker : HttpMetricsTest_H public HttpMetricsTest_Http11_Async_HttpMessageInvoker(ITestOutputHelper output) : base(output) { } + + [Fact] + public async Task RequestDuration_RequestReused_EnrichmentCallbacksAreCleared() + { + await LoopbackServerFactory.CreateClientAndServerAsync(async uri => + { + using HttpMessageInvoker client = CreateHttpMessageInvoker(); + using InstrumentRecorder recorder = SetupInstrumentRecorder(InstrumentNames.RequestDuration); + + using HttpRequestMessage request = new(HttpMethod.Get, uri); + + int firstCallbackCalls = 0; + + HttpMetricsEnrichmentContext.AddCallback(request, ctx => + { + firstCallbackCalls++; + ctx.AddCustomTag("key1", "foo"); + }); + + (await SendAsync(client, request)).Dispose(); + Assert.Equal(1, firstCallbackCalls); + + Measurement m = Assert.Single(recorder.GetMeasurements()); + Assert.Equal("key1", Assert.Single(m.Tags.ToArray(), t => t.Value as string == "foo").Key); + + HttpMetricsEnrichmentContext.AddCallback(request, static ctx => + { + ctx.AddCustomTag("key2", "foo"); + }); + + (await SendAsync(client, request)).Dispose(); + Assert.Equal(1, firstCallbackCalls); + + Assert.Equal(2, recorder.GetMeasurements().Count); + m = recorder.GetMeasurements()[1]; + Assert.Equal("key2", Assert.Single(m.Tags.ToArray(), t => t.Value as string == "foo").Key); + }, async server => + { + await server.HandleRequestAsync(); + await server.HandleRequestAsync(); + }); + } + + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] + public async Task RequestDuration_ConcurrentRequestsSeeDifferentContexts() + { + await LoopbackServerFactory.CreateClientAndServerAsync(async uri => + { + using HttpMessageInvoker client = CreateHttpMessageInvoker(); + using var _ = SetupInstrumentRecorder(InstrumentNames.RequestDuration); + + using HttpRequestMessage request1 = new(HttpMethod.Get, uri); + using HttpRequestMessage request2 = new(HttpMethod.Get, uri); + + HttpMetricsEnrichmentContext.AddCallback(request1, _ => { }); + (await client.SendAsync(request1, CancellationToken.None)).Dispose(); + + HttpMetricsEnrichmentContext context1 = null; + HttpMetricsEnrichmentContext context2 = null; + CountdownEvent countdownEvent = new(2); + + HttpMetricsEnrichmentContext.AddCallback(request1, ctx => + { + context1 = ctx; + countdownEvent.Signal(); + Assert.True(countdownEvent.Wait(TestHelper.PassingTestTimeout)); + }); + HttpMetricsEnrichmentContext.AddCallback(request2, ctx => + { + context2 = ctx; + countdownEvent.Signal(); + Assert.True(countdownEvent.Wait(TestHelper.PassingTestTimeout)); + }); + + Task task1 = Task.Run(() => client.SendAsync(request1, CancellationToken.None)); + Task task2 = Task.Run(() => client.SendAsync(request2, CancellationToken.None)); + + (await task1).Dispose(); + (await task2).Dispose(); + + Assert.NotSame(context1, context2); + }, async server => + { + await server.HandleRequestAsync(); + + await Task.WhenAll( + server.HandleRequestAsync(), + server.HandleRequestAsync()); + }, options: new GenericLoopbackOptions { ListenBacklog = 2 }); + } } [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotMobile))] @@ -1126,7 +1259,7 @@ public Task RequestDuration_Redirect_RecordedForEachHttpSpan() }); }, options: new GenericLoopbackOptions() { UseSsl = true }); - }, options: new GenericLoopbackOptions() { UseSsl = false}); + }, options: new GenericLoopbackOptions() { UseSsl = false }); } [Fact] diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.Cancellation.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.Cancellation.cs index ae1669c18e68b8..9ae4d15f64cd73 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.Cancellation.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.Cancellation.cs @@ -393,6 +393,68 @@ await RemoteExecutor.Invoke(static async (versionString, timoutStr) => }, UseVersion.ToString(), timeout.ToString()).DisposeAsync(); } + [OuterLoop("We wait for PendingConnectionTimeout which defaults to 5 seconds.")] + [Fact] + public async Task PendingConnectionTimeout_SignalsAllConnectionAttempts() + { + if (UseVersion == HttpVersion.Version30) + { + // HTTP3 does not support ConnectCallback + return; + } + + int pendingConnectionAttempts = 0; + bool connectionAttemptTimedOut = false; + + using var handler = new SocketsHttpHandler + { + ConnectCallback = async (context, cancellation) => + { + Interlocked.Increment(ref pendingConnectionAttempts); + try + { + await Assert.ThrowsAsync(() => Task.Delay(-1, cancellation)).WaitAsync(TestHelper.PassingTestTimeout); + cancellation.ThrowIfCancellationRequested(); + throw new UnreachableException(); + } + catch (TimeoutException) + { + connectionAttemptTimedOut = true; + throw; + } + finally + { + Interlocked.Decrement(ref pendingConnectionAttempts); + } + } + }; + + using HttpClient client = CreateHttpClient(handler); + client.Timeout = TimeSpan.FromSeconds(2); + + // Many of these requests should trigger new connection attempts, and all of those should eventually be cleaned up. + await Parallel.ForAsync(0, 100, async (_, _) => + { + await Assert.ThrowsAnyAsync(() => client.GetAsync("https://dummy")); + }); + + Stopwatch stopwatch = Stopwatch.StartNew(); + + while (Volatile.Read(ref pendingConnectionAttempts) > 0) + { + Assert.False(connectionAttemptTimedOut); + + if (stopwatch.Elapsed > 2 * TestHelper.PassingTestTimeout) + { + Assert.Fail("Connection attempts took too long to get cleaned up"); + } + + await Task.Delay(100); + } + + Assert.False(connectionAttemptTimedOut); + } + private sealed class SetTcsContent : StreamContent { private readonly TaskCompletionSource _tcs; diff --git a/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpListener.Windows.cs b/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpListener.Windows.cs index 9315b0c511fb8e..00932b43ec228f 100644 --- a/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpListener.Windows.cs +++ b/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpListener.Windows.cs @@ -70,7 +70,9 @@ public bool UnsafeConnectionNtlmAuthentication { return; } - lock ((DisconnectResults as ICollection).SyncRoot) + + var disconnectResults = DisconnectResults; + lock ((disconnectResults as ICollection).SyncRoot) { if (_unsafeConnectionNtlmAuthentication == value) { @@ -79,7 +81,7 @@ public bool UnsafeConnectionNtlmAuthentication _unsafeConnectionNtlmAuthentication = value; if (!value) { - foreach (DisconnectAsyncResult result in DisconnectResults.Values) + foreach (DisconnectAsyncResult result in disconnectResults.Values) { result.AuthenticatedConnection = null; } @@ -694,7 +696,13 @@ public HttpListenerContext EndGetContext(IAsyncResult asyncResult) // assurance that we do this only for NTLM/Negotiate is not here, but in the // code that caches WindowsIdentity instances in the Dictionary. DisconnectAsyncResult? disconnectResult; - DisconnectResults.TryGetValue(connectionId, out disconnectResult); + + var disconnectResults = DisconnectResults; + lock ((disconnectResults as ICollection).SyncRoot) + { + disconnectResults.TryGetValue(connectionId, out disconnectResult); + } + if (UnsafeConnectionNtlmAuthentication) { if (authorizationHeader == null) @@ -1327,7 +1335,12 @@ private static void RegisterForDisconnectNotification(HttpListenerSession sessio // Need to make sure it's going to get returned before adding it to the hash. That way it'll be handled // correctly in HandleAuthentication's finally. disconnectResult = result; - session.Listener.DisconnectResults[connectionId] = disconnectResult; + + var disconnectResults = session.Listener.DisconnectResults; + lock ((disconnectResults as ICollection).SyncRoot) + { + disconnectResults[connectionId] = disconnectResult; + } } if (statusCode == Interop.HttpApi.ERROR_SUCCESS && HttpListener.SkipIOCPCallbackOnSuccess) @@ -1646,8 +1659,21 @@ private void HandleDisconnect() { HttpListener listener = _listenerSession.Listener; - if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"DisconnectResults {listener.DisconnectResults} removing for _connectionId: {_connectionId}"); - listener.DisconnectResults.Remove(_connectionId); + var disconnectResults = listener.DisconnectResults; + if (NetEventSource.Log.IsEnabled()) + { + string? results; + lock ((disconnectResults as ICollection).SyncRoot) + { + results = disconnectResults.ToString(); + } + NetEventSource.Info(this, $"DisconnectResults {results} removing for _connectionId: {_connectionId}"); + } + + lock ((disconnectResults as ICollection).SyncRoot) + { + disconnectResults.Remove(_connectionId); + } // Cached identity is disposed with the session context Session?.Dispose(); diff --git a/src/libraries/System.Net.Security/tests/FunctionalTests/NegotiateStreamStreamToStreamTest.cs b/src/libraries/System.Net.Security/tests/FunctionalTests/NegotiateStreamStreamToStreamTest.cs index 7b8cc18c40f3b7..662f7d1fa48e93 100644 --- a/src/libraries/System.Net.Security/tests/FunctionalTests/NegotiateStreamStreamToStreamTest.cs +++ b/src/libraries/System.Net.Security/tests/FunctionalTests/NegotiateStreamStreamToStreamTest.cs @@ -9,8 +9,9 @@ using System.Text; using System.Threading; using System.Threading.Tasks; - +using Microsoft.DotNet.XUnitExtensions; using Xunit; +using Xunit.Abstractions; namespace System.Net.Security.Tests { @@ -192,6 +193,11 @@ public async Task NegotiateStream_StreamToStream_Authentication_EmptyCredentials { string targetName = "testTargetName"; + if (PlatformDetection.IsWindowsServer2025) + { + throw new SkipTestException("Empty credentials not supported on Server 2025"); + } + // Ensure there is no confusion between DefaultCredentials / DefaultNetworkCredentials and a // NetworkCredential object with empty user, password and domain. NetworkCredential emptyNetworkCredential = new NetworkCredential("", "", ""); diff --git a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.cs b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.cs index e1f19c03d6d0ad..817a8221d6bf0f 100644 --- a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.cs +++ b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.cs @@ -3602,7 +3602,7 @@ internal void InternalSetBlocking(bool desired) } // CreateAcceptSocket - pulls unmanaged results and assembles them into a new Socket object. - internal Socket CreateAcceptSocket(SafeSocketHandle fd, EndPoint remoteEP) + internal Socket CreateAcceptSocket(SafeSocketHandle fd, EndPoint? remoteEP) { // Internal state of the socket is inherited from listener. Debug.Assert(fd != null && !fd.IsInvalid); @@ -3610,7 +3610,7 @@ internal Socket CreateAcceptSocket(SafeSocketHandle fd, EndPoint remoteEP) return UpdateAcceptSocket(socket, remoteEP); } - internal Socket UpdateAcceptSocket(Socket socket, EndPoint remoteEP) + internal Socket UpdateAcceptSocket(Socket socket, EndPoint? remoteEP) { // Internal state of the socket is inherited from listener. socket._addressFamily = _addressFamily; diff --git a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEventArgs.Unix.cs b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEventArgs.Unix.cs index bcb411922ae05e..088fb07ca46d23 100644 --- a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEventArgs.Unix.cs +++ b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEventArgs.Unix.cs @@ -35,7 +35,6 @@ private void CompleteAcceptOperation(IntPtr acceptedFileDescriptor, Memory _acceptedFileDescriptor = acceptedFileDescriptor; if (socketError == SocketError.Success) { - Debug.Assert(socketAddress.Length > 0); _acceptAddressBufferCount = socketAddress.Length; } else @@ -348,9 +347,10 @@ private SocketError FinishOperationAccept(SocketAddress remoteSocketAddress) new ReadOnlySpan(_acceptBuffer, 0, _acceptAddressBufferCount).CopyTo(remoteSocketAddress.Buffer.Span); remoteSocketAddress.Size = _acceptAddressBufferCount; + // on macOS accept can sometimes return empty remote address even when it returns successfully. Socket acceptedSocket = _currentSocket!.CreateAcceptSocket( SocketPal.CreateSocket(_acceptedFileDescriptor), - _currentSocket._rightEndPoint!.Create(remoteSocketAddress)); + remoteSocketAddress.Size > 0 ? _currentSocket._rightEndPoint!.Create(remoteSocketAddress) : null); if (_acceptSocket is null) { // Store the accepted socket diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorExtensions.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorExtensions.cs index 6643f7c8a97434..8c8f02970db525 100644 --- a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorExtensions.cs +++ b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorExtensions.cs @@ -3456,7 +3456,7 @@ public static Tensor StackAlongDimension(int dimension, params ReadOnlySpa Tensor[] outputs = new Tensor[tensors.Length]; for (int i = 0; i < tensors.Length; i++) { - outputs[i] = Tensor.Unsqueeze(tensors[0], dimension); + outputs[i] = Tensor.Unsqueeze(tensors[i], dimension); } return Tensor.ConcatenateOnDimension(dimension, outputs); } @@ -3494,9 +3494,9 @@ public static ref readonly TensorSpan StackAlongDimension(scoped ReadOnlyS Tensor[] outputs = new Tensor[tensors.Length]; for (int i = 0; i < tensors.Length; i++) { - outputs[i] = Tensor.Unsqueeze(tensors[0], dimension); + outputs[i] = Tensor.Unsqueeze(tensors[i], dimension); } - return ref Tensor.ConcatenateOnDimension(dimension, tensors, destination); + return ref Tensor.ConcatenateOnDimension(dimension, outputs, destination); } #endregion diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorPrimitives.MinNumber.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorPrimitives.MinNumber.cs index 653e8c7383eae6..8383efdebb884b 100644 --- a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorPrimitives.MinNumber.cs +++ b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorPrimitives.MinNumber.cs @@ -11,13 +11,13 @@ namespace System.Numerics.Tensors { public static partial class TensorPrimitives { - /// Searches for the largest number in the specified tensor. + /// Searches for the smallest number in the specified tensor. /// The tensor, represented as a span. - /// The maximum element in . + /// The minimum element in . /// Length of must be greater than zero. /// /// - /// The determination of the maximum element matches the IEEE 754:2019 `maximumNumber` function. Positive 0 is considered greater than negative 0. + /// The determination of the minimum element matches the IEEE 754:2019 `minimumNumber` function. Positive 0 is considered greater than negative 0. /// /// /// This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different @@ -28,7 +28,7 @@ public static T MinNumber(ReadOnlySpan x) where T : INumber => MinMaxCore>(x); - /// Computes the element-wise maximum of the numbers in the specified tensors. + /// Computes the element-wise minimum of the numbers in the specified tensors. /// The first tensor, represented as a span. /// The second tensor, represented as a span. /// The destination tensor, represented as a span. @@ -41,7 +41,7 @@ public static T MinNumber(ReadOnlySpan x) /// This method effectively computes [i] = .MinNumber([i], [i]). /// /// - /// The determination of the maximum element matches the IEEE 754:2019 `maximumNumber` function. If either value is + /// The determination of the minimum element matches the IEEE 754:2019 `minimumNumber` function. If either value is /// the other is returned. Positive 0 is considered greater than negative 0. /// /// @@ -53,7 +53,7 @@ public static void MinNumber(ReadOnlySpan x, ReadOnlySpan y, Span de where T : INumber => InvokeSpanSpanIntoSpan>(x, y, destination); - /// Computes the element-wise maximum of the numbers in the specified tensors. + /// Computes the element-wise minimum of the numbers in the specified tensors. /// The first tensor, represented as a span. /// The second tensor, represented as a scalar. /// The destination tensor, represented as a span. @@ -64,7 +64,7 @@ public static void MinNumber(ReadOnlySpan x, ReadOnlySpan y, Span de /// This method effectively computes [i] = .MinNumber([i], ). /// /// - /// The determination of the maximum element matches the IEEE 754:2019 `maximumNumber` function. If either value is + /// The determination of the minimum element matches the IEEE 754:2019 `minimumNumber` function. If either value is /// the other is returned. Positive 0 is considered greater than negative 0. /// /// diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorPrimitives.MultiplyAddEstimate.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorPrimitives.MultiplyAddEstimate.cs index d3e651c160e881..b1bb7d379dcb5b 100644 --- a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorPrimitives.MultiplyAddEstimate.cs +++ b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorPrimitives.MultiplyAddEstimate.cs @@ -128,9 +128,8 @@ public static Vector128 Invoke(Vector128 x, Vector128 y, Vector128 z { return Vector128.MultiplyAddEstimate(x.AsDouble(), y.AsDouble(), z.AsDouble()).As(); } - else + else if (typeof(T) == typeof(float)) { - Debug.Assert(typeof(T) == typeof(float)); return Vector128.MultiplyAddEstimate(x.AsSingle(), y.AsSingle(), z.AsSingle()).As(); } #else @@ -149,9 +148,9 @@ public static Vector128 Invoke(Vector128 x, Vector128 y, Vector128 z { if (typeof(T) == typeof(double)) return AdvSimd.Arm64.FusedMultiplyAdd(z.AsDouble(), x.AsDouble(), y.AsDouble()).As(); } +#endif return (x * y) + z; -#endif } [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -162,9 +161,8 @@ public static Vector256 Invoke(Vector256 x, Vector256 y, Vector256 z { return Vector256.MultiplyAddEstimate(x.AsDouble(), y.AsDouble(), z.AsDouble()).As(); } - else + else if (typeof(T) == typeof(float)) { - Debug.Assert(typeof(T) == typeof(float)); return Vector256.MultiplyAddEstimate(x.AsSingle(), y.AsSingle(), z.AsSingle()).As(); } #else @@ -173,9 +171,9 @@ public static Vector256 Invoke(Vector256 x, Vector256 y, Vector256 z if (typeof(T) == typeof(float)) return Fma.MultiplyAdd(x.AsSingle(), y.AsSingle(), z.AsSingle()).As(); if (typeof(T) == typeof(double)) return Fma.MultiplyAdd(x.AsDouble(), y.AsDouble(), z.AsDouble()).As(); } +#endif return (x * y) + z; -#endif } [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -186,9 +184,8 @@ public static Vector512 Invoke(Vector512 x, Vector512 y, Vector512 z { return Vector512.MultiplyAddEstimate(x.AsDouble(), y.AsDouble(), z.AsDouble()).As(); } - else + else if (typeof(T) == typeof(float)) { - Debug.Assert(typeof(T) == typeof(float)); return Vector512.MultiplyAddEstimate(x.AsSingle(), y.AsSingle(), z.AsSingle()).As(); } #else @@ -197,9 +194,9 @@ public static Vector512 Invoke(Vector512 x, Vector512 y, Vector512 z if (typeof(T) == typeof(float)) return Avx512F.FusedMultiplyAdd(x.AsSingle(), y.AsSingle(), z.AsSingle()).As(); if (typeof(T) == typeof(double)) return Avx512F.FusedMultiplyAdd(x.AsDouble(), y.AsDouble(), z.AsDouble()).As(); } +#endif return (x * y) + z; -#endif } } } diff --git a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorPrimitives.Reciprocal.cs b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorPrimitives.Reciprocal.cs index 16d0df26157cb2..2c348a4cd28d92 100644 --- a/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorPrimitives.Reciprocal.cs +++ b/src/libraries/System.Numerics.Tensors/src/System/Numerics/Tensors/netcore/TensorPrimitives.Reciprocal.cs @@ -47,7 +47,7 @@ public static void ReciprocalEstimate(ReadOnlySpan x, Span destination) /// is an integer type and an element in is equal to zero. /// /// - /// This method effectively computes [i] = 1 / [i]. + /// This method effectively computes [i] = 1 / T.Sqrt([i]). /// /// public static void ReciprocalSqrt(ReadOnlySpan x, Span destination) @@ -62,7 +62,7 @@ public static void ReciprocalSqrt(ReadOnlySpan x, Span destination) /// is an integer type and an element in is equal to zero. /// /// - /// This method effectively computes [i] = 1 / [i]. + /// This method effectively computes [i] = 1 / T.Sqrt([i]). /// /// public static void ReciprocalSqrtEstimate(ReadOnlySpan x, Span destination) diff --git a/src/libraries/System.Numerics.Tensors/tests/TensorPrimitives.Generic.cs b/src/libraries/System.Numerics.Tensors/tests/TensorPrimitives.Generic.cs index 94bbfb8fcebe92..2d3ce10a64d0e3 100644 --- a/src/libraries/System.Numerics.Tensors/tests/TensorPrimitives.Generic.cs +++ b/src/libraries/System.Numerics.Tensors/tests/TensorPrimitives.Generic.cs @@ -501,7 +501,7 @@ public void SpanDestinationFunctions_ThrowsForTooShortDestination(SpanDestinatio [Theory] [MemberData(nameof(SpanDestinationFunctionsToTest))] - public void SpanDestinationFunctions_ThrowsForOverlapppingInputsWithOutputs(SpanDestinationDelegate tensorPrimitivesMethod, Func expectedMethod, T? tolerance = null) + public void SpanDestinationFunctions_ThrowsForOverlappingInputsWithOutputs(SpanDestinationDelegate tensorPrimitivesMethod, Func expectedMethod, T? tolerance = null) { _ = expectedMethod; _ = tolerance; @@ -639,7 +639,7 @@ public void SpanSpanDestination_ThrowsForTooShortDestination(SpanSpanDestination [Theory] [MemberData(nameof(SpanSpanDestinationFunctionsToTest))] - public void SpanSpanDestination_ThrowsForOverlapppingInputsWithOutputs(SpanSpanDestinationDelegate tensorPrimitivesMethod, Func expectedMethod, T? tolerance = null) + public void SpanSpanDestination_ThrowsForOverlappingInputsWithOutputs(SpanSpanDestinationDelegate tensorPrimitivesMethod, Func expectedMethod, T? tolerance = null) { _ = expectedMethod; _ = tolerance; @@ -751,7 +751,7 @@ public void SpanScalarDestination_ThrowsForTooShortDestination(SpanScalarDestina [Theory] [MemberData(nameof(SpanScalarDestinationFunctionsToTest))] - public void SpanScalarDestination_ThrowsForOverlapppingInputsWithOutputs(SpanScalarDestinationDelegate tensorPrimitivesMethod, Func expectedMethod, T? tolerance = null) + public void SpanScalarDestination_ThrowsForOverlappingInputsWithOutputs(SpanScalarDestinationDelegate tensorPrimitivesMethod, Func expectedMethod, T? tolerance = null) { _ = expectedMethod; _ = tolerance; @@ -851,7 +851,7 @@ public void SpanScalarFloatDestination_ThrowsForTooShortDestination(ScalarSpanDe [Theory] [MemberData(nameof(ScalarSpanFloatDestinationFunctionsToTest))] - public void SpanScalarFloatDestination_ThrowsForOverlapppingInputsWithOutputs(ScalarSpanDestinationDelegate tensorPrimitivesMethod, Func expectedMethod, T? tolerance = null) + public void SpanScalarFloatDestination_ThrowsForOverlappingInputsWithOutputs(ScalarSpanDestinationDelegate tensorPrimitivesMethod, Func expectedMethod, T? tolerance = null) { _ = expectedMethod; _ = tolerance; @@ -949,7 +949,7 @@ public void SpanIntDestination_ThrowsForTooShortDestination(SpanScalarDestinatio [Theory] [MemberData(nameof(SpanIntDestinationFunctionsToTest))] - public void SpanIntDestination_ThrowsForOverlapppingInputsWithOutputs(SpanScalarDestinationDelegate tensorPrimitivesMethod, Func expectedMethod, T? tolerance = null) + public void SpanIntDestination_ThrowsForOverlappingInputsWithOutputs(SpanScalarDestinationDelegate tensorPrimitivesMethod, Func expectedMethod, T? tolerance = null) { _ = expectedMethod; _ = tolerance; @@ -1091,7 +1091,7 @@ public void SpanSpanSpanDestination_ThrowsForTooShortDestination(SpanSpanSpanDes [Theory] [MemberData(nameof(SpanSpanSpanDestinationFunctionsToTest))] - public void SpanSpanSpanDestination_ThrowsForOverlapppingInputsWithOutputs(SpanSpanSpanDestinationDelegate tensorPrimitivesMethod, Func expectedMethod, T? tolerance = null) + public void SpanSpanSpanDestination_ThrowsForOverlappingInputsWithOutputs(SpanSpanSpanDestinationDelegate tensorPrimitivesMethod, Func expectedMethod, T? tolerance = null) { _ = expectedMethod; _ = tolerance; @@ -1110,7 +1110,7 @@ public static IEnumerable SpanSpanScalarDestinationFunctionsToTest() { yield return Create(TensorPrimitives.FusedMultiplyAdd, T.FusedMultiplyAdd); yield return Create(TensorPrimitives.Lerp, T.Lerp); - yield return Create(TensorPrimitives.MultiplyAddEstimate, T.FusedMultiplyAdd, T.CreateTruncating(Helpers.DefaultToleranceForEstimates)); // TODO: Change T.FusedMultiplyAdd to T.MultiplyAddEstimate when available + yield return Create(TensorPrimitives.MultiplyAddEstimate, T.MultiplyAddEstimate, T.CreateTruncating(Helpers.DefaultToleranceForEstimates)); static object[] Create(SpanSpanScalarDestinationDelegate tensorPrimitivesMethod, Func expectedMethod, T? tolerance = null) => new object[] { tensorPrimitivesMethod, expectedMethod, tolerance }; @@ -1206,7 +1206,7 @@ public void SpanSpanScalarDestination_ThrowsForTooShortDestination(SpanSpanScala [Theory] [MemberData(nameof(SpanSpanScalarDestinationFunctionsToTest))] - public void SpanSpanScalarDestination_ThrowsForOverlapppingInputsWithOutputs(SpanSpanScalarDestinationDelegate tensorPrimitivesMethod, Func expectedMethod, T? tolerance = null) + public void SpanSpanScalarDestination_ThrowsForOverlappingInputsWithOutputs(SpanSpanScalarDestinationDelegate tensorPrimitivesMethod, Func expectedMethod, T? tolerance = null) { _ = expectedMethod; _ = tolerance; @@ -1320,7 +1320,7 @@ public void SpanScalarSpanDestination_ThrowsForTooShortDestination(SpanScalarSpa [Theory] [MemberData(nameof(SpanScalarSpanDestinationFunctionsToTest))] - public void SpanScalarSpanDestination_ThrowsForOverlapppingInputsWithOutputs(SpanScalarSpanDestinationDelegate tensorPrimitivesMethod, Func expectedMethod, T? tolerance = null) + public void SpanScalarSpanDestination_ThrowsForOverlappingInputsWithOutputs(SpanScalarSpanDestinationDelegate tensorPrimitivesMethod, Func expectedMethod, T? tolerance = null) { _ = expectedMethod; _ = tolerance; @@ -1474,7 +1474,7 @@ public void SpanDestinationDestinationFunctions_ThrowsForTooShortDestination(Spa [Theory] [MemberData(nameof(SpanDestinationDestinationFunctionsToTest))] - public void SpanDestinationDestinationFunctions_ThrowsForOverlapppingInputsWithOutputs(SpanDestinationDestinationDelegate tensorPrimitivesMethod, Func _) + public void SpanDestinationDestinationFunctions_ThrowsForOverlappingInputsWithOutputs(SpanDestinationDestinationDelegate tensorPrimitivesMethod, Func _) { T[] array = new T[10]; Assert.Throws(() => tensorPrimitivesMethod(array.AsSpan(1, 2), array.AsSpan(0, 2), array.AsSpan(4, 2))); @@ -1747,7 +1747,7 @@ public void SpanDestinationFunctions_ThrowsForTooShortDestination(SpanDestinatio [Theory] [MemberData(nameof(SpanDestinationFunctionsToTest))] - public void SpanDestinationFunctions_ThrowsForOverlapppingInputsWithOutputs(SpanDestinationDelegate tensorPrimitivesMethod, Func _) + public void SpanDestinationFunctions_ThrowsForOverlappingInputsWithOutputs(SpanDestinationDelegate tensorPrimitivesMethod, Func _) { T[] array = new T[10]; AssertExtensions.Throws("destination", () => tensorPrimitivesMethod(array.AsSpan(1, 2), array.AsSpan(0, 2))); @@ -1833,7 +1833,7 @@ public void SpanSpanDestination_ThrowsForTooShortDestination(SpanSpanDestination [Theory] [MemberData(nameof(SpanSpanDestinationFunctionsToTest))] - public void SpanSpanDestination_ThrowsForOverlapppingInputsWithOutputs(SpanSpanDestinationDelegate tensorPrimitivesMethod, Func _) + public void SpanSpanDestination_ThrowsForOverlappingInputsWithOutputs(SpanSpanDestinationDelegate tensorPrimitivesMethod, Func _) { T[] array = new T[10]; AssertExtensions.Throws("destination", () => tensorPrimitivesMethod(array.AsSpan(1, 2), array.AsSpan(5, 2), array.AsSpan(0, 2))); @@ -1915,7 +1915,7 @@ public void SpanScalarDestination_ThrowsForTooShortDestination(SpanScalarDestina [Theory] [MemberData(nameof(SpanScalarDestinationFunctionsToTest))] - public void SpanScalarDestination_ThrowsForOverlapppingInputWithOutputs(SpanScalarDestinationDelegate tensorPrimitivesMethod, Func _) + public void SpanScalarDestination_ThrowsForOverlappingInputWithOutputs(SpanScalarDestinationDelegate tensorPrimitivesMethod, Func _) { T[] array = new T[10]; T y = NextRandom(); @@ -1924,6 +1924,149 @@ public void SpanScalarDestination_ThrowsForOverlapppingInputWithOutputs(SpanScal } #endregion + #region Span,Span,Span -> Destination + public static IEnumerable SpanSpanSpanDestinationFunctionsToTest() + { + yield return Create(TensorPrimitives.MultiplyAddEstimate, T.MultiplyAddEstimate, T.CreateTruncating(Helpers.DefaultToleranceForEstimates)); + + static object[] Create(SpanSpanSpanDestinationDelegate tensorPrimitivesMethod, Func expectedMethod, T? tolerance = null) + => new object[] { tensorPrimitivesMethod, expectedMethod, tolerance }; + } + + [Theory] + [MemberData(nameof(SpanSpanSpanDestinationFunctionsToTest))] + public void SpanSpanSpanDestination_AllLengths(SpanSpanSpanDestinationDelegate tensorPrimitivesMethod, Func expectedMethod, T? tolerance = null) + { + Assert.All(Helpers.TensorLengthsIncluding0, tensorLength => + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + using BoundedMemory z = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength); + + tensorPrimitivesMethod(x, y, z, destination); + for (int i = 0; i < tensorLength; i++) + { + AssertEqualTolerance(expectedMethod(x[i], y[i], z[i]), destination[i], tolerance); + } + }); + } + + [Theory] + [MemberData(nameof(SpanSpanSpanDestinationFunctionsToTest))] + public void SpanSpanSpanDestination_InPlace(SpanSpanSpanDestinationDelegate tensorPrimitivesMethod, Func expectedMethod, T? tolerance = null) + { + Assert.All(Helpers.TensorLengthsIncluding0, tensorLength => + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + T[] xOrig = x.Span.ToArray(); + + tensorPrimitivesMethod(x, x, x, x); + + for (int i = 0; i < tensorLength; i++) + { + AssertEqualTolerance(expectedMethod(xOrig[i], xOrig[i], xOrig[i]), x[i], tolerance); + } + }); + } + + [Theory] + [MemberData(nameof(SpanSpanSpanDestinationFunctionsToTest))] + public void SpanSpanSpanDestination_SpecialValues(SpanSpanSpanDestinationDelegate tensorPrimitivesMethod, Func expectedMethod, T? tolerance = null) + { + Assert.All(Helpers.TensorLengths, tensorLength => + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + using BoundedMemory z = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength); + + RunForEachSpecialValue(() => + { + tensorPrimitivesMethod(x.Span, y.Span, z.Span, destination.Span); + for (int i = 0; i < tensorLength; i++) + { + AssertEqualTolerance(expectedMethod(x[i], y[i], z[i]), destination[i], tolerance); + } + }, x); + + RunForEachSpecialValue(() => + { + tensorPrimitivesMethod(x.Span, y.Span, z.Span, destination.Span); + for (int i = 0; i < tensorLength; i++) + { + AssertEqualTolerance(expectedMethod(x[i], y[i], z[i]), destination[i], tolerance); + } + }, y); + + RunForEachSpecialValue(() => + { + tensorPrimitivesMethod(x.Span, y.Span, z.Span, destination.Span); + for (int i = 0; i < tensorLength; i++) + { + AssertEqualTolerance(expectedMethod(x[i], y[i], z[i]), destination[i], tolerance); + } + }, z); + }); + } + + [Theory] + [MemberData(nameof(SpanSpanSpanDestinationFunctionsToTest))] + public void SpanSpanSpanDestination_ThrowsForMismatchedLengths(SpanSpanSpanDestinationDelegate tensorPrimitivesMethod, Func expectedMethod, T? tolerance = null) + { + _ = expectedMethod; + _ = tolerance; + + Assert.All(Helpers.TensorLengths, tensorLength => + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + using BoundedMemory z = CreateAndFillTensor(tensorLength - 1); + using BoundedMemory destination = CreateTensor(tensorLength); + + Assert.Throws(() => tensorPrimitivesMethod(x, y, z, destination)); + Assert.Throws(() => tensorPrimitivesMethod(x, z, y, destination)); + Assert.Throws(() => tensorPrimitivesMethod(y, x, z, destination)); + Assert.Throws(() => tensorPrimitivesMethod(y, z, x, destination)); + Assert.Throws(() => tensorPrimitivesMethod(z, x, y, destination)); + Assert.Throws(() => tensorPrimitivesMethod(z, y, x, destination)); + }); + } + + [Theory] + [MemberData(nameof(SpanSpanSpanDestinationFunctionsToTest))] + public void SpanSpanSpanDestination_ThrowsForTooShortDestination(SpanSpanSpanDestinationDelegate tensorPrimitivesMethod, Func expectedMethod, T? tolerance = null) + { + _ = expectedMethod; + _ = tolerance; + + Assert.All(Helpers.TensorLengths, tensorLength => + { + using BoundedMemory x = CreateAndFillTensor(tensorLength); + using BoundedMemory y = CreateAndFillTensor(tensorLength); + using BoundedMemory z = CreateAndFillTensor(tensorLength); + using BoundedMemory destination = CreateTensor(tensorLength - 1); + + AssertExtensions.Throws("destination", () => tensorPrimitivesMethod(x, y, z, destination)); + }); + } + + [Theory] + [MemberData(nameof(SpanSpanSpanDestinationFunctionsToTest))] + public void SpanSpanSpanDestination_ThrowsForOverlappingInputsWithOutputs(SpanSpanSpanDestinationDelegate tensorPrimitivesMethod, Func expectedMethod, T? tolerance = null) + { + _ = expectedMethod; + _ = tolerance; + + T[] array = new T[10]; + AssertExtensions.Throws("destination", () => tensorPrimitivesMethod(array.AsSpan(1, 2), array.AsSpan(5, 2), array.AsSpan(7, 2), array.AsSpan(0, 2))); + AssertExtensions.Throws("destination", () => tensorPrimitivesMethod(array.AsSpan(1, 2), array.AsSpan(5, 2), array.AsSpan(7, 2), array.AsSpan(2, 2))); + AssertExtensions.Throws("destination", () => tensorPrimitivesMethod(array.AsSpan(1, 2), array.AsSpan(5, 2), array.AsSpan(7, 2), array.AsSpan(4, 2))); + AssertExtensions.Throws("destination", () => tensorPrimitivesMethod(array.AsSpan(1, 2), array.AsSpan(5, 2), array.AsSpan(7, 2), array.AsSpan(6, 2))); + AssertExtensions.Throws("destination", () => tensorPrimitivesMethod(array.AsSpan(1, 2), array.AsSpan(5, 2), array.AsSpan(7, 2), array.AsSpan(8, 2))); + } + #endregion + #region Shifting/Rotating public static IEnumerable ShiftRotateDestinationFunctionsToTest() { @@ -1989,7 +2132,7 @@ public void ShiftRotateDestination_ThrowsForTooShortDestination(SpanScalarDestin [Theory] [MemberData(nameof(ShiftRotateDestinationFunctionsToTest))] - public void ShiftRotateDestination_ThrowsForOverlapppingInputWithOutputs(SpanScalarDestinationDelegate tensorPrimitivesMethod, Func _) + public void ShiftRotateDestination_ThrowsForOverlappingInputWithOutputs(SpanScalarDestinationDelegate tensorPrimitivesMethod, Func _) { T[] array = new T[10]; AssertExtensions.Throws("destination", () => tensorPrimitivesMethod(array.AsSpan(1, 2), default, array.AsSpan(0, 2))); @@ -2084,7 +2227,7 @@ public void CopySign_ThrowsForTooShortDestination() } [Fact] - public void CopySign_ThrowsForOverlapppingInputsWithOutputs() + public void CopySign_ThrowsForOverlappingInputsWithOutputs() { T[] array = new T[10]; @@ -2347,7 +2490,7 @@ public void ScalarSpanDestination_ThrowsForTooShortDestination(ScalarSpanDestina [Theory] [MemberData(nameof(ScalarSpanDestinationFunctionsToTest))] - public void ScalarSpanDestination_ThrowsForOverlapppingInputsWithOutputs(ScalarSpanDestinationDelegate tensorPrimitivesMethod, Func _) + public void ScalarSpanDestination_ThrowsForOverlappingInputsWithOutputs(ScalarSpanDestinationDelegate tensorPrimitivesMethod, Func _) { T[] array = new T[10]; AssertExtensions.Throws("destination", () => tensorPrimitivesMethod(default, array.AsSpan(4, 2), array.AsSpan(3, 2))); diff --git a/src/libraries/System.Numerics.Tensors/tests/TensorPrimitivesTests.cs b/src/libraries/System.Numerics.Tensors/tests/TensorPrimitivesTests.cs index 920ed00af7e90f..119f57a1f93759 100644 --- a/src/libraries/System.Numerics.Tensors/tests/TensorPrimitivesTests.cs +++ b/src/libraries/System.Numerics.Tensors/tests/TensorPrimitivesTests.cs @@ -236,7 +236,7 @@ public void Abs_ThrowsForTooShortDestination() } [Fact] - public void Abs_ThrowsForOverlapppingInputsWithOutputs() + public void Abs_ThrowsForOverlappingInputsWithOutputs() { T[] array = new T[10]; AssertExtensions.Throws("destination", () => Abs(array.AsSpan(1, 5), array.AsSpan(0, 5))); @@ -307,7 +307,7 @@ public void Add_TwoTensors_ThrowsForTooShortDestination() } [Fact] - public void Add_TwoTensors_ThrowsForOverlapppingInputsWithOutputs() + public void Add_TwoTensors_ThrowsForOverlappingInputsWithOutputs() { T[] array = new T[10]; AssertExtensions.Throws("destination", () => Add(array.AsSpan(1, 2), array.AsSpan(5, 2), array.AsSpan(0, 2))); @@ -366,7 +366,7 @@ public void Add_TensorScalar_ThrowsForTooShortDestination() } [Fact] - public void Add_TensorScalar_ThrowsForOverlapppingInputsWithOutputs() + public void Add_TensorScalar_ThrowsForOverlappingInputsWithOutputs() { T[] array = new T[10]; AssertExtensions.Throws("destination", () => Add(array.AsSpan(1, 2), default(T), array.AsSpan(0, 2))); @@ -442,7 +442,7 @@ public void AddMultiply_ThreeTensors_ThrowsForTooShortDestination() } [Fact] - public void AddMultiply_ThreeTensors_ThrowsForOverlapppingInputsWithOutputs() + public void AddMultiply_ThreeTensors_ThrowsForOverlappingInputsWithOutputs() { T[] array = new T[10]; AssertExtensions.Throws("destination", () => AddMultiply(array.AsSpan(1, 2), array.AsSpan(4, 2), array.AsSpan(7, 2), array.AsSpan(0, 2))); @@ -520,7 +520,7 @@ public void AddMultiply_TensorTensorScalar_ThrowsForTooShortDestination() } [Fact] - public void AddMultiply_TensorTensorScalar_ThrowsForOverlapppingInputsWithOutputs() + public void AddMultiply_TensorTensorScalar_ThrowsForOverlappingInputsWithOutputs() { T[] array = new T[10]; AssertExtensions.Throws("destination", () => AddMultiply(array.AsSpan(1, 2), array.AsSpan(4, 2), default(T), array.AsSpan(0, 2))); @@ -596,7 +596,7 @@ public void AddMultiply_TensorScalarTensor_ThrowsForTooShortDestination() } [Fact] - public void AddMultiply_TensorScalarTensor_ThrowsForOverlapppingInputsWithOutputs() + public void AddMultiply_TensorScalarTensor_ThrowsForOverlappingInputsWithOutputs() { T[] array = new T[10]; AssertExtensions.Throws("destination", () => AddMultiply(array.AsSpan(1, 2), default(T), array.AsSpan(4, 2), array.AsSpan(0, 2))); @@ -704,7 +704,7 @@ public void Cosh_ThrowsForTooShortDestination() } [Fact] - public void Cosh_ThrowsForOverlapppingInputsWithOutputs() + public void Cosh_ThrowsForOverlappingInputsWithOutputs() { if (!IsFloatingPoint) return; @@ -876,7 +876,7 @@ public void Divide_TwoTensors_ThrowsForTooShortDestination() } [Fact] - public void Divide_TwoTensors_ThrowsForOverlapppingInputsWithOutputs() + public void Divide_TwoTensors_ThrowsForOverlappingInputsWithOutputs() { T[] array = new T[10]; AssertExtensions.Throws("destination", () => Divide(array.AsSpan(1, 2), array.AsSpan(4, 2), array.AsSpan(0, 2))); @@ -935,7 +935,7 @@ public void Divide_TensorScalar_ThrowsForTooShortDestination() } [Fact] - public void Divide_TensorScalar_ThrowsForOverlapppingInputsWithOutputs() + public void Divide_TensorScalar_ThrowsForOverlappingInputsWithOutputs() { T[] array = new T[10]; AssertExtensions.Throws("destination", () => Divide(array.AsSpan(1, 2), array.AsSpan(4, 2), array.AsSpan(0, 2))); @@ -1066,7 +1066,7 @@ public void Exp_ThrowsForTooShortDestination() } [Fact] - public void Exp_ThrowsForOverlapppingInputsWithOutputs() + public void Exp_ThrowsForOverlappingInputsWithOutputs() { if (!IsFloatingPoint) return; @@ -1410,7 +1410,7 @@ public void Log_ThrowsForTooShortDestination() } [Fact] - public void Log_ThrowsForOverlapppingInputsWithOutputs() + public void Log_ThrowsForOverlappingInputsWithOutputs() { if (!IsFloatingPoint) return; @@ -1495,7 +1495,7 @@ public void Log2_ThrowsForTooShortDestination() } [Fact] - public void Log2_ThrowsForOverlapppingInputsWithOutputs() + public void Log2_ThrowsForOverlappingInputsWithOutputs() { if (!IsFloatingPoint) return; @@ -1682,7 +1682,7 @@ public void Max_TwoTensors_ThrowsForTooShortDestination() } [Fact] - public void Max_TwoTensors_ThrowsForOverlapppingInputsWithOutputs() + public void Max_TwoTensors_ThrowsForOverlappingInputsWithOutputs() { T[] array = new T[10]; AssertExtensions.Throws("destination", () => Max(array.AsSpan(1, 2), array.AsSpan(4, 2), array.AsSpan(0, 2))); @@ -1869,7 +1869,7 @@ public void MaxMagnitude_TwoTensors_ThrowsForTooShortDestination() } [Fact] - public void MaxMagnitude_TwoTensors_ThrowsForOverlapppingInputsWithOutputs() + public void MaxMagnitude_TwoTensors_ThrowsForOverlappingInputsWithOutputs() { T[] array = new T[10]; AssertExtensions.Throws("destination", () => MaxMagnitude(array.AsSpan(1, 2), array.AsSpan(4, 2), array.AsSpan(0, 2))); @@ -2056,7 +2056,7 @@ public void Min_TwoTensors_ThrowsForTooShortDestination() } [Fact] - public void Min_TwoTensors_ThrowsForOverlapppingInputsWithOutputs() + public void Min_TwoTensors_ThrowsForOverlappingInputsWithOutputs() { T[] array = new T[10]; AssertExtensions.Throws("destination", () => Min(array.AsSpan(1, 2), array.AsSpan(4, 2), array.AsSpan(0, 2))); @@ -2241,7 +2241,7 @@ public void MinMagnitude_TwoTensors_ThrowsForTooShortDestination() } [Fact] - public void MinMagnitude_TwoTensors_ThrowsForOverlapppingInputsWithOutputs() + public void MinMagnitude_TwoTensors_ThrowsForOverlappingInputsWithOutputs() { T[] array = new T[10]; AssertExtensions.Throws("destination", () => MinMagnitude(array.AsSpan(1, 2), array.AsSpan(4, 2), array.AsSpan(0, 2))); @@ -2315,7 +2315,7 @@ public void Multiply_TwoTensors_ThrowsForTooShortDestination() } [Fact] - public void Multiply_TwoTensors_ThrowsForOverlapppingInputsWithOutputs() + public void Multiply_TwoTensors_ThrowsForOverlappingInputsWithOutputs() { T[] array = new T[10]; AssertExtensions.Throws("destination", () => Multiply(array.AsSpan(1, 2), array.AsSpan(4, 2), array.AsSpan(0, 2))); @@ -2374,7 +2374,7 @@ public void Multiply_TensorScalar_ThrowsForTooShortDestination() } [Fact] - public void Multiply_TensorScalar_ThrowsForOverlapppingInputsWithOutputs() + public void Multiply_TensorScalar_ThrowsForOverlappingInputsWithOutputs() { T[] array = new T[10]; AssertExtensions.Throws("destination", () => Multiply(array.AsSpan(1, 2), default(T), array.AsSpan(0, 2))); @@ -2450,7 +2450,7 @@ public void MultiplyAdd_ThreeTensors_ThrowsForTooShortDestination() } [Fact] - public void MultiplyAdd_ThreeTensors_ThrowsForOverlapppingInputsWithOutputs() + public void MultiplyAdd_ThreeTensors_ThrowsForOverlappingInputsWithOutputs() { T[] array = new T[10]; AssertExtensions.Throws("destination", () => MultiplyAdd(array.AsSpan(1, 2), array.AsSpan(4, 2), array.AsSpan(7, 2), array.AsSpan(0, 2))); @@ -2513,7 +2513,7 @@ public void MultiplyAdd_TensorTensorScalar_ThrowsForTooShortDestination() } [Fact] - public void MultiplyAdd_TensorTensorScalar_ThrowsForOverlapppingInputsWithOutputs() + public void MultiplyAdd_TensorTensorScalar_ThrowsForOverlappingInputsWithOutputs() { T[] array = new T[10]; AssertExtensions.Throws("destination", () => MultiplyAdd(array.AsSpan(1, 2), array.AsSpan(4, 2), default(T), array.AsSpan(0, 2))); @@ -2574,7 +2574,7 @@ public void MultiplyAdd_TensorScalarTensor_ThrowsForTooShortDestination() } [Fact] - public void MultiplyAdd_TensorScalarTensor_ThrowsForOverlapppingInputsWithOutputs() + public void MultiplyAdd_TensorScalarTensor_ThrowsForOverlappingInputsWithOutputs() { T[] array = new T[10]; AssertExtensions.Throws("destination", () => MultiplyAdd(array.AsSpan(1, 2), default(T), array.AsSpan(4, 2), array.AsSpan(0, 2))); @@ -2632,7 +2632,7 @@ public void Negate_ThrowsForTooShortDestination() } [Fact] - public void Negate_ThrowsForOverlapppingInputsWithOutputs() + public void Negate_ThrowsForOverlappingInputsWithOutputs() { T[] array = new T[10]; AssertExtensions.Throws("destination", () => Negate(array.AsSpan(1, 2), array.AsSpan(0, 2))); @@ -2827,7 +2827,7 @@ public void Sigmoid_ThrowsForEmptyInput() } [Fact] - public void Sigmoid_ThrowsForOverlapppingInputsWithOutputs() + public void Sigmoid_ThrowsForOverlappingInputsWithOutputs() { if (!IsFloatingPoint) return; @@ -2935,7 +2935,7 @@ public void Sinh_ThrowsForTooShortDestination() } [Fact] - public void Sinh_ThrowsForOverlapppingInputsWithOutputs() + public void Sinh_ThrowsForOverlappingInputsWithOutputs() { if (!IsFloatingPoint) return; @@ -3019,7 +3019,7 @@ public void SoftMax_ThrowsForEmptyInput() } [Fact] - public void SoftMax_ThrowsForOverlapppingInputsWithOutputs() + public void SoftMax_ThrowsForOverlappingInputsWithOutputs() { if (!IsFloatingPoint) return; @@ -3093,7 +3093,7 @@ public void Subtract_TwoTensors_ThrowsForTooShortDestination() } [Fact] - public void Subtract_TwoTensors_ThrowsForOverlapppingInputsWithOutputs() + public void Subtract_TwoTensors_ThrowsForOverlappingInputsWithOutputs() { T[] array = new T[10]; AssertExtensions.Throws("destination", () => Subtract(array.AsSpan(1, 2), array.AsSpan(4, 2), array.AsSpan(0, 2))); @@ -3152,7 +3152,7 @@ public void Subtract_TensorScalar_ThrowsForTooShortDestination() } [Fact] - public void Subtract_TensorScalar_ThrowsForOverlapppingInputsWithOutputs() + public void Subtract_TensorScalar_ThrowsForOverlappingInputsWithOutputs() { T[] array = new T[10]; AssertExtensions.Throws("destination", () => Subtract(array.AsSpan(1, 2), default(T), array.AsSpan(0, 2))); @@ -3317,7 +3317,7 @@ public void Tanh_ThrowsForTooShortDestination() } [Fact] - public void Tanh_ThrowsForOverlapppingInputsWithOutputs() + public void Tanh_ThrowsForOverlappingInputsWithOutputs() { if (!IsFloatingPoint) return; diff --git a/src/libraries/System.Numerics.Tensors/tests/TensorTests.cs b/src/libraries/System.Numerics.Tensors/tests/TensorTests.cs index f1886069e056ce..b1ad7a4c2d78cf 100644 --- a/src/libraries/System.Numerics.Tensors/tests/TensorTests.cs +++ b/src/libraries/System.Numerics.Tensors/tests/TensorTests.cs @@ -988,6 +988,7 @@ public static void TensorSetSliceTests() Assert.Equal(13, t0[1, 3]); Assert.Equal(14, t0[1, 4]); } + [Fact] public static void TensorStackTests() { @@ -1074,6 +1075,47 @@ public static void TensorStackTests() Assert.Equal(8, resultTensor[1, 3, 1]); Assert.Equal(9, resultTensor[1, 4, 0]); Assert.Equal(9, resultTensor[1, 4, 1]); + + // stacking 2x2 tensors along dimension 1 + Tensor v1 = Tensor.Create([1, 2, 3, 4], [2, 2]); + Tensor v2 = Tensor.Create([10, 20, 30, 40], [2, 2]); + + resultTensor = Tensor.StackAlongDimension(1, [v1, v2]); + + Assert.Equal(3, resultTensor.Rank); + Assert.Equal(2, resultTensor.Lengths[0]); + Assert.Equal(2, resultTensor.Lengths[1]); + Assert.Equal(2, resultTensor.Lengths[2]); + + Assert.Equal(1, resultTensor[0, 0, 0]); + Assert.Equal(2, resultTensor[0, 0, 1]); + Assert.Equal(10, resultTensor[0, 1, 0]); + Assert.Equal(20, resultTensor[0, 1, 1]); + + Assert.Equal(3, resultTensor[1, 0, 0]); + Assert.Equal(4, resultTensor[1, 0, 1]); + Assert.Equal(30, resultTensor[1, 1, 0]); + Assert.Equal(40, resultTensor[1, 1, 1]); + + resultTensor = Tensor.StackAlongDimension(0, [v1, v2]); + + Tensor resultTensor2 = Tensor.Create([2, 2, 2]); + Tensor.StackAlongDimension([v1, v2], resultTensor2, 1); + + Assert.Equal(3, resultTensor2.Rank); + Assert.Equal(2, resultTensor2.Lengths[0]); + Assert.Equal(2, resultTensor2.Lengths[1]); + Assert.Equal(2, resultTensor2.Lengths[2]); + + Assert.Equal(1, resultTensor2[0, 0, 0]); + Assert.Equal(2, resultTensor2[0, 0, 1]); + Assert.Equal(10, resultTensor2[0, 1, 0]); + Assert.Equal(20, resultTensor2[0, 1, 1]); + + Assert.Equal(3, resultTensor2[1, 0, 0]); + Assert.Equal(4, resultTensor2[1, 0, 1]); + Assert.Equal(30, resultTensor2[1, 1, 0]); + Assert.Equal(40, resultTensor2[1, 1, 1]); } [Fact] diff --git a/src/libraries/System.Numerics.Vectors/tests/Matrix4x4Tests.cs b/src/libraries/System.Numerics.Vectors/tests/Matrix4x4Tests.cs index 80877852d6378d..2107bcf184f8d9 100644 --- a/src/libraries/System.Numerics.Vectors/tests/Matrix4x4Tests.cs +++ b/src/libraries/System.Numerics.Vectors/tests/Matrix4x4Tests.cs @@ -819,11 +819,38 @@ public void Matrix4x4CreateReflectionTest01() Vector3 v = point - pp; float d = Vector3.Dot(v, plane.Normal); Vector3 vp = point - 2.0f * d * plane.Normal; - Assert.True(MathHelper.Equal(rp, vp), "Matrix4x4.Reflection did not provide expected value."); + Assert.True(MathHelper.Equal(rp, vp), "Matrix4x4.CreateReflection did not provide expected value."); } } } + [Fact] + public void Matrix4x4CreateReflectionTest02() + { + Plane plane = new Plane(0, 1, 0, 60); + Matrix4x4 actual = Matrix4x4.CreateReflection(plane); + + AssertExtensions.Equal(1.0f, actual.M11, 0.0f); + AssertExtensions.Equal(0.0f, actual.M12, 0.0f); + AssertExtensions.Equal(0.0f, actual.M13, 0.0f); + AssertExtensions.Equal(0.0f, actual.M14, 0.0f); + + AssertExtensions.Equal(0.0f, actual.M21, 0.0f); + AssertExtensions.Equal(-1.0f, actual.M22, 0.0f); + AssertExtensions.Equal(0.0f, actual.M23, 0.0f); + AssertExtensions.Equal(0.0f, actual.M24, 0.0f); + + AssertExtensions.Equal(0.0f, actual.M31, 0.0f); + AssertExtensions.Equal(0.0f, actual.M32, 0.0f); + AssertExtensions.Equal(1.0f, actual.M33, 0.0f); + AssertExtensions.Equal(0.0f, actual.M34, 0.0f); + + AssertExtensions.Equal(0.0f, actual.M41, 0.0f); + AssertExtensions.Equal(-120.0f, actual.M42, 0.0f); + AssertExtensions.Equal(0.0f, actual.M43, 0.0f); + AssertExtensions.Equal(1.0f, actual.M44, 0.0f); + } + // A test for CreateRotationZ (float) [Fact] public void Matrix4x4CreateRotationZTest() diff --git a/src/libraries/System.Private.CoreLib/src/System/Convert.cs b/src/libraries/System.Private.CoreLib/src/System/Convert.cs index 8bf81152991ee8..62e4cd8412ab90 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Convert.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Convert.cs @@ -3099,7 +3099,7 @@ public static bool TryToHexString(ReadOnlySpan source, Span destinat charsWritten = 0; return true; } - else if (source.Length > int.MaxValue / 2 || destination.Length > source.Length * 2) + else if (source.Length > int.MaxValue / 2 || destination.Length < source.Length * 2) { charsWritten = 0; return false; @@ -3176,7 +3176,7 @@ public static bool TryToHexStringLower(ReadOnlySpan source, Span des charsWritten = 0; return true; } - else if (source.Length > int.MaxValue / 2 || destination.Length > source.Length * 2) + else if (source.Length > int.MaxValue / 2 || destination.Length < source.Length * 2) { charsWritten = 0; return false; diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/Matrix4x4.Impl.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/Matrix4x4.Impl.cs index 3a489f0fc1af0a..889311ca073028 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Numerics/Matrix4x4.Impl.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/Matrix4x4.Impl.cs @@ -620,7 +620,7 @@ public static Impl CreateReflection(in Plane value) // https://github.com/microsoft/DirectXMath/blob/master/Inc/DirectXMathMatrix.inl Vector4 p = Plane.Normalize(value).AsVector4(); - Vector4 s = p * -2.0f; + Vector4 s = p * Vector4.Create(-2.0f, -2.0f, -2.0f, 0.0f); Impl result; diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector_1.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector_1.cs index e6cb7e1d4d4fab..9a0ddfb8d81549 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector_1.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/Vector_1.cs @@ -37,15 +37,10 @@ namespace System.Numerics /// Creates a new instance with all elements initialized to the specified value. /// The value that all elements will be initialized to. /// A new with all elements initialized to . - [Intrinsic] + [MethodImpl(MethodImplOptions.AggressiveInlining)] public Vector(T value) { - Unsafe.SkipInit(out this); - - for (int index = 0; index < Count; index++) - { - this.SetElementUnsafe(index, value); - } + this = Vector.Create(value); } /// Creates a new from a given array. diff --git a/src/libraries/System.Private.CoreLib/src/System/OperatingSystem.cs b/src/libraries/System.Private.CoreLib/src/System/OperatingSystem.cs index e7da2f788fa0de..8dca64953b18e3 100644 --- a/src/libraries/System.Private.CoreLib/src/System/OperatingSystem.cs +++ b/src/libraries/System.Private.CoreLib/src/System/OperatingSystem.cs @@ -335,13 +335,19 @@ private static bool IsOSVersionAtLeast(int major, int minor, int build, int revi { return current.Minor > minor; } - if (current.Build != build) + // Unspecified build component is to be treated as zero + int currentBuild = current.Build < 0 ? 0 : current.Build; + build = build < 0 ? 0 : build; + if (currentBuild != build) { - return current.Build > build; + return currentBuild > build; } - return current.Revision >= revision - || (current.Revision == -1 && revision == 0); // it is unavailable on OSX and Environment.OSVersion.Version.Revision returns -1 + // Unspecified revision component is to be treated as zero + int currentRevision = current.Revision < 0 ? 0 : current.Revision; + revision = revision < 0 ? 0 : revision; + + return currentRevision >= revision; } } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.GateThread.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.GateThread.cs index 5d1b79a3098e05..d59cde103713e5 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.GateThread.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.GateThread.cs @@ -27,10 +27,26 @@ private static void GateThreadStart() bool debuggerBreakOnWorkStarvation = AppContextConfigHelper.GetBooleanConfig("System.Threading.ThreadPool.DebugBreakOnWorkerStarvation", false); + // CPU utilization is updated when the gate thread performs periodic activities (GateActivitiesPeriodMs), so + // that would also affect the actual interval. Set to 0 to disable using CPU utilization and have components + // behave as though CPU utilization is low. The default value of 1 causes CPU utilization to be updated whenever + // the gate thread performs periodic activities. + int cpuUtilizationIntervalMs = + AppContextConfigHelper.GetInt32Config( + "System.Threading.ThreadPool.CpuUtilizationIntervalMs", + "DOTNET_ThreadPool_CpuUtilizationIntervalMs", + defaultValue: 1, + allowNegative: false); + // The first reading is over a time range other than what we are focusing on, so we do not use the read other // than to send it to any runtime-specific implementation that may also use the CPU utilization. CpuUtilizationReader cpuUtilizationReader = default; - _ = cpuUtilizationReader.CurrentUtilization; + int lastCpuUtilizationRefreshTimeMs = 0; + if (cpuUtilizationIntervalMs > 0) + { + lastCpuUtilizationRefreshTimeMs = Environment.TickCount; + _ = cpuUtilizationReader.CurrentUtilization; + } PortableThreadPool threadPoolInstance = ThreadPoolInstance; LowLevelLock threadAdjustmentLock = threadPoolInstance._threadAdjustmentLock; @@ -102,8 +118,17 @@ private static void GateThreadStart() (uint)threadPoolInstance.GetAndResetHighWatermarkCountOfThreadsProcessingUserCallbacks()); } - int cpuUtilization = (int)cpuUtilizationReader.CurrentUtilization; - threadPoolInstance._cpuUtilization = cpuUtilization; + // Determine whether CPU utilization should be updated. CPU utilization is only used by the starvation + // heuristic and hill climbing, and neither of those are active when there is a pending blocking + // adjustment. + if (cpuUtilizationIntervalMs > 0 && + threadPoolInstance._pendingBlockingAdjustment == PendingBlockingAdjustment.None && + (uint)(currentTimeMs - lastCpuUtilizationRefreshTimeMs) >= (uint)cpuUtilizationIntervalMs) + { + lastCpuUtilizationRefreshTimeMs = currentTimeMs; + int cpuUtilization = (int)cpuUtilizationReader.CurrentUtilization; + threadPoolInstance._cpuUtilization = cpuUtilization; + } if (!disableStarvationDetection && threadPoolInstance._pendingBlockingAdjustment == PendingBlockingAdjustment.None && diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs index 56d8acf0cd8ff4..f265970b506799 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs @@ -3056,6 +3056,27 @@ private bool SpinThenBlockingWait(int millisecondsTimeout, CancellationToken can bool returnValue = SpinWait(millisecondsTimeout); if (!returnValue) { +#if CORECLR + if (ThreadPoolWorkQueue.s_prioritizationExperiment) + { + // We're about to block waiting for the task to complete, which is expensive, and if + // the task being waited on depends on some other work to run, this thread could end up + // waiting for some other thread to do work. If the two threads are part of the same scheduler, + // such as the thread pool, that could lead to a (temporary) deadlock. This is made worse by + // it also leading to a possible priority inversion on previously queued work. Each thread in + // the thread pool has a local queue. A key motivator for this local queue is it allows this + // thread to create work items that it will then prioritize above all other work in the + // pool. However, while this thread makes its own local queue the top priority, that queue is + // every other thread's lowest priority. If this thread blocks, all of its created work that's + // supposed to be high priority becomes low priority, and work that's typically part of a + // currently in-flight operation gets deprioritized relative to new requests coming into the + // pool, which can lead to the whole system slowing down or even deadlocking. To address that, + // just before we block, we move all local work into a global queue, so that it's at least + // prioritized by other threads more fairly with respect to other work. + ThreadPoolWorkQueue.TransferAllLocalWorkItemsToHighPriorityGlobalQueue(); + } +#endif + var mres = new SetOnInvokeMres(); try { diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadInt64PersistentCounter.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadInt64PersistentCounter.cs index 0f7fbc06a9a8eb..29cf2dce305657 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadInt64PersistentCounter.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadInt64PersistentCounter.cs @@ -15,6 +15,7 @@ internal sealed class ThreadInt64PersistentCounter private static List? t_nodeFinalizationHelpers; private long _overflowCount; + private long _lastReturnedCount; // dummy node serving as a start and end of the ring list private readonly ThreadLocalNode _nodes; @@ -31,6 +32,13 @@ public static void Increment(object threadLocalCountObject) Unsafe.As(threadLocalCountObject).Increment(); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void Decrement(object threadLocalCountObject) + { + Debug.Assert(threadLocalCountObject is ThreadLocalNode); + Unsafe.As(threadLocalCountObject).Decrement(); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void Add(object threadLocalCountObject, uint count) { @@ -76,6 +84,17 @@ public long Count count += node.Count; node = node._next; } + + // Ensure that the returned value is monotonically increasing + long lastReturnedCount = _lastReturnedCount; + if (count > lastReturnedCount) + { + _lastReturnedCount = count; + } + else + { + count = lastReturnedCount; + } } finally { @@ -134,6 +153,18 @@ public void Increment() OnAddOverflow(1); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Decrement() + { + if (_count != 0) + { + _count--; + return; + } + + OnAddOverflow(-1); + } + public void Add(uint count) { Debug.Assert(count != 0); @@ -149,7 +180,7 @@ public void Add(uint count) } [MethodImpl(MethodImplOptions.NoInlining)] - private void OnAddOverflow(uint count) + private void OnAddOverflow(long count) { Debug.Assert(count != 0); @@ -161,7 +192,7 @@ private void OnAddOverflow(uint count) counter._lock.Acquire(); try { - counter._overflowCount += (long)_count + count; + counter._overflowCount += _count + count; _count = 0; } finally diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolWorkQueue.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolWorkQueue.cs index bc0fe4556bb311..7660d427da63fd 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolWorkQueue.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolWorkQueue.cs @@ -701,6 +701,27 @@ public void EnqueueAtHighPriority(object workItem) EnsureThreadRequested(); } + internal static void TransferAllLocalWorkItemsToHighPriorityGlobalQueue() + { + // If there's no local queue, there's nothing to transfer. + if (ThreadPoolWorkQueueThreadLocals.threadLocals is not ThreadPoolWorkQueueThreadLocals tl) + { + return; + } + + // Pop each work item off the local queue and push it onto the global. This is a + // bounded loop as no other thread is allowed to push into this thread's queue. + ThreadPoolWorkQueue queue = ThreadPool.s_workQueue; + while (tl.workStealingQueue.LocalPop() is object workItem) + { + queue.highPriorityWorkItems.Enqueue(workItem); + } + + Volatile.Write(ref queue._mayHaveHighPriorityWorkItems, true); + + queue.EnsureThreadRequested(); + } + internal static bool LocalFindAndPop(object callback) { ThreadPoolWorkQueueThreadLocals? tl = ThreadPoolWorkQueueThreadLocals.threadLocals; @@ -1354,6 +1375,9 @@ void IThreadPoolWorkItem.Execute() Debug.Assert(stageBeforeUpdate != QueueProcessingStage.NotScheduled); if (stageBeforeUpdate == QueueProcessingStage.Determining) { + // Discount a work item here to avoid counting this queue processing work item + ThreadInt64PersistentCounter.Decrement( + ThreadPoolWorkQueueThreadLocals.threadLocals!.threadLocalCompletionCountObject!); return; } } @@ -1393,7 +1417,11 @@ void IThreadPoolWorkItem.Execute() currentThread.ResetThreadPoolThread(); } - ThreadInt64PersistentCounter.Add(tl.threadLocalCompletionCountObject!, completedCount); + // Discount a work item here to avoid counting this queue processing work item + if (completedCount > 1) + { + ThreadInt64PersistentCounter.Add(tl.threadLocalCompletionCountObject!, completedCount - 1); + } } } diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/ReflectionXmlSerializationReader.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/ReflectionXmlSerializationReader.cs index 8d47b1c1aaa1af..22a465deb5fb8c 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/ReflectionXmlSerializationReader.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/ReflectionXmlSerializationReader.cs @@ -1682,6 +1682,11 @@ void Wrapper(object? collection, object? collectionItems) { if (member.Source == null && mapping.TypeDesc.IsArrayLike && !(mapping.Elements!.Length == 1 && mapping.Elements[0].Mapping is ArrayMapping)) { + // Always create a collection for (non-array) collection-like types, even if the XML data says the collection should be null. + if (!mapping.TypeDesc.IsArray) + { + member.Collection ??= new CollectionMember(); + } member.Source = (item) => { member.Collection ??= new CollectionMember(); @@ -1694,26 +1699,51 @@ void Wrapper(object? collection, object? collectionItems) if (member.Source == null) { + var isList = mapping.TypeDesc.IsArrayLike && !mapping.TypeDesc.IsArray; var pi = member.Mapping.MemberInfo as PropertyInfo; - if (pi != null && typeof(IList).IsAssignableFrom(pi.PropertyType) - && (pi.SetMethod == null || !pi.SetMethod.IsPublic)) + + // Here we have to deal with some special cases for property members. The old serializers would trip over + // private property setters generally - except in the case of list-like properties. Because lists get special + // treatment, a private setter for a list property would only be a problem if the default constructor didn't + // already create a list instance for the property. If it does create a list, then the serializer can still + // populate it. Try to emulate the old serializer behavior here. + + // First, for non-list properties, private setters are always a problem. + if (!isList && pi != null && pi.SetMethod != null && !pi.SetMethod.IsPublic) { - member.Source = (value) => + member.Source = (value) => throw new InvalidOperationException(SR.Format(SR.XmlReadOnlyPropertyError, pi.Name, pi.DeclaringType!.FullName)); + } + + // Next, for list properties, we need to handle not only the private setter case, but also the case where + // there is no setter at all. Because we need to give the default constructor a chance to create the list + // first before we make noise about not being able to set a list property. + else if (isList && pi != null && (pi.SetMethod == null || !pi.SetMethod.IsPublic)) + { + var addMethod = mapping.TypeDesc.Type!.GetMethod("Add"); + + if (addMethod != null) { - var getOnlyList = (IList)pi.GetValue(o)!; - if (value is IList valueList) + member.Source = (value) => { - foreach (var v in valueList) + var getOnlyList = pi.GetValue(o)!; + if (getOnlyList == null) { - getOnlyList.Add(v); + // No-setter lists should just be ignored if they weren't created by constructor. Private-setter lists are the noisy exception. + if (pi.SetMethod != null && !pi.SetMethod.IsPublic) + throw new InvalidOperationException(SR.Format(SR.XmlReadOnlyPropertyError, pi.Name, pi.DeclaringType!.FullName)); } - } - else - { - getOnlyList.Add(value); - } - }; + else if (value is IEnumerable valueList) + { + foreach (var v in valueList) + { + addMethod.Invoke(getOnlyList, new object[] { v }); + } + } + }; + } } + + // For all other members (fields, public setter properties, etc), just carry on as normal else { if (member.Mapping.Xmlns != null) @@ -1729,6 +1759,21 @@ void Wrapper(object? collection, object? collectionItems) member.Source = (value) => setterDelegate(o, value); } } + + // Finally, special list handling again. ANY list that we can assign/populate should be initialized with + // an empty list if it hasn't been initialized already. Even if the XML data says the list should be null. + // This is an odd legacy behavior, but it's what the old serializers did. + if (isList && member.Source != null) + { + member.EnsureCollection = (obj) => + { + if (GetMemberValue(obj, mapping.MemberInfo!) == null) + { + var empty = ReflectionCreateObject(mapping.TypeDesc.Type!); + member.Source(empty); + } + }; + } } if (member.Mapping.CheckSpecified == SpecifiedAccessor.ReadWrite) @@ -1782,23 +1827,29 @@ void Wrapper(object elementNameObject) WriteAttributes(allMembers, anyAttribute, unknownNodeAction, ref o); Reader.MoveToElement(); + if (Reader.IsEmptyElement) { Reader.Skip(); - return o; } - - Reader.ReadStartElement(); - bool IsSequenceAllMembers = IsSequence(); - if (IsSequenceAllMembers) + else { - // https://github.com/dotnet/runtime/issues/1402: - // Currently the reflection based method treat this kind of type as normal types. - // But potentially we can do some optimization for types that have ordered properties. - } + Reader.ReadStartElement(); + bool IsSequenceAllMembers = IsSequence(); + if (IsSequenceAllMembers) + { + // https://github.com/dotnet/runtime/issues/1402: + // Currently the reflection based method treat this kind of type as normal types. + // But potentially we can do some optimization for types that have ordered properties. + } - WriteMembers(allMembers, unknownNodeAction, unknownNodeAction, anyElementMember, anyTextMember); + WriteMembers(allMembers, unknownNodeAction, unknownNodeAction, anyElementMember, anyTextMember); + ReadEndElement(); + } + + // Empty element or not, we need to ensure all our array-like members have been initialized in the same + // way as the IL / CodeGen - based serializers. foreach (Member member in allMembers) { if (member.Collection != null) @@ -1810,9 +1861,10 @@ void Wrapper(object elementNameObject) var setMemberValue = GetSetMemberValueDelegate(o, memberInfo.Name); setMemberValue(o, collection); } + + member.EnsureCollection?.Invoke(o!); } - ReadEndElement(); return o; } } @@ -2090,6 +2142,7 @@ internal sealed class Member public Action? CheckSpecifiedSource; public Action? ChoiceSource; public Action? XmlnsSource; + public Action? EnsureCollection; public Member(MemberMapping mapping) { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/ReflectionXmlSerializationWriter.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/ReflectionXmlSerializationWriter.cs index 178591cc6dcc22..ecfe693f4f1b84 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/ReflectionXmlSerializationWriter.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/ReflectionXmlSerializationWriter.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Globalization; using System.Reflection; using System.Text; using System.Xml.Schema; @@ -125,7 +126,7 @@ private void WriteMember(object? o, object? choiceSource, ElementAccessor[] elem } else { - WriteElements(o, elements, text, choice, writeAccessors, memberTypeDesc.IsNullable); + WriteElements(o, choiceSource, elements, text, choice, writeAccessors, memberTypeDesc.IsNullable); } } @@ -150,11 +151,11 @@ private void WriteArray(object o, object? choiceSource, ElementAccessor[] elemen } } - WriteArrayItems(elements, text, choice, o); + WriteArrayItems(elements, text, choice, o, choiceSource); } [RequiresUnreferencedCode("calls WriteElements")] - private void WriteArrayItems(ElementAccessor[] elements, TextAccessor? text, ChoiceIdentifierAccessor? choice, object o) + private void WriteArrayItems(ElementAccessor[] elements, TextAccessor? text, ChoiceIdentifierAccessor? choice, object o, object? choiceSources) { var arr = o as IList; @@ -163,7 +164,8 @@ private void WriteArrayItems(ElementAccessor[] elements, TextAccessor? text, Cho for (int i = 0; i < arr.Count; i++) { object? ai = arr[i]; - WriteElements(ai, elements, text, choice, true, true); + var choiceSource = ((Array?)choiceSources)?.GetValue(i); + WriteElements(ai, choiceSource, elements, text, choice, true, true); } } else @@ -174,17 +176,18 @@ private void WriteArrayItems(ElementAccessor[] elements, TextAccessor? text, Cho IEnumerator e = a.GetEnumerator(); if (e != null) { + int c = 0; while (e.MoveNext()) { object ai = e.Current; - WriteElements(ai, elements, text, choice, true, true); + var choiceSource = ((Array?)choiceSources)?.GetValue(c++); + WriteElements(ai, choiceSource, elements, text, choice, true, true); } } } } - [RequiresUnreferencedCode("calls CreateUnknownTypeException")] - private void WriteElements(object? o, ElementAccessor[] elements, TextAccessor? text, ChoiceIdentifierAccessor? choice, bool writeAccessors, bool isNullable) + private void WriteElements(object? o, object? choiceSource, ElementAccessor[] elements, TextAccessor? text, ChoiceIdentifierAccessor? choice, bool writeAccessors, bool isNullable) { if (elements.Length == 0 && text == null) return; @@ -222,16 +225,35 @@ private void WriteElements(object? o, ElementAccessor[] elements, TextAccessor? } else if (choice != null) { - if (o != null && o.GetType() == element.Mapping!.TypeDesc!.Type) + // This looks heavy - getting names of enums in string form for comparison rather than just comparing values. + // But this faithfully mimics NetFx, and is necessary to prevent confusion between different enum types. + // ie EnumType.ValueX could == 1, but TotallyDifferentEnumType.ValueY could also == 1. + TypeDesc td = element.Mapping!.TypeDesc!; + bool enumUseReflection = choice.Mapping!.TypeDesc!.UseReflection; + string enumTypeName = choice.Mapping!.TypeDesc!.FullName; + string enumFullName = (enumUseReflection ? "" : enumTypeName + ".@") + FindChoiceEnumValue(element, (EnumMapping)choice.Mapping, enumUseReflection); + string choiceFullName = (enumUseReflection ? "" : choiceSource!.GetType().FullName + ".@") + choiceSource!.ToString(); + + if (choiceFullName == enumFullName) { - WriteElement(o, element, writeAccessors); - return; + // Object is either non-null, or it is allowed to be null + if (o != null || (!isNullable || element.IsNullable)) + { + // But if Object is non-null, it's got to match types + if (o != null && !td.Type!.IsAssignableFrom(o!.GetType())) + { + throw CreateMismatchChoiceException(td.FullName, choice.MemberName!, enumFullName); + } + + WriteElement(o, element, writeAccessors); + return; + } } } else { TypeDesc td = element.IsUnbounded ? element.Mapping!.TypeDesc!.CreateArrayTypeDesc() : element.Mapping!.TypeDesc!; - if (o!.GetType() == td.Type) + if (td.Type!.IsAssignableFrom(o!.GetType())) { WriteElement(o, element, writeAccessors); return; @@ -280,6 +302,58 @@ private void WriteElements(object? o, ElementAccessor[] elements, TextAccessor? } } + private static string FindChoiceEnumValue(ElementAccessor element, EnumMapping choiceMapping, bool useReflection) + { + string? enumValue = null; + + for (int i = 0; i < choiceMapping.Constants!.Length; i++) + { + string xmlName = choiceMapping.Constants[i].XmlName; + + if (element.Any && element.Name.Length == 0) + { + if (xmlName == "##any:") + { + if (useReflection) + enumValue = choiceMapping.Constants[i].Value.ToString(CultureInfo.InvariantCulture); + else + enumValue = choiceMapping.Constants[i].Name; + break; + } + continue; + } + int colon = xmlName.LastIndexOf(':'); + string? choiceNs = colon < 0 ? choiceMapping.Namespace : xmlName.Substring(0, colon); + string choiceName = colon < 0 ? xmlName : xmlName.Substring(colon + 1); + + if (element.Name == choiceName) + { + if ((element.Form == XmlSchemaForm.Unqualified && string.IsNullOrEmpty(choiceNs)) || element.Namespace == choiceNs) + { + if (useReflection) + enumValue = choiceMapping.Constants[i].Value.ToString(CultureInfo.InvariantCulture); + else + enumValue = choiceMapping.Constants[i].Name; + break; + } + } + } + + if (string.IsNullOrEmpty(enumValue)) + { + if (element.Any && element.Name.Length == 0) + { + // Type {0} is missing enumeration value '##any' for XmlAnyElementAttribute. + throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingAnyValue, choiceMapping.TypeDesc!.FullName)); + } + // Type {0} is missing value for '{1}'. + throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingValue, choiceMapping.TypeDesc!.FullName, element.Namespace + ":" + element.Name, element.Name, element.Namespace)); + } + if (!useReflection) + CodeIdentifier.CheckValidIdentifier(enumValue); + return enumValue; + } + private void WriteText(object o, TextAccessor text) { if (text.Mapping is PrimitiveMapping primitiveMapping) @@ -376,7 +450,7 @@ private void WriteElement(object? o, ElementAccessor element, bool writeAccessor if (o != null) { WriteStartElement(name, ns, false); - WriteArrayItems(mapping.ElementsSortedByDerivation!, null, null, o); + WriteArrayItems(mapping.ElementsSortedByDerivation!, null, null, o, null); WriteEndElement(); } } diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializer.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializer.cs index 71bd696e6f0e53..e58535876c0c26 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializer.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializer.cs @@ -379,7 +379,6 @@ public void Serialize(XmlWriter xmlWriter, object? o, XmlSerializerNamespaces? n } else if (_tempAssembly == null || _typedSerializer) { - // The contion for the block is never true, thus the block is never hit. XmlSerializationWriter writer = CreateWriter(); writer.Init(xmlWriter, namespaces == null || namespaces.Count == 0 ? DefaultNamespaces : namespaces, encodingStyle, id); Serialize(o, writer); diff --git a/src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.RuntimeOnly.cs b/src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.RuntimeOnly.cs index 9fa615c142d72c..6e30166765ca0c 100644 --- a/src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.RuntimeOnly.cs +++ b/src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.RuntimeOnly.cs @@ -884,6 +884,39 @@ public static void Xml_XmlDocumentAsRoot() Assert.Equal(expected.OuterXml, actual.OuterXml); } + [Fact] + public static void Xml_TestTypeWithPrivateOrNoSetters() + { + // Private setters are a problem. Traditional XmlSerializer doesn't know what to do with them. + // This should fail when constructing the serializer. +#if ReflectionOnly + // For the moment, the reflection-based serializer doesn't throw until it does deserialization, because + // it doesn't do xml/type mapping in the constructor. This should change in the future with improvements to + // the reflection-based serializer that frontloads more work to make the actual serialization faster. + var ex = Record.Exception(() => SerializeAndDeserialize(new TypeWithPrivateSetters(39), "", null, true)); + ex = AssertTypeAndUnwrap(ex); +#else + var ex = Record.Exception(() => new XmlSerializer(typeof(TypeWithPrivateSetters))); +#endif + Assert.IsType(ex); + Assert.Equal("Cannot deserialize type 'SerializationTypes.TypeWithPrivateSetters' because it contains property 'PrivateSetter' which has no public setter.", ex.Message); + + // If there is no setter at all though, traditional XmlSerializer just doesn't include the property in the serialization. + // Therefore, the following should work. Although the serialized output isn't really worth much. + var noSetter = new TypeWithNoSetters(25); + var actualNoSetter = SerializeAndDeserialize(noSetter, "\r\n"); + Assert.NotNull(actualNoSetter); + Assert.StrictEqual(25, noSetter.NoSetter); + Assert.StrictEqual(200, actualNoSetter.NoSetter); // 200 is what the default constructor sets it to. + + // But private setters aren't a problem if the class is ISerializable. + var value = new TypeWithPrivateOrNoSettersButIsIXmlSerializable(32, 52); + var actual = SerializeAndDeserialize(value, "\r\n\r\n 32\r\n 52\r\n"); + Assert.NotNull(actual); + Assert.StrictEqual(value.PrivateSetter, actual.PrivateSetter); + Assert.StrictEqual(value.NoSetter, actual.NoSetter); + } + [Fact] public static void Xml_TestTypeWithListPropertiesWithoutPublicSetters() { @@ -915,6 +948,7 @@ public static void Xml_TestTypeWithListPropertiesWithoutPublicSetters() AnotherFoo + "); Assert.StrictEqual(value.PropertyWithXmlElementAttribute.Count, actual.PropertyWithXmlElementAttribute.Count); Assert.Equal(value.PropertyWithXmlElementAttribute[0], actual.PropertyWithXmlElementAttribute[0]); @@ -928,6 +962,143 @@ public static void Xml_TestTypeWithListPropertiesWithoutPublicSetters() Assert.Equal(value.AnotherStringList[0], actual.AnotherStringList[0]); Assert.StrictEqual(value.PublicIntListField[0], actual.PublicIntListField[0]); Assert.StrictEqual(value.PublicIntListFieldWithXmlElementAttribute[0], actual.PublicIntListFieldWithXmlElementAttribute[0]); + // In an annoyingly inconsistent behavior, if a list property does not have a setter at all, the serializer is smart enough to + // not try to set an empty list. So the property will be either empty or null depending on how the default constructor leaves it. + Assert.Null(actual.AlwaysNullList); + Assert.Null(actual.AlwaysNullNullableList); + // Fields are always settable though, so the serializer always takes that liberty. *smh* + Assert.Empty(actual.AlwaysNullStringListField); + Assert.Empty(actual.AlwaysNullIntListFieldWithXmlElementAttribute); + + // Try with an empty list + value = new TypeWithListPropertiesWithoutPublicSetters(); + actual = SerializeAndDeserialize(value, +@" + + + + + + +"); + Assert.NotNull(actual); + Assert.Empty(actual.PublicIntListField); + Assert.Empty(actual.IntList); + Assert.Empty(actual.StringList); + Assert.Empty(actual.AnotherStringList); + Assert.Empty(actual.PropertyWithXmlElementAttribute); + // In an annoyingly inconsistent behavior, if a list property does not have a setter at all, the serializer is smart enough to + // not try to set an empty list. So the property will be either empty or null depending on how the default constructor leaves it. + Assert.Empty(actual.PublicIntListFieldWithXmlElementAttribute); + Assert.Null(actual.AlwaysNullList); + Assert.Null(actual.AlwaysNullNullableList); + // Fields are always settable though, so the serializer always takes that liberty. *smh* + Assert.Empty(actual.AlwaysNullStringListField); + Assert.Empty(actual.AlwaysNullIntListFieldWithXmlElementAttribute); + + // And also try with a null list + value = new TypeWithListPropertiesWithoutPublicSetters(createLists: false); + actual = SerializeAndDeserialize(value, +@" + + + + +"); + Assert.NotNull(actual); + Assert.Empty(actual.PublicIntListField); + Assert.Empty(actual.IntList); + Assert.Empty(actual.StringList); + Assert.Empty(actual.AnotherStringList); + Assert.Empty(actual.PropertyWithXmlElementAttribute); + // In an annoyingly inconsistent behavior, if a list property does not have a setter at all, the serializer is smart enough to + // not try to set an empty list. So the property will be either empty or null depending on how the default constructor leaves it. + Assert.Empty(actual.PublicIntListFieldWithXmlElementAttribute); + Assert.Null(actual.AlwaysNullList); + Assert.Null(actual.AlwaysNullNullableList); + // Fields are always settable though, so the serializer always takes that liberty. *smh* + Assert.Empty(actual.AlwaysNullStringListField); + Assert.Empty(actual.AlwaysNullIntListFieldWithXmlElementAttribute); + + // And finally, a corner case where "private-setter" property is left null by the default constructor, but the serializer sees it as null + // and thinks it can call the private setter, so it tries to make it empty and fails. But again, note that the fields and + // no-setter-at-all properties that come first do not cause the failure. + var cannotDeserialize = new TypeWithGetOnlyListsThatDoNotInitialize(); + var ex = Record.Exception(() => + { + SerializeAndDeserialize(cannotDeserialize, +@" +"); + }); + ex = AssertTypeAndUnwrap(ex); + // Attempt by method 'Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderTypeWithGetOnlyListsThatDoNotInitialize.Read2_Item(Boolean, Boolean)' to access method 'SerializationTypes.TypeWithGetOnlyListsThatDoNotInitialize.set_AlwaysNullPropertyPrivateSetter(System.Collections.Generic.List`1)' failed. + Assert.Contains("AlwaysNullPropertyPrivateSetter", ex.Message); + } + + [Fact] + public static void Xml_HiddenMembersChangeMappings() + { + var baseValue = new BaseWithElementsAttributesPropertiesAndLists() { StringField = "BString", TextField = "BText", ListField = new () { "one", "two" }, ListProp = new () { "three" } }; + var baseActual = SerializeAndDeserialize(baseValue, "\r\n\r\n BString\r\n \r\n one\r\n two\r\n \r\n \r\n three\r\n \r\n"); + Assert.IsType(baseActual); + Assert.Equal(baseValue.StringField, baseActual.StringField); + Assert.Equal(baseValue.TextField, baseActual.TextField); + Assert.Equal(baseValue.ListProp.ToArray(), baseActual.ListProp.ToArray()); + Assert.Equal(baseValue.ListField.ToArray(), baseActual.ListField.ToArray()); + + var value1 = new HideElementWithAttribute() { StringField = "DString" }; + ((BaseWithElementsAttributesPropertiesAndLists)value1).Copy(baseValue); + var ex = Record.Exception(() => { SerializeAndDeserialize(value1, null); }); + AssertXmlMappingException(ex, "SerializationTypes.HideElementWithAttribute", "StringField", "Member 'HideElementWithAttribute.StringField' hides inherited member 'BaseWithElementsAttributesPropertiesAndLists.StringField', but has different custom attributes."); + + var value2 = new HideAttributeWithElement() { TextField = "DText" }; + ((BaseWithElementsAttributesPropertiesAndLists)value2).Copy(baseValue); + ex = Record.Exception(() => { SerializeAndDeserialize(value2, null); }); + AssertXmlMappingException(ex, "SerializationTypes.HideAttributeWithElement", "TextField", "Member 'HideAttributeWithElement.TextField' hides inherited member 'BaseWithElementsAttributesPropertiesAndLists.TextField', but has different custom attributes."); + + var value3 = new HideWithNewType() { TextField = 3 }; + ((BaseWithElementsAttributesPropertiesAndLists)value3).Copy(baseValue); + ex = Record.Exception(() => { SerializeAndDeserialize(value3, null); }); + AssertXmlMappingException(ex, "SerializationTypes.HideWithNewType", "TextField", "Member HideWithNewType.TextField of type System.Int32 hides base class member BaseWithElementsAttributesPropertiesAndLists.TextField of type System.String. Use XmlElementAttribute or XmlAttributeAttribute to specify a new name."); + + var value4 = new HideWithNewName() { StringField = "DString" }; + ((BaseWithElementsAttributesPropertiesAndLists)value4).Copy(baseValue); + ex = Record.Exception(() => { SerializeAndDeserialize(value4, null); }); + AssertXmlMappingException(ex, "SerializationTypes.HideWithNewName", "StringField", "Member 'HideWithNewName.StringField' hides inherited member 'BaseWithElementsAttributesPropertiesAndLists.StringField', but has different custom attributes."); + + /* This scenario fails before .Net 10 because the process for xml mapping types incorrectly + * fails to account for hidden members. In this case, 'ListField' actually gets serialized as + * an 'XmlArray' instead of a series of 'XmlElement', because the hidden base-member is an 'XmlArray'. + * Let's just skip this scenario. It's live in .Net 10. + // Funny tricks can be played with XmlArray/Element when it comes to Lists though. + // Stuff kind of doesn't blow up, but hidden members still get left out. + var value5 = new HideArrayWithElement() { ListField = new() { "ONE", "TWO", "THREE" } }; + ((BaseWithElementsAttributesPropertiesAndLists)value5).Copy(baseValue); + var actual5 = SerializeAndDeserialize(value5, +@" + + BString + ONE + TWO + THREE + + three + +"); + Assert.IsType(actual5); + Assert.Equal(value5.StringField, actual5.StringField); + Assert.Equal(value5.TextField, actual5.TextField); + Assert.Equal(value5.ListProp.ToArray(), actual5.ListProp.ToArray()); + Assert.Equal(value5.ListField.ToArray(), actual5.ListField.ToArray()); + // Not only are the hidden values not serialized, but the serialzier doesn't even try to do it's empty list thing + Assert.Null(((BaseWithElementsAttributesPropertiesAndLists)actual5).ListField); + */ + + // But at the end of the day, you still can't get away with changing the name of the element + var value6 = new HideArrayWithRenamedElement() { ListField = new() { "FOUR", "FIVE" } }; + ((BaseWithElementsAttributesPropertiesAndLists)value6).Copy(baseValue); + ex = Record.Exception(() => { SerializeAndDeserialize(value6, null); }); + AssertXmlMappingException(ex, "SerializationTypes.HideArrayWithRenamedElement", "ListField", "Member 'HideArrayWithRenamedElement.ListField' hides inherited member 'BaseWithElementsAttributesPropertiesAndLists.ListField', but has different custom attributes."); } [Fact] @@ -1273,6 +1444,7 @@ public static void Xml_TypeWithMultiXmlAnyElement() Assert.NotNull(actual.Things); Assert.Equal(value.Things.Length, actual.Things.Length); + // Try with an unexpected namespace var expectedElem = (XmlElement)value.Things[1]; var actualElem = (XmlElement)actual.Things[1]; Assert.Equal(expectedElem.Name, actualElem.Name); @@ -1287,6 +1459,26 @@ public static void Xml_TypeWithMultiXmlAnyElement() }; Assert.Throws(() => actual = SerializeAndDeserialize(value, string.Empty, skipStringCompare: true)); + + // Try with no elements + value = new TypeWithMultiNamedXmlAnyElement() + { + Things = new object[] { } + }; + actual = SerializeAndDeserialize(value, + "\r\n"); + Assert.NotNull(actual); + Assert.Null(actual.Things); + + // Try with a null list + value = new TypeWithMultiNamedXmlAnyElement() + { + Things = null + }; + actual = SerializeAndDeserialize(value, + "\r\n"); + Assert.NotNull(actual); + Assert.Null(actual.Things); } @@ -2531,7 +2723,7 @@ public static void XmlMembersMapping_With_ChoiceIdentifier() string ns = s_defaultNs; string memberName1 = "items"; XmlReflectionMember member1 = GetReflectionMemberNoXmlElement(memberName1, ns); - PropertyInfo itemProperty = typeof(TypeWithPropertyHavingChoice).GetProperty("ManyChoices"); + FieldInfo itemProperty = typeof(TypeWithArrayPropertyHavingChoice).GetField("ManyChoices"); member1.XmlAttributes = new XmlAttributes(itemProperty); string memberName2 = "ChoiceArray"; @@ -2556,6 +2748,202 @@ public static void XmlMembersMapping_With_ChoiceIdentifier() Assert.True(items.SequenceEqual(actualItems)); } + [Fact] + public static void XmlMembersMapping_With_ComplexChoiceIdentifier() + { + string ns = s_defaultNs; + string memberName1 = "items"; + XmlReflectionMember member1 = GetReflectionMemberNoXmlElement(memberName1, ns); + FieldInfo itemProperty = typeof(TypeWithPropertyHavingComplexChoice).GetField("ManyChoices"); + member1.XmlAttributes = new XmlAttributes(itemProperty); + + string memberName2 = "ChoiceArray"; + XmlReflectionMember member2 = GetReflectionMemberNoXmlElement(memberName2, ns); + member2.XmlAttributes.XmlIgnore = true; + + var members = new XmlReflectionMember[] { member1, member2 }; + + object[] items = { new ComplexChoiceB { Name = "Beef" }, 5 }; + var itemChoices = new MoreChoices[] { MoreChoices.Item, MoreChoices.Amount }; + object[] value = { items, itemChoices }; + + object[] actual = RoundTripWithXmlMembersMapping(value, + "\r\n\r\n \r\n Beef\r\n \r\n 5\r\n", + false, + members, + wrapperName: "wrapper"); + + Assert.NotNull(actual); + var actualItems = actual[0] as object[]; + Assert.NotNull(actualItems); + Assert.True(items.SequenceEqual(actualItems)); + + object[] itemsWithNull = { null, 5 }; + object[] valueWithNull = { itemsWithNull, itemChoices }; + + actual = RoundTripWithXmlMembersMapping(valueWithNull, + "\r\n\r\n 5\r\n", + false, + members, + wrapperName: "wrapper"); + + Assert.NotNull(actual); + actualItems = actual[0] as object[]; + // TODO: Ugh. Is losing a 'null' element of the choice array data loss? + // Probably. But that's what NetFx and ILGen do. :( + Assert.Single(actualItems); + Assert.Equal(5, actualItems[0]); + Assert.NotNull(actualItems); + } + + [Fact] + public static void XmlMembersMapping_With_ChoiceErrors() + { + string ns = s_defaultNs; + string memberName1 = "items"; + XmlReflectionMember member1 = GetReflectionMemberNoXmlElement(memberName1, ns); + FieldInfo itemProperty = typeof(TypeWithPropertyHavingComplexChoice).GetField("ManyChoices"); + member1.XmlAttributes = new XmlAttributes(itemProperty); + + string memberName2 = "ChoiceArray"; + XmlReflectionMember member2 = GetReflectionMemberNoXmlElement(memberName2, ns); + member2.XmlAttributes.XmlIgnore = true; + + var members = new XmlReflectionMember[] { member1, member2 }; + + // XmlChoiceMismatchChoiceException + object[] items = { new ComplexChoiceB { Name = "Beef" }, "not integer 5" }; + var itemChoices = new MoreChoices[] { MoreChoices.Item, MoreChoices.Amount }; + object[] value = { items, itemChoices }; + + var ex = Record.Exception(() => { + RoundTripWithXmlMembersMapping(value, null, true, members, wrapperName: "wrapper"); + }); + ex = AssertTypeAndUnwrap(ex); + Assert.IsType(ex); + Assert.Contains("mismatches the type of ", ex.Message); + + // XmlChoiceMissingValue + object[] newItems = { "random string", new ComplexChoiceB { Name = "Beef" }, 5 }; + object[] newValue = { newItems, itemChoices }; + + ex = Record.Exception(() => { + RoundTripWithXmlMembersMapping(newValue, null, true, members, wrapperName: "wrapper"); + }); + ex = AssertTypeAndUnwrap(ex); + Assert.IsType(ex); + Assert.Contains("Invalid or missing value of the choice identifier", ex.Message); + + // XmlChoiceMissingValue + FieldInfo missingItemProperty = typeof(TypeWithPropertyHavingChoiceError).GetField("ManyChoices"); + member1.XmlAttributes = new XmlAttributes(missingItemProperty); + + object[] missingItems = { new ComplexChoiceB { Name = "Beef" }, 5, "not_a_choice" }; + var missingItemChoices = new MoreChoices[] { MoreChoices.Item, MoreChoices.Amount, MoreChoices.None }; + object[] missingValue = { missingItems, missingItemChoices }; + + ex = Record.Exception(() => { + RoundTripWithXmlMembersMapping(missingValue, null, true, members, wrapperName: "wrapper"); + }); + ex = AssertTypeAndUnwrap(ex); + Assert.IsType(ex); + Assert.Contains("is missing enumeration value", ex.Message); + } + + [Fact] + public static void Xml_TypeWithArrayPropertyHavingChoiceErrors() + { + MoreChoices[] itemChoices = new MoreChoices[] { MoreChoices.Item, MoreChoices.Amount }; + + // XmlChoiceMismatchChoiceException + object[] mismatchedChoices = new object[] { new ComplexChoiceB { Name = "Beef" }, "not integer 5" }; + var mismatchedValue = new TypeWithPropertyHavingComplexChoice() { ManyChoices = mismatchedChoices, ChoiceArray = itemChoices }; + var ex = Record.Exception(() => { + Serialize(mismatchedValue, null); + }); + ex = AssertTypeAndUnwrap(ex); + Assert.IsType(ex); + Assert.Contains("mismatches the type of ", ex.Message); + + // XmlChoiceMissingValue + object[] missingChoice = { "random string", new ComplexChoiceB { Name = "Beef" }, 5 }; + var missingValue = new TypeWithPropertyHavingComplexChoice() { ManyChoices = missingChoice, ChoiceArray = itemChoices }; + ex = Record.Exception(() => { + Serialize(missingValue, null); + }); + ex = AssertTypeAndUnwrap(ex); + Assert.IsType(ex); + Assert.Contains("Invalid or missing value of the choice identifier", ex.Message); + + // XmlChoiceMissingValue + object[] invalidChoiceValues = { new ComplexChoiceB { Name = "Beef" }, 5, "not_a_choice" }; + MoreChoices[] invalidChoices = new MoreChoices[] { MoreChoices.Item, MoreChoices.Amount, MoreChoices.None }; + var invalidChoiceValue = new TypeWithPropertyHavingChoiceError() { ManyChoices = invalidChoiceValues, ChoiceArray = invalidChoices }; + ex = Record.Exception(() => { + Serialize(invalidChoiceValue, null); + }); +#if ReflectionOnly + // The ILGen Serializer does XmlMapping during serializer ctor and lets the exception out cleanly. + // The Reflection Serializer does XmlMapping in the Serialize() call and wraps the resulting exception + // inside a catch-all IOE in Serialize(). + ex = AssertTypeAndUnwrap(ex, "There was an error generating the XML document"); +#endif + ex = AssertTypeAndUnwrap(ex, "TypeWithPropertyHavingChoiceError"); // There was an error reflecting type... + ex = AssertTypeAndUnwrap(ex, "ManyChoices"); // There was an error reflecting field... + Assert.IsType(ex); + Assert.Contains("is missing enumeration value", ex.Message); + } + + [Fact] + public static void Xml_XmlIncludedTypesInTypedCollection() + { + var value = new List() { + new BaseClass() { Value = "base class" }, + new DerivedClass() { Value = "derived class" } + }; + var actual = SerializeAndDeserialize>(value, +@" + + + base class + + + derived class + +"); + + Assert.NotNull(actual); + Assert.Equal(2, actual.Count); + Assert.Equal("base class", actual[0].Value); + Assert.IsType(actual[0]); + Assert.IsType(actual[1]); + // BaseClass.Value is hidden - not overridden - by DerivedClass.Value, so it shows when accessed as a BaseClass. + Assert.Null(actual[1].Value); + Assert.Equal("derived class", ((DerivedClass)actual[1]).Value); + } + + [Fact] + public static void Xml_XmlIncludedTypesInTypedCollectionSingle() + { + var value = new List() { + new DerivedClass() { Value = "derived class" } + }; + var actual = SerializeAndDeserialize>(value, +@" + + + derived class + +"); + + Assert.NotNull(actual); + Assert.Single(actual); + Assert.IsType(actual[0]); + // BaseClass.Value is hidden - not overridden - by DerivedClass.Value, so it shows when accessed as a BaseClass. + Assert.Null(actual[0].Value); + Assert.Equal("derived class", ((DerivedClass)actual[0]).Value); + } + [Fact] public static void XmlMembersMapping_MultipleMembers() { diff --git a/src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.cs b/src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.cs index 44453deb7d0035..a093f3cce2d43b 100644 --- a/src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.cs +++ b/src/libraries/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.cs @@ -161,6 +161,27 @@ public static void Xml_ArrayAsGetSet() Assert.Equal(x.F2, y.F2); Utils.Equal(x.P1, y.P1, (a, b) => { return SimpleType.AreEqual(a, b); }); Assert.Equal(x.P2, y.P2); + + // Do it again with null and empty arrays + x = new TypeWithGetSetArrayMembers + { + F1 = null, + F2 = new int[] { }, + P1 = new SimpleType[] { }, + P2 = null + }; + y = SerializeAndDeserialize(x, +@" + + + +"); + + Assert.NotNull(y); + Assert.Null(y.F1); // Arrays stay null + Assert.Empty(y.F2); + Assert.Empty(y.P1); + Assert.Null(y.P2); // Arrays stay null } [Fact] @@ -172,15 +193,57 @@ public static void Xml_ArrayAsGetOnly() x.P2[0] = -1; x.P2[1] = 3; - TypeWithGetOnlyArrayProperties y = SerializeAndDeserialize(x, -@" -"); + TypeWithGetOnlyArrayProperties y = SerializeAndDeserialize(x, @""); Assert.NotNull(y); // XmlSerializer seems not complain about missing public setter of Array property // However, it does not serialize the property. So for this test case, I'll use it to verify there are no complaints about missing public setter } + [Fact] + public static void Xml_ArraylikeMembers() + { + var assertEqual = (TypeWithArraylikeMembers a, TypeWithArraylikeMembers b) => { + Assert.Equal(a.IntAField, b.IntAField); + Assert.Equal(a.NIntAField, b.NIntAField); + Assert.Equal(a.IntLField, b.IntLField); + Assert.Equal(a.NIntLField, b.NIntLField); + Assert.Equal(a.IntAProp, b.IntAProp); + Assert.Equal(a.NIntAProp, b.NIntAProp); + Assert.Equal(a.IntLProp, b.IntLProp); + Assert.Equal(a.NIntLProp, b.NIntLProp); + }; + + // Populated array-like members + var x = TypeWithArraylikeMembers.CreateWithPopulatedMembers(); + var y = SerializeAndDeserialize(x, null /* Just checking the input and output objects is good enough here */, null, true); + Assert.NotNull(y); + assertEqual(x, y); + + // Empty array-like members + x = TypeWithArraylikeMembers.CreateWithEmptyMembers(); + y = SerializeAndDeserialize(x, "\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n"); + Assert.NotNull(y); + assertEqual(x, y); + Assert.Empty(y.IntAField); // Check on a couple fields to be sure they are empty and not null. + Assert.Empty(y.NIntLProp); + + // Null array-like members + // Null arrays and collections are omitted from xml output (or set to 'nil'). But they differ in deserialization. + // Null arrays are deserialized as null as expected. Null collections are unintuitively deserialized as empty collections. This behavior is preserved for compatibility with NetFx. + x = TypeWithArraylikeMembers.CreateWithNullMembers(); + y = SerializeAndDeserialize(x, "\r\n \r\n \r\n"); + Assert.NotNull(y); + Assert.Null(y.IntAField); + Assert.Null(y.NIntAField); + Assert.Empty(y.IntLField); + Assert.Empty(y.NIntLField); + Assert.Null(y.IntAProp); + Assert.Null(y.NIntAProp); + Assert.Empty(y.IntLProp); + Assert.Empty(y.NIntLProp); + } + [Fact] public static void Xml_ListRoot() { @@ -198,10 +261,10 @@ public static void Xml_ListRoot() Assert.Equal((string)x[1], (string)y[1]); } -// ROC and Immutable types are not types from 'SerializableAssembly.dll', so they were not included in the -// pregenerated serializers for the sgen tests. We could wrap them in a type that does exist there... -// but I think the RO/Immutable story is wonky enough and RefEmit vs Reflection is near enough on the -// horizon that it's not worth the trouble. + // ROC and Immutable types are not types from 'SerializableAssembly.dll', so they were not included in the + // pregenerated serializers for the sgen tests. We could wrap them in a type that does exist there... + // but I think the RO/Immutable story is wonky enough and RefEmit vs Reflection is near enough on the + // horizon that it's not worth the trouble. #if !XMLSERIALIZERGENERATORTESTS [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/74247", TestPlatforms.tvOS)] @@ -455,7 +518,42 @@ public static void Xml_BaseClassAndDerivedClassWithSameProperty() Assert.StrictEqual(value.DateTimeProperty, actual.DateTimeProperty); Assert.StrictEqual(value.IntProperty, actual.IntProperty); Assert.Equal(value.StringProperty, actual.StringProperty); + // Before .Net 10, the process for xml mapping types incorrectly maps members closest to the base class, + // rather than the most derived class. This isn't a problem for ILGen or source-gen serialziers, since + // they emit code that essentially says "o.problemMember = value;" and since 'o' is the derived type, it + // just works. But when setting that member via reflection with a MemberInfo, the serializer needs + // the MemberInfo from the correct level, and this isn't fixed until .Net 10. So the ILGen and + // the reflection-based serializers will produce different results here. +#if ReflectionOnly + Assert.Empty(actual.ListProperty); +#else Assert.Equal(value.ListProperty.ToArray(), actual.ListProperty.ToArray()); +#endif + + BaseClassWithSamePropertyName castAsBase = (BaseClassWithSamePropertyName)actual; + Assert.Equal(default(int), castAsBase.IntProperty); + Assert.Null(castAsBase.StringProperty); + Assert.Null(castAsBase.ListProperty); + + // Try again with a null list to ensure the correct property is deserialized to an empty list + value = new DerivedClassWithSameProperty() { DateTimeProperty = new DateTime(100), IntProperty = 5, StringProperty = "TestString", ListProperty = null }; + actual = SerializeAndDeserialize(value, +@" + + TestString + 5 + 0001-01-01T00:00:00.00001 +"); + + Assert.StrictEqual(value.DateTimeProperty, actual.DateTimeProperty); + Assert.StrictEqual(value.IntProperty, actual.IntProperty); + Assert.Equal(value.StringProperty, actual.StringProperty); + Assert.Empty(actual.ListProperty.ToArray()); + + castAsBase = (BaseClassWithSamePropertyName)actual; + Assert.Equal(default(int), castAsBase.IntProperty); + Assert.Null(castAsBase.StringProperty); + Assert.Null(castAsBase.ListProperty); } [Fact] @@ -1088,7 +1186,7 @@ public static void Xml_SerializedFormat() ms.Position = 0; string nl = Environment.NewLine; string actualFormatting = new StreamReader(ms).ReadToEnd(); - string expectedFormatting = $"{nl}{nl} foo{nl} 1{ nl}"; + string expectedFormatting = $"{nl}{nl} foo{nl} 1{nl}"; Assert.Equal(expectedFormatting, actualFormatting); } } @@ -1115,7 +1213,64 @@ public static void Xml_BaseClassAndDerivedClass2WithSameProperty() Assert.StrictEqual(value.DateTimeProperty, actual.DateTimeProperty); Assert.StrictEqual(value.IntProperty, actual.IntProperty); Assert.Equal(value.StringProperty, actual.StringProperty); + // Before .Net 10, the process for xml mapping types incorrectly maps members closest to the base class, + // rather than the most derived class. This isn't a problem for ILGen or source-gen serialziers, since + // they emit code that essentially says "o.problemMember = value;" and since 'o' is the derived type, it + // just works. But when setting that member via reflection with a MemberInfo, the serializer needs + // the MemberInfo from the correct level, and this isn't fixed until .Net 10. So the ILGen and + // the reflection-based serializers will produce different results here. +#if ReflectionOnly + Assert.Empty(actual.ListProperty); +#else Assert.Equal(value.ListProperty.ToArray(), actual.ListProperty.ToArray()); +#endif + + // All base properties have been hidden, so they should be default here in the base class + BaseClassWithSamePropertyName castAsBase = (BaseClassWithSamePropertyName)actual; + Assert.StrictEqual(default(DateTime), castAsBase.DateTimeProperty); + Assert.StrictEqual(default(int), castAsBase.IntProperty); + Assert.Null(castAsBase.StringProperty); + Assert.Null(castAsBase.ListProperty); + + // IntProperty and StringProperty are not hidden in Derived2, so they should be set here in the middle + DerivedClassWithSameProperty castAsMiddle = (DerivedClassWithSameProperty)actual; + Assert.StrictEqual(value.IntProperty, castAsMiddle.IntProperty); + Assert.Equal(value.StringProperty, castAsMiddle.StringProperty); + // The other properties should be default + Assert.StrictEqual(default(DateTime), castAsMiddle.DateTimeProperty); + Assert.Null(castAsMiddle.ListProperty); + + + // Try again with a null list to ensure the correct property is deserialized to an empty list + value = new DerivedClassWithSameProperty2() { DateTimeProperty = new DateTime(100, DateTimeKind.Utc), IntProperty = 5, StringProperty = "TestString", ListProperty = null }; + + actual = SerializeAndDeserialize(value, +@" + + TestString + 5 + 0001-01-01T00:00:00.00001Z +"); + + Assert.StrictEqual(value.DateTimeProperty, actual.DateTimeProperty); + Assert.StrictEqual(value.IntProperty, actual.IntProperty); + Assert.Equal(value.StringProperty, actual.StringProperty); + Assert.Empty(actual.ListProperty.ToArray()); + + // All base properties have been hidden, so they should be default here in the base class + castAsBase = (BaseClassWithSamePropertyName)actual; + Assert.StrictEqual(default(DateTime), castAsBase.DateTimeProperty); + Assert.StrictEqual(default(int), castAsBase.IntProperty); + Assert.Null(castAsBase.StringProperty); + Assert.Null(castAsBase.ListProperty); + + // IntProperty and StringProperty are not hidden in Derived2, so they should be set here in the middle + castAsMiddle = (DerivedClassWithSameProperty)actual; + Assert.StrictEqual(value.IntProperty, castAsMiddle.IntProperty); + Assert.Equal(value.StringProperty, castAsMiddle.StringProperty); + // The other properties should be default + Assert.StrictEqual(default(DateTime), castAsMiddle.DateTimeProperty); + Assert.Null(castAsMiddle.ListProperty); } [Fact] @@ -1382,6 +1537,30 @@ public static void Xml_TypeWithArrayPropertyHavingChoice() Assert.NotNull(actual.ManyChoices); Assert.Equal(value.ManyChoices.Length, actual.ManyChoices.Length); Assert.True(Enumerable.SequenceEqual(value.ManyChoices, actual.ManyChoices)); + + // Try again with a null array + value = new TypeWithArrayPropertyHavingChoice() { ManyChoices = null, ChoiceArray = itemChoices }; + actual = SerializeAndDeserialize(value, ""); + Assert.NotNull(actual); + Assert.Null(actual.ManyChoices); // Arrays keep null-ness + } + + [Fact] + public static void Xml_TypeWithArrayPropertyHavingComplexChoice() + { + object[] choices = new object[] { new ComplexChoiceB { Name = "Beef" }, 5 }; + + // For each item in the choices array, add an enumeration value. + MoreChoices[] itemChoices = new MoreChoices[] { MoreChoices.Item, MoreChoices.Amount }; + + var value = new TypeWithPropertyHavingComplexChoice() { ManyChoices = choices, ChoiceArray = itemChoices }; + + var actual = SerializeAndDeserialize(value, "\r\n\r\n \r\n Beef\r\n \r\n 5\r\n"); + + Assert.NotNull(actual); + Assert.NotNull(actual.ManyChoices); + Assert.Equal(value.ManyChoices.Length, actual.ManyChoices.Length); + Assert.True(Enumerable.SequenceEqual(value.ManyChoices, actual.ManyChoices)); } [Fact] @@ -1588,6 +1767,54 @@ public static void Xml_HiddenDerivedFieldTest() Assert.Equal(value.value, ((DerivedClass)actual).value); } + [Fact] + public static void Xml_XmlIncludedTypesInCollection() + { + var value = new MyList() { + new BaseClass() { Value = "base class" }, + new DerivedClass() { Value = "derived class" } + }; + var actual = SerializeAndDeserialize(value, +@" + + + base class + + + derived class + +", +() => { return new XmlSerializer(typeof(MyList), new Type[] { typeof(BaseClass) }); }); + + Assert.NotNull(actual); + Assert.Equal(2, actual.Count); + Assert.IsType(actual[0]); + Assert.Equal("base class", ((BaseClass)actual[0]).Value); + Assert.IsType(actual[1]); + Assert.Equal("derived class", ((DerivedClass)actual[1]).Value); + } + + [Fact] + public static void Xml_XmlIncludedTypesInCollectionSingle() + { + var value = new MyList() { + new DerivedClass() { Value = "derived class" } + }; + var actual = SerializeAndDeserialize(value, +@" + + + derived class + +", +() => { return new XmlSerializer(typeof(MyList), new Type[] { typeof(BaseClass) }); }); + + Assert.NotNull(actual); + Assert.Single(actual); + Assert.IsType(actual[0]); + Assert.Equal("derived class", ((DerivedClass)actual[0]).Value); + } + [Fact] public static void Xml_NullRefInXmlSerializerCtorTest() { @@ -2379,6 +2606,32 @@ private static T SerializeAndDeserializeWithWrapper(T value, XmlSerializer se } } + private static Exception AssertTypeAndUnwrap(object exception, string? message = null) where T : Exception + { + Assert.IsType(exception); + var ex = exception as Exception; + if (message != null) + Assert.Contains(message, ex.Message); + Assert.NotNull(ex.InnerException); + return ex.InnerException; + } + + private static void AssertXmlMappingException(Exception exception, string typeName, string fieldName, string msg = null) + { + var ex = exception; +#if ReflectionOnly + // The ILGen Serializer does XmlMapping during serializer ctor and lets the exception out cleanly. + // The Reflection Serializer does XmlMapping in the Serialize() call and wraps the resulting exception + // inside a catch-all IOE in Serialize(). + ex = AssertTypeAndUnwrap(ex, "There was an error generating the XML document"); +#endif + ex = AssertTypeAndUnwrap(ex, $"There was an error reflecting type '{typeName}'"); + ex = AssertTypeAndUnwrap(ex, $"There was an error reflecting field '{fieldName}'"); + Assert.IsType(ex); + if (msg != null) + Assert.Contains(msg, ex.Message); + } + private static string Serialize(T value, string baseline, Func serializerFactory = null, bool skipStringCompare = false, XmlSerializerNamespaces xns = null) { diff --git a/src/libraries/System.Reflection.Emit/src/System/Reflection/Emit/ModuleBuilderImpl.cs b/src/libraries/System.Reflection.Emit/src/System/Reflection/Emit/ModuleBuilderImpl.cs index 5d242a710ae2b1..2ead8405732022 100644 --- a/src/libraries/System.Reflection.Emit/src/System/Reflection/Emit/ModuleBuilderImpl.cs +++ b/src/libraries/System.Reflection.Emit/src/System/Reflection/Emit/ModuleBuilderImpl.cs @@ -603,7 +603,7 @@ private DocumentHandle AddDocument(string url, Guid language, Guid hashAlgorithm _pdbBuilder.AddDocument( name: _pdbBuilder.GetOrAddDocumentName(url), hashAlgorithm: hashAlgorithm == default ? default : _pdbBuilder.GetOrAddGuid(hashAlgorithm), - hash: hash == null ? default : _metadataBuilder.GetOrAddBlob(hash), + hash: hash == null ? default : _pdbBuilder.GetOrAddBlob(hash), language: language == default ? default : _pdbBuilder.GetOrAddGuid(language)); private void FillMemberReferences(ILGeneratorImpl il) @@ -734,13 +734,16 @@ private EntityHandle GetMemberReferenceHandle(MemberInfo memberInfo) { case FieldInfo field: Type declaringType = field.DeclaringType!; - if (field.DeclaringType!.IsGenericTypeDefinition) + if (declaringType.IsGenericTypeDefinition) { //The type of the field has to be fully instantiated type. declaringType = declaringType.MakeGenericType(declaringType.GetGenericArguments()); } + + Type fieldType = ((FieldInfo)GetOriginalMemberIfConstructedType(field)).FieldType; memberHandle = AddMemberReference(field.Name, GetTypeHandle(declaringType), - MetadataSignatureHelper.GetFieldSignature(field.FieldType, field.GetRequiredCustomModifiers(), field.GetOptionalCustomModifiers(), this)); + MetadataSignatureHelper.GetFieldSignature(fieldType, field.GetRequiredCustomModifiers(), field.GetOptionalCustomModifiers(), this)); + break; case ConstructorInfo ctor: ctor = (ConstructorInfo)GetOriginalMemberIfConstructedType(ctor); @@ -809,17 +812,17 @@ internal static SignatureCallingConvention GetSignatureConvention(CallingConvent return convention; } - private MemberInfo GetOriginalMemberIfConstructedType(MethodBase methodBase) + private MemberInfo GetOriginalMemberIfConstructedType(MemberInfo memberInfo) { - Type declaringType = methodBase.DeclaringType!; + Type declaringType = memberInfo.DeclaringType!; if (declaringType.IsConstructedGenericType && declaringType.GetGenericTypeDefinition() is not TypeBuilderImpl && !ContainsTypeBuilder(declaringType.GetGenericArguments())) { - return declaringType.GetGenericTypeDefinition().GetMemberWithSameMetadataDefinitionAs(methodBase); + return declaringType.GetGenericTypeDefinition().GetMemberWithSameMetadataDefinitionAs(memberInfo); } - return methodBase; + return memberInfo; } private static Type[] ParameterTypes(ParameterInfo[] parameterInfos) diff --git a/src/libraries/System.Reflection.Emit/tests/PersistedAssemblyBuilder/AssemblySaveTypeBuilderTests.cs b/src/libraries/System.Reflection.Emit/tests/PersistedAssemblyBuilder/AssemblySaveTypeBuilderTests.cs index 31536bc266c0a1..f508da07364f26 100644 --- a/src/libraries/System.Reflection.Emit/tests/PersistedAssemblyBuilder/AssemblySaveTypeBuilderTests.cs +++ b/src/libraries/System.Reflection.Emit/tests/PersistedAssemblyBuilder/AssemblySaveTypeBuilderTests.cs @@ -5,6 +5,8 @@ using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; +using System.Reflection.Metadata; +using System.Reflection.PortableExecutable; using Xunit; namespace System.Reflection.Emit.Tests @@ -124,11 +126,15 @@ public void CreateMembersThatUsesTypeLoadedFromCoreAssemblyTest() } } - private static TypeBuilder CreateAssemblyAndDefineType(out PersistedAssemblyBuilder assemblyBuilder) + private static ModuleBuilder CreateAssembly(out PersistedAssemblyBuilder assemblyBuilder) { assemblyBuilder = AssemblySaveTools.PopulateAssemblyBuilder(s_assemblyName); - return assemblyBuilder.DefineDynamicModule("MyModule") - .DefineType("TestInterface", TypeAttributes.Interface | TypeAttributes.Abstract); + return assemblyBuilder.DefineDynamicModule("MyModule"); + } + + private static TypeBuilder CreateAssemblyAndDefineType(out PersistedAssemblyBuilder assemblyBuilder) + { + return CreateAssembly(out assemblyBuilder).DefineType("TestInterface", TypeAttributes.Interface | TypeAttributes.Abstract); } [Fact] @@ -205,6 +211,83 @@ public void SaveGenericTypeParametersForAType(string[] typeParamNames) } } + private class GenericClassWithGenericField + { +#pragma warning disable CS0649 + public T F; +#pragma warning restore CS0649 + } + + private class GenericClassWithNonGenericField + { +#pragma warning disable CS0649 + public int F; +#pragma warning restore CS0649 + } + + public static IEnumerable GenericTypesWithField() + { + yield return new object[] { typeof(GenericClassWithGenericField), true }; + yield return new object[] { typeof(GenericClassWithNonGenericField), false }; + } + + [Theory] + [MemberData(nameof(GenericTypesWithField))] + public void SaveGenericField(Type declaringType, bool shouldFieldBeGeneric) + { + using (TempFile file = TempFile.Create()) + { + ModuleBuilder mb = CreateAssembly(out PersistedAssemblyBuilder assemblyBuilder); + TypeBuilder tb = mb.DefineType("C", TypeAttributes.Class); + MethodBuilder method = tb.DefineMethod("TestMethod", MethodAttributes.Public, returnType: typeof(int), parameterTypes: null); + ILGenerator il = method.GetILGenerator(); + il.Emit(OpCodes.Newobj, declaringType.GetConstructor([])); + il.Emit(OpCodes.Ldfld, declaringType.GetField("F")); + il.Emit(OpCodes.Ret); + Type createdType = tb.CreateType(); + assemblyBuilder.Save(file.Path); + + using (FileStream stream = File.OpenRead(file.Path)) + { + using (PEReader peReader = new PEReader(stream)) + { + bool found = false; + MetadataReader metadataReader = peReader.GetMetadataReader(); + foreach (MemberReferenceHandle memberRefHandle in metadataReader.MemberReferences) + { + MemberReference memberRef = metadataReader.GetMemberReference(memberRefHandle); + if (memberRef.GetKind() == MemberReferenceKind.Field) + { + Assert.False(found); + found = true; + + Assert.Equal("F", metadataReader.GetString(memberRef.Name)); + + // A reference to a generic field should point to the open generic field, and not the resolved generic type. + Assert.Equal(shouldFieldBeGeneric, IsGenericField(metadataReader.GetBlobReader(memberRef.Signature))); + } + } + + Assert.True(found); + } + } + } + + static bool IsGenericField(BlobReader signatureReader) + { + while (signatureReader.RemainingBytes > 0) + { + SignatureTypeCode typeCode = signatureReader.ReadSignatureTypeCode(); + if (typeCode == SignatureTypeCode.GenericTypeParameter) + { + return true; + } + } + + return false; + } + } + private static void SetVariousGenericParameterValues(GenericTypeParameterBuilder[] typeParams) { typeParams[0].SetInterfaceConstraints([typeof(IAccess), typeof(INoMethod)]); diff --git a/src/libraries/System.Reflection.Emit/tests/PortablePdb/PortablePdbStandalonePdbTest.cs b/src/libraries/System.Reflection.Emit/tests/PortablePdb/PortablePdbStandalonePdbTest.cs index e1ce56f151d81c..7315afe2ded476 100644 --- a/src/libraries/System.Reflection.Emit/tests/PortablePdb/PortablePdbStandalonePdbTest.cs +++ b/src/libraries/System.Reflection.Emit/tests/PortablePdb/PortablePdbStandalonePdbTest.cs @@ -61,7 +61,8 @@ private static void ValidatePDB(MethodBuilder method, MethodBuilder entryPoint, Document doc = reader.GetDocument(docEnumerator.Current); Assert.Equal("MySourceFile.cs", reader.GetString(doc.Name)); Assert.Equal(SymLanguageType.CSharp, reader.GetGuid(doc.Language)); - Assert.Equal(default, reader.GetGuid(doc.HashAlgorithm)); + Assert.Equal(new Guid("8829d00f-11b8-4213-878b-770e8597ac16"), reader.GetGuid(doc.HashAlgorithm)); + Assert.Equal("06CBAB3A501306FDD9176A00A83E5BB92EA4D7863CFD666355743527CF99EDC6", Convert.ToHexString(reader.GetBlobBytes(doc.Hash))); Assert.False(docEnumerator.MoveNext()); MethodDebugInformation mdi1 = reader.GetMethodDebugInformation(MetadataTokens.MethodDebugInformationHandle(method.MetadataToken)); @@ -147,6 +148,7 @@ private static MetadataBuilder GenerateAssemblyAndMetadata(out MethodBuilder met ModuleBuilder mb = ab.DefineDynamicModule("MyModule2"); TypeBuilder tb = mb.DefineType("MyType", TypeAttributes.Public | TypeAttributes.Class); ISymbolDocumentWriter srcdoc = mb.DefineDocument("MySourceFile.cs", SymLanguageType.CSharp); + srcdoc.SetCheckSum(new Guid("8829d00f-11b8-4213-878b-770e8597ac16"), Convert.FromHexString("06CBAB3A501306FDD9176A00A83E5BB92EA4D7863CFD666355743527CF99EDC6")); method = tb.DefineMethod("SumMethod", MethodAttributes.Public | MethodAttributes.Static, typeof(int), [typeof(int), typeof(int)]); ILGenerator il1 = method.GetILGenerator(); LocalBuilder local = il1.DeclareLocal(typeof(int)); diff --git a/src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj b/src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj index e380af4d84271a..a178d029091157 100644 --- a/src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj +++ b/src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj @@ -9,7 +9,6 @@ false true $(BaseIntermediateOutputPath)SuggestedBindingRedirects.targets - $(BeforePack);GeneratePackageTargetsFile Provides classes which read and write resources in a format that supports non-primitive objects. Commonly Used Types: @@ -93,7 +92,8 @@ System.Resources.Extensions.PreserializedResourceWriter + AfterTargets="CoreCompile" + Condition="'$(TargetFramework)' == '$(NetFrameworkMinimum)'"> - - CP0014 - M:System.Console.SetWindowSize(System.Int32,System.Int32):[T:System.Runtime.Versioning.UnsupportedOSPlatformAttribute] - net8.0/mscorlib.dll - net9.0/mscorlib.dll - - - CP0014 - P:System.Console.WindowHeight:[T:System.Runtime.Versioning.UnsupportedOSPlatformAttribute] - net8.0/mscorlib.dll - net9.0/mscorlib.dll - - - CP0014 - P:System.Console.WindowWidth:[T:System.Runtime.Versioning.UnsupportedOSPlatformAttribute] - net8.0/mscorlib.dll - net9.0/mscorlib.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.String,System.String)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/netstandard.dll - net9.0/netstandard.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.String,System.String)$1:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/netstandard.dll - net9.0/netstandard.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.String,System.Type)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/netstandard.dll - net9.0/netstandard.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.String,System.Type)$1:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/netstandard.dll - net9.0/netstandard.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.String)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/netstandard.dll - net9.0/netstandard.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.Type,System.Type)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/netstandard.dll - net9.0/netstandard.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.Type,System.Type)$1:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/netstandard.dll - net9.0/netstandard.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.Type)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/netstandard.dll - net9.0/netstandard.dll - - - CP0014 - M:System.ComponentModel.EditorAttribute.#ctor(System.String,System.String)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/netstandard.dll - net9.0/netstandard.dll - - - CP0014 - M:System.ComponentModel.EditorAttribute.#ctor(System.String,System.String)$1:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/netstandard.dll - net9.0/netstandard.dll - - - CP0014 - M:System.ComponentModel.EditorAttribute.#ctor(System.String,System.Type)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/netstandard.dll - net9.0/netstandard.dll - - - CP0014 - M:System.ComponentModel.EditorAttribute.#ctor(System.String,System.Type)$1:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/netstandard.dll - net9.0/netstandard.dll - - - CP0014 - M:System.ComponentModel.EditorAttribute.#ctor(System.Type,System.Type)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/netstandard.dll - net9.0/netstandard.dll - - - CP0014 - M:System.ComponentModel.EditorAttribute.#ctor(System.Type,System.Type)$1:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/netstandard.dll - net9.0/netstandard.dll - - - CP0014 - M:System.ComponentModel.EnumConverter.#ctor(System.Type)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/netstandard.dll - net9.0/netstandard.dll - - - CP0014 - M:System.Console.SetWindowSize(System.Int32,System.Int32):[T:System.Runtime.Versioning.UnsupportedOSPlatformAttribute] - net8.0/netstandard.dll - net9.0/netstandard.dll - - - CP0014 - P:System.ComponentModel.DesignerAttribute.DesignerBaseTypeName:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/netstandard.dll - net9.0/netstandard.dll - - - CP0014 - P:System.ComponentModel.DesignerAttribute.DesignerTypeName:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/netstandard.dll - net9.0/netstandard.dll - - - CP0014 - P:System.ComponentModel.EditorAttribute.EditorBaseTypeName:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/netstandard.dll - net9.0/netstandard.dll - - - CP0014 - P:System.ComponentModel.EditorAttribute.EditorTypeName:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/netstandard.dll - net9.0/netstandard.dll - - - CP0014 - P:System.ComponentModel.EnumConverter.EnumType:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/netstandard.dll - net9.0/netstandard.dll - - - CP0014 - P:System.Console.WindowHeight:[T:System.Runtime.Versioning.UnsupportedOSPlatformAttribute] - net8.0/netstandard.dll - net9.0/netstandard.dll - - - CP0014 - P:System.Console.WindowWidth:[T:System.Runtime.Versioning.UnsupportedOSPlatformAttribute] - net8.0/netstandard.dll - net9.0/netstandard.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.String,System.String)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.Primitives.dll - net9.0/System.ComponentModel.Primitives.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.String,System.String)$1:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.Primitives.dll - net9.0/System.ComponentModel.Primitives.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.String,System.Type)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.Primitives.dll - net9.0/System.ComponentModel.Primitives.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.String,System.Type)$1:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.Primitives.dll - net9.0/System.ComponentModel.Primitives.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.String)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.Primitives.dll - net9.0/System.ComponentModel.Primitives.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.Type,System.Type)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.Primitives.dll - net9.0/System.ComponentModel.Primitives.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.Type,System.Type)$1:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.Primitives.dll - net9.0/System.ComponentModel.Primitives.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.Type)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.Primitives.dll - net9.0/System.ComponentModel.Primitives.dll - - - CP0014 - M:System.ComponentModel.EditorAttribute.#ctor(System.String,System.String)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.Primitives.dll - net9.0/System.ComponentModel.Primitives.dll - - - CP0014 - M:System.ComponentModel.EditorAttribute.#ctor(System.String,System.String)$1:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.Primitives.dll - net9.0/System.ComponentModel.Primitives.dll - - - CP0014 - M:System.ComponentModel.EditorAttribute.#ctor(System.String,System.Type)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.Primitives.dll - net9.0/System.ComponentModel.Primitives.dll - - - CP0014 - M:System.ComponentModel.EditorAttribute.#ctor(System.String,System.Type)$1:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.Primitives.dll - net9.0/System.ComponentModel.Primitives.dll - - - CP0014 - M:System.ComponentModel.EditorAttribute.#ctor(System.Type,System.Type)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.Primitives.dll - net9.0/System.ComponentModel.Primitives.dll - - - CP0014 - M:System.ComponentModel.EditorAttribute.#ctor(System.Type,System.Type)$1:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.Primitives.dll - net9.0/System.ComponentModel.Primitives.dll - - - CP0014 - P:System.ComponentModel.DesignerAttribute.DesignerBaseTypeName:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.Primitives.dll - net9.0/System.ComponentModel.Primitives.dll - - - CP0014 - P:System.ComponentModel.DesignerAttribute.DesignerTypeName:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.Primitives.dll - net9.0/System.ComponentModel.Primitives.dll - - - CP0014 - P:System.ComponentModel.EditorAttribute.EditorBaseTypeName:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.Primitives.dll - net9.0/System.ComponentModel.Primitives.dll - - - CP0014 - P:System.ComponentModel.EditorAttribute.EditorTypeName:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.Primitives.dll - net9.0/System.ComponentModel.Primitives.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.String,System.String)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.TypeConverter.dll - net9.0/System.ComponentModel.TypeConverter.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.String,System.String)$1:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.TypeConverter.dll - net9.0/System.ComponentModel.TypeConverter.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.String,System.Type)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.TypeConverter.dll - net9.0/System.ComponentModel.TypeConverter.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.String,System.Type)$1:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.TypeConverter.dll - net9.0/System.ComponentModel.TypeConverter.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.String)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.TypeConverter.dll - net9.0/System.ComponentModel.TypeConverter.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.Type,System.Type)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.TypeConverter.dll - net9.0/System.ComponentModel.TypeConverter.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.Type,System.Type)$1:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.TypeConverter.dll - net9.0/System.ComponentModel.TypeConverter.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.Type)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.TypeConverter.dll - net9.0/System.ComponentModel.TypeConverter.dll - - - CP0014 - M:System.ComponentModel.EditorAttribute.#ctor(System.String,System.String)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.TypeConverter.dll - net9.0/System.ComponentModel.TypeConverter.dll - - - CP0014 - M:System.ComponentModel.EditorAttribute.#ctor(System.String,System.String)$1:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.TypeConverter.dll - net9.0/System.ComponentModel.TypeConverter.dll - - - CP0014 - M:System.ComponentModel.EditorAttribute.#ctor(System.String,System.Type)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.TypeConverter.dll - net9.0/System.ComponentModel.TypeConverter.dll - - - CP0014 - M:System.ComponentModel.EditorAttribute.#ctor(System.String,System.Type)$1:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.TypeConverter.dll - net9.0/System.ComponentModel.TypeConverter.dll - - - CP0014 - M:System.ComponentModel.EditorAttribute.#ctor(System.Type,System.Type)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.TypeConverter.dll - net9.0/System.ComponentModel.TypeConverter.dll - - - CP0014 - M:System.ComponentModel.EditorAttribute.#ctor(System.Type,System.Type)$1:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.TypeConverter.dll - net9.0/System.ComponentModel.TypeConverter.dll - - - CP0014 - M:System.ComponentModel.EnumConverter.#ctor(System.Type)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.TypeConverter.dll - net9.0/System.ComponentModel.TypeConverter.dll - - - CP0014 - P:System.ComponentModel.DesignerAttribute.DesignerBaseTypeName:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.TypeConverter.dll - net9.0/System.ComponentModel.TypeConverter.dll - - - CP0014 - P:System.ComponentModel.DesignerAttribute.DesignerTypeName:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.TypeConverter.dll - net9.0/System.ComponentModel.TypeConverter.dll - - - CP0014 - P:System.ComponentModel.EditorAttribute.EditorBaseTypeName:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.TypeConverter.dll - net9.0/System.ComponentModel.TypeConverter.dll - - - CP0014 - P:System.ComponentModel.EditorAttribute.EditorTypeName:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.TypeConverter.dll - net9.0/System.ComponentModel.TypeConverter.dll - - - CP0014 - P:System.ComponentModel.EnumConverter.EnumType:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.ComponentModel.TypeConverter.dll - net9.0/System.ComponentModel.TypeConverter.dll - - - CP0014 - M:System.Console.SetWindowSize(System.Int32,System.Int32):[T:System.Runtime.Versioning.UnsupportedOSPlatformAttribute] - net8.0/System.Console.dll - net9.0/System.Console.dll - - - CP0014 - P:System.Console.WindowHeight:[T:System.Runtime.Versioning.UnsupportedOSPlatformAttribute] - net8.0/System.Console.dll - net9.0/System.Console.dll - - - CP0014 - P:System.Console.WindowWidth:[T:System.Runtime.Versioning.UnsupportedOSPlatformAttribute] - net8.0/System.Console.dll - net9.0/System.Console.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.String,System.String)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.dll - net9.0/System.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.String,System.String)$1:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.dll - net9.0/System.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.String,System.Type)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.dll - net9.0/System.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.String,System.Type)$1:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.dll - net9.0/System.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.String)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.dll - net9.0/System.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.Type,System.Type)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.dll - net9.0/System.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.Type,System.Type)$1:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.dll - net9.0/System.dll - - - CP0014 - M:System.ComponentModel.DesignerAttribute.#ctor(System.Type)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.dll - net9.0/System.dll - - - CP0014 - M:System.ComponentModel.EditorAttribute.#ctor(System.String,System.String)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.dll - net9.0/System.dll - - - CP0014 - M:System.ComponentModel.EditorAttribute.#ctor(System.String,System.String)$1:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.dll - net9.0/System.dll - - - CP0014 - M:System.ComponentModel.EditorAttribute.#ctor(System.String,System.Type)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.dll - net9.0/System.dll - - - CP0014 - M:System.ComponentModel.EditorAttribute.#ctor(System.String,System.Type)$1:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.dll - net9.0/System.dll - - - CP0014 - M:System.ComponentModel.EditorAttribute.#ctor(System.Type,System.Type)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.dll - net9.0/System.dll - - - CP0014 - M:System.ComponentModel.EditorAttribute.#ctor(System.Type,System.Type)$1:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.dll - net9.0/System.dll - - - CP0014 - M:System.ComponentModel.EnumConverter.#ctor(System.Type)$0:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.dll - net9.0/System.dll - - - CP0014 - P:System.ComponentModel.DesignerAttribute.DesignerBaseTypeName:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.dll - net9.0/System.dll - - - CP0014 - P:System.ComponentModel.DesignerAttribute.DesignerTypeName:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.dll - net9.0/System.dll - - - CP0014 - P:System.ComponentModel.EditorAttribute.EditorBaseTypeName:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.dll - net9.0/System.dll - - - CP0014 - P:System.ComponentModel.EditorAttribute.EditorTypeName:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.dll - net9.0/System.dll - - - CP0014 - P:System.ComponentModel.EnumConverter.EnumType:[T:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute] - net8.0/System.dll - net9.0/System.dll - - - CP0014 - M:System.Runtime.Intrinsics.X86.X86Base.DivRem(System.UInt32,System.Int32,System.Int32):[T:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0014 - M:System.Runtime.Intrinsics.X86.X86Base.DivRem(System.UInt32,System.UInt32,System.UInt32):[T:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0014 - M:System.Runtime.Intrinsics.X86.X86Base.DivRem(System.UIntPtr,System.IntPtr,System.IntPtr):[T:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0014 - M:System.Runtime.Intrinsics.X86.X86Base.DivRem(System.UIntPtr,System.UIntPtr,System.UIntPtr):[T:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0014 - M:System.Runtime.Intrinsics.X86.X86Base.X64.DivRem(System.UInt64,System.Int64,System.Int64):[T:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0014 - M:System.Runtime.Intrinsics.X86.X86Base.X64.DivRem(System.UInt64,System.UInt64,System.UInt64):[T:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0014 - T:System.Runtime.Intrinsics.X86.AvxVnni:[T:System.Runtime.Versioning.RequiresPreviewFeaturesAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.Arm64.ShiftLeftLogicalSaturateScalar(System.Runtime.Intrinsics.Vector64{System.Byte},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.Arm64.ShiftLeftLogicalSaturateScalar(System.Runtime.Intrinsics.Vector64{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.Arm64.ShiftLeftLogicalSaturateScalar(System.Runtime.Intrinsics.Vector64{System.Int32},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.Arm64.ShiftLeftLogicalSaturateScalar(System.Runtime.Intrinsics.Vector64{System.SByte},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.Arm64.ShiftLeftLogicalSaturateScalar(System.Runtime.Intrinsics.Vector64{System.UInt16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.Arm64.ShiftLeftLogicalSaturateScalar(System.Runtime.Intrinsics.Vector64{System.UInt32},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.Arm64.ShiftLeftLogicalSaturateUnsignedScalar(System.Runtime.Intrinsics.Vector64{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.Arm64.ShiftLeftLogicalSaturateUnsignedScalar(System.Runtime.Intrinsics.Vector64{System.Int32},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.Arm64.ShiftLeftLogicalSaturateUnsignedScalar(System.Runtime.Intrinsics.Vector64{System.SByte},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.Arm64.ShiftRightArithmeticNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.Arm64.ShiftRightArithmeticNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64{System.Int64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.Arm64.ShiftRightArithmeticNarrowingSaturateUnsignedScalar(System.Runtime.Intrinsics.Vector64{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.Arm64.ShiftRightArithmeticNarrowingSaturateUnsignedScalar(System.Runtime.Intrinsics.Vector64{System.Int64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.Arm64.ShiftRightArithmeticRoundedNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.Arm64.ShiftRightArithmeticRoundedNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64{System.Int64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.Arm64.ShiftRightArithmeticRoundedNarrowingSaturateUnsignedScalar(System.Runtime.Intrinsics.Vector64{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.Arm64.ShiftRightArithmeticRoundedNarrowingSaturateUnsignedScalar(System.Runtime.Intrinsics.Vector64{System.Int64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.Arm64.ShiftRightLogicalNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.Arm64.ShiftRightLogicalNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64{System.Int64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.Arm64.ShiftRightLogicalNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64{System.UInt16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.Arm64.ShiftRightLogicalNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64{System.UInt64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.Arm64.ShiftRightLogicalRoundedNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.Arm64.ShiftRightLogicalRoundedNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64{System.Int64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.Arm64.ShiftRightLogicalRoundedNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64{System.UInt16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.Arm64.ShiftRightLogicalRoundedNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64{System.UInt64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftAndInsert(System.Runtime.Intrinsics.Vector128{System.Byte},System.Runtime.Intrinsics.Vector128{System.Byte},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftAndInsert(System.Runtime.Intrinsics.Vector128{System.Int16},System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftAndInsert(System.Runtime.Intrinsics.Vector128{System.Int64},System.Runtime.Intrinsics.Vector128{System.Int64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftAndInsert(System.Runtime.Intrinsics.Vector128{System.SByte},System.Runtime.Intrinsics.Vector128{System.SByte},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftAndInsert(System.Runtime.Intrinsics.Vector128{System.UInt16},System.Runtime.Intrinsics.Vector128{System.UInt16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftAndInsert(System.Runtime.Intrinsics.Vector128{System.UInt64},System.Runtime.Intrinsics.Vector128{System.UInt64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftAndInsert(System.Runtime.Intrinsics.Vector64{System.Byte},System.Runtime.Intrinsics.Vector64{System.Byte},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftAndInsert(System.Runtime.Intrinsics.Vector64{System.Int16},System.Runtime.Intrinsics.Vector64{System.Int16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftAndInsert(System.Runtime.Intrinsics.Vector64{System.Int32},System.Runtime.Intrinsics.Vector64{System.Int32},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftAndInsert(System.Runtime.Intrinsics.Vector64{System.SByte},System.Runtime.Intrinsics.Vector64{System.SByte},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftAndInsert(System.Runtime.Intrinsics.Vector64{System.UInt16},System.Runtime.Intrinsics.Vector64{System.UInt16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftAndInsert(System.Runtime.Intrinsics.Vector64{System.UInt32},System.Runtime.Intrinsics.Vector64{System.UInt32},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftAndInsertScalar(System.Runtime.Intrinsics.Vector64{System.Int64},System.Runtime.Intrinsics.Vector64{System.Int64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftAndInsertScalar(System.Runtime.Intrinsics.Vector64{System.UInt64},System.Runtime.Intrinsics.Vector64{System.UInt64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogical(System.Runtime.Intrinsics.Vector128{System.Byte},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogical(System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogical(System.Runtime.Intrinsics.Vector128{System.Int64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogical(System.Runtime.Intrinsics.Vector128{System.SByte},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogical(System.Runtime.Intrinsics.Vector128{System.UInt16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogical(System.Runtime.Intrinsics.Vector128{System.UInt64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogical(System.Runtime.Intrinsics.Vector64{System.Byte},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogical(System.Runtime.Intrinsics.Vector64{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogical(System.Runtime.Intrinsics.Vector64{System.Int32},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogical(System.Runtime.Intrinsics.Vector64{System.SByte},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogical(System.Runtime.Intrinsics.Vector64{System.UInt16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogical(System.Runtime.Intrinsics.Vector64{System.UInt32},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalSaturate(System.Runtime.Intrinsics.Vector128{System.Byte},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalSaturate(System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalSaturate(System.Runtime.Intrinsics.Vector128{System.Int64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalSaturate(System.Runtime.Intrinsics.Vector128{System.SByte},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalSaturate(System.Runtime.Intrinsics.Vector128{System.UInt16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalSaturate(System.Runtime.Intrinsics.Vector128{System.UInt64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalSaturate(System.Runtime.Intrinsics.Vector64{System.Byte},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalSaturate(System.Runtime.Intrinsics.Vector64{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalSaturate(System.Runtime.Intrinsics.Vector64{System.Int32},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalSaturate(System.Runtime.Intrinsics.Vector64{System.SByte},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalSaturate(System.Runtime.Intrinsics.Vector64{System.UInt16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalSaturate(System.Runtime.Intrinsics.Vector64{System.UInt32},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalSaturateScalar(System.Runtime.Intrinsics.Vector64{System.Int64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalSaturateScalar(System.Runtime.Intrinsics.Vector64{System.UInt64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalSaturateUnsigned(System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalSaturateUnsigned(System.Runtime.Intrinsics.Vector128{System.Int64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalSaturateUnsigned(System.Runtime.Intrinsics.Vector128{System.SByte},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalSaturateUnsigned(System.Runtime.Intrinsics.Vector64{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalSaturateUnsigned(System.Runtime.Intrinsics.Vector64{System.Int32},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalSaturateUnsigned(System.Runtime.Intrinsics.Vector64{System.SByte},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalSaturateUnsignedScalar(System.Runtime.Intrinsics.Vector64{System.Int64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalScalar(System.Runtime.Intrinsics.Vector64{System.Int64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalScalar(System.Runtime.Intrinsics.Vector64{System.UInt64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalWideningLower(System.Runtime.Intrinsics.Vector64{System.Byte},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalWideningLower(System.Runtime.Intrinsics.Vector64{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalWideningLower(System.Runtime.Intrinsics.Vector64{System.Int32},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalWideningLower(System.Runtime.Intrinsics.Vector64{System.SByte},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalWideningLower(System.Runtime.Intrinsics.Vector64{System.UInt16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalWideningLower(System.Runtime.Intrinsics.Vector64{System.UInt32},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalWideningUpper(System.Runtime.Intrinsics.Vector128{System.Byte},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalWideningUpper(System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalWideningUpper(System.Runtime.Intrinsics.Vector128{System.SByte},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftLeftLogicalWideningUpper(System.Runtime.Intrinsics.Vector128{System.UInt16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightAndInsert(System.Runtime.Intrinsics.Vector128{System.Byte},System.Runtime.Intrinsics.Vector128{System.Byte},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightAndInsert(System.Runtime.Intrinsics.Vector128{System.Int16},System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightAndInsert(System.Runtime.Intrinsics.Vector128{System.Int64},System.Runtime.Intrinsics.Vector128{System.Int64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightAndInsert(System.Runtime.Intrinsics.Vector128{System.SByte},System.Runtime.Intrinsics.Vector128{System.SByte},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightAndInsert(System.Runtime.Intrinsics.Vector128{System.UInt16},System.Runtime.Intrinsics.Vector128{System.UInt16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightAndInsert(System.Runtime.Intrinsics.Vector128{System.UInt64},System.Runtime.Intrinsics.Vector128{System.UInt64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightAndInsert(System.Runtime.Intrinsics.Vector64{System.Byte},System.Runtime.Intrinsics.Vector64{System.Byte},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightAndInsert(System.Runtime.Intrinsics.Vector64{System.Int16},System.Runtime.Intrinsics.Vector64{System.Int16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightAndInsert(System.Runtime.Intrinsics.Vector64{System.Int32},System.Runtime.Intrinsics.Vector64{System.Int32},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightAndInsert(System.Runtime.Intrinsics.Vector64{System.SByte},System.Runtime.Intrinsics.Vector64{System.SByte},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightAndInsert(System.Runtime.Intrinsics.Vector64{System.UInt16},System.Runtime.Intrinsics.Vector64{System.UInt16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightAndInsert(System.Runtime.Intrinsics.Vector64{System.UInt32},System.Runtime.Intrinsics.Vector64{System.UInt32},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightAndInsertScalar(System.Runtime.Intrinsics.Vector64{System.Int64},System.Runtime.Intrinsics.Vector64{System.Int64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightAndInsertScalar(System.Runtime.Intrinsics.Vector64{System.UInt64},System.Runtime.Intrinsics.Vector64{System.UInt64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmetic(System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmetic(System.Runtime.Intrinsics.Vector128{System.Int64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmetic(System.Runtime.Intrinsics.Vector128{System.SByte},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmetic(System.Runtime.Intrinsics.Vector64{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmetic(System.Runtime.Intrinsics.Vector64{System.Int32},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmetic(System.Runtime.Intrinsics.Vector64{System.SByte},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticAdd(System.Runtime.Intrinsics.Vector128{System.Int16},System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticAdd(System.Runtime.Intrinsics.Vector128{System.Int64},System.Runtime.Intrinsics.Vector128{System.Int64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticAdd(System.Runtime.Intrinsics.Vector128{System.SByte},System.Runtime.Intrinsics.Vector128{System.SByte},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticAdd(System.Runtime.Intrinsics.Vector64{System.Int16},System.Runtime.Intrinsics.Vector64{System.Int16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticAdd(System.Runtime.Intrinsics.Vector64{System.Int32},System.Runtime.Intrinsics.Vector64{System.Int32},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticAdd(System.Runtime.Intrinsics.Vector64{System.SByte},System.Runtime.Intrinsics.Vector64{System.SByte},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticAddScalar(System.Runtime.Intrinsics.Vector64{System.Int64},System.Runtime.Intrinsics.Vector64{System.Int64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128{System.Int32},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128{System.Int64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticNarrowingSaturateUnsignedLower(System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticNarrowingSaturateUnsignedLower(System.Runtime.Intrinsics.Vector128{System.Int32},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticNarrowingSaturateUnsignedLower(System.Runtime.Intrinsics.Vector128{System.Int64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticNarrowingSaturateUnsignedUpper(System.Runtime.Intrinsics.Vector64{System.Byte},System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticNarrowingSaturateUnsignedUpper(System.Runtime.Intrinsics.Vector64{System.UInt16},System.Runtime.Intrinsics.Vector128{System.Int32},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticNarrowingSaturateUnsignedUpper(System.Runtime.Intrinsics.Vector64{System.UInt32},System.Runtime.Intrinsics.Vector128{System.Int64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64{System.Int16},System.Runtime.Intrinsics.Vector128{System.Int32},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64{System.Int32},System.Runtime.Intrinsics.Vector128{System.Int64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64{System.SByte},System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticRounded(System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticRounded(System.Runtime.Intrinsics.Vector128{System.Int64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticRounded(System.Runtime.Intrinsics.Vector128{System.SByte},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticRounded(System.Runtime.Intrinsics.Vector64{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticRounded(System.Runtime.Intrinsics.Vector64{System.Int32},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticRounded(System.Runtime.Intrinsics.Vector64{System.SByte},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticRoundedAdd(System.Runtime.Intrinsics.Vector128{System.Int16},System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticRoundedAdd(System.Runtime.Intrinsics.Vector128{System.Int64},System.Runtime.Intrinsics.Vector128{System.Int64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticRoundedAdd(System.Runtime.Intrinsics.Vector128{System.SByte},System.Runtime.Intrinsics.Vector128{System.SByte},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticRoundedAdd(System.Runtime.Intrinsics.Vector64{System.Int16},System.Runtime.Intrinsics.Vector64{System.Int16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticRoundedAdd(System.Runtime.Intrinsics.Vector64{System.Int32},System.Runtime.Intrinsics.Vector64{System.Int32},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticRoundedAdd(System.Runtime.Intrinsics.Vector64{System.SByte},System.Runtime.Intrinsics.Vector64{System.SByte},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticRoundedAddScalar(System.Runtime.Intrinsics.Vector64{System.Int64},System.Runtime.Intrinsics.Vector64{System.Int64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticRoundedNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticRoundedNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128{System.Int32},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticRoundedNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128{System.Int64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticRoundedNarrowingSaturateUnsignedLower(System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticRoundedNarrowingSaturateUnsignedLower(System.Runtime.Intrinsics.Vector128{System.Int32},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticRoundedNarrowingSaturateUnsignedLower(System.Runtime.Intrinsics.Vector128{System.Int64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticRoundedNarrowingSaturateUnsignedUpper(System.Runtime.Intrinsics.Vector64{System.Byte},System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticRoundedNarrowingSaturateUnsignedUpper(System.Runtime.Intrinsics.Vector64{System.UInt16},System.Runtime.Intrinsics.Vector128{System.Int32},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticRoundedNarrowingSaturateUnsignedUpper(System.Runtime.Intrinsics.Vector64{System.UInt32},System.Runtime.Intrinsics.Vector128{System.Int64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticRoundedNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64{System.Int16},System.Runtime.Intrinsics.Vector128{System.Int32},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticRoundedNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64{System.Int32},System.Runtime.Intrinsics.Vector128{System.Int64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticRoundedNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64{System.SByte},System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticRoundedScalar(System.Runtime.Intrinsics.Vector64{System.Int64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightArithmeticScalar(System.Runtime.Intrinsics.Vector64{System.Int64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogical(System.Runtime.Intrinsics.Vector128{System.Byte},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogical(System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogical(System.Runtime.Intrinsics.Vector128{System.Int64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogical(System.Runtime.Intrinsics.Vector128{System.SByte},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogical(System.Runtime.Intrinsics.Vector128{System.UInt16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogical(System.Runtime.Intrinsics.Vector128{System.UInt64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogical(System.Runtime.Intrinsics.Vector64{System.Byte},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogical(System.Runtime.Intrinsics.Vector64{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogical(System.Runtime.Intrinsics.Vector64{System.Int32},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogical(System.Runtime.Intrinsics.Vector64{System.SByte},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogical(System.Runtime.Intrinsics.Vector64{System.UInt16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogical(System.Runtime.Intrinsics.Vector64{System.UInt32},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalAdd(System.Runtime.Intrinsics.Vector128{System.Byte},System.Runtime.Intrinsics.Vector128{System.Byte},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalAdd(System.Runtime.Intrinsics.Vector128{System.Int16},System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalAdd(System.Runtime.Intrinsics.Vector128{System.Int64},System.Runtime.Intrinsics.Vector128{System.Int64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalAdd(System.Runtime.Intrinsics.Vector128{System.SByte},System.Runtime.Intrinsics.Vector128{System.SByte},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalAdd(System.Runtime.Intrinsics.Vector128{System.UInt16},System.Runtime.Intrinsics.Vector128{System.UInt16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalAdd(System.Runtime.Intrinsics.Vector128{System.UInt64},System.Runtime.Intrinsics.Vector128{System.UInt64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalAdd(System.Runtime.Intrinsics.Vector64{System.Byte},System.Runtime.Intrinsics.Vector64{System.Byte},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalAdd(System.Runtime.Intrinsics.Vector64{System.Int16},System.Runtime.Intrinsics.Vector64{System.Int16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalAdd(System.Runtime.Intrinsics.Vector64{System.Int32},System.Runtime.Intrinsics.Vector64{System.Int32},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalAdd(System.Runtime.Intrinsics.Vector64{System.SByte},System.Runtime.Intrinsics.Vector64{System.SByte},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalAdd(System.Runtime.Intrinsics.Vector64{System.UInt16},System.Runtime.Intrinsics.Vector64{System.UInt16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalAdd(System.Runtime.Intrinsics.Vector64{System.UInt32},System.Runtime.Intrinsics.Vector64{System.UInt32},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalAddScalar(System.Runtime.Intrinsics.Vector64{System.Int64},System.Runtime.Intrinsics.Vector64{System.Int64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalAddScalar(System.Runtime.Intrinsics.Vector64{System.UInt64},System.Runtime.Intrinsics.Vector64{System.UInt64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalNarrowingLower(System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalNarrowingLower(System.Runtime.Intrinsics.Vector128{System.Int32},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalNarrowingLower(System.Runtime.Intrinsics.Vector128{System.Int64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalNarrowingLower(System.Runtime.Intrinsics.Vector128{System.UInt16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalNarrowingLower(System.Runtime.Intrinsics.Vector128{System.UInt32},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalNarrowingLower(System.Runtime.Intrinsics.Vector128{System.UInt64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128{System.Int32},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128{System.Int64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128{System.UInt16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128{System.UInt32},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128{System.UInt64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64{System.Byte},System.Runtime.Intrinsics.Vector128{System.UInt16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64{System.Int16},System.Runtime.Intrinsics.Vector128{System.Int32},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64{System.Int32},System.Runtime.Intrinsics.Vector128{System.Int64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64{System.SByte},System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64{System.UInt16},System.Runtime.Intrinsics.Vector128{System.UInt32},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64{System.UInt32},System.Runtime.Intrinsics.Vector128{System.UInt64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalNarrowingUpper(System.Runtime.Intrinsics.Vector64{System.Byte},System.Runtime.Intrinsics.Vector128{System.UInt16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalNarrowingUpper(System.Runtime.Intrinsics.Vector64{System.Int16},System.Runtime.Intrinsics.Vector128{System.Int32},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalNarrowingUpper(System.Runtime.Intrinsics.Vector64{System.Int32},System.Runtime.Intrinsics.Vector128{System.Int64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalNarrowingUpper(System.Runtime.Intrinsics.Vector64{System.SByte},System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalNarrowingUpper(System.Runtime.Intrinsics.Vector64{System.UInt16},System.Runtime.Intrinsics.Vector128{System.UInt32},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalNarrowingUpper(System.Runtime.Intrinsics.Vector64{System.UInt32},System.Runtime.Intrinsics.Vector128{System.UInt64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRounded(System.Runtime.Intrinsics.Vector128{System.Byte},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRounded(System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRounded(System.Runtime.Intrinsics.Vector128{System.Int64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRounded(System.Runtime.Intrinsics.Vector128{System.SByte},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRounded(System.Runtime.Intrinsics.Vector128{System.UInt16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRounded(System.Runtime.Intrinsics.Vector128{System.UInt64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRounded(System.Runtime.Intrinsics.Vector64{System.Byte},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRounded(System.Runtime.Intrinsics.Vector64{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRounded(System.Runtime.Intrinsics.Vector64{System.Int32},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRounded(System.Runtime.Intrinsics.Vector64{System.SByte},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRounded(System.Runtime.Intrinsics.Vector64{System.UInt16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRounded(System.Runtime.Intrinsics.Vector64{System.UInt32},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedAdd(System.Runtime.Intrinsics.Vector128{System.Byte},System.Runtime.Intrinsics.Vector128{System.Byte},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedAdd(System.Runtime.Intrinsics.Vector128{System.Int16},System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedAdd(System.Runtime.Intrinsics.Vector128{System.Int64},System.Runtime.Intrinsics.Vector128{System.Int64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedAdd(System.Runtime.Intrinsics.Vector128{System.SByte},System.Runtime.Intrinsics.Vector128{System.SByte},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedAdd(System.Runtime.Intrinsics.Vector128{System.UInt16},System.Runtime.Intrinsics.Vector128{System.UInt16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedAdd(System.Runtime.Intrinsics.Vector128{System.UInt64},System.Runtime.Intrinsics.Vector128{System.UInt64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedAdd(System.Runtime.Intrinsics.Vector64{System.Byte},System.Runtime.Intrinsics.Vector64{System.Byte},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedAdd(System.Runtime.Intrinsics.Vector64{System.Int16},System.Runtime.Intrinsics.Vector64{System.Int16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedAdd(System.Runtime.Intrinsics.Vector64{System.Int32},System.Runtime.Intrinsics.Vector64{System.Int32},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedAdd(System.Runtime.Intrinsics.Vector64{System.SByte},System.Runtime.Intrinsics.Vector64{System.SByte},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedAdd(System.Runtime.Intrinsics.Vector64{System.UInt16},System.Runtime.Intrinsics.Vector64{System.UInt16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedAdd(System.Runtime.Intrinsics.Vector64{System.UInt32},System.Runtime.Intrinsics.Vector64{System.UInt32},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedAddScalar(System.Runtime.Intrinsics.Vector64{System.Int64},System.Runtime.Intrinsics.Vector64{System.Int64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedAddScalar(System.Runtime.Intrinsics.Vector64{System.UInt64},System.Runtime.Intrinsics.Vector64{System.UInt64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedNarrowingLower(System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedNarrowingLower(System.Runtime.Intrinsics.Vector128{System.Int32},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedNarrowingLower(System.Runtime.Intrinsics.Vector128{System.Int64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedNarrowingLower(System.Runtime.Intrinsics.Vector128{System.UInt16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedNarrowingLower(System.Runtime.Intrinsics.Vector128{System.UInt32},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedNarrowingLower(System.Runtime.Intrinsics.Vector128{System.UInt64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128{System.Int32},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128{System.Int64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128{System.UInt16},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128{System.UInt32},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128{System.UInt64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64{System.Byte},System.Runtime.Intrinsics.Vector128{System.UInt16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64{System.Int16},System.Runtime.Intrinsics.Vector128{System.Int32},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64{System.Int32},System.Runtime.Intrinsics.Vector128{System.Int64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64{System.SByte},System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64{System.UInt16},System.Runtime.Intrinsics.Vector128{System.UInt32},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64{System.UInt32},System.Runtime.Intrinsics.Vector128{System.UInt64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedNarrowingUpper(System.Runtime.Intrinsics.Vector64{System.Byte},System.Runtime.Intrinsics.Vector128{System.UInt16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedNarrowingUpper(System.Runtime.Intrinsics.Vector64{System.Int16},System.Runtime.Intrinsics.Vector128{System.Int32},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedNarrowingUpper(System.Runtime.Intrinsics.Vector64{System.Int32},System.Runtime.Intrinsics.Vector128{System.Int64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedNarrowingUpper(System.Runtime.Intrinsics.Vector64{System.SByte},System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedNarrowingUpper(System.Runtime.Intrinsics.Vector64{System.UInt16},System.Runtime.Intrinsics.Vector128{System.UInt32},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedNarrowingUpper(System.Runtime.Intrinsics.Vector64{System.UInt32},System.Runtime.Intrinsics.Vector128{System.UInt64},System.Byte)$2:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedScalar(System.Runtime.Intrinsics.Vector64{System.Int64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedScalar(System.Runtime.Intrinsics.Vector64{System.UInt64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalScalar(System.Runtime.Intrinsics.Vector64{System.Int64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - M:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalScalar(System.Runtime.Intrinsics.Vector64{System.UInt64},System.Byte)$1:[T:System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute] - net8.0/System.Runtime.Intrinsics.dll - net9.0/System.Runtime.Intrinsics.dll - - - CP0015 - T:System.Text.RegularExpressions.GeneratedRegexAttribute:[T:System.AttributeUsageAttribute] - net8.0/System.Text.RegularExpressions.dll - net9.0/System.Text.RegularExpressions.dll - - - CP0021 - T:System.Diagnostics.Metrics.MeasurementCallback`1``0:struct - net8.0/System.Diagnostics.DiagnosticSource.dll - net9.0/System.Diagnostics.DiagnosticSource.dll - - - CP0021 - T:System.Runtime.InteropServices.Marshalling.ExceptionAsDefaultMarshaller`1``0:struct - net8.0/System.Runtime.InteropServices.dll - net9.0/System.Runtime.InteropServices.dll - - - CP0021 - T:System.Runtime.InteropServices.Marshalling.ExceptionAsDefaultMarshaller`1``0:unmanaged - net8.0/System.Runtime.InteropServices.dll - net9.0/System.Runtime.InteropServices.dll - - - CP0021 - T:System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller`1``0:struct - net8.0/System.Runtime.InteropServices.dll - net9.0/System.Runtime.InteropServices.dll - - - CP0021 - T:System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller`1``0:T:System.Numerics.INumber{`0} - net8.0/System.Runtime.InteropServices.dll - net9.0/System.Runtime.InteropServices.dll - - - CP0021 - T:System.Runtime.InteropServices.Marshalling.ExceptionAsHResultMarshaller`1``0:unmanaged - net8.0/System.Runtime.InteropServices.dll - net9.0/System.Runtime.InteropServices.dll - - - CP0021 - T:System.Runtime.InteropServices.Marshalling.ExceptionAsNaNMarshaller`1``0:struct - net8.0/System.Runtime.InteropServices.dll - net9.0/System.Runtime.InteropServices.dll - - - CP0021 - T:System.Runtime.InteropServices.Marshalling.ExceptionAsNaNMarshaller`1``0:T:System.Numerics.IFloatingPointIeee754{`0} - net8.0/System.Runtime.InteropServices.dll - net9.0/System.Runtime.InteropServices.dll - - - CP0021 - T:System.Runtime.InteropServices.Marshalling.ExceptionAsNaNMarshaller`1``0:unmanaged - net8.0/System.Runtime.InteropServices.dll - net9.0/System.Runtime.InteropServices.dll - - - CP0021 - T:System.Text.Json.Serialization.JsonNumberEnumConverter`1``0:T:System.Enum - net8.0/System.Text.Json.dll - net9.0/System.Text.Json.dll - diff --git a/src/mono/browser/debugger/BrowserDebugProxy/MonoProxy.cs b/src/mono/browser/debugger/BrowserDebugProxy/MonoProxy.cs index 503f196c17f058..6437b97217fc82 100644 --- a/src/mono/browser/debugger/BrowserDebugProxy/MonoProxy.cs +++ b/src/mono/browser/debugger/BrowserDebugProxy/MonoProxy.cs @@ -916,13 +916,13 @@ protected async Task EvaluateCondition(SessionId sessionId, ExecutionConte logger.LogDebug($"Unable to evaluate breakpoint condition '{condition}': {ree}"); SendLog(sessionId, $"Unable to evaluate breakpoint condition '{condition}': {ree.Message}", token, type: "error"); bp.ConditionAlreadyEvaluatedWithError = true; - SendExceptionToTelemetry(ree, "EvaluateCondition", sessionId, token); + ReportDebuggerExceptionToTelemetry("EvaluateCondition", sessionId, token); } catch (Exception e) { Log("info", $"Unable to evaluate breakpoint condition '{condition}': {e}"); bp.ConditionAlreadyEvaluatedWithError = true; - SendExceptionToTelemetry(e, "EvaluateCondition", sessionId, token); + ReportDebuggerExceptionToTelemetry("EvaluateCondition", sessionId, token); } return false; } @@ -1521,27 +1521,27 @@ private async Task OnEvaluateOnCallFrame(MessageId msg_id, int scopeId, st catch (ReturnAsErrorException ree) { SendResponse(msg_id, AddCallStackInfoToException(ree.Error, context, scopeId), token); - SendExceptionToTelemetry(ree, "OnEvaluateOnCallFrame", msg_id, token); + ReportDebuggerExceptionToTelemetry("OnEvaluateOnCallFrame", msg_id, token); } catch (Exception e) { logger.LogDebug($"Error in EvaluateOnCallFrame for expression '{expression}' with '{e}."); var ree = new ReturnAsErrorException(e.Message, e.GetType().Name); SendResponse(msg_id, AddCallStackInfoToException(ree.Error, context, scopeId), token); - SendExceptionToTelemetry(e, "OnEvaluateOnCallFrame", msg_id, token); + ReportDebuggerExceptionToTelemetry("OnEvaluateOnCallFrame", msg_id, token); } return true; } - private void SendExceptionToTelemetry(Exception exc, string callingFunction, SessionId msg_id, CancellationToken token) + private void ReportDebuggerExceptionToTelemetry(string callingFunction, SessionId msg_id, CancellationToken token) { - JObject reportBlazorDebugError = JObject.FromObject(new + JObject reportBlazorDebugException = JObject.FromObject(new { exceptionType = "uncaughtException", - error = $"{exc.Message} at {callingFunction}", + exception = $"BlazorDebugger exception at {callingFunction}", }); - SendEvent(msg_id, "DotnetDebugger.reportBlazorDebugError", reportBlazorDebugError, token); + SendEvent(msg_id, "DotnetDebugger.reportBlazorDebugException", reportBlazorDebugException, token); } internal async Task GetScopeProperties(SessionId msg_id, int scopeId, CancellationToken token) diff --git a/src/mono/mono.proj b/src/mono/mono.proj index 8fe15830cabb53..8bfbb710823937 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -818,7 +818,8 @@ JS_ENGINES = [NODE_JS] <_LibClang Include="$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/$(MonoToolchainPrebuiltOS)/lib/libclang.so" Condition=" Exists('$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/$(MonoToolchainPrebuiltOS)/lib/libclang.so') "/> - <_LibClang Include="$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/$(MonoToolchainPrebuiltOS)/lib64/libclang.so.*" Condition=" '$(_LibClang)' == '' "/> + <_LibClang Include="$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/$(MonoToolchainPrebuiltOS)/lib64/libclang.so.*" Condition=" '@(_LibClang)' == '' "/> + <_LibClang Include="/usr/local/lib/libclang.so" Condition="'@(_LibClang)' == ''" /> true diff --git a/src/mono/mono/cil/opcode.def b/src/mono/mono/cil/opcode.def index 47bccb295e99b2..049c0500b66bd1 100644 --- a/src/mono/mono/cil/opcode.def +++ b/src/mono/mono/cil/opcode.def @@ -328,6 +328,8 @@ OPDEF(CEE_MONO_GET_SP, "mono_get_sp", Pop0, PushI, InlineNone, 0, 2, 0xF0, 0x20, OPDEF(CEE_MONO_METHODCONST, "mono_methodconst", Pop0, PushI, InlineI, 0, 2, 0xF0, 0x21, NEXT) OPDEF(CEE_MONO_PINVOKE_ADDR_CACHE, "mono_pinvoke_addr_cache", Pop0, PushI, InlineI, 0, 2, 0xF0, 0x22, NEXT) OPDEF(CEE_MONO_REMAP_OVF_EXC, "mono_remap_ovf_exc", Pop0, Push0, InlineI, 0, 2, 0xF0, 0x23, NEXT) +OPDEF(CEE_MONO_LDVIRTFTN_DELEGATE, "mono_ldvirtftn_delegate", PopI+PopI, PushI, InlineNone, 0, 2, 0xF0, 0x24, NEXT) + #ifndef OPALIAS #define _MONO_CIL_OPALIAS_DEFINED_ #define OPALIAS(a,s,r) diff --git a/src/mono/mono/metadata/class-internals.h b/src/mono/mono/metadata/class-internals.h index e44ba4c7b49026..55067f680d1b31 100644 --- a/src/mono/mono/metadata/class-internals.h +++ b/src/mono/mono/metadata/class-internals.h @@ -952,25 +952,20 @@ mono_class_get_##shortname##_class (void) \ // GENERATE_TRY_GET_CLASS_WITH_CACHE attempts mono_class_load_from_name approximately // only once. i.e. if it fails, it will return null and not retry. -// In a race it might try a few times, but not indefinitely. -// -// FIXME This maybe has excessive volatile/barriers. -// #define GENERATE_TRY_GET_CLASS_WITH_CACHE(shortname,name_space,name) \ MonoClass* \ mono_class_try_get_##shortname##_class (void) \ { \ - static volatile MonoClass *tmp_class; \ - static volatile gboolean inited; \ - MonoClass *klass = (MonoClass *)tmp_class; \ - mono_memory_barrier (); \ - if (!inited) { \ - klass = mono_class_try_load_from_name (mono_class_generate_get_corlib_impl (), name_space, name); \ - tmp_class = klass; \ - mono_memory_barrier (); \ - inited = TRUE; \ + static MonoClass *cached_class; \ + static gboolean cached_class_inited; \ + gboolean tmp_inited; \ + mono_atomic_load_acquire(tmp_inited, gboolean, &cached_class_inited); \ + if (G_LIKELY(tmp_inited)) { \ + return (MonoClass*)cached_class; \ } \ - return klass; \ + cached_class = mono_class_try_load_from_name (mono_class_generate_get_corlib_impl (), name_space, name); \ + mono_atomic_store_release(&cached_class_inited, TRUE); \ + return (MonoClass*)cached_class; \ } GENERATE_TRY_GET_CLASS_WITH_CACHE_DECL (safehandle) diff --git a/src/mono/mono/metadata/class.c b/src/mono/mono/metadata/class.c index abd0948e3a2f5e..c74c5c12e00cfd 100644 --- a/src/mono/mono/metadata/class.c +++ b/src/mono/mono/metadata/class.c @@ -2580,7 +2580,7 @@ mono_class_get_field_from_name_full (MonoClass *klass, const char *name, MonoTyp MonoClassField *gfield = mono_metadata_get_corresponding_field_from_generic_type_definition (field); g_assert (gfield != NULL); MonoType *field_type = gfield->type; - if (!mono_metadata_type_equal_full (type, field_type, TRUE)) + if (!mono_metadata_type_equal_full (type, field_type, MONO_TYPE_EQ_FLAGS_SIG_ONLY)) continue; } return field; diff --git a/src/mono/mono/metadata/icall.c b/src/mono/mono/metadata/icall.c index 43f3d32653f321..e326e7a7b085a0 100644 --- a/src/mono/mono/metadata/icall.c +++ b/src/mono/mono/metadata/icall.c @@ -3391,6 +3391,8 @@ static void init_io_stream_slots (void) { MonoClass* klass = mono_class_try_get_stream_class (); + g_assert(klass); + mono_class_setup_vtable (klass); MonoMethod **klass_methods = m_class_get_methods (klass); if (!klass_methods) { diff --git a/src/mono/mono/metadata/loader-internals.h b/src/mono/mono/metadata/loader-internals.h index 60d39ff6a6398c..c9a340f928b7b2 100644 --- a/src/mono/mono/metadata/loader-internals.h +++ b/src/mono/mono/metadata/loader-internals.h @@ -175,7 +175,8 @@ struct _MonoMemoryManager { MonoAssemblyLoadContext **alcs; // Generic-specific caches - dn_simdhash_ght_t *ginst_cache, *gmethod_cache, *gsignature_cache; + GHashTable *ginst_cache; + dn_simdhash_ght_t *gmethod_cache, *gsignature_cache; MonoConcurrentHashTable *gclass_cache; /* mirror caches of ones already on MonoImage. These ones contain generics */ diff --git a/src/mono/mono/metadata/marshal-lightweight.c b/src/mono/mono/metadata/marshal-lightweight.c index 9829c95232baef..2095334a818afe 100644 --- a/src/mono/mono/metadata/marshal-lightweight.c +++ b/src/mono/mono/metadata/marshal-lightweight.c @@ -2052,7 +2052,8 @@ emit_delegate_invoke_internal_ilgen (MonoMethodBuilder *mb, MonoMethodSignature } mono_mb_emit_ldarg_addr (mb, 1); mono_mb_emit_ldarg (mb, 0); - mono_mb_emit_icall (mb, mono_get_addr_compiled_method); + mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX); + mono_mb_emit_byte (mb, CEE_MONO_LDVIRTFTN_DELEGATE); mono_mb_emit_op (mb, CEE_CALLI, target_method_sig); } else { mono_mb_emit_byte (mb, CEE_LDNULL); @@ -2305,8 +2306,8 @@ emit_unsafe_accessor_field_wrapper (MonoMethodBuilder *mb, gboolean inflate_gene } MonoClassField *target_field = mono_class_get_field_from_name_full (target_class, member_name, NULL); - if (target_field == NULL || !mono_metadata_type_equal_full (target_field->type, m_class_get_byval_arg (mono_class_from_mono_type_internal (ret_type)), TRUE)) { - mono_mb_emit_exception_full (mb, "System", "MissingFieldException", + if (target_field == NULL || !mono_metadata_type_equal_full (target_field->type, m_class_get_byval_arg (mono_class_from_mono_type_internal (ret_type)), MONO_TYPE_EQ_FLAGS_SIG_ONLY | MONO_TYPE_EQ_FLAG_IGNORE_CMODS)) { + mono_mb_emit_exception_full (mb, "System", "MissingFieldException", g_strdup_printf("No '%s' in '%s'. Or the type of '%s' doesn't match", member_name, m_class_get_name (target_class), member_name)); return; } @@ -2403,7 +2404,7 @@ inflate_method (MonoClass *klass, MonoMethod *method, MonoMethod *accessor_metho if ((context.class_inst != NULL) || (context.method_inst != NULL)) result = mono_class_inflate_generic_method_checked (method, &context, error); mono_error_assert_ok (error); - + return result; } @@ -2425,13 +2426,13 @@ emit_unsafe_accessor_ctor_wrapper (MonoMethodBuilder *mb, gboolean inflate_gener mono_mb_emit_exception_full (mb, "System", "BadImageFormatException", "Invalid usage of UnsafeAccessorAttribute."); return; } - + MonoClass *target_class = mono_class_from_mono_type_internal (target_type); ERROR_DECL(find_method_error); MonoMethodSignature *member_sig = ctor_sig_from_accessor_sig (mb, sig); - + MonoClass *in_class = target_class; MonoMethod *target_method = mono_unsafe_accessor_find_ctor (in_class, member_sig, target_class, find_method_error); @@ -2506,7 +2507,7 @@ emit_unsafe_accessor_method_wrapper (MonoMethodBuilder *mb, gboolean inflate_gen emit_missing_method_error (mb, find_method_error, member_name); return; } - + g_assert (target_method->klass == target_class); emit_unsafe_accessor_ldargs (mb, sig, !hasthis ? 1 : 0); @@ -2733,7 +2734,7 @@ emit_swift_lowered_struct_load (MonoMethodBuilder *mb, MonoMethodSignature *csig } } -/* Swift struct lowering handling causes csig to have additional arguments. +/* Swift struct lowering handling causes csig to have additional arguments. * This function returns the index of the argument in the csig that corresponds to the argument in the original signature. */ static int diff --git a/src/mono/mono/metadata/memory-manager.c b/src/mono/mono/metadata/memory-manager.c index edb7fff24a8d3c..e7a234661db5a3 100644 --- a/src/mono/mono/metadata/memory-manager.c +++ b/src/mono/mono/metadata/memory-manager.c @@ -238,7 +238,7 @@ memory_manager_delete (MonoMemoryManager *memory_manager, gboolean debug_unload) MonoMemoryManager *mm = memory_manager; if (mm->gclass_cache) mono_conc_hashtable_destroy (mm->gclass_cache); - free_simdhash (&mm->ginst_cache); + free_hash (&mm->ginst_cache); free_simdhash (&mm->gmethod_cache); free_simdhash (&mm->gsignature_cache); free_hash (&mm->szarray_cache); diff --git a/src/mono/mono/metadata/metadata-internals.h b/src/mono/mono/metadata/metadata-internals.h index 54d85997d7af4a..3f0345f881185c 100644 --- a/src/mono/mono/metadata/metadata-internals.h +++ b/src/mono/mono/metadata/metadata-internals.h @@ -1021,8 +1021,14 @@ mono_type_stack_size_internal (MonoType *t, int *align, gboolean allow_open); MONO_API void mono_type_get_desc (GString *res, MonoType *type, mono_bool include_namespace); +enum { + MONO_TYPE_EQ_FLAGS_NONE = 0, + MONO_TYPE_EQ_FLAGS_SIG_ONLY = 1, + MONO_TYPE_EQ_FLAG_IGNORE_CMODS = 2, +}; + gboolean -mono_metadata_type_equal_full (MonoType *t1, MonoType *t2, gboolean signature_only); +mono_metadata_type_equal_full (MonoType *t1, MonoType *t2, int flags); MonoMarshalSpec * mono_metadata_parse_marshal_spec_full (MonoImage *image, MonoImage *parent_image, const char *ptr); diff --git a/src/mono/mono/metadata/metadata.c b/src/mono/mono/metadata/metadata.c index a9b291bcadc54d..8a96c1ead4c337 100644 --- a/src/mono/mono/metadata/metadata.c +++ b/src/mono/mono/metadata/metadata.c @@ -38,6 +38,7 @@ #include #include #include +#include "../native/containers/dn-simdhash-utils.h" /* Auxiliary structure used for caching inflated signatures */ typedef struct { @@ -45,11 +46,6 @@ typedef struct { MonoGenericContext context; } MonoInflatedMethodSignature; -enum { - MONO_TYPE_EQ_FLAGS_SIG_ONLY = 1, - MONO_TYPE_EQ_FLAG_IGNORE_CMODS = 2, -}; - static gboolean do_mono_metadata_parse_type (MonoType *type, MonoImage *m, MonoGenericContainer *container, gboolean transient, const char *ptr, const char **rptr, MonoError *error); @@ -1879,18 +1875,21 @@ mono_type_equal (gconstpointer ka, gconstpointer kb) guint mono_metadata_generic_inst_hash (gconstpointer data) { + // Custom MurmurHash3 for generic instances to produce a high quality hash const MonoGenericInst *ginst = (const MonoGenericInst *) data; - guint hash = 0; g_assert (ginst); g_assert (ginst->type_argv); + uint32_t h1 = ginst->type_argc; + for (guint i = 0; i < ginst->type_argc; ++i) { - hash *= 13; g_assert (ginst->type_argv [i]); - hash += mono_metadata_type_hash (ginst->type_argv [i]); + MURMUR3_HASH_BLOCK ((uint32_t) mono_metadata_type_hash (ginst->type_argv [i])); } - return hash ^ (ginst->is_open << 8); + h1 ^= ginst->is_open; + + return (guint)murmur3_fmix32 (h1); } static gboolean @@ -2936,7 +2935,7 @@ aggregate_modifiers_equal (gconstpointer ka, gconstpointer kb) for (int i = 0; i < amods1->count; ++i) { if (amods1->modifiers [i].required != amods2->modifiers [i].required) return FALSE; - if (!mono_metadata_type_equal_full (amods1->modifiers [i].type, amods2->modifiers [i].type, TRUE)) + if (!mono_metadata_type_equal_full (amods1->modifiers [i].type, amods2->modifiers [i].type, MONO_TYPE_EQ_FLAGS_SIG_ONLY)) return FALSE; } return TRUE; @@ -3499,10 +3498,9 @@ mono_metadata_get_canonical_generic_inst (MonoGenericInst *candidate) mono_loader_lock (); if (!mm->ginst_cache) - mm->ginst_cache = dn_simdhash_ght_new_full (mono_metadata_generic_inst_hash, mono_metadata_generic_inst_equal, NULL, (GDestroyNotify)free_generic_inst, 0, NULL); + mm->ginst_cache = g_hash_table_new_full (mono_metadata_generic_inst_hash, mono_metadata_generic_inst_equal, NULL, (GDestroyNotify)free_generic_inst); - MonoGenericInst *ginst = NULL; - dn_simdhash_ght_try_get_value (mm->ginst_cache, candidate, (void **)&ginst); + MonoGenericInst *ginst = g_hash_table_lookup (mm->ginst_cache, candidate); if (!ginst) { int size = MONO_SIZEOF_GENERIC_INST + type_argc * sizeof (MonoType *); ginst = (MonoGenericInst *)mono_mem_manager_alloc0 (mm, size); @@ -3516,7 +3514,7 @@ mono_metadata_get_canonical_generic_inst (MonoGenericInst *candidate) for (int i = 0; i < type_argc; ++i) ginst->type_argv [i] = mono_metadata_type_dup (NULL, candidate->type_argv [i]); - dn_simdhash_ght_insert (mm->ginst_cache, ginst, ginst); + g_hash_table_insert (mm->ginst_cache, ginst, ginst); } mono_loader_unlock (); @@ -5936,24 +5934,23 @@ do_mono_metadata_type_equal (MonoType *t1, MonoType *t2, int equiv_flags) gboolean mono_metadata_type_equal (MonoType *t1, MonoType *t2) { - return do_mono_metadata_type_equal (t1, t2, 0); + return do_mono_metadata_type_equal (t1, t2, MONO_TYPE_EQ_FLAGS_NONE); } /** * mono_metadata_type_equal_full: * \param t1 a type * \param t2 another type - * \param signature_only if signature only comparison should be made + * \param flags flags used to modify comparison logic * - * Determine if \p t1 and \p t2 are signature compatible if \p signature_only is TRUE, otherwise - * behaves the same way as mono_metadata_type_equal. - * The function mono_metadata_type_equal(a, b) is just a shortcut for mono_metadata_type_equal_full(a, b, FALSE). - * \returns TRUE if \p t1 and \p t2 are equal taking \p signature_only into account. + * Determine if \p t1 and \p t2 are compatible based on the supplied flags. + * The function mono_metadata_type_equal(a, b) is just a shortcut for mono_metadata_type_equal_full(a, b, MONO_TYPE_EQ_FLAGS_NONE). + * \returns TRUE if \p t1 and \p t2 are equal. */ gboolean -mono_metadata_type_equal_full (MonoType *t1, MonoType *t2, gboolean signature_only) +mono_metadata_type_equal_full (MonoType *t1, MonoType *t2, int flags) { - return do_mono_metadata_type_equal (t1, t2, signature_only ? MONO_TYPE_EQ_FLAGS_SIG_ONLY : 0); + return do_mono_metadata_type_equal (t1, t2, flags); } enum { diff --git a/src/mono/mono/metadata/monitor.c b/src/mono/mono/metadata/monitor.c index 6a72695e9fbedc..2e08f94d3361e7 100644 --- a/src/mono/mono/metadata/monitor.c +++ b/src/mono/mono/metadata/monitor.c @@ -82,9 +82,9 @@ struct _MonitorArray { MonoThreadsSync monitors [MONO_ZERO_LEN_ARRAY]; }; -#define mono_monitor_allocator_lock() mono_os_mutex_lock (&monitor_mutex) -#define mono_monitor_allocator_unlock() mono_os_mutex_unlock (&monitor_mutex) -static mono_mutex_t monitor_mutex; +#define mono_monitor_allocator_lock() mono_coop_mutex_lock (&monitor_mutex) +#define mono_monitor_allocator_unlock() mono_coop_mutex_unlock (&monitor_mutex) +static MonoCoopMutex monitor_mutex; static MonoThreadsSync *monitor_freelist; static MonitorArray *monitor_allocated; static int array_size = 16; @@ -255,7 +255,7 @@ lock_word_new_flat (gint32 owner) void mono_monitor_init (void) { - mono_os_mutex_init_recursive (&monitor_mutex); + mono_coop_mutex_init_recursive (&monitor_mutex); } static int diff --git a/src/mono/mono/mini/interp/interp.c b/src/mono/mono/mini/interp/interp.c index 12f2cdd50350ee..c3016252942f4a 100644 --- a/src/mono/mono/mini/interp/interp.c +++ b/src/mono/mono/mini/interp/interp.c @@ -3862,6 +3862,34 @@ max_d (double lhs, double rhs) return fmax (lhs, rhs); } +// Equivalent of mono_get_addr_compiled_method +static gpointer +interp_ldvirtftn_delegate (gpointer arg, MonoDelegate *del) +{ + MonoMethod *virtual_method = del->method; + ERROR_DECL(error); + + MonoClass *klass = del->object.vtable->klass; + MonoMethod *invoke = mono_get_delegate_invoke_internal (klass); + MonoMethodSignature *invoke_sig = mono_method_signature_internal (invoke); + + MonoClass *arg_class = NULL; + if (m_type_is_byref (invoke_sig->params [0])) { + arg_class = mono_class_from_mono_type_internal (invoke_sig->params [0]); + } else { + MonoObject *object = (MonoObject*)arg; + arg_class = object->vtable->klass; + } + + MonoMethod *res = mono_class_get_virtual_method (arg_class, virtual_method, error); + mono_error_assert_ok (error); + + gboolean need_unbox = m_class_is_valuetype (res->klass) && !m_class_is_valuetype (virtual_method->klass); + + InterpMethod *imethod = mono_interp_get_imethod (res); + return imethod_to_ftnptr (imethod, need_unbox); +} + /* * If CLAUSE_ARGS is non-null, start executing from it. * The ERROR argument is used to avoid declaring an error object for every interp frame, its not used @@ -7790,6 +7818,15 @@ MINT_IN_CASE(MINT_BRTRUE_I8_SP) ZEROP_SP(gint64, !=); MINT_IN_BREAK; ip += 3; MINT_IN_BREAK; } + MINT_IN_CASE(MINT_LDVIRTFTN_DELEGATE) { + gpointer arg = LOCAL_VAR (ip [2], gpointer); + MonoDelegate *del = LOCAL_VAR (ip [3], MonoDelegate*); + NULL_CHECK (arg); + + LOCAL_VAR (ip [1], gpointer) = interp_ldvirtftn_delegate (arg, del); + ip += 4; + MINT_IN_BREAK; + } #define MATH_UNOP(mathfunc) \ LOCAL_VAR (ip [1], double) = mathfunc (LOCAL_VAR (ip [2], double)); \ diff --git a/src/mono/mono/mini/interp/mintops.def b/src/mono/mono/mini/interp/mintops.def index 11e65fb97ade69..bcd6dde1605fab 100644 --- a/src/mono/mono/mini/interp/mintops.def +++ b/src/mono/mono/mini/interp/mintops.def @@ -728,6 +728,7 @@ OPDEF(MINT_SDB_INTR_LOC, "sdb_intr_loc", 1, 0, 0, MintOpNoArgs) OPDEF(MINT_SDB_SEQ_POINT, "sdb_seq_point", 1, 0, 0, MintOpNoArgs) OPDEF(MINT_SDB_BREAKPOINT, "sdb_breakpoint", 1, 0, 0, MintOpNoArgs) OPDEF(MINT_LD_DELEGATE_METHOD_PTR, "ld_delegate_method_ptr", 3, 1, 1, MintOpNoArgs) +OPDEF(MINT_LDVIRTFTN_DELEGATE, "ldvirtftn_delegate", 4, 1, 2, MintOpNoArgs) // Math intrinsics // double diff --git a/src/mono/mono/mini/interp/transform.c b/src/mono/mono/mini/interp/transform.c index 4b1865b8310b53..a74e9baafb300b 100644 --- a/src/mono/mono/mini/interp/transform.c +++ b/src/mono/mono/mini/interp/transform.c @@ -8011,6 +8011,16 @@ generate_code (TransformData *td, MonoMethod *method, MonoMethodHeader *header, push_simple_type (td, STACK_TYPE_I); interp_ins_set_dreg (td->last_ins, td->sp [-1].var); break; + case CEE_MONO_LDVIRTFTN_DELEGATE: + CHECK_STACK (td, 2); + td->sp -= 2; + td->ip += 1; + interp_add_ins (td, MINT_LDVIRTFTN_DELEGATE); + interp_ins_set_sregs2 (td->last_ins, td->sp [0].var, td->sp [1].var); + push_simple_type (td, STACK_TYPE_I); + interp_ins_set_dreg (td->last_ins, td->sp [-1].var); + break; + case CEE_MONO_CALLI_EXTRA_ARG: { int saved_local = td->sp [-1].var; /* Same as CEE_CALLI, except that we drop the extra arg required for llvm specific behaviour */ diff --git a/src/mono/mono/mini/method-to-ir.c b/src/mono/mono/mini/method-to-ir.c index d9432fd5510de5..97985da7324980 100644 --- a/src/mono/mono/mini/method-to-ir.c +++ b/src/mono/mono/mini/method-to-ir.c @@ -5757,8 +5757,11 @@ check_get_virtual_method_assumptions (MonoClass* klass, MonoMethod* method) * Returns null, if the optimization cannot be performed. */ static MonoMethod* -try_prepare_objaddr_callvirt_optimization (MonoCompile *cfg, guchar *next_ip, guchar* end, MonoMethod *method, MonoGenericContext* generic_context, MonoClass *klass) +try_prepare_objaddr_callvirt_optimization (MonoCompile *cfg, guchar *next_ip, guchar* end, MonoMethod *method, MonoGenericContext* generic_context, MonoType *param_type) { + g_assert(param_type); + MonoClass *klass = mono_class_from_mono_type_internal (param_type); + // TODO: relax the _is_def requirement? if (cfg->compile_aot || cfg->compile_llvm || !klass || !mono_class_is_def (klass)) return NULL; @@ -6260,6 +6263,9 @@ method_make_alwaysthrow_typeloadfailure (MonoCompile* cfg, MonoClass* klass) mono_link_bblock (cfg, bb, cfg->bb_exit); cfg->disable_inline = TRUE; + + for (guint i = 0; i < cfg->header->num_clauses; i++) + cfg->clause_is_dead [i] = TRUE; } typedef union _MonoOpcodeParameter { @@ -7256,7 +7262,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b } *sp++ = ins; /*if (!m_method_is_icall (method)) */{ - MonoMethod* callvirt_target = try_prepare_objaddr_callvirt_optimization (cfg, next_ip, end, method, generic_context, param_types [n]->data.klass); + MonoMethod* callvirt_target = try_prepare_objaddr_callvirt_optimization (cfg, next_ip, end, method, generic_context, param_types [n]); if (callvirt_target) cmethod_override = callvirt_target; } @@ -10137,6 +10143,8 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b EMIT_NEW_PCONST (cfg, *sp, NULL); sp++; } else if (il_op == MONO_CEE_LDFLD || il_op == MONO_CEE_LDSFLD) { + // method_make_alwaysthrow_typeloadfailure currently doesn't work with inlining + INLINE_FAILURE("type load error"); // An object is expected here. It may be impossible to correctly infer its type, // we turn this entire method into a throw. method_make_alwaysthrow_typeloadfailure (cfg, klass); @@ -11589,6 +11597,14 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b *sp++ = ins; break; } + case MONO_CEE_MONO_LDVIRTFTN_DELEGATE: { + CHECK_STACK (2); + sp -= 2; + + ins = mono_emit_jit_icall (cfg, mono_get_addr_compiled_method, sp); + *sp++ = ins; + break; + } case MONO_CEE_MONO_CALLI_EXTRA_ARG: { MonoInst *addr; MonoInst *arg; @@ -12109,13 +12125,12 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b break; case MONO_CEE_INITOBJ: klass = mini_get_class (method, token, generic_context); + --sp; if (CLASS_HAS_FAILURE (klass)) { HANDLE_TYPELOAD_ERROR (cfg, klass); inline_costs += 10; break; // reached only in AOT } - - --sp; if (mini_class_is_reference (klass)) MONO_EMIT_NEW_STORE_MEMBASE_IMM (cfg, OP_STORE_MEMBASE_IMM, sp [0]->dreg, 0, 0); diff --git a/src/mono/mono/mini/mini-llvm.c b/src/mono/mono/mini/mini-llvm.c index 29c8af40b4153d..8cc8c986381b52 100644 --- a/src/mono/mono/mini/mini-llvm.c +++ b/src/mono/mono/mini/mini-llvm.c @@ -8433,7 +8433,21 @@ MONO_RESTORE_WARNING LLVMValueRef dest; dest = convert (ctx, LLVMBuildAdd (builder, convert (ctx, values [ins->inst_destbasereg], IntPtrType ()), LLVMConstInt (IntPtrType (), ins->inst_offset, FALSE), ""), pointer_type (t)); - mono_llvm_build_aligned_store (builder, lhs, dest, FALSE, 1); + if (mono_class_value_size (ins->klass, NULL) == 12) { + const int mask_values [] = { 0, 1, 2 }; + + LLVMValueRef truncatedVec3 = LLVMBuildShuffleVector ( + builder, + lhs, + LLVMGetUndef (t), + create_const_vector_i32 (mask_values, 3), + "truncated_vec3" + ); + + mono_llvm_build_aligned_store (builder, truncatedVec3, dest, FALSE, 1); + } else { + mono_llvm_build_aligned_store (builder, lhs, dest, FALSE, 1); + } break; } case OP_XBINOP: diff --git a/src/mono/mono/mini/mini-posix.c b/src/mono/mono/mini/mini-posix.c index 429d1dc3744f39..fd8b480e5362dc 100644 --- a/src/mono/mono/mini/mini-posix.c +++ b/src/mono/mono/mini/mini-posix.c @@ -188,7 +188,7 @@ save_old_signal_handler (int signo, struct sigaction *old_action) * * Call the original signal handler for the signal given by the arguments, which * should be the same as for a signal handler. Returns TRUE if the original handler - * was called, false otherwise. + * was called, false otherwise. NOTE: sigaction.sa_handler == SIG_DFL handlers are not considered. */ gboolean MONO_SIG_HANDLER_SIGNATURE (mono_chain_signal) @@ -196,6 +196,7 @@ MONO_SIG_HANDLER_SIGNATURE (mono_chain_signal) int signal = MONO_SIG_HANDLER_GET_SIGNO (); struct sigaction *saved_handler = (struct sigaction *)get_saved_signal_handler (signal); + // Ignores chaining to default signal handlers i.e. when saved_handler->sa_handler == SIG_DFL if (saved_handler && saved_handler->sa_handler) { if (!(saved_handler->sa_flags & SA_SIGINFO)) { saved_handler->sa_handler (signal); @@ -209,6 +210,27 @@ MONO_SIG_HANDLER_SIGNATURE (mono_chain_signal) return FALSE; } + +/* + * mono_chain_signal_to_default_sigsegv_handler: + * + * Call the original SIGSEGV signal handler in cases when the original handler is + * sigaction.sa_handler == SIG_DFL. This is used to propagate the crash to the OS. + */ +void +mono_chain_signal_to_default_sigsegv_handler (void) +{ + struct sigaction *saved_handler = (struct sigaction *)get_saved_signal_handler (SIGSEGV); + + if (saved_handler && saved_handler->sa_handler == SIG_DFL) { + sigaction (SIGSEGV, saved_handler, NULL); + raise (SIGSEGV); + } else { + g_async_safe_printf ("\nFailed to chain SIGSEGV signal to the default handler.\n"); + } +} + + MONO_SIG_HANDLER_FUNC (static, sigabrt_signal_handler) { MonoJitInfo *ji = NULL; @@ -348,8 +370,14 @@ add_signal_handler (int signo, MonoSignalHandler handler, int flags) /* if there was already a handler in place for this signal, store it */ if (! (previous_sa.sa_flags & SA_SIGINFO) && - (SIG_DFL == previous_sa.sa_handler)) { - /* it there is no sa_sigaction function and the sa_handler is default, we can safely ignore this */ + (SIG_DFL == previous_sa.sa_handler) && signo != SIGSEGV) { + /* + * If there is no sa_sigaction function and the sa_handler is default, + * it means the currently registered handler for this signal is the default one. + * For signal chaining, we need to store the default SIGSEGV handler so that the crash + * is properly propagated, while default handlers for other signals are ignored and + * are not considered. + */ } else { if (mono_do_signal_chaining) save_old_signal_handler (signo, &previous_sa); diff --git a/src/mono/mono/mini/mini-runtime.c b/src/mono/mono/mini/mini-runtime.c index f431897becd001..bcd7754da660a6 100644 --- a/src/mono/mono/mini/mini-runtime.c +++ b/src/mono/mono/mini/mini-runtime.c @@ -3908,7 +3908,8 @@ MONO_SIG_HANDLER_FUNC (, mono_sigsegv_signal_handler) mono_handle_native_crash (mono_get_signame (SIGSEGV), &mctx, (MONO_SIG_HANDLER_INFO_TYPE*)info); if (mono_do_crash_chaining) { - mono_chain_signal (MONO_SIG_HANDLER_PARAMS); + if (!mono_chain_signal (MONO_SIG_HANDLER_PARAMS)) + mono_chain_signal_to_default_sigsegv_handler (); return; } } @@ -3918,7 +3919,8 @@ MONO_SIG_HANDLER_FUNC (, mono_sigsegv_signal_handler) } else { mono_handle_native_crash (mono_get_signame (SIGSEGV), &mctx, (MONO_SIG_HANDLER_INFO_TYPE*)info); if (mono_do_crash_chaining) { - mono_chain_signal (MONO_SIG_HANDLER_PARAMS); + if (!mono_chain_signal (MONO_SIG_HANDLER_PARAMS)) + mono_chain_signal_to_default_sigsegv_handler (); return; } } diff --git a/src/mono/mono/mini/mini-runtime.h b/src/mono/mono/mini/mini-runtime.h index 5104a053b30c77..7779909bd944e2 100644 --- a/src/mono/mono/mini/mini-runtime.h +++ b/src/mono/mono/mini/mini-runtime.h @@ -678,6 +678,7 @@ void MONO_SIG_HANDLER_SIGNATURE (mono_sigsegv_signal_handler); void MONO_SIG_HANDLER_SIGNATURE (mono_sigint_signal_handler) ; void MONO_SIG_HANDLER_SIGNATURE (mono_sigterm_signal_handler) ; gboolean MONO_SIG_HANDLER_SIGNATURE (mono_chain_signal); +void mono_chain_signal_to_default_sigsegv_handler (void); #if defined (HOST_WASM) diff --git a/src/mono/mono/mini/mini-wasm.c b/src/mono/mono/mini/mini-wasm.c index 2a210e4af6e015..a0587570fe2bdf 100644 --- a/src/mono/mono/mini/mini-wasm.c +++ b/src/mono/mono/mini/mini-wasm.c @@ -587,6 +587,12 @@ MONO_SIG_HANDLER_SIGNATURE (mono_chain_signal) return FALSE; } +void +mono_chain_signal_to_default_sigsegv_handler (void) +{ + g_error ("mono_chain_signal_to_default_sigsegv_handler not supported on WASM"); +} + gboolean mono_thread_state_init_from_handle (MonoThreadUnwindState *tctx, MonoThreadInfo *info, void *sigctx) { diff --git a/src/mono/mono/mini/mini-windows.c b/src/mono/mono/mini/mini-windows.c index 322488abdaab76..cb79586c98a5ee 100644 --- a/src/mono/mono/mini/mini-windows.c +++ b/src/mono/mono/mini/mini-windows.c @@ -252,6 +252,12 @@ MONO_SIG_HANDLER_SIGNATURE (mono_chain_signal) return TRUE; } +void +mono_chain_signal_to_default_sigsegv_handler (void) +{ + g_error ("mono_chain_signal_to_default_sigsegv_handler not supported on Windows"); +} + #if !HAVE_EXTERN_DEFINED_NATIVE_CRASH_HANDLER #ifndef MONO_CROSS_COMPILE void diff --git a/src/mono/mono/sgen/sgen-cardtable.c b/src/mono/mono/sgen/sgen-cardtable.c index 6a662fb605019f..e344ec15fe228f 100644 --- a/src/mono/mono/sgen/sgen-cardtable.c +++ b/src/mono/mono/sgen/sgen-cardtable.c @@ -165,6 +165,31 @@ sgen_card_table_wbarrier_range_copy (gpointer _dest, gconstpointer _src, int siz } } +// Marks more cards so that it works with remset consistency debug checks +static void +sgen_card_table_wbarrier_range_copy_debug (gpointer _dest, gconstpointer _src, int size) +{ + GCObject **dest = (GCObject **)_dest; + GCObject **src = (GCObject **)_src; + + size_t nursery_bits = sgen_nursery_bits; + char *start = sgen_nursery_start; + G_GNUC_UNUSED char *end = sgen_nursery_end; + + while (size) { + GCObject *value = *src; + *dest = value; + if (SGEN_PTR_IN_NURSERY (value, nursery_bits, start, end) || sgen_concurrent_collection_in_progress) { + volatile guint8 *card_address = (volatile guint8 *)sgen_card_table_get_card_address ((mword)dest); + *card_address = 1; + sgen_dummy_use (value); + } + ++src; + ++dest; + size -= SIZEOF_VOID_P; + } +} + MONO_RESTORE_WARNING #ifdef SGEN_HAVE_OVERLAPPING_CARDS @@ -606,7 +631,7 @@ sgen_cardtable_scan_object (GCObject *obj, mword block_obj_size, guint8 *cards, } void -sgen_card_table_init (SgenRememberedSet *remset) +sgen_card_table_init (SgenRememberedSet *remset, gboolean consistency_checks) { sgen_cardtable = (guint8 *)sgen_alloc_os_memory (CARD_COUNT_IN_BYTES, (SgenAllocFlags)(SGEN_ALLOC_INTERNAL | SGEN_ALLOC_ACTIVATE), "card table", MONO_MEM_ACCOUNT_SGEN_CARD_TABLE); @@ -637,7 +662,10 @@ sgen_card_table_init (SgenRememberedSet *remset) remset->find_address = sgen_card_table_find_address; remset->find_address_with_cards = sgen_card_table_find_address_with_cards; - remset->wbarrier_range_copy = sgen_card_table_wbarrier_range_copy; + if (consistency_checks) + remset->wbarrier_range_copy = sgen_card_table_wbarrier_range_copy_debug; + else + remset->wbarrier_range_copy = sgen_card_table_wbarrier_range_copy; need_mod_union = sgen_get_major_collector ()->is_concurrent; } diff --git a/src/mono/mono/sgen/sgen-cardtable.h b/src/mono/mono/sgen/sgen-cardtable.h index 1ea3055fce085d..e07bc2cf5c0348 100644 --- a/src/mono/mono/sgen/sgen-cardtable.h +++ b/src/mono/mono/sgen/sgen-cardtable.h @@ -30,7 +30,7 @@ void sgen_card_table_preclean_mod_union (guint8 *cards, guint8 *cards_preclean, guint8* sgen_get_card_table_configuration (int *shift_bits, gpointer *mask); guint8* sgen_get_target_card_table_configuration (int *shift_bits, target_mgreg_t *mask); -void sgen_card_table_init (SgenRememberedSet *remset); +void sgen_card_table_init (SgenRememberedSet *remset, gboolean consistency_checks); /*How many bytes a single card covers*/ #define CARD_BITS 9 diff --git a/src/mono/mono/sgen/sgen-gc.c b/src/mono/mono/sgen/sgen-gc.c index 705b8168ed36f3..8ca983771ed790 100644 --- a/src/mono/mono/sgen/sgen-gc.c +++ b/src/mono/mono/sgen/sgen-gc.c @@ -3909,7 +3909,7 @@ sgen_gc_init (void) memset (&remset, 0, sizeof (remset)); - sgen_card_table_init (&remset); + sgen_card_table_init (&remset, remset_consistency_checks); sgen_register_root (NULL, 0, sgen_make_user_root_descriptor (sgen_mark_normal_gc_handles), ROOT_TYPE_NORMAL, MONO_ROOT_SOURCE_GC_HANDLE, GINT_TO_POINTER (ROOT_TYPE_NORMAL), "GC Handles (SGen, Normal)"); diff --git a/src/mono/msbuild/android/build/AndroidBuild.targets b/src/mono/msbuild/android/build/AndroidBuild.targets index 917aed88506697..7a6c5ebd687c34 100644 --- a/src/mono/msbuild/android/build/AndroidBuild.targets +++ b/src/mono/msbuild/android/build/AndroidBuild.targets @@ -112,12 +112,21 @@ <_AotOutputType>ObjectFile - - - - - + + <_Triple Condition="'$(TargetArchitecture)' == 'arm'">armv7-linux-gnueabi + <_Triple Condition="'$(TargetArchitecture)' == 'arm64'">aarch64-linux-android + <_Triple Condition="'$(TargetArchitecture)' == 'x86'">i686-linux-android + <_Triple Condition="'$(TargetArchitecture)' == 'x64'">x86_64-linux-android + + + + <_AsOptions>-target $(_Triple) -c -x assembler + <_LdName>clang + <_LdOptions>-fuse-ld=lld + <_AsName>clang + + @@ -141,19 +150,6 @@ 21 - - - - - - - - - <_AsPrefixPath>$([MSBuild]::EnsureTrailingSlash('$(_AsPrefixPath)')) <_ToolPrefixPath>$([MSBuild]::EnsureTrailingSlash('$(_ToolPrefixPath)')) @@ -221,20 +217,23 @@ diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest/WorkloadManifest.Wasi.targets.in b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest/WorkloadManifest.Wasi.targets.in index e0b7323d6bcee2..07477c653a68a2 100644 --- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest/WorkloadManifest.Wasi.targets.in +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest/WorkloadManifest.Wasi.targets.in @@ -9,4 +9,8 @@ $(WasiNativeWorkloadAvailable) + + + + diff --git a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net8.Manifest/WorkloadManifest.json.in b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net8.Manifest/WorkloadManifest.json.in index 5fd792e7048ab4..3c3e63c3ae584c 100644 --- a/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net8.Manifest/WorkloadManifest.json.in +++ b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.net8.Manifest/WorkloadManifest.json.in @@ -277,7 +277,7 @@ "kind": "framework", "version": "${PackageVersionNet8}", "alias-to": { - "any": "Microsoft.NETCore.App.Runtime.Mono.osx-arm64" + "any": "Microsoft.NETCore.App.Runtime.osx-arm64" } }, "Microsoft.NETCore.App.Runtime.net8.osx-x64": { @@ -312,8 +312,8 @@ "kind": "Sdk", "version": "${PackageVersionNet8}", "alias-to": { - "osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-arm64.Cross.tvos-arm64", - "osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.tvos-arm64" + "osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.tvos-arm64", + "osx-arm64": "Microsoft.NETCore.App.Runtime.AOT.osx-arm64.Cross.tvos-arm64" } }, "Microsoft.NETCore.App.Runtime.Mono.net8.tvos-arm64" : { diff --git a/src/mono/sample/Android/AndroidSampleApp.csproj b/src/mono/sample/Android/AndroidSampleApp.csproj index 7fb665824e5bea..573b44ee710530 100644 --- a/src/mono/sample/Android/AndroidSampleApp.csproj +++ b/src/mono/sample/Android/AndroidSampleApp.csproj @@ -69,36 +69,40 @@ 21 - - - - - - - - - <_AsPrefixPath>$([MSBuild]::EnsureTrailingSlash('$(_AsPrefixPath)')) <_ToolPrefixPath>$([MSBuild]::EnsureTrailingSlash('$(_ToolPrefixPath)')) + + <_Triple Condition="'$(TargetArchitecture)' == 'arm'">armv7-linux-gnueabi + <_Triple Condition="'$(TargetArchitecture)' == 'arm64'">aarch64-linux-android + <_Triple Condition="'$(TargetArchitecture)' == 'x86'">i686-linux-android + <_Triple Condition="'$(TargetArchitecture)' == 'x64'">x86_64-linux-android + + + + <_AsOptions>-target $(_Triple) -c -x assembler + <_LdName>clang + <_LdOptions>-fuse-ld=lld + <_AsName>clang + + diff --git a/src/mono/wasi/Wasi.Build.Tests/Directory.Build.props b/src/mono/wasi/Wasi.Build.Tests/Directory.Build.props index 8da854c6d3fc2f..3b1ab8aa84060b 100644 --- a/src/mono/wasi/Wasi.Build.Tests/Directory.Build.props +++ b/src/mono/wasi/Wasi.Build.Tests/Directory.Build.props @@ -20,5 +20,7 @@ $(OutputRID) true true + + false diff --git a/src/mono/wasi/Wasi.Build.Tests/Wasi.Build.Tests.csproj b/src/mono/wasi/Wasi.Build.Tests/Wasi.Build.Tests.csproj index f316261c14cdbe..17971c992ab785 100644 --- a/src/mono/wasi/Wasi.Build.Tests/Wasi.Build.Tests.csproj +++ b/src/mono/wasi/Wasi.Build.Tests/Wasi.Build.Tests.csproj @@ -95,10 +95,16 @@ + + + <_RuntimePackCurrentVersion Condition="'$(StabilizePackageVersion)' == 'true'">$(ProductVersion) + <_RuntimePackCurrentVersion Condition="'$(StabilizePackageVersion)' != 'true'">$(PackageVersion) + - <_RuntimePackVersions Include="$(PackageVersion)" EnvVarName="RUNTIME_PACK_VER9" /> + <_RuntimePackVersions Include="$(_RuntimePackCurrentVersion)" EnvVarName="RUNTIME_PACK_VER9" /> + <_RuntimePackVersions Include="$(PackageVersionNet8)" EnvVarName="RUNTIME_PACK_VER8" Condition="'$(PackageVersionNet8)' != ''" /> - <_RuntimePackVersions Include="$(PackageVersion)" EnvVarName="RUNTIME_PACK_VER8" Condition="'$(PackageVersionNet8)' == ''" /> + <_RuntimePackVersions Include="$(_RuntimePackCurrentVersion)" EnvVarName="RUNTIME_PACK_VER8" Condition="'$(PackageVersionNet8)' == ''" /> diff --git a/src/mono/wasm/Wasm.Build.Tests/Blazor/MiscTests.cs b/src/mono/wasm/Wasm.Build.Tests/Blazor/MiscTests.cs index 25bd5c7f4d06bf..c93ec2c6af452f 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Blazor/MiscTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Blazor/MiscTests.cs @@ -22,7 +22,6 @@ public MiscTests(ITestOutputHelper output, SharedBuildPerTestClassFixture buildC [InlineData("Debug", false)] [InlineData("Release", true)] [InlineData("Release", false)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/103566")] public void NativeBuild_WithDeployOnBuild_UsedByVS(string config, bool nativeRelink) { string id = $"blz_deploy_on_build_{config}_{nativeRelink}_{GetRandomId()}"; diff --git a/src/mono/wasm/Wasm.Build.Tests/BuildTestBase.cs b/src/mono/wasm/Wasm.Build.Tests/BuildTestBase.cs index 3dc64bc556d538..cccc44efb621ee 100644 --- a/src/mono/wasm/Wasm.Build.Tests/BuildTestBase.cs +++ b/src/mono/wasm/Wasm.Build.Tests/BuildTestBase.cs @@ -605,8 +605,8 @@ internal BuildPaths GetBuildPaths(BuildArgs buildArgs, bool forPublish = true) } protected static string GetSkiaSharpReferenceItems() - => @" - + => @" + "; protected static string s_mainReturns42 = @" diff --git a/src/mono/wasm/Wasm.Build.Tests/ConfigSrcTests.cs b/src/mono/wasm/Wasm.Build.Tests/ConfigSrcTests.cs index 329ecbe0b49ca7..6c525fa4eab22c 100644 --- a/src/mono/wasm/Wasm.Build.Tests/ConfigSrcTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/ConfigSrcTests.cs @@ -16,7 +16,7 @@ public ConfigSrcTests(ITestOutputHelper output, SharedBuildPerTestClassFixture b // NOTE: port number determinizes dynamically, so could not generate absolute URI [Theory] - [BuildAndRun(host: RunHost.V8 | RunHost.NodeJS)] + [BuildAndRun(host: RunHost.V8)] public void ConfigSrcAbsolutePath(BuildArgs buildArgs, RunHost host, string id) { buildArgs = buildArgs with { ProjectName = $"configsrcabsolute_{buildArgs.Config}_{buildArgs.AOT}" }; diff --git a/src/mono/wasm/Wasm.Build.Tests/Directory.Build.props b/src/mono/wasm/Wasm.Build.Tests/Directory.Build.props index 7bc1738eb86741..ef6e8c386526c2 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Directory.Build.props +++ b/src/mono/wasm/Wasm.Build.Tests/Directory.Build.props @@ -19,5 +19,7 @@ $(OutputRID) true + + false diff --git a/src/mono/wasm/Wasm.Build.Tests/HostRunner/NodeJSHostRunner.cs b/src/mono/wasm/Wasm.Build.Tests/HostRunner/NodeJSHostRunner.cs index 3f1bc819ba2a6e..cf311557c27f2e 100644 --- a/src/mono/wasm/Wasm.Build.Tests/HostRunner/NodeJSHostRunner.cs +++ b/src/mono/wasm/Wasm.Build.Tests/HostRunner/NodeJSHostRunner.cs @@ -8,8 +8,8 @@ namespace Wasm.Build.Tests; public class NodeJSHostRunner : IHostRunner { public string GetTestCommand() => "wasm test"; - public string GetXharnessArgsWindowsOS(XHarnessArgsOptions options) => $"--js-file={options.jsRelativePath} --engine=NodeJS -v trace --engine-arg=--experimental-wasm-simd --engine-arg=--experimental-wasm-eh"; - public string GetXharnessArgsOtherOS(XHarnessArgsOptions options) => $"--js-file={options.jsRelativePath} --engine=NodeJS -v trace --locale={options.environmentLocale} --engine-arg=--experimental-wasm-simd --engine-arg=--experimental-wasm-eh"; + public string GetXharnessArgsWindowsOS(XHarnessArgsOptions options) => $"--js-file={options.jsRelativePath} --engine=NodeJS -v trace"; + public string GetXharnessArgsOtherOS(XHarnessArgsOptions options) => $"--js-file={options.jsRelativePath} --engine=NodeJS -v trace --locale={options.environmentLocale}"; public bool UseWasmConsoleOutput() => true; public bool CanRunWBT() => true; } diff --git a/src/mono/wasm/Wasm.Build.Tests/NativeLibraryTests.cs b/src/mono/wasm/Wasm.Build.Tests/NativeLibraryTests.cs index 8444f54308d5b9..990d331f0c580c 100644 --- a/src/mono/wasm/Wasm.Build.Tests/NativeLibraryTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/NativeLibraryTests.cs @@ -50,8 +50,7 @@ public void ProjectWithNativeReference(BuildArgs buildArgs, RunHost host, string [Theory] [BuildAndRun(aot: false)] - [BuildAndRun(aot: true)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/103566")] + [BuildAndRun(aot: true, config: "Release")] public void ProjectUsingSkiaSharp(BuildArgs buildArgs, RunHost host, string id) { string projectName = $"AppUsingSkiaSharp"; diff --git a/src/mono/wasm/Wasm.Build.Tests/NonWasmTemplateBuildTests.cs b/src/mono/wasm/Wasm.Build.Tests/NonWasmTemplateBuildTests.cs index 4f86c39c3addf8..90ce88af865f72 100644 --- a/src/mono/wasm/Wasm.Build.Tests/NonWasmTemplateBuildTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/NonWasmTemplateBuildTests.cs @@ -67,9 +67,13 @@ public NonWasmTemplateBuildTests(ITestOutputHelper output, SharedBuildPerTestCla ) .MultiplyWithSingleArgs ( - "net6.0", - s_previousTargetFramework, - s_latestTargetFramework + EnvironmentVariables.WorkloadsTestPreviousVersions + ? [ + "net6.0", + s_previousTargetFramework, + s_latestTargetFramework + ] + : [s_latestTargetFramework] ) .UnwrapItemsAsArrays().ToList(); diff --git a/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj b/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj index 640dd40a88c172..1c5ff4506db0ee 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj +++ b/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj @@ -134,13 +134,18 @@ + + + <_RuntimePackCurrentVersion Condition="'$(StabilizePackageVersion)' == 'true'">$(ProductVersion) + <_RuntimePackCurrentVersion Condition="'$(StabilizePackageVersion)' != 'true'">$(PackageVersion) + - <_RuntimePackVersions Include="$(PackageVersion)" EnvVarName="RUNTIME_PACK_VER9" /> + <_RuntimePackVersions Include="$(_RuntimePackCurrentVersion)" EnvVarName="RUNTIME_PACK_VER9" /> <_RuntimePackVersions Include="$(PackageVersionNet8)" EnvVarName="RUNTIME_PACK_VER8" Condition="'$(PackageVersionNet8)' != ''" /> - <_RuntimePackVersions Include="$(PackageVersion)" EnvVarName="RUNTIME_PACK_VER8" Condition="'$(PackageVersionNet8)' == ''" /> + <_RuntimePackVersions Include="$(_RuntimePackCurrentVersion)" EnvVarName="RUNTIME_PACK_VER8" Condition="'$(PackageVersionNet8)' == ''" /> <_RuntimePackVersions Include="$(PackageVersionNet7)" EnvVarName="RUNTIME_PACK_VER7" Condition="'$(PackageVersionNet7)' != ''" /> - <_RuntimePackVersions Include="$(PackageVersion)" EnvVarName="RUNTIME_PACK_VER7" Condition="'$(PackageVersionNet7)' == ''" /> + <_RuntimePackVersions Include="$(_RuntimePackCurrentVersion)" EnvVarName="RUNTIME_PACK_VER7" Condition="'$(PackageVersionNet7)' == ''" /> <_RuntimePackVersions Include="$(PackageVersionNet6)" EnvVarName="RUNTIME_PACK_VER6" /> diff --git a/src/mono/wasm/Wasm.Build.Tests/WasmSIMDTests.cs b/src/mono/wasm/Wasm.Build.Tests/WasmSIMDTests.cs index 46fb36135d6f2a..e87ed3450fcd96 100644 --- a/src/mono/wasm/Wasm.Build.Tests/WasmSIMDTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/WasmSIMDTests.cs @@ -66,7 +66,6 @@ public void PublishWithSIMD_AOT(BuildArgs buildArgs, RunHost host, string id) DotnetWasmFromRuntimePack: false)); RunAndTestWasmApp(buildArgs, - extraXHarnessArgs: host == RunHost.NodeJS ? "--engine-arg=--experimental-wasm-simd --engine-arg=--experimental-wasm-eh" : "", expectedExitCode: 42, test: output => { diff --git a/src/mono/wasm/Wasm.Build.Tests/WasmTemplateTestBase.cs b/src/mono/wasm/Wasm.Build.Tests/WasmTemplateTestBase.cs index 9c923799221553..894097fed554b6 100644 --- a/src/mono/wasm/Wasm.Build.Tests/WasmTemplateTestBase.cs +++ b/src/mono/wasm/Wasm.Build.Tests/WasmTemplateTestBase.cs @@ -57,38 +57,11 @@ public string CreateWasmTemplateProject(string id, string template = "wasmbrowse if (runAnalyzers) extraProperties += "true"; - if (template == "wasmconsole") - { - UpdateRuntimeconfigTemplateForNode(_projectDir); - } - AddItemsPropertiesToProject(projectfile, extraProperties); return projectfile; } - private static void UpdateRuntimeconfigTemplateForNode(string projectDir) - { - // TODO: Can be removed once Node >= 20 - - string runtimeconfigTemplatePath = Path.Combine(projectDir, "runtimeconfig.template.json"); - string runtimeconfigTemplateContent = File.ReadAllText(runtimeconfigTemplatePath); - var runtimeconfigTemplate = JsonObject.Parse(runtimeconfigTemplateContent); - if (runtimeconfigTemplate == null) - throw new Exception($"Unable to parse runtimeconfigtemplate at '{runtimeconfigTemplatePath}'"); - - var perHostConfigs = runtimeconfigTemplate?["wasmHostProperties"]?["perHostConfig"]?.AsArray(); - if (perHostConfigs == null || perHostConfigs.Count == 0 || perHostConfigs[0] == null) - throw new Exception($"Unable to find perHostConfig in runtimeconfigtemplate at '{runtimeconfigTemplatePath}'"); - - perHostConfigs[0]!["host-args"] = new JsonArray( - "--experimental-wasm-simd", - "--experimental-wasm-eh" - ); - - File.WriteAllText(runtimeconfigTemplatePath, runtimeconfigTemplate!.ToString()); - } - public (string projectDir, string buildOutput) BuildTemplateProject(BuildArgs buildArgs, string id, BuildProjectOptions buildProjectOptions) diff --git a/src/native/corehost/hostfxr.h b/src/native/corehost/hostfxr.h index 0c316a59b1159f..f25eb609536543 100644 --- a/src/native/corehost/hostfxr.h +++ b/src/native/corehost/hostfxr.h @@ -1,12 +1,17 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -#ifndef __HOSTFXR_H__ -#define __HOSTFXR_H__ +#ifndef HAVE_HOSTFXR_H +#define HAVE_HOSTFXR_H #include #include +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + #if defined(_WIN32) #define HOSTFXR_CALLTYPE __cdecl #ifdef _WCHAR_T_DEFINED @@ -296,10 +301,6 @@ struct hostfxr_dotnet_environment_sdk_info const char_t* path; }; -typedef void(HOSTFXR_CALLTYPE* hostfxr_get_dotnet_environment_info_result_fn)( - const struct hostfxr_dotnet_environment_info* info, - void* result_context); - struct hostfxr_dotnet_environment_framework_info { size_t size; @@ -322,6 +323,10 @@ struct hostfxr_dotnet_environment_info const struct hostfxr_dotnet_environment_framework_info* frameworks; }; +typedef void(HOSTFXR_CALLTYPE* hostfxr_get_dotnet_environment_info_result_fn)( + const struct hostfxr_dotnet_environment_info* info, + void* result_context); + // // Returns available SDKs and frameworks. // @@ -384,7 +389,7 @@ struct hostfxr_resolve_frameworks_result }; typedef void (HOSTFXR_CALLTYPE* hostfxr_resolve_frameworks_result_fn)( - const hostfxr_resolve_frameworks_result* result, + const struct hostfxr_resolve_frameworks_result* result, void* result_context); // @@ -411,8 +416,12 @@ typedef void (HOSTFXR_CALLTYPE* hostfxr_resolve_frameworks_result_fn)( // typedef int32_t(HOSTFXR_CALLTYPE* hostfxr_resolve_frameworks_for_runtime_config_fn)( const char_t* runtime_config_path, - /*opt*/ const hostfxr_initialize_parameters* parameters, + /*opt*/ const struct hostfxr_initialize_parameters* parameters, /*opt*/ hostfxr_resolve_frameworks_result_fn callback, /*opt*/ void* result_context); -#endif //__HOSTFXR_H__ +#ifdef __cplusplus +} +#endif // __cplusplus + +#endif // HAVE_HOSTFXR_H diff --git a/src/native/corehost/hostmisc/pal.windows.cpp b/src/native/corehost/hostmisc/pal.windows.cpp index 3a3db968b5bde4..3479c72aced1de 100644 --- a/src/native/corehost/hostmisc/pal.windows.cpp +++ b/src/native/corehost/hostmisc/pal.windows.cpp @@ -884,8 +884,12 @@ bool pal::realpath(pal::string_t* path, bool skip_error_logging) } } - // Remove the \\?\ prefix, unless it is necessary or was already there - if (LongFile::IsExtended(str) && !LongFile::IsExtended(*path) && + // Remove the UNC extended prefix (\\?\UNC\) or extended prefix (\\?\) unless it is necessary or was already there + if (LongFile::IsUNCExtended(str) && !LongFile::IsUNCExtended(*path) && str.length() < MAX_PATH) + { + str.replace(0, LongFile::UNCExtendedPathPrefix.size(), LongFile::UNCPathPrefix); + } + else if (LongFile::IsExtended(str) && !LongFile::IsExtended(*path) && !LongFile::ShouldNormalize(str.substr(LongFile::ExtendedPrefix.size()))) { str.erase(0, LongFile::ExtendedPrefix.size()); diff --git a/src/native/corehost/test/mockhostfxr/CMakeLists.txt b/src/native/corehost/test/mockhostfxr/CMakeLists.txt index 6820b27d84715c..95e57456f57f7a 100644 --- a/src/native/corehost/test/mockhostfxr/CMakeLists.txt +++ b/src/native/corehost/test/mockhostfxr/CMakeLists.txt @@ -1,8 +1,10 @@ # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. -add_library(mockhostfxr_2_2 SHARED mockhostfxr.cpp) -add_library(mockhostfxr_5_0 SHARED mockhostfxr.cpp) +set(MOCKHOSTFXR_SRC mockhostfxr.cpp test_c_api.c) + +add_library(mockhostfxr_2_2 SHARED ${MOCKHOSTFXR_SRC}) +add_library(mockhostfxr_5_0 SHARED ${MOCKHOSTFXR_SRC}) target_link_libraries(mockhostfxr_2_2 PRIVATE libhostcommon) target_link_libraries(mockhostfxr_5_0 PRIVATE libhostcommon) @@ -11,4 +13,4 @@ target_compile_definitions(mockhostfxr_2_2 PRIVATE MOCKHOSTFXR_2_2 EXPORT_SHARED target_compile_definitions(mockhostfxr_5_0 PRIVATE MOCKHOSTFXR_5_0 EXPORT_SHARED_API) install_with_stripped_symbols(mockhostfxr_2_2 TARGETS corehost_test) -install_with_stripped_symbols(mockhostfxr_5_0 TARGETS corehost_test) \ No newline at end of file +install_with_stripped_symbols(mockhostfxr_5_0 TARGETS corehost_test) diff --git a/src/native/corehost/test/mockhostfxr/mockhostfxr.cpp b/src/native/corehost/test/mockhostfxr/mockhostfxr.cpp index 46509a0f14d812..75de5a1c3f7e57 100644 --- a/src/native/corehost/test/mockhostfxr/mockhostfxr.cpp +++ b/src/native/corehost/test/mockhostfxr/mockhostfxr.cpp @@ -1,3 +1,6 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + #include "error_codes.h" #include "hostfxr.h" #include "host_startup_info.h" diff --git a/src/native/corehost/test/mockhostfxr/test_c_api.c b/src/native/corehost/test/mockhostfxr/test_c_api.c new file mode 100644 index 00000000000000..3cb130101c09b2 --- /dev/null +++ b/src/native/corehost/test/mockhostfxr/test_c_api.c @@ -0,0 +1,8 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +// hostfxr.h is a public API. When included in .c files, it may fail to compile +// if C++-specific syntax is used within the extern "C" block. Since all usage of +// this API in runtime repo are within C++ code, such breakages are not encountered +// during normal development or testing. +#include "hostfxr.h" diff --git a/src/native/libs/CMakeLists.txt b/src/native/libs/CMakeLists.txt index 23bdf3c26d37a4..59cc76cb46dbd6 100644 --- a/src/native/libs/CMakeLists.txt +++ b/src/native/libs/CMakeLists.txt @@ -123,10 +123,14 @@ if (CLR_CMAKE_TARGET_UNIX OR CLR_CMAKE_TARGET_BROWSER OR CLR_CMAKE_TARGET_WASI) add_compile_options(-Wno-empty-translation-unit) add_compile_options(-Wno-cast-align) add_compile_options(-Wno-typedef-redefinition) - add_compile_options(-Wno-c11-extensions) - add_compile_options(-Wno-pre-c11-compat) # fixes build on Debian - add_compile_options(-Wno-unknown-warning-option) # unknown warning option '-Wno-pre-c11-compat' add_compile_options(-Wno-thread-safety-analysis) + add_compile_options(-Wno-c11-extensions) + + check_c_compiler_flag(-Wpre-c11-compat COMPILER_SUPPORTS_W_PRE_C11_COMPAT) + if (COMPILER_SUPPORTS_W_PRE_C11_COMPAT) + add_compile_options(-Wno-pre-c11-compat) + endif() + if (CLR_CMAKE_TARGET_BROWSER OR CLR_CMAKE_TARGET_WASI) add_compile_options(-Wno-unsafe-buffer-usage) add_compile_options(-Wno-cast-function-type-strict) diff --git a/src/native/libs/System.Globalization.Native/pal_collation.m b/src/native/libs/System.Globalization.Native/pal_collation.m index ebe0db5c2c202a..56af941fb40033 100644 --- a/src/native/libs/System.Globalization.Native/pal_collation.m +++ b/src/native/libs/System.Globalization.Native/pal_collation.m @@ -117,6 +117,11 @@ int32_t GlobalizationNative_CompareStringNative(const uint16_t* localeName, int3 } } +/** + * Removes zero-width and other weightless characters such as U+200B (Zero Width Space), + * U+200C (Zero Width Non-Joiner), U+200D (Zero Width Joiner), U+FEFF (Zero Width No-Break Space), + * and the NUL character from the specified string. + */ static NSString* RemoveWeightlessCharacters(NSString* source) { NSError *error = nil; @@ -143,10 +148,9 @@ static int32_t IsIndexFound(int32_t fromBeginning, int32_t foundLocation, int32_ /* Function: IndexOf -Find detailed explanation how this function works in https://github.com/dotnet/runtime/blob/main/docs/design/features/globalization-hybrid-mode.md +Find detailed explanation how this function works in https://github.com/dotnet/runtime/blob/main/docs/design/features/globalization-hybrid-mode.md#string-indexing */ -Range GlobalizationNative_IndexOfNative(const uint16_t* localeName, int32_t lNameLength, const uint16_t* lpTarget, int32_t cwTargetLength, - const uint16_t* lpSource, int32_t cwSourceLength, int32_t comparisonOptions, int32_t fromBeginning) +Range GlobalizationNative_IndexOfNative(const uint16_t* localeName, int32_t lNameLength, const uint16_t* lpTarget, int32_t cwTargetLength, const uint16_t* lpSource, int32_t cwSourceLength, int32_t comparisonOptions, int32_t fromBeginning) { @autoreleasepool { @@ -158,6 +162,9 @@ Range GlobalizationNative_IndexOfNative(const uint16_t* localeName, int32_t lNam return result; } NSStringCompareOptions options = ConvertFromCompareOptionsToNSStringCompareOptions(comparisonOptions, true); + if (!fromBeginning) // LastIndexOf + options |= NSBackwardsSearch; + NSString *searchString = [NSString stringWithCharacters: lpTarget length: (NSUInteger)cwTargetLength]; NSString *searchStrCleaned = RemoveWeightlessCharacters(searchString); NSString *sourceString = [NSString stringWithCharacters: lpSource length: (NSUInteger)cwSourceLength]; @@ -168,7 +175,7 @@ Range GlobalizationNative_IndexOfNative(const uint16_t* localeName, int32_t lNam searchStrCleaned = ConvertToKatakana(searchStrCleaned); } - if (sourceStrCleaned.length == 0 || searchStrCleaned.length == 0) + if (searchStrCleaned.length == 0) { result.location = fromBeginning ? 0 : (int32_t)sourceString.length; return result; @@ -178,9 +185,6 @@ Range GlobalizationNative_IndexOfNative(const uint16_t* localeName, int32_t lNam NSString *searchStrPrecomposed = searchStrCleaned.precomposedStringWithCanonicalMapping; NSString *sourceStrPrecomposed = sourceStrCleaned.precomposedStringWithCanonicalMapping; - // last index - if (!fromBeginning) - options |= NSBackwardsSearch; // check if there is a possible match and return -1 if not // doesn't matter which normalization form is used here @@ -233,7 +237,7 @@ Range GlobalizationNative_IndexOfNative(const uint16_t* localeName, int32_t lNam result.location = (int32_t)precomposedRange.location; result.length = (int32_t)precomposedRange.length; if (!(comparisonOptions & IgnoreCase)) - return result; + return result; } // check if sourceString has decomposed form of characters and searchString has precomposed form of characters diff --git a/src/native/libs/System.Globalization.Native/pal_locale.m b/src/native/libs/System.Globalization.Native/pal_locale.m index 6d13c807bec95d..a26cc318f14613 100644 --- a/src/native/libs/System.Globalization.Native/pal_locale.m +++ b/src/native/libs/System.Globalization.Native/pal_locale.m @@ -786,13 +786,6 @@ int32_t GlobalizationNative_GetLocalesNative(UChar* value, int32_t length) } } -static NSString* GetBaseName(NSString *localeIdentifier) -{ - NSLocale *locale = [[NSLocale alloc] initWithLocaleIdentifier:localeIdentifier]; - NSString *languageCode = [locale objectForKey:NSLocaleLanguageCode]; - return languageCode; -} - const char* GlobalizationNative_GetDefaultLocaleNameNative(void) { @autoreleasepool @@ -800,7 +793,7 @@ int32_t GlobalizationNative_GetLocalesNative(UChar* value, int32_t length) if (NSLocale.preferredLanguages.count > 0) { NSString *preferredLanguage = [NSLocale.preferredLanguages objectAtIndex:0]; - return strdup([GetBaseName(preferredLanguage) UTF8String]); + return strdup([preferredLanguage UTF8String]); } else { @@ -821,7 +814,7 @@ int32_t GlobalizationNative_GetLocalesNative(UChar* value, int32_t length) localeName = currentLocale.localeIdentifier; } - return strdup([GetBaseName(localeName) UTF8String]); + return strdup([localeName UTF8String]); } } } diff --git a/src/native/libs/System.Native/pal_networking.c b/src/native/libs/System.Native/pal_networking.c index dc727fe5465045..cae1285e7e74e4 100644 --- a/src/native/libs/System.Native/pal_networking.c +++ b/src/native/libs/System.Native/pal_networking.c @@ -1660,6 +1660,11 @@ int32_t SystemNative_Connect(intptr_t socket, uint8_t* socketAddress, int32_t so return err == 0 ? Error_SUCCESS : SystemNative_ConvertErrorPlatformToPal(errno); } +#if defined(__linux__) && !defined(TCP_FASTOPEN_CONNECT) +// fixup if compiled against old Kernel headers. +// Can be removed once we have at least 4.11 +#define TCP_FASTOPEN_CONNECT 30 +#endif int32_t SystemNative_Connectx(intptr_t socket, uint8_t* socketAddress, int32_t socketAddressLen, uint8_t* data, int32_t dataLen, int32_t tfo, int* sent) { if (socketAddress == NULL || socketAddressLen < 0 || sent == NULL) diff --git a/src/native/libs/System.Security.Cryptography.Native/opensslshim.h b/src/native/libs/System.Security.Cryptography.Native/opensslshim.h index b85316556c0aac..7dd78a5edfd08a 100644 --- a/src/native/libs/System.Security.Cryptography.Native/opensslshim.h +++ b/src/native/libs/System.Security.Cryptography.Native/opensslshim.h @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -690,6 +691,8 @@ extern bool g_libSslUses32BitTime; LIGHTUP_FUNCTION(SSL_verify_client_post_handshake) \ LIGHTUP_FUNCTION(SSL_set_post_handshake_auth) \ REQUIRED_FUNCTION(SSL_version) \ + REQUIRED_FUNCTION(UI_create_method) \ + REQUIRED_FUNCTION(UI_destroy_method) \ FALLBACK_FUNCTION(X509_check_host) \ REQUIRED_FUNCTION(X509_check_purpose) \ REQUIRED_FUNCTION(X509_cmp_time) \ @@ -1246,6 +1249,8 @@ extern TYPEOF(OPENSSL_gmtime)* OPENSSL_gmtime_ptr; #define SSL_set_post_handshake_auth SSL_set_post_handshake_auth_ptr #define SSL_version SSL_version_ptr #define TLS_method TLS_method_ptr +#define UI_create_method UI_create_method_ptr +#define UI_destroy_method UI_destroy_method_ptr #define X509_check_host X509_check_host_ptr #define X509_check_purpose X509_check_purpose_ptr #define X509_cmp_time X509_cmp_time_ptr diff --git a/src/native/libs/System.Security.Cryptography.Native/pal_evp_pkey.c b/src/native/libs/System.Security.Cryptography.Native/pal_evp_pkey.c index f80ef99c02515b..14b4f1eaa49ee6 100644 --- a/src/native/libs/System.Security.Cryptography.Native/pal_evp_pkey.c +++ b/src/native/libs/System.Security.Cryptography.Native/pal_evp_pkey.c @@ -556,6 +556,7 @@ static EVP_PKEY* LoadKeyFromEngine( *haveEngine = 1; EVP_PKEY* ret = NULL; ENGINE* engine = NULL; + UI_METHOD* ui = NULL; // Per https://github.com/openssl/openssl/discussions/21427 // using EVP_PKEY after freeing ENGINE is correct. @@ -567,12 +568,30 @@ static EVP_PKEY* LoadKeyFromEngine( { ret = load_func(engine, keyName, NULL, NULL); + if (ret == NULL) + { + // Some engines do not tolerate having NULL passed to the ui_method parameter. + // We re-try with a non-NULL UI_METHOD. + ERR_clear_error(); + ui = UI_create_method(".NET NULL UI"); + + if (ui) + { + ret = load_func(engine, keyName, ui, NULL); + } + } + ENGINE_finish(engine); } ENGINE_free(engine); } + if (ui) + { + UI_destroy_method(ui); + } + return ret; } diff --git a/src/tasks/AotCompilerTask/MonoAOTCompiler.cs b/src/tasks/AotCompilerTask/MonoAOTCompiler.cs index 89241ebdd85f46..7961b84a1595c3 100644 --- a/src/tasks/AotCompilerTask/MonoAOTCompiler.cs +++ b/src/tasks/AotCompilerTask/MonoAOTCompiler.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System; @@ -230,6 +230,16 @@ public class MonoAOTCompiler : Microsoft.Build.Utilities.Task /// public string? ToolPrefix { get; set; } + /// + /// Name of the assembler tool ran by the AOT compiler. + /// + public string? AsName { get; set; } + + /// + /// Passes as-options to the AOT compiler + /// + public string? AsOptions { get; set; } + /// /// Prepends a prefix to the name of the assembler (as) tool ran by the AOT compiler. /// @@ -277,6 +287,11 @@ public class MonoAOTCompiler : Microsoft.Build.Utilities.Task /// public string? LdFlags { get; set; } + /// + /// Passes ld-options to the AOT compiler + /// + public string? LdOptions { get; set; } + /// /// Specify WorkingDirectory for the AOT compiler /// @@ -741,6 +756,16 @@ private PrecompileArguments GetPrecompileArgumentsFor(ITaskItem assemblyItem, st aotArgs.Add($"tool-prefix={ToolPrefix}"); } + if (!string.IsNullOrEmpty(AsName)) + { + aotArgs.Add($"as-name={AsName}"); + } + + if (!string.IsNullOrEmpty(AsOptions)) + { + aotArgs.Add($"as-options={AsOptions}"); + } + if (!string.IsNullOrEmpty(AsPrefix)) { aotArgs.Add($"as-prefix={AsPrefix}"); @@ -956,6 +981,11 @@ private PrecompileArguments GetPrecompileArgumentsFor(ITaskItem assemblyItem, st aotArgs.Add($"ld-flags={LdFlags}"); } + if (!string.IsNullOrEmpty(LdOptions)) + { + aotArgs.Add($"ld-options={LdOptions}"); + } + // we need to quote the entire --aot arguments here to make sure it is parsed // on Windows as one argument. Otherwise it will be split up into multiple // values, which wont work. diff --git a/src/tasks/MobileBuildTasks/Android/Ndk/NdkTools.cs b/src/tasks/MobileBuildTasks/Android/Ndk/NdkTools.cs index 6370c49df85405..0741e92dfe8116 100644 --- a/src/tasks/MobileBuildTasks/Android/Ndk/NdkTools.cs +++ b/src/tasks/MobileBuildTasks/Android/Ndk/NdkTools.cs @@ -101,9 +101,9 @@ public string ClangPath private void ValidateRequiredProps(string hostOS) { - if (Ndk.NdkVersion.Main.Major != 23) + if (Ndk.NdkVersion.Main.Major != 27) { - throw new Exception($"NDK 23 is required. An unsupported NDK version was found ({Ndk.NdkVersion.Main.Major})."); + throw new Exception($"NDK 27 is required. An unsupported NDK version was found ({Ndk.NdkVersion.Main.Major})."); } try diff --git a/src/tests/Interop/COM/ComWrappers/API/Program.cs b/src/tests/Interop/COM/ComWrappers/API/Program.cs index 7ef5d29c0ab635..3ed01e8604ad3e 100644 --- a/src/tests/Interop/COM/ComWrappers/API/Program.cs +++ b/src/tests/Interop/COM/ComWrappers/API/Program.cs @@ -10,6 +10,7 @@ namespace ComWrappersTests using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.InteropServices.Marshalling; + using System.Threading; using ComWrappersTests.Common; using TestLibrary; @@ -962,6 +963,167 @@ public void ValidateAggregationWithReferenceTrackerObject() Assert.Equal(0, allocTracker.GetCount()); } + + [Fact] + public void ComWrappersNoLockAroundQueryInterface() + { + Console.WriteLine($"Running {nameof(ComWrappersNoLockAroundQueryInterface)}..."); + + var cw = new RecursiveSimpleComWrappers(); + + IntPtr comObject = cw.GetOrCreateComInterfaceForObject(new RecursiveCrossThreadQI(cw), CreateComInterfaceFlags.None); + try + { + _ = cw.GetOrCreateObjectForComInstance(comObject, CreateObjectFlags.TrackerObject); + } + finally + { + Marshal.Release(comObject); + } + } + + private class RecursiveCrossThreadQI(ComWrappers? wrappers) : ICustomQueryInterface + { + CustomQueryInterfaceResult ICustomQueryInterface.GetInterface(ref Guid iid, out IntPtr ppv) + { + ppv = IntPtr.Zero; + if (iid == ComWrappersHelper.IID_IReferenceTracker && wrappers is not null) + { + Console.WriteLine("Attempting to create a new COM object on a different thread."); + Thread thread = new Thread(() => + { + IntPtr comObject = wrappers.GetOrCreateComInterfaceForObject(new RecursiveCrossThreadQI(null), CreateComInterfaceFlags.None); + try + { + // Make sure that ComWrappers isn't locking in GetOrCreateObjectForComInstance + // around the QI call by calling it on a different thread from within a QI call to register a new managed wrapper + // for a COM object representing "this". + _ = wrappers.GetOrCreateObjectForComInstance(comObject, CreateObjectFlags.None); + } + finally + { + Marshal.Release(comObject); + } + }); + thread.Start(); + thread.Join(TimeSpan.FromSeconds(20)); // 20 seconds should be more than long enough for the thread to complete + } + + return CustomQueryInterfaceResult.Failed; + } + } + + private unsafe class RecursiveSimpleComWrappers : ComWrappers + { + protected override ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count) + { + count = 0; + return null; + } + + protected override object CreateObject(IntPtr externalComObject, CreateObjectFlags flags) + { + return new object(); + } + + protected override void ReleaseObjects(IEnumerable objects) + { + throw new NotImplementedException(); + } + } + + [Fact] + [PlatformSpecific(TestPlatforms.Windows)] // COM apartments are Windows-specific + public unsafe void CrossApartmentQueryInterface_NoDeadlock() + { + Console.WriteLine($"Running {nameof(CrossApartmentQueryInterface_NoDeadlock)}..."); + using ManualResetEvent hasAgileReference = new(false); + using ManualResetEvent testCompleted = new(false); + + IntPtr agileReference = IntPtr.Zero; + try + { + Thread staThread = new(() => + { + var cw = new RecursiveSimpleComWrappers(); + IntPtr comObject = cw.GetOrCreateComInterfaceForObject(new RecursiveQI(cw), CreateComInterfaceFlags.None); + try + { + Marshal.ThrowExceptionForHR(RoGetAgileReference(0, IUnknownVtbl.IID_IUnknown, comObject, out agileReference)); + } + finally + { + Marshal.Release(comObject); + } + hasAgileReference.Set(); + testCompleted.WaitOne(); + }); + staThread.SetApartmentState(ApartmentState.STA); + + Thread mtaThread = new(() => + { + hasAgileReference.WaitOne(); + IntPtr comObject; + int hr = ((delegate* unmanaged)(*(*(void***)agileReference + 3 /* IAgileReference.Resolve slot */)))(agileReference, IUnknownVtbl.IID_IUnknown, out comObject); + Marshal.ThrowExceptionForHR(hr); + try + { + var cw = new RecursiveSimpleComWrappers(); + // Make sure that ComWrappers isn't locking in GetOrCreateObjectForComInstance + // across the QI call + // by forcing marshalling across COM apartments. + _ = cw.GetOrCreateObjectForComInstance(comObject, CreateObjectFlags.TrackerObject); + } + finally + { + Marshal.Release(comObject); + } + testCompleted.Set(); + }); + mtaThread.SetApartmentState(ApartmentState.MTA); + + staThread.Start(); + mtaThread.Start(); + } + finally + { + if (agileReference != IntPtr.Zero) + { + Marshal.Release(agileReference); + } + } + + testCompleted.WaitOne(); + } + + [DllImport("ole32.dll")] + private static extern int RoGetAgileReference(int options, in Guid iid, IntPtr unknown, out IntPtr agileReference); + + private class RecursiveQI(ComWrappers? wrappers) : ICustomQueryInterface + { + CustomQueryInterfaceResult ICustomQueryInterface.GetInterface(ref Guid iid, out IntPtr ppv) + { + ppv = IntPtr.Zero; + if (wrappers is not null) + { + Console.WriteLine("Attempting to create a new COM object on the same thread."); + IntPtr comObject = wrappers.GetOrCreateComInterfaceForObject(new RecursiveQI(null), CreateComInterfaceFlags.None); + try + { + // Make sure that ComWrappers isn't locking in GetOrCreateObjectForComInstance + // around the QI call by calling it on a different thread from within a QI call to register a new managed wrapper + // for a COM object representing "this". + _ = wrappers.GetOrCreateObjectForComInstance(comObject, CreateObjectFlags.None); + } + finally + { + Marshal.Release(comObject); + } + } + + return CustomQueryInterfaceResult.Failed; + } + } } } diff --git a/src/tests/Interop/COM/ComWrappers/Common.cs b/src/tests/Interop/COM/ComWrappers/Common.cs index 96d21a349d69dc..dbcefa47ac175e 100644 --- a/src/tests/Interop/COM/ComWrappers/Common.cs +++ b/src/tests/Interop/COM/ComWrappers/Common.cs @@ -339,7 +339,7 @@ CustomQueryInterfaceResult ICustomQueryInterface.GetInterface(ref Guid iid, out class ComWrappersHelper { - private static Guid IID_IReferenceTracker = new Guid("11d3b13a-180e-4789-a8be-7712882893e6"); + public static readonly Guid IID_IReferenceTracker = new Guid("11d3b13a-180e-4789-a8be-7712882893e6"); [Flags] public enum ReleaseFlags diff --git a/src/tests/Interop/IDynamicInterfaceCastable/Program.cs b/src/tests/Interop/IDynamicInterfaceCastable/Program.cs index dc3e35d0d48129..ccf91480faaa3f 100644 --- a/src/tests/Interop/IDynamicInterfaceCastable/Program.cs +++ b/src/tests/Interop/IDynamicInterfaceCastable/Program.cs @@ -380,7 +380,6 @@ public static void ValidateBasicInterface() } [Fact] - [ActiveIssue("https://github.com/dotnet/runtimelab/issues/1442", typeof(TestLibrary.Utilities), nameof(TestLibrary.Utilities.IsNativeAot))] public static void ValidateGenericInterface() { Console.WriteLine($"Running {nameof(ValidateGenericInterface)}"); @@ -394,26 +393,38 @@ public static void ValidateGenericInterface() Console.WriteLine(" -- Validate cast"); // ITestGeneric -> ITestGenericIntImpl - Assert.True(castableObj is ITestGeneric, $"Should be castable to {nameof(ITestGeneric)} via is"); - Assert.NotNull(castableObj as ITestGeneric); + if (!TestLibrary.Utilities.IsNativeAot) // https://github.com/dotnet/runtime/issues/108229 + { + Assert.True(castableObj is ITestGeneric, $"Should be castable to {nameof(ITestGeneric)} via is"); + Assert.NotNull(castableObj as ITestGeneric); + } ITestGeneric testInt = (ITestGeneric)castableObj; // ITestGeneric -> ITestGenericImpl - Assert.True(castableObj is ITestGeneric, $"Should be castable to {nameof(ITestGeneric)} via is"); - Assert.NotNull(castableObj as ITestGeneric); + if (!TestLibrary.Utilities.IsNativeAot) // https://github.com/dotnet/runtime/issues/108229 + { + Assert.True(castableObj is ITestGeneric, $"Should be castable to {nameof(ITestGeneric)} via is"); + Assert.NotNull(castableObj as ITestGeneric); + } ITestGeneric testStr = (ITestGeneric)castableObj; // Validate Variance // ITestGeneric -> ITestGenericImpl - Assert.True(castableObj is ITestGeneric, $"Should be castable to {nameof(ITestGeneric)} via is"); - Assert.NotNull(castableObj as ITestGeneric); + if (!TestLibrary.Utilities.IsNativeAot) // https://github.com/dotnet/runtime/issues/108229 + { + Assert.True(castableObj is ITestGeneric, $"Should be castable to {nameof(ITestGeneric)} via is"); + Assert.NotNull(castableObj as ITestGeneric); + } ITestGeneric testVar = (ITestGeneric)castableObj; - // ITestGeneric is not recognized - Assert.False(castableObj is ITestGeneric, $"Should not be castable to {nameof(ITestGeneric)} via is"); - Assert.Null(castableObj as ITestGeneric); - var ex = Assert.Throws(() => { var _ = (ITestGeneric)castableObj; }); - Assert.Equal(string.Format(DynamicInterfaceCastableException.ErrorFormat, typeof(ITestGeneric)), ex.Message); + if (!TestLibrary.Utilities.IsNativeAot) // https://github.com/dotnet/runtime/issues/108229 + { + // ITestGeneric is not recognized + Assert.False(castableObj is ITestGeneric, $"Should not be castable to {nameof(ITestGeneric)} via is"); + Assert.Null(castableObj as ITestGeneric); + var ex = Assert.Throws(() => { var _ = (ITestGeneric)castableObj; }); + Assert.Equal(string.Format(DynamicInterfaceCastableException.ErrorFormat, typeof(ITestGeneric)), ex.Message); + } int expectedInt = 42; string expectedStr = "str"; @@ -423,13 +434,16 @@ public static void ValidateGenericInterface() Assert.Equal(expectedStr, testStr.ReturnArg(expectedStr)); Assert.Equal(expectedStr, testVar.ReturnArg(expectedStr)); - Console.WriteLine(" -- Validate generic method call"); - Assert.Equal(expectedInt * 2, testInt.DoubleGenericArg(42)); - Assert.Equal(expectedStr + expectedStr, testInt.DoubleGenericArg("str")); - Assert.Equal(expectedInt * 2, testStr.DoubleGenericArg(42)); - Assert.Equal(expectedStr + expectedStr, testStr.DoubleGenericArg("str")); - Assert.Equal(expectedInt * 2, testVar.DoubleGenericArg(42)); - Assert.Equal(expectedStr + expectedStr, testVar.DoubleGenericArg("str")); + if (!TestLibrary.Utilities.IsNativeAot) // https://github.com/dotnet/runtime/issues/108228 + { + Console.WriteLine(" -- Validate generic method call"); + Assert.Equal(expectedInt * 2, testInt.DoubleGenericArg(42)); + Assert.Equal(expectedStr + expectedStr, testInt.DoubleGenericArg("str")); + Assert.Equal(expectedInt * 2, testStr.DoubleGenericArg(42)); + Assert.Equal(expectedStr + expectedStr, testStr.DoubleGenericArg("str")); + Assert.Equal(expectedInt * 2, testVar.DoubleGenericArg(42)); + Assert.Equal(expectedStr + expectedStr, testVar.DoubleGenericArg("str")); + } Console.WriteLine(" -- Validate delegate call"); Func funcInt = new Func(testInt.ReturnArg); diff --git a/src/tests/Interop/IJW/IjwNativeCallingManagedDll/IjwNativeCallingManagedDll.cpp b/src/tests/Interop/IJW/IjwNativeCallingManagedDll/IjwNativeCallingManagedDll.cpp index 15e7098774db27..e581c7ae185e11 100644 --- a/src/tests/Interop/IJW/IjwNativeCallingManagedDll/IjwNativeCallingManagedDll.cpp +++ b/src/tests/Interop/IJW/IjwNativeCallingManagedDll/IjwNativeCallingManagedDll.cpp @@ -17,10 +17,22 @@ extern "C" DLL_EXPORT int __cdecl NativeEntryPoint() } #pragma managed + +// Needed to provide a regression case for https://github.com/dotnet/runtime/issues/110365 +[assembly:System::Diagnostics::DebuggableAttribute(true, true)]; +[module:System::Diagnostics::DebuggableAttribute(true, true)]; + +public value struct ValueToReturnStorage +{ + int valueToReturn; + bool valueSet; +}; + +// store the value to return in an appdomain local static variable to allow this test to be a regression test for https://github.com/dotnet/runtime/issues/110365 +static __declspec(appdomain) ValueToReturnStorage s_valueToReturnStorage; + public ref class TestClass { -private: - static int s_valueToReturn = 100; public: int ManagedEntryPoint() { @@ -29,12 +41,16 @@ public ref class TestClass static void ChangeReturnedValue(int i) { - s_valueToReturn = i; + s_valueToReturnStorage.valueToReturn = i; + s_valueToReturnStorage.valueSet = true; } static int GetReturnValue() { - return s_valueToReturn; + if (s_valueToReturnStorage.valueSet) + return s_valueToReturnStorage.valueToReturn; + else + return 100; } }; diff --git a/src/tests/JIT/Directed/tls/TestTLSWithLoadedDlls.csproj b/src/tests/JIT/Directed/tls/TestTLSWithLoadedDlls.csproj index c17a210af0c9de..ac1a042106e22d 100644 --- a/src/tests/JIT/Directed/tls/TestTLSWithLoadedDlls.csproj +++ b/src/tests/JIT/Directed/tls/TestTLSWithLoadedDlls.csproj @@ -4,6 +4,8 @@ true false true + + true PdbOnly diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_108969/Runtime_108969.cs b/src/tests/JIT/Regression/JitBlue/Runtime_108969/Runtime_108969.cs new file mode 100644 index 00000000000000..df3f9af0ee54ce --- /dev/null +++ b/src/tests/JIT/Regression/JitBlue/Runtime_108969/Runtime_108969.cs @@ -0,0 +1,55 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.Intrinsics; +using Xunit; + +public class Runtime_108969 +{ + [Fact] + public static int TestEntryPoint() => Foo(null); + + [MethodImpl(MethodImplOptions.NoInlining)] + private static int Foo(object o) + { + S v = default; + try + { + v = Bar(); + + // "(int?)o" creates a QMARK with a branch that may throw; we would + // end up reading back v.A inside the QMARK + Use((int?)o); + } + catch (Exception) + { + } + + // Induce promotion of v.A field + Use(v.A); + Use(v.A); + Use(v.A); + Use(v.A); + Use(v.A); + Use(v.A); + return v.A; + } + + [MethodImpl(MethodImplOptions.NoInlining)] + private static S Bar() + { + return new S { A = 100 }; + } + + [MethodImpl(MethodImplOptions.NoInlining)] + private static void Use(T x) + { + } + + private struct S + { + public int A, B, C, D; + } +} diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_108969/Runtime_108969.csproj b/src/tests/JIT/Regression/JitBlue/Runtime_108969/Runtime_108969.csproj new file mode 100644 index 00000000000000..de6d5e08882e86 --- /dev/null +++ b/src/tests/JIT/Regression/JitBlue/Runtime_108969/Runtime_108969.csproj @@ -0,0 +1,8 @@ + + + True + + + + + diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_109981/Runtime_109981.cs b/src/tests/JIT/Regression/JitBlue/Runtime_109981/Runtime_109981.cs new file mode 100644 index 00000000000000..a7c8bcd92d81aa --- /dev/null +++ b/src/tests/JIT/Regression/JitBlue/Runtime_109981/Runtime_109981.cs @@ -0,0 +1,63 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Runtime.CompilerServices; +using Xunit; + +public class Runtime_109981 +{ + [Fact] + public static int TestEntryPoint() => Foo(14); + + public static int Foo(int x) + { + if (x == 123) + return 0; + + int sum = 9; + for (int i = 0; i < x; i++) + { + sum += i; + } + + try + { + if (x != 123) + return sum; + + try + { + try + { + Bar(); + } + finally + { + sum += 1000; + } + } + catch (ArgumentException) + { + sum += 10000; + } + } + catch when (Filter()) + { + sum += 100000; + } + + return sum; + } + + [MethodImpl(MethodImplOptions.NoInlining)] + private static void Bar() + { + } + + [MethodImpl(MethodImplOptions.NoInlining)] + private static bool Filter() + { + return true; + } +} diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_109981/Runtime_109981.csproj b/src/tests/JIT/Regression/JitBlue/Runtime_109981/Runtime_109981.csproj new file mode 100644 index 00000000000000..de6d5e08882e86 --- /dev/null +++ b/src/tests/JIT/Regression/JitBlue/Runtime_109981/Runtime_109981.csproj @@ -0,0 +1,8 @@ + + + True + + + + + diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_110820/Runtime_110820.cs b/src/tests/JIT/Regression/JitBlue/Runtime_110820/Runtime_110820.cs new file mode 100644 index 00000000000000..c4abf023a4df92 --- /dev/null +++ b/src/tests/JIT/Regression/JitBlue/Runtime_110820/Runtime_110820.cs @@ -0,0 +1,24 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Xunit; +using System.Numerics; + +public class Foo +{ + public Vector3 v1; + public Vector3 v2; +} + +public class Runtime_110820 +{ + [Fact] + public static void TestEntryPoint() + { + var foo = new Foo(); + foo.v2 = new Vector3(4, 5, 6); + foo.v1 = new Vector3(1, 2, 3); + Assert.Equal(new Vector3(1, 2, 3), foo.v1); + Assert.Equal(new Vector3(4, 5, 6), foo.v2); + } +} diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_110820/Runtime_110820.csproj b/src/tests/JIT/Regression/JitBlue/Runtime_110820/Runtime_110820.csproj new file mode 100644 index 00000000000000..de6d5e08882e86 --- /dev/null +++ b/src/tests/JIT/Regression/JitBlue/Runtime_110820/Runtime_110820.csproj @@ -0,0 +1,8 @@ + + + True + + + + + diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_111352/Runtime_111352.cs b/src/tests/JIT/Regression/JitBlue/Runtime_111352/Runtime_111352.cs new file mode 100644 index 00000000000000..654b71021d4a73 --- /dev/null +++ b/src/tests/JIT/Regression/JitBlue/Runtime_111352/Runtime_111352.cs @@ -0,0 +1,42 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Runtime.CompilerServices; +using Xunit; + +public class Runtime_111352 +{ + [Fact] + public static int Test1() => Problem1(0x1_0000_0001L, 0x2_0000_0001L); + + [MethodImpl(MethodImplOptions.NoInlining)] + public static int Problem1(long x, long y) + { + if ((uint)x == (uint)y) + { + if (x == y) + { + return -1; + } + } + + return 100; + } + + [Fact] + public static int Test2() => Problem2(0x1_0000_0000L); + + [MethodImpl(MethodImplOptions.NoInlining)] + public static int Problem2(long x) + { + if ((uint)x == 0) + { + if (x == 0) + { + return -1; + } + } + + return 100; + } +} diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_111352/Runtime_111352.csproj b/src/tests/JIT/Regression/JitBlue/Runtime_111352/Runtime_111352.csproj new file mode 100644 index 00000000000000..de6d5e08882e86 --- /dev/null +++ b/src/tests/JIT/Regression/JitBlue/Runtime_111352/Runtime_111352.csproj @@ -0,0 +1,8 @@ + + + True + + + + + diff --git a/src/tests/Loader/CollectibleAssemblies/Statics/CollectibleTLSStaticCollection.cs b/src/tests/Loader/CollectibleAssemblies/Statics/CollectibleTLSStaticCollection.cs new file mode 100644 index 00000000000000..d84d3d05769c80 --- /dev/null +++ b/src/tests/Loader/CollectibleAssemblies/Statics/CollectibleTLSStaticCollection.cs @@ -0,0 +1,103 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Reflection; +using System.Reflection.Emit; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Threading; +using Xunit; + +namespace CollectibleThreadStaticShutdownRace +{ + public class CollectibleThreadStaticShutdownRace + { + Action? UseTLSStaticFromLoaderAllocator = null; + GCHandle IsLoaderAllocatorLive; + static ulong s_collectibleIndex; + + [MethodImpl(MethodImplOptions.NoInlining)] + void CallUseTLSStaticFromLoaderAllocator() + { + UseTLSStaticFromLoaderAllocator!(); + UseTLSStaticFromLoaderAllocator = null; + } + + [MethodImpl(MethodImplOptions.NoInlining)] + bool CheckLALive() + { + return IsLoaderAllocatorLive.Target != null; + } + + + void ThreadThatWaitsForLoaderAllocatorToDisappear() + { + CallUseTLSStaticFromLoaderAllocator(); + while (CheckLALive()) + { + GC.Collect(2); + } + } + + void CreateLoaderAllocatorWithTLS() + { + ulong collectibleIndex = s_collectibleIndex++; + + var ab = + AssemblyBuilder.DefineDynamicAssembly( + new AssemblyName($"CollectibleDerivedAssembly{collectibleIndex}"), + AssemblyBuilderAccess.RunAndCollect); + var mob = ab.DefineDynamicModule($"CollectibleDerivedModule{collectibleIndex}"); + var tb = + mob.DefineType( + $"CollectibleDerived{collectibleIndex}", + TypeAttributes.Class | TypeAttributes.Public, + typeof(object)); + + { + var fb = + tb.DefineField( + "Field", typeof(int), FieldAttributes.Static); + fb.SetCustomAttribute(typeof(ThreadStaticAttribute).GetConstructors()[0], new byte[0]); + + var mb = + tb.DefineMethod( + "Method", + MethodAttributes.Public | MethodAttributes.Static); + var ilg = mb.GetILGenerator(); + ilg.Emit(OpCodes.Ldc_I4_1); + ilg.Emit(OpCodes.Stsfld, fb); + ilg.Emit(OpCodes.Ret); + } + + Type createdType = tb.CreateType(); + UseTLSStaticFromLoaderAllocator = (Action)createdType.GetMethods()[0].CreateDelegate(typeof(Action)); + IsLoaderAllocatorLive = GCHandle.Alloc(createdType, GCHandleType.WeakTrackResurrection); + } + + void ForceCollectibleTLSStaticToGoThroughThreadTermination() + { + int iteration = 0; + for (int i = 0; i < 10; i++) + { + Console.WriteLine($"Iteration {iteration++}"); + var createLAThread = new Thread(CreateLoaderAllocatorWithTLS); + createLAThread.Start(); + createLAThread.Join(); + + var crashThread = new Thread(ThreadThatWaitsForLoaderAllocatorToDisappear); + crashThread.Start(); + crashThread.Join(); + } + + } + + [Fact] + public static void TestEntryPoint() + { + new CollectibleThreadStaticShutdownRace().ForceCollectibleTLSStaticToGoThroughThreadTermination(); + } + } +} + diff --git a/src/tests/Loader/CollectibleAssemblies/Statics/CollectibleTLSStaticCollection.csproj b/src/tests/Loader/CollectibleAssemblies/Statics/CollectibleTLSStaticCollection.csproj new file mode 100644 index 00000000000000..b2bf6ae30660e7 --- /dev/null +++ b/src/tests/Loader/CollectibleAssemblies/Statics/CollectibleTLSStaticCollection.csproj @@ -0,0 +1,10 @@ + + + + true + true + + + + + diff --git a/src/tests/Loader/ResourceResolve/ManifestResourceAssemblyRef.il b/src/tests/Loader/ResourceResolve/ManifestResourceAssemblyRef.il new file mode 100644 index 00000000000000..c4891a07551f14 --- /dev/null +++ b/src/tests/Loader/ResourceResolve/ManifestResourceAssemblyRef.il @@ -0,0 +1,19 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +.assembly extern System.Runtime +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) +} + +.assembly extern ResourceAssembly +{ + .publickeytoken = (00 00 00 00 00 00 00 00) +} + +.assembly ManifestResourceAssemblyRef { } + +.mresource public 'MyResource' +{ + .assembly extern 'ResourceAssembly' +} diff --git a/src/tests/Loader/ResourceResolve/ManifestResourceAssemblyRef.ilproj b/src/tests/Loader/ResourceResolve/ManifestResourceAssemblyRef.ilproj new file mode 100644 index 00000000000000..bfc5d0bb00df9b --- /dev/null +++ b/src/tests/Loader/ResourceResolve/ManifestResourceAssemblyRef.ilproj @@ -0,0 +1,8 @@ + + + library + + + + + diff --git a/src/tests/Loader/ResourceResolve/ResourceAssembly.csproj b/src/tests/Loader/ResourceResolve/ResourceAssembly.csproj new file mode 100644 index 00000000000000..e014b87610bd87 --- /dev/null +++ b/src/tests/Loader/ResourceResolve/ResourceAssembly.csproj @@ -0,0 +1,8 @@ + + + Library + + + + + diff --git a/src/tests/Loader/ResourceResolve/ResourceResolve.cs b/src/tests/Loader/ResourceResolve/ResourceResolve.cs new file mode 100644 index 00000000000000..2cf30a36216ffe --- /dev/null +++ b/src/tests/Loader/ResourceResolve/ResourceResolve.cs @@ -0,0 +1,47 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.IO; +using System.Reflection; +using Xunit; + +[ConditionalClass(typeof(TestLibrary.Utilities), nameof(TestLibrary.Utilities.IsNotNativeAot))] +public unsafe class ResourceResolve +{ + [Fact] + [SkipOnMono("AssemblyRef manifest resource is not supported")] + public static void AssemblyRef() + { + string resourceName = "MyResource"; + Assembly assembly = typeof(ResourceResolve).Assembly; + + // Manifest resource is not in the current assembly + Stream stream = assembly.GetManifestResourceStream(resourceName); + Assert.Null(stream); + + // Handler returns assembly with a manifest resource assembly ref that + // points to another assembly with the resource + ResolveEventHandler handler = (sender, args) => + { + if (args.Name == resourceName && args.RequestingAssembly == assembly) + return Assembly.Load("ManifestResourceAssemblyRef"); + + return null; + }; + AppDomain.CurrentDomain.ResourceResolve += handler; + stream = assembly.GetManifestResourceStream(resourceName); + AppDomain.CurrentDomain.ResourceResolve -= handler; + Assert.NotNull(stream); + + // Verify that the stream matches the expected one in the resource assembly + Assembly resourceAssembly = Assembly.Load("ResourceAssembly"); + Stream expected = resourceAssembly.GetManifestResourceStream(resourceName); + Assert.Equal(expected.Length, stream.Length); + Span expectedBytes = new byte[expected.Length]; + expected.Read(expectedBytes); + Span streamBytes = new byte[stream.Length]; + stream.Read(streamBytes); + Assert.Equal(expectedBytes, streamBytes); + } +} diff --git a/src/tests/Loader/ResourceResolve/ResourceResolve.csproj b/src/tests/Loader/ResourceResolve/ResourceResolve.csproj new file mode 100644 index 00000000000000..5fc4c77bada41d --- /dev/null +++ b/src/tests/Loader/ResourceResolve/ResourceResolve.csproj @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/tests/Regressions/coreclr/GitHub_109242/test109242.cs b/src/tests/Regressions/coreclr/GitHub_109242/test109242.cs new file mode 100644 index 00000000000000..080744316bdd73 --- /dev/null +++ b/src/tests/Regressions/coreclr/GitHub_109242/test109242.cs @@ -0,0 +1,21 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +using System; +using System.Reflection; +using Xunit; + +public class Test109242 +{ + [Fact] + public static void TestEntryPoint() + { + unsafe + { + void* p = stackalloc byte[Random.Shared.Next(100)]; + GC.KeepAlive(((IntPtr)p).ToString()); + } + + Assembly.Load("System.Runtime"); + } +} + diff --git a/src/tests/Regressions/coreclr/GitHub_109242/test109242.csproj b/src/tests/Regressions/coreclr/GitHub_109242/test109242.csproj new file mode 100644 index 00000000000000..d087213b695b82 --- /dev/null +++ b/src/tests/Regressions/coreclr/GitHub_109242/test109242.csproj @@ -0,0 +1,12 @@ + + + 1 + true + + + + + + + + diff --git a/src/tests/baseservices/compilerservices/UnsafeAccessors/UnsafeAccessorsTests.cs b/src/tests/baseservices/compilerservices/UnsafeAccessors/UnsafeAccessorsTests.cs index 72821f396b4f23..fcdb479c1a6353 100644 --- a/src/tests/baseservices/compilerservices/UnsafeAccessors/UnsafeAccessorsTests.cs +++ b/src/tests/baseservices/compilerservices/UnsafeAccessors/UnsafeAccessorsTests.cs @@ -328,6 +328,72 @@ public static void Verify_AccessAllFields_CorElementType() extern static ref delegate* GetFPtr(ref AllFields f); } + // Contains fields that are volatile + struct VolatileFields + { + private static volatile int s_vInt; + private volatile int _vInt; + } + + // Accessors for fields that are volatile + static class AccessorsVolatile + { + [UnsafeAccessor(UnsafeAccessorKind.StaticField, Name="s_vInt")] + public extern static ref int GetStaticVolatileInt(ref VolatileFields f); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name="_vInt")] + public extern static ref int GetVolatileInt(ref VolatileFields f); + } + + [Fact] + public static void Verify_AccessFieldsWithVolatile() + { + Console.WriteLine($"Running {nameof(Verify_AccessFieldsWithVolatile)}"); + + VolatileFields fieldsWithVolatile = default; + + AccessorsVolatile.GetStaticVolatileInt(ref fieldsWithVolatile) = default; + AccessorsVolatile.GetVolatileInt(ref fieldsWithVolatile) = default; + } + + // Contains fields that are readonly + readonly struct ReadOnlyFields + { + public static readonly int s_rInt; + public readonly int _rInt; + } + + // Accessors for fields that are readonly + static class AccessorsReadOnly + { + [UnsafeAccessor(UnsafeAccessorKind.StaticField, Name="s_rInt")] + public extern static ref readonly int GetStaticReadOnlyInt(ref readonly ReadOnlyFields f); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name="_rInt")] + public extern static ref readonly int GetReadOnlyInt(ref readonly ReadOnlyFields f); + } + + [Fact] + public static void Verify_AccessFieldsWithReadOnlyRefs() + { + Console.WriteLine($"Running {nameof(Verify_AccessFieldsWithReadOnlyRefs)}"); + + ReadOnlyFields readOnlyFields = default; + + Assert.True(Unsafe.AreSame(in AccessorsReadOnly.GetStaticReadOnlyInt(in readOnlyFields), in ReadOnlyFields.s_rInt)); + Assert.True(Unsafe.AreSame(in AccessorsReadOnly.GetReadOnlyInt(in readOnlyFields), in readOnlyFields._rInt)); + + // Test the local declaration of the signature since it places modopts/modreqs differently. + Assert.True(Unsafe.AreSame(in GetStaticReadOnlyIntLocal(in readOnlyFields), in ReadOnlyFields.s_rInt)); + Assert.True(Unsafe.AreSame(in GetReadOnlyIntLocal(in readOnlyFields), in readOnlyFields._rInt)); + + [UnsafeAccessor(UnsafeAccessorKind.StaticField, Name="s_rInt")] + extern static ref readonly int GetStaticReadOnlyIntLocal(ref readonly ReadOnlyFields f); + + [UnsafeAccessor(UnsafeAccessorKind.Field, Name="_rInt")] + extern static ref readonly int GetReadOnlyIntLocal(ref readonly ReadOnlyFields f); + } + [Fact] public static void Verify_AccessStaticMethodClass() { diff --git a/src/tests/issues.targets b/src/tests/issues.targets index ec449e4620b91a..b246551a819603 100644 --- a/src/tests/issues.targets +++ b/src/tests/issues.targets @@ -1010,6 +1010,9 @@ https://github.com/dotnet/runtimelab/issues/155: Collectible assemblies + + https://github.com/dotnet/runtimelab/issues/155: Collectible assemblies + https://github.com/dotnet/runtimelab/issues/155: Collectible assemblies @@ -1067,9 +1070,6 @@ https://github.com/dotnet/runtimelab/issues/861 - - https://github.com/dotnet/runtimelab/issues/1442 - https://github.com/dotnet/runtimelab/issues/306 @@ -2467,6 +2467,10 @@ Reflection.Emit is not supported on fullaot + + + Attempting to JIT compile method 'void CMain:RunInvalidTest1 ()' while running in aot-only mode. + diff --git a/src/tests/nativeaot/SmokeTests/UnitTests/Interfaces.cs b/src/tests/nativeaot/SmokeTests/UnitTests/Interfaces.cs index b5023e8c84163e..7647ce545bb573 100644 --- a/src/tests/nativeaot/SmokeTests/UnitTests/Interfaces.cs +++ b/src/tests/nativeaot/SmokeTests/UnitTests/Interfaces.cs @@ -4,6 +4,7 @@ using System; using System.Text; using System.Collections.Generic; +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Diagnostics.CodeAnalysis; @@ -15,6 +16,8 @@ public class Interfaces public static int Run() { + TestRuntime109893Regression.Run(); + if (TestInterfaceCache() == Fail) return Fail; @@ -42,6 +45,7 @@ public static int Run() TestVariantInterfaceOptimizations.Run(); TestSharedInterfaceMethods.Run(); TestGenericAnalysis.Run(); + TestRuntime108229Regression.Run(); TestCovariantReturns.Run(); TestDynamicInterfaceCastable.Run(); TestStaticInterfaceMethodsAnalysis.Run(); @@ -57,10 +61,42 @@ public static int Run() TestDefaultDynamicStaticNonGeneric.Run(); TestDefaultDynamicStaticGeneric.Run(); TestDynamicStaticGenericVirtualMethods.Run(); + TestRuntime109496Regression.Run(); return Pass; } + class TestRuntime109893Regression + { + class Type : IType; + + class MyVisitor : IVisitor + { + public object? Visit(IType _) => typeof(T); + } + + interface IType + { + object? Accept(IVisitor visitor); + } + + interface IType : IType + { + object? IType.Accept(IVisitor visitor) => visitor.Visit(this); + } + + interface IVisitor + { + object? Visit(IType type); + } + + public static void Run() + { + IType type = new Type(); + type.Accept(new MyVisitor()); + } + } + private static MyInterface[] MakeInterfaceArray() { MyInterface[] itfs = new MyInterface[50]; @@ -705,6 +741,27 @@ public static void Run() } } + class TestRuntime108229Regression + { + class Shapeshifter : IDynamicInterfaceCastable + { + public RuntimeTypeHandle GetInterfaceImplementation(RuntimeTypeHandle interfaceType) => throw new NotImplementedException(); + public bool IsInterfaceImplemented(RuntimeTypeHandle interfaceType, bool throwIfNotImplemented) => true; + } + + [MethodImpl(MethodImplOptions.NoInlining)] + static bool Is(object o) => o is IEnumerable; + + public static void Run() + { + object o = new Shapeshifter(); + + // Call multiple times in case we just flushed the cast cache (when we flush we don't store). + if (!Is(o) || !Is(o) || !Is(o)) + throw new Exception(); + } + } + class TestCovariantReturns { interface IFoo @@ -886,6 +943,16 @@ interface IInterfaceImpl : IInterface [DynamicInterfaceCastableImplementation] interface IInterfaceIndirectCastableImpl : IInterfaceImpl { } + interface IInterfaceImpl : IInterface + { + string IInterface.GetCookie() => typeof(T).Name; + } + + [DynamicInterfaceCastableImplementation] + interface IInterfaceIndirectCastableImpl : IInterfaceImpl { } + + class Atom { } + public static void Run() { Console.WriteLine("Testing IDynamicInterfaceCastable..."); @@ -922,6 +989,18 @@ public static void Run() if (o.GetCookie() != "Int32") throw new Exception(); } + + { + IInterface o = (IInterface)new CastableClass>(); + if (o.GetCookie() != "Atom") + throw new Exception(); + } + + { + IInterface o = (IInterface)new CastableClass>(); + if (o.GetCookie() != "Atom") + throw new Exception(); + } } } @@ -1703,4 +1782,57 @@ public static void Run() Console.WriteLine(s_entry.Enter1>("One")); } } + + class TestRuntime109496Regression + { + class CastableThing : IDynamicInterfaceCastable + { + RuntimeTypeHandle IDynamicInterfaceCastable.GetInterfaceImplementation(RuntimeTypeHandle interfaceType) + => Type.GetTypeFromHandle(interfaceType).GetCustomAttribute().TheType.TypeHandle; + bool IDynamicInterfaceCastable.IsInterfaceImplemented(RuntimeTypeHandle interfaceType, bool throwIfNotImplemented) + => Type.GetTypeFromHandle(interfaceType).IsDefined(typeof(TypeAttribute)); + } + + [Type(typeof(IMyInterfaceImpl))] + interface IMyInterface + { + int Method(); + } + + [DynamicInterfaceCastableImplementation] + interface IMyInterfaceImpl : IMyInterface + { + int IMyInterface.Method() => 42; + } + + [Type(typeof(IMyGenericInterfaceImpl))] + interface IMyGenericInterface + { + int Method(); + } + + [DynamicInterfaceCastableImplementation] + interface IMyGenericInterfaceImpl : IMyGenericInterface + { + int IMyGenericInterface.Method() => typeof(T).Name.Length; + } + + class TypeAttribute : Attribute + { + public Type TheType { get; } + + public TypeAttribute(Type t) => TheType = t; + } + + public static void Run() + { + object o = new CastableThing(); + + if (((IMyInterface)o).Method() != 42) + throw new Exception(); + + if (((IMyGenericInterface)o).Method() != 5) + throw new Exception(); + } + } } diff --git a/src/tests/profiler/native/CMakeLists.txt b/src/tests/profiler/native/CMakeLists.txt index 1279874df07c32..4333a8b2698280 100644 --- a/src/tests/profiler/native/CMakeLists.txt +++ b/src/tests/profiler/native/CMakeLists.txt @@ -5,11 +5,11 @@ project(Profiler) set(SOURCES assemblyprofiler/assemblyprofiler.cpp eltprofiler/slowpatheltprofiler.cpp + enumthreadsprofiler/enumthreadsprofiler.cpp eventpipeprofiler/eventpipereadingprofiler.cpp eventpipeprofiler/eventpipewritingprofiler.cpp eventpipeprofiler/eventpipemetadatareader.cpp gcallocateprofiler/gcallocateprofiler.cpp - nongcheap/nongcheap.cpp gcbasicprofiler/gcbasicprofiler.cpp gcheapenumerationprofiler/gcheapenumerationprofiler.cpp gcheapenumerationprofiler/gcheapenumerationprofiler.def @@ -20,6 +20,7 @@ set(SOURCES metadatagetdispenser/metadatagetdispenser.cpp moduleload/moduleload.cpp multiple/multiple.cpp + nongcheap/nongcheap.cpp nullprofiler/nullprofiler.cpp rejitprofiler/rejitprofiler.cpp rejitprofiler/ilrewriter.cpp diff --git a/src/tests/profiler/native/classfactory.cpp b/src/tests/profiler/native/classfactory.cpp index bb27152f8581f8..677b57fef95efc 100644 --- a/src/tests/profiler/native/classfactory.cpp +++ b/src/tests/profiler/native/classfactory.cpp @@ -3,6 +3,7 @@ #include "classfactory.h" #include "eltprofiler/slowpatheltprofiler.h" +#include "enumthreadsprofiler/enumthreadsprofiler.h" #include "eventpipeprofiler/eventpipereadingprofiler.h" #include "eventpipeprofiler/eventpipewritingprofiler.h" #include "getappdomainstaticaddress/getappdomainstaticaddress.h" @@ -144,6 +145,10 @@ HRESULT STDMETHODCALLTYPE ClassFactory::CreateInstance(IUnknown *pUnkOuter, REFI { profiler = new GCHeapEnumerationProfiler(); } + else if (clsid == EnumThreadsProfiler::GetClsid()) + { + profiler = new EnumThreadsProfiler(); + } else { printf("No profiler found in ClassFactory::CreateInstance. Did you add your profiler to the list?\n"); diff --git a/src/tests/profiler/native/enumthreadsprofiler/enumthreadsprofiler.cpp b/src/tests/profiler/native/enumthreadsprofiler/enumthreadsprofiler.cpp new file mode 100644 index 00000000000000..de6caeaef7100a --- /dev/null +++ b/src/tests/profiler/native/enumthreadsprofiler/enumthreadsprofiler.cpp @@ -0,0 +1,104 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +#include "enumthreadsprofiler.h" + +GUID EnumThreadsProfiler::GetClsid() +{ + // {0742962D-2ED3-44B0-BA84-06B1EF0A0A0B} + GUID clsid = { 0x0742962d, 0x2ed3, 0x44b0,{ 0xba, 0x84, 0x06, 0xb1, 0xef, 0x0a, 0x0a, 0x0b } }; + return clsid; +} + +HRESULT EnumThreadsProfiler::Initialize(IUnknown* pICorProfilerInfoUnk) +{ + Profiler::Initialize(pICorProfilerInfoUnk); + printf("EnumThreadsProfiler::Initialize\n"); + + HRESULT hr = S_OK; + if (FAILED(hr = pCorProfilerInfo->SetEventMask2(COR_PRF_MONITOR_GC | COR_PRF_MONITOR_SUSPENDS, COR_PRF_HIGH_MONITOR_NONE))) + { + printf("FAIL: ICorProfilerInfo::SetEventMask2() failed hr=0x%x", hr); + IncrementFailures(); + } + + return hr; +} + +HRESULT STDMETHODCALLTYPE EnumThreadsProfiler::GarbageCollectionStarted(int cGenerations, BOOL generationCollected[], COR_PRF_GC_REASON reason) +{ + SHUTDOWNGUARD(); + + printf("EnumThreadsProfiler::GarbageCollectionStarted\n"); + _gcStarts.fetch_add(1, std::memory_order_relaxed); + if (_gcStarts < _gcFinishes) + { + IncrementFailures(); + printf("EnumThreadsProfiler::GarbageCollectionStarted: FAIL: Expected GCStart >= GCFinish. Start=%d, Finish=%d\n", (int)_gcStarts, (int)_gcFinishes); + } + + return S_OK; +} + +HRESULT STDMETHODCALLTYPE EnumThreadsProfiler::GarbageCollectionFinished() +{ + SHUTDOWNGUARD(); + + printf("EnumThreadsProfiler::GarbageCollectionFinished\n"); + _gcFinishes.fetch_add(1, std::memory_order_relaxed); + if (_gcStarts < _gcFinishes) + { + IncrementFailures(); + printf("EnumThreadsProfiler::GarbageCollectionFinished: FAIL: Expected GCStart >= GCFinish. Start=%d, Finish=%d\n", (int)_gcStarts, (int)_gcFinishes); + } + + return S_OK; +} + +HRESULT STDMETHODCALLTYPE EnumThreadsProfiler::RuntimeSuspendFinished() +{ + SHUTDOWNGUARD(); + + printf("EnumThreadsProfiler::RuntimeSuspendFinished\n"); + + ICorProfilerThreadEnum* threadEnum = nullptr; + HRESULT enumThreadsHR = pCorProfilerInfo->EnumThreads(&threadEnum); + printf("Finished enumerating threads\n"); + _profilerEnumThreadsCompleted.fetch_add(1, std::memory_order_relaxed); + threadEnum->Release(); + return enumThreadsHR; +} + +HRESULT EnumThreadsProfiler::Shutdown() +{ + Profiler::Shutdown(); + + if (_gcStarts == 0) + { + printf("EnumThreadsProfiler::Shutdown: FAIL: Expected GarbageCollectionStarted to be called\n"); + } + else if (_gcFinishes == 0) + { + printf("EnumThreadsProfiler::Shutdown: FAIL: Expected GarbageCollectionFinished to be called\n"); + } + else if (_profilerEnumThreadsCompleted == 0) + { + printf("EnumThreadsProfiler::Shutdown: FAIL: Expected RuntimeSuspendFinished to be called and EnumThreads completed\n"); + } + else if(_failures == 0) + { + printf("PROFILER TEST PASSES\n"); + } + else + { + // failures were printed earlier when _failures was incremented + } + fflush(stdout); + + return S_OK; +} + +void EnumThreadsProfiler::IncrementFailures() +{ + _failures.fetch_add(1, std::memory_order_relaxed); +} diff --git a/src/tests/profiler/native/enumthreadsprofiler/enumthreadsprofiler.h b/src/tests/profiler/native/enumthreadsprofiler/enumthreadsprofiler.h new file mode 100644 index 00000000000000..df716108432594 --- /dev/null +++ b/src/tests/profiler/native/enumthreadsprofiler/enumthreadsprofiler.h @@ -0,0 +1,34 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +#pragma once + +#include "../profiler.h" + +class EnumThreadsProfiler : public Profiler +{ +public: + EnumThreadsProfiler() : Profiler(), + _gcStarts(0), + _gcFinishes(0), + _profilerEnumThreadsCompleted(0), + _failures(0) + {} + + // Profiler callbacks override + static GUID GetClsid(); + virtual HRESULT STDMETHODCALLTYPE Initialize(IUnknown* pICorProfilerInfoUnk); + virtual HRESULT STDMETHODCALLTYPE GarbageCollectionStarted(int cGenerations, BOOL generationCollected[], COR_PRF_GC_REASON reason); + virtual HRESULT STDMETHODCALLTYPE GarbageCollectionFinished(); + virtual HRESULT STDMETHODCALLTYPE RuntimeSuspendFinished(); + virtual HRESULT STDMETHODCALLTYPE Shutdown(); + + // Helper methods + void IncrementFailures(); + +private: + std::atomic _gcStarts; + std::atomic _gcFinishes; + std::atomic _profilerEnumThreadsCompleted; + std::atomic _failures; +}; diff --git a/src/tests/profiler/unittest/enumthreads.cs b/src/tests/profiler/unittest/enumthreads.cs new file mode 100644 index 00000000000000..95562decc3f551 --- /dev/null +++ b/src/tests/profiler/unittest/enumthreads.cs @@ -0,0 +1,56 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; + +namespace Profiler.Tests +{ + class EnumThreadsTests + { + static readonly Guid EnumThreadsProfilerGuid = new Guid("0742962D-2ED3-44B0-BA84-06B1EF0A0A0B"); + + public static int EnumerateThreadsWithNonProfilerRequestedRuntimeSuspension() + { + GC.Collect(); + return 100; + } + + public static int Main(string[] args) + { + if (args.Length > 0 && args[0].Equals("RunTest", StringComparison.OrdinalIgnoreCase)) + { + switch (args[1]) + { + case nameof(EnumerateThreadsWithNonProfilerRequestedRuntimeSuspension): + return EnumerateThreadsWithNonProfilerRequestedRuntimeSuspension(); + default: + return 102; + } + } + + if (!RunProfilerTest(nameof(EnumerateThreadsWithNonProfilerRequestedRuntimeSuspension))) + { + return 101; + } + + return 100; + } + + private static bool RunProfilerTest(string testName) + { + try + { + return ProfilerTestRunner.Run(profileePath: System.Reflection.Assembly.GetExecutingAssembly().Location, + testName: "EnumThreads", + profilerClsid: EnumThreadsProfilerGuid, + profileeArguments: testName + ) == 100; + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + return false; + } + } +} diff --git a/src/tests/profiler/unittest/enumthreads.csproj b/src/tests/profiler/unittest/enumthreads.csproj new file mode 100644 index 00000000000000..d51dcb692abfe0 --- /dev/null +++ b/src/tests/profiler/unittest/enumthreads.csproj @@ -0,0 +1,21 @@ + + + .NETCoreApp + exe + true + true + + true + + true + + + + + + + + diff --git a/src/tools/illink/src/ILLink.RoslynAnalyzer/TrimAnalysis/SingleValueExtensions.cs b/src/tools/illink/src/ILLink.RoslynAnalyzer/TrimAnalysis/SingleValueExtensions.cs index 5362f267afa531..7730958dd87e62 100644 --- a/src/tools/illink/src/ILLink.RoslynAnalyzer/TrimAnalysis/SingleValueExtensions.cs +++ b/src/tools/illink/src/ILLink.RoslynAnalyzer/TrimAnalysis/SingleValueExtensions.cs @@ -21,7 +21,7 @@ public static class SingleValueExtensions new GenericParameterValue ((ITypeParameterSymbol) underlyingType)), // typeof(Nullable<>) TypeKind.Error => new SystemTypeValue (new TypeProxy (type)), - TypeKind.Class or TypeKind.Struct or TypeKind.Interface => + TypeKind.Class or TypeKind.Enum or TypeKind.Interface or TypeKind.Struct => new NullableSystemTypeValue (new TypeProxy (type), new SystemTypeValue (new TypeProxy (underlyingType))), _ => UnknownValue.Instance }; diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Reflection/ExpressionCallString.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Reflection/ExpressionCallString.cs index 8f0b7127038f14..409a052e672f8a 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Reflection/ExpressionCallString.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Reflection/ExpressionCallString.cs @@ -10,6 +10,8 @@ namespace Mono.Linker.Tests.Cases.Reflection [Reference ("System.Core.dll")] [ExpectedNoWarnings] [KeptPrivateImplementationDetails ("ThrowSwitchExpressionException")] + [KeptAttributeAttribute(typeof(UnconditionalSuppressMessageAttribute))] + [UnconditionalSuppressMessage ("AOT", "IL3050", Justification = "These tests are not targeted at AOT scenarios")] public class ExpressionCallString { public static void Main () diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Reflection/ExpressionCallStringAndLocals.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Reflection/ExpressionCallStringAndLocals.cs index 12adc8f07bf3f9..6916935480fd1f 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Reflection/ExpressionCallStringAndLocals.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Reflection/ExpressionCallStringAndLocals.cs @@ -1,4 +1,5 @@ using System; +using System.Diagnostics.CodeAnalysis; using System.Linq.Expressions; using Mono.Linker.Tests.Cases.Expectations.Assertions; using Mono.Linker.Tests.Cases.Expectations.Metadata; @@ -7,6 +8,8 @@ namespace Mono.Linker.Tests.Cases.Reflection { [Reference ("System.Core.dll")] [ExpectedNoWarnings] + [KeptAttributeAttribute (typeof (UnconditionalSuppressMessageAttribute))] + [UnconditionalSuppressMessage ("AOT", "IL3050", Justification = "These tests are not targeted at AOT scenarios")] public class ExpressionCallStringAndLocals { public static void Main () diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Reflection/RunClassConstructor.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Reflection/RunClassConstructor.cs index 20812c86edf305..8c38ac7742f35f 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Reflection/RunClassConstructor.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Reflection/RunClassConstructor.cs @@ -22,6 +22,7 @@ public static void Main () TestIfElseUsingRuntimeTypeHandle (1); TestIfElseUsingType (1); TestNullableValueType (); + TestNullableEnum (); } [Kept] @@ -132,6 +133,16 @@ static void TestNullableValueType () RuntimeHelpers.RunClassConstructor (typeof (int?).TypeHandle); } + [Kept] + [KeptMember ( "value__")] + enum MyEnum {} + + [Kept] + static void TestNullableEnum () + { + RuntimeHelpers.RunClassConstructor (typeof (Nullable).TypeHandle); + } + [Kept] [KeptMember (".cctor()")] class OnlyUsedViaReflection diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/AddSuppressionsBeforeAttributeRemoval.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/AddSuppressionsBeforeAttributeRemoval.cs index dc0d349c3c9b80..fffc017345a6e6 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/AddSuppressionsBeforeAttributeRemoval.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/AddSuppressionsBeforeAttributeRemoval.cs @@ -9,6 +9,7 @@ namespace Mono.Linker.Tests.Cases.Warnings.WarningSuppression [SetupLinkAttributesFile ("AddSuppressionsBeforeAttributeRemoval.xml")] [ExpectedNoWarnings] + [UnconditionalSuppressMessage ("AOT", "IL3050", Justification = "These tests are not targeted at AOT scenarios")] public class AddSuppressionsBeforeAttributeRemoval { [Kept] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/DetectRedundantSuppressionsFeatureSubstitutions.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/DetectRedundantSuppressionsFeatureSubstitutions.cs index a5cb25f761348f..c357ba3c17b2b5 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/DetectRedundantSuppressionsFeatureSubstitutions.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/DetectRedundantSuppressionsFeatureSubstitutions.cs @@ -13,6 +13,7 @@ namespace Mono.Linker.Tests.Cases.Warnings.WarningSuppression [SetupLinkerArgument ("--feature", "Feature", "false")] [ExpectedNoWarnings] [SkipKeptItemsValidation] + [UnconditionalSuppressMessage ("AOT", "IL3050", Justification = "These tests are not targeted at AOT scenarios")] public class DetectRedundantSuppressionsFeatureSubstitutions { public static void Main () diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/DetectRedundantSuppressionsInMembersAndTypes.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/DetectRedundantSuppressionsInMembersAndTypes.cs index 884ceb4a6c81b5..f507fdfc3372cc 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/DetectRedundantSuppressionsInMembersAndTypes.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/DetectRedundantSuppressionsInMembersAndTypes.cs @@ -10,6 +10,7 @@ namespace Mono.Linker.Tests.Cases.Warnings.WarningSuppression { [ExpectedNoWarnings] [SkipKeptItemsValidation] + [UnconditionalSuppressMessage ("AOT", "IL3050", Justification = "These tests are not targeted at AOT scenarios")] public class DetectRedundantSuppressionsInMembersAndTypes { public static void Main () diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/DetectRedundantSuppressionsTrimmedMembersTarget.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/DetectRedundantSuppressionsTrimmedMembersTarget.cs index caaa05a6a0bce2..df1634b0cd1a4c 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/DetectRedundantSuppressionsTrimmedMembersTarget.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/DetectRedundantSuppressionsTrimmedMembersTarget.cs @@ -23,6 +23,7 @@ namespace Mono.Linker.Tests.Cases.Warnings.WarningSuppression { [ExpectedNoWarnings] [SkipKeptItemsValidation] + [UnconditionalSuppressMessage ("AOT", "IL3050", Justification = "These tests are not targeted at AOT scenarios")] class DetectRedundantSuppressionsTrimmedMembersTarget { [ExpectedWarning ("IL2072")] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsInMembersAndTypesUsingTarget.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsInMembersAndTypesUsingTarget.cs index d00ac7d68fb484..c0098d1d1ff59d 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsInMembersAndTypesUsingTarget.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsInMembersAndTypesUsingTarget.cs @@ -17,6 +17,7 @@ namespace Mono.Linker.Tests.Cases.Warnings.WarningSuppression #endif [SkipKeptItemsValidation] [LogDoesNotContain ("TriggerUnrecognizedPattern()")] + [UnconditionalSuppressMessage ("AOT", "IL3050", Justification = "These tests are not targeted at AOT scenarios")] public class SuppressWarningsInMembersAndTypesUsingTarget { /// @@ -83,6 +84,7 @@ void Warning4 () } [ExpectedNoWarnings] + [UnconditionalSuppressMessage ("AOT", "IL3050", Justification = "These tests are not targeted at AOT scenarios")] public class WarningsInMembers { public void Method ()