From 6e06aef86f90cc867ade4be48ed8cddea5a3905d Mon Sep 17 00:00:00 2001 From: Ivan Maximov Date: Tue, 18 Feb 2025 12:16:59 +0300 Subject: [PATCH 01/27] Correct error message on DbDataSource batch prepare (#112609) --- .../System.Data.Common/src/System/Data/Common/DbDataSource.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/DbDataSource.cs b/src/libraries/System.Data.Common/src/System/Data/Common/DbDataSource.cs index 1f9528ca7e6d4a..566813eb362c14 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/DbDataSource.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/DbDataSource.cs @@ -561,10 +561,10 @@ public override async ValueTask DisposeAsync() // provide their own connection-less implementation anyway (i.e. interacting with the originating // DbDataSource), so they'd have to override this in any case. public override void Prepare() - => throw ExceptionBuilder.NotSupportedOnDataSourceCommand(); + => throw ExceptionBuilder.NotSupportedOnDataSourceBatch(); public override Task PrepareAsync(CancellationToken cancellationToken = default) - => Task.FromException(ExceptionBuilder.NotSupportedOnDataSourceCommand()); + => Task.FromException(ExceptionBuilder.NotSupportedOnDataSourceBatch()); // The below are incompatible with batches executed directly against DbDataSource, since no DbConnection // is involved at the user API level and the DbBatchWrapper owns the DbConnection. From d086ec6d86a850830874b6ca7599239152b208e3 Mon Sep 17 00:00:00 2001 From: Medha Tiwari <75640645+medhatiwari@users.noreply.github.com> Date: Tue, 18 Feb 2025 21:23:34 +0530 Subject: [PATCH 02/27] [System.DirectoryServices.Protocols] Fix ProtocolVersion Overflow on Big Endian Systems (#112391) --- .../Protocols/ldap/LdapSessionOptions.Linux.cs | 6 ------ .../Protocols/ldap/LdapSessionOptions.Windows.cs | 6 ------ .../DirectoryServices/Protocols/ldap/LdapSessionOptions.cs | 6 ++++++ 3 files changed, 6 insertions(+), 12 deletions(-) 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 5059c40499d5c6..821f9d47a92d93 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 @@ -55,12 +55,6 @@ public bool SecureSocketLayer } } - public int ProtocolVersion - { - get => GetPtrValueHelper(LdapOption.LDAP_OPT_VERSION).ToInt32(); - set => SetPtrValueHelper(LdapOption.LDAP_OPT_VERSION, new IntPtr(value)); - } - public ReferralChasingOptions ReferralChasing { get 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 cc73449104adf4..a01c9094a9bb56 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 @@ -34,12 +34,6 @@ public bool SecureSocketLayer [UnsupportedOSPlatform("windows")] public void StartNewTlsSessionContext() => throw new PlatformNotSupportedException(); - public int ProtocolVersion - { - get => GetIntValueHelper(LdapOption.LDAP_OPT_VERSION); - set => SetIntValueHelper(LdapOption.LDAP_OPT_VERSION, value); - } - public ReferralChasingOptions ReferralChasing { get diff --git a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.cs b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.cs index 42fae51688a49f..0967a05a69b453 100644 --- a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.cs +++ b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.cs @@ -757,6 +757,12 @@ public void StopTransportLayerSecurity() } } + public int ProtocolVersion + { + get => GetIntValueHelper(LdapOption.LDAP_OPT_VERSION); + set => SetIntValueHelper(LdapOption.LDAP_OPT_VERSION, value); + } + private int GetIntValueHelper(LdapOption option) { if (_connection._disposed) From c37cfcc6459605e7cd1e1311c6dc74ee087ec08c Mon Sep 17 00:00:00 2001 From: Aman Khalid Date: Tue, 18 Feb 2025 12:26:52 -0500 Subject: [PATCH 03/27] JIT: Use fgCalledCount in inlinee weight computation (#112499) I noticed that tweaking the computation of the entry weight for OSR methods (in service of #111915) incurred large inlining diffs. This is due to the fact that we use the entry block's weight to compute the normalized weight of a call site. This means we will get the wrong normalized weight for call sites when the entry block's weight diverges from the method's call count. This is currently possible only when the entry block is part of a loop, or when we compute a weight for the OSR entry fixup block that differs from fgCalledCount (which we almost always do). The correct thing to do is to use the root method's call count to normalize the call site's weight. --- src/coreclr/jit/importer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/jit/importer.cpp b/src/coreclr/jit/importer.cpp index bf408c330d777d..17f4f0dec4edfd 100644 --- a/src/coreclr/jit/importer.cpp +++ b/src/coreclr/jit/importer.cpp @@ -12940,7 +12940,7 @@ void Compiler::impMakeDiscretionaryInlineObservations(InlineInfo* pInlineInfo, I if ((pInlineInfo != nullptr) && rootCompiler->fgHaveSufficientProfileWeights()) { const weight_t callSiteWeight = pInlineInfo->iciBlock->bbWeight; - const weight_t entryWeight = rootCompiler->fgFirstBB->bbWeight; + const weight_t entryWeight = rootCompiler->fgCalledCount; profileFreq = fgProfileWeightsEqual(entryWeight, 0.0) ? 0.0 : callSiteWeight / entryWeight; hasProfile = true; From 5486a2664e7fdc2ae0d639d01dd59b7a39560f9b Mon Sep 17 00:00:00 2001 From: Egor Bogatov Date: Tue, 18 Feb 2025 18:37:48 +0100 Subject: [PATCH 04/27] Clone blocks with bounds checks (#112595) Co-authored-by: Jakob Botsch Nielsen --- src/coreclr/jit/CMakeLists.txt | 2 + src/coreclr/jit/block.h | 7 +- src/coreclr/jit/compiler.cpp | 9 + src/coreclr/jit/compiler.h | 10 +- src/coreclr/jit/compmemkind.h | 1 + src/coreclr/jit/compphases.h | 1 + src/coreclr/jit/promotiondecomposition.cpp | 2 +- src/coreclr/jit/rangecheck.cpp | 8 + src/coreclr/jit/rangecheckcloning.cpp | 592 +++++++++++++++++++++ src/coreclr/jit/rangecheckcloning.h | 90 ++++ src/coreclr/jit/valuenum.cpp | 39 ++ src/coreclr/jit/valuenum.h | 1 + 12 files changed, 754 insertions(+), 8 deletions(-) create mode 100644 src/coreclr/jit/rangecheckcloning.cpp create mode 100644 src/coreclr/jit/rangecheckcloning.h diff --git a/src/coreclr/jit/CMakeLists.txt b/src/coreclr/jit/CMakeLists.txt index 9ec67d98e47f3f..6f9a360ec2daa8 100644 --- a/src/coreclr/jit/CMakeLists.txt +++ b/src/coreclr/jit/CMakeLists.txt @@ -159,6 +159,7 @@ set( JIT_SOURCES promotiondecomposition.cpp promotionliveness.cpp rangecheck.cpp + rangecheckcloning.cpp rationalize.cpp redundantbranchopts.cpp regalloc.cpp @@ -356,6 +357,7 @@ set( JIT_HEADERS priorityqueue.h promotion.h rangecheck.h + rangecheckcloning.h rationalize.h regalloc.h registerargconvention.h diff --git a/src/coreclr/jit/block.h b/src/coreclr/jit/block.h index bb746593842a7c..b58c65cbb1e4d9 100644 --- a/src/coreclr/jit/block.h +++ b/src/coreclr/jit/block.h @@ -464,13 +464,14 @@ enum BasicBlockFlags : uint64_t BBF_HAS_VALUE_PROFILE = MAKE_BBFLAG(39), // Block has a node that needs a value probing BBF_HAS_NEWARR = MAKE_BBFLAG(40), // BB contains 'new' of an array type. + BBF_MAY_HAVE_BOUNDS_CHECKS = MAKE_BBFLAG(41), // BB *likely* has a bounds check (after rangecheck phase). // The following are sets of flags. // Flags to update when two blocks are compacted BBF_COMPACT_UPD = BBF_GC_SAFE_POINT | BBF_NEEDS_GCPOLL | BBF_HAS_JMP | BBF_HAS_IDX_LEN | BBF_HAS_MD_IDX_LEN | BBF_BACKWARD_JUMP | \ - BBF_HAS_NEWOBJ | BBF_HAS_NEWARR | BBF_HAS_NULLCHECK | BBF_HAS_MDARRAYREF | BBF_LOOP_HEAD, + BBF_HAS_NEWOBJ | BBF_HAS_NEWARR | BBF_HAS_NULLCHECK | BBF_HAS_MDARRAYREF | BBF_LOOP_HEAD | BBF_MAY_HAVE_BOUNDS_CHECKS, // Flags a block should not have had before it is split. @@ -489,14 +490,14 @@ enum BasicBlockFlags : uint64_t // TODO: Should BBF_RUN_RARELY be added to BBF_SPLIT_GAINED ? BBF_SPLIT_GAINED = BBF_DONT_REMOVE | BBF_HAS_JMP | BBF_BACKWARD_JUMP | BBF_HAS_IDX_LEN | BBF_HAS_MD_IDX_LEN | BBF_PROF_WEIGHT | BBF_HAS_NEWARR | \ - BBF_HAS_NEWOBJ | BBF_KEEP_BBJ_ALWAYS | BBF_CLONED_FINALLY_END | BBF_HAS_NULLCHECK | BBF_HAS_HISTOGRAM_PROFILE | BBF_HAS_VALUE_PROFILE | BBF_HAS_MDARRAYREF | BBF_NEEDS_GCPOLL, + BBF_HAS_NEWOBJ | BBF_KEEP_BBJ_ALWAYS | BBF_CLONED_FINALLY_END | BBF_HAS_NULLCHECK | BBF_HAS_HISTOGRAM_PROFILE | BBF_HAS_VALUE_PROFILE | BBF_HAS_MDARRAYREF | BBF_NEEDS_GCPOLL | BBF_MAY_HAVE_BOUNDS_CHECKS, // Flags that must be propagated to a new block if code is copied from a block to a new block. These are flags that // limit processing of a block if the code in question doesn't exist. This is conservative; we might not // have actually copied one of these type of tree nodes, but if we only copy a portion of the block's statements, // we don't know (unless we actually pay close attention during the copy). - BBF_COPY_PROPAGATE = BBF_HAS_NEWOBJ | BBF_HAS_NEWARR | BBF_HAS_NULLCHECK | BBF_HAS_IDX_LEN | BBF_HAS_MD_IDX_LEN | BBF_HAS_MDARRAYREF, + BBF_COPY_PROPAGATE = BBF_HAS_NEWOBJ | BBF_HAS_NEWARR | BBF_HAS_NULLCHECK | BBF_HAS_IDX_LEN | BBF_HAS_MD_IDX_LEN | BBF_HAS_MDARRAYREF | BBF_MAY_HAVE_BOUNDS_CHECKS, }; FORCEINLINE diff --git a/src/coreclr/jit/compiler.cpp b/src/coreclr/jit/compiler.cpp index ed6852d138bd17..78dc45557c24a8 100644 --- a/src/coreclr/jit/compiler.cpp +++ b/src/coreclr/jit/compiler.cpp @@ -4929,6 +4929,7 @@ void Compiler::compCompile(void** methodCodePtr, uint32_t* methodCodeSize, JitFl bool doAssertionProp = true; bool doVNBasedIntrinExpansion = true; bool doRangeAnalysis = true; + bool doRangeCheckCloning = true; bool doVNBasedDeadStoreRemoval = true; #if defined(OPT_CONFIG) @@ -4941,6 +4942,7 @@ void Compiler::compCompile(void** methodCodePtr, uint32_t* methodCodeSize, JitFl doCse = doValueNum; doAssertionProp = doValueNum && (JitConfig.JitDoAssertionProp() != 0); doRangeAnalysis = doAssertionProp && (JitConfig.JitDoRangeAnalysis() != 0); + doRangeCheckCloning = doValueNum && doRangeAnalysis; doOptimizeIVs = doAssertionProp && (JitConfig.JitDoOptimizeIVs() != 0); doVNBasedDeadStoreRemoval = doValueNum && (JitConfig.JitDoVNBasedDeadStoreRemoval() != 0); doVNBasedIntrinExpansion = doValueNum; @@ -5053,6 +5055,13 @@ void Compiler::compCompile(void** methodCodePtr, uint32_t* methodCodeSize, JitFl DoPhase(this, PHASE_VN_BASED_DEAD_STORE_REMOVAL, &Compiler::optVNBasedDeadStoreRemoval); } + if (doRangeCheckCloning) + { + // Clone blocks with subsequent bounds checks + // + DoPhase(this, PHASE_RANGE_CHECK_CLONING, &Compiler::optRangeCheckCloning); + } + if (doVNBasedIntrinExpansion) { // Expand some intrinsics based on VN data diff --git a/src/coreclr/jit/compiler.h b/src/coreclr/jit/compiler.h index ae1b0da5d21f34..d17f6558bd6e42 100644 --- a/src/coreclr/jit/compiler.h +++ b/src/coreclr/jit/compiler.h @@ -114,6 +114,7 @@ void* operator new[](size_t n, Compiler* context, CompMemKind cmk); // Requires the definitions of "operator new" so including "LoopCloning.h" after the definitions. #include "loopcloning.h" +#include "rangecheckcloning.h" /*****************************************************************************/ @@ -3809,7 +3810,7 @@ class Compiler bool gtStoreDefinesField( LclVarDsc* fieldVarDsc, ssize_t offset, unsigned size, ssize_t* pFieldStoreOffset, unsigned* pFieldStoreSize); - void gtPeelOffsets(GenTree** addr, target_ssize_t* offset, FieldSeq** fldSeq = nullptr); + void gtPeelOffsets(GenTree** addr, target_ssize_t* offset, FieldSeq** fldSeq = nullptr) const; // Return true if call is a recursive call; return false otherwise. // Note when inlining, this looks for calls back to the root method. @@ -6669,12 +6670,12 @@ class Compiler void fgInsertStmtAfter(BasicBlock* block, Statement* insertionPoint, Statement* stmt); void fgInsertStmtBefore(BasicBlock* block, Statement* insertionPoint, Statement* stmt); -private: - Statement* fgInsertStmtListAfter(BasicBlock* block, Statement* stmtAfter, Statement* stmtList); - // Create a new temporary variable to hold the result of *ppTree, // and transform the graph accordingly. GenTree* fgInsertCommaFormTemp(GenTree** ppTree); + +private: + Statement* fgInsertStmtListAfter(BasicBlock* block, Statement* stmtAfter, Statement* stmtList); TempInfo fgMakeTemp(GenTree* value); GenTree* fgMakeMultiUse(GenTree** ppTree); @@ -7219,6 +7220,7 @@ class Compiler bool optCanonicalizeExit(FlowGraphNaturalLoop* loop, BasicBlock* exit); PhaseStatus optCloneLoops(); + PhaseStatus optRangeCheckCloning(); bool optShouldCloneLoop(FlowGraphNaturalLoop* loop, LoopCloneContext* context); void optCloneLoop(FlowGraphNaturalLoop* loop, LoopCloneContext* context); PhaseStatus optUnrollLoops(); // Unrolls loops (needs to have cost info) diff --git a/src/coreclr/jit/compmemkind.h b/src/coreclr/jit/compmemkind.h index 6de55d070a6e9e..8b3f84a0cf3a45 100644 --- a/src/coreclr/jit/compmemkind.h +++ b/src/coreclr/jit/compmemkind.h @@ -66,6 +66,7 @@ CompMemKindMacro(ZeroInit) CompMemKindMacro(Pgo) CompMemKindMacro(MaskConversionOpt) CompMemKindMacro(TryRegionClone) +CompMemKindMacro(RangeCheckCloning) //clang-format on #undef CompMemKindMacro diff --git a/src/coreclr/jit/compphases.h b/src/coreclr/jit/compphases.h index 94eee3ba9bf5cd..d26c9305c87f8f 100644 --- a/src/coreclr/jit/compphases.h +++ b/src/coreclr/jit/compphases.h @@ -98,6 +98,7 @@ CompPhaseNameMacro(PHASE_VN_COPY_PROP, "VN based copy prop", CompPhaseNameMacro(PHASE_VN_BASED_INTRINSIC_EXPAND, "VN based intrinsic expansion", false, -1, false) CompPhaseNameMacro(PHASE_OPTIMIZE_BRANCHES, "Redundant branch opts", false, -1, false) CompPhaseNameMacro(PHASE_ASSERTION_PROP_MAIN, "Assertion prop", false, -1, false) +CompPhaseNameMacro(PHASE_RANGE_CHECK_CLONING, "Clone blocks with range checks", false, -1, false) CompPhaseNameMacro(PHASE_IF_CONVERSION, "If conversion", false, -1, false) CompPhaseNameMacro(PHASE_VN_BASED_DEAD_STORE_REMOVAL,"VN-based dead store removal", false, -1, false) CompPhaseNameMacro(PHASE_EMPTY_FINALLY_3, "Remove empty finally 3", false, -1, false) diff --git a/src/coreclr/jit/promotiondecomposition.cpp b/src/coreclr/jit/promotiondecomposition.cpp index e4db1ff6fa07e0..169de3bcceb970 100644 --- a/src/coreclr/jit/promotiondecomposition.cpp +++ b/src/coreclr/jit/promotiondecomposition.cpp @@ -1206,7 +1206,7 @@ class DecompositionPlan // offset - [out] The sum of offset peeled such that ADD(addr, offset) is equivalent to the original addr. // fldSeq - [out, optional] The combined field sequence for all the peeled offsets. // -void Compiler::gtPeelOffsets(GenTree** addr, target_ssize_t* offset, FieldSeq** fldSeq) +void Compiler::gtPeelOffsets(GenTree** addr, target_ssize_t* offset, FieldSeq** fldSeq) const { assert((*addr)->TypeIs(TYP_I_IMPL, TYP_BYREF, TYP_REF)); *offset = 0; diff --git a/src/coreclr/jit/rangecheck.cpp b/src/coreclr/jit/rangecheck.cpp index 3a7af1f94fa763..65ec3a88c77890 100644 --- a/src/coreclr/jit/rangecheck.cpp +++ b/src/coreclr/jit/rangecheck.cpp @@ -1732,6 +1732,14 @@ bool RangeCheck::OptimizeRangeChecks() return madeChanges; } + if (tree->OperIs(GT_BOUNDS_CHECK)) + { + // Leave a hint for optRangeCheckCloning to improve the JIT TP. + // NOTE: it doesn't have to be precise and being properly maintained + // during transformations, it's just a hint. + block->SetFlags(BBF_MAY_HAVE_BOUNDS_CHECKS); + } + OptimizeRangeCheck(block, stmt, tree); } diff --git a/src/coreclr/jit/rangecheckcloning.cpp b/src/coreclr/jit/rangecheckcloning.cpp new file mode 100644 index 00000000000000..eac1768eb03532 --- /dev/null +++ b/src/coreclr/jit/rangecheckcloning.cpp @@ -0,0 +1,592 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +#include "jitpch.h" +#include "rangecheckcloning.h" + +// This file contains the definition of the "Range check cloning" phase. +// +// The goal of this phase is to pick up range checks which were not optimized by the +// range check optimization phase and clone them to have "fast" and "slow" paths. +// This is similar to what the "Loop Cloning" phase does for loops. Example: +// +// arr[i + 1] = x; +// arr[i + 3] = y; +// arr[i + 5] = z; +// arr[i + 8] = w; +// +// assertprop/rangecheck phases give up on the above bounds checks because of the +// increasing offsets and there are no assertions that they can rely on. +// This phase handles such cases by cloning the entire block (only the affected statements +// to be precise) into "fast" and "slow" under a "cloned" condition: +// +// if (i >= 0 && i < arr.Length - 8) +// { +// // Fast path +// arr[i + 1] = x; // no bounds check +// arr[i + 3] = y; // no bounds check +// arr[i + 5] = z; // no bounds check +// arr[i + 8] = w; // no bounds check +// } +// else +// { +// // Slow path +// arr[i + 1] = x; // bounds check +// arr[i + 3] = y; // bounds check +// arr[i + 5] = w; // bounds check +// arr[i + 8] = w; // bounds check +// } +// +// The phase scans all statements in a block and groups the bounds checks based on +// "Base Index and Length" pairs (VNs). Then the phase takes the largest group and +// clones the block to have fast and slow paths. + +//------------------------------------------------------------------------------------ +// Initialize: Initialize the BoundsCheckInfo with the given bounds check node. +// and perform some basic legality checks. +// +// Arguments: +// comp - The compiler instance +// statement - The statement containing the bounds check +// bndChkNode - The bounds check node +// bndChkParentNode - The parent node of the bounds check node (either null or COMMA) +// +// Return Value: +// true if the initialization was successful, false otherwise. +// +bool BoundsCheckInfo::Initialize(const Compiler* comp, Statement* statement, GenTree** bndChk) +{ + assert((bndChk != nullptr) && ((*bndChk) != nullptr)); + + stmt = statement; + bndChkUse = bndChk; + idxVN = comp->vnStore->VNConservativeNormalValue(BndChk()->GetIndex()->gtVNPair); + lenVN = comp->vnStore->VNConservativeNormalValue(BndChk()->GetArrayLength()->gtVNPair); + if ((idxVN == ValueNumStore::NoVN) || (lenVN == ValueNumStore::NoVN)) + { + return false; + } + + if (BndChk()->GetIndex()->IsIntCnsFitsInI32()) + { + // Index being a constant means we have index=0 and cns offset + offset = static_cast(BndChk()->GetIndex()->AsIntCon()->IconValue()); + idxVN = comp->vnStore->VNZeroForType(TYP_INT); + } + else + { + if (comp->vnStore->TypeOfVN(idxVN) != TYP_INT) + { + return false; + } + + // Otherwise, peel the offset from the index using VN + comp->vnStore->PeelOffsetsI32(&idxVN, &offset); + assert(idxVN != ValueNumStore::NoVN); + } + assert(comp->vnStore->TypeOfVN(idxVN) == TYP_INT); + + if (offset < 0) + { + // Not supported yet. + return false; + } + return true; +} + +//------------------------------------------------------------------------------------ +// RemoveBoundsChk - Remove the given bounds check from the statement and the block. +// +// Arguments: +// comp - compiler instance +// check - bounds check node to remove +// comma - check's parent node (either null or COMMA) +// stmt - statement containing the bounds check +// +static void RemoveBoundsChk(Compiler* comp, GenTree** treeUse, Statement* stmt) +{ + JITDUMP("Before RemoveBoundsChk:\n"); + DISPTREE(*treeUse); + + GenTree* sideEffList = nullptr; + comp->gtExtractSideEffList(*treeUse, &sideEffList, GTF_SIDE_EFFECT, /*ignoreRoot*/ true); + *treeUse = (sideEffList != nullptr) ? sideEffList : comp->gtNewNothingNode(); + + comp->gtUpdateStmtSideEffects(stmt); + comp->gtSetStmtInfo(stmt); + comp->fgSetStmtSeq(stmt); + + JITDUMP("After RemoveBoundsChk:\n"); + DISPTREE(stmt->GetRootNode()); +} + +// ----------------------------------------------------------------------------- +// optRangeCheckCloning_DoClone: Perform the actual range check cloning for the given range +// of bounds checks. All the legality checks are done before calling this function. +// This function effectively converts a single block (containing bounds checks) into: +// +// prevBb: +// goto lowerBndBb +// +// lowerBndBb: +// if (idx < 0) +// goto fallbackBb +// else +// goto upperBndBb +// +// upperBndBb: +// if (idx < len - maxConstOffset) +// goto fastpathBb +// else +// goto fallbackBb +// +// fallbackBb: +// [Original block with bounds checks] +// goto nextBb +// +// fastpathBb: +// [Cloned block with no bounds checks] +// goto nextBb +// +// nextBb: +// ... +// +// Arguments: +// comp - The compiler instance +// block - The block to clone +// bndChkStack - The stack of bounds checks to clone +// +// Return Value: +// The block containing the fast path. +// +static BasicBlock* optRangeCheckCloning_DoClone(Compiler* comp, BasicBlock* block, BoundsCheckInfoStack* bndChkStack) +{ + assert(block != nullptr); + assert(bndChkStack->Height() > 0); + + // The bound checks are in the execution order (top of the stack is the last check) + BoundsCheckInfo firstCheck = bndChkStack->Bottom(); + BoundsCheckInfo lastCheck = bndChkStack->Top(); + BasicBlock* prevBb = block; + + // First, split the block at the first bounds check using gtSplitTree (via fgSplitBlockBeforeTree): + GenTree** bndChkUse; + Statement* newFirstStmt; + BasicBlock* fastpathBb = + comp->fgSplitBlockBeforeTree(block, firstCheck.stmt, firstCheck.BndChk(), &newFirstStmt, &bndChkUse); + + // Perform the usual routine after gtSplitTree: + while ((newFirstStmt != nullptr) && (newFirstStmt != firstCheck.stmt)) + { + comp->fgMorphStmtBlockOps(fastpathBb, newFirstStmt); + newFirstStmt = newFirstStmt->GetNextStmt(); + } + comp->fgMorphStmtBlockOps(fastpathBb, firstCheck.stmt); + comp->gtUpdateStmtSideEffects(firstCheck.stmt); + + // Now split the block at the last bounds check using fgSplitBlockAfterStatement: + // TODO-RangeCheckCloning: call gtSplitTree for lastBndChkStmt as well, to cut off + // the stuff we don't have to clone. + BasicBlock* lastBb = comp->fgSplitBlockAfterStatement(fastpathBb, lastCheck.stmt); + + DebugInfo debugInfo = fastpathBb->firstStmt()->GetDebugInfo(); + + // Find the maximum offset + int offset = 0; + for (int i = 0; i < bndChkStack->Height(); i++) + { + offset = max(offset, bndChkStack->Top(i).offset); + } + assert(offset >= 0); + + GenTree* idx = comp->gtCloneExpr(firstCheck.BndChk()->GetIndex()); + GenTree* arrLen = comp->gtCloneExpr(firstCheck.BndChk()->GetArrayLength()); + + // gtSplitTree is expected to spill the side effects of the index and array length expressions + assert((idx->gtFlags & GTF_ALL_EFFECT) == 0); + assert((arrLen->gtFlags & GTF_ALL_EFFECT) == 0); + + // Since we're re-using the index node from the first bounds check and its value was spilled + // by the tree split, we need to restore the base index by subtracting the offset. + // Hopefully, someone will fold this back into the index expression. + // + GenTree* idxClone; + if (firstCheck.offset > 0) + { + GenTree* offsetNode = comp->gtNewIconNode(-firstCheck.offset); // never overflows + idx = comp->gtNewOperNode(GT_ADD, TYP_INT, idx, offsetNode); + idxClone = comp->fgInsertCommaFormTemp(&idx); + } + else + { + idxClone = comp->gtCloneExpr(idx); + } + + // 1) lowerBndBb: + // + // if (i < 0) + // goto fallbackBb + // else + // goto upperBndBb + // + GenTreeOp* idxLowerBoundTree = comp->gtNewOperNode(GT_LT, TYP_INT, comp->gtCloneExpr(idx), comp->gtNewIconNode(0)); + idxLowerBoundTree->gtFlags |= GTF_RELOP_JMP_USED; + GenTree* jtrue = comp->gtNewOperNode(GT_JTRUE, TYP_VOID, idxLowerBoundTree); + BasicBlock* lowerBndBb = comp->fgNewBBFromTreeAfter(BBJ_COND, prevBb, jtrue, debugInfo); + + JITDUMP("\nLower bound check:\n"); + DISPTREE(jtrue); + + // 2) upperBndBb: + // + // if (i < arrLen - indexOffset) + // goto fastpathBb + // else + // goto fallbackBb + // + GenTreeOp* idxUpperBoundTree; + if (idx->IsIntegralConst(0)) + { + // if the index is just 0, then we can simplify the condition to "arrLen > indexOffset" + idxUpperBoundTree = comp->gtNewOperNode(GT_GT, TYP_INT, arrLen, comp->gtNewIconNode(offset)); + } + else + { + // "i < arrLen + (-indexOffset)" + GenTree* negOffset = comp->gtNewIconNode(-offset); // never overflows + GenTreeOp* subNode = comp->gtNewOperNode(GT_ADD, TYP_INT, arrLen, negOffset); + idxUpperBoundTree = comp->gtNewOperNode(GT_LT, TYP_INT, idxClone, subNode); + } + idxUpperBoundTree->gtFlags |= GTF_RELOP_JMP_USED; + jtrue = comp->gtNewOperNode(GT_JTRUE, TYP_VOID, idxUpperBoundTree); + BasicBlock* upperBndBb = comp->fgNewBBFromTreeAfter(BBJ_COND, lowerBndBb, jtrue, debugInfo); + + JITDUMP("\nUpper bound check:\n"); + DISPTREE(jtrue); + + // 3) fallbackBb: + // + // For the fallback (slow path), we just entirely clone the fast path. + // + BasicBlock* fallbackBb = comp->fgNewBBafter(BBJ_ALWAYS, upperBndBb, false); + BasicBlock::CloneBlockState(comp, fallbackBb, fastpathBb); + + // 4) fastBlockBb: + // + // No actions needed - it's our current block as is. + + // Wire up the edges + // + comp->fgRedirectTargetEdge(prevBb, lowerBndBb); + FlowEdge* fallbackToNextBb = comp->fgAddRefPred(lastBb, fallbackBb); + FlowEdge* lowerBndToUpperBndEdge = comp->fgAddRefPred(upperBndBb, lowerBndBb); + FlowEdge* lowerBndToFallbackEdge = comp->fgAddRefPred(fallbackBb, lowerBndBb); + FlowEdge* upperBndToFastPathEdge = comp->fgAddRefPred(fastpathBb, upperBndBb); + FlowEdge* upperBndToFallbackEdge = comp->fgAddRefPred(fallbackBb, upperBndBb); + fallbackBb->SetTargetEdge(fallbackToNextBb); + lowerBndBb->SetTrueEdge(lowerBndToFallbackEdge); + lowerBndBb->SetFalseEdge(lowerBndToUpperBndEdge); + upperBndBb->SetTrueEdge(upperBndToFastPathEdge); + upperBndBb->SetFalseEdge(upperBndToFallbackEdge); + + // Set the weights. We assume that the fallback is rarely taken. + // + lowerBndBb->inheritWeight(prevBb); + upperBndBb->inheritWeight(prevBb); + fastpathBb->inheritWeight(prevBb); + fallbackBb->bbSetRunRarely(); + fallbackToNextBb->setLikelihood(1.0f); + lowerBndToUpperBndEdge->setLikelihood(1.0f); + lowerBndToFallbackEdge->setLikelihood(0.0f); + upperBndToFastPathEdge->setLikelihood(1.0f); + upperBndToFallbackEdge->setLikelihood(0.0f); + + lowerBndBb->SetFlags(BBF_INTERNAL); + upperBndBb->SetFlags(BBF_INTERNAL | BBF_HAS_IDX_LEN); + + // Now drop the bounds check from the fast path + while (!bndChkStack->Empty()) + { + BoundsCheckInfo info = bndChkStack->Pop(); +#if DEBUG + // Ensure that the bounds check that we're removing is in the fast path: + bool statementFound = false; + for (Statement* const stmt : fastpathBb->Statements()) + { + if (stmt == info.stmt) + { + statementFound = true; + + // Find the bndChk in the statement + Compiler::fgWalkResult result = comp->fgWalkTreePre( + stmt->GetRootNodePointer(), + [](GenTree** pTree, Compiler::fgWalkData* data) -> Compiler::fgWalkResult { + return (*pTree == (GenTree*)data->pCallbackData) ? Compiler::WALK_ABORT : Compiler::WALK_CONTINUE; + }, + info.BndChk()); + // We don't need to validate bndChkParent - RemoveBoundsChk will do it for us + assert(result == Compiler::WALK_ABORT); + break; + } + } + assert(statementFound); +#endif + RemoveBoundsChk(comp, info.bndChkUse, info.stmt); + } + + comp->fgMorphBlockStmt(lowerBndBb, lowerBndBb->lastStmt() DEBUGARG("Morph lowerBnd")); + comp->fgMorphBlockStmt(upperBndBb, upperBndBb->lastStmt() DEBUGARG("Morph upperBnd")); + if (lowerBndBb->lastStmt() != nullptr) + { + // lowerBndBb might be converted into no-op by fgMorphBlockStmt(lowerBndBb) + // it happens when we emit BBJ_COND(0 >= 0) fake block (for simplicity) + comp->gtUpdateStmtSideEffects(lowerBndBb->lastStmt()); + } + comp->gtUpdateStmtSideEffects(upperBndBb->lastStmt()); + + // All blocks must be in the same EH region + assert(BasicBlock::sameEHRegion(prevBb, lowerBndBb)); + assert(BasicBlock::sameEHRegion(prevBb, upperBndBb)); + assert(BasicBlock::sameEHRegion(prevBb, fastpathBb)); + assert(BasicBlock::sameEHRegion(prevBb, fallbackBb)); + assert(BasicBlock::sameEHRegion(prevBb, lastBb)); + + return fastpathBb; +} + +// A visitor to record all the bounds checks in a statement in the execution order +class BoundsChecksVisitor final : public GenTreeVisitor +{ + Statement* m_stmt; + ArrayStack* m_boundsChks; + +public: + enum + { + DoPostOrder = true, + DoPreOrder = true, + UseExecutionOrder = true + }; + + BoundsChecksVisitor(Compiler* compiler, Statement* stmt, ArrayStack* bndChkLocations) + : GenTreeVisitor(compiler) + , m_stmt(stmt) + , m_boundsChks(bndChkLocations) + { + } + + fgWalkResult PreOrderVisit(GenTree** use, GenTree* user) + { + // No GTF_EXCEPT - no bounds check down the tree + if (((*use)->gtFlags & GTF_EXCEPT) == 0) + { + return fgWalkResult::WALK_SKIP_SUBTREES; + } + return fgWalkResult::WALK_CONTINUE; + } + + fgWalkResult PostOrderVisit(GenTree** use, GenTree* user) + { + if ((*use)->OperIs(GT_BOUNDS_CHECK)) + { + m_boundsChks->Push(BoundCheckLocation(m_stmt, use)); + } + return fgWalkResult::WALK_CONTINUE; + } +}; + +// ----------------------------------------------------------------------------- +// DoesComplexityExceed: Check if the complexity of the bounds checks exceeds the budget. +// We want to avoid cloning blocks with too many unrelated trees/statements between +// the bounds checks. +// +// Arguments: +// bndChks - The stack of bounds checks +// +// Return Value: +// true if the complexity exceeds the budget, false otherwise. +// +static bool DoesComplexityExceed(Compiler* comp, ArrayStack* bndChks) +{ + Statement* firstBndChkStmt = bndChks->Bottom().stmt; + Statement* lastBndChkStmt = bndChks->Top().stmt; + + JITDUMP("Checking complexity from " FMT_STMT " to " FMT_STMT "\n", firstBndChkStmt->GetID(), + lastBndChkStmt->GetID()); + + assert(bndChks->Height() <= MAX_CHECKS_PER_GROUP); + + // An average statement with a bounds check is ~20 nodes. There can be statements + // between the bounds checks (i.e. bounds checks from another groups). So let's say + // our budget is 40 nodes per bounds check. + unsigned budget = bndChks->Height() * BUDGET_MULTIPLIER; + JITDUMP("\tBudget: %d nodes.\n", budget); + + Statement* currentStmt = firstBndChkStmt; + while (currentStmt != lastBndChkStmt) + { + GenTree* rootNode = currentStmt->GetRootNode(); + if (rootNode != nullptr) + { + unsigned actual = 0; + if (comp->gtComplexityExceeds(rootNode, budget, &actual)) + { + JITDUMP("\tExceeded budget!"); + return true; + } + JITDUMP("\t\tSubtracting %d from budget in " FMT_STMT " statement\n", actual, currentStmt->GetID()); + budget -= actual; + } + currentStmt = currentStmt->GetNextStmt(); + } + + JITDUMP("Complexity is within budget: %d\n", budget); + return false; +} + +// ----------------------------------------------------------------------------- +// optRangeCheckCloning: The main entry point for the range check cloning phase. +// This phase scans all the blocks in the method and groups the bounds checks +// in each block by the "Base Index and Length" pairs (VNs). Then it picks up +// the largest group and clones the block to have fast and slow paths in order +// to optimize the bounds checks in the fast path. +// See the overview at the top of the file and the comments in the optRangeCheckCloning_DoClone +// function for more details. +// +// Return Value: +// The status of the phase after the transformation. +// +PhaseStatus Compiler::optRangeCheckCloning() +{ + if (!doesMethodHaveBoundsChecks()) + { + JITDUMP("Current method has no bounds checks\n"); + return PhaseStatus::MODIFIED_NOTHING; + } + + const bool preferSize = opts.jitFlags->IsSet(JitFlags::JIT_FLAG_SIZE_OPT); + if (preferSize) + { + // The optimization comes with a codegen size increase + JITDUMP("Optimized for size - bail out.\n"); + return PhaseStatus::MODIFIED_NOTHING; + } + + bool modified = false; + + // An array to keep all the bounds checks in the block + // Strictly speaking, we don't need this array and can group the bounds checks + // right as we walk them, but this helps to improve the TP/Memory usage + // as many blocks don't have enough bounds checks to clone anyway. + ArrayStack bndChkLocations(getAllocator(CMK_RangeCheckCloning)); + + // A map to group the bounds checks by the base index and length VNs + BoundsCheckInfoMap bndChkMap(getAllocator(CMK_RangeCheckCloning)); + + for (BasicBlock* block = fgFirstBB; block != nullptr; block = block->Next()) + { + if (!block->HasFlag(BBF_MAY_HAVE_BOUNDS_CHECKS)) + { + // TP optimization - skip blocks that *likely* don't have bounds checks + continue; + } + + if (block->isRunRarely() || block->KindIs(BBJ_THROW)) + { + continue; + } + + bndChkLocations.Reset(); + bndChkMap.RemoveAll(); + + for (Statement* const stmt : block->Statements()) + { + if (block->HasTerminator() && (stmt == block->lastStmt())) + { + // TODO-RangeCheckCloning: Splitting these blocks at the last statements + // require using gtSplitTree for the last bounds check. + break; + } + + // Now just record all the bounds checks in the block (in the execution order) + // + BoundsChecksVisitor visitor(this, stmt, &bndChkLocations); + visitor.WalkTree(stmt->GetRootNodePointer(), nullptr); + } + + if (bndChkLocations.Height() < MIN_CHECKS_PER_GROUP) + { + JITDUMP("Not enough bounds checks in the block - bail out.\n"); + continue; + } + + // Now we need to group the bounds checks by the base index and length VNs. + // We could do it directly in the visitor above and avoid this O(n) pass, + // but it's more TP/Memory wise to use stack-allocated ArrayStack first and + // bail out on Height() < MAX_CHECKS_PER_GROUP) + { + (*value)->Push(bci); + } + } + } + + if (bndChkMap.GetCount() == 0) + { + JITDUMP("No bounds checks in the block - bail out.\n"); + continue; + } + + // Now choose the largest group of bounds checks (the one with the most checks) + BoundsCheckInfoStack* largestGroup = nullptr; + for (BoundsCheckInfoMap::Node* keyValuePair : BoundsCheckInfoMap::KeyValueIteration(&bndChkMap)) + { + ArrayStack* value = keyValuePair->GetValue(); + if ((largestGroup == nullptr) || (value->Height() > largestGroup->Height())) + { + if (DoesComplexityExceed(this, value)) + { + continue; + } + largestGroup = value; + } + } + + if (largestGroup == nullptr) + { + JITDUMP("No suitable group of bounds checks in the block - bail out.\n"); + continue; + } + + if (largestGroup->Height() < MIN_CHECKS_PER_GROUP) + { + JITDUMP("Not enough bounds checks in the largest group - bail out.\n"); + continue; + } + + JITDUMP("Cloning bounds checks in " FMT_BB "\n", block->bbNum); + block = optRangeCheckCloning_DoClone(this, block, largestGroup); + modified = true; + } + + if (modified) + { + return PhaseStatus::MODIFIED_EVERYTHING; + } + + return PhaseStatus::MODIFIED_NOTHING; +} diff --git a/src/coreclr/jit/rangecheckcloning.h b/src/coreclr/jit/rangecheckcloning.h new file mode 100644 index 00000000000000..d6f2903e4dbce1 --- /dev/null +++ b/src/coreclr/jit/rangecheckcloning.h @@ -0,0 +1,90 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +#pragma once + +// This file contains the definition of the "Range check cloning" phase. +// +// See rangecheckcloning.cpp for context and overview. +// + +// Min number of bounds checks required to form a group +#define MIN_CHECKS_PER_GROUP 4 + +// Max number of bounds checks allowed in a group. +// This is just an arbitrary number to avoid cloning too many checks. +#define MAX_CHECKS_PER_GROUP 64 + +// See comments in DoesComplexityExceed function for more details. +#define BUDGET_MULTIPLIER 40 + +struct BoundCheckLocation +{ + Statement* stmt; + GenTree** bndChkUse; + + BoundCheckLocation(Statement* stmt, GenTree** bndChkUse) + : stmt(stmt) + , bndChkUse(bndChkUse) + { + assert(stmt != nullptr); + assert((bndChkUse != nullptr)); + assert((*bndChkUse) != nullptr); + assert((*bndChkUse)->OperIs(GT_BOUNDS_CHECK)); + } +}; + +struct BoundsCheckInfo +{ + Statement* stmt; + GenTree** bndChkUse; + ValueNum lenVN; + ValueNum idxVN; + int offset; + + BoundsCheckInfo() + : stmt(nullptr) + , bndChkUse(nullptr) + , lenVN(ValueNumStore::NoVN) + , idxVN(ValueNumStore::NoVN) + , offset(0) + { + } + + bool Initialize(const Compiler* comp, Statement* statement, GenTree** bndChkUse); + + GenTreeBoundsChk* BndChk() const + { + return (*bndChkUse)->AsBoundsChk(); + } +}; + +struct IdxLenPair +{ + IdxLenPair(ValueNum idx, ValueNum len) + : idxVN(idx) + , lenVN(len) + { + } + + ValueNum idxVN; + ValueNum lenVN; +}; + +struct LargePrimitiveKeyFuncsIdxLenPair +{ + static unsigned GetHashCode(const IdxLenPair& val) + { + // VNs are mostly small integers + return val.idxVN ^ (val.lenVN << 16); + } + + static bool Equals(const IdxLenPair& x, const IdxLenPair& y) + { + return (x.idxVN == y.idxVN) && (x.lenVN == y.lenVN); + } +}; + +typedef ArrayStack BoundsCheckInfoStack; + +typedef JitHashTable BoundsCheckInfoMap; diff --git a/src/coreclr/jit/valuenum.cpp b/src/coreclr/jit/valuenum.cpp index 3d2c3d2e62e8df..4760835c605880 100644 --- a/src/coreclr/jit/valuenum.cpp +++ b/src/coreclr/jit/valuenum.cpp @@ -15186,3 +15186,42 @@ void ValueNumStore::PeelOffsets(ValueNum* vn, target_ssize_t* offset) } } } + +//-------------------------------------------------------------------------------- +// PeelOffsetsI32: Peel all additions with a TYP_INT constant offset away from the +// specified VN. +// +// Arguments: +// vn - [in, out] The VN. Will be modified to the base VN that the offsets are added to. +// offset - [out] The offsets peeled out of the VNF_ADD funcs. +// +void ValueNumStore::PeelOffsetsI32(ValueNum* vn, int* offset) +{ + *offset = 0; + VNFuncApp app; + while (GetVNFunc(*vn, &app) && (app.m_func == VNF_ADD)) + { + ValueNum op1 = app.m_args[0]; + ValueNum op2 = app.m_args[1]; + + if ((TypeOfVN(op1) != TYP_INT) || (TypeOfVN(op2) != TYP_INT)) + { + break; + } + + if (IsVNInt32Constant(op1) && !IsVNHandle(op1)) + { + *offset += ConstantValue(op1); + *vn = op2; + } + else if (IsVNInt32Constant(op2) && !IsVNHandle(op2)) + { + *offset += ConstantValue(op2); + *vn = op1; + } + else + { + break; + } + } +} diff --git a/src/coreclr/jit/valuenum.h b/src/coreclr/jit/valuenum.h index f2ae7be7a4cabe..95a277d44207a1 100644 --- a/src/coreclr/jit/valuenum.h +++ b/src/coreclr/jit/valuenum.h @@ -529,6 +529,7 @@ class ValueNumStore CORINFO_CLASS_HANDLE GetObjectType(ValueNum vn, bool* pIsExact, bool* pIsNonNull); void PeelOffsets(ValueNum* vn, target_ssize_t* offset); + void PeelOffsetsI32(ValueNum* vn, int* offset); typedef JitHashTable, bool> ValueNumSet; From ad0600cd06eb8aa0bf8d7b118fcc60a48ad1b6cc Mon Sep 17 00:00:00 2001 From: Clinton Ingram Date: Tue, 18 Feb 2025 10:15:37 -0800 Subject: [PATCH 05/27] fix BMI peephole asserts (#111837) --- src/coreclr/jit/lowerxarch.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/coreclr/jit/lowerxarch.cpp b/src/coreclr/jit/lowerxarch.cpp index 2f99e1a1423f5d..f5027e142de353 100644 --- a/src/coreclr/jit/lowerxarch.cpp +++ b/src/coreclr/jit/lowerxarch.cpp @@ -7091,9 +7091,9 @@ GenTree* Lowering::TryLowerAndOpToResetLowestSetBit(GenTreeOp* andNode) JITDUMP("to:\n"); DISPNODE(blsrNode); + BlockRange().InsertBefore(andNode, blsrNode); use.ReplaceWith(blsrNode); - BlockRange().InsertBefore(andNode, blsrNode); BlockRange().Remove(andNode); BlockRange().Remove(op2); BlockRange().Remove(addOp1); @@ -7176,9 +7176,9 @@ GenTree* Lowering::TryLowerAndOpToExtractLowestSetBit(GenTreeOp* andNode) JITDUMP("to:\n"); DISPNODE(blsiNode); + BlockRange().InsertBefore(andNode, blsiNode); use.ReplaceWith(blsiNode); - BlockRange().InsertBefore(andNode, blsiNode); BlockRange().Remove(andNode); BlockRange().Remove(negNode); BlockRange().Remove(negOp); @@ -7263,9 +7263,9 @@ GenTree* Lowering::TryLowerAndOpToAndNot(GenTreeOp* andNode) JITDUMP("to:\n"); DISPNODE(andnNode); + BlockRange().InsertBefore(andNode, andnNode); use.ReplaceWith(andnNode); - BlockRange().InsertBefore(andNode, andnNode); BlockRange().Remove(andNode); BlockRange().Remove(notNode); @@ -7348,9 +7348,9 @@ GenTree* Lowering::TryLowerXorOpToGetMaskUpToLowestSetBit(GenTreeOp* xorNode) JITDUMP("to:\n"); DISPNODE(blsmskNode); + BlockRange().InsertBefore(xorNode, blsmskNode); use.ReplaceWith(blsmskNode); - BlockRange().InsertBefore(xorNode, blsmskNode); BlockRange().Remove(xorNode); BlockRange().Remove(op2); BlockRange().Remove(addOp1); From 13e15b1f03a341d476421b92e63e6df183476912 Mon Sep 17 00:00:00 2001 From: Elinor Fung Date: Tue, 18 Feb 2025 10:47:57 -0800 Subject: [PATCH 06/27] Allow publishing AndroidSampleApp with R2R using in-build crossgen2 (#112547) Use the in-build crossgen2 to publish `AndroidSampleApp` if `PublishReadyToRun` is set to `true`. I left it off in the project, but it can now be enabled. Makefile can be used to set it via `R2R` and `R2R_COMPOSITE`. Also remove `corerun` from the Android local runtime pack. --- src/libraries/externals.csproj | 4 ++-- .../android/build/AndroidBuild.InTree.targets | 15 +++++++++++++++ src/mono/sample/Android/AndroidSampleApp.csproj | 9 ++++++--- src/mono/sample/Android/Makefile | 4 ++++ 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/src/libraries/externals.csproj b/src/libraries/externals.csproj index 4b12dc2dca1045..480419db34f86f 100644 --- a/src/libraries/externals.csproj +++ b/src/libraries/externals.csproj @@ -86,8 +86,8 @@ - - + + diff --git a/src/mono/msbuild/android/build/AndroidBuild.InTree.targets b/src/mono/msbuild/android/build/AndroidBuild.InTree.targets index 3a087180c3eb12..ed3562c65694d2 100644 --- a/src/mono/msbuild/android/build/AndroidBuild.InTree.targets +++ b/src/mono/msbuild/android/build/AndroidBuild.InTree.targets @@ -22,4 +22,19 @@ + + + + + $([MSBuild]::NormalizePath('$(Crossgen2InBuildDir)', 'crossgen2$(ExeSuffix)')) + + + + + + diff --git a/src/mono/sample/Android/AndroidSampleApp.csproj b/src/mono/sample/Android/AndroidSampleApp.csproj index c10a8ce68ed6e1..da1831c158aa35 100644 --- a/src/mono/sample/Android/AndroidSampleApp.csproj +++ b/src/mono/sample/Android/AndroidSampleApp.csproj @@ -25,7 +25,10 @@ - + + + $(MonoProjectRoot)\msbuild\android\build\AndroidBuild.InTree.targets + - diff --git a/src/mono/sample/Android/Makefile b/src/mono/sample/Android/Makefile index 90c9ff458da1ef..d04e61e8c86f83 100644 --- a/src/mono/sample/Android/Makefile +++ b/src/mono/sample/Android/Makefile @@ -7,6 +7,8 @@ AOT_WITH_LIBRARY_FILES=false INTERP=false DEPLOY_AND_RUN?=true RUNTIME_FLAVOR?=Mono +R2R?=false +R2R_COMPOSITE?=false #If DIAGNOSTIC_PORTS is enabled, @(RuntimeComponents) must also include 'diagnostics_tracing'. #If @(RuntimeComponents) includes 'diagnostics_tracing', DIAGNOSTIC_PORTS is optional. @@ -48,6 +50,8 @@ run: appbuilder /p:RunActivity=false \ '/p:DiagnosticPorts="$(DIAGNOSTIC_PORTS)"' \ /p:RuntimeFlavor=$(RUNTIME_FLAVOR) \ + /p:PublishReadyToRun=$(R2R) \ + /p:PublishReadyToRunComposite=$(R2R_COMPOSITE) \ /bl clean: rm -rf $(REPO_DIR)/artifacts/bin/AndroidSampleApp From a8ce39671047f341dee551777d2d383596af601c Mon Sep 17 00:00:00 2001 From: Steve Pfister Date: Tue, 18 Feb 2025 13:49:04 -0500 Subject: [PATCH 07/27] [android] Fix java runner to not assume zip format when unzipping (#112654) After https://github.com/dotnet/runtime/pull/112256 landed, there was a change to zip the test assets using `ZipFile.CreateFromDirectory` for cross platform support. This regressed `unzipAssets` in `MonoRunner.java` because it naivley assumed that directories would come before files in the zip archive. This change fixes the problem by making sure directories are created first before writing files to disk. Fixes https://github.com/dotnet/runtime/issues/112558 --- .../Templates/MonoRunner.java | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/tasks/AndroidAppBuilder/Templates/MonoRunner.java b/src/tasks/AndroidAppBuilder/Templates/MonoRunner.java index cb017daafcfdc1..f8938e9fff316c 100644 --- a/src/tasks/AndroidAppBuilder/Templates/MonoRunner.java +++ b/src/tasks/AndroidAppBuilder/Templates/MonoRunner.java @@ -146,33 +146,34 @@ public void onDestroy() { static void unzipAssets(Context context, String toPath, String zipName) { AssetManager assetManager = context.getAssets(); - try { - InputStream inputStream = assetManager.open(zipName); - ZipInputStream zipInputStream = new ZipInputStream(new BufferedInputStream(inputStream)); + try (InputStream inputStream = assetManager.open(zipName); + ZipInputStream zipInputStream = new ZipInputStream(new BufferedInputStream(inputStream))) { + ZipEntry zipEntry; byte[] buffer = new byte[4096]; while ((zipEntry = zipInputStream.getNextEntry()) != null) { String fileOrDirectory = zipEntry.getName(); - Uri.Builder builder = new Uri.Builder(); - builder.scheme("file"); - builder.appendPath(toPath); - builder.appendPath(fileOrDirectory); - String fullToPath = builder.build().getPath(); + File file = new File(toPath, fileOrDirectory); + File parent = new File(file.getParent()); + if (zipEntry.isDirectory()) { - File directory = new File(fullToPath); - directory.mkdirs(); + file.mkdirs(); continue; } + else if (!parent.exists()) { + parent.mkdirs(); + } + + String fullToPath = file.getAbsolutePath(); Log.i("DOTNET", "Extracting asset to " + fullToPath); + int count = 0; FileOutputStream fileOutputStream = new FileOutputStream(fullToPath); while ((count = zipInputStream.read(buffer)) != -1) { fileOutputStream.write(buffer, 0, count); } - fileOutputStream.close(); zipInputStream.closeEntry(); } - zipInputStream.close(); } catch (IOException e) { Log.e("DOTNET", e.getLocalizedMessage()); } From 3511af8bb9d97b1e8e2deca45fe4a2809cdd1399 Mon Sep 17 00:00:00 2001 From: Jakob Botsch Nielsen Date: Tue, 18 Feb 2025 20:06:55 +0100 Subject: [PATCH 08/27] JIT: Support `FIELD_LIST` for returns (#112308) * Add support for returned `FIELD_LIST` nodes in the backend. Until lowering these are supported with arbitrary fields; unlike call arguments the fields are not required to map cleanly to registers. After lowering the fields must map cleanly to the return registers. Lowering is responsible for ensuring this property. * Teach physical promotion to produce `FIELD_LIST` nodes for returned promoted struct locals. Currently lowering ensures the property simply by spilling when the fields do not already map cleanly to registers. In the future it can be taught more efficient ways to recombine the fields to the returned registers. Another step towards supporting the same cases as old promotion with physical promotion. --- src/coreclr/jit/codegen.h | 2 +- src/coreclr/jit/codegenarmarch.cpp | 2 +- src/coreclr/jit/codegencommon.cpp | 31 ++++- src/coreclr/jit/codegenxarch.cpp | 2 +- src/coreclr/jit/compiler.h | 2 + src/coreclr/jit/gentree.cpp | 29 +++++ src/coreclr/jit/gentree.h | 8 +- src/coreclr/jit/lclvars.cpp | 16 +++ src/coreclr/jit/lower.cpp | 134 +++++++++++++++++++- src/coreclr/jit/lower.h | 2 + src/coreclr/jit/lsrabuild.cpp | 16 +++ src/coreclr/jit/morph.cpp | 48 ++++--- src/coreclr/jit/promotion.cpp | 196 ++++++++++++++++++++++++++++- src/coreclr/jit/promotion.h | 3 + 14 files changed, 445 insertions(+), 46 deletions(-) diff --git a/src/coreclr/jit/codegen.h b/src/coreclr/jit/codegen.h index c9b0839ecd9867..b26c93534b2f9d 100644 --- a/src/coreclr/jit/codegen.h +++ b/src/coreclr/jit/codegen.h @@ -1355,7 +1355,7 @@ class CodeGen final : public CodeGenInterface // Codegen for multi-register struct returns. bool isStructReturn(GenTree* treeNode); #ifdef FEATURE_SIMD - void genSIMDSplitReturn(GenTree* src, ReturnTypeDesc* retTypeDesc); + void genSIMDSplitReturn(GenTree* src, const ReturnTypeDesc* retTypeDesc); #endif void genStructReturn(GenTree* treeNode); diff --git a/src/coreclr/jit/codegenarmarch.cpp b/src/coreclr/jit/codegenarmarch.cpp index 3b7aa126e3c49d..21fb0691bc2451 100644 --- a/src/coreclr/jit/codegenarmarch.cpp +++ b/src/coreclr/jit/codegenarmarch.cpp @@ -4528,7 +4528,7 @@ void CodeGen::genLeaInstruction(GenTreeAddrMode* lea) // src - The source of the return // retTypeDesc - The return type descriptor. // -void CodeGen::genSIMDSplitReturn(GenTree* src, ReturnTypeDesc* retTypeDesc) +void CodeGen::genSIMDSplitReturn(GenTree* src, const ReturnTypeDesc* retTypeDesc) { assert(varTypeIsSIMD(src)); assert(src->isUsedFromReg()); diff --git a/src/coreclr/jit/codegencommon.cpp b/src/coreclr/jit/codegencommon.cpp index 1639b86de810b8..286dc18777db38 100644 --- a/src/coreclr/jit/codegencommon.cpp +++ b/src/coreclr/jit/codegencommon.cpp @@ -7320,6 +7320,11 @@ bool CodeGen::isStructReturn(GenTree* treeNode) return false; } + if (!treeNode->TypeIs(TYP_VOID) && treeNode->AsOp()->GetReturnValue()->OperIsFieldList()) + { + return true; + } + #if defined(TARGET_AMD64) && !defined(UNIX_AMD64_ABI) assert(!varTypeIsStruct(treeNode)); return false; @@ -7347,12 +7352,32 @@ void CodeGen::genStructReturn(GenTree* treeNode) GenTree* op1 = treeNode->AsOp()->GetReturnValue(); GenTree* actualOp1 = op1->gtSkipReloadOrCopy(); - genConsumeRegs(op1); + const ReturnTypeDesc& retTypeDesc = compiler->compRetTypeDesc; + const unsigned regCount = retTypeDesc.GetReturnRegCount(); - ReturnTypeDesc retTypeDesc = compiler->compRetTypeDesc; - const unsigned regCount = retTypeDesc.GetReturnRegCount(); assert(regCount <= MAX_RET_REG_COUNT); + if (op1->OperIsFieldList()) + { + unsigned regIndex = 0; + for (GenTreeFieldList::Use& use : op1->AsFieldList()->Uses()) + { + GenTree* fieldNode = use.GetNode(); + regNumber sourceReg = genConsumeReg(fieldNode); + regNumber destReg = retTypeDesc.GetABIReturnReg(regIndex, compiler->info.compCallConv); + var_types type = retTypeDesc.GetReturnRegType(regIndex); + + // We have constrained the reg in LSRA, but due to def-use + // conflicts we may still need a move here. + inst_Mov(type, destReg, sourceReg, /* canSkip */ true, emitActualTypeSize(type)); + regIndex++; + } + + return; + } + + genConsumeRegs(op1); + #if FEATURE_MULTIREG_RET // Right now the only enregisterable structs supported are SIMD vector types. if (genIsRegCandidateLocal(actualOp1)) diff --git a/src/coreclr/jit/codegenxarch.cpp b/src/coreclr/jit/codegenxarch.cpp index e3bbe774fb4665..bb63af69641404 100644 --- a/src/coreclr/jit/codegenxarch.cpp +++ b/src/coreclr/jit/codegenxarch.cpp @@ -1352,7 +1352,7 @@ void CodeGen::genCodeForMul(GenTreeOp* treeNode) // src - The source of the return // retTypeDesc - The return type descriptor. // -void CodeGen::genSIMDSplitReturn(GenTree* src, ReturnTypeDesc* retTypeDesc) +void CodeGen::genSIMDSplitReturn(GenTree* src, const ReturnTypeDesc* retTypeDesc) { assert(varTypeIsSIMD(src)); assert(src->isUsedFromReg()); diff --git a/src/coreclr/jit/compiler.h b/src/coreclr/jit/compiler.h index d17f6558bd6e42..a6ab5a41ae7865 100644 --- a/src/coreclr/jit/compiler.h +++ b/src/coreclr/jit/compiler.h @@ -3235,6 +3235,8 @@ class Compiler GenTreeConditional* gtNewConditionalNode( genTreeOps oper, GenTree* cond, GenTree* op1, GenTree* op2, var_types type); + GenTreeFieldList* gtNewFieldList(); + #ifdef FEATURE_SIMD void SetOpLclRelatedToSIMDIntrinsic(GenTree* op); #endif diff --git a/src/coreclr/jit/gentree.cpp b/src/coreclr/jit/gentree.cpp index c90f4ee43ed9d5..7e67601e4dd8be 100644 --- a/src/coreclr/jit/gentree.cpp +++ b/src/coreclr/jit/gentree.cpp @@ -8548,6 +8548,11 @@ GenTreeConditional* Compiler::gtNewConditionalNode( return node; } +GenTreeFieldList* Compiler::gtNewFieldList() +{ + return new (this, GT_FIELD_LIST) GenTreeFieldList(); +} + GenTreeLclFld* Compiler::gtNewLclFldNode(unsigned lnum, var_types type, unsigned offset, ClassLayout* layout) { GenTreeLclFld* node = new (this, GT_LCL_FLD) GenTreeLclFld(GT_LCL_FLD, type, lnum, offset, layout); @@ -30511,6 +30516,30 @@ void ReturnTypeDesc::InitializeReturnType(Compiler* comp, } } +//------------------------------------------------------------------- +// GetReturnFieldOffset: +// For the N'th returned register, identified by "index", returns the +// starting offset in the struct return type of the data being returned. +// +// Arguments: +// index - The register whose offset to get +// +// Return Value: +// Starting offset of data returned in that register. +// +unsigned ReturnTypeDesc::GetReturnFieldOffset(unsigned index) const +{ + assert(m_regType[index] != TYP_UNKNOWN); +#if defined(TARGET_RISCV64) || defined(TARGET_LOONGARCH64) + return m_fieldOffset[index]; +#else + unsigned offset = 0; + for (unsigned i = 0; i < index; i++) + offset += genTypeSize(m_regType[i]); + return offset; +#endif +} + //------------------------------------------------------------------- // GetABIReturnReg: Return i'th return register as per target ABI // diff --git a/src/coreclr/jit/gentree.h b/src/coreclr/jit/gentree.h index 2d68355bf1112e..9f3a988444f4e6 100644 --- a/src/coreclr/jit/gentree.h +++ b/src/coreclr/jit/gentree.h @@ -4467,13 +4467,7 @@ struct ReturnTypeDesc #endif } -#if defined(TARGET_RISCV64) || defined(TARGET_LOONGARCH64) - unsigned GetReturnFieldOffset(unsigned index) const - { - assert(m_regType[index] != TYP_UNKNOWN); - return m_fieldOffset[index]; - } -#endif + unsigned GetReturnFieldOffset(unsigned index) const; // Get i'th ABI return register regNumber GetABIReturnReg(unsigned idx, CorInfoCallConvExtension callConv) const; diff --git a/src/coreclr/jit/lclvars.cpp b/src/coreclr/jit/lclvars.cpp index 41eda11b765317..fdfe8126f6daa6 100644 --- a/src/coreclr/jit/lclvars.cpp +++ b/src/coreclr/jit/lclvars.cpp @@ -95,6 +95,22 @@ void Compiler::lvaInitTypeRef() info.compRetNativeType = hasRetBuffArg ? TYP_STRUCT : TYP_VOID; } +#ifdef DEBUG + if (verbose) + { + CORINFO_CLASS_HANDLE retClass = info.compMethodInfo->args.retTypeClass; + printf("%u return registers for return type %s %s\n", returnRegCount, varTypeName(info.compRetType), + varTypeIsStruct(info.compRetType) ? eeGetClassName(retClass) : ""); + for (unsigned i = 0; i < returnRegCount; i++) + { + unsigned offset = compRetTypeDesc.GetReturnFieldOffset(i); + unsigned size = genTypeSize(compRetTypeDesc.GetReturnRegType(i)); + printf(" [%02u..%02u) reg %s\n", offset, offset + size, + getRegName(compRetTypeDesc.GetABIReturnReg(i, info.compCallConv))); + } + } +#endif + // Do we have a RetBuffArg? if (hasRetBuffArg) { diff --git a/src/coreclr/jit/lower.cpp b/src/coreclr/jit/lower.cpp index 5f8bdd9f27b3f6..7f71d2d8e2dc19 100644 --- a/src/coreclr/jit/lower.cpp +++ b/src/coreclr/jit/lower.cpp @@ -4835,7 +4835,7 @@ void Lowering::LowerRet(GenTreeOp* ret) // - We're returning a floating type as an integral type or vice-versa, or // - If we're returning a struct as a primitive type, we change the type of // 'retval' in 'LowerRetStructLclVar()' - bool needBitcast = (ret->TypeGet() != TYP_VOID) && !varTypeUsesSameRegType(ret, retVal); + bool needBitcast = !ret->TypeIs(TYP_VOID) && !varTypeUsesSameRegType(ret, retVal); bool doPrimitiveBitcast = false; if (needBitcast) { @@ -4855,7 +4855,7 @@ void Lowering::LowerRet(GenTreeOp* ret) BlockRange().InsertBefore(ret, bitcast); ContainCheckBitCast(bitcast); } - else if (ret->TypeGet() != TYP_VOID) + else if (!ret->TypeIs(TYP_VOID)) { #if FEATURE_MULTIREG_RET if (comp->compMethodReturnsMultiRegRetType() && retVal->OperIs(GT_LCL_VAR)) @@ -4884,7 +4884,11 @@ void Lowering::LowerRet(GenTreeOp* ret) } #endif // DEBUG - if (varTypeIsStruct(ret)) + if (retVal->OperIsFieldList()) + { + LowerRetFieldList(ret, retVal->AsFieldList()); + } + else if (varTypeIsStruct(ret)) { LowerRetStruct(ret); } @@ -4896,7 +4900,6 @@ void Lowering::LowerRet(GenTreeOp* ret) } } - // Method doing PInvokes has exactly one return block unless it has tail calls. if (comp->compMethodRequiresPInvokeFrame()) { InsertPInvokeMethodEpilog(comp->compCurBB DEBUGARG(ret)); @@ -4904,6 +4907,129 @@ void Lowering::LowerRet(GenTreeOp* ret) ContainCheckRet(ret); } +//---------------------------------------------------------------------------------------------- +// LowerRetFieldList: +// Lower a returned FIELD_LIST node. +// +// Arguments: +// ret - The return node +// fieldList - The field list +// +void Lowering::LowerRetFieldList(GenTreeOp* ret, GenTreeFieldList* fieldList) +{ + const ReturnTypeDesc& retDesc = comp->compRetTypeDesc; + unsigned numRegs = retDesc.GetReturnRegCount(); + + bool isCompatible = IsFieldListCompatibleWithReturn(fieldList); + if (!isCompatible) + { + JITDUMP("Spilling field list [%06u] to stack\n", Compiler::dspTreeID(fieldList)); + unsigned lclNum = comp->lvaGrabTemp(true DEBUGARG("Spilled local for return value")); + LclVarDsc* varDsc = comp->lvaGetDesc(lclNum); + comp->lvaSetStruct(lclNum, comp->info.compMethodInfo->args.retTypeClass, false); + comp->lvaSetVarDoNotEnregister(lclNum DEBUGARG(DoNotEnregisterReason::BlockOpRet)); + + for (GenTreeFieldList::Use& use : fieldList->Uses()) + { + GenTree* store = comp->gtNewStoreLclFldNode(lclNum, use.GetType(), use.GetOffset(), use.GetNode()); + BlockRange().InsertAfter(use.GetNode(), store); + LowerNode(store); + } + + GenTree* retValue = comp->gtNewLclvNode(lclNum, varDsc->TypeGet()); + ret->SetReturnValue(retValue); + BlockRange().InsertBefore(ret, retValue); + LowerNode(retValue); + + BlockRange().Remove(fieldList); + + if (numRegs == 1) + { + var_types nativeReturnType = comp->info.compRetNativeType; + ret->ChangeType(genActualType(nativeReturnType)); + LowerRetSingleRegStructLclVar(ret); + } + else + { + varDsc->lvIsMultiRegRet = true; + } + + return; + } + + unsigned regIndex = 0; + for (GenTreeFieldList::Use& use : fieldList->Uses()) + { + var_types regType = retDesc.GetReturnRegType(regIndex); + if (varTypeUsesIntReg(regType) != varTypeUsesIntReg(use.GetNode())) + { + GenTree* bitcast = comp->gtNewOperNode(GT_BITCAST, regType, use.GetNode()); + BlockRange().InsertBefore(fieldList, bitcast); + use.SetNode(bitcast); + LowerNode(bitcast); + } + + regIndex++; + } +} + +//---------------------------------------------------------------------------------------------- +// IsFieldListCompatibleWithReturn: +// Check if the fields of a FIELD_LIST are compatible with the registers +// being returned. +// +// Arguments: +// fieldList - The FIELD_LIST node +// +// Returns: +// True if the fields of the FIELD_LIST map cleanly to the ABI returned +// registers. Insertions of bitcasts may still be required. +// +bool Lowering::IsFieldListCompatibleWithReturn(GenTreeFieldList* fieldList) +{ + JITDUMP("Checking if field list [%06u] is compatible with return ABI: ", Compiler::dspTreeID(fieldList)); + const ReturnTypeDesc& retDesc = comp->compRetTypeDesc; + unsigned numRetRegs = retDesc.GetReturnRegCount(); + unsigned regIndex = 0; + + for (const GenTreeFieldList::Use& use : fieldList->Uses()) + { + if (regIndex >= numRetRegs) + { + JITDUMP("it is not; too many fields\n"); + return false; + } + + unsigned offset = retDesc.GetReturnFieldOffset(regIndex); + if (offset != use.GetOffset()) + { + JITDUMP("it is not; field %u register starts at offset %u, but field starts at offset %u\n", regIndex, + offset, use.GetOffset()); + return false; + } + + var_types fieldType = genActualType(use.GetNode()); + var_types regType = genActualType(retDesc.GetReturnRegType(regIndex)); + if (genTypeSize(fieldType) != genTypeSize(regType)) + { + JITDUMP("it is not; field %u register has type %s but field has type %s\n", regIndex, varTypeName(regType), + varTypeName(fieldType)); + return false; + } + + regIndex++; + } + + if (regIndex != numRetRegs) + { + JITDUMP("it is not; too few fields\n"); + return false; + } + + JITDUMP("it is\n"); + return true; +} + //---------------------------------------------------------------------------------------------- // LowerStoreLocCommon: platform independent part of local var or field store lowering. // diff --git a/src/coreclr/jit/lower.h b/src/coreclr/jit/lower.h index 86b336c517f3c1..ec6507129f8d45 100644 --- a/src/coreclr/jit/lower.h +++ b/src/coreclr/jit/lower.h @@ -168,6 +168,8 @@ class Lowering final : public Phase GenTree* LowerStoreLocCommon(GenTreeLclVarCommon* lclVar); void LowerRetStruct(GenTreeUnOp* ret); void LowerRetSingleRegStructLclVar(GenTreeUnOp* ret); + void LowerRetFieldList(GenTreeOp* ret, GenTreeFieldList* fieldList); + bool IsFieldListCompatibleWithReturn(GenTreeFieldList* fieldList); void LowerCallStruct(GenTreeCall* call); void LowerStoreSingleRegCallStruct(GenTreeBlk* store); #if !defined(WINDOWS_AMD64_ABI) diff --git a/src/coreclr/jit/lsrabuild.cpp b/src/coreclr/jit/lsrabuild.cpp index 548183362f353b..5abe2e40411681 100644 --- a/src/coreclr/jit/lsrabuild.cpp +++ b/src/coreclr/jit/lsrabuild.cpp @@ -4392,6 +4392,22 @@ int LinearScan::BuildReturn(GenTree* tree) return 1; } } + else if (!tree->TypeIs(TYP_VOID) && op1->OperIsFieldList()) + { + const ReturnTypeDesc& retDesc = compiler->compRetTypeDesc; + + unsigned regIndex = 0; + for (const GenTreeFieldList::Use& use : op1->AsFieldList()->Uses()) + { + GenTree* tree = use.GetNode(); + regNumber retReg = retDesc.GetABIReturnReg(regIndex, compiler->info.compCallConv); + BuildUse(tree, genSingleTypeRegMask(retReg)); + + regIndex++; + } + + return regIndex; + } else { // In other cases we require the incoming operand to be in the diff --git a/src/coreclr/jit/morph.cpp b/src/coreclr/jit/morph.cpp index 24baa3519e073e..5f11ac9a065056 100644 --- a/src/coreclr/jit/morph.cpp +++ b/src/coreclr/jit/morph.cpp @@ -7674,7 +7674,10 @@ GenTree* Compiler::fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac, bool* optA { GenTree* retVal = tree->AsOp()->GetReturnValue(); - if (!tree->TypeIs(TYP_VOID)) + // Apply some optimizations that change the type of the return. + // These are not applicable when this is a merged return that will + // be changed into a store and jump to the return BB. + if (!tree->TypeIs(TYP_VOID) && ((genReturnBB == nullptr) || (compCurBB == genReturnBB))) { if (retVal->OperIs(GT_LCL_FLD)) { @@ -8573,9 +8576,10 @@ GenTree* Compiler::fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac, bool* optA { // Retry updating return operand to a field -- assertion // prop done when morphing this operand changed the local. - // + // Skip this for merged returns that will be changed to a store and + // jump to the return BB. GenTree* const retVal = tree->AsOp()->GetReturnValue(); - if (retVal != nullptr) + if ((retVal != nullptr) && ((genReturnBB == nullptr) || (compCurBB == genReturnBB))) { fgTryReplaceStructLocalWithField(retVal); } @@ -8642,28 +8646,22 @@ void Compiler::fgTryReplaceStructLocalWithField(GenTree* tree) return; } - // With a `genReturnBB` this `RETURN(src)` tree will be replaced by a `STORE_LCL_VAR(src)` - // and `STORE_LCL_VAR` will be transformed into field by field copy without parent local referencing if - // possible. - GenTreeLclVar* lclVar = tree->AsLclVar(); - unsigned lclNum = lclVar->GetLclNum(); - if ((genReturnLocal == BAD_VAR_NUM) || (genReturnLocal == lclNum)) + GenTreeLclVar* lclVar = tree->AsLclVar(); + unsigned lclNum = lclVar->GetLclNum(); + LclVarDsc* const varDsc = lvaGetDesc(lclVar); + if (varDsc->CanBeReplacedWithItsField(this)) { - LclVarDsc* const varDsc = lvaGetDesc(lclVar); - if (varDsc->CanBeReplacedWithItsField(this)) - { - // We can replace the struct with its only field and allow copy propagation to replace - // return value that was written as a field. - unsigned const fieldLclNum = varDsc->lvFieldLclStart; - LclVarDsc* const fieldDsc = lvaGetDesc(fieldLclNum); + // We can replace the struct with its only field and allow copy propagation to replace + // return value that was written as a field. + unsigned const fieldLclNum = varDsc->lvFieldLclStart; + LclVarDsc* const fieldDsc = lvaGetDesc(fieldLclNum); - JITDUMP("Replacing an independently promoted local var V%02u with its only field " - "V%02u for " - "the return [%06u]\n", - lclVar->GetLclNum(), fieldLclNum, dspTreeID(tree)); - lclVar->SetLclNum(fieldLclNum); - lclVar->ChangeType(fieldDsc->lvType); - } + JITDUMP("Replacing an independently promoted local var V%02u with its only field " + "V%02u for " + "the return [%06u]\n", + lclVar->GetLclNum(), fieldLclNum, dspTreeID(tree)); + lclVar->SetLclNum(fieldLclNum); + lclVar->ChangeType(fieldDsc->lvType); } } @@ -10690,9 +10688,7 @@ GenTree* Compiler::fgMorphRetInd(GenTreeOp* ret) bool canFold = (indSize == lclVarSize) && (lclVarSize <= REGSIZE_BYTES); #endif - // If we have a shared return temp we cannot represent the store properly with these retyped values, - // so skip the optimization in that case. - if (canFold && (genReturnBB == nullptr)) + if (canFold) { // Fold even if types do not match, lowering will handle it. This allows the local // to remain DNER-free and be enregistered. diff --git a/src/coreclr/jit/promotion.cpp b/src/coreclr/jit/promotion.cpp index 55f6c88b2b7d23..5f30040d6e3a8e 100644 --- a/src/coreclr/jit/promotion.cpp +++ b/src/coreclr/jit/promotion.cpp @@ -2201,9 +2201,199 @@ GenTree** ReplaceVisitor::InsertMidTreeReadBacks(GenTree** use) return use; } +//------------------------------------------------------------------------ +// ReplaceStructLocal: +// Try to replace a promoted struct local with uses of its fields. +// +// Parameters: +// user - The user +// value - The struct local +// +// Returns: +// True if the local was replaced and no more work needs to be done; false if +// the use will need to be handled via write-backs. +// +// Remarks: +// Usually this amounts to replacing the struct local by a FIELD_LIST with +// the promoted fields, but merged returns require more complicated handling. +// +bool ReplaceVisitor::ReplaceStructLocal(GenTree* user, GenTreeLclVarCommon* value) +{ + if (user->IsCall()) + { + return ReplaceCallArgWithFieldList(user->AsCall(), value); + } + else + { + assert(user->OperIs(GT_RETURN, GT_SWIFT_ERROR_RET)); + return ReplaceReturnedStructLocal(user->AsOp(), value); + } +} + +//------------------------------------------------------------------------ +// ReplaceReturnedStructLocal: +// Try to replace a returned promoted struct local. +// +// Parameters: +// ret - The return node +// value - The struct local +// +// Returns: +// True if the local was used and no more work needs to be done; false if the +// use will need to be handled via write-backs. +// +// Remarks: +// The backend supports arbitrary FIELD_LIST for returns, i.e. there is no +// requirement that the fields map cleanly to registers. However, morph does +// not support introducing a returned FIELD_LIST in cases where returns are +// being merged. Due to that, and for CQ, we instead decompose a store to the +// return local for that case. +// +bool ReplaceVisitor::ReplaceReturnedStructLocal(GenTreeOp* ret, GenTreeLclVarCommon* value) +{ + if (m_compiler->genReturnLocal != BAD_VAR_NUM) + { + JITDUMP("Replacing merged return by store to merged return local\n"); + // If we have merged returns then replace with a store to the return + // local, and switch out the GT_RETURN to return that local. + GenTree* sideEffects = nullptr; + m_compiler->gtExtractSideEffList(ret, &sideEffects, GTF_SIDE_EFFECT, true); + m_currentStmt->SetRootNode(sideEffects == nullptr ? m_compiler->gtNewNothingNode() : sideEffects); + DISPSTMT(m_currentStmt); + m_madeChanges = true; + + GenTree* store = m_compiler->gtNewStoreLclVarNode(m_compiler->genReturnLocal, value); + Statement* storeStmt = m_compiler->fgNewStmtFromTree(store); + m_compiler->fgInsertStmtAfter(m_currentBlock, m_currentStmt, storeStmt); + DISPSTMT(storeStmt); + + ret->SetReturnValue(m_compiler->gtNewLclVarNode(m_compiler->genReturnLocal)); + Statement* retStmt = m_compiler->fgNewStmtFromTree(ret); + m_compiler->fgInsertStmtAfter(m_currentBlock, storeStmt, retStmt); + DISPSTMT(retStmt); + + return true; + } + + AggregateInfo* agg = m_aggregates.Lookup(value->GetLclNum()); + ClassLayout* layout = value->GetLayout(m_compiler); + assert(layout != nullptr); + + unsigned startOffset = value->GetLclOffs(); + unsigned returnValueSize = layout->GetSize(); + if (agg->Unpromoted.Intersects(SegmentList::Segment(startOffset, startOffset + returnValueSize))) + { + // TODO-CQ: We could handle cases where the intersected remainder is simple + return false; + } + + auto checkPartialOverlap = [=](Replacement& rep) { + bool contained = + (rep.Offset >= startOffset) && (rep.Offset + genTypeSize(rep.AccessType) <= startOffset + returnValueSize); + + if (contained) + { + // Keep visiting overlapping replacements + return true; + } + + // Partial overlap, abort the visit and give up + return false; + }; + + if (!VisitOverlappingReplacements(value->GetLclNum(), startOffset, returnValueSize, checkPartialOverlap)) + { + return false; + } + + if (!IsReturnProfitableAsFieldList(value)) + { + return false; + } + + StructDeaths deaths = m_liveness->GetDeathsForStructLocal(value); + GenTreeFieldList* fieldList = m_compiler->gtNewFieldList(); + + auto addField = [=](Replacement& rep) { + GenTree* fieldValue; + if (!rep.NeedsReadBack) + { + fieldValue = m_compiler->gtNewLclvNode(rep.LclNum, rep.AccessType); + + assert(deaths.IsReplacementDying(static_cast(&rep - agg->Replacements.data()))); + fieldValue->gtFlags |= GTF_VAR_DEATH; + CheckForwardSubForLastUse(rep.LclNum); + } + else + { + // Replacement local is not up to date. + fieldValue = m_compiler->gtNewLclFldNode(value->GetLclNum(), rep.AccessType, rep.Offset); + + if (!m_compiler->lvaGetDesc(value->GetLclNum())->lvDoNotEnregister) + { + m_compiler->lvaSetVarDoNotEnregister(value->GetLclNum() DEBUGARG(DoNotEnregisterReason::LocalField)); + } + } + + fieldList->AddField(m_compiler, fieldValue, rep.Offset - startOffset, rep.AccessType); + + return true; + }; + + VisitOverlappingReplacements(value->GetLclNum(), startOffset, returnValueSize, addField); + + ret->SetReturnValue(fieldList); + + m_madeChanges = true; + return true; +} + +//------------------------------------------------------------------------ +// IsReturnProfitableAsFieldList: +// Check if a returned local is expected to be profitable to turn into a +// FIELD_LIST. +// +// Parameters: +// value - The struct local +// +// Returns: +// True if so. +// +bool ReplaceVisitor::IsReturnProfitableAsFieldList(GenTreeLclVarCommon* value) +{ + // Currently the backend requires all fields to map cleanly to registers to + // efficiently return them. Otherwise they will be spilled, and we are + // better off decomposing the store here. + auto fieldMapsCleanly = [=](Replacement& rep) { + const ReturnTypeDesc& retDesc = m_compiler->compRetTypeDesc; + unsigned fieldOffset = rep.Offset - value->GetLclOffs(); + unsigned numRegs = retDesc.GetReturnRegCount(); + for (unsigned i = 0; i < numRegs; i++) + { + unsigned offset = retDesc.GetReturnFieldOffset(i); + var_types regType = retDesc.GetReturnRegType(i); + if ((fieldOffset == offset) && (genTypeSize(rep.AccessType) == genTypeSize(regType))) + { + return true; + } + } + + return false; + }; + + unsigned size = value->GetLayout(m_compiler)->GetSize(); + if (!VisitOverlappingReplacements(value->GetLclNum(), value->GetLclOffs(), size, fieldMapsCleanly)) + { + // Aborted early, so a field did not map + return false; + } + + return true; +} + //------------------------------------------------------------------------ // ReplaceCallArgWithFieldList: -// Handle a call that may pass a struct local with replacements as the +// Handle a call that may pass a struct local with replacements as the // retbuf. // // Parameters: @@ -2228,7 +2418,7 @@ bool ReplaceVisitor::ReplaceCallArgWithFieldList(GenTreeCall* call, GenTreeLclVa ClassLayout* layout = argNode->GetLayout(m_compiler); assert(layout != nullptr); StructDeaths deaths = m_liveness->GetDeathsForStructLocal(argNode); - GenTreeFieldList* fieldList = new (m_compiler, GT_FIELD_LIST) GenTreeFieldList; + GenTreeFieldList* fieldList = m_compiler->gtNewFieldList(); for (const ABIPassingSegment& seg : callArg->NewAbiInfo.Segments()) { Replacement* rep = nullptr; @@ -2533,7 +2723,7 @@ void ReplaceVisitor::ReplaceLocal(GenTree** use, GenTree* user) assert(effectiveUser->OperIs(GT_CALL, GT_RETURN, GT_SWIFT_ERROR_RET)); - if (!effectiveUser->IsCall() || !ReplaceCallArgWithFieldList(effectiveUser->AsCall(), lcl)) + if (!ReplaceStructLocal(effectiveUser, lcl)) { unsigned size = lcl->GetLayout(m_compiler)->GetSize(); WriteBackBeforeUse(use, lclNum, lcl->GetLclOffs(), size); diff --git a/src/coreclr/jit/promotion.h b/src/coreclr/jit/promotion.h index b71f50bfc10748..67942e9c079a35 100644 --- a/src/coreclr/jit/promotion.h +++ b/src/coreclr/jit/promotion.h @@ -294,6 +294,9 @@ class ReplaceVisitor : public GenTreeVisitor void InsertPreStatementWriteBacks(); GenTree** InsertMidTreeReadBacks(GenTree** use); + bool ReplaceStructLocal(GenTree* user, GenTreeLclVarCommon* value); + bool ReplaceReturnedStructLocal(GenTreeOp* ret, GenTreeLclVarCommon* value); + bool IsReturnProfitableAsFieldList(GenTreeLclVarCommon* value); bool ReplaceCallArgWithFieldList(GenTreeCall* call, GenTreeLclVarCommon* callArg); bool CanReplaceCallArgWithFieldListOfReplacements(GenTreeCall* call, CallArg* callArg, GenTreeLclVarCommon* lcl); void ReadBackAfterCall(GenTreeCall* call, GenTree* user); From b8298f6f3c9c63e826f5b28d2c2487a335c1a718 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 18 Feb 2025 13:40:25 -0600 Subject: [PATCH 09/27] Update dependencies from https://github.com/dotnet/emsdk build 20250217.1 (#112645) Microsoft.NET.Workload.Emscripten.Current.Manifest-10.0.100.Transport , Microsoft.SourceBuild.Intermediate.emsdk From Version 10.0.0-preview.2.25112.1 -> To Version 10.0.0-preview.2.25117.1 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 8 ++++---- eng/Versions.props | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index b111d77875906c..24d182daa4dc7f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -60,14 +60,14 @@ dfa03011d6474bd0e6c9d0363e4f3b18b99f2ad8 - + https://github.com/dotnet/emsdk - e0c266c6de9a184cd84184ff29aaaf7e5528b166 + 34f1100060f0d618239c8e6d73d3e80862429598 - + https://github.com/dotnet/emsdk - e0c266c6de9a184cd84184ff29aaaf7e5528b166 + 34f1100060f0d618239c8e6d73d3e80862429598 diff --git a/eng/Versions.props b/eng/Versions.props index 7998ea90afdb5f..1ae5266427bedd 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -251,7 +251,7 @@ Note: when the name is updated, make sure to update dependency name in eng/pipelines/common/xplat-setup.yml like - DarcDependenciesChanged.Microsoft_NET_Workload_Emscripten_Current_Manifest-10_0_100_Transport --> - 10.0.0-preview.2.25112.1 + 10.0.0-preview.2.25117.1 $(MicrosoftNETWorkloadEmscriptenCurrentManifest100100TransportVersion) 1.1.87-gba258badda From b567c5be3c1c494fc7fba03aba389b84f61c2023 Mon Sep 17 00:00:00 2001 From: Jakob Botsch Nielsen Date: Tue, 18 Feb 2025 21:03:46 +0100 Subject: [PATCH 10/27] JIT: Clean up and optimize call arg lowering (#112639) * Simplify the logic to be based purely off of new ABI info * Consistently insert bitcast nodes for register file mismatches when creating `PUTARG_REG` nodes and for `PUTARG_SPLIT` * Add a lowering optimization that removes `BITCAST` by changing the operand (by changing constants to other constants or the type of indirections) * Stop DNER'ing for register file mismatches in physical promotion and morph --- src/coreclr/jit/compiler.h | 4 +- src/coreclr/jit/compiler.hpp | 4 +- src/coreclr/jit/gentree.cpp | 12 +- src/coreclr/jit/lower.cpp | 557 ++++++++++++++-------------------- src/coreclr/jit/lower.h | 14 +- src/coreclr/jit/morph.cpp | 17 +- src/coreclr/jit/promotion.cpp | 6 - 7 files changed, 245 insertions(+), 369 deletions(-) diff --git a/src/coreclr/jit/compiler.h b/src/coreclr/jit/compiler.h index a6ab5a41ae7865..5e07b67603985e 100644 --- a/src/coreclr/jit/compiler.h +++ b/src/coreclr/jit/compiler.h @@ -3119,7 +3119,7 @@ class Compiler Statement* gtNewStmt(GenTree* expr, const DebugInfo& di); // For unary opers. - GenTree* gtNewOperNode(genTreeOps oper, var_types type, GenTree* op1); + GenTreeUnOp* gtNewOperNode(genTreeOps oper, var_types type, GenTree* op1); // For binary opers. GenTreeOp* gtNewOperNode(genTreeOps oper, var_types type, GenTree* op1, GenTree* op2); @@ -3208,7 +3208,7 @@ class Compiler GenTree* gtNewPutArgReg(var_types type, GenTree* arg, regNumber argReg); - GenTree* gtNewBitCastNode(var_types type, GenTree* arg); + GenTreeUnOp* gtNewBitCastNode(var_types type, GenTree* arg); public: GenTreeCall* gtNewCallNode(gtCallTypes callType, diff --git a/src/coreclr/jit/compiler.hpp b/src/coreclr/jit/compiler.hpp index 1738810e149b4b..a7d6af44e7a4a2 100644 --- a/src/coreclr/jit/compiler.hpp +++ b/src/coreclr/jit/compiler.hpp @@ -1411,14 +1411,14 @@ inline Statement* Compiler::gtNewStmt(GenTree* expr, const DebugInfo& di) return stmt; } -inline GenTree* Compiler::gtNewOperNode(genTreeOps oper, var_types type, GenTree* op1) +inline GenTreeUnOp* Compiler::gtNewOperNode(genTreeOps oper, var_types type, GenTree* op1) { assert((GenTree::OperKind(oper) & (GTK_UNOP | GTK_BINOP)) != 0); assert((GenTree::OperKind(oper) & GTK_EXOP) == 0); // Can't use this to construct any types that extend unary/binary // operator. assert(op1 != nullptr || oper == GT_RETFILT || (oper == GT_RETURN && type == TYP_VOID)); - GenTree* node = new (this, oper) GenTreeOp(oper, type, op1, nullptr); + GenTreeUnOp* node = new (this, oper) GenTreeOp(oper, type, op1, nullptr); return node; } diff --git a/src/coreclr/jit/gentree.cpp b/src/coreclr/jit/gentree.cpp index 7e67601e4dd8be..9909dc34fa7d26 100644 --- a/src/coreclr/jit/gentree.cpp +++ b/src/coreclr/jit/gentree.cpp @@ -9153,20 +9153,12 @@ GenTree* Compiler::gtNewPutArgReg(var_types type, GenTree* arg, regNumber argReg // Notes: // The node is generated as GenTreeMultiRegOp on RyuJIT/arm, as GenTreeOp on all the other archs. // -GenTree* Compiler::gtNewBitCastNode(var_types type, GenTree* arg) +GenTreeUnOp* Compiler::gtNewBitCastNode(var_types type, GenTree* arg) { assert(arg != nullptr); assert(type != TYP_STRUCT); - GenTree* node = nullptr; -#if defined(TARGET_ARM) - // A BITCAST could be a MultiRegOp on arm since we could move a double register to two int registers. - node = new (this, GT_BITCAST) GenTreeMultiRegOp(GT_BITCAST, type, arg, nullptr); -#else - node = gtNewOperNode(GT_BITCAST, type, arg); -#endif - - return node; + return gtNewOperNode(GT_BITCAST, type, arg); } //------------------------------------------------------------------------ diff --git a/src/coreclr/jit/lower.cpp b/src/coreclr/jit/lower.cpp index 7f71d2d8e2dc19..8af760ffe8e3cd 100644 --- a/src/coreclr/jit/lower.cpp +++ b/src/coreclr/jit/lower.cpp @@ -549,8 +549,14 @@ GenTree* Lowering::LowerNode(GenTree* node) break; case GT_BITCAST: - ContainCheckBitCast(node); - break; + { + GenTree* next = node->gtNext; + if (!TryRemoveBitCast(node->AsUnOp())) + { + ContainCheckBitCast(node->AsUnOp()); + } + return next; + } #if defined(TARGET_XARCH) || defined(TARGET_ARM64) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64) case GT_BOUNDS_CHECK: @@ -1533,62 +1539,74 @@ bool Lowering::TryLowerSwitchToBitTest(FlowEdge* jumpTable[], } //------------------------------------------------------------------------ -// ReplaceArgWithPutArgOrBitcast: Insert a PUTARG_* node in the right location -// and replace the call operand with that node. +// LowerArg: +// Lower one argument of a call. This entails inserting putarg nodes between +// the call and the argument. This is the point at which the source is +// consumed and the value transitions from control of the register allocator +// to the calling convention. // // Arguments: -// argSlot - slot in call of argument -// putArgOrBitcast - the node that is being inserted +// call - The call node +// callArg - Call argument // -void Lowering::ReplaceArgWithPutArgOrBitcast(GenTree** argSlot, GenTree* putArgOrBitcast) +void Lowering::LowerArg(GenTreeCall* call, CallArg* callArg) { - assert(argSlot != nullptr); - assert(*argSlot != nullptr); - assert(putArgOrBitcast->OperIsPutArg() || putArgOrBitcast->OperIs(GT_BITCAST)); + GenTree** ppArg = &callArg->NodeRef(); + GenTree* arg = *ppArg; + assert(arg != nullptr); - GenTree* arg = *argSlot; + JITDUMP("Lowering arg: "); + DISPTREERANGE(BlockRange(), arg); + assert(arg->IsValue()); - // Replace the argument with the putarg/copy - *argSlot = putArgOrBitcast; - putArgOrBitcast->AsOp()->gtOp1 = arg; + // If we hit this we are probably double-lowering. + assert(!arg->OperIsPutArg()); - // Insert the putarg/copy into the block - BlockRange().InsertAfter(arg, putArgOrBitcast); -} + const ABIPassingInformation& abiInfo = callArg->NewAbiInfo; + JITDUMP("Passed in "); + DBEXEC(comp->verbose, abiInfo.Dump()); -//------------------------------------------------------------------------ -// NewPutArg: rewrites the tree to put an arg in a register or on the stack. -// -// Arguments: -// call - the call whose arg is being rewritten. -// arg - the arg being rewritten. -// callArg - the CallArg for the argument. -// type - the type of the argument. -// -// Return Value: -// The new tree that was created to put the arg in the right place -// or the incoming arg if the arg tree was not rewritten. -// -// Assumptions: -// call, arg, and info must be non-null. -// -// Notes: -// For System V systems with native struct passing (i.e. UNIX_AMD64_ABI defined) -// this method allocates a single GT_PUTARG_REG for 1 eightbyte structs and a GT_FIELD_LIST of two GT_PUTARG_REGs -// for two eightbyte structs. For STK passed structs the method generates GT_PUTARG_STK tree. -// -GenTree* Lowering::NewPutArg(GenTreeCall* call, GenTree* arg, CallArg* callArg, var_types type) -{ - assert(call != nullptr); - assert(arg != nullptr); - assert(callArg != nullptr); +#if !defined(TARGET_64BIT) + if (comp->opts.compUseSoftFP && arg->TypeIs(TYP_DOUBLE)) + { + // Unlike TYP_LONG we do no decomposition for doubles, yet we maintain + // it as a primitive type until lowering. So we need to get it into the + // right form here. - GenTree* putArg = nullptr; - const ABIPassingInformation& abiInfo = callArg->NewAbiInfo; + unsigned argLclNum = comp->lvaGrabTemp(false DEBUGARG("double arg on softFP")); + GenTree* store = comp->gtNewTempStore(argLclNum, arg); + GenTree* low = comp->gtNewLclFldNode(argLclNum, TYP_INT, 0); + GenTree* high = comp->gtNewLclFldNode(argLclNum, TYP_INT, 4); + GenTree* longNode = new (comp, GT_LONG) GenTreeOp(GT_LONG, TYP_LONG, low, high); + BlockRange().InsertAfter(arg, store, low, high, longNode); + + *ppArg = arg = longNode; + + comp->lvaSetVarDoNotEnregister(argLclNum DEBUGARG(DoNotEnregisterReason::LocalField)); + + JITDUMP("Transformed double-typed arg on softFP to LONG node\n"); + } + + if (varTypeIsLong(arg)) + { + assert(callArg->NewAbiInfo.CountRegsAndStackSlots() == 2); + + noway_assert(arg->OperIs(GT_LONG)); + GenTreeFieldList* fieldList = new (comp, GT_FIELD_LIST) GenTreeFieldList(); + fieldList->AddFieldLIR(comp, arg->gtGetOp1(), 0, TYP_INT); + fieldList->AddFieldLIR(comp, arg->gtGetOp2(), 4, TYP_INT); + BlockRange().InsertBefore(arg, fieldList); + + BlockRange().Remove(arg); + *ppArg = arg = fieldList; + + JITDUMP("Transformed long arg on 32-bit to FIELD_LIST node\n"); + } +#endif #if FEATURE_ARG_SPLIT - // Struct can be split into register(s) and stack on ARM - if (compFeatureArgSplit() && callArg->NewAbiInfo.IsSplitAcrossRegistersAndStack()) + // Structs can be split into register(s) and stack on some targets + if (compFeatureArgSplit() && abiInfo.IsSplitAcrossRegistersAndStack()) { assert(arg->OperIs(GT_BLK, GT_FIELD_LIST) || arg->OperIsLocalRead()); assert(!call->IsFastTailCall()); @@ -1603,7 +1621,8 @@ GenTree* Lowering::NewPutArg(GenTreeCall* call, GenTree* arg, CallArg* callArg, unsigned numRegs = abiInfo.NumSegments - 1; const ABIPassingSegment& stackSeg = abiInfo.Segment(abiInfo.NumSegments - 1); - putArg = new (comp, GT_PUTARG_SPLIT) + assert(!call->IsFastTailCall()); + GenTree* putArg = new (comp, GT_PUTARG_SPLIT) GenTreePutArgSplit(arg, stackSeg.GetStackOffset(), stackSeg.GetStackSize(), abiInfo.NumSegments - 1, call, /* putInIncomingArgArea */ false); @@ -1622,13 +1641,9 @@ GenTree* Lowering::NewPutArg(GenTreeCall* call, GenTree* arg, CallArg* callArg, { break; } - var_types regType = use.GetNode()->TypeGet(); - // Account for the possibility that float fields may be passed in integer registers. - if (varTypeIsFloating(regType) && !genIsValidFloatReg(argSplit->GetRegNumByIdx(regIndex))) - { - regType = (regType == TYP_FLOAT) ? TYP_INT : TYP_LONG; - } - argSplit->m_regType[regIndex] = regType; + + InsertBitCastIfNecessary(&use.NodeRef(), abiInfo.Segment(regIndex)); + argSplit->m_regType[regIndex] = use.GetNode()->TypeGet(); regIndex++; } @@ -1639,12 +1654,14 @@ GenTree* Lowering::NewPutArg(GenTreeCall* call, GenTree* arg, CallArg* callArg, { ClassLayout* layout = arg->GetLayout(comp); - // Set type of registers for (unsigned index = 0; index < numRegs; index++) { argSplit->m_regType[index] = layout->GetGCPtrType(index); } } + + BlockRange().InsertAfter(arg, argSplit); + *ppArg = arg = argSplit; } else #endif // FEATURE_ARG_SPLIT @@ -1657,323 +1674,123 @@ GenTree* Lowering::NewPutArg(GenTreeCall* call, GenTree* arg, CallArg* callArg, unsigned int regIndex = 0; for (GenTreeFieldList::Use& use : arg->AsFieldList()->Uses()) { - regNumber argReg = abiInfo.Segment(regIndex).GetRegister(); - GenTree* curOp = use.GetNode(); - var_types curTyp = curOp->TypeGet(); + const ABIPassingSegment& segment = abiInfo.Segment(regIndex); + InsertPutArgReg(&use.NodeRef(), segment); - // Create a new GT_PUTARG_REG node with op1 - GenTree* newOper = comp->gtNewPutArgReg(curTyp, curOp, argReg); - - // Splice in the new GT_PUTARG_REG node in the GT_FIELD_LIST - ReplaceArgWithPutArgOrBitcast(&use.NodeRef(), newOper); regIndex++; } - - // Just return arg. The GT_FIELD_LIST is not replaced. - // Nothing more to do. - return arg; } else #endif // FEATURE_MULTIREG_ARGS { assert(abiInfo.HasExactlyOneRegisterSegment()); - putArg = comp->gtNewPutArgReg(type, arg, abiInfo.Segment(0).GetRegister()); + InsertPutArgReg(ppArg, abiInfo.Segment(0)); + arg = *ppArg; } } else { -#ifdef FEATURE_SIMD - assert(arg->OperIsFieldList() || (genActualType(arg) == type) || - (arg->TypeIs(TYP_SIMD16) && (type == TYP_SIMD12))); -#else - assert(arg->OperIsFieldList() || (genActualType(arg) == type)); -#endif assert(abiInfo.NumSegments == 1); const ABIPassingSegment& stackSeg = abiInfo.Segment(0); const bool putInIncomingArgArea = call->IsFastTailCall(); - putArg = new (comp, GT_PUTARG_STK) GenTreePutArgStk(GT_PUTARG_STK, TYP_VOID, arg, stackSeg.GetStackOffset(), - stackSeg.GetStackSize(), call, putInIncomingArgArea); + GenTree* putArg = + new (comp, GT_PUTARG_STK) GenTreePutArgStk(GT_PUTARG_STK, TYP_VOID, arg, stackSeg.GetStackOffset(), + stackSeg.GetStackSize(), call, putInIncomingArgArea); + + BlockRange().InsertAfter(arg, putArg); + *ppArg = arg = putArg; } } - JITDUMP("new node is : "); - DISPNODE(putArg); - JITDUMP("\n"); + if (arg->OperIsPutArgStk() || arg->OperIsPutArgSplit()) + { + LowerPutArgStkOrSplit(arg->AsPutArgStk()); + } - return putArg; + DISPTREERANGE(BlockRange(), arg); } //------------------------------------------------------------------------ -// LowerArg: Lower one argument of a call. This entails splicing a "putarg" node between -// the argument evaluation and the call. This is the point at which the source is -// consumed and the value transitions from control of the register allocator to the calling -// convention. +// InsertBitCastIfNecessary: +// Insert a bitcast if a primitive argument being passed in a register is not +// evaluated in the right type of register. // // Arguments: -// call - The call node -// callArg - Call argument -// late - Whether it is the late arg that is being lowered. +// argNode - Edge for the argument +// registerSegment - Register that the argument is going into // -// Return Value: -// None. -// -void Lowering::LowerArg(GenTreeCall* call, CallArg* callArg, bool late) +void Lowering::InsertBitCastIfNecessary(GenTree** argNode, const ABIPassingSegment& registerSegment) { - GenTree** ppArg = late ? &callArg->LateNodeRef() : &callArg->EarlyNodeRef(); - GenTree* arg = *ppArg; - assert(arg != nullptr); - - JITDUMP("lowering arg : "); - DISPNODE(arg); - assert(arg->IsValue()); - - var_types type = genActualType(arg); - -#if defined(FEATURE_SIMD) -#if defined(TARGET_X86) - // Non-param TYP_SIMD12 local var nodes are massaged in Lower to TYP_SIMD16 to match their - // allocated size (see lvSize()). However, when passing the variables as arguments, and - // storing the variables to the outgoing argument area on the stack, we must use their - // actual TYP_SIMD12 type, so exactly 12 bytes is allocated and written. - if (type == TYP_SIMD16) - { - if ((arg->OperGet() == GT_LCL_VAR) || (arg->OperGet() == GT_STORE_LCL_VAR)) - { - const LclVarDsc* varDsc = comp->lvaGetDesc(arg->AsLclVarCommon()); - type = varDsc->lvType; - } - else if (arg->OperIs(GT_HWINTRINSIC)) - { - GenTreeHWIntrinsic* hwintrinsic = arg->AsHWIntrinsic(); - - // For HWIntrinsic, there are some intrinsics like ExtractVector128 which have - // a gtType of TYP_SIMD16 but a SimdSize of 32, so we can't necessarily assert - // the simd size - - if (hwintrinsic->GetSimdSize() == 12) - { - if (hwintrinsic->GetHWIntrinsicId() != NI_Vector128_AsVector128Unsafe) - { - // Most nodes that have a simdSize of 12 are actually producing a TYP_SIMD12 - // and have been massaged to TYP_SIMD16 to match the actual product size. This - // is not the case for NI_Vector128_AsVector128Unsafe which is explicitly taking - // a TYP_SIMD12 and producing a TYP_SIMD16. - - type = TYP_SIMD12; - } - } - } - } -#elif defined(TARGET_AMD64) - // TYP_SIMD8 parameters that are passed as longs - if (type == TYP_SIMD8 && callArg->NewAbiInfo.HasExactlyOneRegisterSegment() && - genIsValidIntReg(callArg->NewAbiInfo.Segment(0).GetRegister())) + if (varTypeUsesIntReg(*argNode) == genIsValidIntReg(registerSegment.GetRegister())) { - GenTree* bitcast = comp->gtNewBitCastNode(TYP_LONG, arg); - BlockRange().InsertAfter(arg, bitcast); - - *ppArg = arg = bitcast; - type = TYP_LONG; + return; } -#endif // defined(TARGET_X86) -#endif // defined(FEATURE_SIMD) - - // If we hit this we are probably double-lowering. - assert(!arg->OperIsPutArg()); - -#if !defined(TARGET_64BIT) - if (comp->opts.compUseSoftFP && (type == TYP_DOUBLE)) - { - // Unlike TYP_LONG we do no decomposition for doubles, yet we maintain - // it as a primitive type until lowering. So we need to get it into the - // right form here. - - unsigned argLclNum = comp->lvaGrabTemp(false DEBUGARG("double arg on softFP")); - GenTree* store = comp->gtNewTempStore(argLclNum, arg); - GenTree* low = comp->gtNewLclFldNode(argLclNum, TYP_INT, 0); - GenTree* high = comp->gtNewLclFldNode(argLclNum, TYP_INT, 4); - GenTree* longNode = new (comp, GT_LONG) GenTreeOp(GT_LONG, TYP_LONG, low, high); - BlockRange().InsertAfter(arg, store, low, high, longNode); - - *ppArg = arg = longNode; - type = TYP_LONG; - comp->lvaSetVarDoNotEnregister(argLclNum DEBUGARG(DoNotEnregisterReason::LocalField)); - - JITDUMP("Created new nodes for double-typed arg on softFP:\n"); - DISPRANGE(LIR::ReadOnlyRange(store, longNode)); - } + JITDUMP("Argument node [%06u] needs to be passed in %s; inserting bitcast\n", Compiler::dspTreeID(*argNode), + getRegName(registerSegment.GetRegister())); - if (varTypeIsLong(type)) + // Due to padding the node may be smaller than the register segment. In + // such cases we cut off the end of the segment to get an appropriate + // register type for the bitcast. + ABIPassingSegment cutRegisterSegment = registerSegment; + unsigned argNodeSize = genTypeSize(genActualType(*argNode)); + if (registerSegment.Size > argNodeSize) { - noway_assert(arg->OperIs(GT_LONG)); - GenTreeFieldList* fieldList = new (comp, GT_FIELD_LIST) GenTreeFieldList(); - fieldList->AddFieldLIR(comp, arg->AsOp()->gtGetOp1(), 0, TYP_INT); - fieldList->AddFieldLIR(comp, arg->AsOp()->gtGetOp2(), 4, TYP_INT); - GenTree* newArg = NewPutArg(call, fieldList, callArg, type); - - if (callArg->AbiInfo.GetRegNum() != REG_STK) - { - assert(callArg->AbiInfo.NumRegs == 2); - // In the register argument case, NewPutArg replaces the original field list args with new - // GT_PUTARG_REG nodes, inserts them in linear order and returns the field list. So the - // only thing left to do is to insert the field list itself in linear order. - assert(newArg == fieldList); - BlockRange().InsertBefore(arg, newArg); - } - else - { - // For longs, we will replace the GT_LONG with a GT_FIELD_LIST, and put that under a PUTARG_STK. - // Although the hi argument needs to be pushed first, that will be handled by the general case, - // in which the fields will be reversed. - assert(callArg->AbiInfo.GetStackSlotsNumber() == 2); - newArg->SetRegNum(REG_STK); - BlockRange().InsertBefore(arg, fieldList, newArg); - } - - *ppArg = newArg; - BlockRange().Remove(arg); + cutRegisterSegment = + ABIPassingSegment::InRegister(registerSegment.GetRegister(), registerSegment.Offset, argNodeSize); } - else -#endif // !defined(TARGET_64BIT) - { -#if defined(TARGET_ARMARCH) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64) - if (call->IsVarargs() || comp->opts.compUseSoftFP || callArg->AbiInfo.IsMismatchedArgType()) - { - // Insert copies as needed to move float value to integer register - // if the ABI requires it. - GenTree* newNode = LowerFloatArg(ppArg, callArg); - if (newNode != nullptr) - { - type = newNode->TypeGet(); - } - } -#endif // TARGET_ARMARCH || TARGET_LOONGARCH64 || TARGET_RISCV64 + var_types bitCastType = cutRegisterSegment.GetRegisterType(); - GenTree* putArg = NewPutArg(call, arg, callArg, type); + GenTreeUnOp* bitCast = comp->gtNewBitCastNode(bitCastType, *argNode); + BlockRange().InsertAfter(*argNode, bitCast); - // In the case of register passable struct (in one or two registers) - // the NewPutArg returns a new node (GT_PUTARG_REG or a GT_FIELD_LIST with two GT_PUTARG_REGs.) - // If an extra node is returned, splice it in the right place in the tree. - if (arg != putArg) - { - ReplaceArgWithPutArgOrBitcast(ppArg, putArg); - } - } - - arg = *ppArg; - - if (arg->OperIsPutArgStk() || arg->OperIsPutArgSplit()) + *argNode = bitCast; + if (!TryRemoveBitCast(bitCast)) { - LowerPutArgStkOrSplit(arg->AsPutArgStk()); + ContainCheckBitCast(bitCast); } } -#if defined(TARGET_ARMARCH) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64) //------------------------------------------------------------------------ -// LowerFloatArg: Lower float call arguments on the arm/LoongArch64/RiscV64 platform. +// InsertPutArgReg: +// Insert a PUTARG_REG node for the specified edge. If the argument node does +// not fit the register type, then also insert a bitcast. // // Arguments: -// arg - The arg node -// callArg - call argument info -// -// Return Value: -// Return nullptr, if no transformation was done; -// return arg if there was in place transformation; -// return a new tree if the root was changed. +// argNode - Edge for the argument +// registerSegment - Register that the argument is going into // -// Notes: -// This must handle scalar float arguments as well as GT_FIELD_LISTs -// with floating point fields. -// -GenTree* Lowering::LowerFloatArg(GenTree** pArg, CallArg* callArg) +void Lowering::InsertPutArgReg(GenTree** argNode, const ABIPassingSegment& registerSegment) { - GenTree* arg = *pArg; - if (callArg->AbiInfo.GetRegNum() != REG_STK) - { - if (arg->OperIs(GT_FIELD_LIST)) - { - // Transform fields that are passed as registers in place. - regNumber currRegNumber = callArg->AbiInfo.GetRegNum(); - unsigned regIndex = 0; - for (GenTreeFieldList::Use& use : arg->AsFieldList()->Uses()) - { - if (regIndex >= callArg->AbiInfo.NumRegs) - { - break; - } - GenTree* node = use.GetNode(); - if (varTypeUsesFloatReg(node)) - { - GenTree* intNode = LowerFloatArgReg(node, currRegNumber); - assert(intNode != nullptr); + assert(registerSegment.IsPassedInRegister()); - ReplaceArgWithPutArgOrBitcast(&use.NodeRef(), intNode); - } - - if (node->TypeGet() == TYP_DOUBLE) - { - currRegNumber = REG_NEXT(REG_NEXT(currRegNumber)); - regIndex += 2; - } - else - { - currRegNumber = REG_NEXT(currRegNumber); - regIndex += 1; - } - } - // List fields were replaced in place. - return arg; - } - else if (varTypeUsesFloatReg(arg)) - { - GenTree* intNode = LowerFloatArgReg(arg, callArg->AbiInfo.GetRegNum()); - assert(intNode != nullptr); - ReplaceArgWithPutArgOrBitcast(pArg, intNode); - return *pArg; - } - } - return nullptr; + InsertBitCastIfNecessary(argNode, registerSegment); + GenTree* putArg = comp->gtNewPutArgReg(genActualType(*argNode), *argNode, registerSegment.GetRegister()); + BlockRange().InsertAfter(*argNode, putArg); + *argNode = putArg; } //------------------------------------------------------------------------ -// LowerFloatArgReg: Lower the float call argument node that is passed via register. +// LowerArgsForCall: +// Lower the arguments of a call node. // // Arguments: -// arg - The arg node -// regNum - register number -// -// Return Value: -// Return new bitcast node, that moves float to int register. +// call - Call node // -GenTree* Lowering::LowerFloatArgReg(GenTree* arg, regNumber regNum) -{ - assert(varTypeUsesFloatReg(arg)); - - var_types floatType = arg->TypeGet(); - var_types intType = (floatType == TYP_FLOAT) ? TYP_INT : TYP_LONG; - GenTree* intArg = comp->gtNewBitCastNode(intType, arg); - intArg->SetRegNum(regNum); - - return intArg; -} -#endif - -// do lowering steps for each arg of a call void Lowering::LowerArgsForCall(GenTreeCall* call) { - JITDUMP("args:\n======\n"); + JITDUMP("Args:\n======\n"); for (CallArg& arg : call->gtArgs.EarlyArgs()) { - LowerArg(call, &arg, false); + LowerArg(call, &arg); } - JITDUMP("\nlate:\n======\n"); + JITDUMP("\nLate args:\n======\n"); for (CallArg& arg : call->gtArgs.LateArgs()) { - LowerArg(call, &arg, true); + LowerArg(call, &arg); } #if defined(TARGET_X86) && defined(FEATURE_IJW) @@ -3724,7 +3541,7 @@ void Lowering::LowerCFGCall(GenTreeCall* call) targetArg->AbiInfo.ByteSize = TARGET_POINTER_SIZE; // Lower the newly added args now that call is updated - LowerArg(call, targetArg, true /* late */); + LowerArg(call, targetArg); // Finally update the call to be a helper call call->gtCallType = CT_HELPER; @@ -4850,7 +4667,7 @@ void Lowering::LowerRet(GenTreeOp* ret) assert(!varTypeIsStruct(ret) && !varTypeIsStruct(retVal)); #endif - GenTree* bitcast = comp->gtNewBitCastNode(ret->TypeGet(), retVal); + GenTreeUnOp* bitcast = comp->gtNewBitCastNode(ret->TypeGet(), retVal); ret->SetReturnValue(bitcast); BlockRange().InsertBefore(ret, bitcast); ContainCheckBitCast(bitcast); @@ -5234,9 +5051,9 @@ GenTree* Lowering::LowerStoreLocCommon(GenTreeLclVarCommon* lclStore) assert(lclStore->OperIsLocalStore()); assert(lclRegType != TYP_UNDEF); - GenTree* bitcast = comp->gtNewBitCastNode(lclRegType, src); - lclStore->gtOp1 = bitcast; - src = lclStore->gtGetOp1(); + GenTreeUnOp* bitcast = comp->gtNewBitCastNode(lclRegType, src); + lclStore->gtOp1 = bitcast; + src = lclStore->gtGetOp1(); BlockRange().InsertBefore(lclStore, bitcast); ContainCheckBitCast(bitcast); } @@ -5351,8 +5168,8 @@ void Lowering::LowerRetStruct(GenTreeUnOp* ret) assert(varTypeIsEnregisterable(retVal)); if (!varTypeUsesSameRegType(ret, retVal)) { - GenTree* bitcast = comp->gtNewBitCastNode(ret->TypeGet(), retVal); - ret->gtOp1 = bitcast; + GenTreeUnOp* bitcast = comp->gtNewBitCastNode(ret->TypeGet(), retVal); + ret->gtOp1 = bitcast; BlockRange().InsertBefore(ret, bitcast); ContainCheckBitCast(bitcast); } @@ -5423,7 +5240,7 @@ void Lowering::LowerRetSingleRegStructLclVar(GenTreeUnOp* ret) if (!varTypeUsesSameRegType(ret, lclVarType)) { - GenTree* bitcast = comp->gtNewBitCastNode(ret->TypeGet(), ret->gtOp1); + GenTreeUnOp* bitcast = comp->gtNewBitCastNode(ret->TypeGet(), ret->gtOp1); ret->AsOp()->SetReturnValue(bitcast); BlockRange().InsertBefore(ret, bitcast); ContainCheckBitCast(bitcast); @@ -5521,7 +5338,7 @@ void Lowering::LowerCallStruct(GenTreeCall* call) { if (!varTypeUsesSameRegType(returnType, origType)) { - GenTree* bitCast = comp->gtNewBitCastNode(origType, call); + GenTreeUnOp* bitCast = comp->gtNewBitCastNode(origType, call); BlockRange().InsertAfter(call, bitCast); callUse.ReplaceWith(bitCast); ContainCheckBitCast(bitCast); @@ -8881,7 +8698,7 @@ void Lowering::ContainCheckNode(GenTree* node) ContainCheckCast(node->AsCast()); break; case GT_BITCAST: - ContainCheckBitCast(node); + ContainCheckBitCast(node->AsUnOp()); break; case GT_LCLHEAP: ContainCheckLclHeap(node->AsOp()); @@ -8997,15 +8814,105 @@ void Lowering::ContainCheckRet(GenTreeUnOp* ret) #endif // FEATURE_MULTIREG_RET } +//------------------------------------------------------------------------ +// TryRemoveBitCast: +// Try to remove a bitcast node by changing its operand. +// +// Arguments: +// node - Bitcast node +// +// Returns: +// True if the bitcast was removed. +// +bool Lowering::TryRemoveBitCast(GenTreeUnOp* node) +{ + if (comp->opts.OptimizationDisabled()) + { + return false; + } + + GenTree* op = node->gtGetOp1(); + assert(genTypeSize(node) == genTypeSize(genActualType(op))); + + bool changed = false; +#ifdef FEATURE_SIMD + bool isConst = op->OperIs(GT_CNS_INT, GT_CNS_DBL, GT_CNS_VEC); +#else + bool isConst = op->OperIs(GT_CNS_INT, GT_CNS_DBL); +#endif + + if (isConst) + { + uint8_t bits[sizeof(simd_t)]; + assert(sizeof(bits) >= genTypeSize(genActualType(op))); + if (op->OperIs(GT_CNS_INT)) + { + ssize_t cns = op->AsIntCon()->IconValue(); + assert(sizeof(ssize_t) >= genTypeSize(genActualType(op))); + memcpy(bits, &cns, genTypeSize(genActualType(op))); + } +#ifdef FEATURE_SIMD + else if (op->OperIs(GT_CNS_VEC)) + { + memcpy(bits, &op->AsVecCon()->gtSimdVal, genTypeSize(op)); + } +#endif + else + { + if (op->TypeIs(TYP_FLOAT)) + { + float floatVal = FloatingPointUtils::convertToSingle(op->AsDblCon()->DconValue()); + memcpy(bits, &floatVal, sizeof(float)); + } + else + { + double doubleVal = op->AsDblCon()->DconValue(); + memcpy(bits, &doubleVal, sizeof(double)); + } + } + + GenTree* newCon = comp->gtNewGenericCon(node->TypeGet(), bits); + BlockRange().InsertAfter(op, newCon); + BlockRange().Remove(op); + + node->gtOp1 = op = newCon; + + changed = true; + } + else if (op->OperIs(GT_LCL_FLD, GT_IND)) + { + op->ChangeType(node->TypeGet()); + changed = true; + } + + if (!changed) + { + return false; + } + + LIR::Use use; + if (BlockRange().TryGetUse(node, &use)) + { + use.ReplaceWith(op); + } + else + { + op->SetUnusedValue(); + } + + BlockRange().Remove(node); + return true; +} + //------------------------------------------------------------------------ // ContainCheckBitCast: determine whether the source of a BITCAST should be contained. // // Arguments: // node - pointer to the node // -void Lowering::ContainCheckBitCast(GenTree* node) +void Lowering::ContainCheckBitCast(GenTreeUnOp* node) { - GenTree* const op1 = node->AsOp()->gtOp1; + GenTree* const op1 = node->gtGetOp1(); if (op1->OperIs(GT_LCL_VAR) && (genTypeSize(op1) == genTypeSize(node))) { if (IsContainableMemoryOp(op1) && IsSafeToContainMem(node, op1)) diff --git a/src/coreclr/jit/lower.h b/src/coreclr/jit/lower.h index ec6507129f8d45..44031cf09c7b3d 100644 --- a/src/coreclr/jit/lower.h +++ b/src/coreclr/jit/lower.h @@ -102,7 +102,7 @@ class Lowering final : public Phase bool TryContainingCselOp(GenTreeHWIntrinsic* parentNode, GenTreeHWIntrinsic* childNode); #endif void ContainCheckSelect(GenTreeOp* select); - void ContainCheckBitCast(GenTree* node); + void ContainCheckBitCast(GenTreeUnOp* node); void ContainCheckCallOperands(GenTreeCall* call); void ContainCheckIndir(GenTreeIndir* indirNode); void ContainCheckStoreIndir(GenTreeStoreInd* indirNode); @@ -192,17 +192,13 @@ class Lowering final : public Phase GenTree* LowerVirtualVtableCall(GenTreeCall* call); GenTree* LowerVirtualStubCall(GenTreeCall* call); void LowerArgsForCall(GenTreeCall* call); - void ReplaceArgWithPutArgOrBitcast(GenTree** ppChild, GenTree* newNode); #if defined(TARGET_X86) && defined(FEATURE_IJW) void LowerSpecialCopyArgs(GenTreeCall* call); void InsertSpecialCopyArg(GenTreePutArgStk* putArgStk, CORINFO_CLASS_HANDLE argType, unsigned lclNum); #endif // defined(TARGET_X86) && defined(FEATURE_IJW) - GenTree* NewPutArg(GenTreeCall* call, GenTree* arg, CallArg* callArg, var_types type); - void LowerArg(GenTreeCall* call, CallArg* callArg, bool late); -#if defined(TARGET_ARMARCH) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64) - GenTree* LowerFloatArg(GenTree** pArg, CallArg* callArg); - GenTree* LowerFloatArgReg(GenTree* arg, regNumber regNum); -#endif + void LowerArg(GenTreeCall* call, CallArg* callArg); + void InsertBitCastIfNecessary(GenTree** argNode, const ABIPassingSegment& registerSegment); + void InsertPutArgReg(GenTree** node, const ABIPassingSegment& registerSegment); void LegalizeArgPlacement(GenTreeCall* call); void InsertPInvokeCallProlog(GenTreeCall* call); @@ -390,6 +386,8 @@ class Lowering final : public Phase void LowerPutArgStkOrSplit(GenTreePutArgStk* putArgNode); GenTree* LowerArrLength(GenTreeArrCommon* node); + bool TryRemoveBitCast(GenTreeUnOp* node); + #ifdef TARGET_XARCH void LowerPutArgStk(GenTreePutArgStk* putArgStk); GenTree* TryLowerMulWithConstant(GenTreeOp* node); diff --git a/src/coreclr/jit/morph.cpp b/src/coreclr/jit/morph.cpp index 5f11ac9a065056..bd1a9c86bcf744 100644 --- a/src/coreclr/jit/morph.cpp +++ b/src/coreclr/jit/morph.cpp @@ -2545,20 +2545,6 @@ bool Compiler::fgTryMorphStructArg(CallArg* arg) fieldsMatch = false; break; } - - var_types fieldType = lvaGetDesc(fieldLclNum)->TypeGet(); - var_types regType = genActualType(seg.GetRegisterType()); - - if (!varTypeUsesSameRegType(fieldType, regType)) - { - // TODO-CQ: We should be able to tolerate mismatches by inserting GT_BITCAST in lowering. - // - JITDUMP("Struct V%02u will be passed using GT_LCL_FLD because of type mismatch: " - "register type is %s, field local V%02u's type is %s\n", - lclNum, varTypeName(regType), fieldLclNum, varTypeName(fieldType)); - fieldsMatch = false; - break; - } } else { @@ -2708,8 +2694,7 @@ bool Compiler::fgTryMorphStructArg(CallArg* arg) // We sometimes end up with struct reinterpretations where the // retyping into a primitive allows us to replace by a scalar // local here, so make sure we do that if possible. - if ((lclVar->GetLclOffs() == 0) && (offset == 0) && (genTypeSize(type) == genTypeSize(dsc)) && - varTypeUsesSameRegType(type, dsc)) + if ((lclVar->GetLclOffs() == 0) && (offset == 0) && (genTypeSize(type) == genTypeSize(dsc))) { result = gtNewLclVarNode(lclVar->GetLclNum()); } diff --git a/src/coreclr/jit/promotion.cpp b/src/coreclr/jit/promotion.cpp index 5f30040d6e3a8e..951fc2a6171fdc 100644 --- a/src/coreclr/jit/promotion.cpp +++ b/src/coreclr/jit/promotion.cpp @@ -2538,12 +2538,6 @@ bool ReplaceVisitor::CanReplaceCallArgWithFieldListOfReplacements(GenTreeCall* return false; } - // Finally, the backend requires the register types to match. - if (!varTypeUsesSameRegType(rep.AccessType, seg.GetRegisterType())) - { - return false; - } - return true; }; From 00b4fa7644fb601e8e9db051b3bee4bf0401ae2e Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 18 Feb 2025 14:04:21 -0600 Subject: [PATCH 11/27] Update dependencies from https://github.com/dotnet/arcade build 20250213.2 (#112625) Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XliffTasks , Microsoft.DotNet.XUnitAssert , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.XUnitExtensions From Version 10.0.0-beta.25106.4 -> To Version 10.0.0-beta.25113.2 Co-authored-by: dotnet-maestro[bot] --- eng/Version.Details.xml | 84 +++++++++---------- eng/Versions.props | 32 +++---- .../core-templates/steps/source-build.yml | 2 +- global.json | 6 +- 4 files changed, 62 insertions(+), 62 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 24d182daa4dc7f..0ed9459f5c5c78 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -84,87 +84,87 @@ - + https://github.com/dotnet/arcade - 91630b31ce859c28f637b62b566ea8829b982f2c + ea0a0a28cccd4b63a9ec40df53ef2df260ffa5b1 - + https://github.com/dotnet/arcade - 91630b31ce859c28f637b62b566ea8829b982f2c + ea0a0a28cccd4b63a9ec40df53ef2df260ffa5b1 - + https://github.com/dotnet/arcade - 91630b31ce859c28f637b62b566ea8829b982f2c + ea0a0a28cccd4b63a9ec40df53ef2df260ffa5b1 - + https://github.com/dotnet/arcade - 91630b31ce859c28f637b62b566ea8829b982f2c + ea0a0a28cccd4b63a9ec40df53ef2df260ffa5b1 - + https://github.com/dotnet/arcade - 91630b31ce859c28f637b62b566ea8829b982f2c + ea0a0a28cccd4b63a9ec40df53ef2df260ffa5b1 - + https://github.com/dotnet/arcade - 91630b31ce859c28f637b62b566ea8829b982f2c + ea0a0a28cccd4b63a9ec40df53ef2df260ffa5b1 - + https://github.com/dotnet/arcade - 91630b31ce859c28f637b62b566ea8829b982f2c + ea0a0a28cccd4b63a9ec40df53ef2df260ffa5b1 - + https://github.com/dotnet/arcade - 91630b31ce859c28f637b62b566ea8829b982f2c + ea0a0a28cccd4b63a9ec40df53ef2df260ffa5b1 - + https://github.com/dotnet/arcade - 91630b31ce859c28f637b62b566ea8829b982f2c + ea0a0a28cccd4b63a9ec40df53ef2df260ffa5b1 - + https://github.com/dotnet/arcade - 91630b31ce859c28f637b62b566ea8829b982f2c + ea0a0a28cccd4b63a9ec40df53ef2df260ffa5b1 - + https://github.com/dotnet/arcade - 91630b31ce859c28f637b62b566ea8829b982f2c + ea0a0a28cccd4b63a9ec40df53ef2df260ffa5b1 - + https://github.com/dotnet/arcade - 91630b31ce859c28f637b62b566ea8829b982f2c + ea0a0a28cccd4b63a9ec40df53ef2df260ffa5b1 - + https://github.com/dotnet/arcade - 91630b31ce859c28f637b62b566ea8829b982f2c + ea0a0a28cccd4b63a9ec40df53ef2df260ffa5b1 - + https://github.com/dotnet/arcade - 91630b31ce859c28f637b62b566ea8829b982f2c + ea0a0a28cccd4b63a9ec40df53ef2df260ffa5b1 - + https://github.com/dotnet/arcade - 91630b31ce859c28f637b62b566ea8829b982f2c + ea0a0a28cccd4b63a9ec40df53ef2df260ffa5b1 - + https://github.com/dotnet/arcade - 91630b31ce859c28f637b62b566ea8829b982f2c + ea0a0a28cccd4b63a9ec40df53ef2df260ffa5b1 - + https://github.com/dotnet/arcade - 91630b31ce859c28f637b62b566ea8829b982f2c + ea0a0a28cccd4b63a9ec40df53ef2df260ffa5b1 - + https://github.com/dotnet/arcade - 91630b31ce859c28f637b62b566ea8829b982f2c + ea0a0a28cccd4b63a9ec40df53ef2df260ffa5b1 - + https://github.com/dotnet/arcade - 91630b31ce859c28f637b62b566ea8829b982f2c + ea0a0a28cccd4b63a9ec40df53ef2df260ffa5b1 - + https://github.com/dotnet/arcade - 91630b31ce859c28f637b62b566ea8829b982f2c + ea0a0a28cccd4b63a9ec40df53ef2df260ffa5b1 https://github.com/dotnet/runtime-assets @@ -348,9 +348,9 @@ https://github.com/dotnet/xharness cf1b2925785f504d4d52773bcab470044e35ea15 - + https://github.com/dotnet/arcade - 91630b31ce859c28f637b62b566ea8829b982f2c + ea0a0a28cccd4b63a9ec40df53ef2df260ffa5b1 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/Versions.props b/eng/Versions.props index 1ae5266427bedd..1e130578e9f86f 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -85,22 +85,22 @@ 10.0.100-preview.2.25108.4 - 10.0.0-beta.25106.4 - 10.0.0-beta.25106.4 - 10.0.0-beta.25106.4 - 10.0.0-beta.25106.4 - 2.9.2-beta.25106.4 - 10.0.0-beta.25106.4 - 2.9.2-beta.25106.4 - 10.0.0-beta.25106.4 - 10.0.0-beta.25106.4 - 10.0.0-beta.25106.4 - 10.0.0-beta.25106.4 - 10.0.0-beta.25106.4 - 10.0.0-beta.25106.4 - 10.0.0-beta.25106.4 - 10.0.0-beta.25106.4 - 10.0.0-beta.25106.4 + 10.0.0-beta.25113.2 + 10.0.0-beta.25113.2 + 10.0.0-beta.25113.2 + 10.0.0-beta.25113.2 + 2.9.2-beta.25113.2 + 10.0.0-beta.25113.2 + 2.9.2-beta.25113.2 + 10.0.0-beta.25113.2 + 10.0.0-beta.25113.2 + 10.0.0-beta.25113.2 + 10.0.0-beta.25113.2 + 10.0.0-beta.25113.2 + 10.0.0-beta.25113.2 + 10.0.0-beta.25113.2 + 10.0.0-beta.25113.2 + 10.0.0-beta.25113.2 1.4.0 diff --git a/eng/common/core-templates/steps/source-build.yml b/eng/common/core-templates/steps/source-build.yml index f9ba1625c20f18..2341706b0668f8 100644 --- a/eng/common/core-templates/steps/source-build.yml +++ b/eng/common/core-templates/steps/source-build.yml @@ -37,7 +37,7 @@ steps: # in the default public locations. internalRuntimeDownloadArgs= if [ '$(dotnetbuilds-internal-container-read-token-base64)' != '$''(dotnetbuilds-internal-container-read-token-base64)' ]; then - internalRuntimeDownloadArgs='/p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) --runtimesourcefeed https://dotnetbuilds.blob.core.windows.net/internal --runtimesourcefeedkey $(dotnetbuilds-internal-container-read-token-base64)' + internalRuntimeDownloadArgs='/p:DotNetRuntimeSourceFeed=https://ci.dot.net/internal /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) --runtimesourcefeed https://ci.dot.net/internal --runtimesourcefeedkey $(dotnetbuilds-internal-container-read-token-base64)' fi buildConfig=Release diff --git a/global.json b/global.json index 12965784ea2d87..281ab3c33e0b6c 100644 --- a/global.json +++ b/global.json @@ -8,9 +8,9 @@ "dotnet": "10.0.100-alpha.1.25077.2" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25106.4", - "Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25106.4", - "Microsoft.DotNet.SharedFramework.Sdk": "10.0.0-beta.25106.4", + "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.25113.2", + "Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.25113.2", + "Microsoft.DotNet.SharedFramework.Sdk": "10.0.0-beta.25113.2", "Microsoft.Build.NoTargets": "3.7.0", "Microsoft.Build.Traversal": "3.4.0", "Microsoft.NET.Sdk.IL": "10.0.0-alpha.1.25068.1" From 230fea182b53e10e036b5319b2701cdb43e7c30c Mon Sep 17 00:00:00 2001 From: Aman Khalid Date: Tue, 18 Feb 2025 15:10:21 -0500 Subject: [PATCH 12/27] JIT: Use linear block order for MinOpts in LSRA (#108147) Follow-up from #108086 (comment). Since LSRA shouldn't create cross-block live registers in MinOpts, LSRA's block ordering shouldn't matter, so just use the lexical order we have on-hand. --- src/coreclr/jit/lsra.cpp | 60 ++++++++++++++++++----------------- src/coreclr/jit/lsrabuild.cpp | 28 +++++++++------- 2 files changed, 47 insertions(+), 41 deletions(-) diff --git a/src/coreclr/jit/lsra.cpp b/src/coreclr/jit/lsra.cpp index 6ae6543b7be51a..3b764bfe165ad0 100644 --- a/src/coreclr/jit/lsra.cpp +++ b/src/coreclr/jit/lsra.cpp @@ -956,7 +956,7 @@ LinearScan::LinearScan(Compiler* theCompiler) // Notes: // On return, the blockSequence array contains the blocks in reverse post-order. // This method clears the bbVisitedSet on LinearScan, and when it returns the set -// contains all the bbNums for the block. +// contains all the bbPostorderNums for the block. // void LinearScan::setBlockSequence() { @@ -967,30 +967,33 @@ void LinearScan::setBlockSequence() bbVisitedSet = BitVecOps::MakeEmpty(traits); assert((blockSequence == nullptr) && (bbSeqCount == 0)); - - compiler->m_dfsTree = compiler->fgComputeDfs(); - FlowGraphDfsTree* const dfsTree = compiler->m_dfsTree; - blockSequence = new (compiler, CMK_LSRA) BasicBlock*[compiler->fgBBcount]; + blockSequence = new (compiler, CMK_LSRA) BasicBlock*[compiler->fgBBcount]; if (compiler->opts.OptimizationEnabled()) { - // Ensure loop bodies are compact in the visitation order. - compiler->m_loops = FlowGraphNaturalLoops::Find(dfsTree); + // If optimizations are enabled, allocate blocks in reverse post-order. + // This ensures each block's predecessors are visited first. + // Also, ensure loop bodies are compact in the visitation order. + compiler->m_dfsTree = compiler->fgComputeDfs(); + compiler->m_loops = FlowGraphNaturalLoops::Find(compiler->m_dfsTree); FlowGraphNaturalLoops* const loops = compiler->m_loops; - unsigned index = 0; - auto addToSequence = [this, &index](BasicBlock* block) { - blockSequence[index++] = block; + auto addToSequence = [this](BasicBlock* block) { + blockSequence[bbSeqCount++] = block; }; - compiler->fgVisitBlocksInLoopAwareRPO(dfsTree, loops, addToSequence); + compiler->fgVisitBlocksInLoopAwareRPO(compiler->m_dfsTree, loops, addToSequence); } else { - // TODO: Just use lexical block order in MinOpts - for (unsigned i = 0; i < dfsTree->GetPostOrderCount(); i++) + // If we aren't optimizing, we won't have any cross-block live registers, + // so the order of blocks allocated shouldn't matter. + // Just use the linear order. + for (BasicBlock* const block : compiler->Blocks()) { - blockSequence[i] = dfsTree->GetPostOrder(dfsTree->GetPostOrderCount() - i - 1); + // Give this block a unique post-order number that can be used as a key into bbVisitedSet + block->bbPostorderNum = bbSeqCount; + blockSequence[bbSeqCount++] = block; } } @@ -1094,30 +1097,29 @@ void LinearScan::setBlockSequence() }; JITDUMP("Start LSRA Block Sequence: \n"); - for (unsigned i = 0; i < dfsTree->GetPostOrderCount(); i++) + for (unsigned i = 0; i < bbSeqCount; i++) { visitBlock(blockSequence[i]); } - // If the DFS didn't visit any blocks, add them to the end of blockSequence - if (dfsTree->GetPostOrderCount() < compiler->fgBBcount) + // If any blocks remain unvisited, add them to the end of blockSequence. + // Unvisited blocks are more likely to be at the back of the list, so iterate backwards. + for (BasicBlock* block = compiler->fgLastBB; bbSeqCount < compiler->fgBBcount; block = block->Prev()) { - // Unvisited blocks are more likely to be at the back of the list, so iterate backwards - unsigned i = dfsTree->GetPostOrderCount(); - for (BasicBlock* block = compiler->fgLastBB; i < compiler->fgBBcount; block = block->Prev()) + assert(compiler->opts.OptimizationEnabled()); + assert(block != nullptr); + assert(compiler->m_dfsTree != nullptr); + + if (!compiler->m_dfsTree->Contains(block)) { - assert(block != nullptr); - if (!dfsTree->Contains(block)) - { - // Give this block a unique post-order number that can be used as a key into bbVisitedSet - block->bbPostorderNum = i; - visitBlock(block); - blockSequence[i++] = block; - } + // Give this block a unique post-order number that can be used as a key into bbVisitedSet + block->bbPostorderNum = bbSeqCount; + visitBlock(block); + blockSequence[bbSeqCount++] = block; } } - bbSeqCount = compiler->fgBBcount; + assert(bbSeqCount == compiler->fgBBcount); blockSequencingDone = true; #ifdef DEBUG diff --git a/src/coreclr/jit/lsrabuild.cpp b/src/coreclr/jit/lsrabuild.cpp index 5abe2e40411681..cb8208d8adbefa 100644 --- a/src/coreclr/jit/lsrabuild.cpp +++ b/src/coreclr/jit/lsrabuild.cpp @@ -2326,32 +2326,31 @@ void LinearScan::buildIntervals() numPlacedArgLocals = 0; placedArgRegs = RBM_NONE; - BasicBlock* predBlock = nullptr; BasicBlock* prevBlock = nullptr; // Initialize currentLiveVars to the empty set. We will set it to the current // live-in at the entry to each block (this will include the incoming args on // the first block). VarSetOps::AssignNoCopy(compiler, currentLiveVars, VarSetOps::MakeEmpty(compiler)); + const bool floatingPointUsed = compiler->compFloatingPointUsed; for (block = startBlockSequence(); block != nullptr; block = moveToNextBlock()) { JITDUMP("\nNEW BLOCK " FMT_BB "\n", block->bbNum); compiler->compCurBB = block; - bool predBlockIsAllocated = false; - predBlock = findPredBlockForLiveIn(block, prevBlock DEBUGARG(&predBlockIsAllocated)); - if (predBlock != nullptr) - { - JITDUMP("\n\nSetting " FMT_BB " as the predecessor for determining incoming variable registers of " FMT_BB - "\n", - predBlock->bbNum, block->bbNum); - assert(predBlock->bbNum <= bbNumMaxBeforeResolution); - blockInfo[block->bbNum].predBBNum = predBlock->bbNum; - } - if (localVarsEnregistered) { + bool predBlockIsAllocated = false; + BasicBlock* const predBlock = findPredBlockForLiveIn(block, prevBlock DEBUGARG(&predBlockIsAllocated)); + if (predBlock != nullptr) + { + JITDUMP("\n\nSetting " FMT_BB + " as the predecessor for determining incoming variable registers of " FMT_BB "\n", + predBlock->bbNum, block->bbNum); + assert(predBlock->bbNum <= bbNumMaxBeforeResolution); + blockInfo[block->bbNum].predBBNum = predBlock->bbNum; + } VarSetOps::AssignNoCopy(compiler, currentLiveVars, VarSetOps::Intersection(compiler, registerCandidateVars, block->bbLiveIn)); @@ -2411,6 +2410,11 @@ void LinearScan::buildIntervals() } } } + else + { + // If state isn't live across blocks, then reset any global Compiler state. + compiler->compFloatingPointUsed = floatingPointUsed; + } // Add a dummy RefPosition to mark the block boundary. // Note that we do this AFTER adding the exposed uses above, because the From b61c07c1436b5057f2d658f232211c0032202a95 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Tue, 18 Feb 2025 13:18:32 -0800 Subject: [PATCH 13/27] Expose StressLog via CDAC and port StressLogAnalyzer to managed code (#104999) * Start a StressLog contract for CDAC Start on the data parsing and fill out the contract more Implement stress message payload parsing and thread stress log iteration Implement everything except for printing the string output Implement output string formatting for stress log messages Move all StressMsg logic into the contract and out of the data type. Split the stress log contract into different versions and refactor out the StressLogHeader to be entirely a StressLogAnalyzer concern (not used in the cDAC implementation at all) Expose the module table directly to avoid going through the StressLog object to read the module table (which isn't present in the memory-mapped log) Give a nicer error message for an easy-to-fall-in special case in the data descriptor scraping. Fix a few datadescriptor problems * Start on StressLogAnalyzer port. Move stress message formatting out of the contract. * Load in and read the thread stress logs and the stress messages. * Add support for Ix, I64 specifiers * Refactor into src/test directories and add tests for basic format strings * Add more tests and extend the signed integer test case to test a ton more cases (including the alignment scenarios). * Add special pointer formatting hook and a default implementation for StressLogAnalyzer * Write the command line and start work on porting over logic (first one is format string matching). * Add GC heap map memory and default string handling * Implement GC heap map association * Fill in more processing and start on sketching out the output handling. * Port over remaining features * Remove native StressLogAnalyzer * Get 'dump all messages' working correctly * Fix format offset calculation and update contract md to include references to the used data descriptors. * Add a conceptual description of how to format a StressLog message * Implement escape sequence interpretation * Redefine maxMsgSize to make it C++11 constexpr-compliant even with our debug return logging (make it a const instead of a function) * Add "is pointer in stresslog" contract function for SOS's GCHandleLeaks functionality * Add some additional members to the contract to allow implementing all SOS StressLog introspection * Wire up ISOSDacInterface::GetStressLogAddress while I'm here * Update the StressLog contract to better describe and cross-link the custom format specifiers * Start adjusting output to match StressLogAnalyzer * Fix discovering the first message of a new chunk * Fix remaining output nits that would cause the most confusion. * Lots of perf improvements and some fixes * Rewrite GC time index searching for better perf * Make GC thread filtering more aggressive and fix non-GC thread filtering. Add support for %f because GC uses it. * Hook into clr.tools and clr.toolstests subsets * Remove uncessary cast * Correctly implement the quit/retry commands * Use string helpers from Target * Remove dead code now that StressLogAnalyzer is in C# * Update StressLogAnalyzer (not the tests) to the new refactoring. * Fix tets and use Moq to mock the target instead of constructing a fake memory space * Add support for padded strings as they're apparently used by the GC. * PR feedback and allow a module table to be present or absent in v1/v2 (and remove v0) to support NativeAOT with no changes to the contract * Fix typo * Update IStressLog.cs * Fix body and accessibility * Make the message filter internal * Move the formatter for stress messages into the Contracts assembly as the same logic will be used from any StressLog reader. The implementation of the formatter will not be part of the contract itself, but the description of the format string's structure is part of the contract (this is already the case in this branch). * Remove trailing references to StressLogAnalyzer.Tests * Use composition instead of inheritance --- docs/design/datacontracts/StressLog.md | 335 ++++ eng/Subsets.props | 3 +- src/coreclr/debug/runtimeinfo/contracts.jsonc | 3 +- .../debug/runtimeinfo/datadescriptor.h | 64 + src/coreclr/inc/stresslog.h | 114 +- src/coreclr/nativeaot/Runtime/inc/stressLog.h | 5 +- src/coreclr/nativeaot/Runtime/stressLog.cpp | 2 +- src/coreclr/tools/CMakeLists.txt | 4 - .../tools/StressLogAnalyzer/CMakeLists.txt | 16 - .../StressLogAnalyzer/StressLogAnalyzer.cpp | 202 --- .../tools/StressLogAnalyzer/StressLogDump.cpp | 564 ------ .../StressLogAnalyzer/StressLogPlugin.cpp | 1555 ----------------- .../tools/StressLogAnalyzer/StressMsgReader.h | 80 - .../tools/StressLogAnalyzer/staticcontract.h | 9 - src/coreclr/tools/StressLogAnalyzer/strike.h | 63 - src/coreclr/tools/StressLogAnalyzer/util.h | 158 -- .../cdac-build-tool/ObjectFileScraper.cs | 4 + .../Contracts/IStressLog.cs | 48 + .../DataType.cs | 7 + .../Constants.cs | 10 + .../Contracts/StressLog.cs | 361 ++++ .../Data/StressLog.cs | 46 + .../Data/StressLogChunk.cs | 29 + .../Data/StressLogModuleDesc.cs | 22 + .../Data/StressMsg.cs | 24 + .../Data/ThreadStressLog.cs | 31 + .../PrintfStressMessageFormatter.cs | 331 ++++ .../ContractDescriptorTarget.cs | 24 + .../cdacreader/src/Legacy/SOSDacImpl.cs | 17 +- .../PrintfStressMessageFormatterTests.cs | 375 ++++ .../StressLogAnalyzer/StressLogAnalyzer.sln | 48 + .../src/DefaultSpecialPointerFormatter.cs | 19 + .../src/Filters/AllMessagesFilter.cs | 19 + .../src/Filters/DPrintLevelFilter.cs | 25 + .../src/Filters/FacilityMessageFilter.cs | 36 + .../src/Filters/IMessageFilter.cs | 11 + .../src/Filters/InterestingMessageFilter.cs | 17 + .../src/Filters/ValueFilter.cs | 21 + .../src/Filters/ValueRangeFilter.cs | 77 + .../StressLogAnalyzer/src/GCThreadMap.cs | 91 + .../src/IInterestingStringFinder.cs | 40 + .../src/InterestingStringFinder.cs | 150 ++ .../StressLogAnalyzer/src/LogFacility.cs | 41 + src/tools/StressLogAnalyzer/src/Options.cs | 104 ++ .../src/Output/GCThreadNameOutput.cs | 25 + .../src/Output/HexThreadNameOutput.cs | 15 + .../src/Output/IStressMessageOutput.cs | 13 + .../src/Output/IThreadNameOutput.cs | 15 + .../src/Output/StressMessageWriter.cs | 51 + src/tools/StressLogAnalyzer/src/Program.cs | 587 +++++++ .../src/StressLogAnalyzer.cs | 176 ++ .../src/StressLogAnalyzer.csproj | 22 + .../StressLogAnalyzer/src/StressLogHeader.cs | 66 + .../StressLogAnalyzer/src/TimeTracker.cs | 121 ++ 54 files changed, 3585 insertions(+), 2711 deletions(-) create mode 100644 docs/design/datacontracts/StressLog.md delete mode 100644 src/coreclr/tools/StressLogAnalyzer/CMakeLists.txt delete mode 100644 src/coreclr/tools/StressLogAnalyzer/StressLogAnalyzer.cpp delete mode 100644 src/coreclr/tools/StressLogAnalyzer/StressLogDump.cpp delete mode 100644 src/coreclr/tools/StressLogAnalyzer/StressLogPlugin.cpp delete mode 100644 src/coreclr/tools/StressLogAnalyzer/StressMsgReader.h delete mode 100644 src/coreclr/tools/StressLogAnalyzer/staticcontract.h delete mode 100644 src/coreclr/tools/StressLogAnalyzer/strike.h delete mode 100644 src/coreclr/tools/StressLogAnalyzer/util.h create mode 100644 src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Abstractions/Contracts/IStressLog.cs create mode 100644 src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/StressLog.cs create mode 100644 src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Data/StressLog.cs create mode 100644 src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Data/StressLogChunk.cs create mode 100644 src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Data/StressLogModuleDesc.cs create mode 100644 src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Data/StressMsg.cs create mode 100644 src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Data/ThreadStressLog.cs create mode 100644 src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/PrintfStressMessageFormatter.cs create mode 100644 src/native/managed/cdacreader/tests/PrintfStressMessageFormatterTests.cs create mode 100644 src/tools/StressLogAnalyzer/StressLogAnalyzer.sln create mode 100644 src/tools/StressLogAnalyzer/src/DefaultSpecialPointerFormatter.cs create mode 100644 src/tools/StressLogAnalyzer/src/Filters/AllMessagesFilter.cs create mode 100644 src/tools/StressLogAnalyzer/src/Filters/DPrintLevelFilter.cs create mode 100644 src/tools/StressLogAnalyzer/src/Filters/FacilityMessageFilter.cs create mode 100644 src/tools/StressLogAnalyzer/src/Filters/IMessageFilter.cs create mode 100644 src/tools/StressLogAnalyzer/src/Filters/InterestingMessageFilter.cs create mode 100644 src/tools/StressLogAnalyzer/src/Filters/ValueFilter.cs create mode 100644 src/tools/StressLogAnalyzer/src/Filters/ValueRangeFilter.cs create mode 100644 src/tools/StressLogAnalyzer/src/GCThreadMap.cs create mode 100644 src/tools/StressLogAnalyzer/src/IInterestingStringFinder.cs create mode 100644 src/tools/StressLogAnalyzer/src/InterestingStringFinder.cs create mode 100644 src/tools/StressLogAnalyzer/src/LogFacility.cs create mode 100644 src/tools/StressLogAnalyzer/src/Options.cs create mode 100644 src/tools/StressLogAnalyzer/src/Output/GCThreadNameOutput.cs create mode 100644 src/tools/StressLogAnalyzer/src/Output/HexThreadNameOutput.cs create mode 100644 src/tools/StressLogAnalyzer/src/Output/IStressMessageOutput.cs create mode 100644 src/tools/StressLogAnalyzer/src/Output/IThreadNameOutput.cs create mode 100644 src/tools/StressLogAnalyzer/src/Output/StressMessageWriter.cs create mode 100644 src/tools/StressLogAnalyzer/src/Program.cs create mode 100644 src/tools/StressLogAnalyzer/src/StressLogAnalyzer.cs create mode 100644 src/tools/StressLogAnalyzer/src/StressLogAnalyzer.csproj create mode 100644 src/tools/StressLogAnalyzer/src/StressLogHeader.cs create mode 100644 src/tools/StressLogAnalyzer/src/TimeTracker.cs diff --git a/docs/design/datacontracts/StressLog.md b/docs/design/datacontracts/StressLog.md new file mode 100644 index 00000000000000..abb7824a837f0c --- /dev/null +++ b/docs/design/datacontracts/StressLog.md @@ -0,0 +1,335 @@ +# Contract StressLog + +This contract is for reading the stress log of the process. + +## APIs of the contract + +```csharp +internal record struct StressLogData( + uint LoggedFacilities, + uint Level, + uint MaxSizePerThread, + uint MaxSizeTotal, + int TotalChunks, + ulong TickFrequency, + ulong StartTimestamp, + TargetPointer Logs); + +internal record struct ThreadStressLogData( + TargetPointer NextPointer, + ulong ThreadId, + bool WriteHasWrapped, + TargetPointer CurrentPointer, + TargetPointer ChunkListHead, + TargetPointer ChunkListTail, + TargetPointer CurrentWriteChunk); + +internal record struct StressMsgData( + uint Facility, + TargetPointer FormatString, + ulong Timestamp, + IReadOnlyList Args); +``` + +```csharp +bool HasStressLog(); +StressLogData GetStressLogData(); +StressLogData GetStressLogData(TargetPointer stressLogPointer); +IEnumerable GetThreadStressLogs(TargetPointer logs); +IEnumerable GetStressMessages(ThreadStressLogData threadLog); +bool IsPointerInStressLog(StressLogData stressLog, TargetPointer pointer); +``` + +## Versions 1 and 2 + +Data descriptors used: +| Data Descriptor Name | Field | Meaning | +| --- | --- | --- | +| StressLog | LoggedFacilities | Bitmask of facilities that are logged | +| StressLog | Level | Level of logging | +| StressLog | MaxSizePerThread | Maximum size of the log per thread | +| StressLog | MaxSizeTotal | Maximum size of the log | +| StressLog | TotalChunks | Total number of chunks across all thread-specific logs | +| StressLog | TickFrequency | Number of ticks per second for stresslog timestamps | +| StressLog | StartTimestamp | Timestamp when the stress log was started | +| StressLog | ModuleOffset | Offset of the module in the stress log | +| StressLog | Logs | Pointer to the thread-specific logs | +| StressLogModuleDesc | BaseAddress | Base address of the module | +| StressLogModuleDesc | Size | Size of the module | +| ThreadStressLog | Next | Pointer to the next thread-specific log | +| ThreadStressLog | ThreadId | ID of the thread | +| ThreadStressLog | WriteHasWrapped | Whether the write pointer is writing to previously used chunks | +| ThreadStressLog | CurrentPtr | Pointer to the most recently written message | +| ThreadStressLog | ChunkListHead | Pointer to the head of the chunk list | +| ThreadStressLog | ChunkListTail | Pointer to the tail of the chunk list | +| ThreadStressLog | CurrentWriteChunk | Pointer to the chunk currently being written to | +| StressLogChunk | Prev | Pointer to the previous chunk | +| StressLogChunk | Next | Pointer to the next chunk | +| StressLogChunk | Buf | The data stored in the chunk | +| StressLogChunk | Sig1 | First byte of the chunk signature (to ensure validity) | +| StressLogChunk | Sig2 | Second byte of the chunk signature (to ensure validity) | +| StressMsgHeader | Opaque structure | Header of a stress message. Meaning of bits is version-dependent. | +| StressMsg | Header | The message header | +| StressMsg | Args | The arguments of the message (number of arguments specified in the header) | + +Global variables used: +| Global Name | Type | Purpose | +| --- | --- | --- | +| StressLogEnabled | byte | Whether the stress log is enabled | +| StressLog | pointer | Pointer to the stress log | +| StressLogChunkSize | uint | Size of a stress log chunk | +| StressLogMaxMessageSize | ulong | Maximum size of a stress log message | +| StressLogHasModuleTable | byte | Whether the stress log module table is present | +| StressLogModuleTable | pointer | Pointer to the stress log's module table (if StressLogHasModuleTable is `1`) | + +```csharp +bool HasStressLog() +{ + return Target.ReadGlobal("StressLogEnabled") != 0; +} + +StressLogData GetStressLogData() +{ + if (!HasStressLog()) + { + return default; + } + + StressLog stressLog = new StressLog(Target, Target.ReadGlobalPointer(Constants.Globals.StressLog)); + return new StressLogData( + stressLog.LoggedFacilities, + stressLog.Level, + stressLog.MaxSizePerThread, + stressLog.MaxSizeTotal, + stressLog.TotalChunks, + stressLog.TickFrequency, + stressLog.StartTimestamp, + stressLog.Logs); +} + +StressLogData GetStressLogData(TargetPointer stressLogPointer) +{ + StressLog stressLog = new StressLog(Target, stressLogPointer); + return new StressLogData( + stressLog.LoggedFacilities, + stressLog.Level, + stressLog.MaxSizePerThread, + stressLog.MaxSizeTotal, + stressLog.TotalChunks, + stressLog.TickFrequency, + stressLog.StartTimestamp, + stressLog.Logs); +} + +IEnumerable GetThreadStressLogs(TargetPointer logs) +{ + TargetPointer currentPointer = logs; + while (currentPointer != TargetPointer.Null) + { + ThreadStressLog threadStressLog = new(Target, currentPointer); + + if (threadStressLog.ChunkListHead == TargetPointer.Null) + { + // If the chunk list head is null, this thread log isn't valid. + currentPointer = threadStressLog.Next; + continue; + } + + if (threadStressLog.CurrentWriteChunk == TargetPointer.Null) + { + // If the current write chunk is null, this thread log isn't valid. + currentPointer = threadStressLog.Next; + continue; + } + + StressLogChunk currentChunkData = new(Target, threadStressLog.CurrentWriteChunk); + if (currentChunkData.Sig1 != 0xCFCFCFCF || currentChunkData.Sig2 != 0xCFCFCFCF) + { + // If the current write chunk isn't valid, this thread log isn't valid. + currentPointer = threadStressLog.Next; + continue; + } + + yield return new ThreadStressLogData( + threadStressLog.Next, + threadStressLog.ThreadId, + threadStressLog.WriteHasWrapped, + threadStressLog.CurrentPtr, + threadStressLog.ChunkListHead, + threadStressLog.ChunkListTail, + threadStressLog.CurrentWriteChunk); + + currentPointer = threadStressLog.Next; + } +} + +// Return messages going in reverse chronological order, newest first. +IEnumerable GetStressMessages(ThreadStressLogData threadLog) +{ + // 1. Get the current message pointer from the log and the info about the current chunk the runtime is writing into. + // Record our current read pointer as the current message pointer. + + // 2. The last written log, if it wrapped around may have partially overwritten a previous record. + // Update our current message pointer to reflect the last safe beginning of a record (StressLogMaxMessageSize before our current message pointer) + // without going before the start of the current chunk's buffer. Do not update the current read pointer in this way. + + // 3. If the current read pointer is at the end of the chunk (this will never happen on the first iteration), check if current read pointer is at the end of the chunk list. + // Otherwise, skip to step 8. + + // 4. If current chunk is at the end of the chunk list and this thread never wrapped around while writing, + // DONE. + + // 5. Otherwise, get the next chunk in the list. + // The tail will wrap around to the head if the current chunk at the end of the list. Record if we have wrapped around. + + // 6. StressLog writes variable-sized payloads starting from the end of a chunk. + // Chunks are zero-initialized, so look in the first StressLogMaxMessageSize bytes, for any non-0 bytes. + // If we find any, that's the start of the first message of the chunk. + // Set the current read pointer to that location. + + // 7. If we didn't find a message before we read a whole message size, there's no message in this chunk (it was freshly allocated), + // DONE. + + // 8. If we have wrapped around while reading, we are reading in the thread's current write chunk, and our current read pointer is ahead of the current message pointer, + // DONE. + + // 9. Read the messsage at the current read pointer. + + // 10. Advance the current read pointer to the next message (advance by "stress message header size + pointer size * number of arguments"). + + // 11. Go to step 3. +} + +bool IsPointerInStressLog(StressLogData stressLog, TargetPointer pointer) +{ + // For all chunks in all thread stress logs, check if + // any pointer-aligned offset in the chunk's data has the value of 'pointer'. + // If found, return true. +} + +// This method is a helper for the various specific versions. +protected TargetPointer GetFormatPointer(ulong formatOffset) +{ + if (Target.ReadGlobal(Constants.Globals.StressLogHasModuleTable) == 0) + { + StressLog stressLog = new(Target, target.ReadGlobalPointer(Constants.Globals.StressLog)); + return new TargetPointer(stressLog.ModuleOffset + formatOffset); + } + + TargetPointer moduleTable = target.ReadGlobalPointer(Constants.Globals.StressLogModuleTable); + uint moduleEntrySize = target.GetTypeInfo(DataType.StressLogModuleDesc).Size!.Value; + uint maxModules = target.ReadGlobal(Constants.Globals.StressLogMaxModules); + for (uint i = 0; i < maxModules; ++i) + { + StressLogModuleDesc module = new(Target, moduleTable + i * moduleEntrySize); + ulong relativeOffset = formatOffset - cumulativeOffset; + if (relativeOffset < module.Size.Value) + { + return new TargetPointer((ulong)module.BaseAddress + relativeOffset); + } + cumulativeOffset += module.Size.Value; + } + + return TargetPointer.Null; +} +``` + +A StressLog message, represented by a `StressMsgData` struct, can be formatted as though the null-terminated UTF-8 string located at `FormatString` is a `printf`-style format string, with all arguments located at `Args`. Additionally, the following special format specifiers are supported: + +| Format Specifier | Argument Type | Description | +| --- | --- | --- | +| `%pT` | pointer | A `TypeHandle`, accessible through the `GetTypeHandle` API in the [RuntimeTypeSystem contract](./RuntimeTypeSystem.md), possibly with bits of the `ObjectToMethodTableUnmask` data contract global variable set. | +| `%pM` | pointer | A `MethodDescHandle`, accessible through the `GetMethodDescHandle` API in the [RuntimeTypeSystem contract](./RuntimeTypeSystem.md) | +| `%pV` | pointer | A pointer to an unmanaged symbol in the image. | +| `%pK` | pointer | A pointer to an offset from a symbol in the image, generally representing an IP in a stack trace. | + +## Version 1 + +Version 1 stress logs are included in any .NET runtime version corresponding to an SOS breaking change version of 0, 1, 2, or 3, or a memory-mapped version of `0x00010001`. +SOS breaking change versions of 0, 1, or 2 do not have a module table. SOS breaking change version 3 logs and memory mapped logs have a module table. + +These functions implement additional logic required for the shared contract implementation above. + +The message header data is stored in the following format: + +```c++ +struct +{ + uint32_t numberOfArgsLow : 3; + uint32_t formatOffset : 26; + uint32_t numberOfArgsHigh : 3; + uint32_t facility; + uint64_t timeStamp; +}; +``` + +The format offset refers to the offset from the module offset on the stress log. + +```csharp +StressMsgData GetStressMsgData(StressMsg msg) +{ + uint pointerSize = Target.GetTypeInfo(DataType.pointer).Size!.Value; + uint payload = Target.Read(msg.Header); + int numArgs = (int)((payload & 0x7) | ((payload >> 29) & 0x7)); + var args = new TargetPointer[numArgs]; + for (int i = 0; i < numArgs; i++) + { + args[i] = Target.ReadPointer((ulong)msg.Args + (ulong)(i * pointerSize)); + } + + return new StressMsgData( + Facility: Target.Read((ulong)msg.Header + 4), + FormatString: GetFormatPointer(((payload >> 3) & ((1 << 26) - 1))), + Timestamp: Target.Read((ulong)msg.Header + 8), + Args: args); +} +``` + +## Version 2 + +Version 2 stress logs are included in any .NET runtime version corresponding to an SOS breaking change version of 4 or a memory-mapped version of `0x00010002`. +SOS breaking change version 4 stress logs and memory mapped stress logs will have a module table. + +These functions implement additional logic required for the shared contract implementation above. + +The message header data is stored in the following format: + +```c++ +struct +{ + static const size_t formatOffsetLowBits = 26; + static const size_t formatOffsetHighBits = 13; + + uint64_t facility: 32; + uint64_t numberOfArgs : 6; + uint64_t formatOffsetLow: formatOffsetLowBits; + uint64_t formatOffsetHigh: formatOffsetHighBits; + uint64_t timeStamp: 51; +}; +``` + +The format offset refers to the cummulative offset into a module referred to in the module table. + +```csharp +StressMsgData GetStressMsgData(StressMsg msg) +{ + StressLog stressLog = new(Target, target.ReadGlobalPointer(Constants.Globals.StressLog)); + uint pointerSize = Target.GetTypeInfo(DataType.pointer).Size!.Value; + + ulong payload1 = target.Read(msg.Header); + ulong payload2 = target.Read((ulong)msg.Header + 8); + int numArgs = (int)((payload1 >> 32) & ((1 << 6) - 1)); + var args = new TargetPointer[numArgs]; + for (int i = 0; i < numArgs; i++) + { + args[i] = target.ReadPointer((ulong)msg.Args + (ulong)(i * pointerSize)); + } + ulong formatOffset = ((payload1 >> 38) & ((1 << 26) - 1)) | ((payload2 & ((1ul << 13) - 1)) << 26); + + return new StressMsgData( + Facility: (uint)payload1, + FormatString: GetFormatPointer(formatOffset), + Timestamp: payload2 >> 13, + Args: args); +} +``` diff --git a/eng/Subsets.props b/eng/Subsets.props index 1bc750f58a0f7c..c43840784acef3 100644 --- a/eng/Subsets.props +++ b/eng/Subsets.props @@ -423,7 +423,8 @@ $(CoreClrProjectRoot)tools\aot\ILCompiler\repro\repro.csproj; $(CoreClrProjectRoot)tools\r2rtest\R2RTest.csproj; $(CoreClrProjectRoot)tools\PdbChecker\PdbChecker.csproj; - $(CoreClrProjectRoot)tools\AssemblyChecker\AssemblyChecker.csproj" Category="clr" Condition="'$(DotNetBuildSourceOnly)' != 'true'"/> + $(CoreClrProjectRoot)tools\AssemblyChecker\AssemblyChecker.csproj; + $(ToolsProjectRoot)StressLogAnalyzer\src\StressLogAnalyzer.csproj" Category="clr" Condition="'$(DotNetBuildSourceOnly)' != 'true'"/> diff --git a/src/coreclr/debug/runtimeinfo/contracts.jsonc b/src/coreclr/debug/runtimeinfo/contracts.jsonc index ae8cb684ab2c72..f732119e507cad 100644 --- a/src/coreclr/debug/runtimeinfo/contracts.jsonc +++ b/src/coreclr/debug/runtimeinfo/contracts.jsonc @@ -20,5 +20,6 @@ "PrecodeStubs": 1, "ReJIT": 1, "RuntimeTypeSystem": 1, - "Thread": 1 + "Thread": 1, + "StressLog": 2 } diff --git a/src/coreclr/debug/runtimeinfo/datadescriptor.h b/src/coreclr/debug/runtimeinfo/datadescriptor.h index e58d91bd6cab3a..eaba5d699ba15a 100644 --- a/src/coreclr/debug/runtimeinfo/datadescriptor.h +++ b/src/coreclr/debug/runtimeinfo/datadescriptor.h @@ -323,6 +323,58 @@ CDAC_TYPE_FIELD(DynamicMetadata, /*uint32*/, Size, cdac_data::S CDAC_TYPE_FIELD(DynamicMetadata, /*inline byte array*/, Data, cdac_data::Data) CDAC_TYPE_END(DynamicMetadata) +#ifdef STRESS_LOG +CDAC_TYPE_BEGIN(StressLog) +CDAC_TYPE_SIZE(sizeof(StressLog)) +CDAC_TYPE_FIELD(StressLog, /* uint32 */, LoggedFacilities, cdac_offsets::facilitiesToLog) +CDAC_TYPE_FIELD(StressLog, /* uint32 */, Level, cdac_offsets::levelToLog) +CDAC_TYPE_FIELD(StressLog, /* uint32 */, MaxSizePerThread, cdac_offsets::MaxSizePerThread) +CDAC_TYPE_FIELD(StressLog, /* uint32 */, MaxSizeTotal, cdac_offsets::MaxSizeTotal) +CDAC_TYPE_FIELD(StressLog, /* uint32 */, TotalChunks, cdac_offsets::totalChunk) +CDAC_TYPE_FIELD(StressLog, /* pointer */, Logs, cdac_offsets::logs) +CDAC_TYPE_FIELD(StressLog, /* uint64 */, TickFrequency, cdac_offsets::tickFrequency) +CDAC_TYPE_FIELD(StressLog, /* uint64 */, StartTimestamp, cdac_offsets::startTimeStamp) +CDAC_TYPE_FIELD(StressLog, /* nuint */, ModuleOffset, cdac_offsets::moduleOffset) +CDAC_TYPE_END(StressLog) + +CDAC_TYPE_BEGIN(StressLogModuleDesc) +CDAC_TYPE_SIZE(cdac_offsets::ModuleDesc::type_size) +CDAC_TYPE_FIELD(StressLogModuleDesc, pointer, BaseAddress, cdac_offsets::ModuleDesc::baseAddress) +CDAC_TYPE_FIELD(StressLogModuleDesc, nuint, Size, cdac_offsets::ModuleDesc::size) +CDAC_TYPE_END(StressLogModuleDesc) + +CDAC_TYPE_BEGIN(ThreadStressLog) +CDAC_TYPE_INDETERMINATE(ThreadStressLog) +CDAC_TYPE_FIELD(ThreadStressLog, /* pointer */, Next, cdac_offsets::next) +CDAC_TYPE_FIELD(ThreadStressLog, uint64, ThreadId, cdac_offsets::threadId) +CDAC_TYPE_FIELD(ThreadStressLog, uint8, WriteHasWrapped, cdac_offsets::writeHasWrapped) +CDAC_TYPE_FIELD(ThreadStressLog, pointer, CurrentPtr, cdac_offsets::curPtr) +CDAC_TYPE_FIELD(ThreadStressLog, /* pointer */, ChunkListHead, cdac_offsets::chunkListHead) +CDAC_TYPE_FIELD(ThreadStressLog, /* pointer */, ChunkListTail, cdac_offsets::chunkListTail) +CDAC_TYPE_FIELD(ThreadStressLog, /* pointer */, CurrentWriteChunk, cdac_offsets::curWriteChunk) +CDAC_TYPE_END(ThreadStressLog) + +CDAC_TYPE_BEGIN(StressLogChunk) +CDAC_TYPE_SIZE(sizeof(StressLogChunk)) +CDAC_TYPE_FIELD(StressLogChunk, /* pointer */, Prev, offsetof(StressLogChunk, prev)) +CDAC_TYPE_FIELD(StressLogChunk, /* pointer */, Next, offsetof(StressLogChunk, next)) +CDAC_TYPE_FIELD(StressLogChunk, /* uint8[STRESSLOG_CHUNK_SIZE] */, Buf, offsetof(StressLogChunk, buf)) +CDAC_TYPE_FIELD(StressLogChunk, /* uint32 */, Sig1, offsetof(StressLogChunk, dwSig1)) +CDAC_TYPE_FIELD(StressLogChunk, /* uint32 */, Sig2, offsetof(StressLogChunk, dwSig2)) +CDAC_TYPE_END(StressLogChunk) + +// The StressMsg Header is the fixed size portion of the StressMsg +CDAC_TYPE_BEGIN(StressMsgHeader) +CDAC_TYPE_SIZE(sizeof(StressMsg)) +CDAC_TYPE_END(StressMsgHeader) + +CDAC_TYPE_BEGIN(StressMsg) +CDAC_TYPE_INDETERMINATE(StressMsg) +CDAC_TYPE_FIELD(StressMsg, StressMsgHeader, Header, 0) +CDAC_TYPE_FIELD(StressMsg, /* pointer */, Args, offsetof(StressMsg, args)) +CDAC_TYPE_END(StressMsg) +#endif + CDAC_TYPE_BEGIN(MethodDesc) CDAC_TYPE_SIZE(sizeof(MethodDesc)) CDAC_TYPE_FIELD(MethodDesc, /*uint8*/, ChunkIndex, cdac_data::ChunkIndex) @@ -611,6 +663,18 @@ CDAC_GLOBAL_POINTER(StringMethodTable, &::g_pStringClass) CDAC_GLOBAL_POINTER(SyncTableEntries, &::g_pSyncTable) CDAC_GLOBAL_POINTER(MiniMetaDataBuffAddress, &::g_MiniMetaDataBuffAddress) CDAC_GLOBAL_POINTER(MiniMetaDataBuffMaxSize, &::g_MiniMetaDataBuffMaxSize) +#ifdef STRESS_LOG +CDAC_GLOBAL(StressLogEnabled, uint8, 1) +CDAC_GLOBAL_POINTER(StressLog, &g_pStressLog) +CDAC_GLOBAL(StressLogHasModuleTable, uint8, 1) +CDAC_GLOBAL_POINTER(StressLogModuleTable, &g_pStressLog->modules) +CDAC_GLOBAL(StressLogMaxModules, uint64, cdac_offsets::MAX_MODULES) +CDAC_GLOBAL(StressLogChunkSize, uint32, STRESSLOG_CHUNK_SIZE) +CDAC_GLOBAL(StressLogValidChunkSig, uint32, StressLogChunk::ValidChunkSig) +CDAC_GLOBAL(StressLogMaxMessageSize, uint64, (uint64_t)StressMsg::maxMsgSize) +#else +CDAC_GLOBAL(StressLogEnabled, uint8, 0) +#endif CDAC_GLOBAL_POINTER(ExecutionManagerCodeRangeMapAddress, cdac_data::CodeRangeMapAddress) CDAC_GLOBAL_POINTER(PlatformMetadata, &::g_cdacPlatformMetadata) CDAC_GLOBAL_POINTER(ProfilerControlBlock, &::g_profControlBlock) diff --git a/src/coreclr/inc/stresslog.h b/src/coreclr/inc/stresslog.h index 58fbfdba97e2aa..a1f814e272b1cf 100644 --- a/src/coreclr/inc/stresslog.h +++ b/src/coreclr/inc/stresslog.h @@ -17,7 +17,7 @@ extension (eg. strike). There is no memory allocation system calls etc to purtub things */ // ****************************************************************************** -// WARNING!!!: These classes are used by the runtime and SOS in the diagnostics +// WARNING!!!: These classes are used by the runtime and SOS in the diagnostics // repo. Values should added or removed in a backwards and forwards compatible way. // See: https://github.com/dotnet/diagnostics/blob/main/src/shared/inc/stresslog.h // https://github.com/dotnet/runtime/blob/main/src/coreclr/inc/stresslog.h @@ -32,7 +32,6 @@ #include "log.h" #if defined(STRESS_LOG) && !defined(FEATURE_NO_STRESSLOG) -#ifndef STRESS_LOG_ANALYZER #include "holder.h" #include "staticcontract.h" #include "mscoree.h" @@ -46,9 +45,6 @@ #ifndef _ASSERTE #define _ASSERTE(expr) #endif -#else -#include // offsetof -#endif // STRESS_LOG_ANALYZER /* The STRESS_LOG* macros work like printf. In fact the use printf in their implementation so all printf format specifications work. In addition the Stress log dumper knows @@ -172,6 +168,9 @@ void ReplacePid(LPCWSTR original, LPWSTR replaced, size_t replacedLength); +template +struct cdac_offsets; + class ThreadStressLog; struct StressLogMsg; @@ -180,12 +179,12 @@ struct StressLogMsg; /* a log is a circular queue of messages */ class StressLog { + template friend struct ::cdac_offsets; public: static void Initialize(unsigned facilities, unsigned level, unsigned maxBytesPerThread, unsigned maxBytesTotal, void* moduleBase, LPWSTR logFilename = nullptr); static void Terminate(BOOL fProcessDetach=FALSE); static void ThreadDetach(); // call at DllMain THREAD_DETACH if you want to recycle thread logs -#ifndef STRESS_LOG_ANALYZER static int NewChunk () { return InterlockedIncrement (&theLog.totalChunk); @@ -194,7 +193,6 @@ class StressLog { { return InterlockedDecrement (&theLog.totalChunk); } -#endif //STRESS_LOG_ANALYZER //the result is not 100% accurate. If multiple threads call this function at the same time, //we could allow the total size be bigger than required. But the memory won't grow forever @@ -246,28 +244,6 @@ class StressLog { #endif #endif -#ifdef STRESS_LOG_ANALYZER - static size_t writing_base_address; - static size_t reading_base_address; - - template - static T* TranslateMemoryMappedPointer(T* input) - { - if (input == nullptr) - { - return nullptr; - } - - return ((T*)(((uint8_t*)input) - writing_base_address + reading_base_address)); - } -#else - template - static T* TranslateMemoryMappedPointer(T* input) - { - return input; - } -#endif - #ifdef MEMORY_MAPPED_STRESSLOG // @@ -399,9 +375,7 @@ inline void* StressLog::ConvertArgument(int64_t arg) } #endif -#ifndef STRESS_LOG_ANALYZER typedef Holder> StressLogLockHolder; -#endif //!STRESS_LOG_ANALYZER #if defined(DACCESS_COMPILE) inline BOOL StressLog::LogOn(unsigned facility, unsigned level) @@ -414,6 +388,29 @@ inline BOOL StressLog::LogOn(unsigned facility, unsigned level) } #endif +template<> +struct cdac_offsets +{ + static const size_t facilitiesToLog = offsetof(StressLog, facilitiesToLog); + static const size_t levelToLog = offsetof(StressLog, levelToLog); + static const size_t MaxSizePerThread = offsetof(StressLog, MaxSizePerThread); + static const size_t MaxSizeTotal = offsetof(StressLog, MaxSizeTotal); + static const size_t totalChunk = offsetof(StressLog, totalChunk); + static const size_t logs = offsetof(StressLog, logs); + static const size_t tickFrequency = offsetof(StressLog, tickFrequency); + static const size_t startTimeStamp = offsetof(StressLog, startTimeStamp); + static const size_t startTime = offsetof(StressLog, startTime); + static const size_t moduleOffset = offsetof(StressLog, moduleOffset); + static constexpr uint64_t MAX_MODULES = StressLog::MAX_MODULES; + + struct ModuleDesc + { + static constexpr size_t type_size = sizeof(StressLog::ModuleDesc); + static const size_t baseAddress = offsetof(StressLog::ModuleDesc, baseAddress); + static const size_t size = offsetof(StressLog::ModuleDesc, size); + }; +}; + /*************************************************************************************/ /* private classes */ @@ -481,10 +478,9 @@ struct StressMsg timeStamp = time; } - static const size_t maxArgCnt = 63; + static constexpr size_t maxArgCnt = 63; static const int64_t maxOffset = (int64_t)1 << (formatOffsetLowBits + formatOffsetHighBits); - static size_t maxMsgSize () - { return sizeof(StressMsg) + maxArgCnt*sizeof(void*); } + static constexpr size_t maxMsgSize = sizeof(uint64_t) * 2 + maxArgCnt * sizeof(void*); }; static_assert(sizeof(StressMsg) == sizeof(uint64_t) * 2, "StressMsg bitfields aren't aligned correctly"); @@ -550,7 +546,7 @@ struct StressLogChunk #endif //!STRESS_LOG_READONLY StressLogChunk (StressLogChunk * p = NULL, StressLogChunk * n = NULL) - :prev (p), next (n), dwSig1 (0xCFCFCFCF), dwSig2 (0xCFCFCFCF) + :prev (p), next (n), dwSig1 (ValidChunkSig), dwSig2 (ValidChunkSig) {} char * StartPtr () @@ -565,8 +561,10 @@ struct StressLogChunk BOOL IsValid () const { - return dwSig1 == 0xCFCFCFCF && dwSig2 == 0xCFCFCFCF; + return dwSig1 == ValidChunkSig && dwSig2 == ValidChunkSig; } + + static constexpr uint32_t ValidChunkSig = 0xCFCFCFCF; }; // This class implements a circular stack of variable sized elements @@ -582,9 +580,7 @@ struct StressLogChunk // readPtr / curPtr fields. thecaller is responsible for reading/writing // to the corresponding field class ThreadStressLog { -#ifdef STRESS_LOG_ANALYZER -public: -#endif + template friend struct ::cdac_offsets; ThreadStressLog* next; // we keep a linked list of these uint64_t threadId; // the id for the thread using this buffer uint8_t isDead; // Is this thread dead @@ -613,7 +609,7 @@ class ThreadStressLog { #endif //STRESS_LOG_READONLY friend class StressLog; -#if !defined(STRESS_LOG_READONLY) && !defined(STRESS_LOG_ANALYZER) +#if !defined(STRESS_LOG_READONLY) FORCEINLINE BOOL GrowChunkList () { _ASSERTE (chunkListLength >= 1); @@ -634,10 +630,10 @@ class ThreadStressLog { return TRUE; } -#endif //!STRESS_LOG_READONLY && !STRESS_LOG_ANALYZER +#endif //!STRESS_LOG_READONLY public: -#if !defined(STRESS_LOG_READONLY) && !defined(STRESS_LOG_ANALYZER) +#if !defined(STRESS_LOG_READONLY) ThreadStressLog () { chunkListHead = chunkListTail = curWriteChunk = NULL; @@ -665,9 +661,9 @@ class ThreadStressLog { chunkListLength = 1; } -#endif //!STRESS_LOG_READONLY && !STRESS_LOG_ANALYZER +#endif //!STRESS_LOG_READONLY -#if defined(MEMORY_MAPPED_STRESSLOG) && !defined(STRESS_LOG_ANALYZER) +#if defined(MEMORY_MAPPED_STRESSLOG) void* __cdecl operator new(size_t n, const std::nothrow_t&) noexcept; void __cdecl operator delete (void * chunk); #endif @@ -679,9 +675,9 @@ class ThreadStressLog { { return; } -#if !defined(STRESS_LOG_READONLY) && !defined(STRESS_LOG_ANALYZER) +#if !defined(STRESS_LOG_READONLY) _ASSERTE (chunkListLength >= 1 && chunkListLength <= StressLog::theLog.totalChunk); -#endif //!STRESS_LOG_READONLY && !STRESS_LOG_ANALYZER +#endif //!STRESS_LOG_READONLY StressLogChunk * chunk = chunkListHead; do @@ -689,9 +685,9 @@ class ThreadStressLog { StressLogChunk * tmp = chunk; chunk = chunk->next; delete tmp; -#if !defined(STRESS_LOG_READONLY) && !defined(STRESS_LOG_ANALYZER) +#if !defined(STRESS_LOG_READONLY) StressLog::ChunkDeleted (); -#endif //!STRESS_LOG_READONLY && !STRESS_LOG_ANALYZER +#endif //!STRESS_LOG_READONLY } while (chunk != chunkListHead); } @@ -712,7 +708,7 @@ class ThreadStressLog { // a previous record. Update curPtr to reflect the last safe beginning of a record, // but curPtr shouldn't wrap around, otherwise it'll break our assumptions about stress // log - curPtr = (StressMsg*)((char*)curPtr - StressMsg::maxMsgSize()); + curPtr = (StressMsg*)((char*)curPtr - StressMsg::maxMsgSize); if (curPtr < (StressMsg*)curWriteChunk->StartPtr()) { curPtr = (StressMsg *)curWriteChunk->StartPtr(); @@ -727,7 +723,7 @@ class ThreadStressLog { BOOL IsValid () const { - return chunkListHead != NULL && (!curWriteChunk || StressLog::TranslateMemoryMappedPointer(curWriteChunk)->IsValid ()); + return chunkListHead != NULL && (!curWriteChunk || curWriteChunk->IsValid ()); } #ifdef STRESS_LOG_READONLY @@ -759,6 +755,18 @@ class ThreadStressLog { #endif //STRESS_LOG_READONLY }; +template<> +struct cdac_offsets +{ + static const size_t next = offsetof(ThreadStressLog, next); + static const size_t threadId = offsetof(ThreadStressLog, threadId); + static const size_t writeHasWrapped = offsetof(ThreadStressLog, writeHasWrapped); + static const size_t curPtr = offsetof(ThreadStressLog, curPtr); + static const size_t chunkListHead = offsetof(ThreadStressLog, chunkListHead); + static const size_t chunkListTail = offsetof(ThreadStressLog, chunkListTail); + static const size_t curWriteChunk = offsetof(ThreadStressLog, curWriteChunk); +}; + #ifdef STRESS_LOG_READONLY /*********************************************************************************/ // Called when dumping the log (by StressLog::Dump()) @@ -794,7 +802,7 @@ inline StressMsg* ThreadStressLog::AdvReadPastBoundary() { } curReadChunk = curReadChunk->next; void** p = (void**)curReadChunk->StartPtr(); - while (*p == NULL && (size_t)(p-(void**)curReadChunk->StartPtr()) < (StressMsg::maxMsgSize() / sizeof(void*))) + while (*p == NULL && (size_t)(p-(void**)curReadChunk->StartPtr()) < (StressMsg::maxMsgSize / sizeof(void*))) { ++p; } @@ -839,7 +847,7 @@ inline StressMsg* ThreadStressLog::AdvanceWrite(int cArgs) { // In addition it writes NULLs b/w the startPtr and curPtr inline StressMsg* ThreadStressLog::AdvWritePastBoundary(int cArgs) { STATIC_CONTRACT_WRAPPER; -#if !defined(STRESS_LOG_READONLY) && !defined(STRESS_LOG_ANALYZER) +#if !defined(STRESS_LOG_READONLY) //zeroed out remaining buffer memset (curWriteChunk->StartPtr (), 0, (BYTE *)curPtr - (BYTE *)curWriteChunk->StartPtr ()); @@ -848,7 +856,7 @@ inline StressMsg* ThreadStressLog::AdvWritePastBoundary(int cArgs) { { GrowChunkList (); } -#endif //!STRESS_LOG_READONLY && !STRESS_LOG_ANALYZER +#endif //!STRESS_LOG_READONLY curWriteChunk = curWriteChunk->prev; #ifndef STRESS_LOG_READONLY diff --git a/src/coreclr/nativeaot/Runtime/inc/stressLog.h b/src/coreclr/nativeaot/Runtime/inc/stressLog.h index fc031897f492d4..76cf347416f631 100644 --- a/src/coreclr/nativeaot/Runtime/inc/stressLog.h +++ b/src/coreclr/nativeaot/Runtime/inc/stressLog.h @@ -443,8 +443,7 @@ struct StressMsg static const size_t maxArgCnt = 63; static const int64_t maxOffset = (int64_t)1 << (formatOffsetLowBits + formatOffsetHighBits); - static size_t maxMsgSize () - { return sizeof(StressMsg) + maxArgCnt*sizeof(void*); } + static constexpr size_t maxMsgSize = sizeof(uint64_t) * 2 + maxArgCnt * sizeof(void*); friend void PopulateDebugHeaders(); }; @@ -623,7 +622,7 @@ inline StressMsg* ThreadStressLog::AdvReadPastBoundary() { } curReadChunk = curReadChunk->next; void** p = (void**)curReadChunk->StartPtr(); - while (*p == NULL && (size_t)(p-(void**)curReadChunk->StartPtr ()) < (StressMsg::maxMsgSize()/sizeof(void*))) + while (*p == NULL && (size_t)(p-(void**)curReadChunk->StartPtr ()) < (StressMsg::maxMsgSize/sizeof(void*))) { ++p; } diff --git a/src/coreclr/nativeaot/Runtime/stressLog.cpp b/src/coreclr/nativeaot/Runtime/stressLog.cpp index 5b165a24332c85..97c0a2615f9501 100644 --- a/src/coreclr/nativeaot/Runtime/stressLog.cpp +++ b/src/coreclr/nativeaot/Runtime/stressLog.cpp @@ -472,7 +472,7 @@ inline void ThreadStressLog::Activate (Thread * /*pThread*/) // a previous record. Update curPtr to reflect the last safe beginning of a record, // but curPtr shouldn't wrap around, otherwise it'll break our assumptions about stress // log - curPtr = (StressMsg*)((char*)curPtr - StressMsg::maxMsgSize()); + curPtr = (StressMsg*)((char*)curPtr - StressMsg::maxMsgSize); if (curPtr < (StressMsg*)curWriteChunk->StartPtr()) { curPtr = (StressMsg *)curWriteChunk->StartPtr(); diff --git a/src/coreclr/tools/CMakeLists.txt b/src/coreclr/tools/CMakeLists.txt index 48e1466b197a8b..4e7f4368681d1d 100644 --- a/src/coreclr/tools/CMakeLists.txt +++ b/src/coreclr/tools/CMakeLists.txt @@ -1,6 +1,2 @@ add_subdirectory(SOS) add_subdirectory(superpmi) - -if (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_ARM64) - add_subdirectory(StressLogAnalyzer) -endif() diff --git a/src/coreclr/tools/StressLogAnalyzer/CMakeLists.txt b/src/coreclr/tools/StressLogAnalyzer/CMakeLists.txt deleted file mode 100644 index 3ef795455d7077..00000000000000 --- a/src/coreclr/tools/StressLogAnalyzer/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -add_executable_clr(StressLogAnalyzer StressLogAnalyzer.cpp StressLogDump.cpp StressLogPlugin.cpp) - -if(CLR_CMAKE_TARGET_WIN32) - target_link_libraries(StressLogAnalyzer - PRIVATE - ${STATIC_MT_CRT_LIB} - ${STATIC_MT_VCRT_LIB} - ) -else() - target_link_libraries(StressLogAnalyzer - PRIVATE - coreclrpal - ) -endif(CLR_CMAKE_TARGET_WIN32) - -install_clr(TARGETS StressLogAnalyzer DESTINATIONS . COMPONENT runtime) diff --git a/src/coreclr/tools/StressLogAnalyzer/StressLogAnalyzer.cpp b/src/coreclr/tools/StressLogAnalyzer/StressLogAnalyzer.cpp deleted file mode 100644 index 8b5523299762e9..00000000000000 --- a/src/coreclr/tools/StressLogAnalyzer/StressLogAnalyzer.cpp +++ /dev/null @@ -1,202 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -#include -#include -#include -#include - -#include "assert.h" - -#include - -#define MEMORY_MAPPED_STRESSLOG - -#ifdef HOST_WINDOWS -#define MEMORY_MAPPED_STRESSLOG_BASE_ADDRESS (void*)0x400000000000 -#else -#define MEMORY_MAPPED_STRESSLOG_BASE_ADDRESS nullptr -#endif - -// This macro is used to standardize the wide character string literals between UNIX and Windows. -// Unix L"" is UTF32, and on windows it's UTF16. Because of built-in assumptions on the size -// of string literals, it's important to match behaviour between Unix and Windows. Unix will be defined -// as u"" (char16_t) -#ifdef TARGET_UNIX -#define W(str) u##str -#else // TARGET_UNIX -#define W(str) L##str -#endif // TARGET_UNIX - -int ParseCommandLine(char* s, char** argv, int maxArgc) -{ - int argc = 0; - bool prevWasSpace = true; - bool insideString = false; - while (*s) - { - if (!insideString) - { - if (isspace(*s)) - { - *s = '\0'; - prevWasSpace = true; - } - else if (prevWasSpace) - { - // argument begins here - if (argc < maxArgc - 1) - { - argv[argc++] = s; - } - prevWasSpace = false; - } - } - if (*s == '"') - { - insideString = !insideString; - } - else if (*s == '\\' && s[1] != '\0') - { - s++; - } - s++; - } - if (argc > 0) - { - argv[argc] = nullptr; - } - return argc; -} - -int ProcessStressLog(void* baseAddress, int argc, char* argv[]); - -int main(int argc, char *argv[]) -{ -#ifdef HOST_UNIX - int exitCode = PAL_Initialize(argc, argv); - if (exitCode != 0) - { - fprintf(stderr, "PAL initialization FAILED %d\n", exitCode); - return exitCode; - } -#endif - - if (argc < 2 || strcmp(argv[1], "-?") == 0) - { - printf("Usage: StressLog \n"); - printf(" StressLog -? for list of options\n"); - return 1; - } - WCHAR filename[MAX_PATH]; - if (MultiByteToWideChar(CP_ACP, 0, argv[1], -1, filename, MAX_PATH) == 0) - return 1; - - HANDLE file = CreateFile(filename, GENERIC_READ, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - if (file == INVALID_HANDLE_VALUE) - { - printf("file not found\n"); - return 1; - } - LARGE_INTEGER lsize; - if (!GetFileSizeEx(file, &lsize)) - { - printf("could not get file size\n"); - return 1; - } - size_t size = lsize.QuadPart; -#define USE_FILE_MAPPING -#ifdef USE_FILE_MAPPING - HANDLE map = CreateFileMapping(file, NULL, PAGE_READONLY, (DWORD)(size >> 32), (DWORD)size, NULL); - if (map == nullptr) - { - printf("could not create file mapping\n"); - return 1; - } - void* baseAddress = MapViewOfFileEx(map, FILE_MAP_READ, 0, 0, size, MEMORY_MAPPED_STRESSLOG_BASE_ADDRESS); - if (baseAddress == nullptr) - { - printf("could not map view of file\n"); - return 1; - } -#else - void* baseAddress = VirtualAlloc((void*)0x400000000000, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); - size_t remainingSize = size; - const size_t maxReadSize = 0x80000000; - char* readPtr = (char*)baseAddress; - while (remainingSize >= maxReadSize) - { - DWORD sizeRead = 0; - BOOL success = ReadFile(file, readPtr, maxReadSize, &sizeRead, NULL); - if (!success || sizeRead != maxReadSize) - { - printf("oops, reading the file didn't work\n"); - return 1; - } - remainingSize -= maxReadSize; - readPtr += maxReadSize; - } - if (remainingSize > 0) - { - DWORD sizeRead = 0; - BOOL success = ReadFile(file, readPtr, remainingSize, &sizeRead, NULL); - if (!success || sizeRead != remainingSize) - { - printf("oops, reading the file didn't work\n"); - return 1; - } - } -#endif - argc -= 2; - argv += 2; - char* largv[128]; - memset(largv, 0, sizeof(largv)); - while (true) - { - int error = ProcessStressLog(baseAddress, argc, argv); - - if (error != 0) - { - printf("error %d occurred\n", error); - } - - bool runAgain = false; - char s[1024]; - while (true) - { - printf("'q' to quit, 'r' to run again\n>"); - if (fgets(s, 1023, stdin) == nullptr) - continue; - switch (s[0]) - { - case 'r': - case 'R': - runAgain = true; - break; - - case 'q': - case 'Q': - break; - - default: - continue; - } - break; - } - if (runAgain) - { - int largc = ParseCommandLine(&s[1], largv, ARRAY_SIZE(largv)); - if (largc > 0) - { - argc = largc; - argv = largv; - } - } - else - { - break; - } - } - - return 0; -} diff --git a/src/coreclr/tools/StressLogAnalyzer/StressLogDump.cpp b/src/coreclr/tools/StressLogAnalyzer/StressLogDump.cpp deleted file mode 100644 index 379f6e3ccaf01a..00000000000000 --- a/src/coreclr/tools/StressLogAnalyzer/StressLogDump.cpp +++ /dev/null @@ -1,564 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -#include "strike.h" -#include "util.h" -#include -#include -#include -#include - -#ifndef STRESS_LOG -#define STRESS_LOG - -class MapViewHolder -{ - void* whatever; -}; - -#ifndef HOST_WINDOWS -#define FEATURE_PAL -#endif -#endif // STRESS_LOG -#define STRESS_LOG_READONLY -#include "../../../inc/stresslog.h" -#include "StressMsgReader.h" - -#ifdef HOST_WINDOWS -#include -#endif - - -void GcHistClear(); -void GcHistAddLog(LPCSTR msg, StressMsgReader stressMsg); - - -/*********************************************************************************/ -static const char* getTime(const FILETIME* time, _Out_writes_ (buffLen) char* buff, int buffLen) -{ - SYSTEMTIME systemTime; - static const char badTime[] = "BAD TIME"; - - if (!FileTimeToSystemTime(time, &systemTime)) - return badTime; - - int length = _snprintf_s(buff, buffLen, _TRUNCATE, "%02d:%02d:%02d", systemTime.wHour, systemTime.wMinute, systemTime.wSecond); - if (length <= 0) - return badTime; - - return buff; -} - -/*********************************************************************************/ -static inline int64_t& toInt64(FILETIME& t) -{ - return *((int64_t *) &t); -} - -/*********************************************************************************/ -ThreadStressLog* ThreadStressLog::FindLatestThreadLog() const -{ - const ThreadStressLog* latestLog = 0; - for (const ThreadStressLog* ptr = this; ptr != NULL; ptr = ptr->next) - { - if (ptr->readPtr != NULL) - if (latestLog == 0 || StressMsgReader(ptr->readPtr).GetTimeStamp() > StressMsgReader(latestLog->readPtr).GetTimeStamp()) - latestLog = ptr; - } - return const_cast(latestLog); -} - -const char *getFacilityName(DWORD_PTR lf) -{ - struct FacilityName_t { size_t lf; const char* lfName; }; - #define DEFINE_LOG_FACILITY(logname, value) {logname, #logname}, - static FacilityName_t facilities[] = - { - #include "../../../inc/loglf.h" - { LF_ALWAYS, "LF_ALWAYS" } - }; - static char buff[1024] = "`"; - if ( lf == LF_ALL ) - { - return "`ALL`"; - } - else if ((((DWORD)lf) & (LF_ALWAYS | 0xfffe | LF_GC)) == (LF_ALWAYS | LF_GC)) - { - sprintf_s(buff, ARRAY_SIZE(buff), "`GC l=%d`", (int)((lf >> 16) & 0x7fff)); - return buff; - } - else - { - buff[1] = '\0'; - for ( int i = 0; i < 32; ++i ) - { - if ( lf & 0x1 ) - { - strcat_s ( buff, ARRAY_SIZE(buff), &(facilities[i].lfName[3]) ); - strcat_s ( buff, ARRAY_SIZE(buff), "`" ); - } - lf >>= 1; - } - return buff; - } -} - -/***********************************************************************************/ -/* recognize special pretty printing instructions in the format string */ -/* Note that this function might have side effect such that args array value might */ -/* be altered if format string contains %s */ -// TODO: This function assumes the pointer size of the target equals the pointer size of the host -// TODO: replace uses of void* with appropriate TADDR or CLRDATA_ADDRESS -void formatOutput(struct IDebugDataSpaces* memCallBack, ___in FILE* file, __inout __inout_z char* format, uint64_t threadId, double timeStamp, DWORD_PTR facility, ___in void** args, bool fPrintFormatString) -{ - if (threadId & 0x8000000000000000) - fprintf(file, "GC%2d %13.9f : ", (unsigned)threadId, timeStamp); - else if (threadId & 0x4000000000000000) - fprintf(file, "BG%2d %13.9f : ", (unsigned)threadId, timeStamp); - else - fprintf(file, "%4x %13.9f : ", (int)threadId, timeStamp); - fprintf(file, "%-20s ", getFacilityName ( facility )); - - if (fPrintFormatString) - { - fprintf(file, "***|\"%s\"|*** ", format); - } - CQuickBytes fullname; - void** argsPtr = args; - static char formatCopy[256]; - - int iArgCount = 0; - - strcpy_s(formatCopy, ARRAY_SIZE(formatCopy), format); - char* ptr = formatCopy; - format = formatCopy; - for(;;) - { - char c = *ptr++; - if (c == 0) - break; - if (c == '{') // Reverse the '{' 's because the log is displayed backwards - ptr[-1] = '}'; - else if (c == '}') - ptr[-1] = '{'; - else if (c == '%') - { - argsPtr++; // This format will consume one of the args - if (*ptr == '%') - { - ptr++; // skip the whole %% - --argsPtr; // except for a %% - } - else if (*ptr == 'p') - { // It is a %p - ptr++; - if (isalpha(*ptr)) - { // It is a special %p formatter - // Print the string up to that point - c = *ptr; - *ptr = 0; // Terminate the string temporarily - fprintf(file, format, args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8], args[9], args[10]); - *ptr = c; // Put it back - - // move the argument pointers past the part the was printed - format = ptr + 1; - args = argsPtr; - iArgCount = -1; - DWORD_PTR arg = DWORD_PTR(argsPtr[-1]); - - switch (c) - { - case 'M': // format as a method Desc - if (g_bDacBroken) - { - fprintf(file," (MethodDesc: %p)", (void*)arg); - } - else - { - if (!IsMethodDesc(arg)) - { - if (arg != 0) - fprintf(file, " (BAD Method)"); - } - else - { - DacpMethodDescData MethodDescData; - MethodDescData.Request(g_sos,(CLRDATA_ADDRESS)arg); - - static WCHAR wszNameBuffer[1024]; // should be large enough - static char szNameBuffer[(ARRAY_SIZE(wszNameBuffer) * 3) + 1]; - if (g_sos->GetMethodDescName(arg, ARRAY_SIZE(wszNameBuffer), wszNameBuffer, NULL) == S_OK) - { - WideCharToMultiByte(CP_UTF8, 0, wszNameBuffer, -1, szNameBuffer, ARRAY_SIZE(szNameBuffer), NULL, NULL); - } - else - { - strcpy_s(szNameBuffer, ARRAY_SIZE(szNameBuffer), "UNKNOWN METHODDESC"); - } - - fprintf(file, " (%s)", szNameBuffer); - } - } - break; - - // fall through - case 'T': // format as a MethodTable - if (g_bDacBroken) - { - fprintf(file, "(MethodTable: %p)", (void*)arg); - } - else - { - if (arg & 3) - { - arg &= ~3; // GC steals the lower bits for its own use during GC. - fprintf(file, " Low Bit(s) Set"); - } - if (!IsMethodTable(arg)) - { - fprintf(file, " (BAD MethodTable)"); - } - else - { - NameForMT_s (arg, g_mdName, mdNameLen); - fprintf(file, " (%s)", g_mdName); - } - } - break; - - case 'V': - { // format as a C vtable pointer - char Symbol[1024]; - ULONG64 Displacement; - HRESULT hr = g_ExtSymbols->GetNameByOffset(TO_CDADDR(arg), Symbol, 1024, NULL, &Displacement); - if (SUCCEEDED(hr) && Symbol[0] != '\0' && Displacement == 0) - fprintf(file, " (%s)", Symbol); - else - fprintf(file, " (Unknown VTable)"); - } - break; - case 'K': - { // format a frame in stack trace - char Symbol[1024]; - ULONG64 Displacement; - HRESULT hr = g_ExtSymbols->GetNameByOffset (TO_CDADDR(arg), Symbol, 1024, NULL, &Displacement); - if (SUCCEEDED (hr) && Symbol[0] != '\0') - { - fprintf (file, " (%s", Symbol); - if (Displacement) - { - fprintf (file, "+%#llx", (unsigned long long)Displacement); - } - fprintf (file, ")"); - } - else - fprintf (file, " (Unknown function)"); - } - break; - default: - format = ptr; // Just print the character. - } - } - } - else if (*ptr == 's' || (*ptr == 'h' && *(ptr+1) == 's' && ++ptr)) - { - HRESULT hr; - - // need to _alloca, instead of declaring a local buffer - // since we may have more than one %s in the format - ULONG cbStrBuf = 256; - char* strBuf = (char *)_alloca(cbStrBuf); - - hr = memCallBack->ReadVirtual(TO_CDADDR((char* )args[iArgCount]), strBuf, cbStrBuf, 0); - if (hr != S_OK) - { - strcpy_s(strBuf, cbStrBuf, "(#Could not read address of string#)"); - } - - args[iArgCount] = strBuf; - } - else if (*ptr == 'S' || (*ptr == 'l' && *(ptr+1) == 's' && ++ptr)) - { - HRESULT hr; - - // need to _alloca, instead of declaring a local buffer - // since we may have more than one %s in the format - ULONG cbWstrBuf = 256 * sizeof(WCHAR); - WCHAR* wstrBuf = (WCHAR *)_alloca(cbWstrBuf); - - hr = memCallBack->ReadVirtual(TO_CDADDR((char* )args[iArgCount]), wstrBuf, cbWstrBuf, 0); - if (hr != S_OK) - { - wcscpy_s(wstrBuf, cbWstrBuf/sizeof(WCHAR), W("(#Could not read address of string#)")); - } - - args[iArgCount] = wstrBuf; - } - iArgCount++; - } - } - - // Print anything after the last special format instruction. - fprintf(file, format, args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8], args[9], args[10]); - fprintf(file, "\n"); -} - -void __cdecl -vDoOut(BOOL bToConsole, FILE* file, PCSTR Format, ...) -{ - va_list Args; - - va_start(Args, Format); - - if (bToConsole) - { - OutputVaList(DEBUG_OUTPUT_NORMAL, Format, Args); - } - else - { - vfprintf(file, Format, Args); - } - - va_end(Args); -} - - -/*********************************************************************************/ -HRESULT StressLog::Dump(ULONG64 outProcLog, const char* fileName, struct IDebugDataSpaces* memCallBack) -{ - ULONG64 g_hThisInst; - BOOL bDoGcHist = (fileName == NULL); - FILE* file = NULL; - - // Fetch the circular buffer bookkeeping data - StressLog inProcLog; - HRESULT hr = memCallBack->ReadVirtual(UL64_TO_CDA(outProcLog), &inProcLog, sizeof(StressLog), 0); - if (hr != S_OK) - { - return hr; - } - if (inProcLog.logs.Load() == NULL || inProcLog.moduleOffset == 0) - { - ExtOut ( "----- No thread logs in the image: The stress log was probably not initialized correctly. -----\n"); - return S_FALSE; - } - - g_hThisInst = (ULONG64) inProcLog.moduleOffset; - - if (bDoGcHist) - { - GcHistClear(); - } - else - { - ExtOut("Writing to file: %s\n", fileName); - ExtOut("Stress log in module 0x%p\n", SOS_PTR(g_hThisInst)); - ExtOut("Stress log address = 0x%p\n", SOS_PTR(outProcLog)); - } - // Fetch the circular buffers for each thread into the 'logs' list - ThreadStressLog* logs = 0; - - CLRDATA_ADDRESS outProcPtr = TO_CDADDR(inProcLog.logs.Load()); - ThreadStressLog* inProcPtr; - ThreadStressLog** logsPtr = &logs; - int threadCtr = 0; - uint64_t lastTimeStamp = 0;// timestamp of last log entry - - while(outProcPtr != 0) { - inProcPtr = new ThreadStressLog; - hr = memCallBack->ReadVirtual(outProcPtr, inProcPtr, sizeof (*inProcPtr), 0); - if (hr != S_OK || inProcPtr->chunkListHead == NULL) - { - delete inProcPtr; - goto FREE_MEM; - } - - CLRDATA_ADDRESS outProcListHead = TO_CDADDR(inProcPtr->chunkListHead); - CLRDATA_ADDRESS outProcChunkPtr = outProcListHead; - StressLogChunk ** chunksPtr = &inProcPtr->chunkListHead; - StressLogChunk * inProcPrevChunkPtr = NULL; - BOOL curPtrInitialized = FALSE; - do - { - StressLogChunk * inProcChunkPtr = new StressLogChunk; - hr = memCallBack->ReadVirtual (outProcChunkPtr, inProcChunkPtr, sizeof (*inProcChunkPtr), 0); - if (hr != S_OK || !inProcChunkPtr->IsValid ()) - { - if (hr != S_OK) - ExtOut ("ReadVirtual failed with code hr = %x.\n", hr ); - else - ExtOut ("Invalid stress log chunk: %p", SOS_PTR(outProcChunkPtr)); - - // Now cleanup - delete inProcChunkPtr; - // if this is the first time through, inProcPtr->chunkListHead may still contain - // the out-of-process value for the chunk pointer. NULL it to avoid AVs - if (TO_CDADDR(inProcPtr->chunkListHead) == outProcListHead) - inProcPtr->chunkListHead = NULL; - delete inProcPtr; - goto FREE_MEM; - } - - if (!curPtrInitialized && outProcChunkPtr == TO_CDADDR(inProcPtr->curWriteChunk)) - { - inProcPtr->curPtr = (StressMsg *)((BYTE *)inProcChunkPtr + ((BYTE *)inProcPtr->curPtr - (BYTE *)inProcPtr->curWriteChunk)); - inProcPtr->curWriteChunk = inProcChunkPtr; - curPtrInitialized = TRUE; - } - - outProcChunkPtr = TO_CDADDR(inProcChunkPtr->next); - *chunksPtr = inProcChunkPtr; - chunksPtr = &inProcChunkPtr->next; - inProcChunkPtr->prev = inProcPrevChunkPtr; - inProcPrevChunkPtr = inProcChunkPtr; - - if (outProcChunkPtr == outProcListHead) - { - inProcChunkPtr->next = inProcPtr->chunkListHead; - inProcPtr->chunkListHead->prev = inProcChunkPtr; - inProcPtr->chunkListTail = inProcChunkPtr; - } - } while (outProcChunkPtr != outProcListHead); - - if (!curPtrInitialized) - { - delete inProcPtr; - goto FREE_MEM; - } - - // TODO: fix on 64 bit - inProcPtr->Activate (); - if (StressMsgReader(inProcPtr->readPtr).GetTimeStamp() > lastTimeStamp) - { - lastTimeStamp = StressMsgReader(inProcPtr->readPtr).GetTimeStamp(); - } - - outProcPtr = TO_CDADDR(inProcPtr->next); - *logsPtr = inProcPtr; - logsPtr = &inProcPtr->next; - threadCtr++; - } - - if (!bDoGcHist && ((fopen_s(&file, fileName, "w")) != 0)) - { - hr = GetLastError(); - goto FREE_MEM; - } - hr = S_FALSE; // return false if there are no message to print to the log - - vDoOut(bDoGcHist, file, "STRESS LOG:\n" - " facilitiesToLog = 0x%x\n" - " levelToLog = %d\n" - " MaxLogSizePerThread = 0x%x (%d)\n" - " MaxTotalLogSize = 0x%x (%d)\n" - " CurrentTotalLogChunk = %d\n" - " ThreadsWithLogs = %d\n", - inProcLog.facilitiesToLog, inProcLog.levelToLog, inProcLog.MaxSizePerThread, inProcLog.MaxSizePerThread, - inProcLog.MaxSizeTotal, inProcLog.MaxSizeTotal, inProcLog.totalChunk.Load(), threadCtr); - - FILETIME endTime; - double totalSecs; - totalSecs = ((double) (lastTimeStamp - inProcLog.startTimeStamp)) / inProcLog.tickFrequency; - toInt64(endTime) = toInt64(inProcLog.startTime) + ((int64_t) (totalSecs * 1.0E7)); - - char timeBuff[64]; - vDoOut(bDoGcHist, file, " Clock frequency = %5.3f GHz\n", inProcLog.tickFrequency / 1.0E9); - vDoOut(bDoGcHist, file, " Start time %s\n", getTime(&inProcLog.startTime, timeBuff, ARRAY_SIZE(timeBuff))); - vDoOut(bDoGcHist, file, " Last message time %s\n", getTime(&endTime, timeBuff, ARRAY_SIZE(timeBuff))); - vDoOut(bDoGcHist, file, " Total elapsed time %5.3f sec\n", totalSecs); - - if (!bDoGcHist) - { - fprintf(file, "\nTHREAD TIMESTAMP FACILITY MESSAGE\n"); - fprintf(file, " ID (sec from start)\n"); - fprintf(file, "--------------------------------------------------------------------------------------\n"); - } - char format[257]; - format[256] = format[0] = 0; - void** args; - unsigned msgCtr; - msgCtr = 0; - for (;;) - { - ThreadStressLog* latestLog = logs->FindLatestThreadLog(); - - if (IsInterrupt()) - { - vDoOut(bDoGcHist, file, "----- Interrupted by user -----\n"); - break; - } - - if (latestLog == 0) - { - break; - } - - StressMsgReader latestMsg = latestLog->readPtr; - if (latestMsg.GetFormatOffset() != 0 && !latestLog->CompletedDump()) - { - TADDR taFmt = (latestMsg.GetFormatOffset()) + TO_TADDR(g_hThisInst); - hr = memCallBack->ReadVirtual(TO_CDADDR(taFmt), format, 256, 0); - if (hr != S_OK) - strcpy_s(format, ARRAY_SIZE(format), "Could not read address of format string"); - - double deltaTime = ((double) (latestMsg.GetTimeStamp() - inProcLog.startTimeStamp)) / inProcLog.tickFrequency; - if (bDoGcHist) - { - if (strcmp(format, ThreadStressLog::TaskSwitchMsg()) == 0) - { - latestLog->threadId = (unsigned)(size_t)latestMsg.GetArgs()[0]; - } - GcHistAddLog(format, latestMsg); - } - else - { - if (strcmp(format, ThreadStressLog::TaskSwitchMsg()) == 0) - { - fprintf (file, "Task was switched from %x\n", (unsigned)(size_t)latestMsg.GetArgs()[0]); - latestLog->threadId = (unsigned)(size_t)latestMsg.GetArgs()[0]; - } - else - { - args = latestMsg.GetArgs(); - formatOutput(memCallBack, file, format, (unsigned)latestLog->threadId, deltaTime, latestMsg.GetFacility(), args); - } - } - msgCtr++; - } - - latestLog->readPtr = latestLog->AdvanceRead(latestMsg.GetNumberOfArgs()); - if (latestLog->CompletedDump()) - { - latestLog->readPtr = NULL; - if (!bDoGcHist) - { - fprintf(file, "------------ Last message from thread %llx -----------\n", (unsigned long long)latestLog->threadId); - } - } - - if (msgCtr % 64 == 0) - { - ExtOut("."); // to indicate progress - if (msgCtr % (64*64) == 0) - ExtOut("\n"); - } - } - ExtOut("\n"); - - vDoOut(bDoGcHist, file, "---------------------------- %d total entries ------------------------------------\n", msgCtr); - if (!bDoGcHist) - { - fclose(file); - } - -FREE_MEM: - // clean up the 'logs' list - while (logs) { - ThreadStressLog* temp = logs; - logs = logs->next; - delete temp; - } - - return hr; -} - diff --git a/src/coreclr/tools/StressLogAnalyzer/StressLogPlugin.cpp b/src/coreclr/tools/StressLogAnalyzer/StressLogPlugin.cpp deleted file mode 100644 index 20d0f1b6b22918..00000000000000 --- a/src/coreclr/tools/StressLogAnalyzer/StressLogPlugin.cpp +++ /dev/null @@ -1,1555 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -#include -#include -#include -#include -#include -#include - -#ifndef INFINITY -#define INFINITY 1e300 // Practically good enough - not sure why we miss this in our Linux build. -#endif - -#ifndef DLLEXPORT -#ifdef _MSC_VER -#define DLLEXPORT __declspec(dllexport) -#else -#define DLLEXPORT __attribute__ ((visibility ("default"))) -#endif // _MSC_VER -#endif // DLLEXPORT - -#include "strike.h" -#include "util.h" - -#include "assert.h" - -#define STRESS_LOG -#define STRESS_LOG_ANALYZER -#define MEMORY_MAPPED_STRESSLOG - -class MapViewHolder -{ - void* whatever; -}; - -bool IsInCantAllocStressLogRegion() -{ - return true; -} - -#include -#include "../../../inc/stresslog.h" -#include "StressMsgReader.h" - -using std::min; -using std::max; - -size_t StressLog::writing_base_address; -size_t StressLog::reading_base_address; - -bool s_showAllMessages = false; -bool s_showDefaultMessages = true; -BOOL g_bDacBroken; -char g_mdName[1]; -SYMBOLS* g_ExtSymbols; -SOS* g_sos; - -HRESULT OutputVaList(ULONG mask, PCSTR format, va_list args) -{ - return vprintf(format, args); -} - -void ExtOut(PCSTR format, ...) -{ - va_list args; - va_start(args, format); - vprintf(format, args); -} - -void GcHistClear() -{ -} - -void GcHistAddLog(LPCSTR msg, StressMsgReader stressMsg) -{ -} - -// this is just to read string literals out of the coreclr and clrgc images -struct CorClrData : IDebugDataSpaces -{ - StressLog::StressLogHeader* hdr; - CorClrData(StressLog::StressLogHeader* h) : hdr(h) { } - - virtual HRESULT ReadVirtual(void* src, void* dest, size_t size, int) - { - size_t cumSize = 0; - for (size_t moduleIndex = 0; moduleIndex < StressLog::MAX_MODULES; moduleIndex++) - { - ptrdiff_t offs = (uint8_t*)src - hdr->modules[moduleIndex].baseAddress; - if ((size_t)offs < hdr->modules[moduleIndex].size && (size_t)offs + size < hdr->modules[moduleIndex].size) - { - memcpy(dest, &hdr->moduleImage[offs + cumSize], size); - return S_OK; - } - cumSize += hdr->modules[moduleIndex].size; - } - return E_FAIL; - } -}; - -const int MAX_NUMBER_OF_HEAPS = 1024; -static volatile int64_t s_maxHeapNumberSeen = -1; -static volatile uint64_t s_threadIdOfHeap[MAX_NUMBER_OF_HEAPS][2]; - -enum GcThreadKind -{ - GC_THREAD_FG, - GC_THREAD_BG, -}; - -struct GcThread -{ - GcThreadKind kind; - int heapNumber; -}; - -bool LookupGcThread(uint64_t threadId, GcThread *gcThread) -{ - for (int i = 0; i <= s_maxHeapNumberSeen; i++) - { - if (s_threadIdOfHeap[i][GC_THREAD_FG] == threadId) - { - gcThread->heapNumber = i; - gcThread->kind = GC_THREAD_FG; - return true; - } - if (s_threadIdOfHeap[i][GC_THREAD_BG] == threadId) - { - gcThread->heapNumber = i; - gcThread->kind = GC_THREAD_BG; - return true; - } - } - return false; -} - -#define InterestingStrings \ -d(IS_UNKNOWN, "") \ -d(IS_THREAD_WAIT, ThreadStressLog::gcServerThread0StartMsg()) \ -d(IS_THREAD_WAIT_DONE, ThreadStressLog::gcServerThreadNStartMsg()) \ -d(IS_GCSTART, ThreadStressLog::gcDetailedStartMsg()) \ -d(IS_GCEND, ThreadStressLog::gcDetailedEndMsg()) \ -d(IS_MARK_START, ThreadStressLog::gcStartMarkMsg()) \ -d(IS_PLAN_START, ThreadStressLog::gcStartPlanMsg()) \ -d(IS_RELOCATE_START, ThreadStressLog::gcStartRelocateMsg()) \ -d(IS_RELOCATE_END, ThreadStressLog::gcEndRelocateMsg()) \ -d(IS_COMPACT_START, ThreadStressLog::gcStartCompactMsg()) \ -d(IS_COMPACT_END, ThreadStressLog::gcEndCompactMsg()) \ -d(IS_GCROOT, ThreadStressLog::gcRootMsg()) \ -d(IS_PLUG_MOVE, ThreadStressLog::gcPlugMoveMsg()) \ -d(IS_GCMEMCOPY, ThreadStressLog::gcMemCopyMsg()) \ -d(IS_GCROOT_PROMOTE, ThreadStressLog::gcRootPromoteMsg()) \ -d(IS_PLAN_PLUG, ThreadStressLog::gcPlanPlugMsg()) \ -d(IS_PLAN_PINNED_PLUG, ThreadStressLog::gcPlanPinnedPlugMsg()) \ -d(IS_DESIRED_NEW_ALLOCATION, ThreadStressLog::gcDesiredNewAllocationMsg()) \ -d(IS_MAKE_UNUSED_ARRAY, ThreadStressLog::gcMakeUnusedArrayMsg()) \ -d(IS_START_BGC_THREAD, ThreadStressLog::gcStartBgcThread()) \ -d(IS_RELOCATE_REFERENCE, ThreadStressLog::gcRelocateReferenceMsg()) \ -d(IS_LOGGING_OFF, ThreadStressLog::gcLoggingIsOffMsg()) \ -d(IS_UNINTERESTING, "") - -enum InterestingStringId : unsigned char -{ -#define d(a,b) a, - InterestingStrings - IS_INTERESTING -#undef d -}; - -const int MAX_INTERESTING_STRINGS = 1024; -int s_interestingStringCount = IS_INTERESTING; -const char* s_interestingStringTable[MAX_INTERESTING_STRINGS] = -{ -#define d(a,b) b, - InterestingStrings -#undef d -}; - -bool s_interestingStringMatchMode[MAX_INTERESTING_STRINGS]; - -bool s_interestingStringFilter[MAX_INTERESTING_STRINGS]; - -static void AddInterestingString(const char* s, bool matchMode) -{ - for (int i = 1; i < s_interestingStringCount; i++) - { - if (strcmp(s_interestingStringTable[i], s) == 0) - { - s_interestingStringFilter[i] = true; - return; - } - } - int i = s_interestingStringCount++; - s_interestingStringTable[i] = s; - s_interestingStringMatchMode[i] = matchMode; - s_interestingStringFilter[IS_INTERESTING] = true; -} - - -InterestingStringId mapImageToStringId[sizeof(StressLog::StressLogHeader::moduleImage)]; - -InterestingStringId FindStringId(StressLog::StressLogHeader* hdr, char* format) -{ - size_t offset = format - (char*)hdr->moduleImage; - assert(offset < sizeof(mapImageToStringId)); - InterestingStringId id = mapImageToStringId[offset]; - if (id != IS_UNKNOWN) - return id; - for (int i = 1; s_interestingStringTable[i] != nullptr; i++) - { - if (i != IS_UNINTERESTING) - { - bool match = false; - if (s_interestingStringMatchMode[i]) - { - match = (strstr(format, s_interestingStringTable[i]) == format); - } - else - { - match = (strcmp(format, s_interestingStringTable[i]) == 0); - } - if (match) - { - id = (InterestingStringId)i; - if (id > IS_INTERESTING) - id = IS_INTERESTING; - mapImageToStringId[offset] = id; - return id; - } - } - } - mapImageToStringId[offset] = IS_UNINTERESTING; - return IS_UNINTERESTING; -} - -const int MAX_LEVEL_FILTERS = 100; -static int s_levelFilterCount; -struct LevelFilter -{ - unsigned long minLevel; - unsigned long maxLevel; -}; - -static LevelFilter s_levelFilter[MAX_LEVEL_FILTERS]; - -struct GcStartEnd -{ - double startTime; - double endTime; -}; - -const int MAX_GC_INDEX = 1024 * 1024; -static GcStartEnd s_gcStartEnd[MAX_GC_INDEX]; - -static unsigned long s_gcFilterStart; -static unsigned long s_gcFilterEnd; - -const int MAX_VALUE_FILTERS = 100; -static int s_valueFilterCount; - -struct ValueFilter -{ - ULONGLONG start; - ULONGLONG end; -}; - -static ValueFilter s_valueFilter[MAX_VALUE_FILTERS]; - -const int MAX_THREAD_FILTERS = 1024; -static int s_threadFilterCount; -static uint64_t s_threadFilter[MAX_THREAD_FILTERS]; - -static bool s_gcThreadFilter[MAX_NUMBER_OF_HEAPS][2]; -static bool s_hadGcThreadFilters; - -static bool s_printHexTidForGcThreads; - -static uint32_t s_facilityIgnore; - -static bool s_printEarliestMessages; -static int s_printEarliestMessageFromThreadCount; -static uint64_t s_printEarliestMessageFromThread[MAX_THREAD_FILTERS]; -static bool s_printEarliestMessageFromGcThread[MAX_NUMBER_OF_HEAPS][2]; - -static bool FilterThread(ThreadStressLog* tsl) -{ - // return tsl->threadId == 0x6ff8; - - if (s_gcFilterStart != 0) - { - // we have a filter based on a GC index - // include all message for now so we don't miss any - // GC start/end messages - // we will throw away message for other threads later - return true; - } - - if (s_hadGcThreadFilters) - { - GcThread gcThread; - if (!LookupGcThread(tsl->threadId, &gcThread)) - { - // this may or may not be a GC thread - we don't know yet - // include its messages to be conservative - we will have - // a filter later to remove these messages - return true; - } - return s_gcThreadFilter[gcThread.heapNumber][gcThread.kind]; - } - else - { - if (s_threadFilterCount == 0) - return true; - // we can filter now - for (int i = 0; i < s_threadFilterCount; i++) - { - if (s_threadFilter[i] == tsl->threadId) - return true; - } - return false; - } -} - - -int GcLogLevel(uint32_t facility) -{ - if ((facility & (LF_ALWAYS | 0xfffe | LF_GC)) == (LF_ALWAYS | LF_GC)) - { - return (facility >> 16) & 0x7fff; - } - return 0; -} - -static void RememberThreadForHeap(uint64_t threadId, int64_t heapNumber, GcThreadKind threadKind) -{ - if (s_maxHeapNumberSeen == -1 && heapNumber == 0) - { - // we don't want to remember these associations for WKS GC, - // which can execute on any thread - as soon as we see - // a heap number != 0, we assume SVR GC and remember it - return; - } - - if (heapNumber < MAX_NUMBER_OF_HEAPS) - { - s_threadIdOfHeap[heapNumber][threadKind] = threadId; - int64_t maxHeapNumberSeen = s_maxHeapNumberSeen; - while (maxHeapNumberSeen < heapNumber) - { - maxHeapNumberSeen = InterlockedCompareExchange64((volatile LONG64*)&s_maxHeapNumberSeen, heapNumber, maxHeapNumberSeen); - } - } -} - -bool FilterMessage(StressLog::StressLogHeader* hdr, ThreadStressLog* tsl, uint32_t facility, char* format, double deltaTime, int argCount, void** args) -{ - bool fLevelFilter = false; - if (s_levelFilterCount > 0) - { - unsigned long gcLogLevel = (unsigned long)GcLogLevel(facility); - for (int i = 0; i < s_levelFilterCount; i++) - { - if (s_levelFilter[i].minLevel <= gcLogLevel && gcLogLevel <= s_levelFilter[i].maxLevel) - { - fLevelFilter = true; - break; - } - } - } - - if (s_facilityIgnore != 0) - { - if ((facility & (LF_ALWAYS | 0xfffe | LF_GC)) == (LF_ALWAYS | LF_GC)) - { - // specially encoded GC message including dprintf level - if ((s_facilityIgnore & LF_GC) != 0) - { - return false; - } - } - else if ((s_facilityIgnore & facility) != 0) - { - return false; - } - } - - InterestingStringId isd = FindStringId(hdr, format); - switch (isd) - { - case IS_UNINTERESTING: - case IS_UNKNOWN: - break; - case IS_THREAD_WAIT: - case IS_THREAD_WAIT_DONE: - RememberThreadForHeap(tsl->threadId, (int64_t)args[0], GC_THREAD_FG); - break; - - case IS_DESIRED_NEW_ALLOCATION: - { - int genNumber = (int)(int64_t)args[1]; - if (genNumber <= 1) - { - // do this only for gen 0 and 1, because otherwise it - // may be background GC - RememberThreadForHeap(tsl->threadId, (int64_t)args[0], GC_THREAD_FG); - } - break; - } - - case IS_LOGGING_OFF: - return s_showDefaultMessages; - - case IS_GCSTART: - { - int gcIndex = (int)(size_t)args[0]; - if (gcIndex < MAX_GC_INDEX) - { - s_gcStartEnd[gcIndex].startTime = deltaTime; - } - return s_showDefaultMessages; - } - - case IS_GCEND: - { - int gcIndex = (int)(size_t)args[0]; - if (gcIndex < MAX_GC_INDEX) - { - s_gcStartEnd[gcIndex].endTime = deltaTime; - } - return s_showDefaultMessages; - } - - case IS_MARK_START: - case IS_PLAN_START: - case IS_RELOCATE_START: - case IS_RELOCATE_END: - case IS_COMPACT_START: - case IS_COMPACT_END: - RememberThreadForHeap(tsl->threadId, (int64_t)args[0], GC_THREAD_FG); - return s_showDefaultMessages; - - case IS_PLAN_PLUG: - case IS_PLAN_PINNED_PLUG: - if (s_valueFilterCount > 0) - { - // print this message if the plug or the gap before it contain (part of) the range we're looking for - size_t gapSize = (size_t)args[0]; - size_t plugStart = (size_t)args[1]; - size_t gapStart = plugStart - gapSize; - size_t plugEnd = (size_t)args[2]; - for (int i = 0; i < s_valueFilterCount; i++) - { - if (s_valueFilter[i].end < gapStart || plugEnd < s_valueFilter[i].start) - { - // empty intersection with the gap+plug - continue; - } - return true; - } - } - break; - - case IS_GCMEMCOPY: - if (s_valueFilterCount > 0) - { - // print this message if the source or destination range contain (part of) the range we're looking for - size_t srcStart = (size_t)args[0]; - size_t dstStart = (size_t)args[1]; - size_t srcEnd = (size_t)args[2]; - size_t dstEnd = (size_t)args[3]; - for (int i = 0; i < s_valueFilterCount; i++) - { - if ((s_valueFilter[i].end < srcStart || srcEnd < s_valueFilter[i].start) && - (s_valueFilter[i].end < dstStart || dstEnd < s_valueFilter[i].start)) - { - // empty intersection with both the source and the destination - continue; - } - return true; - } - } - break; - - case IS_MAKE_UNUSED_ARRAY: - if (s_valueFilterCount > 0) - { - // print this message if the source or destination range contain (part of) the range we're looking for - size_t start = (size_t)args[0]; - size_t end = (size_t)args[1]; - for (int i = 0; i < s_valueFilterCount; i++) - { - if ((s_valueFilter[i].end < start || end < s_valueFilter[i].start)) - { - // empty intersection with the unused array - continue; - } - return true; - } - } - break; - - case IS_GCROOT: - case IS_PLUG_MOVE: - case IS_GCROOT_PROMOTE: - case IS_INTERESTING: - break; - - case IS_START_BGC_THREAD: - RememberThreadForHeap(tsl->threadId, (int64_t)args[0], GC_THREAD_BG); - break; - case IS_RELOCATE_REFERENCE: - if (s_valueFilterCount > 0) - { - size_t src = (size_t)args[0]; - size_t dst_from = (size_t)args[1]; - size_t dst_to = (size_t)args[2]; - // print this message if the source or destination contain (part of) the range we're looking for - for (int i = 0; i < s_valueFilterCount; i++) - { - if ((s_valueFilter[i].end < src || src < s_valueFilter[i].start) && - (s_valueFilter[i].end < dst_from || dst_from < s_valueFilter[i].start) && - (s_valueFilter[i].end < dst_to || dst_to < s_valueFilter[i].start)) - { - // empty intersection with both the source and the destination - continue; - } - return true; - } - } - break; - } - return fLevelFilter || s_interestingStringFilter[isd]; -} - -struct StressThreadAndMsg -{ - uint64_t threadId; - StressMsgReader msg; - uint64_t msgId; -}; - -int CmpMsg(const void* p1, const void* p2) -{ - const StressThreadAndMsg* msg1 = (const StressThreadAndMsg*)p1; - const StressThreadAndMsg* msg2 = (const StressThreadAndMsg*)p2; - - if (msg1->msg.GetTimeStamp() < msg2->msg.GetTimeStamp()) - return 1; - if (msg1->msg.GetTimeStamp() > msg2->msg.GetTimeStamp()) - return -11; - - if (msg1->threadId < msg2->threadId) - return -1; - if (msg1->threadId > msg2->threadId) - return 1; - - if (msg1->msgId < msg2->msgId) - return -1; - if (msg1->msgId > msg2->msgId) - return 1; - - assert(!"unreachable"); - return 0; -} - -struct ThreadStressLogDesc -{ - volatile LONG workStarted; - volatile LONG workFinished; - ThreadStressLog* tsl; - StressMsgReader earliestMessage; - - ThreadStressLogDesc() : workStarted(0), workFinished(0), tsl(nullptr), earliestMessage(nullptr) - { - } -}; - -static const int MAX_THREADSTRESSLOGS = 64 * 1024; -static ThreadStressLogDesc s_threadStressLogDesc[MAX_THREADSTRESSLOGS]; -static int s_threadStressLogCount; -static LONG64 s_wrappedWriteThreadCount; - -static const LONG MAX_MESSAGE_COUNT = 64 * 1024 * 1024; -static StressThreadAndMsg* s_threadMsgBuf; -static volatile LONG64 s_msgCount = 0; -static volatile LONG64 s_totalMsgCount = 0; -static double s_timeFilterStart = 0; -static double s_timeFilterEnd = 0; -static const char* s_outputFileName = nullptr; - -StressLog::StressLogHeader* s_hdr; - -static bool s_fPrintFormatStrings; - -void Usage() -{ - printf("\n"); - printf("Usage:\n"); - printf("\n"); - printf(" -o:: write output to a text file instead of the console\n"); - printf("\n"); - printf(" -v:: look for a specific hex value (often used to look for addresses)\n"); - printf(" -v:-: look for values >= hexlower and <= hexupper\n"); - printf(" -v:+: look for values >= hexlower and <= hexlower+hexsize\n"); - printf("\n"); - printf(" -t:: don't consider messages before start time\n"); - printf(" -t:-: only consider messages >= start time and <= end time\n"); - printf(" -t:-: only consider messages in the last seconds\n"); - printf("\n"); - printf(" -l:,,... : print messages at dprint level1,level2,...\n"); - printf("\n"); - printf(" -g:: only print messages occurring during GC#gc_index\n"); - printf(" -g:-: as above, for a range of GC indices\n"); - printf("\n"); - printf(" -f: print the raw format strings along with the message\n"); - printf(" (useful to search for the format string in the source code)\n"); - printf(" -f:: search for a specific format string\n"); - printf(" e.g. '-f:\"<%%zx>:%%zx\"'\n"); - printf(" -p:: search for all format strings with a specific prefix\n"); - printf(" e.g. '-p:\"commit-accounting\"'\n"); - printf("\n"); - printf(" -i:: ignore messages from log facilities\n"); - printf(" e.g. '-i:7ffe' means ignore messages from anything but LF_GC\n"); - printf("\n"); - printf(" -tid: print hex thread ids, e.g. 2a08 instead of GC12\n"); - printf(" -tid:,,...: only print messages from the listed\n"); - printf(" threads. Thread ids are in hex, given as GC,\n"); - printf(" or BG\n"); - printf(" e.g. '-tid:2bc8,GC3,BG14' would print messages from thread 2bc8, the gc thread\n"); - printf(" associated with heap 3, and the background GC thread for heap 14\n"); - printf("\n"); - printf(" -e: print earliest messages from all threads\n"); - printf(" -e:,,...: print earliest messages from the listed\n"); - printf(" threads. Thread ids are in hex, given as GC,\n"); - printf(" or BG\n"); - printf(" e.g. '-e:2bc8,GC3,BG14' would print the earliest messages from thread 2bc8,\n"); - printf(" the gc thread associated with heap 3, and the background GC thread for heap 14\n"); - printf("\n"); - printf(" -a: print all messages from all threads\n"); - printf("\n"); - printf(" -d: suppress default messages\n"); - printf("\n"); -} - -// Translate escape sequences like "\n" - only common ones are handled -static void InterpretEscapeSequences(char* s) -{ - char* d = s; - char c = *s++; - while (c != '\0') - { - if (c == '\\') - { - c = *s++; - switch (c) - { - case 'n': *d++ = '\n'; break; - case 't': *d++ = '\t'; break; - case 'r': *d++ = '\r'; break; - default: *d++ = c; break; - } - } - else - { - *d++ = c; - } - c = *s++; - } - *d = '\0'; -} - -bool ParseOptions(int argc, char* argv[]) -{ - int i = 0; - while (i < argc) - { - char* arg = argv[i]; - if (arg[0] == '-') - { - switch (arg[1]) - { - case 'v': - case 'V': - if (s_valueFilterCount >= MAX_VALUE_FILTERS) - { - printf("too many value filters - max is %d\n", MAX_VALUE_FILTERS); - return false; - } - if (arg[2] == ':') - { - int i = s_valueFilterCount++; - char* end = nullptr; - s_valueFilter[i].start = strtoull(&arg[3], &end, 16); - if (*end == '-') - { - s_valueFilter[i].end = strtoull(end + 1, &end, 16); - } - else if (*end == '+') - { - s_valueFilter[i].end = s_valueFilter[i].start + strtoull(end + 1, &end, 16); - } - else if (*end != '\0') - { - printf("expected '-' or '+'\n"); - return false; - } - else - { - s_valueFilter[i].end = s_valueFilter[i].start; - } - if (*end != '\0') - { - printf("could not parse option %s\n", arg); - return false; - } - } - else - { - printf("expected '-v:'\n"); - return false; - } - break; - - case 't': - case 'T': - if (arg[2] == ':') - { - char* end = nullptr; - s_timeFilterStart = strtod(&arg[3], &end); - if (*end == '-') - { - s_timeFilterEnd = strtod(end + 1, &end); - } - else if (*end == '+') - { - s_timeFilterEnd = s_timeFilterStart + strtod(end + 1, &end); - } - else - { - s_timeFilterEnd = INFINITY; - } - if (*end != '\0') - { - printf("could not parse option %s\n", arg); - return false; - } - } - else if (_strnicmp(arg, "-tid:", 5) == 0) - { - arg = arg + 5; - while (true) - { - if (s_threadFilterCount >= MAX_THREAD_FILTERS) - { - printf("too many thread filters - max is %d\n", MAX_THREAD_FILTERS); - return false; - } - char* end = nullptr; - if (_strnicmp(arg, "gc", 2) == 0 || _strnicmp(arg, "bg", 2) == 0) - { - unsigned long gcHeapNumber = strtoul(arg+2, &end, 10); - GcThreadKind kind = _strnicmp(arg, "gc", 2) == 0 ? GC_THREAD_FG : GC_THREAD_BG; - if (gcHeapNumber < MAX_NUMBER_OF_HEAPS) - { - s_gcThreadFilter[gcHeapNumber][kind] = true; - s_hadGcThreadFilters = true; - } - else - { - printf("expected heap number < %d\n", MAX_NUMBER_OF_HEAPS); - return false; - } - } - else - { - int i = s_threadFilterCount++; - s_threadFilter[i] = strtoull(arg, &end, 16); - } - if (*end == ',') - { - arg = end + 1; - } - else if (*end != '\0') - { - printf("could not parse %s\n", arg); - return false; - } - else - { - break; - } - } - } - else if (_stricmp(arg, "-tid") == 0) - { - s_printHexTidForGcThreads = true; - } - else - { - printf("-t: or -t:<-last seconds> or -t:- or\n"); - printf("-tid:,,... expected\n"); - return false; - } - break; - - case 'o': - case 'O': - if (arg[2] == ':') - { - s_outputFileName = &arg[3]; - } - else - { - printf("expected '-o:'\n"); - return false; - } - break; - - case 'l': - case 'L': - if (arg[2] == ':') - { - arg = arg + 3; - while (true) - { - if (s_levelFilterCount >= MAX_LEVEL_FILTERS) - { - printf("too many level filters - max is %d\n", MAX_LEVEL_FILTERS); - return false; - } - int i = s_levelFilterCount++; - char* end = nullptr; - if (*arg == '*') - { - s_levelFilter[i].minLevel = 0; - s_levelFilter[i].maxLevel = 0x7fffffff; - end = arg + 1; - } - else - { - s_levelFilter[i].minLevel = strtoul(arg, &end, 10); - if (*end == '-') - { - s_levelFilter[i].maxLevel = strtoul(end + 1, &end, 10); - } - else - { - s_levelFilter[i].maxLevel = s_levelFilter[i].minLevel; - } - } - if (*end == ',') - { - arg = end + 1; - } - else if (*end != '\0') - { - printf("could not parse option %s\n", arg); - return false; - } - else - { - break; - } - } - } - else - { - printf("expected '-l:'\n"); - return false; - } - break; - - case 'a': - case 'A': - s_showAllMessages = true; - break; - case 'd': - case 'D': - s_showDefaultMessages = false; - break; - case 'f': - case 'F': - if (arg[2] == '\0') - { - s_fPrintFormatStrings = true; - } - else if (arg[2] == ':') - { - if (s_interestingStringCount >= MAX_INTERESTING_STRINGS) - { - printf("too format string filters - max is %d\n", MAX_INTERESTING_STRINGS - IS_INTERESTING); - return false; - } - arg = &arg[3]; - char* buf = arg; - size_t actualSize = strlen(buf); - if (actualSize <= 1) - { - printf("-f: expected\n"); - return false; - } - - // remove double quotes around the string, if given - if (actualSize >= 2 && buf[0] == '"' && buf[actualSize - 1] == '"') - { - buf[actualSize - 1] = '\0'; - buf++; - } - InterpretEscapeSequences(buf); - AddInterestingString(buf, false); - } - break; - case 'p': - case 'P': - if (arg[2] == ':') - { - if (s_interestingStringCount >= MAX_INTERESTING_STRINGS) - { - printf("too format string filters - max is %d\n", MAX_INTERESTING_STRINGS - IS_INTERESTING); - return false; - } - arg = &arg[3]; - char* buf = arg; - size_t actualSize = strlen(buf); - if (actualSize <= 1) - { - printf("-f: expected\n"); - return false; - } - - // remove double quotes around the string, if given - if (actualSize >= 2 && buf[0] == '"' && buf[actualSize - 1] == '"') - { - buf[actualSize - 1] = '\0'; - buf++; - } - InterpretEscapeSequences(buf); - AddInterestingString(buf, true); - } - break; - case 'g': - case 'G': - if (arg[2] == ':') - { - char* end = nullptr; - s_gcFilterStart = strtoul(arg+3, &end, 10); - if (*end == '-') - { - s_gcFilterEnd = strtoul(end+1, &end, 10); - } - else - { - s_gcFilterEnd = s_gcFilterStart; - } - if (*end != '\0') - { - printf("could not parse option %s\n", arg); - return false; - } - } - else - { - printf("-g: or -g:- expected\n"); - return false; - } - break; - - case 'i': - case 'I': - if (arg[2] == ':') - { - char* end = nullptr; - s_facilityIgnore = strtoul(arg + 3, &end, 16); - if (*end != '\0') - { - printf("could not parse option %s\n", arg); - return false; - } - } - else - { - printf("-i: expected\n"); - return false; - } - break; - - case 'e': - case 'E': - if (arg[2] == '\0') - { - s_printEarliestMessages = true; - } - else if (arg[2] == ':') - { - arg = arg + 3; - while (true) - { - if (s_printEarliestMessageFromThreadCount >= MAX_THREAD_FILTERS) - { - printf("too many threads - max is %d\n", MAX_THREAD_FILTERS); - return false; - } - char* end = nullptr; - if (_strnicmp(arg, "gc", 2) == 0 || _strnicmp(arg, "bg", 2) == 0) - { - int gcHeapNumber = strtoul(arg + 2, &end, 10); - GcThreadKind kind = _strnicmp(arg, "gc", 2) == 0 ? GC_THREAD_FG : GC_THREAD_BG; - if (gcHeapNumber < MAX_NUMBER_OF_HEAPS) - { - s_printEarliestMessageFromGcThread[gcHeapNumber][kind] = true; - } - else - { - printf("expected heap number < %d\n", MAX_NUMBER_OF_HEAPS); - return false; - } - } - else - { - int i = s_printEarliestMessageFromThreadCount++; - s_printEarliestMessageFromThread[i] = strtoull(arg, &end, 16); - } - if (*end == ',') - { - arg = end + 1; - } - else if (*end != '\0') - { - printf("could not parse %s\n", arg); - return false; - } - else - { - break; - } - } - } - else - { - printf("could not parse option %s\n", arg); - return false; - } - break; - - case '?': - Usage(); - return false; - - default: - printf("unrecognized option %s\n", arg); - return false; - } - } - else - { - return false; - } - i++; - } - return true; -} - -static void IncludeMessage(uint64_t threadId, StressMsgReader msg) -{ - LONGLONG msgCount = InterlockedIncrement64(&s_msgCount) - 1; - if (msgCount < MAX_MESSAGE_COUNT) - { - s_threadMsgBuf[msgCount].threadId = threadId; - s_threadMsgBuf[msgCount].msg = msg; - s_threadMsgBuf[msgCount].msgId = msgCount; - } -} - -DWORD WINAPI ProcessStresslogWorker(LPVOID) -{ - StressLog::StressLogHeader* hdr = s_hdr; - LONG totalMsgCount = 0; - int wrappedWriteThreadCount = 0; - bool fTimeFilter = s_timeFilterStart != 0.0 || s_timeFilterEnd != 0.0; - for (int threadStressLogIndex = 0; threadStressLogIndex < s_threadStressLogCount; threadStressLogIndex++) - { - // is another thread already working on this thread stress log? - if (s_threadStressLogDesc[threadStressLogIndex].workStarted != 0 || InterlockedIncrement(&s_threadStressLogDesc[threadStressLogIndex].workStarted) != 1) - continue; - - ThreadStressLog* tsl = s_threadStressLogDesc[threadStressLogIndex].tsl; - if (!tsl->IsValid()) - continue; - if (!FilterThread(tsl)) - continue; - if (tsl->writeHasWrapped) - { - wrappedWriteThreadCount++; - } - // printf("thread: %zx\n", tsl->threadId); - void* msg = StressLog::TranslateMemoryMappedPointer(tsl->curPtr); - StressLogChunk* slc = StressLog::TranslateMemoryMappedPointer(tsl->curWriteChunk); - int chunkCount = 0; - void* prevMsg = nullptr; - while (true) - { - // printf("stress log chunk %zx\n", (size_t)slc); - if (!slc->IsValid()) - { - printf("oops, invalid stress log chunk\n"); - slc = slc->next; - if (slc == tsl->curWriteChunk) - break; - chunkCount++; - if (chunkCount >= tsl->chunkListLength) - { - printf("oops, more chunks on list than expected\n"); - break; - } - msg = nullptr; - } - assert(StressLog::TranslateMemoryMappedPointer(StressLog::TranslateMemoryMappedPointer(slc->next)->prev) == slc); - assert(StressLog::TranslateMemoryMappedPointer(StressLog::TranslateMemoryMappedPointer(slc->prev)->next) == slc); -#ifdef _DEBUG - int chunkCount1 = 0; - for (StressLogChunk* slc1 = StressLog::TranslateMemoryMappedPointer(tsl->curWriteChunk); slc1 != slc; slc1 = StressLog::TranslateMemoryMappedPointer(slc1->next)) - { - chunkCount1++; - } - if (chunkCount != chunkCount1) - { - printf("oops, we have a loop\n"); - break; - } -#endif //_DEBUG - - size_t* p = (size_t*)slc->StartPtr(); - size_t* end = (size_t*)slc->EndPtr(); - if (p <= (size_t*)msg && (size_t*)msg < end) - { - ; // fine - } - else - { - while (p < end && *p == 0) - p++; - msg = (void*)p; - } - void* endMsg = (void*)end; - while (msg < endMsg) - { - StressMsgReader msgReader(msg); - totalMsgCount++; - char* format = (char*)(hdr->moduleImage + msgReader.GetFormatOffset()); - double deltaTime = ((double)(msgReader.GetTimeStamp() - hdr->startTimeStamp)) / hdr->tickFrequency; - bool fIgnoreMessage = false; - if (fTimeFilter) - { - if (deltaTime < s_timeFilterStart) - { - // we know the times will only get smaller, so can stop here - break; - } - if (deltaTime > s_timeFilterEnd) - { - fIgnoreMessage = true; - } - } - int numberOfArgs = msgReader.GetNumberOfArgs(); - if (!fIgnoreMessage) - { - bool fIncludeMessage = s_showAllMessages || FilterMessage(hdr, tsl, msgReader.GetFacility(), format, deltaTime, numberOfArgs, msgReader.GetArgs()); - if (!fIncludeMessage && s_valueFilterCount > 0) - { - for (int i = 0; i < numberOfArgs; i++) - { - for (int j = 0; j < s_valueFilterCount; j++) - { - if (s_valueFilter[j].start <= (size_t)msgReader.GetArgs()[i] && (size_t)msgReader.GetArgs()[i] <= s_valueFilter[j].end) - { - fIncludeMessage = true; - break; - } - } - if (fIncludeMessage) - break; - } - } - if (fIncludeMessage) - { - IncludeMessage(tsl->threadId, msg); - } - } - prevMsg = msg; - msg = (StressMsg*)&msgReader.GetArgs()[numberOfArgs]; - } - if (slc == StressLog::TranslateMemoryMappedPointer(tsl->chunkListTail) && !tsl->writeHasWrapped) - break; - slc = StressLog::TranslateMemoryMappedPointer(slc->next); - if (slc == StressLog::TranslateMemoryMappedPointer(tsl->curWriteChunk)) - break; - if (s_hadGcThreadFilters && !FilterThread(tsl)) - break; - chunkCount++; - if (chunkCount >= tsl->chunkListLength) - { - printf("oops, more chunks on list than expected\n"); - break; - } - msg = nullptr; - } - s_threadStressLogDesc[threadStressLogIndex].earliestMessage = prevMsg; - s_threadStressLogDesc[threadStressLogIndex].workFinished = 1; - } - - InterlockedAdd64(&s_totalMsgCount, totalMsgCount); - InterlockedAdd64(&s_wrappedWriteThreadCount, wrappedWriteThreadCount); - - return 0; -} - -static double FindLatestTime(StressLog::StressLogHeader* hdr) -{ - double latestTime = 0.0; - for (ThreadStressLog* tsl = StressLog::TranslateMemoryMappedPointer(hdr->logs.t); tsl != nullptr; tsl = StressLog::TranslateMemoryMappedPointer(tsl->next)) - { - StressMsg* msg = StressLog::TranslateMemoryMappedPointer(tsl->curPtr); - double deltaTime = ((double)(msg->GetTimeStamp() - hdr->startTimeStamp)) / hdr->tickFrequency; - latestTime = max(latestTime, deltaTime); - } - return latestTime; -} - -static void PrintFriendlyNumber(LONGLONG n) -{ - if (n < 1000) - printf("%d", (int32_t)n); - else if (n < 1000 * 1000) - printf("%5.3f thousand", n / 1000.0); - else if (n < 1000 * 1000 * 1000) - printf("%8.6f million", n / 1000000.0); - else - printf("%11.9f billion", n / 1000000000.0); -} - -static void PrintMessage(CorClrData& corClrData, FILE *outputFile, uint64_t threadId, StressMsgReader msg) -{ - void* argBuffer[StressMsg::maxArgCnt]; - char* format = (char*)(s_hdr->moduleImage + msg.GetFormatOffset()); - int numberOfArgs = msg.GetNumberOfArgs(); - for (int i = 0; i < numberOfArgs; i++) - { - argBuffer[i] = msg.GetArgs()[i]; - } - double deltaTime = ((double)(msg.GetTimeStamp() - s_hdr->startTimeStamp)) / s_hdr->tickFrequency; - if (!s_printHexTidForGcThreads) - { - GcThread gcThread; - if (LookupGcThread(threadId, &gcThread)) - { - threadId = gcThread.heapNumber; - if (gcThread.kind == GC_THREAD_FG) - threadId |= 0x8000000000000000; - else - threadId |= 0x4000000000000000; - } - } - formatOutput(&corClrData, outputFile, format, threadId, deltaTime, msg.GetFacility(), argBuffer, s_fPrintFormatStrings); -} - -int ProcessStressLog(void* baseAddress, int argc, char* argv[]) -{ - for (int threadStressLogIndex = 0; threadStressLogIndex < s_threadStressLogCount; threadStressLogIndex++) - { - s_threadStressLogDesc[threadStressLogIndex].workStarted = 0; - s_threadStressLogDesc[threadStressLogIndex].workFinished = 0; - } - s_msgCount = 0; - s_totalMsgCount = 0; - s_timeFilterStart = 0; - s_timeFilterEnd = 0; - s_outputFileName = nullptr; - s_fPrintFormatStrings = false; - s_showAllMessages = false; - s_showDefaultMessages = true; - s_maxHeapNumberSeen = -1; - for (int i = IS_INTERESTING; i < s_interestingStringCount; i++) - { - s_interestingStringTable[i] = nullptr; - } - s_interestingStringCount = IS_INTERESTING; - s_levelFilterCount = 0; - s_gcFilterStart = 0; - s_gcFilterEnd = 0; - s_valueFilterCount = 0; - s_threadFilterCount = 0; - s_hadGcThreadFilters = false; - s_printHexTidForGcThreads = false; - s_facilityIgnore = 0; - s_printEarliestMessages = false; - s_printEarliestMessageFromThreadCount = 0; - memset(s_gcThreadFilter, 0, sizeof(s_gcThreadFilter)); - memset(&mapImageToStringId, 0, sizeof(mapImageToStringId)); - memset(s_interestingStringFilter, 0, sizeof(s_interestingStringFilter)); - memset(s_interestingStringMatchMode, 0, sizeof(s_interestingStringMatchMode)); - memset(s_printEarliestMessageFromGcThread, 0, sizeof(s_printEarliestMessageFromGcThread)); - - if (!ParseOptions(argc, argv)) - return 1; - - StressLog::StressLogHeader* hdr = (StressLog::StressLogHeader*)baseAddress; - if (hdr->headerSize != sizeof(*hdr) || - hdr->magic != *(uint32_t*)"LRTS" || - (hdr->version != 0x00010001 && - hdr->version != 0x00010002)) - { - printf("Unrecognized file format\n"); - return 1; - } - StressLog::writing_base_address = (size_t)hdr->memoryBase; - StressLog::reading_base_address = (size_t)baseAddress; - s_hdr = hdr; - - // Workaround for clang SIGKILL (exit code 137) crash. Apparently, clang does not - // like large array instantiation on R.H.S of static variable. It was reproduced on - // linux-x64 clang v6, v10 and v13. - auto temp = new StressThreadAndMsg[MAX_MESSAGE_COUNT]; - s_threadMsgBuf = temp; - - int threadStressLogIndex = 0; - double latestTime = FindLatestTime(hdr); - if (s_timeFilterStart < 0) - { - s_timeFilterStart = max(latestTime + s_timeFilterStart, 0.0); - s_timeFilterEnd = latestTime; - } - for (ThreadStressLog* tsl = StressLog::TranslateMemoryMappedPointer(hdr->logs.t); tsl != nullptr; tsl = StressLog::TranslateMemoryMappedPointer(tsl->next)) - { - if (!tsl->IsValid()) - continue; - if (!FilterThread(tsl)) - continue; - if (threadStressLogIndex >= MAX_THREADSTRESSLOGS) - { - printf("too many threads\n"); - return 1; - } - s_threadStressLogDesc[threadStressLogIndex].tsl = tsl; - threadStressLogIndex++; - } - s_threadStressLogCount = threadStressLogIndex; - s_wrappedWriteThreadCount = 0; - - SYSTEM_INFO systemInfo; - GetSystemInfo(&systemInfo); - - DWORD threadCount = min(systemInfo.dwNumberOfProcessors, (DWORD)MAXIMUM_WAIT_OBJECTS); - HANDLE threadHandle[64]; - for (DWORD i = 0; i < threadCount; i++) - { - threadHandle[i] = CreateThread(NULL, 0, ProcessStresslogWorker, nullptr, 0, nullptr); - if (threadHandle[i] == 0) - { - printf("CreateThread failed\n"); - return 1; - } - } - WaitForMultipleObjects(threadCount, threadHandle, TRUE, INFINITE); - - // the interlocked increment may have increased s_msgCount beyond MAX_MESSAGE_COUNT - - // make sure we don't go beyond the end of the buffer - s_msgCount = min((LONG64)s_msgCount, MAX_MESSAGE_COUNT); - - if (s_gcFilterStart != 0) - { - // find the time interval that includes the GCs in question - double startTime = INFINITY; - double endTime = 0.0; - for (unsigned long i = s_gcFilterStart; i <= s_gcFilterEnd; i++) - { - startTime = min(startTime, s_gcStartEnd[i].startTime); - if (s_gcStartEnd[i].endTime != 0.0) - { - endTime = max(endTime, s_gcStartEnd[i].endTime); - } - else - { - // haven't seen the end - assume it's still in progress - endTime = latestTime; - } - } - - // remove all messages outside of this time interval - int remMsgCount = 0; - for (int msgIndex = 0; msgIndex < s_msgCount; msgIndex++) - { - StressMsgReader msg = s_threadMsgBuf[msgIndex].msg; - double deltaTime = ((double)(msg.GetTimeStamp() - hdr->startTimeStamp)) / hdr->tickFrequency; - if (startTime <= deltaTime && deltaTime <= endTime) - { - s_threadMsgBuf[remMsgCount] = s_threadMsgBuf[msgIndex]; - remMsgCount++; - } - } - s_msgCount = remMsgCount; - } - - if (s_hadGcThreadFilters) - { - for (int k = GC_THREAD_FG; k <= GC_THREAD_BG; k++) - { - for (int heap = 0; heap <= s_maxHeapNumberSeen; heap++) - { - if (s_gcThreadFilter[heap][k]) - { - uint64_t threadId = s_threadIdOfHeap[heap][k]; - if (threadId != 0) - { - if (s_threadFilterCount < MAX_THREAD_FILTERS) - { - int i = s_threadFilterCount++; - s_threadFilter[i] = threadId; - } - else - { - printf("too many thread filters, max = %d\n", MAX_THREAD_FILTERS); - } - } - else - { - printf("don't know thread id for GC%d, ignoring\n", heap); - } - } - } - } - } - - if (s_threadFilterCount > 0) - { - // remove all messages from other threads - int remMsgCount = 0; - for (int msgIndex = 0; msgIndex < s_msgCount; msgIndex++) - { - uint64_t threadId = s_threadMsgBuf[msgIndex].threadId; - for (int i = 0; i < s_threadFilterCount; i++) - { - if (threadId == s_threadFilter[i]) - { - s_threadMsgBuf[remMsgCount] = s_threadMsgBuf[msgIndex]; - remMsgCount++; - break; - } - } - } - s_msgCount = remMsgCount; - } - - // if the sort becomes a bottleneck, we can do a bucket sort by time - // (say fractions of a second), then sort the individual buckets, - // perhaps on multiple threads - qsort(s_threadMsgBuf, s_msgCount, sizeof(s_threadMsgBuf[0]), CmpMsg); - - CorClrData corClrData(hdr); - FILE* outputFile = stdout; - if (s_outputFileName != nullptr) - { - if (fopen_s(&outputFile, s_outputFileName, "w") != 0) - { - printf("could not create output file %s\n", s_outputFileName); - outputFile = stdout; - } - } - - for (LONGLONG i = 0; i < s_msgCount; i++) - { - uint64_t threadId = (unsigned)s_threadMsgBuf[i].threadId; - StressMsgReader msg = s_threadMsgBuf[i].msg; - PrintMessage(corClrData, outputFile, threadId, msg); - } - - for (int k = GC_THREAD_FG; k <= GC_THREAD_BG; k++) - { - for (int heap = 0; heap <= s_maxHeapNumberSeen; heap++) - { - uint64_t threadId = s_threadIdOfHeap[heap][k]; - if (threadId != 0) - { - if (s_printEarliestMessageFromGcThread[heap][k]) - { - if (s_printEarliestMessageFromThreadCount < MAX_THREAD_FILTERS) - { - int i = s_printEarliestMessageFromThreadCount++; - s_printEarliestMessageFromThread[i] = threadId; - } - else - { - printf("too many threads, max = %d\n", MAX_THREAD_FILTERS); - } - } - } - else - { - printf("don't know thread id for GC%d, ignoring\n", heap); - } - } - } - - if (s_printEarliestMessages || s_printEarliestMessageFromThreadCount > 0) - { - fprintf(outputFile, "\nEarliestMessages:\n"); - LONGLONG earliestStartCount = s_msgCount; - for (int threadStressLogIndex = 0; threadStressLogIndex < s_threadStressLogCount; threadStressLogIndex++) - { - StressMsgReader msg = s_threadStressLogDesc[threadStressLogIndex].earliestMessage; - if (msg == nullptr) - continue; - bool fIncludeMessage = s_printEarliestMessages; - uint64_t threadId = s_threadStressLogDesc[threadStressLogIndex].tsl->threadId; - if (!fIncludeMessage) - { - for (int i = 0; i < s_printEarliestMessageFromThreadCount; i++) - { - if (threadId == s_printEarliestMessageFromThread[i]) - { - fIncludeMessage = true; - break; - } - } - } - if (fIncludeMessage) - { - IncludeMessage(threadId, msg); - } - } - qsort(&s_threadMsgBuf[earliestStartCount], s_msgCount - earliestStartCount, sizeof(s_threadMsgBuf[0]), CmpMsg); - for (LONGLONG i = earliestStartCount; i < s_msgCount; i++) - { - uint64_t threadId = (unsigned)s_threadMsgBuf[i].threadId; - StressMsgReader msg = s_threadMsgBuf[i].msg; - PrintMessage(corClrData, outputFile, threadId, msg); - } - } - - if (outputFile != stdout) - fclose(outputFile); - - ptrdiff_t usedSize = hdr->memoryCur - hdr->memoryBase; - ptrdiff_t availSize = hdr->memoryLimit - hdr->memoryCur; - printf("Used file size: %6.3f GB, still available: %6.3f GB, %d threads total, %d overwrote earlier messages\n", - (double)usedSize / (1024 * 1024 * 1024), (double)availSize/ (1024 * 1024 * 1024), - s_threadStressLogCount, (int)s_wrappedWriteThreadCount); - if (hdr->threadsWithNoLog != 0) - printf("%u threads did not get a log!\n", hdr->threadsWithNoLog); - printf("Number of messages examined: "); PrintFriendlyNumber(s_totalMsgCount); printf(", printed: "); PrintFriendlyNumber(s_msgCount); printf("\n"); - - delete[] s_threadMsgBuf; - - return 0; -} diff --git a/src/coreclr/tools/StressLogAnalyzer/StressMsgReader.h b/src/coreclr/tools/StressLogAnalyzer/StressMsgReader.h deleted file mode 100644 index 2d5bfe70e439b1..00000000000000 --- a/src/coreclr/tools/StressLogAnalyzer/StressMsgReader.h +++ /dev/null @@ -1,80 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -#include - -extern StressLog::StressLogHeader* s_hdr; - -// A version-aware reader for memory-mapped stress log messages. -struct StressMsgReader -{ -private: - struct StressMsgSmallOffset - { - uint32_t numberOfArgsLow : 3; // at most 7 arguments here - uint32_t formatOffset : 26; // low bits offset of format string in modules - uint32_t numberOfArgsHigh : 3; // extend number of args in a backward compat way - uint32_t facility; // facility used to log the entry - uint64_t timeStamp; // time when mssg was logged - void* args[0]; // variable number of arguments - }; - - void* m_rawMsg; -public: - StressMsgReader() = default; - - StressMsgReader(void* msg) - :m_rawMsg(msg) - { - } - - uint64_t GetFormatOffset() const - { - if (s_hdr->version == 0x00010001) - { - return ((StressMsgSmallOffset*)m_rawMsg)->formatOffset; - } - return ((StressMsg*)m_rawMsg)->GetFormatOffset(); - } - - uint32_t GetNumberOfArgs() const - { - if (s_hdr->version == 0x00010001) - { - return ((StressMsgSmallOffset*)m_rawMsg)->numberOfArgsHigh << 3 | ((StressMsgSmallOffset*)m_rawMsg)->numberOfArgsLow; - } - return ((StressMsg*)m_rawMsg)->GetNumberOfArgs(); - } - - uint32_t GetFacility() const - { - if (s_hdr->version == 0x00010001) - { - return ((StressMsgSmallOffset*)m_rawMsg)->facility; - } - return ((StressMsg*)m_rawMsg)->GetFacility(); - } - - uint64_t GetTimeStamp() const - { - if (s_hdr->version == 0x00010001) - { - return ((StressMsgSmallOffset*)m_rawMsg)->timeStamp; - } - return ((StressMsg*)m_rawMsg)->GetTimeStamp(); - } - - void** GetArgs() const - { - if (s_hdr->version == 0x00010001) - { - return ((StressMsgSmallOffset*)m_rawMsg)->args; - } - return ((StressMsg*)m_rawMsg)->args; - } - - bool operator==(std::nullptr_t) const - { - return m_rawMsg == nullptr; - } -}; diff --git a/src/coreclr/tools/StressLogAnalyzer/staticcontract.h b/src/coreclr/tools/StressLogAnalyzer/staticcontract.h deleted file mode 100644 index d3ef6a4ab9bc48..00000000000000 --- a/src/coreclr/tools/StressLogAnalyzer/staticcontract.h +++ /dev/null @@ -1,9 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -#ifndef _ASSERTE -#define _ASSERTE(a) -#endif - -#define STATIC_CONTRACT_LEAF -#define STATIC_CONTRACT_WRAPPER diff --git a/src/coreclr/tools/StressLogAnalyzer/strike.h b/src/coreclr/tools/StressLogAnalyzer/strike.h deleted file mode 100644 index 846f780bbc67c5..00000000000000 --- a/src/coreclr/tools/StressLogAnalyzer/strike.h +++ /dev/null @@ -1,63 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -#include -#include -#include - -typedef void* TADDR; -extern BOOL g_bDacBroken; - -#define IsMethodDesc(m) FALSE -#define IsMethodTable(mt) FALSE -#define IsInterrupt() FALSE - -#define NameForMT_s(a,b,c) -#define DEBUG_OUTPUT_NORMAL 0x00000001 - -extern char g_mdName[1]; - -struct SOS -{ - HRESULT GetMethodDescName(DWORD_PTR arg, size_t bufferSize, WCHAR* buffer, void*) - { - return S_FALSE; - } -}; - -extern SOS* g_sos; - -#define TO_CDADDR(a) a -#define UL64_TO_CDA(a) ((void*)a) -#define SOS_PTR(a) a -#define TO_TADDR(a) ((char *)a) - -struct SYMBOLS -{ - HRESULT GetNameByOffset(DWORD_PTR arg, char *buffer, size_t bufferSize, void*, ULONG64 *displacement) - { - return S_FALSE; - } -}; - -extern SYMBOLS* g_ExtSymbols; - -typedef void* CLRDATA_ADDRESS; - -struct DacpMethodDescData -{ - int whatever; - void Request(void*, CLRDATA_ADDRESS a) - { - } -}; - -struct IDebugDataSpaces -{ - virtual HRESULT ReadVirtual(void* src, void* dest, size_t size, int) = 0; -}; - -HRESULT OutputVaList(ULONG mask, PCSTR format, va_list args); -void ExtOut(PCSTR format, ...); -#define ___in -void formatOutput(struct IDebugDataSpaces* memCallBack, ___in FILE* file, __inout __inout_z char* format, uint64_t threadId, double timeStamp, DWORD_PTR facility, ___in void** args, bool fPrintFormatString = false); diff --git a/src/coreclr/tools/StressLogAnalyzer/util.h b/src/coreclr/tools/StressLogAnalyzer/util.h deleted file mode 100644 index 752509277a7701..00000000000000 --- a/src/coreclr/tools/StressLogAnalyzer/util.h +++ /dev/null @@ -1,158 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -template -struct Volatile -{ - T t; - T Load() { return t; } -}; - -typedef void* CRITSEC_COOKIE; - -#define STRESS_LOG_ANALYZER - -#include "staticcontract.h" - -// This macro is used to standardize the wide character string literals between UNIX and Windows. -// Unix L"" is UTF32, and on windows it's UTF16. Because of built-in assumptions on the size -// of string literals, it's important to match behaviour between Unix and Windows. Unix will be defined -// as u"" (char16_t) -#ifdef TARGET_UNIX -#define W(str) u##str -#else // TARGET_UNIX -#define W(str) L##str -#endif // TARGET_UNIX - -//***************************************************************************** -// -// **** CQuickBytes -// This helper class is useful for cases where 90% of the time you allocate 512 -// or less bytes for a data structure. This class contains a 512 byte buffer. -// Alloc() will return a pointer to this buffer if your allocation is small -// enough, otherwise it asks the heap for a larger buffer which is freed for -// you. No mutex locking is required for the small allocation case, making the -// code run faster, less heap fragmentation, etc... Each instance will allocate -// 520 bytes, so use accordinly. -// -//***************************************************************************** -template -class CQuickBytesBase -{ -public: - CQuickBytesBase() : - pbBuff(0), - iSize(0), - cbTotal(SIZE) - { } - - void Destroy() - { - if (pbBuff) - { - delete[](BYTE*)pbBuff; - pbBuff = 0; - } - } - - void* Alloc(SIZE_T iItems) - { - iSize = iItems; - if (iItems <= SIZE) - { - cbTotal = SIZE; - return (&rgData[0]); - } - else - { - if (pbBuff) - delete[](BYTE*)pbBuff; - pbBuff = new BYTE[iItems]; - cbTotal = pbBuff ? iItems : 0; - return (pbBuff); - } - } - - // This is for conformity to the CQuickBytesBase that is defined by the runtime so - // that we can use it inside of some GC code that SOS seems to include as well. - // - // The plain vanilla "Alloc" version on this CQuickBytesBase doesn't throw either, - // so we'll just forward the call. - void* AllocNoThrow(SIZE_T iItems) - { - return Alloc(iItems); - } - - HRESULT ReSize(SIZE_T iItems) - { - void* pbBuffNew; - if (iItems <= cbTotal) - { - iSize = iItems; - return NOERROR; - } - - pbBuffNew = new BYTE[iItems + INCREMENT]; - if (!pbBuffNew) - return E_OUTOFMEMORY; - if (pbBuff) - { - memcpy(pbBuffNew, pbBuff, cbTotal); - delete[](BYTE*)pbBuff; - } - else - { - _ASSERTE(cbTotal == SIZE); - memcpy(pbBuffNew, rgData, SIZE); - } - cbTotal = iItems + INCREMENT; - iSize = iItems; - pbBuff = pbBuffNew; - return NOERROR; - - } - - operator PVOID() - { - return ((pbBuff) ? pbBuff : &rgData[0]); - } - - void* Ptr() - { - return ((pbBuff) ? pbBuff : &rgData[0]); - } - - SIZE_T Size() - { - return (iSize); - } - - SIZE_T MaxSize() - { - return (cbTotal); - } - - void* pbBuff; - SIZE_T iSize; // number of bytes used - SIZE_T cbTotal; // total bytes allocated in the buffer - // use UINT64 to enforce the alignment of the memory - UINT64 rgData[(SIZE + sizeof(UINT64) - 1) / sizeof(UINT64)]; -}; - -#define CQUICKBYTES_BASE_SIZE 512 -#define CQUICKBYTES_INCREMENTAL_SIZE 128 - -class CQuickBytesNoDtor : public CQuickBytesBase -{ -}; - -class CQuickBytes : public CQuickBytesNoDtor -{ -public: - CQuickBytes() { } - - ~CQuickBytes() - { - Destroy(); - } -}; diff --git a/src/coreclr/tools/cdac-build-tool/ObjectFileScraper.cs b/src/coreclr/tools/cdac-build-tool/ObjectFileScraper.cs index 42b0b004c8980a..24e7e2827d457b 100644 --- a/src/coreclr/tools/cdac-build-tool/ObjectFileScraper.cs +++ b/src/coreclr/tools/cdac-build-tool/ObjectFileScraper.cs @@ -387,6 +387,10 @@ private Content ReadContent(ScraperState state, HeaderDirectory header) state.ReadBytes(endMagic.AsSpan()); if (!CheckEndMagic(endMagic)) { + if (endMagic.All(b => b == 0)) + { + throw new InvalidOperationException("expected endMagic, got all zeros. Did you add something to the data descriptor that can't be initialized at compile time?"); + } throw new InvalidOperationException($"expected endMagic, got 0x{endMagic[0]:x} 0x{endMagic[1]:x} 0x{endMagic[2]:x} 0x{endMagic[3]:x}"); } else diff --git a/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Abstractions/Contracts/IStressLog.cs b/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Abstractions/Contracts/IStressLog.cs new file mode 100644 index 00000000000000..ddb87231c7af36 --- /dev/null +++ b/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Abstractions/Contracts/IStressLog.cs @@ -0,0 +1,48 @@ +// 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.Collections.Generic; + +namespace Microsoft.Diagnostics.DataContractReader.Contracts; + +public record struct StressLogData( + uint LoggedFacilities, + uint Level, + uint MaxSizePerThread, + uint MaxSizeTotal, + int TotalChunks, + ulong TickFrequency, + ulong StartTimestamp, + TargetPointer Logs); + +public record struct ThreadStressLogData( + TargetPointer NextPointer, + ulong ThreadId, + bool WriteHasWrapped, + TargetPointer CurrentPointer, + TargetPointer ChunkListHead, + TargetPointer ChunkListTail, + TargetPointer CurrentWriteChunk); + +public record struct StressMsgData( + uint Facility, + TargetPointer FormatString, + ulong Timestamp, + IReadOnlyList Args); + +public interface IStressLog : IContract +{ + static string IContract.Name { get; } = nameof(StressLog); + public virtual bool HasStressLog() => throw new NotImplementedException(); + public virtual StressLogData GetStressLogData() => throw new NotImplementedException(); + public virtual StressLogData GetStressLogData(TargetPointer stressLog) => throw new NotImplementedException(); + public virtual IEnumerable GetThreadStressLogs(TargetPointer Logs) => throw new NotImplementedException(); + public virtual IEnumerable GetStressMessages(ThreadStressLogData threadLog) => throw new NotImplementedException(); + public virtual bool IsPointerInStressLog(StressLogData stressLog, TargetPointer pointer) => throw new NotImplementedException(); +} + +public readonly struct StressLog : IStressLog +{ + // Everything throws NotImplementedException +} diff --git a/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Abstractions/DataType.cs b/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Abstractions/DataType.cs index 8ea30a324bfaee..09a8a5996843aa 100644 --- a/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Abstractions/DataType.cs +++ b/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Abstractions/DataType.cs @@ -41,6 +41,13 @@ public enum DataType TypeVarTypeDesc, FnPtrTypeDesc, DynamicMetadata, + StressLog, + StressLogModuleDesc, + StressLogHeader, + ThreadStressLog, + StressLogChunk, + StressMsg, + StressMsgHeader, Object, String, MethodDesc, diff --git a/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Constants.cs b/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Constants.cs index c93e3620c9771e..0e76ef91d7de39 100644 --- a/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Constants.cs +++ b/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Constants.cs @@ -28,6 +28,16 @@ public static class Globals public const string MiniMetaDataBuffAddress = nameof(MiniMetaDataBuffAddress); public const string MiniMetaDataBuffMaxSize = nameof(MiniMetaDataBuffMaxSize); + public const string StressLogEnabled = nameof(StressLogEnabled); + public const string StressLogHasModuleTable = nameof(StressLogHasModuleTable); + public const string StressLog = nameof(StressLog); + public const string StressLogModuleTable = nameof(StressLogModuleTable); + public const string StressLogMaxModules = nameof(StressLogMaxModules); + public const string StressLogChunkMaxSize = nameof(StressLogChunkMaxSize); + public const string StressLogMaxMessageSize = nameof(StressLogMaxMessageSize); + public const string StressLogChunkSize = nameof(StressLogChunkSize); + public const string StressLogValidChunkSig = nameof(StressLogValidChunkSig); + public const string MethodDescAlignment = nameof(MethodDescAlignment); public const string ObjectHeaderSize = nameof(ObjectHeaderSize); public const string SyncBlockValueToObjectOffset = nameof(SyncBlockValueToObjectOffset); diff --git a/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/StressLog.cs b/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/StressLog.cs new file mode 100644 index 00000000000000..5d4885dca2fc79 --- /dev/null +++ b/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/StressLog.cs @@ -0,0 +1,361 @@ +// 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.Collections.Generic; +using System.Diagnostics; +using System.Text; +using System.Globalization; +using System.Numerics; + +namespace Microsoft.Diagnostics.DataContractReader.Contracts; + +public sealed class StressLogFactory : IContractFactory +{ + public IStressLog CreateContract(Target target, int version) + { + return version switch + { + 1 => new StressLog_1(target), + 2 => new StressLog_2(target), + _ => default(StressLog), + }; + } +} + +file interface IStressMessageReader +{ + StressMsgData GetStressMsgData(Data.StressMsg msg, Func getFormatPointerFromOffset); +} + +file sealed class StressLogTraversal(Target target, IStressMessageReader messageReader) +{ + private bool StressLogChunkValid(Data.StressLogChunk chunk) + { + uint validSig = target.ReadGlobal(Constants.Globals.StressLogValidChunkSig); + return chunk.Sig1 == validSig && chunk.Sig2 == validSig; + } + + public bool HasStressLog() => target.ReadGlobal(Constants.Globals.StressLogEnabled) != 0; + + public StressLogData GetStressLogData() + { + if (!HasStressLog()) + { + return default; + } + + return GetStressLogData(target.ReadGlobalPointer(Constants.Globals.StressLog)); + } + + public StressLogData GetStressLogData(TargetPointer stressLogPointer) + { + Data.StressLog stressLog = target.ProcessedData.GetOrAdd(stressLogPointer); + return new StressLogData( + stressLog.LoggedFacilities, + stressLog.Level, + stressLog.MaxSizePerThread, + stressLog.MaxSizeTotal, + stressLog.TotalChunks, + stressLog.TickFrequency, + stressLog.StartTimestamp, + stressLog.Logs); + } + + public IEnumerable GetThreadStressLogs(TargetPointer Logs) + { + TargetPointer currentPointer = Logs; + while (currentPointer != TargetPointer.Null) + { + Data.ThreadStressLog threadStressLog = target.ProcessedData.GetOrAdd(currentPointer); + + if (threadStressLog.ChunkListHead == TargetPointer.Null) + { + // If the chunk list head is null, this thread log isn't valid. + currentPointer = threadStressLog.Next; + continue; + } + + if (threadStressLog.CurrentWriteChunk == TargetPointer.Null) + { + // If the current write chunk is null, this thread log isn't valid. + currentPointer = threadStressLog.Next; + continue; + } + + Data.StressLogChunk currentChunkData = target.ProcessedData.GetOrAdd(threadStressLog.CurrentWriteChunk); + if (!StressLogChunkValid(currentChunkData)) + { + // If the current write chunk isn't valid, this thread log isn't valid. + currentPointer = threadStressLog.Next; + continue; + } + + yield return new ThreadStressLogData( + threadStressLog.Next, + threadStressLog.ThreadId, + threadStressLog.WriteHasWrapped, + threadStressLog.CurrentPtr, + threadStressLog.ChunkListHead, + threadStressLog.ChunkListTail, + threadStressLog.CurrentWriteChunk); + + currentPointer = threadStressLog.Next; + } + } + + private TargetPointer GetFormatPointer(ulong formatOffset) + { + if (target.ReadGlobal(Constants.Globals.StressLogHasModuleTable) == 0) + { + Data.StressLog stressLog = target.ProcessedData.GetOrAdd(target.ReadGlobalPointer(Constants.Globals.StressLog)); + return new TargetPointer(stressLog.ModuleOffset.Value + formatOffset); + } + + TargetPointer moduleTable = target.ReadGlobalPointer(Constants.Globals.StressLogModuleTable); + uint moduleEntrySize = target.GetTypeInfo(DataType.StressLogModuleDesc).Size!.Value; + uint maxModules = target.ReadGlobal(Constants.Globals.StressLogMaxModules); + ulong cumulativeOffset = 0; + for (uint i = 0; i < maxModules; ++i) + { + Data.StressLogModuleDesc module = target.ProcessedData.GetOrAdd(moduleTable + i * moduleEntrySize); + ulong relativeOffset = formatOffset - cumulativeOffset; + if (relativeOffset < module.Size.Value) + { + return new TargetPointer((ulong)module.BaseAddress + relativeOffset); + } + cumulativeOffset += module.Size.Value; + } + + return TargetPointer.Null; + } + + public IEnumerable GetStressMessages(ThreadStressLogData threadLog) + { + uint stressMsgHeaderSize = target.GetTypeInfo(DataType.StressMsgHeader).Size!.Value; + uint pointerSize = (uint)target.PointerSize; + + Data.StressLogChunk currentChunkData = target.ProcessedData.GetOrAdd(threadLog.CurrentWriteChunk); + TargetPointer currentReadChunk = threadLog.CurrentWriteChunk; + TargetPointer readPointer = threadLog.CurrentPointer; + bool readHasWrapped = false; + uint chunkSize = target.ReadGlobal(Constants.Globals.StressLogChunkSize); + + TargetPointer currentPointer = threadLog.CurrentPointer; + // the last written log, if it wrapped around may have partially overwritten + // a previous record. Update currentPointer to reflect the last safe beginning of a record, + // but currentPointer shouldn't wrap around, otherwise it'll break our assumptions about stress + // log + currentPointer = new TargetPointer((ulong)currentPointer - target.ReadGlobal(Constants.Globals.StressLogMaxMessageSize)); + if (currentPointer.Value < currentChunkData.Buf.Value) + { + currentPointer = currentChunkData.Buf; + } + + while (true) + { + if (readPointer.Value >= currentChunkData.Buf.Value + chunkSize) + { + if (currentReadChunk == threadLog.ChunkListTail) + { + if (!threadLog.WriteHasWrapped) + { + // If we wrapped around and writing never wrapped, + // we've read the whole log. + break; + } + readHasWrapped = true; + } + + do + { + currentReadChunk = currentChunkData.Next; + currentChunkData = target.ProcessedData.GetOrAdd(currentReadChunk); + } while (!StressLogChunkValid(currentChunkData)); + + TargetPointer p = currentChunkData.Buf; + // StressLog writes variable-sized payloads starting from the end of a chunk. + // Chunks are zero-initialized, so advance until we find any data, + // ensuring we don't advance more than a full message. + while (target.ReadPointer(p) == TargetPointer.Null + && p - currentChunkData.Buf < target.ReadGlobal(Constants.Globals.StressLogMaxMessageSize)) + { + p = new TargetPointer((ulong)p + pointerSize); + } + + if (target.ReadPointer(p) == TargetPointer.Null) + { + // If we didn't find a message before we read a whole message size, + // we're done. + // This can occur when the chunk was allocated, but no messages were written before dumping the log. + break; + } + + // If we found a non-null value, then that's the start of the first message of the chunk. + readPointer = p; + } + + // Check if we've read all messages in this thread log. + if (readHasWrapped + && currentReadChunk == threadLog.CurrentWriteChunk + && readPointer > currentPointer) + { + // We've read all of the entries in the log, + // wrapped to the start of the chunk list, + // and read up to the current write pointer. + // So we've read all messages. + break; + } + + // Read the message and return it to the caller. + Data.StressMsg message = target.ProcessedData.GetOrAdd(readPointer); + StressMsgData parsedMessage = messageReader.GetStressMsgData(message, GetFormatPointer); + yield return parsedMessage; + + // Advance the read pointer + // We'll check if we passed the end of the chunk at the start of the loop. + readPointer = new TargetPointer((ulong)readPointer + stressMsgHeaderSize + pointerSize * (uint)parsedMessage.Args.Count); + } + } + + public bool IsPointerInStressLog(StressLogData stressLog, TargetPointer pointer) + { + ulong chunkSize = target.GetTypeInfo(DataType.StressLogChunk).Size!.Value; + StressLogMemory stressLogMemory = target.ProcessedData.GetOrAdd(stressLog.Logs); + foreach (TargetPointer chunk in stressLogMemory.Chunks) + { + if (pointer >= chunk && pointer < chunk + chunkSize) + { + return true; + } + } + + return false; + } + + private sealed class StressLogMemory(IReadOnlyList chunks) : Data.IData + { + public static StressLogMemory Create(Target target, TargetPointer address) + { + List chunks = []; + // Do a simple traversal of the thread stress log list. + while (address != TargetPointer.Null) + { + Data.ThreadStressLog threadLog = target.ProcessedData.GetOrAdd(address); + TargetPointer chunkPtr = threadLog.ChunkListHead; + + if (chunkPtr == TargetPointer.Null) + { + address = threadLog.Next; + continue; + } + + do + { + // Record each chunk in the stress log. + chunks.Add(chunkPtr); + Data.StressLogChunk chunk = target.ProcessedData.GetOrAdd(chunkPtr); + chunkPtr = chunk.Next; + } while (chunkPtr != TargetPointer.Null && chunkPtr != threadLog.ChunkListHead); + + address = threadLog.Next; + } + + return new StressLogMemory(chunks); + } + + public IReadOnlyList Chunks { get; } = chunks; + } +} + +file sealed class SmallStressMessageReader(Target target) : IStressMessageReader +{ + public StressMsgData GetStressMsgData(Data.StressMsg msg, Func getFormatPointerFromOffset) + { + // Message header layout: + // struct + // { + // uint32_t numberOfArgsLow : 3; + // uint32_t formatOffset : 26; + // uint32_t numberOfArgsHigh : 3; + // uint32_t facility; + // uint64_t timeStamp; + // }; + uint pointerSize = (uint)target.PointerSize; + uint payload = target.Read(msg.Header); + int numArgs = (int)((payload & 0x7) | ((payload >> 29) & 0x7)); + var args = new TargetPointer[numArgs]; + for (int i = 0; i < numArgs; i++) + { + args[i] = target.ReadPointer((ulong)msg.Args + (ulong)(i * pointerSize)); + } + + return new StressMsgData( + Facility: target.Read((ulong)msg.Header + 4), + FormatString: getFormatPointerFromOffset(((payload >> 3) & ((1 << 26) - 1))), + Timestamp: target.Read((ulong)msg.Header + 8), + Args: args); + } +} + +file sealed class LargeStressMessageReader(Target target) : IStressMessageReader +{ + public StressMsgData GetStressMsgData(Data.StressMsg msg, Func getFormatPointerFromOffset) + { + // Message header layout: + // struct + // { + // static const size_t formatOffsetLowBits = 26; + // static const size_t formatOffsetHighBits = 13; + // + // uint64_t facility: 32; + // uint64_t numberOfArgs : 6; + // uint64_t formatOffsetLow: formatOffsetLowBits; + // uint64_t formatOffsetHigh: formatOffsetHighBits; + // uint64_t timeStamp: 51; + // }; + + uint pointerSize = (uint)target.PointerSize; + + ulong payload1 = target.Read(msg.Header); + ulong payload2 = target.Read((ulong)msg.Header + 8); + int numArgs = (int)((payload1 >> 32) & ((1 << 6) - 1)); + var args = new TargetPointer[numArgs]; + for (int i = 0; i < numArgs; i++) + { + args[i] = target.ReadPointer((ulong)msg.Args + (ulong)(i * pointerSize)); + } + ulong formatOffset = ((payload1 >> 38) & ((1 << 26) - 1)) | ((payload2 & ((1ul << 13) - 1)) << 26); + + return new StressMsgData( + Facility: (uint)payload1, + FormatString: getFormatPointerFromOffset(formatOffset), + Timestamp: payload2 >> 13, + Args: args); + } +} + +file sealed class StressLog_1(Target target) : IStressLog +{ + private readonly StressLogTraversal traversal = new(target, new SmallStressMessageReader(target)); + + public bool HasStressLog() => traversal.HasStressLog(); + public StressLogData GetStressLogData() => traversal.GetStressLogData(); + public StressLogData GetStressLogData(TargetPointer stressLog) => traversal.GetStressLogData(stressLog); + public IEnumerable GetThreadStressLogs(TargetPointer Logs) => traversal.GetThreadStressLogs(Logs); + public IEnumerable GetStressMessages(ThreadStressLogData threadLog) => traversal.GetStressMessages(threadLog); + public bool IsPointerInStressLog(StressLogData stressLog, TargetPointer pointer) => traversal.IsPointerInStressLog(stressLog, pointer); +} + + +file sealed class StressLog_2(Target target) : IStressLog +{ + private readonly StressLogTraversal traversal = new(target, new LargeStressMessageReader(target)); + + public bool HasStressLog() => traversal.HasStressLog(); + public StressLogData GetStressLogData() => traversal.GetStressLogData(); + public StressLogData GetStressLogData(TargetPointer stressLog) => traversal.GetStressLogData(stressLog); + public IEnumerable GetThreadStressLogs(TargetPointer Logs) => traversal.GetThreadStressLogs(Logs); + public IEnumerable GetStressMessages(ThreadStressLogData threadLog) => traversal.GetStressMessages(threadLog); + public bool IsPointerInStressLog(StressLogData stressLog, TargetPointer pointer) => traversal.IsPointerInStressLog(stressLog, pointer); +} diff --git a/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Data/StressLog.cs b/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Data/StressLog.cs new file mode 100644 index 00000000000000..71f4c3ca20f5ac --- /dev/null +++ b/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Data/StressLog.cs @@ -0,0 +1,46 @@ +// 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.Generic; + +namespace Microsoft.Diagnostics.DataContractReader.Data; + +internal sealed class StressLog : IData +{ + static StressLog IData.Create(Target target, TargetPointer address) + => new StressLog(target, address); + + public StressLog(Target target, TargetPointer address) + { + Target.TypeInfo type = target.GetTypeInfo(DataType.StressLog); + + LoggedFacilities = target.Read(address + (ulong)type.Fields[nameof(LoggedFacilities)].Offset); + Level = target.Read(address + (ulong)type.Fields[nameof(Level)].Offset); + MaxSizePerThread = target.Read(address + (ulong)type.Fields[nameof(MaxSizePerThread)].Offset); + MaxSizeTotal = target.Read(address + (ulong)type.Fields[nameof(MaxSizeTotal)].Offset); + TotalChunks = target.Read(address + (ulong)type.Fields[nameof(TotalChunks)].Offset); + TickFrequency = target.Read(address + (ulong)type.Fields[nameof(TickFrequency)].Offset); + StartTimestamp = target.Read(address + (ulong)type.Fields[nameof(StartTimestamp)].Offset); + ModuleOffset = target.ReadNUInt(address + (ulong)type.Fields[nameof(ModuleOffset)].Offset); + + Logs = target.ReadPointer(address + (ulong)type.Fields[nameof(Logs)].Offset); + } + + public uint LoggedFacilities { get; init; } + + public uint Level { get; init; } + + public uint MaxSizePerThread { get; init; } + + public uint MaxSizeTotal { get; init; } + + public int TotalChunks { get; init; } + + public ulong TickFrequency { get; init; } + + public ulong StartTimestamp { get; init; } + + public TargetNUInt ModuleOffset { get; init; } + + public TargetPointer Logs { get; init; } +} diff --git a/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Data/StressLogChunk.cs b/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Data/StressLogChunk.cs new file mode 100644 index 00000000000000..fed0e5ba3c0c7b --- /dev/null +++ b/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Data/StressLogChunk.cs @@ -0,0 +1,29 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +namespace Microsoft.Diagnostics.DataContractReader.Data; + +internal sealed class StressLogChunk : IData +{ + static StressLogChunk IData.Create(Target target, TargetPointer address) + => new StressLogChunk(target, address); + + public StressLogChunk(Target target, TargetPointer address) + { + Target.TypeInfo type = target.GetTypeInfo(DataType.StressLogChunk); + + Next = target.ReadPointer(address + (ulong)type.Fields[nameof(Next)].Offset); + Prev = target.ReadPointer(address + (ulong)type.Fields[nameof(Prev)].Offset); + Buf = new TargetPointer(address + (ulong)type.Fields[nameof(Buf)].Offset); + BufSize = target.ReadGlobal(Constants.Globals.StressLogChunkSize); + Sig1 = target.Read(address + (ulong)type.Fields[nameof(Sig1)].Offset); + Sig2 = target.Read(address + (ulong)type.Fields[nameof(Sig2)].Offset); + } + + public TargetPointer Next { get; init; } + public TargetPointer Prev { get; init; } + public TargetPointer Buf { get; init; } + public uint BufSize { get; init; } + public uint Sig1 { get; init; } + public uint Sig2 { get; init; } +} diff --git a/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Data/StressLogModuleDesc.cs b/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Data/StressLogModuleDesc.cs new file mode 100644 index 00000000000000..06a9fdc8be2173 --- /dev/null +++ b/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Data/StressLogModuleDesc.cs @@ -0,0 +1,22 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +namespace Microsoft.Diagnostics.DataContractReader.Data; + +internal sealed class StressLogModuleDesc : IData +{ + static StressLogModuleDesc IData.Create(Target target, TargetPointer address) + => new StressLogModuleDesc(target, address); + + public StressLogModuleDesc(Target target, TargetPointer address) + { + Target.TypeInfo type = target.GetTypeInfo(DataType.StressLogModuleDesc); + + BaseAddress = target.ReadPointer(address + (ulong)type.Fields[nameof(BaseAddress)].Offset); + Size = target.ReadNUInt(address + (ulong)type.Fields[nameof(Size)].Offset); + } + + public TargetPointer BaseAddress { get; init; } + + public TargetNUInt Size { get; init; } +} diff --git a/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Data/StressMsg.cs b/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Data/StressMsg.cs new file mode 100644 index 00000000000000..e70118a055a33d --- /dev/null +++ b/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Data/StressMsg.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 System; +using System.Collections.Generic; +using System.Diagnostics; + +namespace Microsoft.Diagnostics.DataContractReader.Data; + +internal sealed class StressMsg : IData +{ + static StressMsg IData.Create(Target target, TargetPointer address) + => new StressMsg(target, address); + + public StressMsg(Target target, TargetPointer address) + { + Target.TypeInfo type = target.GetTypeInfo(DataType.StressMsg); + + Header = address + (ulong)type.Fields[nameof(Header)].Offset; + Args = address + (ulong)type.Fields[nameof(Args)].Offset; + } + + public TargetPointer Header { get; init; } + public TargetPointer Args { get; init; } +} diff --git a/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Data/ThreadStressLog.cs b/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Data/ThreadStressLog.cs new file mode 100644 index 00000000000000..4c01c4d527e345 --- /dev/null +++ b/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Data/ThreadStressLog.cs @@ -0,0 +1,31 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +namespace Microsoft.Diagnostics.DataContractReader.Data; + +internal sealed class ThreadStressLog : IData +{ + static ThreadStressLog IData.Create(Target target, TargetPointer address) + => new ThreadStressLog(target, address); + + public ThreadStressLog(Target target, TargetPointer address) + { + Target.TypeInfo type = target.GetTypeInfo(DataType.ThreadStressLog); + + Next = target.ReadPointer(address + (ulong)type.Fields[nameof(Next)].Offset); + ThreadId = target.Read(address + (ulong)type.Fields[nameof(ThreadId)].Offset); + WriteHasWrapped = target.Read(address + (ulong)type.Fields[nameof(WriteHasWrapped)].Offset) != 0; + CurrentPtr = target.ReadPointer(address + (ulong)type.Fields[nameof(CurrentPtr)].Offset); + ChunkListHead = target.ReadPointer(address + (ulong)type.Fields[nameof(ChunkListHead)].Offset); + ChunkListTail = target.ReadPointer(address + (ulong)type.Fields[nameof(ChunkListTail)].Offset); + CurrentWriteChunk = target.ReadPointer(address + (ulong)type.Fields[nameof(CurrentWriteChunk)].Offset); + } + + public TargetPointer Next { get; init; } + public ulong ThreadId { get; init; } + public bool WriteHasWrapped { get; init; } + public TargetPointer CurrentPtr { get; init; } + public TargetPointer ChunkListHead { get; init; } + public TargetPointer ChunkListTail { get; init; } + public TargetPointer CurrentWriteChunk { get; init; } +} diff --git a/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/PrintfStressMessageFormatter.cs b/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/PrintfStressMessageFormatter.cs new file mode 100644 index 00000000000000..377a1f093b787d --- /dev/null +++ b/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/PrintfStressMessageFormatter.cs @@ -0,0 +1,331 @@ +// 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.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.Numerics; +using System.Text; +using Microsoft.Diagnostics.DataContractReader; +using Microsoft.Diagnostics.DataContractReader.Contracts; + +namespace Microsoft.Diagnostics.DataContractReader; + +public sealed class PrintfStressMessageFormatter +{ + public interface ISpecialPointerFormatter + { + string FormatMethodTable(TargetPointer pointer); + string FormatMethodDesc(TargetPointer pointer); + string FormatVTable(TargetPointer pointer); + string FormatStackTrace(TargetPointer pointer); + } + + private record struct PaddingFormat(int Width, char FormatChar, int Precision = 6); + + private readonly Target _target; + private readonly ISpecialPointerFormatter _pointerFormatter; + private readonly Dictionary> _formatActions; + private readonly Dictionary> _alternateActions; + + public PrintfStressMessageFormatter(Target target, ISpecialPointerFormatter pointerFormatter) + { + _target = target; + _pointerFormatter = pointerFormatter; + _formatActions = new() + { + { "pM", FormatMethodDesc }, + { "pT", FormatMethodTable }, + { "pV", FormatVTable }, + { "pK", FormatStackTrace }, + { "s", FormatAsciiString }, + { "hs", FormatAsciiString }, + { "S", FormatUtf16String }, + { "ls", FormatUtf16String }, + { "p", FormatPointer }, + { "f", FormatFloatingPoint }, + { "d", (ptr, paddingFormat, builder) => builder.Append(FormatInteger(ptr, 'd', paddingFormat)) }, + { "i", (ptr, paddingFormat, builder) => builder.Append(FormatInteger(ptr, 'd', paddingFormat)) }, + { "u", (ptr, paddingFormat, builder) => builder.Append(FormatInteger(ptr, 'd', paddingFormat)) }, + { "x", (ptr, paddingFormat, builder) => builder.Append(FormatInteger(ptr, 'x', paddingFormat)) }, + { "X", (ptr, paddingFormat, builder) => builder.Append(FormatInteger(ptr, 'X', paddingFormat)) }, + { "lu", (ptr, paddingFormat, builder) => builder.Append(FormatInteger(ptr, 'd', paddingFormat)) }, + { "lld", (ptr, paddingFormat, builder) => builder.Append(FormatInteger(ptr, 'd', paddingFormat)) }, + { "lli", (ptr, paddingFormat, builder) => builder.Append(FormatInteger(ptr, 'd', paddingFormat)) }, + { "llu", (ptr, paddingFormat, builder) => builder.Append(FormatInteger(ptr, 'd', paddingFormat)) }, + { "llx", (ptr, paddingFormat, builder) => builder.Append(FormatInteger(ptr, 'x', paddingFormat)) }, + { "llX", (ptr, paddingFormat, builder) => builder.Append(FormatInteger(ptr, 'X', paddingFormat)) }, + { "zd", (ptr, paddingFormat, builder) => builder.Append(FormatInteger(ptr, 'd', paddingFormat)) }, + { "zi", (ptr, paddingFormat, builder) => builder.Append(FormatInteger(ptr, 'd', paddingFormat)) }, + { "zu", (ptr, paddingFormat, builder) => builder.Append(FormatInteger(ptr, 'd', paddingFormat)) }, + { "zx", (ptr, paddingFormat, builder) => builder.Append(FormatInteger(ptr, 'x', paddingFormat)) }, + { "zX", (ptr, paddingFormat, builder) => builder.Append(FormatInteger(ptr, 'X', paddingFormat)) }, + { "I64u", (ptr, paddingFormat, builder) => builder.Append(FormatInteger(ptr, 'd', paddingFormat)) }, + { "Id", (ptr, paddingFormat, builder) => builder.Append(FormatInteger(ptr, 'd', paddingFormat)) }, + { "Ix", (ptr, paddingFormat, builder) => builder.Append(FormatInteger(ptr, 'x', paddingFormat)) }, + { "I64p", FormatPointer }, + }; + + _alternateActions = new() + { + { "X", FormatHexWithPrefix }, + { "x", FormatHexWithPrefix }, + }; + } + + private void FormatPointer(TargetPointer ptr, PaddingFormat paddingFormat, StringBuilder builder) + { + // Default formatting for pointers is to format as "padded to full byte width with 0s in hex". + // Allow custom printf formatting to override this if desired. + if (paddingFormat == new PaddingFormat(0, ' ')) + { + builder.Append(ptr.Value.ToString($"X{_target.PointerSize * 2}")); + return; + } + builder.Append(FormatInteger(ptr, 'X', paddingFormat)); + } + + private void FormatMethodDesc(TargetPointer ptr, PaddingFormat paddingFormat, StringBuilder builder) + { + builder.Append(_pointerFormatter.FormatMethodDesc(ptr)); + } + + private void FormatMethodTable(TargetPointer ptr, PaddingFormat paddingFormat, StringBuilder builder) + { + builder.Append(_pointerFormatter.FormatMethodTable(ptr)); + } + + private void FormatVTable(TargetPointer ptr, PaddingFormat paddingFormat, StringBuilder builder) + { + builder.Append(_pointerFormatter.FormatVTable(ptr)); + } + + private void FormatStackTrace(TargetPointer ptr, PaddingFormat paddingFormat, StringBuilder builder) + { + builder.Append(_pointerFormatter.FormatStackTrace(ptr)); + } + + private void FormatAsciiString(TargetPointer ptr, PaddingFormat paddingFormat, StringBuilder builder) + { + try + { + builder.Append(_target.ReadUtf8String(ptr).PadLeft(paddingFormat.Width, paddingFormat.FormatChar)); + } + catch (InvalidOperationException) + { + builder.Append($"(#Could not read address of string at 0x{ptr.Value:x}#)"); + } + } + + private void FormatUtf16String(TargetPointer ptr, PaddingFormat paddingFormat, StringBuilder builder) + { + try + { + builder.Append(_target.ReadUtf16String(ptr).PadLeft(paddingFormat.Width, paddingFormat.FormatChar)); + } + catch (InvalidOperationException) + { + builder.Append($"(#Could not read address of string at 0x{ptr.Value:x}#)"); + } + } + + private static void FormatHexWithPrefix(TargetPointer ptr, PaddingFormat paddingFormat, StringBuilder builder) + { + if (paddingFormat.FormatChar == '0') + { + // We need to subtract 2 from the width to account for the "0x" prefix. + string format = $"x{Math.Max(paddingFormat.Width - 2, 0)}"; + ReadOnlySpan value = ptr.Value.ToString(format); + if (value.Length > paddingFormat.Width) + { + value = value[^paddingFormat.Width..]; + } + builder.Append($"0x{value}"); + } + else + { + builder.Append($"0x{ptr.Value:x}".PadLeft(paddingFormat.Width, paddingFormat.FormatChar)); + } + } + + private static string FormatInteger(TargetPointer value, char format, PaddingFormat paddingFormat) + where T : INumberBase + { + if (paddingFormat.FormatChar == '0') + { + return T.CreateTruncating(value.Value).ToString($"{format}{paddingFormat.Width}", formatProvider: CultureInfo.InvariantCulture); + } + else + { + return T.CreateTruncating(value.Value).ToString($"{format}", formatProvider: CultureInfo.InvariantCulture).PadLeft(paddingFormat.Width, paddingFormat.FormatChar); + } + } + + private static void FormatFloatingPoint(TargetPointer valueAsBits, PaddingFormat paddingFormat, StringBuilder builder) + { + double value = BitConverter.UInt64BitsToDouble(valueAsBits.Value); + if (paddingFormat.Precision == 0) + { + if (paddingFormat.FormatChar == '0') + { + builder.Append(value.ToString($"F{paddingFormat.Width}", provider: CultureInfo.InvariantCulture)); + } + else + { + builder.Append(value.ToString("F", provider: CultureInfo.InvariantCulture).PadLeft(paddingFormat.Width, paddingFormat.FormatChar)); + } + } + else + { + if (paddingFormat.FormatChar == '0') + { + // Create a format string of 00000.### where there are Precision #s and Width - Precision - 1 0s. + string formatString = string.Create(paddingFormat.Width, paddingFormat, (buffer, format) => + { + buffer.Fill('0'); + buffer[^paddingFormat.Precision..].Fill('#'); + buffer[buffer.Length - paddingFormat.Precision - 1] = '.'; + }); + builder.Append(value.ToString(formatString, provider: CultureInfo.InvariantCulture)); + } + else + { + // Create a format string of #####.### where there are Precision #s after the dot, '0' before the dot, and #s until the string is Width long at the start. + string formatString = string.Create(paddingFormat.Width, paddingFormat, (buffer, format) => + { + buffer.Fill('#'); + buffer[buffer.Length - paddingFormat.Precision - 1] = '.'; + buffer[buffer.Length - paddingFormat.Precision - 2] = '0'; + }); + builder.Append(value.ToString(formatString, provider: CultureInfo.InvariantCulture).PadLeft(paddingFormat.Width, paddingFormat.FormatChar)); + } + } + } + + public string GetFormattedMessage(StressMsgData stressMsg) + { + Debug.Assert(stressMsg.FormatString != TargetPointer.Null); + string formatString = _target.ReadUtf8String(stressMsg.FormatString); + int currentArg = 0; + int startIndex = 0; + StringBuilder sb = new(); + while (startIndex < formatString.Length) + { + int nextFormatter = formatString.IndexOf('%', startIndex); + if (nextFormatter == -1) + { + sb.Append(formatString.AsSpan()[startIndex..]); + break; + } + + sb.Append(formatString.AsSpan()[startIndex..nextFormatter]); + + if (nextFormatter == formatString.Length - 1) + { + sb.Append('%'); + } + else + { + startIndex = nextFormatter + 1; + char operand = formatString[startIndex++]; + if (operand == '%') + { + sb.Append('%'); + continue; + } + + var formatActions = _formatActions; + + if (operand == '#') + { + formatActions = _alternateActions; + operand = formatString[startIndex++]; + } + + PaddingFormat paddingFormat = new PaddingFormat(0, ' '); + + if (operand == '0') + { + paddingFormat = paddingFormat with { FormatChar = '0' }; + operand = formatString[startIndex++]; + } + + while (operand is >= '0' and <= '9') + { + paddingFormat = paddingFormat with { Width = paddingFormat.Width * 10 + (operand - '0') }; + operand = formatString[startIndex++]; + } + + if (operand == '.') + { + paddingFormat = paddingFormat with { Precision = 0 }; + operand = formatString[startIndex++]; + while (operand is >= '0' and <= '9') + { + paddingFormat = paddingFormat with { Precision = paddingFormat.Precision * 10 + (operand - '0') }; + operand = formatString[startIndex++]; + } + } + + string specifier; + + // Check for width specifiers to form the format specifier we'll look up in the table. + if (operand == 'l') + { + char nextChar = formatString[startIndex++]; + if (nextChar != 'l') + { + specifier = "l" + nextChar; + } + else + { + specifier = "ll" + formatString[startIndex++]; + } + } + else if (operand == 'z') + { + specifier = "z" + formatString[startIndex++]; + } + else if (operand == 'p') + { + if (startIndex < formatString.Length + && formatString[startIndex] is 'M' or 'T' or 'V' or 'K') + { + specifier = "p" + formatString[startIndex++]; + } + else + { + specifier = "p"; + } + } + else if (operand == 'I') + { + if (formatString.Length - startIndex >= 3 + && formatString.AsSpan()[startIndex..(startIndex + 2)].SequenceEqual("64")) + { + specifier = "I64" + formatString[startIndex + 2]; + startIndex += 3; + } + else + { + specifier = "I" + formatString[startIndex++]; + } + } + else + { + specifier = operand.ToString(); + } + + if (!formatActions.TryGetValue(specifier, out var action)) + { + throw new InvalidOperationException($"Unknown format specifier '{specifier}' in string '{formatString}'"); + } + + action(stressMsg.Args[currentArg++], paddingFormat, sb); + } + } + + return sb.ToString(); + } +} diff --git a/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader/ContractDescriptorTarget.cs b/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader/ContractDescriptorTarget.cs index d7901496099ebc..8bcc78fdd31975 100644 --- a/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader/ContractDescriptorTarget.cs +++ b/src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader/ContractDescriptorTarget.cs @@ -44,6 +44,13 @@ private readonly struct Configuration public delegate int ReadFromTargetDelegate(ulong address, Span bufferToFill); + /// + /// Create a new target instance from a contract descriptor embedded in the target memory. + /// + /// The offset of the contract descriptor in the target memory + /// A callback to read memory blocks at a given address from the target + /// The target object. + /// If a target instance could be created, true; otherwise, false. public static bool TryCreate(ulong contractDescriptor, ReadFromTargetDelegate readFromTarget, out ContractDescriptorTarget? target) { Reader reader = new Reader(readFromTarget); @@ -57,6 +64,20 @@ public static bool TryCreate(ulong contractDescriptor, ReadFromTargetDelegate re return false; } + /// + /// Create a new target instance from an externally-provided contract descriptor. + /// + /// The contract descriptor to use for this target + /// The values for any global pointers specified in the contract descriptor. + /// A callback to read memory blocks at a given address from the target + /// Whether the target is little-endian + /// The size of a pointer in bytes in the target process. + /// The target object. + public static ContractDescriptorTarget Create(ContractDescriptorParser.ContractDescriptor contractDescriptor, TargetPointer[] globalPointerValues, ReadFromTargetDelegate readFromTarget, bool isLittleEndian, int pointerSize) + { + return new ContractDescriptorTarget(new Configuration { IsLittleEndian = isLittleEndian, PointerSize = pointerSize }, contractDescriptor, globalPointerValues, new Reader(readFromTarget)); + } + private ContractDescriptorTarget(Configuration config, ContractDescriptorParser.ContractDescriptor descriptor, TargetPointer[] pointerData, Reader reader) { Contracts = new CachingContractRegistry(this, this.TryGetContractVersion); @@ -66,6 +87,9 @@ private ContractDescriptorTarget(Configuration config, ContractDescriptorParser. _contracts = descriptor.Contracts ?? []; + // Set pointer type size + _knownTypes[DataType.pointer] = new TypeInfo { Size = (uint)_config.PointerSize }; + // Read types and map to known data types if (descriptor.Types is not null) { diff --git a/src/native/managed/cdacreader/src/Legacy/SOSDacImpl.cs b/src/native/managed/cdacreader/src/Legacy/SOSDacImpl.cs index cd3ffe8533c5ed..0d403b4f9a7a94 100644 --- a/src/native/managed/cdacreader/src/Legacy/SOSDacImpl.cs +++ b/src/native/managed/cdacreader/src/Legacy/SOSDacImpl.cs @@ -1194,8 +1194,23 @@ int ISOSDacInterface.GetStackLimits(ulong threadPtr, ulong* lower, ulong* upper, => _legacyImpl is not null ? _legacyImpl.GetStackLimits(threadPtr, lower, upper, fp) : HResults.E_NOTIMPL; int ISOSDacInterface.GetStackReferences(int osThreadID, void** ppEnum) => _legacyImpl is not null ? _legacyImpl.GetStackReferences(osThreadID, ppEnum) : HResults.E_NOTIMPL; + int ISOSDacInterface.GetStressLogAddress(ulong* stressLog) - => _legacyImpl is not null ? _legacyImpl.GetStressLogAddress(stressLog) : HResults.E_NOTIMPL; + { + ulong stressLogAddress = _target.ReadGlobalPointer(Constants.Globals.StressLog); + +#if DEBUG + if (_legacyImpl is not null) + { + ulong legacyStressLog; + Debug.Assert(HResults.S_OK == _legacyImpl.GetStressLogAddress(&legacyStressLog)); + Debug.Assert(legacyStressLog == stressLogAddress); + } +#endif + *stressLog = stressLogAddress; + return HResults.S_OK; + } + int ISOSDacInterface.GetSyncBlockCleanupData(ulong addr, void* data) => _legacyImpl is not null ? _legacyImpl.GetSyncBlockCleanupData(addr, data) : HResults.E_NOTIMPL; int ISOSDacInterface.GetSyncBlockData(uint number, void* data) diff --git a/src/native/managed/cdacreader/tests/PrintfStressMessageFormatterTests.cs b/src/native/managed/cdacreader/tests/PrintfStressMessageFormatterTests.cs new file mode 100644 index 00000000000000..d6cde3181c7532 --- /dev/null +++ b/src/native/managed/cdacreader/tests/PrintfStressMessageFormatterTests.cs @@ -0,0 +1,375 @@ +// 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.Collections.Generic; +using System.Runtime.InteropServices; +using System.Text; +using Microsoft.Diagnostics.DataContractReader; +using Microsoft.Diagnostics.DataContractReader.Contracts; +using Moq; +using Xunit; + +namespace Microsoft.Diagnostics.DataContractReader.Tests; + +public unsafe class PrintfStressMessageFormatterTests +{ + private abstract record StressMessageArgument + { + private StressMessageArgument() { } + public record Utf8String(string Value) : StressMessageArgument; + public record Utf16String(string Value) : StressMessageArgument; + public record SignedInteger(long Value) : StressMessageArgument; + public record FloatingPoint(double Value) : StressMessageArgument; + public record UnsignedInteger(ulong Value) : StressMessageArgument; + } + + private readonly PrintfStressMessageFormatter.ISpecialPointerFormatter NoOpSpecialPointerFormatter = new Mock().Object; + + [Fact] + public void NoFormatSpecifier() + { + var (target, message) = CreateFixture("Hello, World!"); + + PrintfStressMessageFormatter formatter = new(target, NoOpSpecialPointerFormatter); + Assert.Equal("Hello, World!", formatter.GetFormattedMessage(message)); + } + + [Fact] + public void UnsupportedWidthSpecifier() + { + var (target, message) = CreateFixture("The answer is %ld", new StressMessageArgument.SignedInteger(42)); + + PrintfStressMessageFormatter formatter = new(target, NoOpSpecialPointerFormatter); + Assert.Throws(() => formatter.GetFormattedMessage(message)); + } + + [Fact] + public void UnsupportedFormatSpecifier() + { + var (target, message) = CreateFixture("The answer is %e", new StressMessageArgument.SignedInteger(0)); + + PrintfStressMessageFormatter formatter = new(target, NoOpSpecialPointerFormatter); + Assert.Throws(() => formatter.GetFormattedMessage(message)); + } + + public static IEnumerable IntegerSpecifier32BitWidthCases() + { + foreach (string specifier in new[] { "d", "i" }) + { + foreach (int? width in new int?[] { null, 4, 40 }) + { + foreach (long value in new[] { 0, int.MaxValue, 42, -24, int.MinValue, -1 }) + { + yield return [$"%0{width?.ToString() ?? ""}{specifier}", value, width, '0']; + yield return [$"%{width?.ToString() ?? ""}{specifier}", value, width, ' ']; + } + } + } + } + + public static IEnumerable IntegerSpecifier64BitWidthCases() + { + foreach (string specifier in new[] { "lld", "lli", "zd", "zi" }) + { + foreach (int? width in new int?[] { null, 4, 40 }) + { + foreach (long value in new[] { 0, long.MaxValue, 42, -24, long.MinValue, -1 }) + { + yield return [$"%0{width?.ToString() ?? ""}{specifier}", value, width, '0']; + yield return [$"%{width?.ToString() ?? ""}{specifier}", value, width, ' ']; + } + } + } + } + + [Theory] + [MemberData(nameof(IntegerSpecifier32BitWidthCases))] + [MemberData(nameof(IntegerSpecifier64BitWidthCases))] + public void SignedIntegerSpecifier(string specifier, long value, int? width, char paddingChar) + { + var (target, message) = CreateFixture($"The answer is {specifier}", new StressMessageArgument.SignedInteger(value)); + + PrintfStressMessageFormatter formatter = new(target, NoOpSpecialPointerFormatter); + string formattedValue = (width, paddingChar) switch + { + (null, _) => value.ToString(), + (int specifiedWidth, '0') => value.ToString($"D{specifiedWidth}"), + (int specifiedWidth, char padChar) => value.ToString().PadLeft(specifiedWidth, padChar), + }; + Assert.Equal($"The answer is {formattedValue}", formatter.GetFormattedMessage(message)); + } + + public static IEnumerable UnsignedIntegerSpecifierTestCases() + { + foreach (string specifier in new[] { "%u", "%lu", "%llu", "%zu", "%I64u" }) + { + foreach (ulong value in new[] { 0ul, uint.MaxValue, ulong.MaxValue, ulong.MaxValue - 1, 42ul }) + { + yield return [specifier, value]; + } + } + } + + [Theory] + [MemberData(nameof(UnsignedIntegerSpecifierTestCases))] + public void UnsignedIntegerSpecifier(string specifier, ulong value) + { + var (target, message) = CreateFixture($"The answer is {specifier}", new StressMessageArgument.UnsignedInteger(value)); + + PrintfStressMessageFormatter formatter = new(target, NoOpSpecialPointerFormatter); + Assert.Equal($"The answer is {value}", formatter.GetFormattedMessage(message)); + } + + public static IEnumerable HexIntegerSpecifierTestCases() + { + foreach (string specifier in new[] { "%x", "%X", "%llx", "%llX", "%zx", "%zX", "%Ix" }) + { + foreach (ulong value in new[] { 0ul, uint.MaxValue, ulong.MaxValue, ulong.MaxValue - 1, 42ul }) + { + yield return [specifier, value]; + } + } + } + + [Theory] + [MemberData(nameof(HexIntegerSpecifierTestCases))] + public void HexIntegerSpecifier(string specifier, ulong value) + { + var (target, message) = CreateFixture($"The answer is {specifier}", new StressMessageArgument.UnsignedInteger(value)); + + PrintfStressMessageFormatter formatter = new(target, NoOpSpecialPointerFormatter); + // Use the same case 'x' or 'X' as the specifier for the validation. + Assert.Equal($"The answer is {value.ToString(specifier[^1..])}", formatter.GetFormattedMessage(message)); + } + + public static IEnumerable HexWithPrefixIntegerSpecifierTestCases() + { + foreach (string specifier in new[] { "%#x", "%#X" }) + { + foreach (ulong value in new[] { 0ul, uint.MaxValue, ulong.MaxValue, ulong.MaxValue - 1, 42ul }) + { + yield return [specifier, value]; + } + } + } + + [Theory] + [MemberData(nameof(HexWithPrefixIntegerSpecifierTestCases))] + public void HexWithPrefixIntegerSpecifier(string specifier, ulong value) + { + var (target, message) = CreateFixture($"The answer is {specifier}", new StressMessageArgument.UnsignedInteger(value)); + + PrintfStressMessageFormatter formatter = new(target, NoOpSpecialPointerFormatter); + Assert.Equal($"The answer is 0x{value:x}", formatter.GetFormattedMessage(message)); + } + + public static IEnumerable PointerSpecifierTestCases() + { + foreach (string specifier in new[] { "%p", "%I64p" }) + { + foreach (ulong value in new[] { 0ul, uint.MaxValue, ulong.MaxValue, ulong.MaxValue - 1, 42ul }) + { + yield return [specifier, value]; + } + } + } + + [Theory] + [MemberData(nameof(PointerSpecifierTestCases))] + public void PointerSpecifier(string specifier, ulong value) + { + var (target, message) = CreateFixture($"The answer is {specifier}", new StressMessageArgument.UnsignedInteger(value)); + + PrintfStressMessageFormatter formatter = new(target, NoOpSpecialPointerFormatter); + Assert.Equal($"The answer is {value:X16}", formatter.GetFormattedMessage(message)); + } + + + + [Fact] + public void HexWithPrefixIntegerSpecifierWithPadding() + { + var (target, message) = CreateFixture("The answer is %#010x", new StressMessageArgument.UnsignedInteger(0x50)); + + PrintfStressMessageFormatter formatter = new(target, NoOpSpecialPointerFormatter); + Assert.Equal("The answer is 0x00000050", formatter.GetFormattedMessage(message)); + } + + public static IEnumerable StringSpecifierTestCases() + { + foreach (string value in new[] { + "", + "Hello, World!", + "Recursive pattern %d", + "Unicode \\uD83C\\uDF32 \\u6728 \\uD83D\\uDD25 \\u706B \\uD83C\\uDF3E \\u571F \\uD83D\\uDEE1 \\u91D1 \\uD83C\\uDF0A \\u6C34" + }) + { + yield return ["%s", value, false]; + foreach (string specifier in new[] { "%S", "%ls" }) + { + yield return [specifier, value, true]; + } + } + } + + [Theory] + [MemberData(nameof(StringSpecifierTestCases))] + public void StringSpecifier(string specifier, string value, bool utf16) + { + var (target, message) = CreateFixture($"The answer is '{specifier}'", + utf16 ? new StressMessageArgument.Utf16String(value) + : new StressMessageArgument.Utf8String(value)); + + PrintfStressMessageFormatter formatter = new(target, NoOpSpecialPointerFormatter); + Assert.Equal($"The answer is '{value}'", formatter.GetFormattedMessage(message)); + } + + [Fact] + public void StringSpecifierWithPadding() + { + var (target, message) = CreateFixture("The answer is '%20s'", new StressMessageArgument.Utf8String("Hello, World!")); + + PrintfStressMessageFormatter formatter = new(target, NoOpSpecialPointerFormatter); + Assert.Equal("The answer is ' Hello, World!'", formatter.GetFormattedMessage(message)); + } + + [Fact] + public void MethodTableSpecifier() + { + ulong value = 0x123; + var (target, message) = CreateFixture("We have a %pT", new StressMessageArgument.UnsignedInteger(value)); + + var specialPointerFormatter = new Mock(); + specialPointerFormatter.Setup(f => f.FormatMethodTable(It.IsAny())).Returns((TargetPointer targetPointer) => $"MethodTable: 0x{targetPointer.Value:X}"); + PrintfStressMessageFormatter formatter = new(target, specialPointerFormatter.Object); + Assert.Equal($"We have a MethodTable: 0x{value:X}", formatter.GetFormattedMessage(message)); + } + + [Fact] + public void MethodDescSpecifier() + { + ulong value = 0x123; + var (target, message) = CreateFixture("We have a %pM", new StressMessageArgument.UnsignedInteger(value)); + + var specialPointerFormatter = new Mock(); + specialPointerFormatter.Setup(f => f.FormatMethodDesc(It.IsAny())).Returns((TargetPointer targetPointer) => $"MethodDesc: 0x{targetPointer.Value:X}"); + PrintfStressMessageFormatter formatter = new(target, specialPointerFormatter.Object); + Assert.Equal($"We have a MethodDesc: 0x{value:X}", formatter.GetFormattedMessage(message)); + } + + [Fact] + public void VTableSpecifier() + { + ulong value = 0x123; + var (target, message) = CreateFixture("We have a %pV", new StressMessageArgument.UnsignedInteger(value)); + + var specialPointerFormatter = new Mock(); + specialPointerFormatter.Setup(f => f.FormatVTable(It.IsAny())).Returns((TargetPointer targetPointer) => $"VTable: 0x{targetPointer.Value:X}"); + PrintfStressMessageFormatter formatter = new(target, specialPointerFormatter.Object); + Assert.Equal($"We have a VTable: 0x{value:X}", formatter.GetFormattedMessage(message)); + } + + [Fact] + public void StackTraceSpecifier() + { + ulong value = 0x123; + var (target, message) = CreateFixture("We have a %pK", new StressMessageArgument.UnsignedInteger(value)); + + var specialPointerFormatter = new Mock(); + specialPointerFormatter.Setup(f => f.FormatStackTrace(It.IsAny())).Returns((TargetPointer targetPointer) => $"StackTrace: 0x{targetPointer.Value:X}"); + PrintfStressMessageFormatter formatter = new(target, specialPointerFormatter.Object); + Assert.Equal($"We have a StackTrace: 0x{value:X}", formatter.GetFormattedMessage(message)); + } + + [Theory] + [InlineData(0.0)] + [InlineData(123.45)] + [InlineData(-42.0)] + public void SimpleFloatingPoint(double value) + { + var (target, message) = CreateFixture("The answer is %f", new StressMessageArgument.FloatingPoint(value)); + + Assert.Equal($"The answer is {value:0.######}", new PrintfStressMessageFormatter(target, NoOpSpecialPointerFormatter).GetFormattedMessage(message)); + } + + [Theory] + [InlineData(0.0, "0")] + [InlineData(123.45, "123.45")] + [InlineData(-42.0, "-42")] + public void FloatingPointWithPrecision(double value, string expected) + { + var (target, message) = CreateFixture("The answer is %.6f", new StressMessageArgument.FloatingPoint(value)); + + Assert.Equal($"The answer is {expected}", new PrintfStressMessageFormatter(target, NoOpSpecialPointerFormatter).GetFormattedMessage(message)); + } + + [Theory] + [InlineData(0.0, "0")] + [InlineData(123.45, "123.45")] + [InlineData(-42.0, "-42")] + public void FloatingPointWithPrecisionAndWidth(double value, string expected) + { + var (target, message) = CreateFixture("The answer is %10.6f", new StressMessageArgument.FloatingPoint(value)); + + Assert.Equal($"The answer is {expected.PadLeft(10)}", new PrintfStressMessageFormatter(target, NoOpSpecialPointerFormatter).GetFormattedMessage(message)); + } + + [Theory] + [InlineData(0.0, "0000")] + [InlineData(123.45, "0123.45")] + [InlineData(-42.0, "-0042")] + public void FloatingPointWithPrecisionAndWidthAndZeroPadding(double value, string expected) + { + var (target, message) = CreateFixture("The answer is %08.3f", new StressMessageArgument.FloatingPoint(value)); + + Assert.Equal($"The answer is {expected}", new PrintfStressMessageFormatter(target, NoOpSpecialPointerFormatter).GetFormattedMessage(message)); + } + + private static (Target target, StressMsgData Message) CreateFixture(string format, params StressMessageArgument[] args) + { + Mock targetMock = new(); + targetMock.SetupGet(t => t.PointerSize).Returns(8); + + TargetPointer formatPointer = 0x1000; + + targetMock.Setup(t => t.ReadUtf8String(formatPointer)).Returns(format); + + TargetPointer[] arguments = new TargetPointer[args.Length]; + + ulong nextArgumentAddress = 0x2000; + // Process the provided arguments for the message to set up the target mock. + // The addresses for the string arguments are arbitrary. They just need to be different for each different string. + for (int i = 0; i < args.Length; i++, nextArgumentAddress += 0x100) + { + switch (args[i]) + { + case StressMessageArgument.Utf8String(string utf8String): + targetMock.Setup(t => t.ReadUtf8String(nextArgumentAddress)).Returns(utf8String); + arguments[i] = nextArgumentAddress; + break; + case StressMessageArgument.Utf16String(string utf16String): + targetMock.Setup(t => t.ReadUtf16String(nextArgumentAddress)).Returns(utf16String); + arguments[i] = nextArgumentAddress; + break; + case StressMessageArgument.SignedInteger(long signedInteger): + arguments[i] = (ulong)signedInteger; + break; + case StressMessageArgument.UnsignedInteger(ulong unsignedInteger): + arguments[i] = unsignedInteger; + break; + case StressMessageArgument.FloatingPoint(double floatingPoint): + arguments[i] = BitConverter.DoubleToUInt64Bits(floatingPoint); + break; + } + } + + StressMsgData message = new( + Facility: 0, + FormatString: formatPointer, + Timestamp: 0, + Args: arguments); + + return (targetMock.Object, message); + } +} diff --git a/src/tools/StressLogAnalyzer/StressLogAnalyzer.sln b/src/tools/StressLogAnalyzer/StressLogAnalyzer.sln new file mode 100644 index 00000000000000..b9309ed8c57360 --- /dev/null +++ b/src/tools/StressLogAnalyzer/StressLogAnalyzer.sln @@ -0,0 +1,48 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.9.34226.241 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StressLogAnalyzer", "src\StressLogAnalyzer.csproj", "{F6699980-10F8-40A3-B927-6A05D9CC9308}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{D67D7F2A-1459-4A22-99B2-6B1F56EF4D79}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Diagnostics.DataContractReader", "..\..\native\managed\cdacreader\Microsoft.Diagnostics.DataContractReader\Microsoft.Diagnostics.DataContractReader.csproj", "{D44FD88F-1E43-4F53-9D2C-F0F3925BBE69}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Diagnostics.DataContractReader.Abstractions", "..\..\native\managed\cdacreader\Microsoft.Diagnostics.DataContractReader.Abstractions\Microsoft.Diagnostics.DataContractReader.Abstractions.csproj", "{67C3CA4E-BBB0-4C0A-A06F-1C32B458F1BC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Diagnostics.DataContractReader.Contracts", "..\..\native\managed\cdacreader\Microsoft.Diagnostics.DataContractReader.Contracts\Microsoft.Diagnostics.DataContractReader.Contracts.csproj", "{EC665835-E05A-439E-8607-D0DFA1E7A18F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F6699980-10F8-40A3-B927-6A05D9CC9308}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F6699980-10F8-40A3-B927-6A05D9CC9308}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F6699980-10F8-40A3-B927-6A05D9CC9308}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F6699980-10F8-40A3-B927-6A05D9CC9308}.Release|Any CPU.Build.0 = Release|Any CPU + {D44FD88F-1E43-4F53-9D2C-F0F3925BBE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D44FD88F-1E43-4F53-9D2C-F0F3925BBE69}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D44FD88F-1E43-4F53-9D2C-F0F3925BBE69}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D44FD88F-1E43-4F53-9D2C-F0F3925BBE69}.Release|Any CPU.Build.0 = Release|Any CPU + {67C3CA4E-BBB0-4C0A-A06F-1C32B458F1BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {67C3CA4E-BBB0-4C0A-A06F-1C32B458F1BC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {67C3CA4E-BBB0-4C0A-A06F-1C32B458F1BC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {67C3CA4E-BBB0-4C0A-A06F-1C32B458F1BC}.Release|Any CPU.Build.0 = Release|Any CPU + {EC665835-E05A-439E-8607-D0DFA1E7A18F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EC665835-E05A-439E-8607-D0DFA1E7A18F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EC665835-E05A-439E-8607-D0DFA1E7A18F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EC665835-E05A-439E-8607-D0DFA1E7A18F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {7D21BE58-014B-4F94-B2B4-24CEB99D10D0} = {D67D7F2A-1459-4A22-99B2-6B1F56EF4D79} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {DB9376FB-190A-4566-99CD-7E00A0D76255} + EndGlobalSection +EndGlobal diff --git a/src/tools/StressLogAnalyzer/src/DefaultSpecialPointerFormatter.cs b/src/tools/StressLogAnalyzer/src/DefaultSpecialPointerFormatter.cs new file mode 100644 index 00000000000000..ea5dc01d62d95f --- /dev/null +++ b/src/tools/StressLogAnalyzer/src/DefaultSpecialPointerFormatter.cs @@ -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. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Microsoft.Diagnostics.DataContractReader; + +namespace StressLogAnalyzer; + +internal sealed class DefaultSpecialPointerFormatter : PrintfStressMessageFormatter.ISpecialPointerFormatter +{ + public string FormatMethodDesc(TargetPointer pointer) => $"(MethodDesc: {pointer.Value:X16})"; + public string FormatMethodTable(TargetPointer pointer) => $"(MethodTable: {pointer.Value:X16})"; + public string FormatStackTrace(TargetPointer pointer) => "(Unknown function)"; + public string FormatVTable(TargetPointer pointer) => "(Unknown VTable)"; +} diff --git a/src/tools/StressLogAnalyzer/src/Filters/AllMessagesFilter.cs b/src/tools/StressLogAnalyzer/src/Filters/AllMessagesFilter.cs new file mode 100644 index 00000000000000..2ddd6771dab6af --- /dev/null +++ b/src/tools/StressLogAnalyzer/src/Filters/AllMessagesFilter.cs @@ -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. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Microsoft.Diagnostics.DataContractReader.Contracts; + +namespace StressLogAnalyzer.Filters; + +internal sealed class AllMessagesFilter(bool includeAllMessages) : IMessageFilter +{ + public bool IncludeMessage(StressMsgData message) + { + return includeAllMessages; + } +} diff --git a/src/tools/StressLogAnalyzer/src/Filters/DPrintLevelFilter.cs b/src/tools/StressLogAnalyzer/src/Filters/DPrintLevelFilter.cs new file mode 100644 index 00000000000000..3fe068cabeae36 --- /dev/null +++ b/src/tools/StressLogAnalyzer/src/Filters/DPrintLevelFilter.cs @@ -0,0 +1,25 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.Diagnostics.DataContractReader.Contracts; + +namespace StressLogAnalyzer.Filters; + +internal sealed class DPrintLevelFilter(IMessageFilter innerFilter, IReadOnlyList levels) : IMessageFilter +{ + private static uint GcLogLevel(uint facility) + { + if ((facility & ((uint)LogFacility.ALWAYS | 0xfffeu | (uint)LogFacility.GC)) == (uint)(LogFacility.ALWAYS | LogFacility.GC)) + { + return (facility >> 16) & 0x7fff; + } + return 0; + } + + public bool IncludeMessage(StressMsgData message) + { + uint level = GcLogLevel(message.Facility); + return levels.Any(filter => filter.Start <= level && level <= filter.End) + || innerFilter.IncludeMessage(message); + } +} diff --git a/src/tools/StressLogAnalyzer/src/Filters/FacilityMessageFilter.cs b/src/tools/StressLogAnalyzer/src/Filters/FacilityMessageFilter.cs new file mode 100644 index 00000000000000..500b32f9e5cbc8 --- /dev/null +++ b/src/tools/StressLogAnalyzer/src/Filters/FacilityMessageFilter.cs @@ -0,0 +1,36 @@ +// 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.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Microsoft.Diagnostics.DataContractReader.Contracts; + +namespace StressLogAnalyzer.Filters; + +internal sealed class FacilityMessageFilter(IMessageFilter inner, ulong ignoreFacility) : IMessageFilter +{ + public bool IncludeMessage(StressMsgData message) + { + // Filter out messages by log facility immediately. + if (ignoreFacility != 0) + { + if ((message.Facility & ((uint)LogFacility.ALWAYS | 0xfffe | (uint)LogFacility.GC)) == ((uint)LogFacility.ALWAYS | (uint)LogFacility.GC)) + { + // specially encoded GC message including dprintf level + if ((ignoreFacility & (uint)LogFacility.GC) != 0) + { + return false; + } + } + else if ((ignoreFacility & message.Facility) != 0) + { + return false; + } + } + + return inner.IncludeMessage(message); + } +} diff --git a/src/tools/StressLogAnalyzer/src/Filters/IMessageFilter.cs b/src/tools/StressLogAnalyzer/src/Filters/IMessageFilter.cs new file mode 100644 index 00000000000000..b021b4b91dc677 --- /dev/null +++ b/src/tools/StressLogAnalyzer/src/Filters/IMessageFilter.cs @@ -0,0 +1,11 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.Diagnostics.DataContractReader.Contracts; + +namespace StressLogAnalyzer.Filters; + +internal interface IMessageFilter +{ + bool IncludeMessage(StressMsgData message); +} diff --git a/src/tools/StressLogAnalyzer/src/Filters/InterestingMessageFilter.cs b/src/tools/StressLogAnalyzer/src/Filters/InterestingMessageFilter.cs new file mode 100644 index 00000000000000..8967bec2f64592 --- /dev/null +++ b/src/tools/StressLogAnalyzer/src/Filters/InterestingMessageFilter.cs @@ -0,0 +1,17 @@ +// 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.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Microsoft.Diagnostics.DataContractReader.Contracts; + +namespace StressLogAnalyzer.Filters; + +internal sealed class InterestingMessageFilter(IMessageFilter inner, IInterestingStringFinder stringFinder) : IMessageFilter +{ + public bool IncludeMessage(StressMsgData message) + => stringFinder.IsInteresting(message.FormatString, out _) || inner.IncludeMessage(message); +} diff --git a/src/tools/StressLogAnalyzer/src/Filters/ValueFilter.cs b/src/tools/StressLogAnalyzer/src/Filters/ValueFilter.cs new file mode 100644 index 00000000000000..7187f6e4c0fab9 --- /dev/null +++ b/src/tools/StressLogAnalyzer/src/Filters/ValueFilter.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.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Microsoft.Diagnostics.DataContractReader.Contracts; + +namespace StressLogAnalyzer.Filters; + +internal sealed class ValueFilter(IMessageFilter inner, IntegerRange[] valueRanges) : IMessageFilter +{ + public bool IncludeMessage(StressMsgData message) + { + return message.Args.Any( + value => valueRanges.Any(filter => filter.Start <= value && value <= filter.End)) + || inner.IncludeMessage(message); + } +} diff --git a/src/tools/StressLogAnalyzer/src/Filters/ValueRangeFilter.cs b/src/tools/StressLogAnalyzer/src/Filters/ValueRangeFilter.cs new file mode 100644 index 00000000000000..021297e055b5b0 --- /dev/null +++ b/src/tools/StressLogAnalyzer/src/Filters/ValueRangeFilter.cs @@ -0,0 +1,77 @@ +// 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.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Microsoft.Diagnostics.DataContractReader; +using Microsoft.Diagnostics.DataContractReader.Contracts; + +namespace StressLogAnalyzer.Filters; + +internal sealed class ValueRangeFilter(IMessageFilter inner, IInterestingStringFinder stringFinder, IntegerRange[] valueRanges) : IMessageFilter +{ + public bool IncludeMessage(StressMsgData message) + { + _ = stringFinder.IsInteresting(message.FormatString, out WellKnownString wellKnownString); + if (wellKnownString is WellKnownString.NOT_INTERESTING) + { + return inner.IncludeMessage(message); + } + + IReadOnlyList args = message.Args; + + switch (wellKnownString) + { + case WellKnownString.PLAN_PLUG: + case WellKnownString.PLAN_PINNED_PLUG: + { + ulong gapSize = args[0]; + ulong plugStart = args[1]; + ulong gapStart = plugStart - gapSize; + ulong plugEnd = args[2]; + return RangeIsInteresting(gapStart, plugEnd); + } + case WellKnownString.GCMEMCOPY: + return RangeIsInteresting(args[0], args[2]) || RangeIsInteresting(args[1], args[3]); + case WellKnownString.MAKE_UNUSED_ARRAY: + return RangeIsInteresting(args[0], args[1]); + case WellKnownString.RELOCATE_REFERENCE: + { + ulong src = args[0]; + ulong destFrom = args[1]; + ulong destTo = args[2]; + + foreach (IntegerRange filter in valueRanges) + { + if ((filter.End < src || src > filter.Start) + && (filter.End < destFrom || destFrom > filter.Start) + && (filter.End < destTo || destTo > filter.Start)) + { + continue; + } + return true; + } + + return false; + } + } + return false; + } + + private bool RangeIsInteresting(ulong start, ulong end) + { + foreach (IntegerRange filter in valueRanges) + { + if (filter.End < start || end > filter.Start) + { + continue; + } + return true; + } + + return false; + } +} diff --git a/src/tools/StressLogAnalyzer/src/GCThreadMap.cs b/src/tools/StressLogAnalyzer/src/GCThreadMap.cs new file mode 100644 index 00000000000000..8f0697b56ccd39 --- /dev/null +++ b/src/tools/StressLogAnalyzer/src/GCThreadMap.cs @@ -0,0 +1,91 @@ +// 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.Collections.Concurrent; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Microsoft.Diagnostics.DataContractReader; + +namespace StressLogAnalyzer +{ + internal sealed class GCThreadMap + { + private ulong _seenHeapBitmap; + private readonly ConcurrentDictionary _heapMap = []; + + public bool TryRememberHeapForThread(ulong threadId, WellKnownString wellKnownString, IReadOnlyList args, out ulong heap, out bool background) + { + switch (wellKnownString) + { + case WellKnownString.THREAD_WAIT: + case WellKnownString.THREAD_WAIT_DONE: + case WellKnownString.MARK_START: + case WellKnownString.PLAN_START: + case WellKnownString.RELOCATE_START: + case WellKnownString.RELOCATE_END: + case WellKnownString.COMPACT_START: + case WellKnownString.COMPACT_END: + heap = (ulong)args[0]; + background = false; + RememberHeapForThread(threadId, heap, background); + return true; + + case WellKnownString.DESIRED_NEW_ALLOCATION: + if (args[1] <= 1) + { + // do this only for gen 0 and 1, because otherwise it + // may be background GC + heap = (ulong)args[0]; + background = false; + RememberHeapForThread(threadId, heap, background); + return true; + } + break; + + case WellKnownString.START_BGC_THREAD: + heap = (ulong)args[0]; + background = true; + RememberHeapForThread(threadId, heap, background); + return true; + } + heap = 0; + background = false; + return false; + } + + private void RememberHeapForThread(ulong threadId, ulong heap, bool background) + { + if (Interlocked.Or(ref _seenHeapBitmap, heap) == 0) + { + // we don't want to remember these associations for WKS GC, + // which can execute on any thread - as soon as we see + // a heap number != 0, we assume SVR GC and remember it + return; + } + + _heapMap.GetOrAdd(threadId, (heap, background)); + } + + public bool ThreadHasHeap(ulong threadId) => _heapMap.ContainsKey(threadId); + + public (ulong heap, bool background) GetThreadHeap(ulong threadId) => _heapMap[threadId]; + + public bool IncludeThread(ulong threadId, ThreadFilter filter) + { + if (filter.IncludeThread(threadId)) + { + return true; + } + + if (_heapMap.TryGetValue(threadId, out (ulong heap, bool background) heapInfo)) + { + return filter.IncludeHeapThread(heapInfo.heap, heapInfo.background); + } + + return false; + } + } +} diff --git a/src/tools/StressLogAnalyzer/src/IInterestingStringFinder.cs b/src/tools/StressLogAnalyzer/src/IInterestingStringFinder.cs new file mode 100644 index 00000000000000..21e693ddfb9e8e --- /dev/null +++ b/src/tools/StressLogAnalyzer/src/IInterestingStringFinder.cs @@ -0,0 +1,40 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Diagnostics.CodeAnalysis; +using Microsoft.Diagnostics.DataContractReader; + +namespace StressLogAnalyzer; + +public enum WellKnownString : byte +{ + NOT_INTERESTING, + THREAD_WAIT, + THREAD_WAIT_DONE, + GCSTART, + GCEND, + MARK_START, + PLAN_START, + RELOCATE_START, + RELOCATE_END, + COMPACT_START, + COMPACT_END, + GCROOT, + PLUG_MOVE, + GCMEMCOPY, + GCROOT_PROMOTE, + PLAN_PLUG, + PLAN_PINNED_PLUG, + DESIRED_NEW_ALLOCATION, + MAKE_UNUSED_ARRAY, + START_BGC_THREAD, + RELOCATE_REFERENCE, + LOGGING_OFF, +} + +public interface IInterestingStringFinder +{ + bool IsInteresting(TargetPointer formatStringPointer, out WellKnownString wellKnownString); + + bool IsWellKnown(TargetPointer formatStringPointer, out WellKnownString wellKnownString); +} diff --git a/src/tools/StressLogAnalyzer/src/InterestingStringFinder.cs b/src/tools/StressLogAnalyzer/src/InterestingStringFinder.cs new file mode 100644 index 00000000000000..4fbb8047358878 --- /dev/null +++ b/src/tools/StressLogAnalyzer/src/InterestingStringFinder.cs @@ -0,0 +1,150 @@ +// 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.Buffers; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Linq; +using System.Numerics; +using System.Text; +using System.Threading.Tasks; +using Microsoft.Diagnostics.DataContractReader; + +namespace StressLogAnalyzer +{ + internal sealed class InterestingStringFinder(Target target, StressLogHeader.ModuleTable moduleTable, string[] userStrings, string[] userStringPrefixes, bool enableDefaultMessages) : IInterestingStringFinder + { + private static readonly Dictionary _knownStrings = + new() + { + {" GC Root %p RELOCATED %p -> %p MT = %pT\n", WellKnownString.GCROOT }, + {" IGCHeap::Promote: Promote GC Root *%p = %p MT = %pT\n", WellKnownString.GCROOT_PROMOTE }, + {"GC_HEAP RELOCATING Objects in heap within range [%p %p) by -0x%x bytes\n", WellKnownString.PLUG_MOVE }, + {"%d gc thread waiting...", WellKnownString.THREAD_WAIT }, + {"%d gc thread waiting... Done", WellKnownString.THREAD_WAIT_DONE }, + {"*GC* %d(gen0:%d)(%d)(alloc: %zd)(%s)(%d)(%d)", WellKnownString.GCSTART }, + {"*EGC* %zd(gen0:%zd)(%zd)(%d)(%s)(%s)(%s)(ml: %d->%d)\n", WellKnownString.GCEND }, + {"---- Mark Phase on heap %d condemning %d ----", WellKnownString.MARK_START }, + {"---- Plan Phase on heap %d ---- Condemned generation %d, promotion: %d", WellKnownString.PLAN_START }, + {"---- Relocate phase on heap %d -----", WellKnownString.RELOCATE_START }, + {"---- End of Relocate phase on heap %d ----", WellKnownString.RELOCATE_END }, + {"---- Compact Phase on heap %d: %zx(%zx)----", WellKnownString.COMPACT_START }, + {"---- End of Compact phase on heap %d ----", WellKnownString.COMPACT_END }, + {" mc: [%zx->%zx, %zx->%zx[", WellKnownString.GCMEMCOPY }, + {"(%zx)[%zx->%zx, NA: [%zx(%zd), %zx[: %zx(%d), x: %zx (%s)", WellKnownString.PLAN_PLUG }, + {"(%zx)PP: [%zx, %zx[%zx](m:%d)", WellKnownString.PLAN_PINNED_PLUG }, + {"h%d g%d surv: %zd current: %zd alloc: %zd (%d%%) f: %d%% new-size: %zd new-alloc: %zd", WellKnownString.DESIRED_NEW_ALLOCATION }, + {"Making unused array [%zx, %zx[", WellKnownString.MAKE_UNUSED_ARRAY }, + {"beginning of bgc on heap %d: gen2 FL: %d, FO: %d, frag: %d", WellKnownString.START_BGC_THREAD }, + {"Relocating reference *(%p) from %p to %p", WellKnownString.RELOCATE_REFERENCE }, + {"TraceGC is not turned on", WellKnownString.LOGGING_OFF }, + }; + + private static readonly SearchValues _defaultInterestingMessages = SearchValues.Create([ + (byte)WellKnownString.LOGGING_OFF, + (byte)WellKnownString.GCSTART, + (byte)WellKnownString.GCEND, + (byte)WellKnownString.MARK_START, + (byte)WellKnownString.PLAN_START, + (byte)WellKnownString.RELOCATE_START, + (byte)WellKnownString.RELOCATE_END, + (byte)WellKnownString.COMPACT_START, + (byte)WellKnownString.COMPACT_END, + ]); + + private static string InterpretEscapeSequences(string input) + { + return input.Replace("\\n", "\n").Replace("\\r", "\r").Replace("\\t", "\t"); + } + + private readonly SearchValues _userInterestingStrings = SearchValues.Create([.. userStrings.Select(InterpretEscapeSequences)], StringComparison.Ordinal); + + private readonly string[] _userStringPrefixes = userStringPrefixes?.Select(InterpretEscapeSequences).ToArray() ?? []; + + private readonly struct StringCacheEntry(bool isInteresting, WellKnownString stringKind) + { + // Set the 16th bit to indicate that the entry is valid. + private readonly int _data = (1 << 16) | (byte)stringKind | (isInteresting ? 1 << 8 : 0); + + public bool IsValid => (_data & (1 << 16)) != 0; + public bool IsInteresting => (_data & (1 << 8)) != 0; + public WellKnownString StringKind => (WellKnownString)(_data & 0xFF); + } + + private readonly StringCacheEntry[] _addressCache = new StringCacheEntry[StressLogHeader.ModuleImageDataSize]; + + public bool IsInteresting(TargetPointer formatStringPointer, out WellKnownString wellKnownStringKind) + { + int cacheIndex = GetCacheIndex(formatStringPointer); + if (_addressCache[cacheIndex].IsValid) + { + StringCacheEntry entry = _addressCache[cacheIndex]; + wellKnownStringKind = entry.StringKind; + return entry.IsInteresting; + } + + StringCacheEntry newEntry = CalculateEntryForString(formatStringPointer); + _addressCache[cacheIndex] = newEntry; + wellKnownStringKind = newEntry.StringKind; + return newEntry.IsInteresting; + + StringCacheEntry CalculateEntryForString(TargetPointer address) + { + string formatString = target.ReadUtf8String(address); + bool defaultInteresting = false; + if (_knownStrings.TryGetValue(formatString, out WellKnownString wellKnown)) + { + if (enableDefaultMessages) + { + defaultInteresting = _defaultInterestingMessages.Contains((byte)wellKnown); + } + } + else + { + wellKnown = WellKnownString.NOT_INTERESTING; + } + + if (_userInterestingStrings.Contains(formatString)) + { + return new StringCacheEntry(true, wellKnown); + } + + foreach (string prefix in _userStringPrefixes) + { + if (formatString.StartsWith(prefix, StringComparison.Ordinal)) + { + return new StringCacheEntry(true, wellKnown); + } + } + + return new StringCacheEntry(defaultInteresting, wellKnown); + } + + int GetCacheIndex(TargetPointer address) + { + ulong cumulativeSize = 0; + foreach (StressLogHeader.ModuleDesc module in moduleTable) + { + if (address >= module.baseAddr && address < module.baseAddr + module.size) + { + ulong moduleOffset = address - module.baseAddr; + return (int)(cumulativeSize + moduleOffset); + } + else + { + cumulativeSize += module.size; + } + } + throw new ArgumentOutOfRangeException(nameof(formatStringPointer)); + } + } + + public bool IsWellKnown(TargetPointer formatStringPointer, out WellKnownString wellKnownString) + { + return _knownStrings.TryGetValue(target.ReadUtf8String(formatStringPointer), out wellKnownString); + } + } +} diff --git a/src/tools/StressLogAnalyzer/src/LogFacility.cs b/src/tools/StressLogAnalyzer/src/LogFacility.cs new file mode 100644 index 00000000000000..9809b9aadb19c2 --- /dev/null +++ b/src/tools/StressLogAnalyzer/src/LogFacility.cs @@ -0,0 +1,41 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +namespace StressLogAnalyzer; + +[Flags] +internal enum LogFacility : uint +{ + GC = 0x00000001, + GCINFO = 0x00000002, + STUBS = 0x00000004, + JIT = 0x00000008, + LOADER = 0x00000010, + METADATA = 0x00000020, + SYNC = 0x00000040, + EEMEM = 0x00000080, + GCALLOC = 0x00000100, + CORDB = 0x00000200, + CLASSLOADER = 0x00000400, + CORPROF = 0x00000800, + DIAGNOSTICS_PORT = 0x00001000, + DBGALLOC = 0x00002000, + EH = 0x00004000, + ENC = 0x00008000, + ASSERT = 0x00010000, + VERIFIER = 0x00020000, + THREADPOOL = 0x00040000, + GCROOTS = 0x00080000, + INTEROP = 0x00100000, + MARSHALER = 0x00200000, + TIEREDCOMPILATION = 0x00400000, + ZAP = 0x00800000, + STARTUP = 0x01000000, + APPDOMAIN = 0x02000000, + CODESHARING = 0x04000000, + STORE = 0x08000000, + SECURITY = 0x10000000, + LOCKS = 0x20000000, + BCL = 0x40000000, + ALWAYS = 0x80000000, +} diff --git a/src/tools/StressLogAnalyzer/src/Options.cs b/src/tools/StressLogAnalyzer/src/Options.cs new file mode 100644 index 00000000000000..2534d2c00588c0 --- /dev/null +++ b/src/tools/StressLogAnalyzer/src/Options.cs @@ -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. + +using System.Globalization; + +namespace StressLogAnalyzer; + +public record struct IntegerRange(ulong Start, ulong End); + +public sealed record TimeRange(double StartTimestamp, double EndTimestamp); + +public sealed class ThreadFilter +{ + // Filter includes all threads + private bool _allThreads; + private readonly HashSet _backgroundGCThreads = []; + private readonly HashSet _foregroundGCThreads = []; + private readonly HashSet _threads = []; + + public void AddThread(ulong threadId) + { + _threads.Add(threadId); + } + + public void AddBackgroundGCThread(ulong heapNumber) + { + _backgroundGCThreads.Add(heapNumber); + } + + public void AddForegroundGCThread(ulong heapNumber) + { + _foregroundGCThreads.Add(heapNumber); + } + + public bool HasAnyFilter => !_allThreads; + + public bool HasAnyGCThreadFilter => _backgroundGCThreads.Count > 0 || _foregroundGCThreads.Count > 0; + + public bool IncludeThread(ulong threadId) + { + if (_allThreads) + { + return true; + } + + return _threads.Contains(threadId); + } + + public bool IncludeHeapThread(ulong heapNumber, bool isBackground) + { + if (_allThreads) + { + return true; + } + + return isBackground ? _backgroundGCThreads.Contains(heapNumber) : _foregroundGCThreads.Contains(heapNumber); + } + + public ThreadFilter(IEnumerable threadIds) + { + bool any = false; + foreach (string threadIdSet in threadIds) + { + foreach (string threadId in threadIdSet.Split(',')) + { + any = true; + if (threadId.StartsWith("GC", StringComparison.OrdinalIgnoreCase)) + { + _foregroundGCThreads.Add(ulong.Parse(threadId.AsSpan()[2..], NumberStyles.HexNumber, CultureInfo.InvariantCulture)); + } + else if (threadId.StartsWith("BG", StringComparison.OrdinalIgnoreCase)) + { + _backgroundGCThreads.Add(ulong.Parse(threadId.AsSpan()[2..], NumberStyles.HexNumber, CultureInfo.InvariantCulture)); + } + else + { + _threads.Add(ulong.Parse(threadId, NumberStyles.HexNumber, CultureInfo.InvariantCulture)); + } + } + } + + if (!any) + { + _allThreads = true; + } + } +} + +public sealed record Options( + FileInfo InputFile, + FileInfo? OutputFile, + IntegerRange[] ValueRanges, + TimeRange Time, + bool IncludeAllMessages, + bool IncludeDefaultMessages, + IReadOnlyList LevelFilter, + IntegerRange? GCIndex, + ulong? IgnoreFacility, + ThreadFilter? EarliestMessageThreads, + bool PrintHexThreadIds, + ThreadFilter ThreadFilter, + bool PrintFormatStrings, + string[]? FormatPrefixFilter, + string[]? FormatFilter); diff --git a/src/tools/StressLogAnalyzer/src/Output/GCThreadNameOutput.cs b/src/tools/StressLogAnalyzer/src/Output/GCThreadNameOutput.cs new file mode 100644 index 00000000000000..cde467574e45be --- /dev/null +++ b/src/tools/StressLogAnalyzer/src/Output/GCThreadNameOutput.cs @@ -0,0 +1,25 @@ +// 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.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Microsoft.Diagnostics.DataContractReader.Contracts; + +namespace StressLogAnalyzer.Output; + +internal sealed class GCThreadNameOutput(GCThreadMap threadMap) : IThreadNameOutput +{ + public string GetThreadName(ulong threadId) + { + if (!threadMap.ThreadHasHeap(threadId)) + { + return $"{threadId:x}".PadLeft(4); + } + (ulong heap, bool isBackground) = threadMap.GetThreadHeap(threadId); + string threadName = isBackground ? "BG" : "GC"; + return $"{threadName}{heap:D2}"; + } +} diff --git a/src/tools/StressLogAnalyzer/src/Output/HexThreadNameOutput.cs b/src/tools/StressLogAnalyzer/src/Output/HexThreadNameOutput.cs new file mode 100644 index 00000000000000..f3943d8bd320a9 --- /dev/null +++ b/src/tools/StressLogAnalyzer/src/Output/HexThreadNameOutput.cs @@ -0,0 +1,15 @@ +// 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.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StressLogAnalyzer.Output; + +internal sealed class HexThreadNameOutput : IThreadNameOutput +{ + public string GetThreadName(ulong threadId) => $"{threadId:x}".PadLeft(4); +} diff --git a/src/tools/StressLogAnalyzer/src/Output/IStressMessageOutput.cs b/src/tools/StressLogAnalyzer/src/Output/IStressMessageOutput.cs new file mode 100644 index 00000000000000..59ad502aa4d6c4 --- /dev/null +++ b/src/tools/StressLogAnalyzer/src/Output/IStressMessageOutput.cs @@ -0,0 +1,13 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using Microsoft.Diagnostics.DataContractReader.Contracts; + +namespace StressLogAnalyzer.Output; + +internal interface IStressMessageOutput +{ + Task OutputLineAsync(string line); + + Task OutputMessageAsync(ThreadStressLogData thread, StressMsgData message); +} diff --git a/src/tools/StressLogAnalyzer/src/Output/IThreadNameOutput.cs b/src/tools/StressLogAnalyzer/src/Output/IThreadNameOutput.cs new file mode 100644 index 00000000000000..86a0d4c9d648dd --- /dev/null +++ b/src/tools/StressLogAnalyzer/src/Output/IThreadNameOutput.cs @@ -0,0 +1,15 @@ +// 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.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StressLogAnalyzer.Output; + +public interface IThreadNameOutput +{ + string GetThreadName(ulong threadId); +} diff --git a/src/tools/StressLogAnalyzer/src/Output/StressMessageWriter.cs b/src/tools/StressLogAnalyzer/src/Output/StressMessageWriter.cs new file mode 100644 index 00000000000000..67d176524c2a87 --- /dev/null +++ b/src/tools/StressLogAnalyzer/src/Output/StressMessageWriter.cs @@ -0,0 +1,51 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Text; +using Microsoft.Diagnostics.DataContractReader; +using Microsoft.Diagnostics.DataContractReader.Contracts; + +namespace StressLogAnalyzer.Output; + +internal sealed class StressMessageWriter(IThreadNameOutput threadOutput, TimeTracker timeTracker, Target target, bool writeFormatString, TextWriter output) : IStressMessageOutput +{ + private PrintfStressMessageFormatter formatter = new(target, new DefaultSpecialPointerFormatter()); + + public async Task OutputLineAsync(string line) => await output.WriteLineAsync(line).ConfigureAwait(false); + + public async Task OutputMessageAsync(ThreadStressLogData thread, StressMsgData message) + { + await output.WriteAsync(threadOutput.GetThreadName(thread.ThreadId)).ConfigureAwait(false); + string timeOutput = timeTracker.TicksToSecondsFromStart(message.Timestamp).ToString("###0.000000000").PadLeft(13); + await output.WriteAsync($" {timeOutput} : ").ConfigureAwait(false); + + await output.WriteAsync(GetFacility((LogFacility)message.Facility).PadRight(20)).ConfigureAwait(false); + + await output.WriteAsync($" ").ConfigureAwait(false); + + if (writeFormatString) + { + string format = target.ReadUtf8String(message.FormatString); + await output.WriteAsync($"***|\"{format}\"|*** ").ConfigureAwait(false); + } + + await output.WriteLineAsync(formatter.GetFormattedMessage(message)).ConfigureAwait(false); + } + + private static string GetFacility(LogFacility facility) + { + if (facility == unchecked((LogFacility)(-1))) + { + return "`LF_ALL`"; + } + else if ((facility & (LogFacility.ALWAYS | (LogFacility)0xfffe | LogFacility.GC)) == (LogFacility.ALWAYS | LogFacility.GC)) + { + // specially encoded GC message including dprintf level + return $"`GC l={((uint)facility >> 16) & 0x7fff}`"; + } + else + { + return $"`{facility}`".Replace(", ", "`"); + } + } +} diff --git a/src/tools/StressLogAnalyzer/src/Program.cs b/src/tools/StressLogAnalyzer/src/Program.cs new file mode 100644 index 00000000000000..bd5e3b48e580ad --- /dev/null +++ b/src/tools/StressLogAnalyzer/src/Program.cs @@ -0,0 +1,587 @@ +// 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.Collections.Concurrent; +using System.CommandLine; +using System.CommandLine.Help; +using System.CommandLine.Parsing; +using System.Diagnostics; +using System.Globalization; +using System.IO.MemoryMappedFiles; +using System.Reflection.Metadata; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using Microsoft.Diagnostics.DataContractReader; +using Microsoft.Diagnostics.DataContractReader.Contracts; +using Microsoft.Win32.SafeHandles; +using StressLogAnalyzer.Filters; +using StressLogAnalyzer.Output; + +namespace StressLogAnalyzer; + +public static class Program +{ + private static unsafe int ReadFromMemoryMappedLog(ulong address, Span buffer, StressLogHeader* header) + { + // First look at module data. This will translate all addresses that point to static data (like string literals). + ulong cumulativeSize = 0; + Span moduleImageData = header->moduleImageData; + foreach (StressLogHeader.ModuleDesc module in header->moduleTable) + { + if (address >= module.baseAddr && address + (uint)buffer.Length < module.baseAddr + module.size) + { + ulong moduleOffset = address - module.baseAddr; + Debug.Assert(cumulativeSize + moduleOffset < (ulong)moduleImageData.Length, "Address is out of bounds"); + ulong bytesToCopy = ulong.Min((uint)buffer.Length, module.size - moduleOffset); + moduleImageData.Slice((int)(cumulativeSize + moduleOffset), (int)bytesToCopy).CopyTo(buffer); + return (int)bytesToCopy; + } + else + { + cumulativeSize += module.size; + } + } + + // Otherwise, translate the signature for dynamically-allocated data based on the memory-mapped base address. + if (address >= header->memoryBase && address + (uint)buffer.Length < header->memoryLimit) + { + ulong offset = address - header->memoryBase; + new Span((byte*)header + offset, buffer.Length).CopyTo(buffer); + return buffer.Length; + } + + return -1; + } + + public static async Task Main(string[] args) + { + CliConfiguration configuration = new(CreateRootCommand()); + ParseResult parsedArguments = configuration.Parse(args); + + while (true) + { + int result = await parsedArguments.InvokeAsync().ConfigureAwait(false); + if (result != 0 || parsedArguments.GetValue(SingleRunOption)) + { + return result; + } + + Console.Write("'q' to quit, 'r[args]' to run again\n>"); + while (true) + { + string command = Console.ReadLine()!; + if (command.Equals("q", StringComparison.OrdinalIgnoreCase)) + { + return 0; + } + else if (command[0] is 'r' or 'R') + { + // Parse the remaining string as new arguments for the analyzer. + FileInfo inputFileArgument = parsedArguments.GetValue(InputFileArgument)!; + parsedArguments = configuration.Parse($"\"{inputFileArgument.FullName}\" {command[1..]}"); + break; + } + } + }; + } + + private static readonly CliArgument InputFileArgument = new CliArgument("log file") + { + Description = "The memory-mapped stress log file to analyze", + }; + + private static readonly CliOption SingleRunOption = new CliOption("--single-run") + { + Description = "Run the analyzer only once", + }; + + public static CliRootCommand CreateRootCommand() + { + var outputFile = new CliOption("-output", "-o") + { + Description = "Write output to a text file instead of the console", + HelpName = "output file", + }; + + var valueRanges = new CliOption("-values", "-v") + { + Arity = ArgumentArity.OneOrMore, + DefaultValueFactory = argument => [], + CustomParser = argument => + { + IntegerRange[] values = new IntegerRange[argument.Tokens.Count]; + for (int i = 0; i < argument.Tokens.Count; i++) + { + string value = argument.Tokens[i].Value; + string[] parts = value.Split('-', '+'); + if (parts.Length > 2) + { + argument.AddError($"Invalid value range format in '{value}'"); + return null; + } + if (parts.Length == 1) + { + values[i] = new IntegerRange(ulong.Parse(parts[0], NumberStyles.HexNumber), ulong.Parse(parts[0], NumberStyles.HexNumber)); + } + else if (value.Contains('-')) + { + values[i] = new IntegerRange(ulong.Parse(parts[0], NumberStyles.HexNumber), ulong.Parse(parts[1], NumberStyles.HexNumber)); + } + else + { + // argument is in the format of -v:+ + ulong lower = ulong.Parse(parts[0], NumberStyles.HexNumber); + ulong size = ulong.Parse(parts[1], NumberStyles.HexNumber); + values[i] = new IntegerRange(lower, lower + size); + } + } + return values; + }, + Description = "Look for a specific hex value (often used to look for addresses). Can be a specific address or specified as a 'start-end' or 'start+length' range.", + HelpName = "hex value or range", + }; + + var timeRanges = new CliOption("--time", "-t") + { + Arity = ArgumentArity.OneOrMore, + DefaultValueFactory = argument => new TimeRange(0, double.MaxValue), + CustomParser = argument => + { + string value = argument.Tokens[0].Value; + if (double.TryParse(value, out double startTimestamp)) + { + // Format is either or - + return new TimeRange(startTimestamp, double.MaxValue); + } + else if (value.Split('-') is [string start, string end]) + { + return new TimeRange(double.Parse(start), double.Parse(end)); + } + else + { + argument.AddError($"Invalid time range format in '{value}'"); + return default; + } + }, + Description = "Don't consider messages before start time. Only consider messages >= start time and <= end time. Specify a negative number of seconds to only search in the last n seconds.", + HelpName = "start time or range", + }; + + var allMessagesOption = new CliOption("--all", "-a") + { + Description = "Print all messages from all threads" + }; + + var defaultMessagesOption = new CliOption("--defaultMessages", "-d") + { + Description = "Suppress default messages" + }; + + var levelFilter = new CliOption>("--level", "-l") + { + Arity = ArgumentArity.OneOrMore, + DefaultValueFactory = argument => [], + CustomParser = argument => + { + List levels = []; + foreach (CliToken token in argument.Tokens) + { + foreach (string value in token.Value.Split(',')) + { + if (value == "*") + { + levels.Add(new IntegerRange(0, 0x7fffffff)); + } + else if (ulong.TryParse(value, out ulong minLevel)) + { + levels.Add(new IntegerRange(minLevel, minLevel)); + } + else if (value.Split('-') is [string min, string max]) + { + levels.Add(new IntegerRange(ulong.Parse(min), ulong.Parse(max))); + } + else + { + argument.AddError($"Invalid level range format in '{value}'"); + return null; + } + } + } + return levels; + }, + Description = "Print messages at dprint level1,level2,...", + HelpName = "level or range of levels", + AllowMultipleArgumentsPerToken = true, + }; + + var prefixOption = new CliOption("--prefix", "-p") + { + Description = "Search for all format strings with a specific prefix", + HelpName = "format string" + }; + + var gcIndex = new CliOption("--gc", "-g") + { + Arity = ArgumentArity.OneOrMore, + DefaultValueFactory = argument => null, + CustomParser = argument => + { + string value = argument.Tokens[0].Value; + if (value.Split('-') is [string start, string end]) + { + return new IntegerRange(ulong.Parse(start), ulong.Parse(end)); + } + else + { + ulong index = ulong.Parse(value); + return new IntegerRange(index, index); + } + }, + Description = "Only print messages occurring during GC#gc_index or from GC#gc_index_start to GC#gc_index_end", + HelpName = "gc index or range", + }; + + var ignoreFacilityOption = new CliOption("--ignore", "-i") + { + CustomParser = argument => + { + return ulong.Parse(argument.Tokens.Single().Value, NumberStyles.HexNumber); + }, + Description = "Ignore messages only from these from log facilities", + HelpName = "facility bitmap in hex", + }; + + var earliestOption = new CliOption("--earliest", "-e") + { + Arity = ArgumentArity.ZeroOrMore, + CustomParser = argument => + { + return new ThreadFilter(argument.Tokens.Select(token => token.Value)); + }, + Description = "Print earliest message from all threads or from the listed threads", + HelpName = "thread id or GC heap number", + }; + + var threadFilter = new CliOption("--threads", "-tid") + { + Arity = ArgumentArity.ZeroOrMore, + DefaultValueFactory = argument => null, + CustomParser = argument => + { + return new ThreadFilter(argument.Tokens.Select(token => token.Value)); + }, + Description = "Print hex thread ids, e.g. 2a08 instead of GC12. Otherwise, only print messages from the listed threads", + HelpName = "thread id or GC heap number", + }; + + var hexThreadId = new CliOption("--hexThreadId", "--hex") + { + DefaultValueFactory = argument => null, + Description = "Print hex thread ids, e.g. 2a08 instead of GC12", + }; + + var formatFilter = new CliOption("--format", "-f") + { + Arity = ArgumentArity.ZeroOrMore, + Description = "Print the raw format strings along with the message. Use -f: to search for a specific format string", + HelpName = "format string", + }; + + var printFormatStrings = new CliOption("--printFormatStrings", "-pf") + { + DefaultValueFactory = argument => null, + Description = "Print the raw format strings along with the message", + }; + + var rootCommand = new CliRootCommand + { + InputFileArgument, + outputFile, + valueRanges, + timeRanges, + allMessagesOption, + defaultMessagesOption, + levelFilter, + prefixOption, + gcIndex, + ignoreFacilityOption, + earliestOption, + threadFilter, + hexThreadId, + printFormatStrings, + formatFilter, + SingleRunOption, + new DiagramDirective(), + }; + + rootCommand.SetAction(async (args, ct) => + { + ThreadFilter? threads = args.GetValue(threadFilter); + string[]? formats = args.GetResult(formatFilter) is not null ? args.GetValue(formatFilter) : null; + Options options = new( + args.GetValue(InputFileArgument)!, + args.GetValue(outputFile), + args.GetValue(valueRanges)!, + args.GetValue(timeRanges)!, + args.GetValue(allMessagesOption), + !args.GetValue(defaultMessagesOption), // The option specifies suppressing default messages + args.GetValue(levelFilter)!, + args.GetValue(gcIndex), + args.GetValue(ignoreFacilityOption), + args.GetValue(earliestOption), + PrintHexThreadIds: args.GetValue(hexThreadId) ?? threads is { HasAnyFilter: false }, + threads ?? new ThreadFilter([]), + PrintFormatStrings: args.GetValue(printFormatStrings) ?? formats is [], + args.GetValue(prefixOption), + formats); + return await AnalyzeStressLog(options, ct).ConfigureAwait(false); + }); + + return rootCommand; + } + + private static async Task AnalyzeStressLog(Options options, CancellationToken token) + { + using var stressLogData = MemoryMappedFile.CreateFromFile(options.InputFile.FullName, FileMode.Open, null, 0, MemoryMappedFileAccess.Read); + using MemoryMappedViewAccessor accessor = stressLogData.CreateViewAccessor(0, 0, MemoryMappedFileAccess.Read); + + if (accessor.Capacity < Unsafe.SizeOf()) + { + Console.WriteLine("Invalid memory-mapped stress log"); + return 1; + } + try + { + (Func targetFactory, StressLogHeader.ModuleTable moduleTable, int contractVersion, TargetPointer logs) = CreateTarget(accessor.SafeMemoryMappedViewHandle); + + Target globalTarget = targetFactory(); + + StressLogFactory factory = new(); + IStressLog globalStressLogContract = factory.CreateContract(globalTarget, contractVersion); + + using TextWriter? outputFile = options.OutputFile is not null ? File.CreateText(options.OutputFile.FullName) : null; + + InterestingStringFinder stringFinder = new(globalTarget, moduleTable, options.FormatFilter ?? [], options.FormatPrefixFilter ?? [], options.IncludeDefaultMessages); + + IMessageFilter messageFilter = CreateMessageFilter(options, stringFinder); + + GCThreadMap gcThreadMap = new(); + + IThreadNameOutput threadNameOutput = options.PrintHexThreadIds + ? new HexThreadNameOutput() : new GCThreadNameOutput(gcThreadMap); + + TimeTracker timeTracker = CreateTimeTracker(accessor.SafeMemoryMappedViewHandle, options); + + var analyzer = new StressLogAnalyzer( + () => factory.CreateContract(globalTarget, contractVersion), + stringFinder, + messageFilter, + options.ThreadFilter, + options.EarliestMessageThreads); + + var (numProcessed, numPrinted) = await analyzer.AnalyzeLogsAsync( + logs, + timeTracker, + gcThreadMap, + new StressMessageWriter( + threadNameOutput, + timeTracker, + globalTarget, + options.PrintFormatStrings, + outputFile ?? Console.Out), + token).ConfigureAwait(false); + + PrintFooter(accessor.SafeMemoryMappedViewHandle, globalStressLogContract, logs, numProcessed, numPrinted); + + return 0; + } + finally + { + accessor.SafeMemoryMappedViewHandle.ReleasePointer(); + } + } + + private static unsafe void PrintFooter(SafeMemoryMappedViewHandle handle, IStressLog stressLogContract, TargetPointer logs, ulong numProcessed, ulong numPrinted) + { + byte* buffer = null; + try + { + handle.AcquirePointer(ref buffer); + StressLogHeader* header = (StressLogHeader*)buffer; + + double usedSize = (double)(header->memoryCur - header->memoryBase) / (1024 * 1024 * 1024); + double availableSize = (double)(header->memoryLimit - header->memoryCur) / (1024 * 1024 * 1024); + + ThreadStressLogData[] threadLogs = [.. stressLogContract.GetThreadStressLogs(logs)]; + + Console.WriteLine($"Use file size: {usedSize:F3} GB, still available {availableSize:F3} GB, {threadLogs.Length} threads total, {threadLogs.Count(t => t.WriteHasWrapped)} overwrote earlier messages"); + Console.WriteLine($"{header->threadsWithNoLog} threads did not get a log!"); + + Console.Write("Number of messages processed: "); + PrintFriendlyNumber(numProcessed); + Console.Write(", printed: "); + PrintFriendlyNumber(numPrinted); + Console.WriteLine(); + } + finally + { + handle.ReleasePointer(); + } + + static void PrintFriendlyNumber(ulong n) + { + if (n < 1000) + Console.Write(n); + else if (n < 1000 * 1000) + Console.Write($"{n / 1000.0:F3} thousand"); + else if (n < 1000 * 1000 * 1000) + Console.Write($"{n / 1000000.0:F6} million"); + else + Console.Write($"{n / 1000000000.0:F9} billion"); + } + } + + private static IMessageFilter CreateMessageFilter(Options options, IInterestingStringFinder stringFinder) + { + if (options.IncludeAllMessages) + { + return new AllMessagesFilter(true); + } + + IMessageFilter filter = new AllMessagesFilter(false); + if (options.ValueRanges is not []) + { + filter = new ValueFilter(filter, options.ValueRanges); + filter = new ValueRangeFilter(filter, stringFinder, options.ValueRanges); + } + + if (options.LevelFilter is not []) + { + filter = new DPrintLevelFilter(filter, options.LevelFilter); + } + + filter = new InterestingMessageFilter(filter, stringFinder); + + if (options.IgnoreFacility is ulong ignore) + { + filter = new FacilityMessageFilter(filter, ignore); + } + + return filter; + } + + private static unsafe (Func targetFactory, StressLogHeader.ModuleTable table, int contractVersion, TargetPointer logs) CreateTarget(SafeMemoryMappedViewHandle handle) + { + byte* buffer = null; + handle.AcquirePointer(ref buffer); + StressLogHeader* header = (StressLogHeader*)buffer; + + if (header->headerSize != sizeof(StressLogHeader) + || !"LRTS"u8.SequenceEqual(header->magic) + || header->version is not (0x00010001 or 0x00010002)) + { + throw new InvalidOperationException("Invalid memory-mapped stress log."); + } + + int contractVersion = (int)(header->version & 0xFFFF); + + return (CreateTarget, header->moduleTable, contractVersion, header->logs); + + ContractDescriptorTarget CreateTarget() => ContractDescriptorTarget.Create( + GetDescriptor(contractVersion), + [TargetPointer.Null, new TargetPointer(header->memoryBase + (nuint)((byte*)&header->moduleTable - (byte*)header))], + (address, buffer) => ReadFromMemoryMappedLog(address, buffer, header), + true, + nuint.Size); + } + + private static unsafe TimeTracker CreateTimeTracker(SafeMemoryMappedViewHandle handle, Options options) + { + byte* buffer = null; + try + { + handle.AcquirePointer(ref buffer); + StressLogHeader* header = (StressLogHeader*)buffer; + return new TimeTracker(header->startTimeStamp, header->tickFrequency, options.Time, options.GCIndex); + } + finally + { + handle.ReleasePointer(); + } + } + + private static ContractDescriptorParser.ContractDescriptor GetDescriptor(int stressLogVersion) + { + return new ContractDescriptorParser.ContractDescriptor + { + Baseline = BaseContractDescriptor.Baseline, + Version = BaseContractDescriptor.Version, + Contracts = new(){ { "StressLog", stressLogVersion } }, + Types = BaseContractDescriptor.Types, + Globals = BaseContractDescriptor.Globals, + }; + } + + private static ContractDescriptorParser.ContractDescriptor BaseContractDescriptor = ContractDescriptorParser.ParseCompact( + """" + { + "version": 0, + "baseline": "empty", + "types": { + "StressLog": { + "!": 184, + "LoggedFacilities": 0, + "Level": 4, + "MaxSizePerThread": 8, + "MaxSizeTotal": 12, + "TotalChunks": 16, + "Logs": 24, + "TickFrequency": 48, + "StartTimestamp": 56, + "ModuleOffset": 72 + }, + "StressLogModuleDesc": { + "!": 16, + "BaseAddress": [ 0, "pointer" ], + "Size": [ 8, "nuint" ] + }, + "ThreadStressLog": { + "Next": 0, + "ThreadId": [ 8, "uint64" ], + "WriteHasWrapped": [ 18, "uint8" ], + "CurrentPtr": [ 24, "pointer" ], + "ChunkListHead": 40, + "ChunkListTail": 48, + "CurrentWriteChunk": 64 + }, + "StressLogChunk": { + "!": 32792, + "Prev": 0, + "Next": 8, + "Buf": 16, + "Sig1": 32784, + "Sig2": 32788 + }, + "StressMsgHeader": { + "!": 16 + }, + "StressMsg": { + "Header": [ 0, "StressMsgHeader" ], + "Args": 16 + } + }, + "globals": { + "StressLogEnabled": [ "0x1", "uint8" ], + "StressLogHasModuleTable": [ "0x1", "uint8" ], + "StressLogMaxModules": [ "0x5", "uint64" ], + "StressLogChunkSize": [ "0x8000", "uint32" ], + "StressLogMaxMessageSize": [ "0x208", "uint64" ], + "StressLogModuleTable": [[ 1 ], "pointer" ], + }, + "contracts": { + "StressLog": 2, + } + } + """"u8)!; +} diff --git a/src/tools/StressLogAnalyzer/src/StressLogAnalyzer.cs b/src/tools/StressLogAnalyzer/src/StressLogAnalyzer.cs new file mode 100644 index 00000000000000..c59bab54ecd8bc --- /dev/null +++ b/src/tools/StressLogAnalyzer/src/StressLogAnalyzer.cs @@ -0,0 +1,176 @@ +// 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.Collections.Concurrent; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Microsoft.Diagnostics.DataContractReader.Contracts; +using Microsoft.Diagnostics.DataContractReader; +using System.Buffers; +using System.Collections; +using StressLogAnalyzer.Filters; +using StressLogAnalyzer.Output; +using System.Diagnostics; + +namespace StressLogAnalyzer; + +internal sealed class StressLogAnalyzer( + Func stressLogContractFactory, + IInterestingStringFinder stringFinder, + IMessageFilter messageFilter, + ThreadFilter threadFilter, + ThreadFilter? earliestMessageFilter) +{ + public async Task<(ulong messagesProcessed, ulong messagesPrinted)> AnalyzeLogsAsync(TargetPointer logsPointer, TimeTracker timeTracker, GCThreadMap gcThreadMap, IStressMessageOutput messageOutput, CancellationToken token) + { + IStressLog outerLogContract = stressLogContractFactory(); + IEnumerable logs = [.. outerLogContract.GetThreadStressLogs(logsPointer)]; + + // The "end" timestamp is the timestamp of the most recent message. + timeTracker.SetEndTimestamp( + logs.Select( + log => outerLogContract.GetStressMessages(log).FirstOrDefault().Timestamp) + .Max()); + + if (!threadFilter.HasAnyGCThreadFilter) + { + // If we don't have any GC thread filters, we can pre-filter on thread ID now. + // Otherwise, we need to wait until we identify which threads are GC threads before + // we can filter. + logs = logs.Where(log => threadFilter.IncludeThread(log.ThreadId)); + } + + ConcurrentBag<(ThreadStressLogData thread, StressMsgData message)> earliestMessages = []; + ConcurrentBag<(ThreadStressLogData thread, StressMsgData message, int numMessageOnThread)> allMessages = []; + + using ThreadLocal numMessagesProcessed = new(() => 0, trackAllValues: true); + + var parallelOptions = new ParallelOptions { CancellationToken = token, MaxDegreeOfParallelism = /*Debugger.IsAttached ? 1 : */Environment.ProcessorCount }; + + using (ThreadLocal stressLogContract = new(() => stressLogContractFactory())) + { + await Parallel.ForEachAsync(logs, parallelOptions, (log, ct) => + { + // Stress logs are traversed from newest message to oldest, so the last message we see is the earliest one. + StressMsgData? earliestMessage = null; + List localMessages = []; + bool includeThreadMessages = true; + foreach (StressMsgData message in stressLogContract.Value!.GetStressMessages(log)) + { + numMessagesProcessed.Value++; + token.ThrowIfCancellationRequested(); + + earliestMessage = message; + + TimeTracker.TimeQueryResult time = timeTracker.IsInTimeRange(message.Timestamp); + + if (time == TimeTracker.TimeQueryResult.AfterRange) + { + // We still haven't reached the interesting time range. + // Skip this message. + continue; + } + else if (time == TimeTracker.TimeQueryResult.BeforeRange) + { + // We've passed the interesting time range. + // We can stop processing this thread. + break; + } + // Otherwise, we're in the interesting time range. + + if (messageFilter.IncludeMessage(message)) + { + localMessages.Add(message); + } + + if (!stringFinder.IsWellKnown(message.FormatString, out WellKnownString wellKnown)) + { + // If the string isn't a well-known string, we've finished the processing we need to do. + // Go to the next message. + continue; + } + + if (wellKnown == WellKnownString.GCSTART) + { + timeTracker.RecordGCStart(message.Args[0], message.Timestamp); + } + else if (wellKnown == WellKnownString.GCEND) + { + timeTracker.RecordGCEnd(message.Args[0], message.Timestamp); + } + + if (gcThreadMap.TryRememberHeapForThread(log.ThreadId, wellKnown, message.Args, out ulong heapNumber, out bool isBackground) + && threadFilter.HasAnyGCThreadFilter + && !threadFilter.IncludeHeapThread(heapNumber, isBackground) + && !threadFilter.IncludeThread(log.ThreadId)) + { + // As soon as we know that this thread corresponds to a thread that we definitely don't care about, + // we can skip processing + // the rest of the messages on this thread log. + // We also won't push these messages up for later processing. + includeThreadMessages = false; + break; + } + } + + // If we didn't determine that this thread should be filtered, add the messages to the bag now. + if (includeThreadMessages) + { + for (int i = 0; i < localMessages.Count; i++) + { + allMessages.Add((log, localMessages[i], i)); + } + } + + // If we're recording the earliest messages for this thread, do so now. + if (earliestMessage is not null + && earliestMessageFilter is not null + && gcThreadMap.IncludeThread(log.ThreadId, earliestMessageFilter)) + { + earliestMessages.Add((log, earliestMessage.Value)); + } + return ValueTask.CompletedTask; + }).ConfigureAwait(false); + } + + IEnumerable<(ThreadStressLogData thread, StressMsgData message, int numMessageOnThread)> messages = allMessages; + + if (threadFilter.HasAnyGCThreadFilter) + { + // If we have GC thread filters, we have filtered out threads that we know are GC threads we don't care about. + // However, if the thread is not a GC thread at all, then we haven't filtered it out yet. + // Filter out uninteresting threads that aren't GC threads now. + messages = messages.Where(message => gcThreadMap.ThreadHasHeap(message.thread.ThreadId) || threadFilter.IncludeThread(message.thread.ThreadId)); + } + + // Now that we know all GC times, we can filter out messages that aren't in interesting GC time ranges. + messages = messages.Where(message => timeTracker.IsInInterestingGCTimeRange(message.message.Timestamp)); + + // Order by timestamp and then by thread id + messages = messages.OrderByDescending(message => (message.message.Timestamp, message.thread.ThreadId)) + .ThenBy(message => message.numMessageOnThread); + + ulong messagesPrinted = 0; + foreach (var message in messages) + { + messagesPrinted++; + await messageOutput.OutputMessageAsync(message.thread, message.message).ConfigureAwait(false); + } + + if (earliestMessageFilter is not null) + { + await messageOutput.OutputLineAsync("\nEarliest messages:").ConfigureAwait(false); + + // TODO: Sort messages by timestamp + foreach ((ThreadStressLogData thread, StressMsgData message) in earliestMessages.OrderBy(message => (message.message.Timestamp, message.thread.ThreadId))) + { + await messageOutput.OutputMessageAsync(thread, message).ConfigureAwait(false); + } + } + + return (numMessagesProcessed.Values.Aggregate(0ul, (acc, val) => acc + val), messagesPrinted); + } +} diff --git a/src/tools/StressLogAnalyzer/src/StressLogAnalyzer.csproj b/src/tools/StressLogAnalyzer/src/StressLogAnalyzer.csproj new file mode 100644 index 00000000000000..24d4fdc765f6c1 --- /dev/null +++ b/src/tools/StressLogAnalyzer/src/StressLogAnalyzer.csproj @@ -0,0 +1,22 @@ + + + + Exe + $(NetCoreAppToolCurrent) + enable + enable + false + true + $(NoWarn);CA1852;CS0649;NETCDAC0001 + true + + + + + + + + + + + diff --git a/src/tools/StressLogAnalyzer/src/StressLogHeader.cs b/src/tools/StressLogAnalyzer/src/StressLogHeader.cs new file mode 100644 index 00000000000000..a57f2f28b8cf58 --- /dev/null +++ b/src/tools/StressLogAnalyzer/src/StressLogHeader.cs @@ -0,0 +1,66 @@ +// 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.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; + +namespace StressLogAnalyzer; + +[StructLayout(LayoutKind.Sequential)] +internal struct StressLogHeader +{ + public nint headerSize; + + [InlineArray(4)] + public struct Magic + { + private byte b; + } + public Magic magic; + + public uint version; + public nuint memoryBase; + public nuint memoryCur; + public nuint memoryLimit; + public nuint logs; + public ulong tickFrequency; + public ulong startTimeStamp; + public uint threadsWithNoLog; + private uint reserved1; + + [InlineArray(15)] + private struct ReservedSpace + { + private ulong reserved; + } + private ReservedSpace reserved2; + + public struct ModuleDesc + { + public nuint baseAddr; + public nuint size; + } + + [InlineArray(5)] + public struct ModuleTable + { + private ModuleDesc moduleDesc; + } + + public ModuleTable moduleTable; + + public const int ModuleImageDataSize = 64 * 1024 * 1024; + + [InlineArray(ModuleImageDataSize)] + public struct ModuleImageData + { + private byte b; + } + + public ModuleImageData moduleImageData; +} diff --git a/src/tools/StressLogAnalyzer/src/TimeTracker.cs b/src/tools/StressLogAnalyzer/src/TimeTracker.cs new file mode 100644 index 00000000000000..1ae0462c3821ed --- /dev/null +++ b/src/tools/StressLogAnalyzer/src/TimeTracker.cs @@ -0,0 +1,121 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +namespace StressLogAnalyzer; + +internal sealed class TimeTracker(ulong startTimestamp, ulong tickFrequency, TimeRange timeRange, IntegerRange? interestingGCRange) +{ + private ulong _firstGCStart; + private ulong _lastGCEnd = ulong.MaxValue; + + public double TicksToSecondsFromStart(ulong timestamp) + => (timestamp - startTimestamp) / (double)tickFrequency; + + public void RecordGCStart(ulong gcIndex, ulong timestamp) + { + if (interestingGCRange is null) + { + // If we have no interesting GC range, then we don't need to track any GC times. + return; + } + + if (gcIndex < interestingGCRange.Value.Start || interestingGCRange.Value.End < gcIndex) + { + // If this gc is out of the interesting GC range, then we don't need to track it. + return; + } + + if (Volatile.Read(ref _firstGCStart) == 0) + { + // If we haven't recorded any GC start times yet, then this is the first one. + // Use Interlocked.CompareExchange to ensure that only one thread initializes the first GC start time. + Interlocked.CompareExchange(ref _firstGCStart, timestamp, 0); + } + + // Record this GC start time as the first GC start time if it's earlier than the current first GC start time. + ulong firstGCStart = Volatile.Read(ref _firstGCStart); + while (timestamp < firstGCStart) + { + firstGCStart = Interlocked.CompareExchange(ref _firstGCStart, timestamp, firstGCStart); + } + } + + public void RecordGCEnd(ulong gcIndex, ulong timestamp) + { + if (interestingGCRange is null) + { + // If we have no interesting GC range, then we don't need to track any GC times. + return; + } + + if (gcIndex < interestingGCRange.Value.Start || interestingGCRange.Value.End < gcIndex) + { + // If this gc is out of the interesting GC range, then we don't need to track it. + return; + } + + if (Volatile.Read(ref _lastGCEnd) == ulong.MaxValue) + { + // If we haven't recorded any GC end times yet, or if the last GC end time is currently the end of the log, + // then this is the last interesting one. + // Use Interlocked.CompareExchange to ensure that only one thread initializes the last GC end time. + Interlocked.CompareExchange(ref _lastGCEnd, timestamp, ulong.MaxValue); + } + + // Record this GC end time as the last GC end time if it's later than the current first GC start time. + ulong lastGCEnd = Volatile.Read(ref _lastGCEnd); + while (lastGCEnd < timestamp) + { + lastGCEnd = Interlocked.CompareExchange(ref _lastGCEnd, timestamp, lastGCEnd); + } + } + + public void SetEndTimestamp(ulong endTimestamp) + { + double recordedTime = TicksToSecondsFromStart(endTimestamp); + if (timeRange is not null) + { + if (timeRange.StartTimestamp < 0) + { + timeRange = new TimeRange(Math.Max(recordedTime + timeRange.StartTimestamp, 0), recordedTime); + } + else if (timeRange.EndTimestamp == double.MaxValue) + { + timeRange = timeRange with { EndTimestamp = recordedTime }; + } + } + } + + public enum TimeQueryResult + { + BeforeRange, + InRange, + AfterRange + } + + public TimeQueryResult IsInTimeRange(ulong timestamp) + { + if (timeRange is null) + { + // If we have no time range, then we'll treat all messages as in range. + return TimeQueryResult.InRange; + } + + double recordedTime = TicksToSecondsFromStart(timestamp); + if (recordedTime < timeRange.StartTimestamp) + { + return TimeQueryResult.BeforeRange; + } + if (recordedTime > timeRange.EndTimestamp) + { + return TimeQueryResult.AfterRange; + } + + return TimeQueryResult.InRange; + } + + public bool IsInInterestingGCTimeRange(ulong timestamp) + { + return timestamp >= _firstGCStart && timestamp <= _lastGCEnd; + } +} From 9283581f414305c4b829d91d6313ae54e73060cc Mon Sep 17 00:00:00 2001 From: Khushal Modi Date: Tue, 18 Feb 2025 15:04:31 -0800 Subject: [PATCH 14/27] Use Avx10.2 Instructions in Floating Point Conversions (#111775) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add support for AVX10.2. Add AVX10.2 API surface and template tests. Lower Avx10.2 nodes accordingly. * Add support and template tests for AVX10v2_V512 * Add new coredistools.dll build from latest llvm repo * Limit JIT unit suite within the subsets which are stable in SDE. * Rename API as per latest API proposal discussions * fix sample tests in handwritten project * Revert "Limit JIT unit suite within the subsets which are stable in SDE." This reverts commit 067e31e0b7b55fc3c70d69592e4fed9dd577f462. * Limit JIT unit suite within the subsets which are stable in SDE. * Allow a prefix of 0x00 for AVX10.2 instructions. * Revert "Limit JIT unit suite within the subsets which are stable in SDE." This reverts commit 067e31e0b7b55fc3c70d69592e4fed9dd577f462. * Limit JIT unit suite within the subsets which are stable in SDE. * remove developer comments from files * Enable all template tests and enable ymm embedded rounding * Make emitter independent of ISa and based on insOpts for ymm embedded rounding * Enable ymm embedded rounding based on architecture * Revert "Make emitter independent of ISa and based on insOpts for ymm embedded rounding" This reverts commit 493572f098e1390a11fa1523b03fcd2833a98173. * Separate Avx10.2 unit testing framework from APX framework * Revert "Limit JIT unit suite within the subsets which are stable in SDE." This reverts commit 067e31e0b7b55fc3c70d69592e4fed9dd577f462. * Revert "Add new coredistools.dll build from latest llvm repo" This reverts commit 61719f8b1ec9867514323d8f2322915f1de448a8. * Fix formatting * Use new keyword for class V512 to hide Avx10v1.V512 and correct CI errors * Remove MinMax APis from lowering for numargs=2 * Add docstrings for APIs * revert changes for sde execution of tests * Add appropriate comments from reviews * Apply suggestions from code review Co-authored-by: Bruce Forstall * Add emitter tests for XMM9/16 to make sure special handling does not interfere. * Format code * Handle sizePrefix = 0 case when decoding evex instruction * Add assert in appropriate places * Club similar instructions together in perf calculation in emitxarch * Run formatting * Add assembly prints for debug assembly capturing for Avx10.2 * Use correct size when running emitter tests * Ad appropriate comments and make review changes * Use AVX10.2 instructions in conversions * Run formatting * Update comment Co-authored-by: Michał Petryka <35800402+MichalPetryka@users.noreply.github.com> * Optimize the need for compIsa checks and edit comments * Run formatting --------- Co-authored-by: Ruihan-Yin Co-authored-by: Bruce Forstall Co-authored-by: Michał Petryka <35800402+MichalPetryka@users.noreply.github.com> --- src/coreclr/jit/codegenxarch.cpp | 2 +- src/coreclr/jit/emitxarch.cpp | 8 ++++++ src/coreclr/jit/gentree.cpp | 34 +++++++++++++++++++++++- src/coreclr/jit/instr.cpp | 45 +++++++++++++++++++++++--------- src/coreclr/jit/lowerxarch.cpp | 6 ++--- src/coreclr/jit/morph.cpp | 7 +++-- 6 files changed, 83 insertions(+), 19 deletions(-) diff --git a/src/coreclr/jit/codegenxarch.cpp b/src/coreclr/jit/codegenxarch.cpp index bb63af69641404..92acd51c4cdd10 100644 --- a/src/coreclr/jit/codegenxarch.cpp +++ b/src/coreclr/jit/codegenxarch.cpp @@ -7432,7 +7432,7 @@ void CodeGen::genFloatToIntCast(GenTree* treeNode) noway_assert((dstSize == EA_ATTR(genTypeSize(TYP_INT))) || (dstSize == EA_ATTR(genTypeSize(TYP_LONG)))); // We shouldn't be seeing uint64 here as it should have been converted - // into a helper call by either front-end or lowering phase, unless we have AVX512F + // into a helper call by either front-end or lowering phase, unless we have AVX512F/AVX10.x // accelerated conversions. assert(!varTypeIsUnsigned(dstType) || (dstSize != EA_ATTR(genTypeSize(TYP_LONG))) || compiler->canUseEvexEncodingDebugOnly()); diff --git a/src/coreclr/jit/emitxarch.cpp b/src/coreclr/jit/emitxarch.cpp index ad9eace6712c3f..7682b98a3a68ab 100644 --- a/src/coreclr/jit/emitxarch.cpp +++ b/src/coreclr/jit/emitxarch.cpp @@ -13197,6 +13197,14 @@ void emitter::emitDispIns( case INS_vcvttsd2usi64: case INS_vcvttss2usi32: case INS_vcvttss2usi64: + case INS_vcvttsd2sis32: + case INS_vcvttsd2sis64: + case INS_vcvttss2sis32: + case INS_vcvttss2sis64: + case INS_vcvttsd2usis32: + case INS_vcvttsd2usis64: + case INS_vcvttss2usis32: + case INS_vcvttss2usis64: { assert(!id->idIsEvexAaaContextSet()); printf("%s, %s", emitRegName(id->idReg1(), attr), emitRegName(id->idReg2(), EA_16BYTE)); diff --git a/src/coreclr/jit/gentree.cpp b/src/coreclr/jit/gentree.cpp index 9909dc34fa7d26..98f2ac00a99507 100644 --- a/src/coreclr/jit/gentree.cpp +++ b/src/coreclr/jit/gentree.cpp @@ -21689,7 +21689,39 @@ GenTree* Compiler::gtNewSimdCvtNode(var_types type, GenTree* fixupVal; bool isV512Supported = false; - if (compIsEvexOpportunisticallySupported(isV512Supported)) + if (compOpportunisticallyDependsOn(InstructionSet_AVX10v2)) + { + NamedIntrinsic cvtIntrinsic = NI_Illegal; + switch (simdTargetBaseType) + { + case TYP_INT: + cvtIntrinsic = (simdSize == 64) ? NI_AVX10v2_V512_ConvertToVectorInt32WithTruncationSaturation + : NI_AVX10v2_ConvertToVectorInt32WithTruncationSaturation; + break; + + case TYP_UINT: + cvtIntrinsic = (simdSize == 64) ? NI_AVX10v2_V512_ConvertToVectorUInt32WithTruncationSaturation + : NI_AVX10v2_ConvertToVectorUInt32WithTruncationSaturation; + break; + + case TYP_LONG: + cvtIntrinsic = (simdSize == 64) ? NI_AVX10v2_V512_ConvertToVectorInt64WithTruncationSaturation + : NI_AVX10v2_ConvertToVectorInt64WithTruncationSaturation; + break; + + case TYP_ULONG: + cvtIntrinsic = (simdSize == 64) ? NI_AVX10v2_V512_ConvertToVectorUInt64WithTruncationSaturation + : NI_AVX10v2_ConvertToVectorUInt64WithTruncationSaturation; + break; + + default: + { + unreached(); + } + } + return gtNewSimdHWIntrinsicNode(type, op1, cvtIntrinsic, simdSourceBaseJitType, simdSize); + } + else if (compIsEvexOpportunisticallySupported(isV512Supported)) { /*Generate the control table for VFIXUPIMMSD/SS - For conversion to unsigned diff --git a/src/coreclr/jit/instr.cpp b/src/coreclr/jit/instr.cpp index 403ba87632c4db..fe3da0a63eb904 100644 --- a/src/coreclr/jit/instr.cpp +++ b/src/coreclr/jit/instr.cpp @@ -2420,6 +2420,11 @@ instruction CodeGen::ins_MathOp(genTreeOps oper, var_types type) // instruction CodeGen::ins_FloatConv(var_types to, var_types from) { + // AVX: Supports following conversions + // srcType = int16/int64 castToType = float + // AVX512: Supports following conversions + // srcType = ulong castToType = double/float + bool isAvx10v2 = false; switch (from) { case TYP_INT: @@ -2471,36 +2476,52 @@ instruction CodeGen::ins_FloatConv(var_types to, var_types from) break; case TYP_FLOAT: + if (to == TYP_FLOAT) + { + return ins_Move_Extend(TYP_FLOAT, false); + } + else if (to == TYP_DOUBLE) + { + return INS_cvtss2sd; + } + isAvx10v2 = compiler->compOpportunisticallyDependsOn(InstructionSet_AVX10v2); + switch (to) { case TYP_INT: - return INS_cvttss2si32; + return isAvx10v2 ? INS_vcvttss2sis32 : INS_cvttss2si32; case TYP_LONG: - return INS_cvttss2si64; - case TYP_DOUBLE: - return INS_cvtss2sd; + return isAvx10v2 ? INS_vcvttss2sis64 : INS_cvttss2si64; case TYP_ULONG: - return INS_vcvttss2usi64; + return isAvx10v2 ? INS_vcvttss2usis64 : INS_vcvttss2usi64; case TYP_UINT: - return INS_vcvttss2usi32; + return isAvx10v2 ? INS_vcvttss2usis32 : INS_vcvttss2usi32; default: unreached(); } break; case TYP_DOUBLE: + if (to == TYP_FLOAT) + { + return INS_cvtsd2ss; + } + else if (to == TYP_DOUBLE) + { + return ins_Move_Extend(TYP_DOUBLE, false); + } + isAvx10v2 = compiler->compOpportunisticallyDependsOn(InstructionSet_AVX10v2); + switch (to) { case TYP_INT: - return INS_cvttsd2si32; + return isAvx10v2 ? INS_vcvttsd2sis32 : INS_cvttsd2si32; case TYP_LONG: - return INS_cvttsd2si64; - case TYP_FLOAT: - return INS_cvtsd2ss; + return isAvx10v2 ? INS_vcvttsd2sis64 : INS_cvttsd2si64; case TYP_ULONG: - return INS_vcvttsd2usi64; + return isAvx10v2 ? INS_vcvttsd2usis64 : INS_vcvttsd2usi64; case TYP_UINT: - return INS_vcvttsd2usi32; + return isAvx10v2 ? INS_vcvttsd2usis32 : INS_vcvttsd2usi32; default: unreached(); } diff --git a/src/coreclr/jit/lowerxarch.cpp b/src/coreclr/jit/lowerxarch.cpp index f5027e142de353..a5fc49d1af9822 100644 --- a/src/coreclr/jit/lowerxarch.cpp +++ b/src/coreclr/jit/lowerxarch.cpp @@ -851,7 +851,9 @@ GenTree* Lowering::LowerCast(GenTree* tree) #if defined(TARGET_AMD64) // Handle saturation logic for X64 - if (varTypeIsFloating(srcType) && varTypeIsIntegral(dstType) && !varTypeIsSmall(dstType)) + // Let InstructionSet_AVX10v2 pass through since it can handle the saturation + if (varTypeIsFloating(srcType) && varTypeIsIntegral(dstType) && !varTypeIsSmall(dstType) && + !comp->compOpportunisticallyDependsOn(InstructionSet_AVX10v2)) { // We should have filtered out float -> long conversion and // converted it to float -> double -> long conversion. @@ -868,10 +870,8 @@ GenTree* Lowering::LowerCast(GenTree* tree) bool isV512Supported = false; /*The code below is to introduce saturating conversions on X86/X64. The C# equivalence of the code is given below --> - // Replace QNaN and SNaN with Zero op1 = Avx512F.Fixup(op1, op1, Vector128.Create(0x88), 0); - // Convert from double to long, replacing any values that were greater than or equal to MaxValue with MaxValue // Values that were less than or equal to MinValue will already be MinValue diff --git a/src/coreclr/jit/morph.cpp b/src/coreclr/jit/morph.cpp index bd1a9c86bcf744..705863272f8d9e 100644 --- a/src/coreclr/jit/morph.cpp +++ b/src/coreclr/jit/morph.cpp @@ -305,8 +305,9 @@ GenTree* Compiler::fgMorphExpandCast(GenTreeCast* tree) // dstType = int for SSE41 // For pre-SSE41, the all src is converted to TYP_DOUBLE // and goes through helpers. - && (tree->gtOverflow() || (dstType == TYP_LONG) || - !(canUseEvexEncoding() || (dstType == TYP_INT && compOpportunisticallyDependsOn(InstructionSet_SSE41)))) + && + (tree->gtOverflow() || (dstType == TYP_LONG && !compOpportunisticallyDependsOn(InstructionSet_AVX10v2)) || + !(canUseEvexEncoding() || (dstType == TYP_INT && compOpportunisticallyDependsOn(InstructionSet_SSE41)))) #elif defined(TARGET_ARM) // Arm: src = float, dst = int64/uint64 or overflow conversion. && (tree->gtOverflow() || varTypeIsLong(dstType)) @@ -340,6 +341,8 @@ GenTree* Compiler::fgMorphExpandCast(GenTreeCast* tree) #else #if defined(TARGET_AMD64) // Following nodes are handled when lowering the nodes + // float -> ulong/uint/int/long for AVX10.2 + // double -> ulong/uint/int/long for AVX10.2 // float -> ulong/uint/int for AVX512F // double -> ulong/uint/long/int for AVX512F // float -> int for SSE41 From 8b6071e387a448fe66b950c3360ec1a367efa18a Mon Sep 17 00:00:00 2001 From: Aman Khalid Date: Tue, 18 Feb 2025 19:09:49 -0500 Subject: [PATCH 15/27] JIT: Use `fgCalledCount` for OSR method entry weight (#112662) Follow-up to #112499. By ensuring OSR method entry blocks' weights match fgCalledCount during entry canonicalization, we can guarantee that later runs of profile synthesis won't modify fgCalledCount. This should unblock #111915 (comment). --- src/coreclr/jit/fgbasic.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/coreclr/jit/fgbasic.cpp b/src/coreclr/jit/fgbasic.cpp index 76a9fc04ad6068..5d4a31d0f05038 100644 --- a/src/coreclr/jit/fgbasic.cpp +++ b/src/coreclr/jit/fgbasic.cpp @@ -4046,18 +4046,13 @@ void Compiler::fgFixEntryFlowForOSR() fgRedirectTargetEdge(fgFirstBB, fgOSREntryBB); - // We don't know the right weight for this block, since - // execution of the method was interrupted within the - // loop containing fgOSREntryBB. - // - // A plausible guess might be to sum the non-backedge - // weights of fgOSREntryBB and use those, but we don't - // have edge weights available yet. Note that might be - // an underestimate. - // - // For now we just guess that the loop will execute 100x. - // - fgFirstBB->inheritWeightPercentage(fgOSREntryBB, 1); + fgFirstBB->bbWeight = fgCalledCount; + fgFirstBB->CopyFlags(fgEntryBB, BBF_PROF_WEIGHT); + + if (fgCalledCount == BB_ZERO_WEIGHT) + { + fgFirstBB->bbSetRunRarely(); + } JITDUMP("OSR: redirecting flow at method entry from " FMT_BB " to OSR entry " FMT_BB " for the importer\n", fgFirstBB->bbNum, fgOSREntryBB->bbNum); From cc2019bc0b25e724275dba81ab9c295879ad8cb3 Mon Sep 17 00:00:00 2001 From: Steve Molloy Date: Tue, 18 Feb 2025 16:32:20 -0800 Subject: [PATCH 16/27] Reflection-based XmlSerializer - Deserialize empty collections and allow for sub-types in collection items. (#111723) * Add tests to verify issue and fix. * Check for type-assignability instead of equivallence. Also fix Choice logic. * Add tests to verify issue and fix. * Ensure collections are initialized to empty - even if they should be null according to the xml. * More tests for bringing reflection-based serializer to quirky parity with ILGen. * Fix Xml/Type mapping to use proper member info with hidden/inherited type members; Fix List-handling in reflection serializer. * Cleanup tests and comments based on PR feedback. * While considering initializing empty lists at object creation instead of post-deserialization - noticed a missed empty-list case. --- ...ted.SerializableAssembly.XmlSerializers.cs | 5718 ++++++++++------- .../src/System/Xml/Serialization/Mappings.cs | 25 + .../ReflectionXmlSerializationReader.cs | 101 +- .../ReflectionXmlSerializationWriter.cs | 97 +- .../src/System/Xml/Serialization/Types.cs | 26 +- .../Serialization/XmlReflectionImporter.cs | 36 +- .../System/Xml/Serialization/XmlSerializer.cs | 1 - .../XmlSerializerTests.RuntimeOnly.cs | 386 +- .../tests/XmlSerializer/XmlSerializerTests.cs | 249 +- .../tests/SerializationTypes.RuntimeOnly.cs | 192 +- .../tests/SerializationTypes.cs | 94 +- 11 files changed, 4464 insertions(+), 2461 deletions(-) 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 1b0becc039e585..5bd5f18744170f 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 Write111_TypeWithXmlElementProperty(object o) { + public void Write115_TypeWithXmlElementProperty(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithXmlElementProperty", @""); @@ -16,7 +16,7 @@ public void Write111_TypeWithXmlElementProperty(object o) { Write2_TypeWithXmlElementProperty(@"TypeWithXmlElementProperty", @"", ((global::TypeWithXmlElementProperty)o), true, false); } - public void Write112_TypeWithXmlDocumentProperty(object o) { + public void Write116_TypeWithXmlDocumentProperty(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithXmlDocumentProperty", @""); @@ -26,7 +26,7 @@ public void Write112_TypeWithXmlDocumentProperty(object o) { Write3_TypeWithXmlDocumentProperty(@"TypeWithXmlDocumentProperty", @"", ((global::TypeWithXmlDocumentProperty)o), true, false); } - public void Write113_TypeWithBinaryProperty(object o) { + public void Write117_TypeWithBinaryProperty(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithBinaryProperty", @""); @@ -36,7 +36,7 @@ public void Write113_TypeWithBinaryProperty(object o) { Write4_TypeWithBinaryProperty(@"TypeWithBinaryProperty", @"", ((global::TypeWithBinaryProperty)o), true, false); } - public void Write114_Item(object o) { + public void Write118_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithDateTimeOffsetProperties", @""); @@ -46,7 +46,7 @@ public void Write114_Item(object o) { Write5_Item(@"TypeWithDateTimeOffsetProperties", @"", ((global::TypeWithDateTimeOffsetProperties)o), true, false); } - public void Write115_TypeWithTimeSpanProperty(object o) { + public void Write119_TypeWithTimeSpanProperty(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithTimeSpanProperty", @""); @@ -56,7 +56,7 @@ public void Write115_TypeWithTimeSpanProperty(object o) { Write6_TypeWithTimeSpanProperty(@"TypeWithTimeSpanProperty", @"", ((global::TypeWithTimeSpanProperty)o), true, false); } - public void Write116_Item(object o) { + public void Write120_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithDefaultTimeSpanProperty", @""); @@ -66,7 +66,7 @@ public void Write116_Item(object o) { Write7_Item(@"TypeWithDefaultTimeSpanProperty", @"", ((global::TypeWithDefaultTimeSpanProperty)o), true, false); } - public void Write117_TypeWithByteProperty(object o) { + public void Write121_TypeWithByteProperty(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithByteProperty", @""); @@ -76,7 +76,7 @@ public void Write117_TypeWithByteProperty(object o) { Write8_TypeWithByteProperty(@"TypeWithByteProperty", @"", ((global::TypeWithByteProperty)o), true, false); } - public void Write118_TypeWithXmlNodeArrayProperty(object o) { + public void Write122_TypeWithXmlNodeArrayProperty(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithXmlNodeArrayProperty", @""); @@ -86,7 +86,7 @@ public void Write118_TypeWithXmlNodeArrayProperty(object o) { Write9_TypeWithXmlNodeArrayProperty(@"TypeWithXmlNodeArrayProperty", @"", ((global::TypeWithXmlNodeArrayProperty)o), true, false); } - public void Write119_Animal(object o) { + public void Write123_Animal(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"Animal", @""); @@ -96,7 +96,7 @@ public void Write119_Animal(object o) { Write10_Animal(@"Animal", @"", ((global::Animal)o), true, false); } - public void Write120_Dog(object o) { + public void Write124_Dog(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"Dog", @""); @@ -106,7 +106,7 @@ public void Write120_Dog(object o) { Write12_Dog(@"Dog", @"", ((global::Dog)o), true, false); } - public void Write121_DogBreed(object o) { + public void Write125_DogBreed(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"DogBreed", @""); @@ -115,7 +115,7 @@ public void Write121_DogBreed(object o) { WriteElementString(@"DogBreed", @"", Write11_DogBreed(((global::DogBreed)o))); } - public void Write122_Group(object o) { + public void Write126_Group(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"Group", @""); @@ -125,7 +125,7 @@ public void Write122_Group(object o) { Write14_Group(@"Group", @"", ((global::Group)o), true, false); } - public void Write123_Vehicle(object o) { + public void Write127_Vehicle(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"Vehicle", @""); @@ -135,7 +135,7 @@ public void Write123_Vehicle(object o) { Write13_Vehicle(@"Vehicle", @"", ((global::Vehicle)o), true, false); } - public void Write124_Employee(object o) { + public void Write128_Employee(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"Employee", @""); @@ -145,7 +145,7 @@ public void Write124_Employee(object o) { Write15_Employee(@"Employee", @"", ((global::Employee)o), true, false); } - public void Write125_BaseClass(object o) { + public void Write129_BaseClass(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"BaseClass", @""); @@ -155,7 +155,7 @@ public void Write125_BaseClass(object o) { Write17_BaseClass(@"BaseClass", @"", ((global::BaseClass)o), true, false); } - public void Write126_DerivedClass(object o) { + public void Write130_DerivedClass(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"DerivedClass", @""); @@ -165,7 +165,7 @@ public void Write126_DerivedClass(object o) { Write16_DerivedClass(@"DerivedClass", @"", ((global::DerivedClass)o), true, false); } - public void Write127_SimpleBaseClass(object o) { + public void Write131_SimpleBaseClass(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"SimpleBaseClass", @""); @@ -175,7 +175,7 @@ public void Write127_SimpleBaseClass(object o) { Write19_SimpleBaseClass(@"SimpleBaseClass", @"", ((global::SimpleBaseClass)o), true, false); } - public void Write128_SimpleDerivedClass(object o) { + public void Write132_SimpleDerivedClass(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"SimpleDerivedClass", @""); @@ -185,7 +185,7 @@ public void Write128_SimpleDerivedClass(object o) { Write18_SimpleDerivedClass(@"SimpleDerivedClass", @"", ((global::SimpleDerivedClass)o), true, false); } - public void Write129_BaseIXmlSerializable(object o) { + public void Write133_BaseIXmlSerializable(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"BaseIXmlSerializable", @"http://example.com/serializer-test-namespace"); @@ -195,7 +195,7 @@ public void Write129_BaseIXmlSerializable(object o) { WriteSerializable((System.Xml.Serialization.IXmlSerializable)((global::XmlSerializableBaseClass)o), @"BaseIXmlSerializable", @"http://example.com/serializer-test-namespace", true, true); } - public void Write130_DerivedIXmlSerializable(object o) { + public void Write134_DerivedIXmlSerializable(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"DerivedIXmlSerializable", @""); @@ -205,7 +205,7 @@ public void Write130_DerivedIXmlSerializable(object o) { WriteSerializable((System.Xml.Serialization.IXmlSerializable)((global::XmlSerializableDerivedClass)o), @"DerivedIXmlSerializable", @"", true, true); } - public void Write131_PurchaseOrder(object o) { + public void Write135_PurchaseOrder(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"PurchaseOrder", @"http://www.contoso1.com"); @@ -215,7 +215,7 @@ public void Write131_PurchaseOrder(object o) { Write22_PurchaseOrder(@"PurchaseOrder", @"http://www.contoso1.com", ((global::PurchaseOrder)o), false, false); } - public void Write132_Address(object o) { + public void Write136_Address(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"Address", @""); @@ -225,7 +225,7 @@ public void Write132_Address(object o) { Write23_Address(@"Address", @"", ((global::Address)o), true, false); } - public void Write133_OrderedItem(object o) { + public void Write137_OrderedItem(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"OrderedItem", @""); @@ -235,7 +235,7 @@ public void Write133_OrderedItem(object o) { Write24_OrderedItem(@"OrderedItem", @"", ((global::OrderedItem)o), true, false); } - public void Write134_AliasedTestType(object o) { + public void Write138_AliasedTestType(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"AliasedTestType", @""); @@ -245,7 +245,7 @@ public void Write134_AliasedTestType(object o) { Write25_AliasedTestType(@"AliasedTestType", @"", ((global::AliasedTestType)o), true, false); } - public void Write135_BaseClass1(object o) { + public void Write139_BaseClass1(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"BaseClass1", @""); @@ -255,7 +255,7 @@ public void Write135_BaseClass1(object o) { Write26_BaseClass1(@"BaseClass1", @"", ((global::BaseClass1)o), true, false); } - public void Write136_DerivedClass1(object o) { + public void Write140_DerivedClass1(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"DerivedClass1", @""); @@ -265,7 +265,7 @@ public void Write136_DerivedClass1(object o) { Write27_DerivedClass1(@"DerivedClass1", @"", ((global::DerivedClass1)o), true, false); } - public void Write137_ArrayOfDateTime(object o) { + public void Write141_ArrayOfDateTime(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"ArrayOfDateTime", @""); @@ -290,7 +290,7 @@ public void Write137_ArrayOfDateTime(object o) { } } - public void Write138_Orchestra(object o) { + public void Write142_Orchestra(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"Orchestra", @""); @@ -300,7 +300,7 @@ public void Write138_Orchestra(object o) { Write29_Orchestra(@"Orchestra", @"", ((global::Orchestra)o), true, false); } - public void Write139_Instrument(object o) { + public void Write143_Instrument(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"Instrument", @""); @@ -310,7 +310,7 @@ public void Write139_Instrument(object o) { Write28_Instrument(@"Instrument", @"", ((global::Instrument)o), true, false); } - public void Write140_Brass(object o) { + public void Write144_Brass(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"Brass", @""); @@ -320,7 +320,7 @@ public void Write140_Brass(object o) { Write30_Brass(@"Brass", @"", ((global::Brass)o), true, false); } - public void Write141_Trumpet(object o) { + public void Write145_Trumpet(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"Trumpet", @""); @@ -330,7 +330,7 @@ public void Write141_Trumpet(object o) { Write31_Trumpet(@"Trumpet", @"", ((global::Trumpet)o), true, false); } - public void Write142_Pet(object o) { + public void Write146_Pet(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"Pet", @""); @@ -340,7 +340,7 @@ public void Write142_Pet(object o) { Write32_Pet(@"Pet", @"", ((global::Pet)o), true, false); } - public void Write143_DefaultValuesSetToNaN(object o) { + public void Write147_DefaultValuesSetToNaN(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"DefaultValuesSetToNaN", @""); @@ -350,7 +350,7 @@ public void Write143_DefaultValuesSetToNaN(object o) { Write33_DefaultValuesSetToNaN(@"DefaultValuesSetToNaN", @"", ((global::DefaultValuesSetToNaN)o), true, false); } - public void Write144_Item(object o) { + public void Write148_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"DefaultValuesSetToPositiveInfinity", @""); @@ -360,7 +360,7 @@ public void Write144_Item(object o) { Write34_Item(@"DefaultValuesSetToPositiveInfinity", @"", ((global::DefaultValuesSetToPositiveInfinity)o), true, false); } - public void Write145_Item(object o) { + public void Write149_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"DefaultValuesSetToNegativeInfinity", @""); @@ -370,7 +370,7 @@ public void Write145_Item(object o) { Write35_Item(@"DefaultValuesSetToNegativeInfinity", @"", ((global::DefaultValuesSetToNegativeInfinity)o), true, false); } - public void Write146_RootElement(object o) { + public void Write150_RootElement(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"RootElement", @""); @@ -380,7 +380,7 @@ public void Write146_RootElement(object o) { Write36_Item(@"RootElement", @"", ((global::TypeWithMismatchBetweenAttributeAndPropertyType)o), true, false); } - public void Write147_TypeWithLinkedProperty(object o) { + public void Write151_TypeWithLinkedProperty(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithLinkedProperty", @""); @@ -390,7 +390,7 @@ public void Write147_TypeWithLinkedProperty(object o) { Write37_TypeWithLinkedProperty(@"TypeWithLinkedProperty", @"", ((global::TypeWithLinkedProperty)o), true, false); } - public void Write148_Document(object o) { + public void Write152_Document(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"Document", @"http://example.com"); @@ -400,7 +400,7 @@ public void Write148_Document(object o) { Write38_MsgDocumentType(@"Document", @"http://example.com", ((global::MsgDocumentType)o), true, false); } - public void Write149_RootClass(object o) { + public void Write153_RootClass(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"RootClass", @""); @@ -410,7 +410,7 @@ public void Write149_RootClass(object o) { Write41_RootClass(@"RootClass", @"", ((global::RootClass)o), true, false); } - public void Write150_Parameter(object o) { + public void Write154_Parameter(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"Parameter", @""); @@ -420,7 +420,7 @@ public void Write150_Parameter(object o) { Write40_Parameter(@"Parameter", @"", ((global::Parameter)o), true, false); } - public void Write151_XElementWrapper(object o) { + public void Write155_XElementWrapper(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"XElementWrapper", @""); @@ -430,7 +430,7 @@ public void Write151_XElementWrapper(object o) { Write42_XElementWrapper(@"XElementWrapper", @"", ((global::XElementWrapper)o), true, false); } - public void Write152_XElementStruct(object o) { + public void Write156_XElementStruct(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"XElementStruct", @""); @@ -439,7 +439,7 @@ public void Write152_XElementStruct(object o) { Write43_XElementStruct(@"XElementStruct", @"", ((global::XElementStruct)o), false); } - public void Write153_XElementArrayWrapper(object o) { + public void Write157_XElementArrayWrapper(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"XElementArrayWrapper", @""); @@ -449,7 +449,7 @@ public void Write153_XElementArrayWrapper(object o) { Write44_XElementArrayWrapper(@"XElementArrayWrapper", @"", ((global::XElementArrayWrapper)o), true, false); } - public void Write154_TypeWithDateTimeStringProperty(object o) { + public void Write158_TypeWithDateTimeStringProperty(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithDateTimeStringProperty", @""); @@ -459,7 +459,7 @@ public void Write154_TypeWithDateTimeStringProperty(object o) { Write45_TypeWithDateTimeStringProperty(@"TypeWithDateTimeStringProperty", @"", ((global::SerializationTypes.TypeWithDateTimeStringProperty)o), true, false); } - public void Write155_SimpleType(object o) { + public void Write159_SimpleType(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"SimpleType", @""); @@ -469,7 +469,7 @@ public void Write155_SimpleType(object o) { Write46_SimpleType(@"SimpleType", @"", ((global::SerializationTypes.SimpleType)o), true, false); } - public void Write156_TypeWithGetSetArrayMembers(object o) { + public void Write160_TypeWithGetSetArrayMembers(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithGetSetArrayMembers", @""); @@ -479,7 +479,7 @@ public void Write156_TypeWithGetSetArrayMembers(object o) { Write47_TypeWithGetSetArrayMembers(@"TypeWithGetSetArrayMembers", @"", ((global::SerializationTypes.TypeWithGetSetArrayMembers)o), true, false); } - public void Write157_TypeWithGetOnlyArrayProperties(object o) { + public void Write161_TypeWithGetOnlyArrayProperties(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithGetOnlyArrayProperties", @""); @@ -489,36 +489,46 @@ public void Write157_TypeWithGetOnlyArrayProperties(object o) { Write48_TypeWithGetOnlyArrayProperties(@"TypeWithGetOnlyArrayProperties", @"", ((global::SerializationTypes.TypeWithGetOnlyArrayProperties)o), true, false); } - public void Write158_StructNotSerializable(object o) { + public void Write162_TypeWithArraylikeMembers(object o) { + WriteStartDocument(); + if (o == null) { + WriteNullTagLiteral(@"TypeWithArraylikeMembers", @""); + return; + } + TopLevelElement(); + Write49_TypeWithArraylikeMembers(@"TypeWithArraylikeMembers", @"", ((global::SerializationTypes.TypeWithArraylikeMembers)o), true, false); + } + + public void Write163_StructNotSerializable(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"StructNotSerializable", @""); return; } - Write49_StructNotSerializable(@"StructNotSerializable", @"", ((global::SerializationTypes.StructNotSerializable)o), false); + Write50_StructNotSerializable(@"StructNotSerializable", @"", ((global::SerializationTypes.StructNotSerializable)o), false); } - public void Write159_TypeWithMyCollectionField(object o) { + public void Write164_TypeWithMyCollectionField(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithMyCollectionField", @""); return; } TopLevelElement(); - Write50_TypeWithMyCollectionField(@"TypeWithMyCollectionField", @"", ((global::SerializationTypes.TypeWithMyCollectionField)o), true, false); + Write51_TypeWithMyCollectionField(@"TypeWithMyCollectionField", @"", ((global::SerializationTypes.TypeWithMyCollectionField)o), true, false); } - public void Write160_Item(object o) { + public void Write165_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithReadOnlyMyCollectionProperty", @""); return; } TopLevelElement(); - Write51_Item(@"TypeWithReadOnlyMyCollectionProperty", @"", ((global::SerializationTypes.TypeWithReadOnlyMyCollectionProperty)o), true, false); + Write52_Item(@"TypeWithReadOnlyMyCollectionProperty", @"", ((global::SerializationTypes.TypeWithReadOnlyMyCollectionProperty)o), true, false); } - public void Write161_ArrayOfAnyType(object o) { + public void Write166_ArrayOfAnyType(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"ArrayOfAnyType", @""); @@ -540,335 +550,335 @@ public void Write161_ArrayOfAnyType(object o) { } } - public void Write162_MyEnum(object o) { + public void Write167_MyEnum(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"MyEnum", @""); return; } - WriteElementString(@"MyEnum", @"", Write52_MyEnum(((global::SerializationTypes.MyEnum)o))); + WriteElementString(@"MyEnum", @"", Write53_MyEnum(((global::SerializationTypes.MyEnum)o))); } - public void Write163_TypeWithEnumMembers(object o) { + public void Write168_TypeWithEnumMembers(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithEnumMembers", @""); return; } TopLevelElement(); - Write53_TypeWithEnumMembers(@"TypeWithEnumMembers", @"", ((global::SerializationTypes.TypeWithEnumMembers)o), true, false); + Write54_TypeWithEnumMembers(@"TypeWithEnumMembers", @"", ((global::SerializationTypes.TypeWithEnumMembers)o), true, false); } - public void Write164_DCStruct(object o) { + public void Write169_DCStruct(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"DCStruct", @""); return; } - Write54_DCStruct(@"DCStruct", @"", ((global::SerializationTypes.DCStruct)o), false); + Write55_DCStruct(@"DCStruct", @"", ((global::SerializationTypes.DCStruct)o), false); } - public void Write165_DCClassWithEnumAndStruct(object o) { + public void Write170_DCClassWithEnumAndStruct(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"DCClassWithEnumAndStruct", @""); return; } TopLevelElement(); - Write55_DCClassWithEnumAndStruct(@"DCClassWithEnumAndStruct", @"", ((global::SerializationTypes.DCClassWithEnumAndStruct)o), true, false); + Write56_DCClassWithEnumAndStruct(@"DCClassWithEnumAndStruct", @"", ((global::SerializationTypes.DCClassWithEnumAndStruct)o), true, false); } - public void Write166_BuiltInTypes(object o) { + public void Write171_BuiltInTypes(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"BuiltInTypes", @""); return; } TopLevelElement(); - Write56_BuiltInTypes(@"BuiltInTypes", @"", ((global::SerializationTypes.BuiltInTypes)o), true, false); + Write57_BuiltInTypes(@"BuiltInTypes", @"", ((global::SerializationTypes.BuiltInTypes)o), true, false); } - public void Write167_TypeA(object o) { + public void Write172_TypeA(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeA", @""); return; } TopLevelElement(); - Write57_TypeA(@"TypeA", @"", ((global::SerializationTypes.TypeA)o), true, false); + Write58_TypeA(@"TypeA", @"", ((global::SerializationTypes.TypeA)o), true, false); } - public void Write168_TypeB(object o) { + public void Write173_TypeB(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeB", @""); return; } TopLevelElement(); - Write58_TypeB(@"TypeB", @"", ((global::SerializationTypes.TypeB)o), true, false); + Write59_TypeB(@"TypeB", @"", ((global::SerializationTypes.TypeB)o), true, false); } - public void Write169_TypeHasArrayOfASerializedAsB(object o) { + public void Write174_TypeHasArrayOfASerializedAsB(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeHasArrayOfASerializedAsB", @""); return; } TopLevelElement(); - Write59_TypeHasArrayOfASerializedAsB(@"TypeHasArrayOfASerializedAsB", @"", ((global::SerializationTypes.TypeHasArrayOfASerializedAsB)o), true, false); + Write60_TypeHasArrayOfASerializedAsB(@"TypeHasArrayOfASerializedAsB", @"", ((global::SerializationTypes.TypeHasArrayOfASerializedAsB)o), true, false); } - public void Write170_Item(object o) { + public void Write175_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"__TypeNameWithSpecialCharacters漢ñ", @""); return; } TopLevelElement(); - Write60_Item(@"__TypeNameWithSpecialCharacters漢ñ", @"", ((global::SerializationTypes.@__TypeNameWithSpecialCharacters漢ñ)o), true, false); + Write61_Item(@"__TypeNameWithSpecialCharacters漢ñ", @"", ((global::SerializationTypes.@__TypeNameWithSpecialCharacters漢ñ)o), true, false); } - public void Write171_BaseClassWithSamePropertyName(object o) { + public void Write176_BaseClassWithSamePropertyName(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"BaseClassWithSamePropertyName", @""); return; } TopLevelElement(); - Write61_BaseClassWithSamePropertyName(@"BaseClassWithSamePropertyName", @"", ((global::SerializationTypes.BaseClassWithSamePropertyName)o), true, false); + Write62_BaseClassWithSamePropertyName(@"BaseClassWithSamePropertyName", @"", ((global::SerializationTypes.BaseClassWithSamePropertyName)o), true, false); } - public void Write172_DerivedClassWithSameProperty(object o) { + public void Write177_DerivedClassWithSameProperty(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"DerivedClassWithSameProperty", @""); return; } TopLevelElement(); - Write62_DerivedClassWithSameProperty(@"DerivedClassWithSameProperty", @"", ((global::SerializationTypes.DerivedClassWithSameProperty)o), true, false); + Write63_DerivedClassWithSameProperty(@"DerivedClassWithSameProperty", @"", ((global::SerializationTypes.DerivedClassWithSameProperty)o), true, false); } - public void Write173_DerivedClassWithSameProperty2(object o) { + public void Write178_DerivedClassWithSameProperty2(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"DerivedClassWithSameProperty2", @""); return; } TopLevelElement(); - Write63_DerivedClassWithSameProperty2(@"DerivedClassWithSameProperty2", @"", ((global::SerializationTypes.DerivedClassWithSameProperty2)o), true, false); + Write64_DerivedClassWithSameProperty2(@"DerivedClassWithSameProperty2", @"", ((global::SerializationTypes.DerivedClassWithSameProperty2)o), true, false); } - public void Write174_Item(object o) { + public void Write179_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithDateTimePropertyAsXmlTime", @""); return; } TopLevelElement(); - Write64_Item(@"TypeWithDateTimePropertyAsXmlTime", @"", ((global::SerializationTypes.TypeWithDateTimePropertyAsXmlTime)o), true, false); + Write65_Item(@"TypeWithDateTimePropertyAsXmlTime", @"", ((global::SerializationTypes.TypeWithDateTimePropertyAsXmlTime)o), true, false); } - public void Write175_TypeWithByteArrayAsXmlText(object o) { + public void Write180_TypeWithByteArrayAsXmlText(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithByteArrayAsXmlText", @""); return; } TopLevelElement(); - Write65_TypeWithByteArrayAsXmlText(@"TypeWithByteArrayAsXmlText", @"", ((global::SerializationTypes.TypeWithByteArrayAsXmlText)o), true, false); + Write66_TypeWithByteArrayAsXmlText(@"TypeWithByteArrayAsXmlText", @"", ((global::SerializationTypes.TypeWithByteArrayAsXmlText)o), true, false); } - public void Write176_SimpleDC(object o) { + public void Write181_SimpleDC(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"SimpleDC", @""); return; } TopLevelElement(); - Write66_SimpleDC(@"SimpleDC", @"", ((global::SerializationTypes.SimpleDC)o), true, false); + Write67_SimpleDC(@"SimpleDC", @"", ((global::SerializationTypes.SimpleDC)o), true, false); } - public void Write177_Item(object o) { + public void Write182_Item(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"TypeWithXmlTextAttributeOnArray", @"http://schemas.xmlsoap.org/ws/2005/04/discovery"); return; } TopLevelElement(); - Write67_Item(@"TypeWithXmlTextAttributeOnArray", @"http://schemas.xmlsoap.org/ws/2005/04/discovery", ((global::SerializationTypes.TypeWithXmlTextAttributeOnArray)o), false, false); + Write68_Item(@"TypeWithXmlTextAttributeOnArray", @"http://schemas.xmlsoap.org/ws/2005/04/discovery", ((global::SerializationTypes.TypeWithXmlTextAttributeOnArray)o), false, false); } - public void Write178_EnumFlags(object o) { + public void Write183_EnumFlags(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"EnumFlags", @""); return; } - WriteElementString(@"EnumFlags", @"", Write68_EnumFlags(((global::SerializationTypes.EnumFlags)o))); + WriteElementString(@"EnumFlags", @"", Write69_EnumFlags(((global::SerializationTypes.EnumFlags)o))); } - public void Write179_ClassImplementsInterface(object o) { + public void Write184_ClassImplementsInterface(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"ClassImplementsInterface", @""); return; } TopLevelElement(); - Write69_ClassImplementsInterface(@"ClassImplementsInterface", @"", ((global::SerializationTypes.ClassImplementsInterface)o), true, false); + Write70_ClassImplementsInterface(@"ClassImplementsInterface", @"", ((global::SerializationTypes.ClassImplementsInterface)o), true, false); } - public void Write180_WithStruct(object o) { + public void Write185_WithStruct(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"WithStruct", @""); return; } TopLevelElement(); - Write71_WithStruct(@"WithStruct", @"", ((global::SerializationTypes.WithStruct)o), true, false); + Write72_WithStruct(@"WithStruct", @"", ((global::SerializationTypes.WithStruct)o), true, false); } - public void Write181_SomeStruct(object o) { + public void Write186_SomeStruct(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"SomeStruct", @""); return; } - Write70_SomeStruct(@"SomeStruct", @"", ((global::SerializationTypes.SomeStruct)o), false); + Write71_SomeStruct(@"SomeStruct", @"", ((global::SerializationTypes.SomeStruct)o), false); } - public void Write182_WithEnums(object o) { + public void Write187_WithEnums(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"WithEnums", @""); return; } TopLevelElement(); - Write74_WithEnums(@"WithEnums", @"", ((global::SerializationTypes.WithEnums)o), true, false); + Write75_WithEnums(@"WithEnums", @"", ((global::SerializationTypes.WithEnums)o), true, false); } - public void Write183_WithNullables(object o) { + public void Write188_WithNullables(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"WithNullables", @""); return; } TopLevelElement(); - Write75_WithNullables(@"WithNullables", @"", ((global::SerializationTypes.WithNullables)o), true, false); + Write76_WithNullables(@"WithNullables", @"", ((global::SerializationTypes.WithNullables)o), true, false); } - public void Write184_ByteEnum(object o) { + public void Write189_ByteEnum(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"ByteEnum", @""); return; } - WriteElementString(@"ByteEnum", @"", Write76_ByteEnum(((global::SerializationTypes.ByteEnum)o))); + WriteElementString(@"ByteEnum", @"", Write77_ByteEnum(((global::SerializationTypes.ByteEnum)o))); } - public void Write185_SByteEnum(object o) { + public void Write190_SByteEnum(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"SByteEnum", @""); return; } - WriteElementString(@"SByteEnum", @"", Write77_SByteEnum(((global::SerializationTypes.SByteEnum)o))); + WriteElementString(@"SByteEnum", @"", Write78_SByteEnum(((global::SerializationTypes.SByteEnum)o))); } - public void Write186_ShortEnum(object o) { + public void Write191_ShortEnum(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"ShortEnum", @""); return; } - WriteElementString(@"ShortEnum", @"", Write73_ShortEnum(((global::SerializationTypes.ShortEnum)o))); + WriteElementString(@"ShortEnum", @"", Write74_ShortEnum(((global::SerializationTypes.ShortEnum)o))); } - public void Write187_IntEnum(object o) { + public void Write192_IntEnum(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"IntEnum", @""); return; } - WriteElementString(@"IntEnum", @"", Write72_IntEnum(((global::SerializationTypes.IntEnum)o))); + WriteElementString(@"IntEnum", @"", Write73_IntEnum(((global::SerializationTypes.IntEnum)o))); } - public void Write188_UIntEnum(object o) { + public void Write193_UIntEnum(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"UIntEnum", @""); return; } - WriteElementString(@"UIntEnum", @"", Write78_UIntEnum(((global::SerializationTypes.UIntEnum)o))); + WriteElementString(@"UIntEnum", @"", Write79_UIntEnum(((global::SerializationTypes.UIntEnum)o))); } - public void Write189_LongEnum(object o) { + public void Write194_LongEnum(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"LongEnum", @""); return; } - WriteElementString(@"LongEnum", @"", Write79_LongEnum(((global::SerializationTypes.LongEnum)o))); + WriteElementString(@"LongEnum", @"", Write80_LongEnum(((global::SerializationTypes.LongEnum)o))); } - public void Write190_ULongEnum(object o) { + public void Write195_ULongEnum(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"ULongEnum", @""); return; } - WriteElementString(@"ULongEnum", @"", Write80_ULongEnum(((global::SerializationTypes.ULongEnum)o))); + WriteElementString(@"ULongEnum", @"", Write81_ULongEnum(((global::SerializationTypes.ULongEnum)o))); } - public void Write191_AttributeTesting(object o) { + public void Write196_AttributeTesting(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"AttributeTesting", @""); return; } TopLevelElement(); - Write82_XmlSerializerAttributes(@"AttributeTesting", @"", ((global::SerializationTypes.XmlSerializerAttributes)o), false, false); + Write83_XmlSerializerAttributes(@"AttributeTesting", @"", ((global::SerializationTypes.XmlSerializerAttributes)o), false, false); } - public void Write192_ItemChoiceType(object o) { + public void Write197_ItemChoiceType(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"ItemChoiceType", @""); return; } - WriteElementString(@"ItemChoiceType", @"", Write81_ItemChoiceType(((global::SerializationTypes.ItemChoiceType)o))); + WriteElementString(@"ItemChoiceType", @"", Write82_ItemChoiceType(((global::SerializationTypes.ItemChoiceType)o))); } - public void Write193_TypeWithAnyAttribute(object o) { + public void Write198_TypeWithAnyAttribute(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithAnyAttribute", @""); return; } TopLevelElement(); - Write83_TypeWithAnyAttribute(@"TypeWithAnyAttribute", @"", ((global::SerializationTypes.TypeWithAnyAttribute)o), true, false); + Write84_TypeWithAnyAttribute(@"TypeWithAnyAttribute", @"", ((global::SerializationTypes.TypeWithAnyAttribute)o), true, false); } - public void Write194_KnownTypesThroughConstructor(object o) { + public void Write199_KnownTypesThroughConstructor(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"KnownTypesThroughConstructor", @""); return; } TopLevelElement(); - Write84_KnownTypesThroughConstructor(@"KnownTypesThroughConstructor", @"", ((global::SerializationTypes.KnownTypesThroughConstructor)o), true, false); + Write85_KnownTypesThroughConstructor(@"KnownTypesThroughConstructor", @"", ((global::SerializationTypes.KnownTypesThroughConstructor)o), true, false); } - public void Write195_SimpleKnownTypeValue(object o) { + public void Write200_SimpleKnownTypeValue(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"SimpleKnownTypeValue", @""); return; } TopLevelElement(); - Write85_SimpleKnownTypeValue(@"SimpleKnownTypeValue", @"", ((global::SerializationTypes.SimpleKnownTypeValue)o), true, false); + Write86_SimpleKnownTypeValue(@"SimpleKnownTypeValue", @"", ((global::SerializationTypes.SimpleKnownTypeValue)o), true, false); } - public void Write196_Item(object o) { + public void Write201_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"ClassImplementingIXmlSerializable", @""); @@ -878,67 +888,67 @@ public void Write196_Item(object o) { WriteSerializable((System.Xml.Serialization.IXmlSerializable)((global::SerializationTypes.ClassImplementingIXmlSerializable)o), @"ClassImplementingIXmlSerializable", @"", true, true); } - public void Write197_TypeWithPropertyNameSpecified(object o) { + public void Write202_TypeWithPropertyNameSpecified(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithPropertyNameSpecified", @""); return; } TopLevelElement(); - Write86_TypeWithPropertyNameSpecified(@"TypeWithPropertyNameSpecified", @"", ((global::SerializationTypes.TypeWithPropertyNameSpecified)o), true, false); + Write87_TypeWithPropertyNameSpecified(@"TypeWithPropertyNameSpecified", @"", ((global::SerializationTypes.TypeWithPropertyNameSpecified)o), true, false); } - public void Write198_TypeWithXmlSchemaFormAttribute(object o) { + public void Write203_TypeWithXmlSchemaFormAttribute(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithXmlSchemaFormAttribute", @""); return; } TopLevelElement(); - Write87_TypeWithXmlSchemaFormAttribute(@"TypeWithXmlSchemaFormAttribute", @"", ((global::SerializationTypes.TypeWithXmlSchemaFormAttribute)o), true, false); + Write88_TypeWithXmlSchemaFormAttribute(@"TypeWithXmlSchemaFormAttribute", @"", ((global::SerializationTypes.TypeWithXmlSchemaFormAttribute)o), true, false); } - public void Write199_MyXmlType(object o) { + public void Write204_MyXmlType(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"MyXmlType", @""); return; } TopLevelElement(); - Write88_Item(@"MyXmlType", @"", ((global::SerializationTypes.TypeWithTypeNameInXmlTypeAttribute)o), true, false); + Write89_Item(@"MyXmlType", @"", ((global::SerializationTypes.TypeWithTypeNameInXmlTypeAttribute)o), true, false); } - public void Write200_Item(object o) { + public void Write205_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithSchemaFormInXmlAttribute", @""); return; } TopLevelElement(); - Write89_Item(@"TypeWithSchemaFormInXmlAttribute", @"", ((global::SerializationTypes.TypeWithSchemaFormInXmlAttribute)o), true, false); + Write90_Item(@"TypeWithSchemaFormInXmlAttribute", @"", ((global::SerializationTypes.TypeWithSchemaFormInXmlAttribute)o), true, false); } - public void Write201_CustomDocument(object o) { + public void Write206_CustomDocument(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"CustomDocument", @""); return; } TopLevelElement(); - Write91_CustomDocument(@"CustomDocument", @"", ((global::SerializationTypes.CustomDocument)o), true, false); + Write92_CustomDocument(@"CustomDocument", @"", ((global::SerializationTypes.CustomDocument)o), true, false); } - public void Write202_CustomElement(object o) { + public void Write207_CustomElement(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"CustomElement", @""); return; } TopLevelElement(); - Write90_CustomElement(@"CustomElement", @"", ((global::SerializationTypes.CustomElement)o), true, false); + Write91_CustomElement(@"CustomElement", @"", ((global::SerializationTypes.CustomElement)o), true, false); } - public void Write203_Item(object o) { + public void Write208_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"", null); @@ -953,196 +963,226 @@ public void Write203_Item(object o) { } } - public void Write204_Item(object o) { + public void Write209_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithNonPublicDefaultConstructor", @""); return; } TopLevelElement(); - Write92_Item(@"TypeWithNonPublicDefaultConstructor", @"", ((global::SerializationTypes.TypeWithNonPublicDefaultConstructor)o), true, false); + Write93_Item(@"TypeWithNonPublicDefaultConstructor", @"", ((global::SerializationTypes.TypeWithNonPublicDefaultConstructor)o), true, false); } - public void Write205_ServerSettings(object o) { + public void Write210_ServerSettings(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"ServerSettings", @""); return; } TopLevelElement(); - Write93_ServerSettings(@"ServerSettings", @"", ((global::SerializationTypes.ServerSettings)o), true, false); + Write94_ServerSettings(@"ServerSettings", @"", ((global::SerializationTypes.ServerSettings)o), true, false); } - public void Write206_TypeWithXmlQualifiedName(object o) { + public void Write211_TypeWithXmlQualifiedName(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithXmlQualifiedName", @""); return; } TopLevelElement(); - Write94_TypeWithXmlQualifiedName(@"TypeWithXmlQualifiedName", @"", ((global::SerializationTypes.TypeWithXmlQualifiedName)o), true, false); + Write95_TypeWithXmlQualifiedName(@"TypeWithXmlQualifiedName", @"", ((global::SerializationTypes.TypeWithXmlQualifiedName)o), true, false); } - public void Write207_TypeWith2DArrayProperty2(object o) { + public void Write212_TypeWith2DArrayProperty2(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWith2DArrayProperty2", @""); return; } TopLevelElement(); - Write95_TypeWith2DArrayProperty2(@"TypeWith2DArrayProperty2", @"", ((global::SerializationTypes.TypeWith2DArrayProperty2)o), true, false); + Write96_TypeWith2DArrayProperty2(@"TypeWith2DArrayProperty2", @"", ((global::SerializationTypes.TypeWith2DArrayProperty2)o), true, false); } - public void Write208_Item(object o) { + public void Write213_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithPropertiesHavingDefaultValue", @""); return; } TopLevelElement(); - Write96_Item(@"TypeWithPropertiesHavingDefaultValue", @"", ((global::SerializationTypes.TypeWithPropertiesHavingDefaultValue)o), true, false); + Write97_Item(@"TypeWithPropertiesHavingDefaultValue", @"", ((global::SerializationTypes.TypeWithPropertiesHavingDefaultValue)o), true, false); } - public void Write209_Item(object o) { + public void Write214_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithEnumPropertyHavingDefaultValue", @""); return; } TopLevelElement(); - Write97_Item(@"TypeWithEnumPropertyHavingDefaultValue", @"", ((global::SerializationTypes.TypeWithEnumPropertyHavingDefaultValue)o), true, false); + Write98_Item(@"TypeWithEnumPropertyHavingDefaultValue", @"", ((global::SerializationTypes.TypeWithEnumPropertyHavingDefaultValue)o), true, false); } - public void Write210_Item(object o) { + public void Write215_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithEnumFlagPropertyHavingDefaultValue", @""); return; } TopLevelElement(); - Write98_Item(@"TypeWithEnumFlagPropertyHavingDefaultValue", @"", ((global::SerializationTypes.TypeWithEnumFlagPropertyHavingDefaultValue)o), true, false); + Write99_Item(@"TypeWithEnumFlagPropertyHavingDefaultValue", @"", ((global::SerializationTypes.TypeWithEnumFlagPropertyHavingDefaultValue)o), true, false); } - public void Write211_TypeWithShouldSerializeMethod(object o) { + public void Write216_TypeWithShouldSerializeMethod(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithShouldSerializeMethod", @""); return; } TopLevelElement(); - Write99_TypeWithShouldSerializeMethod(@"TypeWithShouldSerializeMethod", @"", ((global::SerializationTypes.TypeWithShouldSerializeMethod)o), true, false); + Write100_TypeWithShouldSerializeMethod(@"TypeWithShouldSerializeMethod", @"", ((global::SerializationTypes.TypeWithShouldSerializeMethod)o), true, false); } - public void Write212_Item(object o) { + public void Write217_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"KnownTypesThroughConstructorWithArrayProperties", @""); return; } TopLevelElement(); - Write100_Item(@"KnownTypesThroughConstructorWithArrayProperties", @"", ((global::SerializationTypes.KnownTypesThroughConstructorWithArrayProperties)o), true, false); + Write101_Item(@"KnownTypesThroughConstructorWithArrayProperties", @"", ((global::SerializationTypes.KnownTypesThroughConstructorWithArrayProperties)o), true, false); } - public void Write213_Item(object o) { + public void Write218_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"KnownTypesThroughConstructorWithValue", @""); return; } TopLevelElement(); - Write101_Item(@"KnownTypesThroughConstructorWithValue", @"", ((global::SerializationTypes.KnownTypesThroughConstructorWithValue)o), true, false); + Write102_Item(@"KnownTypesThroughConstructorWithValue", @"", ((global::SerializationTypes.KnownTypesThroughConstructorWithValue)o), true, false); } - public void Write214_Item(object o) { + public void Write219_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithTypesHavingCustomFormatter", @""); return; } TopLevelElement(); - Write102_Item(@"TypeWithTypesHavingCustomFormatter", @"", ((global::SerializationTypes.TypeWithTypesHavingCustomFormatter)o), true, false); + Write103_Item(@"TypeWithTypesHavingCustomFormatter", @"", ((global::SerializationTypes.TypeWithTypesHavingCustomFormatter)o), true, false); } - public void Write215_Item(object o) { + public void Write220_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithArrayPropertyHavingChoice", @""); return; } TopLevelElement(); - Write104_Item(@"TypeWithArrayPropertyHavingChoice", @"", ((global::SerializationTypes.TypeWithArrayPropertyHavingChoice)o), true, false); + Write105_Item(@"TypeWithArrayPropertyHavingChoice", @"", ((global::SerializationTypes.TypeWithArrayPropertyHavingChoice)o), true, false); + } + + public void Write221_Item(object o) { + WriteStartDocument(); + if (o == null) { + WriteNullTagLiteral(@"TypeWithPropertyHavingComplexChoice", @""); + return; + } + TopLevelElement(); + Write108_Item(@"TypeWithPropertyHavingComplexChoice", @"", ((global::SerializationTypes.TypeWithPropertyHavingComplexChoice)o), true, false); } - public void Write216_MoreChoices(object o) { + public void Write222_MoreChoices(object o) { WriteStartDocument(); if (o == null) { WriteEmptyTag(@"MoreChoices", @""); return; } - WriteElementString(@"MoreChoices", @"", Write103_MoreChoices(((global::SerializationTypes.MoreChoices)o))); + WriteElementString(@"MoreChoices", @"", Write104_MoreChoices(((global::SerializationTypes.MoreChoices)o))); + } + + public void Write223_ComplexChoiceA(object o) { + WriteStartDocument(); + if (o == null) { + WriteNullTagLiteral(@"ComplexChoiceA", @""); + return; + } + TopLevelElement(); + Write107_ComplexChoiceA(@"ComplexChoiceA", @"", ((global::SerializationTypes.ComplexChoiceA)o), true, false); + } + + public void Write224_ComplexChoiceB(object o) { + WriteStartDocument(); + if (o == null) { + WriteNullTagLiteral(@"ComplexChoiceB", @""); + return; + } + TopLevelElement(); + Write106_ComplexChoiceB(@"ComplexChoiceB", @"", ((global::SerializationTypes.ComplexChoiceB)o), true, false); } - public void Write217_TypeWithFieldsOrdered(object o) { + public void Write225_TypeWithFieldsOrdered(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithFieldsOrdered", @""); return; } TopLevelElement(); - Write105_TypeWithFieldsOrdered(@"TypeWithFieldsOrdered", @"", ((global::SerializationTypes.TypeWithFieldsOrdered)o), true, false); + Write109_TypeWithFieldsOrdered(@"TypeWithFieldsOrdered", @"", ((global::SerializationTypes.TypeWithFieldsOrdered)o), true, false); } - public void Write218_Item(object o) { + public void Write226_Item(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeWithKnownTypesOfCollectionsWithConflictingXmlName", @""); return; } TopLevelElement(); - Write106_Item(@"TypeWithKnownTypesOfCollectionsWithConflictingXmlName", @"", ((global::SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName)o), true, false); + Write110_Item(@"TypeWithKnownTypesOfCollectionsWithConflictingXmlName", @"", ((global::SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName)o), true, false); } - public void Write219_Root(object o) { + public void Write227_Root(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"Root", @""); return; } TopLevelElement(); - Write109_Item(@"Root", @"", ((global::SerializationTypes.NamespaceTypeNameClashContainer)o), true, false); + Write113_Item(@"Root", @"", ((global::SerializationTypes.NamespaceTypeNameClashContainer)o), true, false); } - public void Write220_TypeClashB(object o) { + public void Write228_TypeClashB(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeClashB", @""); return; } TopLevelElement(); - Write108_TypeNameClash(@"TypeClashB", @"", ((global::SerializationTypes.TypeNameClashB.TypeNameClash)o), true, false); + Write112_TypeNameClash(@"TypeClashB", @"", ((global::SerializationTypes.TypeNameClashB.TypeNameClash)o), true, false); } - public void Write221_TypeClashA(object o) { + public void Write229_TypeClashA(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"TypeClashA", @""); return; } TopLevelElement(); - Write107_TypeNameClash(@"TypeClashA", @"", ((global::SerializationTypes.TypeNameClashA.TypeNameClash)o), true, false); + Write111_TypeNameClash(@"TypeClashA", @"", ((global::SerializationTypes.TypeNameClashA.TypeNameClash)o), true, false); } - public void Write222_Person(object o) { + public void Write230_Person(object o) { WriteStartDocument(); if (o == null) { WriteNullTagLiteral(@"Person", @""); return; } TopLevelElement(); - Write110_Person(@"Person", @"", ((global::Outer.Person)o), true, false); + Write114_Person(@"Person", @"", ((global::Outer.Person)o), true, false); } - void Write110_Person(string n, string ns, global::Outer.Person o, bool isNullable, bool needType) { + void Write114_Person(string n, string ns, global::Outer.Person o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -1163,7 +1203,7 @@ void Write110_Person(string n, string ns, global::Outer.Person o, bool isNullabl WriteEndElement(o); } - void Write107_TypeNameClash(string n, string ns, global::SerializationTypes.TypeNameClashA.TypeNameClash o, bool isNullable, bool needType) { + void Write111_TypeNameClash(string n, string ns, global::SerializationTypes.TypeNameClashA.TypeNameClash o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -1182,7 +1222,7 @@ void Write107_TypeNameClash(string n, string ns, global::SerializationTypes.Type WriteEndElement(o); } - void Write108_TypeNameClash(string n, string ns, global::SerializationTypes.TypeNameClashB.TypeNameClash o, bool isNullable, bool needType) { + void Write112_TypeNameClash(string n, string ns, global::SerializationTypes.TypeNameClashB.TypeNameClash o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -1201,7 +1241,7 @@ void Write108_TypeNameClash(string n, string ns, global::SerializationTypes.Type WriteEndElement(o); } - void Write109_Item(string n, string ns, global::SerializationTypes.NamespaceTypeNameClashContainer o, bool isNullable, bool needType) { + void Write113_Item(string n, string ns, global::SerializationTypes.NamespaceTypeNameClashContainer o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -1220,7 +1260,7 @@ void Write109_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++) { - Write107_TypeNameClash(@"A", @"", ((global::SerializationTypes.TypeNameClashA.TypeNameClash)a[ia]), false, false); + Write111_TypeNameClash(@"A", @"", ((global::SerializationTypes.TypeNameClashA.TypeNameClash)a[ia]), false, false); } } } @@ -1228,14 +1268,14 @@ void Write109_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++) { - Write108_TypeNameClash(@"B", @"", ((global::SerializationTypes.TypeNameClashB.TypeNameClash)a[ia]), false, false); + Write112_TypeNameClash(@"B", @"", ((global::SerializationTypes.TypeNameClashB.TypeNameClash)a[ia]), false, false); } } } WriteEndElement(o); } - void Write106_Item(string n, string ns, global::SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName o, bool isNullable, bool needType) { + void Write110_Item(string n, string ns, global::SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -1266,203 +1306,219 @@ void Write1_Object(string n, string ns, global::System.Object o, bool isNullable } else { if (t == typeof(global::Outer.Person)) { - Write110_Person(n, ns,(global::Outer.Person)o, isNullable, true); + Write114_Person(n, ns,(global::Outer.Person)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.NamespaceTypeNameClashContainer)) { - Write109_Item(n, ns,(global::SerializationTypes.NamespaceTypeNameClashContainer)o, isNullable, true); + Write113_Item(n, ns,(global::SerializationTypes.NamespaceTypeNameClashContainer)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeNameClashB.TypeNameClash)) { - Write108_TypeNameClash(n, ns,(global::SerializationTypes.TypeNameClashB.TypeNameClash)o, isNullable, true); + Write112_TypeNameClash(n, ns,(global::SerializationTypes.TypeNameClashB.TypeNameClash)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeNameClashA.TypeNameClash)) { - Write107_TypeNameClash(n, ns,(global::SerializationTypes.TypeNameClashA.TypeNameClash)o, isNullable, true); + Write111_TypeNameClash(n, ns,(global::SerializationTypes.TypeNameClashA.TypeNameClash)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName)) { - Write106_Item(n, ns,(global::SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName)o, isNullable, true); + Write110_Item(n, ns,(global::SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithFieldsOrdered)) { - Write105_TypeWithFieldsOrdered(n, ns,(global::SerializationTypes.TypeWithFieldsOrdered)o, isNullable, true); + Write109_TypeWithFieldsOrdered(n, ns,(global::SerializationTypes.TypeWithFieldsOrdered)o, isNullable, true); + return; + } + if (t == typeof(global::SerializationTypes.TypeWithPropertyHavingComplexChoice)) { + Write108_Item(n, ns,(global::SerializationTypes.TypeWithPropertyHavingComplexChoice)o, isNullable, true); + return; + } + if (t == typeof(global::SerializationTypes.ComplexChoiceA)) { + Write107_ComplexChoiceA(n, ns,(global::SerializationTypes.ComplexChoiceA)o, isNullable, true); + return; + } + if (t == typeof(global::SerializationTypes.ComplexChoiceB)) { + Write106_ComplexChoiceB(n, ns,(global::SerializationTypes.ComplexChoiceB)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithArrayPropertyHavingChoice)) { - Write104_Item(n, ns,(global::SerializationTypes.TypeWithArrayPropertyHavingChoice)o, isNullable, true); + Write105_Item(n, ns,(global::SerializationTypes.TypeWithArrayPropertyHavingChoice)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithTypesHavingCustomFormatter)) { - Write102_Item(n, ns,(global::SerializationTypes.TypeWithTypesHavingCustomFormatter)o, isNullable, true); + Write103_Item(n, ns,(global::SerializationTypes.TypeWithTypesHavingCustomFormatter)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.KnownTypesThroughConstructorWithValue)) { - Write101_Item(n, ns,(global::SerializationTypes.KnownTypesThroughConstructorWithValue)o, isNullable, true); + Write102_Item(n, ns,(global::SerializationTypes.KnownTypesThroughConstructorWithValue)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.KnownTypesThroughConstructorWithArrayProperties)) { - Write100_Item(n, ns,(global::SerializationTypes.KnownTypesThroughConstructorWithArrayProperties)o, isNullable, true); + Write101_Item(n, ns,(global::SerializationTypes.KnownTypesThroughConstructorWithArrayProperties)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithShouldSerializeMethod)) { - Write99_TypeWithShouldSerializeMethod(n, ns,(global::SerializationTypes.TypeWithShouldSerializeMethod)o, isNullable, true); + Write100_TypeWithShouldSerializeMethod(n, ns,(global::SerializationTypes.TypeWithShouldSerializeMethod)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithEnumFlagPropertyHavingDefaultValue)) { - Write98_Item(n, ns,(global::SerializationTypes.TypeWithEnumFlagPropertyHavingDefaultValue)o, isNullable, true); + Write99_Item(n, ns,(global::SerializationTypes.TypeWithEnumFlagPropertyHavingDefaultValue)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithEnumPropertyHavingDefaultValue)) { - Write97_Item(n, ns,(global::SerializationTypes.TypeWithEnumPropertyHavingDefaultValue)o, isNullable, true); + Write98_Item(n, ns,(global::SerializationTypes.TypeWithEnumPropertyHavingDefaultValue)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithPropertiesHavingDefaultValue)) { - Write96_Item(n, ns,(global::SerializationTypes.TypeWithPropertiesHavingDefaultValue)o, isNullable, true); + Write97_Item(n, ns,(global::SerializationTypes.TypeWithPropertiesHavingDefaultValue)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWith2DArrayProperty2)) { - Write95_TypeWith2DArrayProperty2(n, ns,(global::SerializationTypes.TypeWith2DArrayProperty2)o, isNullable, true); + Write96_TypeWith2DArrayProperty2(n, ns,(global::SerializationTypes.TypeWith2DArrayProperty2)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithXmlQualifiedName)) { - Write94_TypeWithXmlQualifiedName(n, ns,(global::SerializationTypes.TypeWithXmlQualifiedName)o, isNullable, true); + Write95_TypeWithXmlQualifiedName(n, ns,(global::SerializationTypes.TypeWithXmlQualifiedName)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.ServerSettings)) { - Write93_ServerSettings(n, ns,(global::SerializationTypes.ServerSettings)o, isNullable, true); + Write94_ServerSettings(n, ns,(global::SerializationTypes.ServerSettings)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithNonPublicDefaultConstructor)) { - Write92_Item(n, ns,(global::SerializationTypes.TypeWithNonPublicDefaultConstructor)o, isNullable, true); + Write93_Item(n, ns,(global::SerializationTypes.TypeWithNonPublicDefaultConstructor)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.CustomDocument)) { - Write91_CustomDocument(n, ns,(global::SerializationTypes.CustomDocument)o, isNullable, true); + Write92_CustomDocument(n, ns,(global::SerializationTypes.CustomDocument)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.CustomElement)) { - Write90_CustomElement(n, ns,(global::SerializationTypes.CustomElement)o, isNullable, true); + Write91_CustomElement(n, ns,(global::SerializationTypes.CustomElement)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithTypeNameInXmlTypeAttribute)) { - Write88_Item(n, ns,(global::SerializationTypes.TypeWithTypeNameInXmlTypeAttribute)o, isNullable, true); + Write89_Item(n, ns,(global::SerializationTypes.TypeWithTypeNameInXmlTypeAttribute)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithXmlSchemaFormAttribute)) { - Write87_TypeWithXmlSchemaFormAttribute(n, ns,(global::SerializationTypes.TypeWithXmlSchemaFormAttribute)o, isNullable, true); + Write88_TypeWithXmlSchemaFormAttribute(n, ns,(global::SerializationTypes.TypeWithXmlSchemaFormAttribute)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithPropertyNameSpecified)) { - Write86_TypeWithPropertyNameSpecified(n, ns,(global::SerializationTypes.TypeWithPropertyNameSpecified)o, isNullable, true); + Write87_TypeWithPropertyNameSpecified(n, ns,(global::SerializationTypes.TypeWithPropertyNameSpecified)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.SimpleKnownTypeValue)) { - Write85_SimpleKnownTypeValue(n, ns,(global::SerializationTypes.SimpleKnownTypeValue)o, isNullable, true); + Write86_SimpleKnownTypeValue(n, ns,(global::SerializationTypes.SimpleKnownTypeValue)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.KnownTypesThroughConstructor)) { - Write84_KnownTypesThroughConstructor(n, ns,(global::SerializationTypes.KnownTypesThroughConstructor)o, isNullable, true); + Write85_KnownTypesThroughConstructor(n, ns,(global::SerializationTypes.KnownTypesThroughConstructor)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithAnyAttribute)) { - Write83_TypeWithAnyAttribute(n, ns,(global::SerializationTypes.TypeWithAnyAttribute)o, isNullable, true); + Write84_TypeWithAnyAttribute(n, ns,(global::SerializationTypes.TypeWithAnyAttribute)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.XmlSerializerAttributes)) { - Write82_XmlSerializerAttributes(n, ns,(global::SerializationTypes.XmlSerializerAttributes)o, isNullable, true); + Write83_XmlSerializerAttributes(n, ns,(global::SerializationTypes.XmlSerializerAttributes)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.WithNullables)) { - Write75_WithNullables(n, ns,(global::SerializationTypes.WithNullables)o, isNullable, true); + Write76_WithNullables(n, ns,(global::SerializationTypes.WithNullables)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.WithEnums)) { - Write74_WithEnums(n, ns,(global::SerializationTypes.WithEnums)o, isNullable, true); + Write75_WithEnums(n, ns,(global::SerializationTypes.WithEnums)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.WithStruct)) { - Write71_WithStruct(n, ns,(global::SerializationTypes.WithStruct)o, isNullable, true); + Write72_WithStruct(n, ns,(global::SerializationTypes.WithStruct)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.SomeStruct)) { - Write70_SomeStruct(n, ns,(global::SerializationTypes.SomeStruct)o, true); + Write71_SomeStruct(n, ns,(global::SerializationTypes.SomeStruct)o, true); return; } if (t == typeof(global::SerializationTypes.ClassImplementsInterface)) { - Write69_ClassImplementsInterface(n, ns,(global::SerializationTypes.ClassImplementsInterface)o, isNullable, true); + Write70_ClassImplementsInterface(n, ns,(global::SerializationTypes.ClassImplementsInterface)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithXmlTextAttributeOnArray)) { - Write67_Item(n, ns,(global::SerializationTypes.TypeWithXmlTextAttributeOnArray)o, isNullable, true); + Write68_Item(n, ns,(global::SerializationTypes.TypeWithXmlTextAttributeOnArray)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.SimpleDC)) { - Write66_SimpleDC(n, ns,(global::SerializationTypes.SimpleDC)o, isNullable, true); + Write67_SimpleDC(n, ns,(global::SerializationTypes.SimpleDC)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithByteArrayAsXmlText)) { - Write65_TypeWithByteArrayAsXmlText(n, ns,(global::SerializationTypes.TypeWithByteArrayAsXmlText)o, isNullable, true); + Write66_TypeWithByteArrayAsXmlText(n, ns,(global::SerializationTypes.TypeWithByteArrayAsXmlText)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithDateTimePropertyAsXmlTime)) { - Write64_Item(n, ns,(global::SerializationTypes.TypeWithDateTimePropertyAsXmlTime)o, isNullable, true); + Write65_Item(n, ns,(global::SerializationTypes.TypeWithDateTimePropertyAsXmlTime)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.BaseClassWithSamePropertyName)) { - Write61_BaseClassWithSamePropertyName(n, ns,(global::SerializationTypes.BaseClassWithSamePropertyName)o, isNullable, true); + Write62_BaseClassWithSamePropertyName(n, ns,(global::SerializationTypes.BaseClassWithSamePropertyName)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.DerivedClassWithSameProperty)) { - Write62_DerivedClassWithSameProperty(n, ns,(global::SerializationTypes.DerivedClassWithSameProperty)o, isNullable, true); + Write63_DerivedClassWithSameProperty(n, ns,(global::SerializationTypes.DerivedClassWithSameProperty)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.DerivedClassWithSameProperty2)) { - Write63_DerivedClassWithSameProperty2(n, ns,(global::SerializationTypes.DerivedClassWithSameProperty2)o, isNullable, true); + Write64_DerivedClassWithSameProperty2(n, ns,(global::SerializationTypes.DerivedClassWithSameProperty2)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.@__TypeNameWithSpecialCharacters漢ñ)) { - Write60_Item(n, ns,(global::SerializationTypes.@__TypeNameWithSpecialCharacters漢ñ)o, isNullable, true); + Write61_Item(n, ns,(global::SerializationTypes.@__TypeNameWithSpecialCharacters漢ñ)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeHasArrayOfASerializedAsB)) { - Write59_TypeHasArrayOfASerializedAsB(n, ns,(global::SerializationTypes.TypeHasArrayOfASerializedAsB)o, isNullable, true); + Write60_TypeHasArrayOfASerializedAsB(n, ns,(global::SerializationTypes.TypeHasArrayOfASerializedAsB)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeB)) { - Write58_TypeB(n, ns,(global::SerializationTypes.TypeB)o, isNullable, true); + Write59_TypeB(n, ns,(global::SerializationTypes.TypeB)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeA)) { - Write57_TypeA(n, ns,(global::SerializationTypes.TypeA)o, isNullable, true); + Write58_TypeA(n, ns,(global::SerializationTypes.TypeA)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.BuiltInTypes)) { - Write56_BuiltInTypes(n, ns,(global::SerializationTypes.BuiltInTypes)o, isNullable, true); + Write57_BuiltInTypes(n, ns,(global::SerializationTypes.BuiltInTypes)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.DCClassWithEnumAndStruct)) { - Write55_DCClassWithEnumAndStruct(n, ns,(global::SerializationTypes.DCClassWithEnumAndStruct)o, isNullable, true); + Write56_DCClassWithEnumAndStruct(n, ns,(global::SerializationTypes.DCClassWithEnumAndStruct)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.DCStruct)) { - Write54_DCStruct(n, ns,(global::SerializationTypes.DCStruct)o, true); + Write55_DCStruct(n, ns,(global::SerializationTypes.DCStruct)o, true); return; } if (t == typeof(global::SerializationTypes.TypeWithEnumMembers)) { - Write53_TypeWithEnumMembers(n, ns,(global::SerializationTypes.TypeWithEnumMembers)o, isNullable, true); + Write54_TypeWithEnumMembers(n, ns,(global::SerializationTypes.TypeWithEnumMembers)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithReadOnlyMyCollectionProperty)) { - Write51_Item(n, ns,(global::SerializationTypes.TypeWithReadOnlyMyCollectionProperty)o, isNullable, true); + Write52_Item(n, ns,(global::SerializationTypes.TypeWithReadOnlyMyCollectionProperty)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithMyCollectionField)) { - Write50_TypeWithMyCollectionField(n, ns,(global::SerializationTypes.TypeWithMyCollectionField)o, isNullable, true); + Write51_TypeWithMyCollectionField(n, ns,(global::SerializationTypes.TypeWithMyCollectionField)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.StructNotSerializable)) { - Write49_StructNotSerializable(n, ns,(global::SerializationTypes.StructNotSerializable)o, true); + Write50_StructNotSerializable(n, ns,(global::SerializationTypes.StructNotSerializable)o, true); + return; + } + if (t == typeof(global::SerializationTypes.TypeWithArraylikeMembers)) { + Write49_TypeWithArraylikeMembers(n, ns,(global::SerializationTypes.TypeWithArraylikeMembers)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.TypeWithGetOnlyArrayProperties)) { @@ -1816,7 +1872,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(Write52_MyEnum((global::SerializationTypes.MyEnum)o)); + Writer.WriteString(Write53_MyEnum((global::SerializationTypes.MyEnum)o)); Writer.WriteEndElement(); return; } @@ -1827,7 +1883,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++) { - Write57_TypeA(@"TypeA", @"", ((global::SerializationTypes.TypeA)a[ia]), true, false); + Write58_TypeA(@"TypeA", @"", ((global::SerializationTypes.TypeA)a[ia]), true, false); } } } @@ -1837,63 +1893,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(Write68_EnumFlags((global::SerializationTypes.EnumFlags)o)); + Writer.WriteString(Write69_EnumFlags((global::SerializationTypes.EnumFlags)o)); Writer.WriteEndElement(); return; } if (t == typeof(global::SerializationTypes.IntEnum)) { Writer.WriteStartElement(n, ns); WriteXsiType(@"IntEnum", @""); - Writer.WriteString(Write72_IntEnum((global::SerializationTypes.IntEnum)o)); + Writer.WriteString(Write73_IntEnum((global::SerializationTypes.IntEnum)o)); Writer.WriteEndElement(); return; } if (t == typeof(global::SerializationTypes.ShortEnum)) { Writer.WriteStartElement(n, ns); WriteXsiType(@"ShortEnum", @""); - Writer.WriteString(Write73_ShortEnum((global::SerializationTypes.ShortEnum)o)); + Writer.WriteString(Write74_ShortEnum((global::SerializationTypes.ShortEnum)o)); Writer.WriteEndElement(); return; } if (t == typeof(global::SerializationTypes.ByteEnum)) { Writer.WriteStartElement(n, ns); WriteXsiType(@"ByteEnum", @""); - Writer.WriteString(Write76_ByteEnum((global::SerializationTypes.ByteEnum)o)); + Writer.WriteString(Write77_ByteEnum((global::SerializationTypes.ByteEnum)o)); Writer.WriteEndElement(); return; } if (t == typeof(global::SerializationTypes.SByteEnum)) { Writer.WriteStartElement(n, ns); WriteXsiType(@"SByteEnum", @""); - Writer.WriteString(Write77_SByteEnum((global::SerializationTypes.SByteEnum)o)); + Writer.WriteString(Write78_SByteEnum((global::SerializationTypes.SByteEnum)o)); Writer.WriteEndElement(); return; } if (t == typeof(global::SerializationTypes.UIntEnum)) { Writer.WriteStartElement(n, ns); WriteXsiType(@"UIntEnum", @""); - Writer.WriteString(Write78_UIntEnum((global::SerializationTypes.UIntEnum)o)); + Writer.WriteString(Write79_UIntEnum((global::SerializationTypes.UIntEnum)o)); Writer.WriteEndElement(); return; } if (t == typeof(global::SerializationTypes.LongEnum)) { Writer.WriteStartElement(n, ns); WriteXsiType(@"LongEnum", @""); - Writer.WriteString(Write79_LongEnum((global::SerializationTypes.LongEnum)o)); + Writer.WriteString(Write80_LongEnum((global::SerializationTypes.LongEnum)o)); Writer.WriteEndElement(); return; } if (t == typeof(global::SerializationTypes.ULongEnum)) { Writer.WriteStartElement(n, ns); WriteXsiType(@"ULongEnum", @""); - Writer.WriteString(Write80_ULongEnum((global::SerializationTypes.ULongEnum)o)); + Writer.WriteString(Write81_ULongEnum((global::SerializationTypes.ULongEnum)o)); Writer.WriteEndElement(); return; } if (t == typeof(global::SerializationTypes.ItemChoiceType)) { Writer.WriteStartElement(n, ns); WriteXsiType(@"ItemChoiceType", @""); - Writer.WriteString(Write81_ItemChoiceType((global::SerializationTypes.ItemChoiceType)o)); + Writer.WriteString(Write82_ItemChoiceType((global::SerializationTypes.ItemChoiceType)o)); Writer.WriteEndElement(); return; } @@ -1904,7 +1960,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", @"", Write81_ItemChoiceType(((global::SerializationTypes.ItemChoiceType)a[ia]))); + WriteElementString(@"ItemChoiceType", @"", Write82_ItemChoiceType(((global::SerializationTypes.ItemChoiceType)a[ia]))); } } } @@ -1972,7 +2028,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(Write103_MoreChoices((global::SerializationTypes.MoreChoices)o)); + Writer.WriteString(Write104_MoreChoices((global::SerializationTypes.MoreChoices)o)); Writer.WriteEndElement(); return; } @@ -1984,7 +2040,7 @@ void Write1_Object(string n, string ns, global::System.Object o, bool isNullable WriteEndElement(o); } - string Write103_MoreChoices(global::SerializationTypes.MoreChoices v) { + string Write104_MoreChoices(global::SerializationTypes.MoreChoices v) { string s = null; switch (v) { case global::SerializationTypes.MoreChoices.@None: s = @"None"; break; @@ -2015,7 +2071,7 @@ void Write46_SimpleType(string n, string ns, global::SerializationTypes.SimpleTy WriteEndElement(o); } - string Write81_ItemChoiceType(global::SerializationTypes.ItemChoiceType v) { + string Write82_ItemChoiceType(global::SerializationTypes.ItemChoiceType v) { string s = null; switch (v) { case global::SerializationTypes.ItemChoiceType.@None: s = @"None"; break; @@ -2027,7 +2083,7 @@ string Write81_ItemChoiceType(global::SerializationTypes.ItemChoiceType v) { return s; } - string Write80_ULongEnum(global::SerializationTypes.ULongEnum v) { + string Write81_ULongEnum(global::SerializationTypes.ULongEnum v) { string s = null; switch (v) { case global::SerializationTypes.ULongEnum.@Option0: s = @"Option0"; break; @@ -2038,7 +2094,7 @@ string Write80_ULongEnum(global::SerializationTypes.ULongEnum v) { return s; } - string Write79_LongEnum(global::SerializationTypes.LongEnum v) { + string Write80_LongEnum(global::SerializationTypes.LongEnum v) { string s = null; switch (v) { case global::SerializationTypes.LongEnum.@Option0: s = @"Option0"; break; @@ -2049,7 +2105,7 @@ string Write79_LongEnum(global::SerializationTypes.LongEnum v) { return s; } - string Write78_UIntEnum(global::SerializationTypes.UIntEnum v) { + string Write79_UIntEnum(global::SerializationTypes.UIntEnum v) { string s = null; switch (v) { case global::SerializationTypes.UIntEnum.@Option0: s = @"Option0"; break; @@ -2060,7 +2116,7 @@ string Write78_UIntEnum(global::SerializationTypes.UIntEnum v) { return s; } - string Write77_SByteEnum(global::SerializationTypes.SByteEnum v) { + string Write78_SByteEnum(global::SerializationTypes.SByteEnum v) { string s = null; switch (v) { case global::SerializationTypes.SByteEnum.@Option0: s = @"Option0"; break; @@ -2071,7 +2127,7 @@ string Write77_SByteEnum(global::SerializationTypes.SByteEnum v) { return s; } - string Write76_ByteEnum(global::SerializationTypes.ByteEnum v) { + string Write77_ByteEnum(global::SerializationTypes.ByteEnum v) { string s = null; switch (v) { case global::SerializationTypes.ByteEnum.@Option0: s = @"Option0"; break; @@ -2082,7 +2138,7 @@ string Write76_ByteEnum(global::SerializationTypes.ByteEnum v) { return s; } - string Write73_ShortEnum(global::SerializationTypes.ShortEnum v) { + string Write74_ShortEnum(global::SerializationTypes.ShortEnum v) { string s = null; switch (v) { case global::SerializationTypes.ShortEnum.@Option0: s = @"Option0"; break; @@ -2093,7 +2149,7 @@ string Write73_ShortEnum(global::SerializationTypes.ShortEnum v) { return s; } - string Write72_IntEnum(global::SerializationTypes.IntEnum v) { + string Write73_IntEnum(global::SerializationTypes.IntEnum v) { string s = null; switch (v) { case global::SerializationTypes.IntEnum.@Option0: s = @"Option0"; break; @@ -2104,7 +2160,7 @@ string Write72_IntEnum(global::SerializationTypes.IntEnum v) { return s; } - string Write68_EnumFlags(global::SerializationTypes.EnumFlags v) { + string Write69_EnumFlags(global::SerializationTypes.EnumFlags v) { string s = null; switch (v) { case global::SerializationTypes.EnumFlags.@One: s = @"One"; break; @@ -2122,7 +2178,7 @@ string Write68_EnumFlags(global::SerializationTypes.EnumFlags v) { return s; } - void Write57_TypeA(string n, string ns, global::SerializationTypes.TypeA o, bool isNullable, bool needType) { + void Write58_TypeA(string n, string ns, global::SerializationTypes.TypeA o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -2141,7 +2197,7 @@ void Write57_TypeA(string n, string ns, global::SerializationTypes.TypeA o, bool WriteEndElement(o); } - string Write52_MyEnum(global::SerializationTypes.MyEnum v) { + string Write53_MyEnum(global::SerializationTypes.MyEnum v) { string s = null; switch (v) { case global::SerializationTypes.MyEnum.@One: s = @"One"; break; @@ -3322,7 +3378,111 @@ void Write48_TypeWithGetOnlyArrayProperties(string n, string ns, global::Seriali WriteEndElement(o); } - void Write49_StructNotSerializable(string n, string ns, global::SerializationTypes.StructNotSerializable o, bool needType) { + void Write49_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 Write50_StructNotSerializable(string n, string ns, global::SerializationTypes.StructNotSerializable o, bool needType) { if (!needType) { System.Type t = o.GetType(); if (t == typeof(global::SerializationTypes.StructNotSerializable)) { @@ -3337,7 +3497,7 @@ void Write49_StructNotSerializable(string n, string ns, global::SerializationTyp WriteEndElement(o); } - void Write50_TypeWithMyCollectionField(string n, string ns, global::SerializationTypes.TypeWithMyCollectionField o, bool isNullable, bool needType) { + void Write51_TypeWithMyCollectionField(string n, string ns, global::SerializationTypes.TypeWithMyCollectionField o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3368,7 +3528,7 @@ void Write50_TypeWithMyCollectionField(string n, string ns, global::Serializatio WriteEndElement(o); } - void Write51_Item(string n, string ns, global::SerializationTypes.TypeWithReadOnlyMyCollectionProperty o, bool isNullable, bool needType) { + void Write52_Item(string n, string ns, global::SerializationTypes.TypeWithReadOnlyMyCollectionProperty o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3399,7 +3559,7 @@ void Write51_Item(string n, string ns, global::SerializationTypes.TypeWithReadOn WriteEndElement(o); } - void Write53_TypeWithEnumMembers(string n, string ns, global::SerializationTypes.TypeWithEnumMembers o, bool isNullable, bool needType) { + void Write54_TypeWithEnumMembers(string n, string ns, global::SerializationTypes.TypeWithEnumMembers o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3414,12 +3574,12 @@ void Write53_TypeWithEnumMembers(string n, string ns, global::SerializationTypes } WriteStartElement(n, ns, o, false, null); if (needType) WriteXsiType(@"TypeWithEnumMembers", @""); - WriteElementString(@"F1", @"", Write52_MyEnum(((global::SerializationTypes.MyEnum)o.@F1))); - WriteElementString(@"P1", @"", Write52_MyEnum(((global::SerializationTypes.MyEnum)o.@P1))); + WriteElementString(@"F1", @"", Write53_MyEnum(((global::SerializationTypes.MyEnum)o.@F1))); + WriteElementString(@"P1", @"", Write53_MyEnum(((global::SerializationTypes.MyEnum)o.@P1))); WriteEndElement(o); } - void Write54_DCStruct(string n, string ns, global::SerializationTypes.DCStruct o, bool needType) { + void Write55_DCStruct(string n, string ns, global::SerializationTypes.DCStruct o, bool needType) { if (!needType) { System.Type t = o.GetType(); if (t == typeof(global::SerializationTypes.DCStruct)) { @@ -3434,7 +3594,7 @@ void Write54_DCStruct(string n, string ns, global::SerializationTypes.DCStruct o WriteEndElement(o); } - void Write55_DCClassWithEnumAndStruct(string n, string ns, global::SerializationTypes.DCClassWithEnumAndStruct o, bool isNullable, bool needType) { + void Write56_DCClassWithEnumAndStruct(string n, string ns, global::SerializationTypes.DCClassWithEnumAndStruct o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3449,12 +3609,12 @@ void Write55_DCClassWithEnumAndStruct(string n, string ns, global::Serialization } WriteStartElement(n, ns, o, false, null); if (needType) WriteXsiType(@"DCClassWithEnumAndStruct", @""); - Write54_DCStruct(@"MyStruct", @"", ((global::SerializationTypes.DCStruct)o.@MyStruct), false); - WriteElementString(@"MyEnum1", @"", Write52_MyEnum(((global::SerializationTypes.MyEnum)o.@MyEnum1))); + Write55_DCStruct(@"MyStruct", @"", ((global::SerializationTypes.DCStruct)o.@MyStruct), false); + WriteElementString(@"MyEnum1", @"", Write53_MyEnum(((global::SerializationTypes.MyEnum)o.@MyEnum1))); WriteEndElement(o); } - void Write56_BuiltInTypes(string n, string ns, global::SerializationTypes.BuiltInTypes o, bool isNullable, bool needType) { + void Write57_BuiltInTypes(string n, string ns, global::SerializationTypes.BuiltInTypes o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3473,7 +3633,7 @@ void Write56_BuiltInTypes(string n, string ns, global::SerializationTypes.BuiltI WriteEndElement(o); } - void Write58_TypeB(string n, string ns, global::SerializationTypes.TypeB o, bool isNullable, bool needType) { + void Write59_TypeB(string n, string ns, global::SerializationTypes.TypeB o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3492,7 +3652,7 @@ void Write58_TypeB(string n, string ns, global::SerializationTypes.TypeB o, bool WriteEndElement(o); } - void Write59_TypeHasArrayOfASerializedAsB(string n, string ns, global::SerializationTypes.TypeHasArrayOfASerializedAsB o, bool isNullable, bool needType) { + void Write60_TypeHasArrayOfASerializedAsB(string n, string ns, global::SerializationTypes.TypeHasArrayOfASerializedAsB o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3512,7 +3672,7 @@ void Write59_TypeHasArrayOfASerializedAsB(string n, string ns, global::Serializa if (a != null){ WriteStartElement(@"Items", @"", null, false); for (int ia = 0; ia < a.Length; ia++) { - Write57_TypeA(@"TypeA", @"", ((global::SerializationTypes.TypeA)a[ia]), true, false); + Write58_TypeA(@"TypeA", @"", ((global::SerializationTypes.TypeA)a[ia]), true, false); } WriteEndElement(); } @@ -3520,7 +3680,7 @@ void Write59_TypeHasArrayOfASerializedAsB(string n, string ns, global::Serializa WriteEndElement(o); } - void Write60_Item(string n, string ns, global::SerializationTypes.@__TypeNameWithSpecialCharacters漢ñ o, bool isNullable, bool needType) { + void Write61_Item(string n, string ns, global::SerializationTypes.@__TypeNameWithSpecialCharacters漢ñ o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3539,7 +3699,7 @@ void Write60_Item(string n, string ns, global::SerializationTypes.@__TypeNameWit WriteEndElement(o); } - void Write63_DerivedClassWithSameProperty2(string n, string ns, global::SerializationTypes.DerivedClassWithSameProperty2 o, bool isNullable, bool needType) { + void Write64_DerivedClassWithSameProperty2(string n, string ns, global::SerializationTypes.DerivedClassWithSameProperty2 o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3570,7 +3730,7 @@ void Write63_DerivedClassWithSameProperty2(string n, string ns, global::Serializ WriteEndElement(o); } - void Write62_DerivedClassWithSameProperty(string n, string ns, global::SerializationTypes.DerivedClassWithSameProperty o, bool isNullable, bool needType) { + void Write63_DerivedClassWithSameProperty(string n, string ns, global::SerializationTypes.DerivedClassWithSameProperty o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3581,7 +3741,7 @@ void Write62_DerivedClassWithSameProperty(string n, string ns, global::Serializa } else { if (t == typeof(global::SerializationTypes.DerivedClassWithSameProperty2)) { - Write63_DerivedClassWithSameProperty2(n, ns,(global::SerializationTypes.DerivedClassWithSameProperty2)o, isNullable, true); + Write64_DerivedClassWithSameProperty2(n, ns,(global::SerializationTypes.DerivedClassWithSameProperty2)o, isNullable, true); return; } throw CreateUnknownTypeException(o); @@ -3605,7 +3765,7 @@ void Write62_DerivedClassWithSameProperty(string n, string ns, global::Serializa WriteEndElement(o); } - void Write61_BaseClassWithSamePropertyName(string n, string ns, global::SerializationTypes.BaseClassWithSamePropertyName o, bool isNullable, bool needType) { + void Write62_BaseClassWithSamePropertyName(string n, string ns, global::SerializationTypes.BaseClassWithSamePropertyName o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3616,11 +3776,11 @@ void Write61_BaseClassWithSamePropertyName(string n, string ns, global::Serializ } else { if (t == typeof(global::SerializationTypes.DerivedClassWithSameProperty)) { - Write62_DerivedClassWithSameProperty(n, ns,(global::SerializationTypes.DerivedClassWithSameProperty)o, isNullable, true); + Write63_DerivedClassWithSameProperty(n, ns,(global::SerializationTypes.DerivedClassWithSameProperty)o, isNullable, true); return; } if (t == typeof(global::SerializationTypes.DerivedClassWithSameProperty2)) { - Write63_DerivedClassWithSameProperty2(n, ns,(global::SerializationTypes.DerivedClassWithSameProperty2)o, isNullable, true); + Write64_DerivedClassWithSameProperty2(n, ns,(global::SerializationTypes.DerivedClassWithSameProperty2)o, isNullable, true); return; } throw CreateUnknownTypeException(o); @@ -3644,7 +3804,7 @@ void Write61_BaseClassWithSamePropertyName(string n, string ns, global::Serializ WriteEndElement(o); } - void Write64_Item(string n, string ns, global::SerializationTypes.TypeWithDateTimePropertyAsXmlTime o, bool isNullable, bool needType) { + void Write65_Item(string n, string ns, global::SerializationTypes.TypeWithDateTimePropertyAsXmlTime o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3665,7 +3825,7 @@ void Write64_Item(string n, string ns, global::SerializationTypes.TypeWithDateTi WriteEndElement(o); } - void Write65_TypeWithByteArrayAsXmlText(string n, string ns, global::SerializationTypes.TypeWithByteArrayAsXmlText o, bool isNullable, bool needType) { + void Write66_TypeWithByteArrayAsXmlText(string n, string ns, global::SerializationTypes.TypeWithByteArrayAsXmlText o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3686,7 +3846,7 @@ void Write65_TypeWithByteArrayAsXmlText(string n, string ns, global::Serializati WriteEndElement(o); } - void Write66_SimpleDC(string n, string ns, global::SerializationTypes.SimpleDC o, bool isNullable, bool needType) { + void Write67_SimpleDC(string n, string ns, global::SerializationTypes.SimpleDC o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3705,7 +3865,7 @@ void Write66_SimpleDC(string n, string ns, global::SerializationTypes.SimpleDC o WriteEndElement(o); } - void Write67_Item(string n, string ns, global::SerializationTypes.TypeWithXmlTextAttributeOnArray o, bool isNullable, bool needType) { + void Write68_Item(string n, string ns, global::SerializationTypes.TypeWithXmlTextAttributeOnArray o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3733,7 +3893,7 @@ void Write67_Item(string n, string ns, global::SerializationTypes.TypeWithXmlTex WriteEndElement(o); } - void Write69_ClassImplementsInterface(string n, string ns, global::SerializationTypes.ClassImplementsInterface o, bool isNullable, bool needType) { + void Write70_ClassImplementsInterface(string n, string ns, global::SerializationTypes.ClassImplementsInterface o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3755,7 +3915,7 @@ void Write69_ClassImplementsInterface(string n, string ns, global::Serialization WriteEndElement(o); } - void Write70_SomeStruct(string n, string ns, global::SerializationTypes.SomeStruct o, bool needType) { + void Write71_SomeStruct(string n, string ns, global::SerializationTypes.SomeStruct o, bool needType) { if (!needType) { System.Type t = o.GetType(); if (t == typeof(global::SerializationTypes.SomeStruct)) { @@ -3771,7 +3931,7 @@ void Write70_SomeStruct(string n, string ns, global::SerializationTypes.SomeStru WriteEndElement(o); } - void Write71_WithStruct(string n, string ns, global::SerializationTypes.WithStruct o, bool isNullable, bool needType) { + void Write72_WithStruct(string n, string ns, global::SerializationTypes.WithStruct o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3786,11 +3946,11 @@ void Write71_WithStruct(string n, string ns, global::SerializationTypes.WithStru } WriteStartElement(n, ns, o, false, null); if (needType) WriteXsiType(@"WithStruct", @""); - Write70_SomeStruct(@"Some", @"", ((global::SerializationTypes.SomeStruct)o.@Some), false); + Write71_SomeStruct(@"Some", @"", ((global::SerializationTypes.SomeStruct)o.@Some), false); WriteEndElement(o); } - void Write74_WithEnums(string n, string ns, global::SerializationTypes.WithEnums o, bool isNullable, bool needType) { + void Write75_WithEnums(string n, string ns, global::SerializationTypes.WithEnums o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3805,12 +3965,12 @@ void Write74_WithEnums(string n, string ns, global::SerializationTypes.WithEnums } WriteStartElement(n, ns, o, false, null); if (needType) WriteXsiType(@"WithEnums", @""); - WriteElementString(@"Int", @"", Write72_IntEnum(((global::SerializationTypes.IntEnum)o.@Int))); - WriteElementString(@"Short", @"", Write73_ShortEnum(((global::SerializationTypes.ShortEnum)o.@Short))); + WriteElementString(@"Int", @"", Write73_IntEnum(((global::SerializationTypes.IntEnum)o.@Int))); + WriteElementString(@"Short", @"", Write74_ShortEnum(((global::SerializationTypes.ShortEnum)o.@Short))); WriteEndElement(o); } - void Write75_WithNullables(string n, string ns, global::SerializationTypes.WithNullables o, bool isNullable, bool needType) { + void Write76_WithNullables(string n, string ns, global::SerializationTypes.WithNullables o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3826,13 +3986,13 @@ void Write75_WithNullables(string n, string ns, global::SerializationTypes.WithN WriteStartElement(n, ns, o, false, null); if (needType) WriteXsiType(@"WithNullables", @""); if (o.@Optional != null) { - WriteElementString(@"Optional", @"", Write72_IntEnum(((global::SerializationTypes.IntEnum)o.@Optional))); + WriteElementString(@"Optional", @"", Write73_IntEnum(((global::SerializationTypes.IntEnum)o.@Optional))); } else { WriteNullTagLiteral(@"Optional", @""); } if (o.@Optionull != null) { - WriteElementString(@"Optionull", @"", Write72_IntEnum(((global::SerializationTypes.IntEnum)o.@Optionull))); + WriteElementString(@"Optionull", @"", Write73_IntEnum(((global::SerializationTypes.IntEnum)o.@Optionull))); } else { WriteNullTagLiteral(@"Optionull", @""); @@ -3850,13 +4010,13 @@ void Write75_WithNullables(string n, string ns, global::SerializationTypes.WithN WriteNullTagLiteral(@"OptionullInt", @""); } if (o.@Struct1 != null) { - Write70_SomeStruct(@"Struct1", @"", ((global::SerializationTypes.SomeStruct)o.@Struct1), false); + Write71_SomeStruct(@"Struct1", @"", ((global::SerializationTypes.SomeStruct)o.@Struct1), false); } else { WriteNullTagLiteral(@"Struct1", @""); } if (o.@Struct2 != null) { - Write70_SomeStruct(@"Struct2", @"", ((global::SerializationTypes.SomeStruct)o.@Struct2), false); + Write71_SomeStruct(@"Struct2", @"", ((global::SerializationTypes.SomeStruct)o.@Struct2), false); } else { WriteNullTagLiteral(@"Struct2", @""); @@ -3864,7 +4024,7 @@ void Write75_WithNullables(string n, string ns, global::SerializationTypes.WithN WriteEndElement(o); } - void Write82_XmlSerializerAttributes(string n, string ns, global::SerializationTypes.XmlSerializerAttributes o, bool isNullable, bool needType) { + void Write83_XmlSerializerAttributes(string n, string ns, global::SerializationTypes.XmlSerializerAttributes o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3903,7 +4063,7 @@ void Write82_XmlSerializerAttributes(string n, string ns, global::SerializationT if (a != null){ WriteStartElement(@"XmlEnumProperty", @"", null, false); for (int ia = 0; ia < a.Length; ia++) { - WriteElementString(@"ItemChoiceType", @"", Write81_ItemChoiceType(((global::SerializationTypes.ItemChoiceType)a[ia]))); + WriteElementString(@"ItemChoiceType", @"", Write82_ItemChoiceType(((global::SerializationTypes.ItemChoiceType)a[ia]))); } WriteEndElement(); } @@ -3926,7 +4086,7 @@ void Write82_XmlSerializerAttributes(string n, string ns, global::SerializationT WriteEndElement(o); } - void Write83_TypeWithAnyAttribute(string n, string ns, global::SerializationTypes.TypeWithAnyAttribute o, bool isNullable, bool needType) { + void Write84_TypeWithAnyAttribute(string n, string ns, global::SerializationTypes.TypeWithAnyAttribute o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3955,7 +4115,7 @@ void Write83_TypeWithAnyAttribute(string n, string ns, global::SerializationType WriteEndElement(o); } - void Write84_KnownTypesThroughConstructor(string n, string ns, global::SerializationTypes.KnownTypesThroughConstructor o, bool isNullable, bool needType) { + void Write85_KnownTypesThroughConstructor(string n, string ns, global::SerializationTypes.KnownTypesThroughConstructor o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3975,7 +4135,7 @@ void Write84_KnownTypesThroughConstructor(string n, string ns, global::Serializa WriteEndElement(o); } - void Write85_SimpleKnownTypeValue(string n, string ns, global::SerializationTypes.SimpleKnownTypeValue o, bool isNullable, bool needType) { + void Write86_SimpleKnownTypeValue(string n, string ns, global::SerializationTypes.SimpleKnownTypeValue o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -3994,7 +4154,7 @@ void Write85_SimpleKnownTypeValue(string n, string ns, global::SerializationType WriteEndElement(o); } - void Write86_TypeWithPropertyNameSpecified(string n, string ns, global::SerializationTypes.TypeWithPropertyNameSpecified o, bool isNullable, bool needType) { + void Write87_TypeWithPropertyNameSpecified(string n, string ns, global::SerializationTypes.TypeWithPropertyNameSpecified o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -4018,7 +4178,7 @@ void Write86_TypeWithPropertyNameSpecified(string n, string ns, global::Serializ WriteEndElement(o); } - void Write87_TypeWithXmlSchemaFormAttribute(string n, string ns, global::SerializationTypes.TypeWithXmlSchemaFormAttribute o, bool isNullable, bool needType) { + void Write88_TypeWithXmlSchemaFormAttribute(string n, string ns, global::SerializationTypes.TypeWithXmlSchemaFormAttribute o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -4066,7 +4226,7 @@ void Write87_TypeWithXmlSchemaFormAttribute(string n, string ns, global::Seriali WriteEndElement(o); } - void Write88_Item(string n, string ns, global::SerializationTypes.TypeWithTypeNameInXmlTypeAttribute o, bool isNullable, bool needType) { + void Write89_Item(string n, string ns, global::SerializationTypes.TypeWithTypeNameInXmlTypeAttribute o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -4085,7 +4245,7 @@ void Write88_Item(string n, string ns, global::SerializationTypes.TypeWithTypeNa WriteEndElement(o); } - void Write90_CustomElement(string n, string ns, global::SerializationTypes.CustomElement o, bool isNullable, bool needType) { + void Write91_CustomElement(string n, string ns, global::SerializationTypes.CustomElement o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -4122,7 +4282,7 @@ void Write90_CustomElement(string n, string ns, global::SerializationTypes.Custo WriteEndElement(o); } - void Write91_CustomDocument(string n, string ns, global::SerializationTypes.CustomDocument o, bool isNullable, bool needType) { + void Write92_CustomDocument(string n, string ns, global::SerializationTypes.CustomDocument o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -4141,7 +4301,7 @@ void Write91_CustomDocument(string n, string ns, global::SerializationTypes.Cust global::System.Collections.Generic.List a = (global::System.Collections.Generic.List)o.@CustomItems; if (a != null) { for (int ia = 0; ia < ((System.Collections.ICollection)a).Count; ia++) { - Write90_CustomElement(@"customElement", @"", ((global::SerializationTypes.CustomElement)a[ia]), false, false); + Write91_CustomElement(@"customElement", @"", ((global::SerializationTypes.CustomElement)a[ia]), false, false); } } } @@ -4161,7 +4321,7 @@ void Write91_CustomDocument(string n, string ns, global::SerializationTypes.Cust WriteEndElement(o); } - void Write92_Item(string n, string ns, global::SerializationTypes.TypeWithNonPublicDefaultConstructor o, bool isNullable, bool needType) { + void Write93_Item(string n, string ns, global::SerializationTypes.TypeWithNonPublicDefaultConstructor o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -4180,7 +4340,7 @@ void Write92_Item(string n, string ns, global::SerializationTypes.TypeWithNonPub WriteEndElement(o); } - void Write93_ServerSettings(string n, string ns, global::SerializationTypes.ServerSettings o, bool isNullable, bool needType) { + void Write94_ServerSettings(string n, string ns, global::SerializationTypes.ServerSettings o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -4200,7 +4360,7 @@ void Write93_ServerSettings(string n, string ns, global::SerializationTypes.Serv WriteEndElement(o); } - void Write94_TypeWithXmlQualifiedName(string n, string ns, global::SerializationTypes.TypeWithXmlQualifiedName o, bool isNullable, bool needType) { + void Write95_TypeWithXmlQualifiedName(string n, string ns, global::SerializationTypes.TypeWithXmlQualifiedName o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -4219,7 +4379,7 @@ void Write94_TypeWithXmlQualifiedName(string n, string ns, global::Serialization WriteEndElement(o); } - void Write95_TypeWith2DArrayProperty2(string n, string ns, global::SerializationTypes.TypeWith2DArrayProperty2 o, bool isNullable, bool needType) { + void Write96_TypeWith2DArrayProperty2(string n, string ns, global::SerializationTypes.TypeWith2DArrayProperty2 o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -4256,7 +4416,7 @@ void Write95_TypeWith2DArrayProperty2(string n, string ns, global::Serialization WriteEndElement(o); } - void Write96_Item(string n, string ns, global::SerializationTypes.TypeWithPropertiesHavingDefaultValue o, bool isNullable, bool needType) { + void Write97_Item(string n, string ns, global::SerializationTypes.TypeWithPropertiesHavingDefaultValue o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -4284,7 +4444,7 @@ void Write96_Item(string n, string ns, global::SerializationTypes.TypeWithProper WriteEndElement(o); } - void Write97_Item(string n, string ns, global::SerializationTypes.TypeWithEnumPropertyHavingDefaultValue o, bool isNullable, bool needType) { + void Write98_Item(string n, string ns, global::SerializationTypes.TypeWithEnumPropertyHavingDefaultValue o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -4300,12 +4460,12 @@ void Write97_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", @"", Write72_IntEnum(((global::SerializationTypes.IntEnum)o.@EnumProperty))); + WriteElementString(@"EnumProperty", @"", Write73_IntEnum(((global::SerializationTypes.IntEnum)o.@EnumProperty))); } WriteEndElement(o); } - void Write98_Item(string n, string ns, global::SerializationTypes.TypeWithEnumFlagPropertyHavingDefaultValue o, bool isNullable, bool needType) { + void Write99_Item(string n, string ns, global::SerializationTypes.TypeWithEnumFlagPropertyHavingDefaultValue o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -4322,12 +4482,12 @@ void Write98_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", @"", Write68_EnumFlags(((global::SerializationTypes.EnumFlags)o.@EnumProperty))); + WriteElementString(@"EnumProperty", @"", Write69_EnumFlags(((global::SerializationTypes.EnumFlags)o.@EnumProperty))); } WriteEndElement(o); } - void Write99_TypeWithShouldSerializeMethod(string n, string ns, global::SerializationTypes.TypeWithShouldSerializeMethod o, bool isNullable, bool needType) { + void Write100_TypeWithShouldSerializeMethod(string n, string ns, global::SerializationTypes.TypeWithShouldSerializeMethod o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -4348,7 +4508,7 @@ void Write99_TypeWithShouldSerializeMethod(string n, string ns, global::Serializ WriteEndElement(o); } - void Write100_Item(string n, string ns, global::SerializationTypes.KnownTypesThroughConstructorWithArrayProperties o, bool isNullable, bool needType) { + void Write101_Item(string n, string ns, global::SerializationTypes.KnownTypesThroughConstructorWithArrayProperties o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -4368,7 +4528,7 @@ void Write100_Item(string n, string ns, global::SerializationTypes.KnownTypesThr WriteEndElement(o); } - void Write101_Item(string n, string ns, global::SerializationTypes.KnownTypesThroughConstructorWithValue o, bool isNullable, bool needType) { + void Write102_Item(string n, string ns, global::SerializationTypes.KnownTypesThroughConstructorWithValue o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -4387,7 +4547,7 @@ void Write101_Item(string n, string ns, global::SerializationTypes.KnownTypesThr WriteEndElement(o); } - void Write102_Item(string n, string ns, global::SerializationTypes.TypeWithTypesHavingCustomFormatter o, bool isNullable, bool needType) { + void Write103_Item(string n, string ns, global::SerializationTypes.TypeWithTypesHavingCustomFormatter o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -4414,7 +4574,7 @@ void Write102_Item(string n, string ns, global::SerializationTypes.TypeWithTypes WriteEndElement(o); } - void Write104_Item(string n, string ns, global::SerializationTypes.TypeWithArrayPropertyHavingChoice o, bool isNullable, bool needType) { + void Write105_Item(string n, string ns, global::SerializationTypes.TypeWithArrayPropertyHavingChoice o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -4457,7 +4617,92 @@ void Write104_Item(string n, string ns, global::SerializationTypes.TypeWithArray WriteEndElement(o); } - void Write105_TypeWithFieldsOrdered(string n, string ns, global::SerializationTypes.TypeWithFieldsOrdered o, bool isNullable, bool needType) { + void Write106_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 Write107_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)) { + Write106_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 Write108_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"); + Write107_ComplexChoiceA(@"Item", @"", ((global::SerializationTypes.ComplexChoiceA)ai), false, false); + } + else if ((object)(ai) != null){ + throw CreateUnknownTypeException(ai); + } + } + } + } + } + WriteEndElement(o); + } + + void Write109_TypeWithFieldsOrdered(string n, string ns, global::SerializationTypes.TypeWithFieldsOrdered o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -4479,7 +4724,7 @@ void Write105_TypeWithFieldsOrdered(string n, string ns, global::SerializationTy WriteEndElement(o); } - void Write89_Item(string n, string ns, global::SerializationTypes.TypeWithSchemaFormInXmlAttribute o, bool isNullable, bool needType) { + void Write90_Item(string n, string ns, global::SerializationTypes.TypeWithSchemaFormInXmlAttribute o, bool isNullable, bool needType) { if ((object)o == null) { if (isNullable) WriteNullTagLiteral(n, ns); return; @@ -4504,7 +4749,7 @@ protected override void InitCallbacks() { public class XmlSerializationReader1 : System.Xml.Serialization.XmlSerializationReader { - public object Read115_TypeWithXmlElementProperty() { + public object Read119_TypeWithXmlElementProperty() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4522,7 +4767,7 @@ public object Read115_TypeWithXmlElementProperty() { return (object)o; } - public object Read116_TypeWithXmlDocumentProperty() { + public object Read120_TypeWithXmlDocumentProperty() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4540,7 +4785,7 @@ public object Read116_TypeWithXmlDocumentProperty() { return (object)o; } - public object Read117_TypeWithBinaryProperty() { + public object Read121_TypeWithBinaryProperty() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4558,7 +4803,7 @@ public object Read117_TypeWithBinaryProperty() { return (object)o; } - public object Read118_Item() { + public object Read122_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4576,7 +4821,7 @@ public object Read118_Item() { return (object)o; } - public object Read119_TypeWithTimeSpanProperty() { + public object Read123_TypeWithTimeSpanProperty() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4594,7 +4839,7 @@ public object Read119_TypeWithTimeSpanProperty() { return (object)o; } - public object Read120_Item() { + public object Read124_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4612,7 +4857,7 @@ public object Read120_Item() { return (object)o; } - public object Read121_TypeWithByteProperty() { + public object Read125_TypeWithByteProperty() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4630,7 +4875,7 @@ public object Read121_TypeWithByteProperty() { return (object)o; } - public object Read122_TypeWithXmlNodeArrayProperty() { + public object Read126_TypeWithXmlNodeArrayProperty() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4648,7 +4893,7 @@ public object Read122_TypeWithXmlNodeArrayProperty() { return (object)o; } - public object Read123_Animal() { + public object Read127_Animal() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4666,7 +4911,7 @@ public object Read123_Animal() { return (object)o; } - public object Read124_Dog() { + public object Read128_Dog() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4684,7 +4929,7 @@ public object Read124_Dog() { return (object)o; } - public object Read125_DogBreed() { + public object Read129_DogBreed() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4704,7 +4949,7 @@ public object Read125_DogBreed() { return (object)o; } - public object Read126_Group() { + public object Read130_Group() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4722,7 +4967,7 @@ public object Read126_Group() { return (object)o; } - public object Read127_Vehicle() { + public object Read131_Vehicle() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4740,7 +4985,7 @@ public object Read127_Vehicle() { return (object)o; } - public object Read128_Employee() { + public object Read132_Employee() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4758,7 +5003,7 @@ public object Read128_Employee() { return (object)o; } - public object Read129_BaseClass() { + public object Read133_BaseClass() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4776,7 +5021,7 @@ public object Read129_BaseClass() { return (object)o; } - public object Read130_DerivedClass() { + public object Read134_DerivedClass() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4794,7 +5039,7 @@ public object Read130_DerivedClass() { return (object)o; } - public object Read131_SimpleBaseClass() { + public object Read135_SimpleBaseClass() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4812,7 +5057,7 @@ public object Read131_SimpleBaseClass() { return (object)o; } - public object Read132_SimpleDerivedClass() { + public object Read136_SimpleDerivedClass() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4830,7 +5075,7 @@ public object Read132_SimpleDerivedClass() { return (object)o; } - public object Read133_BaseIXmlSerializable() { + public object Read137_BaseIXmlSerializable() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4857,7 +5102,7 @@ public object Read133_BaseIXmlSerializable() { return (object)o; } - public object Read134_DerivedIXmlSerializable() { + public object Read138_DerivedIXmlSerializable() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4875,7 +5120,7 @@ public object Read134_DerivedIXmlSerializable() { return (object)o; } - public object Read135_PurchaseOrder() { + public object Read139_PurchaseOrder() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4893,7 +5138,7 @@ public object Read135_PurchaseOrder() { return (object)o; } - public object Read136_Address() { + public object Read140_Address() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4911,7 +5156,7 @@ public object Read136_Address() { return (object)o; } - public object Read137_OrderedItem() { + public object Read141_OrderedItem() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4929,7 +5174,7 @@ public object Read137_OrderedItem() { return (object)o; } - public object Read138_AliasedTestType() { + public object Read142_AliasedTestType() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4947,7 +5192,7 @@ public object Read138_AliasedTestType() { return (object)o; } - public object Read139_BaseClass1() { + public object Read143_BaseClass1() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4965,7 +5210,7 @@ public object Read139_BaseClass1() { return (object)o; } - public object Read140_DerivedClass1() { + public object Read144_DerivedClass1() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -4983,7 +5228,7 @@ public object Read140_DerivedClass1() { return (object)o; } - public object Read141_ArrayOfDateTime() { + public object Read145_ArrayOfDateTime() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -5033,7 +5278,7 @@ public object Read141_ArrayOfDateTime() { return (object)o; } - public object Read142_Orchestra() { + public object Read146_Orchestra() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -5051,7 +5296,7 @@ public object Read142_Orchestra() { return (object)o; } - public object Read143_Instrument() { + public object Read147_Instrument() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -5069,7 +5314,7 @@ public object Read143_Instrument() { return (object)o; } - public object Read144_Brass() { + public object Read148_Brass() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -5087,7 +5332,7 @@ public object Read144_Brass() { return (object)o; } - public object Read145_Trumpet() { + public object Read149_Trumpet() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -5105,7 +5350,7 @@ public object Read145_Trumpet() { return (object)o; } - public object Read146_Pet() { + public object Read150_Pet() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -5123,7 +5368,7 @@ public object Read146_Pet() { return (object)o; } - public object Read147_DefaultValuesSetToNaN() { + public object Read151_DefaultValuesSetToNaN() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -5141,7 +5386,7 @@ public object Read147_DefaultValuesSetToNaN() { return (object)o; } - public object Read148_Item() { + public object Read152_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -5159,7 +5404,7 @@ public object Read148_Item() { return (object)o; } - public object Read149_Item() { + public object Read153_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -5177,7 +5422,7 @@ public object Read149_Item() { return (object)o; } - public object Read150_RootElement() { + public object Read154_RootElement() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -5195,7 +5440,7 @@ public object Read150_RootElement() { return (object)o; } - public object Read151_TypeWithLinkedProperty() { + public object Read155_TypeWithLinkedProperty() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -5213,7 +5458,7 @@ public object Read151_TypeWithLinkedProperty() { return (object)o; } - public object Read152_Document() { + public object Read156_Document() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -5231,7 +5476,7 @@ public object Read152_Document() { return (object)o; } - public object Read153_RootClass() { + public object Read157_RootClass() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -5249,7 +5494,7 @@ public object Read153_RootClass() { return (object)o; } - public object Read154_Parameter() { + public object Read158_Parameter() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -5267,7 +5512,7 @@ public object Read154_Parameter() { return (object)o; } - public object Read155_XElementWrapper() { + public object Read159_XElementWrapper() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -5285,7 +5530,7 @@ public object Read155_XElementWrapper() { return (object)o; } - public object Read156_XElementStruct() { + public object Read160_XElementStruct() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -5303,7 +5548,7 @@ public object Read156_XElementStruct() { return (object)o; } - public object Read157_XElementArrayWrapper() { + public object Read161_XElementArrayWrapper() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -5321,7 +5566,7 @@ public object Read157_XElementArrayWrapper() { return (object)o; } - public object Read158_TypeWithDateTimeStringProperty() { + public object Read162_TypeWithDateTimeStringProperty() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -5339,7 +5584,7 @@ public object Read158_TypeWithDateTimeStringProperty() { return (object)o; } - public object Read159_SimpleType() { + public object Read163_SimpleType() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -5357,7 +5602,7 @@ public object Read159_SimpleType() { return (object)o; } - public object Read160_TypeWithGetSetArrayMembers() { + public object Read164_TypeWithGetSetArrayMembers() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -5375,7 +5620,7 @@ public object Read160_TypeWithGetSetArrayMembers() { return (object)o; } - public object Read161_TypeWithGetOnlyArrayProperties() { + public object Read165_TypeWithGetOnlyArrayProperties() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -5393,13 +5638,31 @@ public object Read161_TypeWithGetOnlyArrayProperties() { return (object)o; } - public object Read162_StructNotSerializable() { + public object Read166_TypeWithArraylikeMembers() { + object o = null; + Reader.MoveToContent(); + if (Reader.NodeType == System.Xml.XmlNodeType.Element) { + do { + if (((object) Reader.LocalName == (object)id53_TypeWithArraylikeMembers && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read50_TypeWithArraylikeMembers(true, true); + break; + } + throw CreateUnknownNodeException(); + } while (false); + } + else { + UnknownNode(null, @":TypeWithArraylikeMembers"); + } + return (object)o; + } + + public object Read167_StructNotSerializable() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id53_StructNotSerializable && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read50_StructNotSerializable(true); + if (((object) Reader.LocalName == (object)id54_StructNotSerializable && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read51_StructNotSerializable(true); break; } throw CreateUnknownNodeException(); @@ -5411,13 +5674,13 @@ public object Read162_StructNotSerializable() { return (object)o; } - public object Read163_TypeWithMyCollectionField() { + public object Read168_TypeWithMyCollectionField() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id54_TypeWithMyCollectionField && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read51_TypeWithMyCollectionField(true, true); + if (((object) Reader.LocalName == (object)id55_TypeWithMyCollectionField && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read52_TypeWithMyCollectionField(true, true); break; } throw CreateUnknownNodeException(); @@ -5429,13 +5692,13 @@ public object Read163_TypeWithMyCollectionField() { return (object)o; } - public object Read164_Item() { + public object Read169_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id55_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read52_Item(true, true); + if (((object) Reader.LocalName == (object)id56_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read53_Item(true, true); break; } throw CreateUnknownNodeException(); @@ -5447,12 +5710,12 @@ public object Read164_Item() { return (object)o; } - public object Read165_ArrayOfAnyType() { + public object Read170_ArrayOfAnyType() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id56_ArrayOfAnyType && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id57_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; @@ -5465,7 +5728,7 @@ public object Read165_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)id57_anyType && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id58_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; } @@ -5495,14 +5758,14 @@ public object Read165_ArrayOfAnyType() { return (object)o; } - public object Read166_MyEnum() { + public object Read171_MyEnum() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id58_MyEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id59_MyEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { { - o = Read53_MyEnum(Reader.ReadElementString()); + o = Read54_MyEnum(Reader.ReadElementString()); } break; } @@ -5515,13 +5778,13 @@ public object Read166_MyEnum() { return (object)o; } - public object Read167_TypeWithEnumMembers() { + public object Read172_TypeWithEnumMembers() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id59_TypeWithEnumMembers && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read54_TypeWithEnumMembers(true, true); + if (((object) Reader.LocalName == (object)id60_TypeWithEnumMembers && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read55_TypeWithEnumMembers(true, true); break; } throw CreateUnknownNodeException(); @@ -5533,13 +5796,13 @@ public object Read167_TypeWithEnumMembers() { return (object)o; } - public object Read168_DCStruct() { + public object Read173_DCStruct() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id60_DCStruct && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read55_DCStruct(true); + if (((object) Reader.LocalName == (object)id61_DCStruct && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read56_DCStruct(true); break; } throw CreateUnknownNodeException(); @@ -5551,13 +5814,13 @@ public object Read168_DCStruct() { return (object)o; } - public object Read169_DCClassWithEnumAndStruct() { + public object Read174_DCClassWithEnumAndStruct() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id61_DCClassWithEnumAndStruct && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read56_DCClassWithEnumAndStruct(true, true); + if (((object) Reader.LocalName == (object)id62_DCClassWithEnumAndStruct && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read57_DCClassWithEnumAndStruct(true, true); break; } throw CreateUnknownNodeException(); @@ -5569,13 +5832,13 @@ public object Read169_DCClassWithEnumAndStruct() { return (object)o; } - public object Read170_BuiltInTypes() { + public object Read175_BuiltInTypes() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id62_BuiltInTypes && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read57_BuiltInTypes(true, true); + if (((object) Reader.LocalName == (object)id63_BuiltInTypes && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read58_BuiltInTypes(true, true); break; } throw CreateUnknownNodeException(); @@ -5587,13 +5850,13 @@ public object Read170_BuiltInTypes() { return (object)o; } - public object Read171_TypeA() { + public object Read176_TypeA() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id63_TypeA && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read58_TypeA(true, true); + if (((object) Reader.LocalName == (object)id64_TypeA && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read59_TypeA(true, true); break; } throw CreateUnknownNodeException(); @@ -5605,13 +5868,13 @@ public object Read171_TypeA() { return (object)o; } - public object Read172_TypeB() { + public object Read177_TypeB() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id64_TypeB && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read59_TypeB(true, true); + if (((object) Reader.LocalName == (object)id65_TypeB && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read60_TypeB(true, true); break; } throw CreateUnknownNodeException(); @@ -5623,13 +5886,13 @@ public object Read172_TypeB() { return (object)o; } - public object Read173_TypeHasArrayOfASerializedAsB() { + public object Read178_TypeHasArrayOfASerializedAsB() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id65_TypeHasArrayOfASerializedAsB && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read60_TypeHasArrayOfASerializedAsB(true, true); + if (((object) Reader.LocalName == (object)id66_TypeHasArrayOfASerializedAsB && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read61_TypeHasArrayOfASerializedAsB(true, true); break; } throw CreateUnknownNodeException(); @@ -5641,13 +5904,13 @@ public object Read173_TypeHasArrayOfASerializedAsB() { return (object)o; } - public object Read174_Item() { + public object Read179_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id66_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read61_Item(true, true); + if (((object) Reader.LocalName == (object)id67_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read62_Item(true, true); break; } throw CreateUnknownNodeException(); @@ -5659,13 +5922,13 @@ public object Read174_Item() { return (object)o; } - public object Read175_BaseClassWithSamePropertyName() { + public object Read180_BaseClassWithSamePropertyName() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id67_BaseClassWithSamePropertyName && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read62_BaseClassWithSamePropertyName(true, true); + if (((object) Reader.LocalName == (object)id68_BaseClassWithSamePropertyName && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read63_BaseClassWithSamePropertyName(true, true); break; } throw CreateUnknownNodeException(); @@ -5677,13 +5940,13 @@ public object Read175_BaseClassWithSamePropertyName() { return (object)o; } - public object Read176_DerivedClassWithSameProperty() { + public object Read181_DerivedClassWithSameProperty() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id68_DerivedClassWithSameProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read63_DerivedClassWithSameProperty(true, true); + if (((object) Reader.LocalName == (object)id69_DerivedClassWithSameProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read64_DerivedClassWithSameProperty(true, true); break; } throw CreateUnknownNodeException(); @@ -5695,13 +5958,13 @@ public object Read176_DerivedClassWithSameProperty() { return (object)o; } - public object Read177_DerivedClassWithSameProperty2() { + public object Read182_DerivedClassWithSameProperty2() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id69_DerivedClassWithSameProperty2 && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read64_DerivedClassWithSameProperty2(true, true); + if (((object) Reader.LocalName == (object)id70_DerivedClassWithSameProperty2 && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read65_DerivedClassWithSameProperty2(true, true); break; } throw CreateUnknownNodeException(); @@ -5713,13 +5976,13 @@ public object Read177_DerivedClassWithSameProperty2() { return (object)o; } - public object Read178_Item() { + public object Read183_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id70_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read65_Item(true, true); + if (((object) Reader.LocalName == (object)id71_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read66_Item(true, true); break; } throw CreateUnknownNodeException(); @@ -5731,13 +5994,13 @@ public object Read178_Item() { return (object)o; } - public object Read179_TypeWithByteArrayAsXmlText() { + public object Read184_TypeWithByteArrayAsXmlText() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id71_TypeWithByteArrayAsXmlText && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read66_TypeWithByteArrayAsXmlText(true, true); + if (((object) Reader.LocalName == (object)id72_TypeWithByteArrayAsXmlText && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read67_TypeWithByteArrayAsXmlText(true, true); break; } throw CreateUnknownNodeException(); @@ -5749,13 +6012,13 @@ public object Read179_TypeWithByteArrayAsXmlText() { return (object)o; } - public object Read180_SimpleDC() { + public object Read185_SimpleDC() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id72_SimpleDC && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read67_SimpleDC(true, true); + if (((object) Reader.LocalName == (object)id73_SimpleDC && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read68_SimpleDC(true, true); break; } throw CreateUnknownNodeException(); @@ -5767,13 +6030,13 @@ public object Read180_SimpleDC() { return (object)o; } - public object Read181_Item() { + public object Read186_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id73_Item && (object) Reader.NamespaceURI == (object)id74_Item)) { - o = Read68_Item(false, true); + if (((object) Reader.LocalName == (object)id74_Item && (object) Reader.NamespaceURI == (object)id75_Item)) { + o = Read69_Item(false, true); break; } throw CreateUnknownNodeException(); @@ -5785,14 +6048,14 @@ public object Read181_Item() { return (object)o; } - public object Read182_EnumFlags() { + public object Read187_EnumFlags() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id75_EnumFlags && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id76_EnumFlags && (object) Reader.NamespaceURI == (object)id2_Item)) { { - o = Read69_EnumFlags(Reader.ReadElementString()); + o = Read70_EnumFlags(Reader.ReadElementString()); } break; } @@ -5805,13 +6068,13 @@ public object Read182_EnumFlags() { return (object)o; } - public object Read183_ClassImplementsInterface() { + public object Read188_ClassImplementsInterface() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id76_ClassImplementsInterface && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read70_ClassImplementsInterface(true, true); + if (((object) Reader.LocalName == (object)id77_ClassImplementsInterface && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read71_ClassImplementsInterface(true, true); break; } throw CreateUnknownNodeException(); @@ -5823,13 +6086,13 @@ public object Read183_ClassImplementsInterface() { return (object)o; } - public object Read184_WithStruct() { + public object Read189_WithStruct() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id77_WithStruct && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read72_WithStruct(true, true); + if (((object) Reader.LocalName == (object)id78_WithStruct && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read73_WithStruct(true, true); break; } throw CreateUnknownNodeException(); @@ -5841,13 +6104,13 @@ public object Read184_WithStruct() { return (object)o; } - public object Read185_SomeStruct() { + public object Read190_SomeStruct() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id78_SomeStruct && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read71_SomeStruct(true); + if (((object) Reader.LocalName == (object)id79_SomeStruct && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read72_SomeStruct(true); break; } throw CreateUnknownNodeException(); @@ -5859,13 +6122,13 @@ public object Read185_SomeStruct() { return (object)o; } - public object Read186_WithEnums() { + public object Read191_WithEnums() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id79_WithEnums && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read75_WithEnums(true, true); + if (((object) Reader.LocalName == (object)id80_WithEnums && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read76_WithEnums(true, true); break; } throw CreateUnknownNodeException(); @@ -5877,13 +6140,13 @@ public object Read186_WithEnums() { return (object)o; } - public object Read187_WithNullables() { + public object Read192_WithNullables() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id80_WithNullables && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read79_WithNullables(true, true); + if (((object) Reader.LocalName == (object)id81_WithNullables && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read80_WithNullables(true, true); break; } throw CreateUnknownNodeException(); @@ -5895,14 +6158,14 @@ public object Read187_WithNullables() { return (object)o; } - public object Read188_ByteEnum() { + public object Read193_ByteEnum() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id81_ByteEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id82_ByteEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { { - o = Read80_ByteEnum(Reader.ReadElementString()); + o = Read81_ByteEnum(Reader.ReadElementString()); } break; } @@ -5915,14 +6178,14 @@ public object Read188_ByteEnum() { return (object)o; } - public object Read189_SByteEnum() { + public object Read194_SByteEnum() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id82_SByteEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id83_SByteEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { { - o = Read81_SByteEnum(Reader.ReadElementString()); + o = Read82_SByteEnum(Reader.ReadElementString()); } break; } @@ -5935,14 +6198,14 @@ public object Read189_SByteEnum() { return (object)o; } - public object Read190_ShortEnum() { + public object Read195_ShortEnum() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id83_ShortEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id84_ShortEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { { - o = Read74_ShortEnum(Reader.ReadElementString()); + o = Read75_ShortEnum(Reader.ReadElementString()); } break; } @@ -5955,14 +6218,14 @@ public object Read190_ShortEnum() { return (object)o; } - public object Read191_IntEnum() { + public object Read196_IntEnum() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id84_IntEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id85_IntEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { { - o = Read73_IntEnum(Reader.ReadElementString()); + o = Read74_IntEnum(Reader.ReadElementString()); } break; } @@ -5975,14 +6238,14 @@ public object Read191_IntEnum() { return (object)o; } - public object Read192_UIntEnum() { + public object Read197_UIntEnum() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id85_UIntEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id86_UIntEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { { - o = Read82_UIntEnum(Reader.ReadElementString()); + o = Read83_UIntEnum(Reader.ReadElementString()); } break; } @@ -5995,14 +6258,14 @@ public object Read192_UIntEnum() { return (object)o; } - public object Read193_LongEnum() { + public object Read198_LongEnum() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id86_LongEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id87_LongEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { { - o = Read83_LongEnum(Reader.ReadElementString()); + o = Read84_LongEnum(Reader.ReadElementString()); } break; } @@ -6015,14 +6278,14 @@ public object Read193_LongEnum() { return (object)o; } - public object Read194_ULongEnum() { + public object Read199_ULongEnum() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id87_ULongEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id88_ULongEnum && (object) Reader.NamespaceURI == (object)id2_Item)) { { - o = Read84_ULongEnum(Reader.ReadElementString()); + o = Read85_ULongEnum(Reader.ReadElementString()); } break; } @@ -6035,13 +6298,13 @@ public object Read194_ULongEnum() { return (object)o; } - public object Read195_AttributeTesting() { + public object Read200_AttributeTesting() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id88_AttributeTesting && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read86_XmlSerializerAttributes(false, true); + if (((object) Reader.LocalName == (object)id89_AttributeTesting && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read87_XmlSerializerAttributes(false, true); break; } throw CreateUnknownNodeException(); @@ -6053,14 +6316,14 @@ public object Read195_AttributeTesting() { return (object)o; } - public object Read196_ItemChoiceType() { + public object Read201_ItemChoiceType() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id89_ItemChoiceType && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id90_ItemChoiceType && (object) Reader.NamespaceURI == (object)id2_Item)) { { - o = Read85_ItemChoiceType(Reader.ReadElementString()); + o = Read86_ItemChoiceType(Reader.ReadElementString()); } break; } @@ -6073,13 +6336,13 @@ public object Read196_ItemChoiceType() { return (object)o; } - public object Read197_TypeWithAnyAttribute() { + public object Read202_TypeWithAnyAttribute() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id90_TypeWithAnyAttribute && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read87_TypeWithAnyAttribute(true, true); + if (((object) Reader.LocalName == (object)id91_TypeWithAnyAttribute && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read88_TypeWithAnyAttribute(true, true); break; } throw CreateUnknownNodeException(); @@ -6091,13 +6354,13 @@ public object Read197_TypeWithAnyAttribute() { return (object)o; } - public object Read198_KnownTypesThroughConstructor() { + public object Read203_KnownTypesThroughConstructor() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id91_KnownTypesThroughConstructor && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read88_KnownTypesThroughConstructor(true, true); + if (((object) Reader.LocalName == (object)id92_KnownTypesThroughConstructor && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read89_KnownTypesThroughConstructor(true, true); break; } throw CreateUnknownNodeException(); @@ -6109,13 +6372,13 @@ public object Read198_KnownTypesThroughConstructor() { return (object)o; } - public object Read199_SimpleKnownTypeValue() { + public object Read204_SimpleKnownTypeValue() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id92_SimpleKnownTypeValue && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read89_SimpleKnownTypeValue(true, true); + if (((object) Reader.LocalName == (object)id93_SimpleKnownTypeValue && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read90_SimpleKnownTypeValue(true, true); break; } throw CreateUnknownNodeException(); @@ -6127,12 +6390,12 @@ public object Read199_SimpleKnownTypeValue() { return (object)o; } - public object Read200_Item() { + public object Read205_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)) { + if (((object) Reader.LocalName == (object)id94_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { o = (global::SerializationTypes.ClassImplementingIXmlSerializable)ReadSerializable(( System.Xml.Serialization.IXmlSerializable)new global::SerializationTypes.ClassImplementingIXmlSerializable()); break; } @@ -6145,13 +6408,13 @@ public object Read200_Item() { return (object)o; } - public object Read201_TypeWithPropertyNameSpecified() { + public object Read206_TypeWithPropertyNameSpecified() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id94_TypeWithPropertyNameSpecified && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read90_TypeWithPropertyNameSpecified(true, true); + if (((object) Reader.LocalName == (object)id95_TypeWithPropertyNameSpecified && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read91_TypeWithPropertyNameSpecified(true, true); break; } throw CreateUnknownNodeException(); @@ -6163,13 +6426,13 @@ public object Read201_TypeWithPropertyNameSpecified() { return (object)o; } - public object Read202_TypeWithXmlSchemaFormAttribute() { + public object Read207_TypeWithXmlSchemaFormAttribute() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id95_TypeWithXmlSchemaFormAttribute && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read91_TypeWithXmlSchemaFormAttribute(true, true); + if (((object) Reader.LocalName == (object)id96_TypeWithXmlSchemaFormAttribute && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read92_TypeWithXmlSchemaFormAttribute(true, true); break; } throw CreateUnknownNodeException(); @@ -6181,13 +6444,13 @@ public object Read202_TypeWithXmlSchemaFormAttribute() { return (object)o; } - public object Read203_MyXmlType() { + public object Read208_MyXmlType() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id96_MyXmlType && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read92_Item(true, true); + if (((object) Reader.LocalName == (object)id97_MyXmlType && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read93_Item(true, true); break; } throw CreateUnknownNodeException(); @@ -6199,13 +6462,13 @@ public object Read203_MyXmlType() { return (object)o; } - public object Read204_Item() { + public object Read209_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 = Read93_Item(true, true); + if (((object) Reader.LocalName == (object)id98_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read94_Item(true, true); break; } throw CreateUnknownNodeException(); @@ -6217,13 +6480,13 @@ public object Read204_Item() { return (object)o; } - public object Read205_CustomDocument() { + public object Read210_CustomDocument() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id98_CustomDocument && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read95_CustomDocument(true, true); + if (((object) Reader.LocalName == (object)id99_CustomDocument && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read96_CustomDocument(true, true); break; } throw CreateUnknownNodeException(); @@ -6235,13 +6498,13 @@ public object Read205_CustomDocument() { return (object)o; } - public object Read206_CustomElement() { + public object Read211_CustomElement() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id99_CustomElement && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read94_CustomElement(true, true); + if (((object) Reader.LocalName == (object)id100_CustomElement && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read95_CustomElement(true, true); break; } throw CreateUnknownNodeException(); @@ -6253,7 +6516,7 @@ public object Read206_CustomElement() { return (object)o; } - public object Read207_Item() { + public object Read212_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { @@ -6265,13 +6528,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)id100_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read96_Item(true, true); + if (((object) Reader.LocalName == (object)id101_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read97_Item(true, true); break; } throw CreateUnknownNodeException(); @@ -6283,13 +6546,13 @@ public object Read208_Item() { return (object)o; } - public object Read209_ServerSettings() { + public object Read214_ServerSettings() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id101_ServerSettings && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read97_ServerSettings(true, true); + if (((object) Reader.LocalName == (object)id102_ServerSettings && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read98_ServerSettings(true, true); break; } throw CreateUnknownNodeException(); @@ -6301,13 +6564,13 @@ public object Read209_ServerSettings() { return (object)o; } - public object Read210_TypeWithXmlQualifiedName() { + public object Read215_TypeWithXmlQualifiedName() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id102_TypeWithXmlQualifiedName && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read98_TypeWithXmlQualifiedName(true, true); + if (((object) Reader.LocalName == (object)id103_TypeWithXmlQualifiedName && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read99_TypeWithXmlQualifiedName(true, true); break; } throw CreateUnknownNodeException(); @@ -6319,13 +6582,13 @@ public object Read210_TypeWithXmlQualifiedName() { return (object)o; } - public object Read211_TypeWith2DArrayProperty2() { + public object Read216_TypeWith2DArrayProperty2() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id103_TypeWith2DArrayProperty2 && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read99_TypeWith2DArrayProperty2(true, true); + if (((object) Reader.LocalName == (object)id104_TypeWith2DArrayProperty2 && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read100_TypeWith2DArrayProperty2(true, true); break; } throw CreateUnknownNodeException(); @@ -6337,13 +6600,13 @@ public object Read211_TypeWith2DArrayProperty2() { return (object)o; } - public object Read212_Item() { + public object Read217_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 = Read100_Item(true, true); + if (((object) Reader.LocalName == (object)id105_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read101_Item(true, true); break; } throw CreateUnknownNodeException(); @@ -6355,13 +6618,13 @@ public object Read212_Item() { return (object)o; } - public object Read213_Item() { + public object Read218_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id105_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read101_Item(true, true); + if (((object) Reader.LocalName == (object)id106_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read102_Item(true, true); break; } throw CreateUnknownNodeException(); @@ -6373,13 +6636,13 @@ public object Read213_Item() { return (object)o; } - public object Read214_Item() { + public object Read219_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id106_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read102_Item(true, true); + if (((object) Reader.LocalName == (object)id107_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read103_Item(true, true); break; } throw CreateUnknownNodeException(); @@ -6391,13 +6654,13 @@ public object Read214_Item() { return (object)o; } - public object Read215_TypeWithShouldSerializeMethod() { + public object Read220_TypeWithShouldSerializeMethod() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id107_TypeWithShouldSerializeMethod && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read103_TypeWithShouldSerializeMethod(true, true); + if (((object) Reader.LocalName == (object)id108_TypeWithShouldSerializeMethod && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read104_TypeWithShouldSerializeMethod(true, true); break; } throw CreateUnknownNodeException(); @@ -6409,13 +6672,13 @@ public object Read215_TypeWithShouldSerializeMethod() { return (object)o; } - public object Read216_Item() { + public object Read221_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id108_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read104_Item(true, true); + if (((object) Reader.LocalName == (object)id109_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read105_Item(true, true); break; } throw CreateUnknownNodeException(); @@ -6427,13 +6690,13 @@ public object Read216_Item() { return (object)o; } - public object Read217_Item() { + public object Read222_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id109_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read105_Item(true, true); + if (((object) Reader.LocalName == (object)id110_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read106_Item(true, true); break; } throw CreateUnknownNodeException(); @@ -6445,13 +6708,13 @@ public object Read217_Item() { return (object)o; } - public object Read218_Item() { + public object Read223_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id110_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 = Read107_Item(true, true); break; } throw CreateUnknownNodeException(); @@ -6463,13 +6726,13 @@ public object Read218_Item() { return (object)o; } - public object Read219_Item() { + public object Read224_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id111_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read108_Item(true, true); + if (((object) Reader.LocalName == (object)id112_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read109_Item(true, true); break; } throw CreateUnknownNodeException(); @@ -6481,87 +6744,141 @@ public object Read219_Item() { return (object)o; } - public object Read220_MoreChoices() { + public object Read225_Item() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id112_MoreChoices && (object) Reader.NamespaceURI == (object)id2_Item)) { - { - o = Read107_MoreChoices(Reader.ReadElementString()); - } + if (((object) Reader.LocalName == (object)id113_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read112_Item(true, true); break; } throw CreateUnknownNodeException(); } while (false); } else { - UnknownNode(null, @":MoreChoices"); + UnknownNode(null, @":TypeWithPropertyHavingComplexChoice"); } return (object)o; } - public object Read221_TypeWithFieldsOrdered() { + public object Read226_MoreChoices() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id113_TypeWithFieldsOrdered && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read109_TypeWithFieldsOrdered(true, true); + if (((object) Reader.LocalName == (object)id114_MoreChoices && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + o = Read108_MoreChoices(Reader.ReadElementString()); + } break; } throw CreateUnknownNodeException(); } while (false); } else { - UnknownNode(null, @":TypeWithFieldsOrdered"); + UnknownNode(null, @":MoreChoices"); } return (object)o; } - public object Read222_Item() { + public object Read227_ComplexChoiceA() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id114_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read110_Item(true, true); + if (((object) Reader.LocalName == (object)id115_ComplexChoiceA && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read111_ComplexChoiceA(true, true); break; } throw CreateUnknownNodeException(); } while (false); } else { - UnknownNode(null, @":TypeWithKnownTypesOfCollectionsWithConflictingXmlName"); + UnknownNode(null, @":ComplexChoiceA"); } return (object)o; } - public object Read223_Root() { + public object Read228_ComplexChoiceB() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id115_Root && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read113_Item(true, true); + if (((object) Reader.LocalName == (object)id116_ComplexChoiceB && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read110_ComplexChoiceB(true, true); break; } throw CreateUnknownNodeException(); } while (false); } else { - UnknownNode(null, @":Root"); + UnknownNode(null, @":ComplexChoiceB"); } return (object)o; } - public object Read224_TypeClashB() { + public object Read229_TypeWithFieldsOrdered() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id116_TypeClashB && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read112_TypeNameClash(true, true); + if (((object) Reader.LocalName == (object)id117_TypeWithFieldsOrdered && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read113_TypeWithFieldsOrdered(true, true); + break; + } + throw CreateUnknownNodeException(); + } while (false); + } + else { + UnknownNode(null, @":TypeWithFieldsOrdered"); + } + return (object)o; + } + + public object Read230_Item() { + object o = null; + Reader.MoveToContent(); + if (Reader.NodeType == System.Xml.XmlNodeType.Element) { + do { + if (((object) Reader.LocalName == (object)id118_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read114_Item(true, true); + break; + } + throw CreateUnknownNodeException(); + } while (false); + } + else { + UnknownNode(null, @":TypeWithKnownTypesOfCollectionsWithConflictingXmlName"); + } + return (object)o; + } + + public object Read231_Root() { + object o = null; + Reader.MoveToContent(); + if (Reader.NodeType == System.Xml.XmlNodeType.Element) { + do { + if (((object) Reader.LocalName == (object)id119_Root && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read117_Item(true, true); + break; + } + throw CreateUnknownNodeException(); + } while (false); + } + else { + UnknownNode(null, @":Root"); + } + return (object)o; + } + + public object Read232_TypeClashB() { + object o = null; + Reader.MoveToContent(); + if (Reader.NodeType == System.Xml.XmlNodeType.Element) { + do { + if (((object) Reader.LocalName == (object)id120_TypeClashB && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read116_TypeNameClash(true, true); break; } throw CreateUnknownNodeException(); @@ -6573,13 +6890,13 @@ public object Read224_TypeClashB() { return (object)o; } - public object Read225_TypeClashA() { + public object Read233_TypeClashA() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id117_TypeClashA && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read111_TypeNameClash(true, true); + if (((object) Reader.LocalName == (object)id121_TypeClashA && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read115_TypeNameClash(true, true); break; } throw CreateUnknownNodeException(); @@ -6591,13 +6908,13 @@ public object Read225_TypeClashA() { return (object)o; } - public object Read226_Person() { + public object Read234_Person() { object o = null; Reader.MoveToContent(); if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (((object) Reader.LocalName == (object)id118_Person && (object) Reader.NamespaceURI == (object)id2_Item)) { - o = Read114_Person(true, true); + if (((object) Reader.LocalName == (object)id122_Person && (object) Reader.NamespaceURI == (object)id2_Item)) { + o = Read118_Person(true, true); break; } throw CreateUnknownNodeException(); @@ -6609,12 +6926,12 @@ public object Read226_Person() { return (object)o; } - global::Outer.Person Read114_Person(bool isNullable, bool checkType) { + global::Outer.Person Read118_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)id118_Person && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id122_Person && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -6639,21 +6956,21 @@ public object Read226_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_FirstName && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id123_FirstName && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@FirstName = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id120_MiddleName && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id124_MiddleName && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@MiddleName = Reader.ReadElementString(); } paramsRead[1] = true; break; } - if (!paramsRead[2] && ((object) Reader.LocalName == (object)id121_LastName && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id125_LastName && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@LastName = Reader.ReadElementString(); } @@ -6672,12 +6989,12 @@ public object Read226_Person() { return o; } - global::SerializationTypes.TypeNameClashA.TypeNameClash Read111_TypeNameClash(bool isNullable, bool checkType) { + global::SerializationTypes.TypeNameClashA.TypeNameClash Read115_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)id117_TypeClashA && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id121_TypeClashA && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -6702,7 +7019,7 @@ public object Read226_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)id122_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id126_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Name = Reader.ReadElementString(); } @@ -6721,12 +7038,12 @@ public object Read226_Person() { return o; } - global::SerializationTypes.TypeNameClashB.TypeNameClash Read112_TypeNameClash(bool isNullable, bool checkType) { + global::SerializationTypes.TypeNameClashB.TypeNameClash Read116_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)id116_TypeClashB && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id120_TypeClashB && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -6751,7 +7068,7 @@ public object Read226_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)id122_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id126_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Name = Reader.ReadElementString(); } @@ -6770,12 +7087,12 @@ public object Read226_Person() { return o; } - global::SerializationTypes.NamespaceTypeNameClashContainer Read113_Item(bool isNullable, bool checkType) { + global::SerializationTypes.NamespaceTypeNameClashContainer Read117_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)id123_ContainerType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id127_ContainerType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -6806,12 +7123,12 @@ public object Read226_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)id124_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); + if (((object) Reader.LocalName == (object)id128_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++] = Read115_TypeNameClash(false, true); break; } - if (((object) Reader.LocalName == (object)id125_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); + if (((object) Reader.LocalName == (object)id129_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++] = Read116_TypeNameClash(false, true); break; } UnknownNode((object)o, @":A, :B"); @@ -6828,12 +7145,12 @@ public object Read226_Person() { return o; } - global::SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName Read110_Item(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName Read114_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)id114_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id118_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -6858,12 +7175,12 @@ public object Read226_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)id126_Value1 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id130_Value1 && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@Value1 = Read1_Object(false, true); paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id127_Value2 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id131_Value2 && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@Value2 = Read1_Object(false, true); paramsRead[1] = true; break; @@ -6893,106 +7210,114 @@ public object Read226_Person() { return ReadTypedPrimitive(new System.Xml.XmlQualifiedName("anyType", "http://www.w3.org/2001/XMLSchema")); } else { - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id118_Person && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read114_Person(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id123_ContainerType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read113_Item(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id116_TypeClashB && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read112_TypeNameClash(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id117_TypeClashA && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read111_TypeNameClash(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id114_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read110_Item(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id113_TypeWithFieldsOrdered && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read109_TypeWithFieldsOrdered(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id122_Person && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read118_Person(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id127_ContainerType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read117_Item(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id120_TypeClashB && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read116_TypeNameClash(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id121_TypeClashA && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read115_TypeNameClash(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id118_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read114_Item(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id117_TypeWithFieldsOrdered && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read113_TypeWithFieldsOrdered(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id113_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read112_Item(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id115_ComplexChoiceA && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read111_ComplexChoiceA(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id116_ComplexChoiceB && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read110_ComplexChoiceB(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id112_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read109_Item(isNullable, false); if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id111_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read108_Item(isNullable, false); + return Read107_Item(isNullable, false); if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id110_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) return Read106_Item(isNullable, false); if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id109_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) return Read105_Item(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id108_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read104_Item(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id107_TypeWithShouldSerializeMethod && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read103_TypeWithShouldSerializeMethod(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id108_TypeWithShouldSerializeMethod && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read104_TypeWithShouldSerializeMethod(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id107_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read103_Item(isNullable, false); if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id106_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) return Read102_Item(isNullable, false); if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id105_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) return Read101_Item(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id104_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read100_Item(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id103_TypeWith2DArrayProperty2 && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read99_TypeWith2DArrayProperty2(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id102_TypeWithXmlQualifiedName && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read98_TypeWithXmlQualifiedName(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id101_ServerSettings && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read97_ServerSettings(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id100_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read96_Item(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id98_CustomDocument && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read95_CustomDocument(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id99_CustomElement && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read94_CustomElement(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id96_MyXmlType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read92_Item(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id95_TypeWithXmlSchemaFormAttribute && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read91_TypeWithXmlSchemaFormAttribute(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id94_TypeWithPropertyNameSpecified && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read90_TypeWithPropertyNameSpecified(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id92_SimpleKnownTypeValue && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read89_SimpleKnownTypeValue(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id91_KnownTypesThroughConstructor && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read88_KnownTypesThroughConstructor(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id90_TypeWithAnyAttribute && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read87_TypeWithAnyAttribute(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id128_XmlSerializerAttributes && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read86_XmlSerializerAttributes(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id80_WithNullables && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read79_WithNullables(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id79_WithEnums && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read75_WithEnums(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id77_WithStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read72_WithStruct(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id78_SomeStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read71_SomeStruct(false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id76_ClassImplementsInterface && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read70_ClassImplementsInterface(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id73_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id74_Item)) - return Read68_Item(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id72_SimpleDC && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read67_SimpleDC(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id71_TypeWithByteArrayAsXmlText && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read66_TypeWithByteArrayAsXmlText(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id70_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read65_Item(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id67_BaseClassWithSamePropertyName && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read62_BaseClassWithSamePropertyName(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id68_DerivedClassWithSameProperty && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read63_DerivedClassWithSameProperty(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id69_DerivedClassWithSameProperty2 && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read64_DerivedClassWithSameProperty2(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id66_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read61_Item(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id65_TypeHasArrayOfASerializedAsB && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read60_TypeHasArrayOfASerializedAsB(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id64_TypeB && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read59_TypeB(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id63_TypeA && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read58_TypeA(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id62_BuiltInTypes && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read57_BuiltInTypes(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id61_DCClassWithEnumAndStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read56_DCClassWithEnumAndStruct(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id60_DCStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read55_DCStruct(false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id59_TypeWithEnumMembers && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read54_TypeWithEnumMembers(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id55_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read52_Item(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id54_TypeWithMyCollectionField && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read51_TypeWithMyCollectionField(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id53_StructNotSerializable && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read50_StructNotSerializable(false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id104_TypeWith2DArrayProperty2 && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read100_TypeWith2DArrayProperty2(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id103_TypeWithXmlQualifiedName && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read99_TypeWithXmlQualifiedName(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id102_ServerSettings && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read98_ServerSettings(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id101_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read97_Item(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id99_CustomDocument && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read96_CustomDocument(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id100_CustomElement && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read95_CustomElement(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id97_MyXmlType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read93_Item(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id96_TypeWithXmlSchemaFormAttribute && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read92_TypeWithXmlSchemaFormAttribute(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id95_TypeWithPropertyNameSpecified && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read91_TypeWithPropertyNameSpecified(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id93_SimpleKnownTypeValue && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read90_SimpleKnownTypeValue(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id92_KnownTypesThroughConstructor && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read89_KnownTypesThroughConstructor(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id91_TypeWithAnyAttribute && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read88_TypeWithAnyAttribute(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id132_XmlSerializerAttributes && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read87_XmlSerializerAttributes(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id81_WithNullables && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read80_WithNullables(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id80_WithEnums && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read76_WithEnums(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id78_WithStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read73_WithStruct(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id79_SomeStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read72_SomeStruct(false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id77_ClassImplementsInterface && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read71_ClassImplementsInterface(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id74_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id75_Item)) + return Read69_Item(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id73_SimpleDC && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read68_SimpleDC(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id72_TypeWithByteArrayAsXmlText && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read67_TypeWithByteArrayAsXmlText(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id71_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read66_Item(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id68_BaseClassWithSamePropertyName && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read63_BaseClassWithSamePropertyName(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id69_DerivedClassWithSameProperty && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read64_DerivedClassWithSameProperty(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id70_DerivedClassWithSameProperty2 && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read65_DerivedClassWithSameProperty2(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id67_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read62_Item(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id66_TypeHasArrayOfASerializedAsB && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read61_TypeHasArrayOfASerializedAsB(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id65_TypeB && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read60_TypeB(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id64_TypeA && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read59_TypeA(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id63_BuiltInTypes && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read58_BuiltInTypes(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id62_DCClassWithEnumAndStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read57_DCClassWithEnumAndStruct(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id61_DCStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read56_DCStruct(false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id60_TypeWithEnumMembers && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read55_TypeWithEnumMembers(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id56_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read53_Item(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id55_TypeWithMyCollectionField && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read52_TypeWithMyCollectionField(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id54_StructNotSerializable && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read51_StructNotSerializable(false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id53_TypeWithArraylikeMembers && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read50_TypeWithArraylikeMembers(isNullable, false); if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id52_TypeWithGetOnlyArrayProperties && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) return Read49_TypeWithGetOnlyArrayProperties(isNullable, false); if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id51_TypeWithGetSetArrayMembers && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) @@ -7011,13 +7336,13 @@ public object Read226_Person() { return Read42_RootClass(isNullable, false); if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id45_Parameter && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) return Read41_Parameter(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id129_ParameterOfString && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id133_ParameterOfString && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) return Read40_ParameterOfString(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id130_MsgDocumentType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id43_httpexamplecom)) + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id134_MsgDocumentType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id43_httpexamplecom)) return Read39_MsgDocumentType(isNullable, false); if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id41_TypeWithLinkedProperty && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) return Read38_TypeWithLinkedProperty(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id131_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id135_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) return Read37_Item(isNullable, false); if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id39_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) return Read36_Item(isNullable, false); @@ -7091,7 +7416,7 @@ public object Read226_Person() { ReadEndElement(); return e; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id132_ArrayOfOrderedItem && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id24_httpwwwcontoso1com)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id136_ArrayOfOrderedItem && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id24_httpwwwcontoso1com)) { global::OrderedItem[] a = null; if (!ReadNull()) { global::OrderedItem[] z_0_0 = null; @@ -7123,7 +7448,7 @@ public object Read226_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id133_ArrayOfInt && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id137_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(); @@ -7137,7 +7462,7 @@ public object Read226_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)id134_int && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id138_int && (object) Reader.NamespaceURI == (object)id2_Item)) { { z_0_0.Add(System.Xml.XmlConvert.ToInt32(Reader.ReadElementString())); } @@ -7156,7 +7481,7 @@ public object Read226_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id135_ArrayOfString && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id139_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(); @@ -7170,7 +7495,7 @@ public object Read226_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_string && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id140_string && (object) Reader.NamespaceURI == (object)id2_Item)) { if (ReadNull()) { z_0_0.Add(null); } @@ -7192,7 +7517,7 @@ public object Read226_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id137_ArrayOfDouble && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id141_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(); @@ -7206,7 +7531,7 @@ public object Read226_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)id138_double && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id142_double && (object) Reader.NamespaceURI == (object)id2_Item)) { { z_0_0.Add(System.Xml.XmlConvert.ToDouble(Reader.ReadElementString())); } @@ -7258,7 +7583,7 @@ public object Read226_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id139_ArrayOfInstrument && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id143_ArrayOfInstrument && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { global::Instrument[] a = null; if (!ReadNull()) { global::Instrument[] z_0_0 = null; @@ -7290,7 +7615,7 @@ public object Read226_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id140_ArrayOfTypeWithLinkedProperty && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id144_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(); @@ -7321,7 +7646,7 @@ public object Read226_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id141_ArrayOfParameter && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id145_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(); @@ -7352,7 +7677,7 @@ public object Read226_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id142_ArrayOfXElement && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id146_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; @@ -7366,7 +7691,7 @@ public object Read226_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)id143_XElement && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id147_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; @@ -7385,7 +7710,7 @@ public object Read226_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id144_ArrayOfSimpleType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id148_ArrayOfSimpleType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { global::SerializationTypes.SimpleType[] a = null; if (!ReadNull()) { global::SerializationTypes.SimpleType[] z_0_0 = null; @@ -7417,7 +7742,7 @@ public object Read226_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id56_ArrayOfAnyType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id57_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(); @@ -7431,7 +7756,7 @@ public object Read226_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)id57_anyType && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id58_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; } @@ -7448,13 +7773,13 @@ public object Read226_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id58_MyEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id59_MyEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { Reader.ReadStartElement(); - object e = Read53_MyEnum(CollapseWhitespace(Reader.ReadString())); + object e = Read54_MyEnum(CollapseWhitespace(Reader.ReadString())); ReadEndElement(); return e; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id145_ArrayOfTypeA && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id149_ArrayOfTypeA && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { global::SerializationTypes.TypeA[] a = null; if (!ReadNull()) { global::SerializationTypes.TypeA[] z_0_0 = null; @@ -7468,8 +7793,8 @@ public object Read226_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)id63_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++] = Read58_TypeA(true, true); + if (((object) Reader.LocalName == (object)id64_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++] = Read59_TypeA(true, true); break; } UnknownNode(null, @":TypeA"); @@ -7486,61 +7811,61 @@ public object Read226_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id75_EnumFlags && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id76_EnumFlags && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { Reader.ReadStartElement(); - object e = Read69_EnumFlags(CollapseWhitespace(Reader.ReadString())); + object e = Read70_EnumFlags(CollapseWhitespace(Reader.ReadString())); ReadEndElement(); return e; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id84_IntEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id85_IntEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { Reader.ReadStartElement(); - object e = Read73_IntEnum(CollapseWhitespace(Reader.ReadString())); + object e = Read74_IntEnum(CollapseWhitespace(Reader.ReadString())); ReadEndElement(); return e; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id83_ShortEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id84_ShortEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { Reader.ReadStartElement(); - object e = Read74_ShortEnum(CollapseWhitespace(Reader.ReadString())); + object e = Read75_ShortEnum(CollapseWhitespace(Reader.ReadString())); ReadEndElement(); return e; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id81_ByteEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id82_ByteEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { Reader.ReadStartElement(); - object e = Read80_ByteEnum(CollapseWhitespace(Reader.ReadString())); + object e = Read81_ByteEnum(CollapseWhitespace(Reader.ReadString())); ReadEndElement(); return e; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id82_SByteEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id83_SByteEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { Reader.ReadStartElement(); - object e = Read81_SByteEnum(CollapseWhitespace(Reader.ReadString())); + object e = Read82_SByteEnum(CollapseWhitespace(Reader.ReadString())); ReadEndElement(); return e; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id85_UIntEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id86_UIntEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { Reader.ReadStartElement(); - object e = Read82_UIntEnum(CollapseWhitespace(Reader.ReadString())); + object e = Read83_UIntEnum(CollapseWhitespace(Reader.ReadString())); ReadEndElement(); return e; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id86_LongEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id87_LongEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { Reader.ReadStartElement(); - object e = Read83_LongEnum(CollapseWhitespace(Reader.ReadString())); + object e = Read84_LongEnum(CollapseWhitespace(Reader.ReadString())); ReadEndElement(); return e; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id87_ULongEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id88_ULongEnum && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { Reader.ReadStartElement(); - object e = Read84_ULongEnum(CollapseWhitespace(Reader.ReadString())); + object e = Read85_ULongEnum(CollapseWhitespace(Reader.ReadString())); ReadEndElement(); return e; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id89_ItemChoiceType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id90_ItemChoiceType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { Reader.ReadStartElement(); - object e = Read85_ItemChoiceType(CollapseWhitespace(Reader.ReadString())); + object e = Read86_ItemChoiceType(CollapseWhitespace(Reader.ReadString())); ReadEndElement(); return e; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id146_ArrayOfItemChoiceType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id150_ArrayOfItemChoiceType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { global::SerializationTypes.ItemChoiceType[] a = null; if (!ReadNull()) { global::SerializationTypes.ItemChoiceType[] z_0_0 = null; @@ -7554,9 +7879,9 @@ public object Read226_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)id89_ItemChoiceType && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id90_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++] = Read85_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++] = Read86_ItemChoiceType(Reader.ReadElementString()); } break; } @@ -7574,7 +7899,7 @@ public object Read226_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id135_ArrayOfString && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id147_httpmynamespace)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id139_ArrayOfString && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id151_httpmynamespace)) { global::System.Object[] a = null; if (!ReadNull()) { global::System.Object[] z_0_0 = null; @@ -7588,7 +7913,7 @@ public object Read226_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_string && (object) Reader.NamespaceURI == (object)id147_httpmynamespace)) { + if (((object) Reader.LocalName == (object)id140_string && (object) Reader.NamespaceURI == (object)id151_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; } @@ -7611,7 +7936,7 @@ public object Read226_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id148_ArrayOfString1 && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id152_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(); @@ -7625,7 +7950,7 @@ public object Read226_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)id149_NoneParameter && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id153_NoneParameter && (object) Reader.NamespaceURI == (object)id2_Item)) { { z_0_0.Add(Reader.ReadElementString()); } @@ -7644,7 +7969,7 @@ public object Read226_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id150_ArrayOfBoolean && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id154_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(); @@ -7658,7 +7983,7 @@ public object Read226_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)id151_QualifiedParameter && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id155_QualifiedParameter && (object) Reader.NamespaceURI == (object)id2_Item)) { { z_0_0.Add(System.Xml.XmlConvert.ToBoolean(Reader.ReadElementString())); } @@ -7677,7 +8002,7 @@ public object Read226_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id152_ArrayOfArrayOfSimpleType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id156_ArrayOfArrayOfSimpleType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { global::SerializationTypes.SimpleType[][] a = null; if (!ReadNull()) { global::SerializationTypes.SimpleType[][] z_0_0 = null; @@ -7736,9 +8061,9 @@ public object Read226_Person() { } return a; } - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id112_MoreChoices && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id114_MoreChoices && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { Reader.ReadStartElement(); - object e = Read107_MoreChoices(CollapseWhitespace(Reader.ReadString())); + object e = Read108_MoreChoices(CollapseWhitespace(Reader.ReadString())); ReadEndElement(); return e; } @@ -7774,7 +8099,7 @@ public object Read226_Person() { return o; } - global::SerializationTypes.MoreChoices Read107_MoreChoices(string s) { + global::SerializationTypes.MoreChoices Read108_MoreChoices(string s) { switch (s) { case @"None": return global::SerializationTypes.MoreChoices.@None; case @"Item": return global::SerializationTypes.MoreChoices.@Item; @@ -7813,14 +8138,14 @@ public object Read226_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)id153_P1 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id157_P1 && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@P1 = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id154_P2 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id158_P2 && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@P2 = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); } @@ -7839,7 +8164,7 @@ public object Read226_Person() { return o; } - global::SerializationTypes.ItemChoiceType Read85_ItemChoiceType(string s) { + global::SerializationTypes.ItemChoiceType Read86_ItemChoiceType(string s) { switch (s) { case @"None": return global::SerializationTypes.ItemChoiceType.@None; case @"Word": return global::SerializationTypes.ItemChoiceType.@Word; @@ -7849,7 +8174,7 @@ public object Read226_Person() { } } - global::SerializationTypes.ULongEnum Read84_ULongEnum(string s) { + global::SerializationTypes.ULongEnum Read85_ULongEnum(string s) { switch (s) { case @"Option0": return global::SerializationTypes.ULongEnum.@Option0; case @"Option1": return global::SerializationTypes.ULongEnum.@Option1; @@ -7858,7 +8183,7 @@ public object Read226_Person() { } } - global::SerializationTypes.LongEnum Read83_LongEnum(string s) { + global::SerializationTypes.LongEnum Read84_LongEnum(string s) { switch (s) { case @"Option0": return global::SerializationTypes.LongEnum.@Option0; case @"Option1": return global::SerializationTypes.LongEnum.@Option1; @@ -7867,7 +8192,7 @@ public object Read226_Person() { } } - global::SerializationTypes.UIntEnum Read82_UIntEnum(string s) { + global::SerializationTypes.UIntEnum Read83_UIntEnum(string s) { switch (s) { case @"Option0": return global::SerializationTypes.UIntEnum.@Option0; case @"Option1": return global::SerializationTypes.UIntEnum.@Option1; @@ -7876,7 +8201,7 @@ public object Read226_Person() { } } - global::SerializationTypes.SByteEnum Read81_SByteEnum(string s) { + global::SerializationTypes.SByteEnum Read82_SByteEnum(string s) { switch (s) { case @"Option0": return global::SerializationTypes.SByteEnum.@Option0; case @"Option1": return global::SerializationTypes.SByteEnum.@Option1; @@ -7885,7 +8210,7 @@ public object Read226_Person() { } } - global::SerializationTypes.ByteEnum Read80_ByteEnum(string s) { + global::SerializationTypes.ByteEnum Read81_ByteEnum(string s) { switch (s) { case @"Option0": return global::SerializationTypes.ByteEnum.@Option0; case @"Option1": return global::SerializationTypes.ByteEnum.@Option1; @@ -7894,7 +8219,7 @@ public object Read226_Person() { } } - global::SerializationTypes.ShortEnum Read74_ShortEnum(string s) { + global::SerializationTypes.ShortEnum Read75_ShortEnum(string s) { switch (s) { case @"Option0": return global::SerializationTypes.ShortEnum.@Option0; case @"Option1": return global::SerializationTypes.ShortEnum.@Option1; @@ -7903,7 +8228,7 @@ public object Read226_Person() { } } - global::SerializationTypes.IntEnum Read73_IntEnum(string s) { + global::SerializationTypes.IntEnum Read74_IntEnum(string s) { switch (s) { case @"Option0": return global::SerializationTypes.IntEnum.@Option0; case @"Option1": return global::SerializationTypes.IntEnum.@Option1; @@ -7928,16 +8253,16 @@ internal System.Collections.Hashtable EnumFlagsValues { } } - global::SerializationTypes.EnumFlags Read69_EnumFlags(string s) { + global::SerializationTypes.EnumFlags Read70_EnumFlags(string s) { return (global::SerializationTypes.EnumFlags)ToEnum(s, EnumFlagsValues, @"global::SerializationTypes.EnumFlags"); } - global::SerializationTypes.TypeA Read58_TypeA(bool isNullable, bool checkType) { + global::SerializationTypes.TypeA Read59_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)id63_TypeA && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id64_TypeA && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -7962,7 +8287,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)id122_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id126_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Name = Reader.ReadElementString(); } @@ -7981,7 +8306,7 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.MyEnum Read53_MyEnum(string s) { + global::SerializationTypes.MyEnum Read54_MyEnum(string s) { switch (s) { case @"One": return global::SerializationTypes.MyEnum.@One; case @"Two": return global::SerializationTypes.MyEnum.@Two; @@ -7998,7 +8323,7 @@ internal System.Collections.Hashtable EnumFlagsValues { if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id45_Parameter && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id129_ParameterOfString && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id133_ParameterOfString && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) return Read40_ParameterOfString(isNullable, false); throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); } @@ -8008,7 +8333,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)id122_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id126_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@Name = Reader.Value; paramsRead[0] = true; } @@ -8041,7 +8366,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)id129_ParameterOfString && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id133_ParameterOfString && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -8052,7 +8377,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)id122_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id126_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@Name = Reader.Value; paramsRead[0] = true; } @@ -8070,7 +8395,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)id155_Value && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id159_Value && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Value = Reader.ReadElementString(); } @@ -8121,12 +8446,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)id156_Child && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id160_Child && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@Child = Read38_TypeWithLinkedProperty(false, true); paramsRead[0] = true; break; } - if (((object) Reader.LocalName == (object)id157_Children && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id161_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; @@ -8202,7 +8527,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)id122_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id126_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Name = Reader.ReadElementString(); } @@ -8251,21 +8576,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)id122_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id126_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Name = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id158_IsValved && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id162_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)id159_Modulation && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id163_Modulation && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Modulation = ToChar(Reader.ReadElementString()); } @@ -8316,14 +8641,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)id122_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id126_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Name = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id158_IsValved && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id162_IsValved && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@IsValved = System.Xml.XmlConvert.ToBoolean(Reader.ReadElementString()); } @@ -8372,35 +8697,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)id160_ItemName && (object) Reader.NamespaceURI == (object)id24_httpwwwcontoso1com)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id164_ItemName && (object) Reader.NamespaceURI == (object)id24_httpwwwcontoso1com)) { { o.@ItemName = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id161_Description && (object) Reader.NamespaceURI == (object)id24_httpwwwcontoso1com)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id165_Description && (object) Reader.NamespaceURI == (object)id24_httpwwwcontoso1com)) { { o.@Description = Reader.ReadElementString(); } paramsRead[1] = true; break; } - if (!paramsRead[2] && ((object) Reader.LocalName == (object)id162_UnitPrice && (object) Reader.NamespaceURI == (object)id24_httpwwwcontoso1com)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id166_UnitPrice && (object) Reader.NamespaceURI == (object)id24_httpwwwcontoso1com)) { { o.@UnitPrice = System.Xml.XmlConvert.ToDecimal(Reader.ReadElementString()); } paramsRead[2] = true; break; } - if (!paramsRead[3] && ((object) Reader.LocalName == (object)id163_Quantity && (object) Reader.NamespaceURI == (object)id24_httpwwwcontoso1com)) { + if (!paramsRead[3] && ((object) Reader.LocalName == (object)id167_Quantity && (object) Reader.NamespaceURI == (object)id24_httpwwwcontoso1com)) { { o.@Quantity = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); } paramsRead[3] = true; break; } - if (!paramsRead[4] && ((object) Reader.LocalName == (object)id164_LineTotal && (object) Reader.NamespaceURI == (object)id24_httpwwwcontoso1com)) { + if (!paramsRead[4] && ((object) Reader.LocalName == (object)id168_LineTotal && (object) Reader.NamespaceURI == (object)id24_httpwwwcontoso1com)) { { o.@LineTotal = System.Xml.XmlConvert.ToDecimal(Reader.ReadElementString()); } @@ -8548,14 +8873,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)id165_BinaryHexContent && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id169_BinaryHexContent && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@BinaryHexContent = ToByteArrayHex(false); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id166_Base64Content && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id170_Base64Content && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Base64Content = ToByteArrayBase64(false); } @@ -8604,7 +8929,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_DTO && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id171_DTO && (object) Reader.NamespaceURI == (object)id2_Item)) { { if (Reader.IsEmptyElement) { Reader.Skip(); @@ -8617,7 +8942,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id168_DTO2 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id172_DTO2 && (object) Reader.NamespaceURI == (object)id2_Item)) { { if (Reader.IsEmptyElement) { Reader.Skip(); @@ -8630,7 +8955,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[1] = true; break; } - if (!paramsRead[2] && ((object) Reader.LocalName == (object)id169_DefaultDTO && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id173_DefaultDTO && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -8646,12 +8971,12 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[2] = true; break; } - if (!paramsRead[3] && ((object) Reader.LocalName == (object)id170_NullableDTO && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[3] && ((object) Reader.LocalName == (object)id174_NullableDTO && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@NullableDTO = Read5_NullableOfDateTimeOffset(true); paramsRead[3] = true; break; } - if (!paramsRead[4] && ((object) Reader.LocalName == (object)id171_NullableDefaultDTO && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[4] && ((object) Reader.LocalName == (object)id175_NullableDefaultDTO && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@NullableDTOWithDefault = Read5_NullableOfDateTimeOffset(true); paramsRead[4] = true; break; @@ -8714,7 +9039,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)id172_TimeSpanProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id176_TimeSpanProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { { if (Reader.IsEmptyElement) { Reader.Skip(); @@ -8769,7 +9094,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)id172_TimeSpanProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id176_TimeSpanProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -8785,7 +9110,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id173_TimeSpanProperty2 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id177_TimeSpanProperty2 && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -8843,7 +9168,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)id174_ByteProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id178_ByteProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@ByteProperty = System.Xml.XmlConvert.ToByte(Reader.ReadElementString()); } @@ -8943,21 +9268,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)id175_Age && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id179_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)id122_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id126_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Name = Reader.ReadElementString(); } paramsRead[1] = true; break; } - if (!paramsRead[2] && ((object) Reader.LocalName == (object)id176_Breed && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id180_Breed && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Breed = Read12_DogBreed(Reader.ReadElementString()); } @@ -9008,14 +9333,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)id175_Age && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id179_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)id122_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id126_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Name = Reader.ReadElementString(); } @@ -9064,7 +9389,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)id177_LicenseNumber && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id181_LicenseNumber && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@LicenseNumber = Reader.ReadElementString(); } @@ -9113,14 +9438,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)id178_GroupName && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id182_GroupName && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@GroupName = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id179_GroupVehicle && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id183_GroupVehicle && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@GroupVehicle = Read14_Vehicle(false, true); paramsRead[1] = true; break; @@ -9167,7 +9492,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)id180_EmployeeName && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id184_EmployeeName && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@EmployeeName = Reader.ReadElementString(); } @@ -9216,14 +9541,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)id155_Value && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id159_Value && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Value = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id181_value && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id185_value && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@value = Reader.ReadElementString(); } @@ -9274,14 +9599,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)id155_Value && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id159_Value && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Value = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id181_value && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id185_value && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@value = Reader.ReadElementString(); } @@ -9316,15 +9641,15 @@ internal System.Collections.Hashtable EnumFlagsValues { o = new global::SimpleDerivedClass(); System.Span paramsRead = stackalloc bool[3]; while (Reader.MoveToNextAttribute()) { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id182_AttributeString && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id186_AttributeString && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@AttributeString = Reader.Value; paramsRead[0] = true; } - else if (!paramsRead[1] && ((object) Reader.LocalName == (object)id183_DateTimeValue && (object) Reader.NamespaceURI == (object)id2_Item)) { + else if (!paramsRead[1] && ((object) Reader.LocalName == (object)id187_DateTimeValue && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@DateTimeValue = ToDateTime(Reader.Value); paramsRead[1] = true; } - else if (!paramsRead[2] && ((object) Reader.LocalName == (object)id184_BoolValue && (object) Reader.NamespaceURI == (object)id2_Item)) { + else if (!paramsRead[2] && ((object) Reader.LocalName == (object)id188_BoolValue && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@BoolValue = System.Xml.XmlConvert.ToBoolean(Reader.Value); paramsRead[2] = true; } @@ -9370,11 +9695,11 @@ internal System.Collections.Hashtable EnumFlagsValues { o = new global::SimpleBaseClass(); System.Span paramsRead = stackalloc bool[2]; while (Reader.MoveToNextAttribute()) { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id182_AttributeString && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id186_AttributeString && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@AttributeString = Reader.Value; paramsRead[0] = true; } - else if (!paramsRead[1] && ((object) Reader.LocalName == (object)id183_DateTimeValue && (object) Reader.NamespaceURI == (object)id2_Item)) { + else if (!paramsRead[1] && ((object) Reader.LocalName == (object)id187_DateTimeValue && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@DateTimeValue = ToDateTime(Reader.Value); paramsRead[1] = true; } @@ -9418,7 +9743,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)id122_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id126_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@Name = Reader.Value; paramsRead[0] = true; } @@ -9436,28 +9761,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)id185_Line1 && (object) Reader.NamespaceURI == (object)id24_httpwwwcontoso1com)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id189_Line1 && (object) Reader.NamespaceURI == (object)id24_httpwwwcontoso1com)) { { o.@Line1 = Reader.ReadElementString(); } paramsRead[1] = true; break; } - if (!paramsRead[2] && ((object) Reader.LocalName == (object)id186_City && (object) Reader.NamespaceURI == (object)id24_httpwwwcontoso1com)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id190_City && (object) Reader.NamespaceURI == (object)id24_httpwwwcontoso1com)) { { o.@City = Reader.ReadElementString(); } paramsRead[2] = true; break; } - if (!paramsRead[3] && ((object) Reader.LocalName == (object)id187_State && (object) Reader.NamespaceURI == (object)id24_httpwwwcontoso1com)) { + if (!paramsRead[3] && ((object) Reader.LocalName == (object)id191_State && (object) Reader.NamespaceURI == (object)id24_httpwwwcontoso1com)) { { o.@State = Reader.ReadElementString(); } paramsRead[3] = true; break; } - if (!paramsRead[4] && ((object) Reader.LocalName == (object)id188_Zip && (object) Reader.NamespaceURI == (object)id24_httpwwwcontoso1com)) { + if (!paramsRead[4] && ((object) Reader.LocalName == (object)id192_Zip && (object) Reader.NamespaceURI == (object)id24_httpwwwcontoso1com)) { { o.@Zip = Reader.ReadElementString(); } @@ -9508,19 +9833,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)id189_ShipTo && (object) Reader.NamespaceURI == (object)id24_httpwwwcontoso1com)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id193_ShipTo && (object) Reader.NamespaceURI == (object)id24_httpwwwcontoso1com)) { o.@ShipTo = Read21_Address(false, true); paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id190_OrderDate && (object) Reader.NamespaceURI == (object)id24_httpwwwcontoso1com)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id194_OrderDate && (object) Reader.NamespaceURI == (object)id24_httpwwwcontoso1com)) { { o.@OrderDate = Reader.ReadElementString(); } paramsRead[1] = true; break; } - if (((object) Reader.LocalName == (object)id191_Items && (object) Reader.NamespaceURI == (object)id24_httpwwwcontoso1com)) { + if (((object) Reader.LocalName == (object)id195_Items && (object) Reader.NamespaceURI == (object)id24_httpwwwcontoso1com)) { if (!ReadNull()) { global::OrderedItem[] a_2_0 = null; int ca_2_0 = 0; @@ -9551,21 +9876,21 @@ internal System.Collections.Hashtable EnumFlagsValues { } break; } - if (!paramsRead[3] && ((object) Reader.LocalName == (object)id192_SubTotal && (object) Reader.NamespaceURI == (object)id24_httpwwwcontoso1com)) { + if (!paramsRead[3] && ((object) Reader.LocalName == (object)id196_SubTotal && (object) Reader.NamespaceURI == (object)id24_httpwwwcontoso1com)) { { o.@SubTotal = System.Xml.XmlConvert.ToDecimal(Reader.ReadElementString()); } paramsRead[3] = true; break; } - if (!paramsRead[4] && ((object) Reader.LocalName == (object)id193_ShipCost && (object) Reader.NamespaceURI == (object)id24_httpwwwcontoso1com)) { + if (!paramsRead[4] && ((object) Reader.LocalName == (object)id197_ShipCost && (object) Reader.NamespaceURI == (object)id24_httpwwwcontoso1com)) { { o.@ShipCost = System.Xml.XmlConvert.ToDecimal(Reader.ReadElementString()); } paramsRead[4] = true; break; } - if (!paramsRead[5] && ((object) Reader.LocalName == (object)id194_TotalCost && (object) Reader.NamespaceURI == (object)id24_httpwwwcontoso1com)) { + if (!paramsRead[5] && ((object) Reader.LocalName == (object)id198_TotalCost && (object) Reader.NamespaceURI == (object)id24_httpwwwcontoso1com)) { { o.@TotalCost = System.Xml.XmlConvert.ToDecimal(Reader.ReadElementString()); } @@ -9600,7 +9925,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)id122_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id126_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@Name = Reader.Value; paramsRead[0] = true; } @@ -9618,28 +9943,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)id185_Line1 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id189_Line1 && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Line1 = Reader.ReadElementString(); } paramsRead[1] = true; break; } - if (!paramsRead[2] && ((object) Reader.LocalName == (object)id186_City && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id190_City && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@City = Reader.ReadElementString(); } paramsRead[2] = true; break; } - if (!paramsRead[3] && ((object) Reader.LocalName == (object)id187_State && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[3] && ((object) Reader.LocalName == (object)id191_State && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@State = Reader.ReadElementString(); } paramsRead[3] = true; break; } - if (!paramsRead[4] && ((object) Reader.LocalName == (object)id188_Zip && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[4] && ((object) Reader.LocalName == (object)id192_Zip && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Zip = Reader.ReadElementString(); } @@ -9688,35 +10013,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)id160_ItemName && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id164_ItemName && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@ItemName = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id161_Description && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id165_Description && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Description = Reader.ReadElementString(); } paramsRead[1] = true; break; } - if (!paramsRead[2] && ((object) Reader.LocalName == (object)id162_UnitPrice && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id166_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)id163_Quantity && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[3] && ((object) Reader.LocalName == (object)id167_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)id164_LineTotal && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[4] && ((object) Reader.LocalName == (object)id168_LineTotal && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@LineTotal = System.Xml.XmlConvert.ToDecimal(Reader.ReadElementString()); } @@ -9765,7 +10090,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)id195_X && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id199_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; @@ -9778,7 +10103,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)id134_int && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id138_int && (object) Reader.NamespaceURI == (object)id2_Item)) { { a_0_0.Add(System.Xml.XmlConvert.ToInt32(Reader.ReadElementString())); } @@ -9798,7 +10123,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[0] = true; break; } - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id196_Y && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id200_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; @@ -9811,7 +10136,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_string && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id140_string && (object) Reader.NamespaceURI == (object)id2_Item)) { if (ReadNull()) { a_0_0.Add(null); } @@ -9834,7 +10159,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[0] = true; break; } - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id197_Z && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id201_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; @@ -9847,7 +10172,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)id138_double && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id142_double && (object) Reader.NamespaceURI == (object)id2_Item)) { { a_0_0.Add(System.Xml.XmlConvert.ToDouble(Reader.ReadElementString())); } @@ -9911,7 +10236,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_Prop && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id202_Prop && (object) Reader.NamespaceURI == (object)id2_Item)) { { a_0.Add(ToDateTime(Reader.ReadElementString())); } @@ -9963,7 +10288,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_Prop && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id202_Prop && (object) Reader.NamespaceURI == (object)id2_Item)) { { a_0.Add(ToDateTime(Reader.ReadElementString())); } @@ -10013,7 +10338,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)id199_Instruments && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id203_Instruments && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { global::Instrument[] a_0_0 = null; int ca_0_0 = 0; @@ -10093,7 +10418,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id200_Comment2 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id204_Comment2 && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Comment2 = Reader.ReadElementString(); } @@ -10142,7 +10467,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)id201_DoubleField && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id205_DoubleField && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -10152,7 +10477,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id202_SingleField && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id206_SingleField && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -10162,7 +10487,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[1] = true; break; } - if (!paramsRead[2] && ((object) Reader.LocalName == (object)id203_DoubleProp && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id207_DoubleProp && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -10172,7 +10497,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[2] = true; break; } - if (!paramsRead[3] && ((object) Reader.LocalName == (object)id204_FloatProp && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[3] && ((object) Reader.LocalName == (object)id208_FloatProp && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -10224,7 +10549,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)id201_DoubleField && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id205_DoubleField && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -10234,7 +10559,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id202_SingleField && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id206_SingleField && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -10244,7 +10569,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[1] = true; break; } - if (!paramsRead[2] && ((object) Reader.LocalName == (object)id203_DoubleProp && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id207_DoubleProp && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -10254,7 +10579,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[2] = true; break; } - if (!paramsRead[3] && ((object) Reader.LocalName == (object)id204_FloatProp && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[3] && ((object) Reader.LocalName == (object)id208_FloatProp && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -10306,7 +10631,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)id201_DoubleField && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id205_DoubleField && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -10316,7 +10641,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id202_SingleField && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id206_SingleField && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -10326,7 +10651,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[1] = true; break; } - if (!paramsRead[2] && ((object) Reader.LocalName == (object)id203_DoubleProp && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id207_DoubleProp && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -10336,7 +10661,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[2] = true; break; } - if (!paramsRead[3] && ((object) Reader.LocalName == (object)id204_FloatProp && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[3] && ((object) Reader.LocalName == (object)id208_FloatProp && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -10363,7 +10688,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)id131_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id135_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -10374,7 +10699,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)id205_IntValue && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id209_IntValue && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@IntValue = System.Xml.XmlConvert.ToInt32(Reader.Value); paramsRead[0] = true; } @@ -10407,7 +10732,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)id130_MsgDocumentType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id43_httpexamplecom)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id134_MsgDocumentType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id43_httpexamplecom)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -10420,11 +10745,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)id206_id && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id210_id && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@Id = CollapseWhitespace(Reader.Value); paramsRead[0] = true; } - else if (((object) Reader.LocalName == (object)id207_refs && (object) Reader.NamespaceURI == (object)id2_Item)) { + else if (((object) Reader.LocalName == (object)id211_refs && (object) Reader.NamespaceURI == (object)id2_Item)) { string listValues = Reader.Value; string[] vals = listValues.Split(null); for (int i = 0; i < vals.Length; i++) { @@ -10489,7 +10814,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)id208_Parameters && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id212_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; @@ -10561,7 +10886,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)id155_Value && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id159_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; @@ -10615,7 +10940,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_xelement && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id213_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; @@ -10665,7 +10990,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)id210_xelements && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id214_xelements && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { global::System.Xml.Linq.XElement[] a_0_0 = null; int ca_0_0 = 0; @@ -10678,7 +11003,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)id143_XElement && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id147_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; @@ -10739,14 +11064,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)id211_DateTimeString && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id215_DateTimeString && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@DateTimeString = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id212_CurrentDateTime && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id216_CurrentDateTime && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@CurrentDateTime = ToDateTime(Reader.ReadElementString()); } @@ -10803,7 +11128,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)id213_F1 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id217_F1 && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { global::SerializationTypes.SimpleType[] a_0_0 = null; int ca_0_0 = 0; @@ -10834,7 +11159,7 @@ internal System.Collections.Hashtable EnumFlagsValues { } break; } - if (((object) Reader.LocalName == (object)id214_F2 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id218_F2 && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { global::System.Int32[] a_1_0 = null; int ca_1_0 = 0; @@ -10847,7 +11172,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)id134_int && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id138_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()); } @@ -10867,7 +11192,7 @@ internal System.Collections.Hashtable EnumFlagsValues { } break; } - if (((object) Reader.LocalName == (object)id153_P1 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id157_P1 && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { global::SerializationTypes.SimpleType[] a_2_0 = null; int ca_2_0 = 0; @@ -10898,7 +11223,7 @@ internal System.Collections.Hashtable EnumFlagsValues { } break; } - if (((object) Reader.LocalName == (object)id154_P2 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id158_P2 && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { global::System.Int32[] a_3_0 = null; int ca_3_0 = 0; @@ -10911,7 +11236,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)id134_int && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id138_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()); } @@ -10983,78 +11308,37 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.StructNotSerializable Read50_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)id53_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)id181_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 Read51_TypeWithMyCollectionField(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithArraylikeMembers Read50_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)id54_TypeWithMyCollectionField && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id53_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); @@ -11070,10 +11354,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)id215_Collection && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id219_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(); } @@ -11083,75 +11367,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)id136_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)id138_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 Read52_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)id55_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)id215_Collection && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id220_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 { @@ -11160,101 +11400,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)id136_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)id138_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 Read54_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)id59_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)id213_F1 && (object) Reader.NamespaceURI == (object)id2_Item)) { - { - o.@F1 = Read53_MyEnum(Reader.ReadElementString()); - } - paramsRead[0] = true; - break; - } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id153_P1 && (object) Reader.NamespaceURI == (object)id2_Item)) { - { - o.@P1 = Read53_MyEnum(Reader.ReadElementString()); + if (((object) Reader.LocalName == (object)id221_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)id138_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)id222_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)id138_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)id223_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)id138_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)id224_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)id138_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)id225_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)id138_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)id226_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)id138_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 Read51_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)id54_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)id185_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 Read52_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)id55_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)id227_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)id140_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 Read53_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)id56_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)id227_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)id140_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 Read55_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)id60_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)id217_F1 && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + o.@F1 = Read54_MyEnum(Reader.ReadElementString()); + } + paramsRead[0] = true; + break; + } + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id157_P1 && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + o.@P1 = Read54_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 Read55_DCStruct(bool checkType) { + global::SerializationTypes.DCStruct Read56_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)id60_DCStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id61_DCStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -11286,7 +11938,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)id216_Data && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id228_Data && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Data = Reader.ReadElementString(); } @@ -11305,12 +11957,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.DCClassWithEnumAndStruct Read56_DCClassWithEnumAndStruct(bool isNullable, bool checkType) { + global::SerializationTypes.DCClassWithEnumAndStruct Read57_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)id61_DCClassWithEnumAndStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id62_DCClassWithEnumAndStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -11335,14 +11987,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)id217_MyStruct && (object) Reader.NamespaceURI == (object)id2_Item)) { - o.@MyStruct = Read55_DCStruct(true); + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id229_MyStruct && (object) Reader.NamespaceURI == (object)id2_Item)) { + o.@MyStruct = Read56_DCStruct(true); paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id218_MyEnum1 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id230_MyEnum1 && (object) Reader.NamespaceURI == (object)id2_Item)) { { - o.@MyEnum1 = Read53_MyEnum(Reader.ReadElementString()); + o.@MyEnum1 = Read54_MyEnum(Reader.ReadElementString()); } paramsRead[1] = true; break; @@ -11359,12 +12011,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.BuiltInTypes Read57_BuiltInTypes(bool isNullable, bool checkType) { + global::SerializationTypes.BuiltInTypes Read58_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)id62_BuiltInTypes && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id63_BuiltInTypes && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -11389,7 +12041,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)id219_ByteArray && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id231_ByteArray && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@ByteArray = ToByteArrayBase64(false); } @@ -11408,12 +12060,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeB Read59_TypeB(bool isNullable, bool checkType) { + global::SerializationTypes.TypeB Read60_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)id64_TypeB && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id65_TypeB && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -11438,7 +12090,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)id122_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id126_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Name = Reader.ReadElementString(); } @@ -11457,12 +12109,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeHasArrayOfASerializedAsB Read60_TypeHasArrayOfASerializedAsB(bool isNullable, bool checkType) { + global::SerializationTypes.TypeHasArrayOfASerializedAsB Read61_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)id65_TypeHasArrayOfASerializedAsB && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id66_TypeHasArrayOfASerializedAsB && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -11489,7 +12141,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)id191_Items && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id195_Items && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { global::SerializationTypes.TypeA[] a_0_0 = null; int ca_0_0 = 0; @@ -11502,8 +12154,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)id63_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++] = Read58_TypeA(true, true); + if (((object) Reader.LocalName == (object)id64_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++] = Read59_TypeA(true, true); break; } UnknownNode(null, @":TypeA"); @@ -11532,12 +12184,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.@__TypeNameWithSpecialCharacters漢ñ Read61_Item(bool isNullable, bool checkType) { + global::SerializationTypes.@__TypeNameWithSpecialCharacters漢ñ Read62_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)id66_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id67_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -11562,7 +12214,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)id220_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id232_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@PropertyNameWithSpecialCharacters漢ñ = Reader.ReadElementString(); } @@ -11581,12 +12233,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.DerivedClassWithSameProperty2 Read64_DerivedClassWithSameProperty2(bool isNullable, bool checkType) { + global::SerializationTypes.DerivedClassWithSameProperty2 Read65_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)id69_DerivedClassWithSameProperty2 && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id70_DerivedClassWithSameProperty2 && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -11613,28 +12265,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)id221_StringProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id233_StringProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@StringProperty = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id222_IntProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id234_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)id223_DateTimeProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id235_DateTimeProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@DateTimeProperty = ToDateTime(Reader.ReadElementString()); } paramsRead[2] = true; break; } - if (((object) Reader.LocalName == (object)id224_ListProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id236_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; @@ -11647,7 +12299,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_string && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id140_string && (object) Reader.NamespaceURI == (object)id2_Item)) { if (ReadNull()) { a_3_0.Add(null); } @@ -11681,16 +12333,16 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.DerivedClassWithSameProperty Read63_DerivedClassWithSameProperty(bool isNullable, bool checkType) { + global::SerializationTypes.DerivedClassWithSameProperty Read64_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)id68_DerivedClassWithSameProperty && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id69_DerivedClassWithSameProperty && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id69_DerivedClassWithSameProperty2 && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read64_DerivedClassWithSameProperty2(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id70_DerivedClassWithSameProperty2 && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read65_DerivedClassWithSameProperty2(isNullable, false); throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); } } @@ -11715,28 +12367,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)id221_StringProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id233_StringProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@StringProperty = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id222_IntProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id234_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)id223_DateTimeProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id235_DateTimeProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@DateTimeProperty = ToDateTime(Reader.ReadElementString()); } paramsRead[2] = true; break; } - if (((object) Reader.LocalName == (object)id224_ListProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id236_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; @@ -11749,7 +12401,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_string && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id140_string && (object) Reader.NamespaceURI == (object)id2_Item)) { if (ReadNull()) { a_3_0.Add(null); } @@ -11783,18 +12435,18 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.BaseClassWithSamePropertyName Read62_BaseClassWithSamePropertyName(bool isNullable, bool checkType) { + global::SerializationTypes.BaseClassWithSamePropertyName Read63_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)id67_BaseClassWithSamePropertyName && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id68_BaseClassWithSamePropertyName && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id68_DerivedClassWithSameProperty && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read63_DerivedClassWithSameProperty(isNullable, false); - if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id69_DerivedClassWithSameProperty2 && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) - return Read64_DerivedClassWithSameProperty2(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id69_DerivedClassWithSameProperty && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read64_DerivedClassWithSameProperty(isNullable, false); + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id70_DerivedClassWithSameProperty2 && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read65_DerivedClassWithSameProperty2(isNullable, false); throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); } } @@ -11819,28 +12471,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)id221_StringProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id233_StringProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@StringProperty = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id222_IntProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id234_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)id223_DateTimeProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id235_DateTimeProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@DateTimeProperty = ToDateTime(Reader.ReadElementString()); } paramsRead[2] = true; break; } - if (((object) Reader.LocalName == (object)id224_ListProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id236_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; @@ -11853,7 +12505,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_string && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id140_string && (object) Reader.NamespaceURI == (object)id2_Item)) { if (ReadNull()) { a_3_0.Add(null); } @@ -11887,12 +12539,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithDateTimePropertyAsXmlTime Read65_Item(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithDateTimePropertyAsXmlTime Read66_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)id70_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id71_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -11934,12 +12586,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithByteArrayAsXmlText Read66_TypeWithByteArrayAsXmlText(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithByteArrayAsXmlText Read67_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)id71_TypeWithByteArrayAsXmlText && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id72_TypeWithByteArrayAsXmlText && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -11981,12 +12633,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.SimpleDC Read67_SimpleDC(bool isNullable, bool checkType) { + global::SerializationTypes.SimpleDC Read68_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)id72_SimpleDC && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id73_SimpleDC && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -12011,7 +12663,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)id216_Data && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id228_Data && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Data = Reader.ReadElementString(); } @@ -12030,12 +12682,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithXmlTextAttributeOnArray Read68_Item(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithXmlTextAttributeOnArray Read69_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)id73_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id74_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id74_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id75_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -12081,12 +12733,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.ClassImplementsInterface Read70_ClassImplementsInterface(bool isNullable, bool checkType) { + global::SerializationTypes.ClassImplementsInterface Read71_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)id76_ClassImplementsInterface && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id77_ClassImplementsInterface && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -12111,28 +12763,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)id225_ClassID && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id237_ClassID && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@ClassID = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id226_DisplayName && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id238_DisplayName && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@DisplayName = Reader.ReadElementString(); } paramsRead[1] = true; break; } - if (!paramsRead[2] && ((object) Reader.LocalName == (object)id227_Id && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id239_Id && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Id = Reader.ReadElementString(); } paramsRead[2] = true; break; } - if (!paramsRead[3] && ((object) Reader.LocalName == (object)id228_IsLoaded && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[3] && ((object) Reader.LocalName == (object)id240_IsLoaded && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@IsLoaded = System.Xml.XmlConvert.ToBoolean(Reader.ReadElementString()); } @@ -12151,11 +12803,11 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.SomeStruct Read71_SomeStruct(bool checkType) { + global::SerializationTypes.SomeStruct Read72_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)id78_SomeStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id79_SomeStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -12187,14 +12839,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)id124_A && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id128_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)id125_B && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id129_B && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@B = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); } @@ -12213,12 +12865,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.WithStruct Read72_WithStruct(bool isNullable, bool checkType) { + global::SerializationTypes.WithStruct Read73_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)id77_WithStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id78_WithStruct && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -12243,8 +12895,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)id229_Some && (object) Reader.NamespaceURI == (object)id2_Item)) { - o.@Some = Read71_SomeStruct(true); + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id241_Some && (object) Reader.NamespaceURI == (object)id2_Item)) { + o.@Some = Read72_SomeStruct(true); paramsRead[0] = true; break; } @@ -12260,12 +12912,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.WithEnums Read75_WithEnums(bool isNullable, bool checkType) { + global::SerializationTypes.WithEnums Read76_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)id79_WithEnums && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id80_WithEnums && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -12290,16 +12942,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)id230_Int && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id242_Int && (object) Reader.NamespaceURI == (object)id2_Item)) { { - o.@Int = Read73_IntEnum(Reader.ReadElementString()); + o.@Int = Read74_IntEnum(Reader.ReadElementString()); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id231_Short && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id243_Short && (object) Reader.NamespaceURI == (object)id2_Item)) { { - o.@Short = Read74_ShortEnum(Reader.ReadElementString()); + o.@Short = Read75_ShortEnum(Reader.ReadElementString()); } paramsRead[1] = true; break; @@ -12316,12 +12968,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.WithNullables Read79_WithNullables(bool isNullable, bool checkType) { + global::SerializationTypes.WithNullables Read80_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)id80_WithNullables && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id81_WithNullables && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -12346,33 +12998,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)id232_Optional && (object) Reader.NamespaceURI == (object)id2_Item)) { - o.@Optional = Read76_NullableOfIntEnum(true); + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id244_Optional && (object) Reader.NamespaceURI == (object)id2_Item)) { + o.@Optional = Read77_NullableOfIntEnum(true); paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id233_Optionull && (object) Reader.NamespaceURI == (object)id2_Item)) { - o.@Optionull = Read76_NullableOfIntEnum(true); + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id245_Optionull && (object) Reader.NamespaceURI == (object)id2_Item)) { + o.@Optionull = Read77_NullableOfIntEnum(true); paramsRead[1] = true; break; } - if (!paramsRead[2] && ((object) Reader.LocalName == (object)id234_OptionalInt && (object) Reader.NamespaceURI == (object)id2_Item)) { - o.@OptionalInt = Read77_NullableOfInt32(true); + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id246_OptionalInt && (object) Reader.NamespaceURI == (object)id2_Item)) { + o.@OptionalInt = Read78_NullableOfInt32(true); paramsRead[2] = true; break; } - if (!paramsRead[3] && ((object) Reader.LocalName == (object)id235_OptionullInt && (object) Reader.NamespaceURI == (object)id2_Item)) { - o.@OptionullInt = Read77_NullableOfInt32(true); + if (!paramsRead[3] && ((object) Reader.LocalName == (object)id247_OptionullInt && (object) Reader.NamespaceURI == (object)id2_Item)) { + o.@OptionullInt = Read78_NullableOfInt32(true); paramsRead[3] = true; break; } - if (!paramsRead[4] && ((object) Reader.LocalName == (object)id236_Struct1 && (object) Reader.NamespaceURI == (object)id2_Item)) { - o.@Struct1 = Read78_NullableOfSomeStruct(true); + if (!paramsRead[4] && ((object) Reader.LocalName == (object)id248_Struct1 && (object) Reader.NamespaceURI == (object)id2_Item)) { + o.@Struct1 = Read79_NullableOfSomeStruct(true); paramsRead[4] = true; break; } - if (!paramsRead[5] && ((object) Reader.LocalName == (object)id237_Struct2 && (object) Reader.NamespaceURI == (object)id2_Item)) { - o.@Struct2 = Read78_NullableOfSomeStruct(true); + if (!paramsRead[5] && ((object) Reader.LocalName == (object)id249_Struct2 && (object) Reader.NamespaceURI == (object)id2_Item)) { + o.@Struct2 = Read79_NullableOfSomeStruct(true); paramsRead[5] = true; break; } @@ -12388,15 +13040,15 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::System.Nullable Read78_NullableOfSomeStruct(bool checkType) { + global::System.Nullable Read79_NullableOfSomeStruct(bool checkType) { global::System.Nullable o = default(global::System.Nullable); if (ReadNull()) return o; - o = Read71_SomeStruct(true); + o = Read72_SomeStruct(true); return o; } - global::System.Nullable Read77_NullableOfInt32(bool checkType) { + global::System.Nullable Read78_NullableOfInt32(bool checkType) { global::System.Nullable o = default(global::System.Nullable); if (ReadNull()) return o; @@ -12406,22 +13058,22 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::System.Nullable Read76_NullableOfIntEnum(bool checkType) { + global::System.Nullable Read77_NullableOfIntEnum(bool checkType) { global::System.Nullable o = default(global::System.Nullable); if (ReadNull()) return o; { - o = Read73_IntEnum(Reader.ReadElementString()); + o = Read74_IntEnum(Reader.ReadElementString()); } return o; } - global::SerializationTypes.XmlSerializerAttributes Read86_XmlSerializerAttributes(bool isNullable, bool checkType) { + global::SerializationTypes.XmlSerializerAttributes Read87_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)id128_XmlSerializerAttributes && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id132_XmlSerializerAttributes && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -12436,7 +13088,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)id238_XmlAttributeName && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[6] && ((object) Reader.LocalName == (object)id250_XmlAttributeName && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@XmlAttributeProperty = System.Xml.XmlConvert.ToInt32(Reader.Value); paramsRead[6] = true; } @@ -12455,7 +13107,7 @@ internal System.Collections.Hashtable EnumFlagsValues { string tmp = null; if (Reader.NodeType == System.Xml.XmlNodeType.Element) { do { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id239_Word && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id251_Word && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@MyChoice = Reader.ReadElementString(); } @@ -12463,7 +13115,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[0] = true; break; } - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id240_Number && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id252_Number && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@MyChoice = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); } @@ -12471,7 +13123,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[0] = true; break; } - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id241_DecimalNumber && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id253_DecimalNumber && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@MyChoice = System.Xml.XmlConvert.ToDouble(Reader.ReadElementString()); } @@ -12479,12 +13131,12 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id242_XmlIncludeProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id254_XmlIncludeProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@XmlIncludeProperty = Read1_Object(false, true); paramsRead[1] = true; break; } - if (((object) Reader.LocalName == (object)id243_XmlEnumProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id255_XmlEnumProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { global::SerializationTypes.ItemChoiceType[] a_2_0 = null; int ca_2_0 = 0; @@ -12497,9 +13149,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)id89_ItemChoiceType && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id90_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++] = Read85_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++] = Read86_ItemChoiceType(Reader.ReadElementString()); } break; } @@ -12517,21 +13169,21 @@ internal System.Collections.Hashtable EnumFlagsValues { } break; } - if (!paramsRead[4] && ((object) Reader.LocalName == (object)id244_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[4] && ((object) Reader.LocalName == (object)id256_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@XmlNamespaceDeclarationsProperty = Reader.ReadElementString(); } paramsRead[4] = true; break; } - if (!paramsRead[5] && ((object) Reader.LocalName == (object)id245_XmlElementPropertyNode && (object) Reader.NamespaceURI == (object)id246_httpelement)) { + if (!paramsRead[5] && ((object) Reader.LocalName == (object)id257_XmlElementPropertyNode && (object) Reader.NamespaceURI == (object)id258_httpelement)) { { o.@XmlElementProperty = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); } paramsRead[5] = true; break; } - if (((object) Reader.LocalName == (object)id247_CustomXmlArrayProperty && (object) Reader.NamespaceURI == (object)id147_httpmynamespace)) { + if (((object) Reader.LocalName == (object)id259_CustomXmlArrayProperty && (object) Reader.NamespaceURI == (object)id151_httpmynamespace)) { if (!ReadNull()) { global::System.Object[] a_7_0 = null; int ca_7_0 = 0; @@ -12544,7 +13196,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_string && (object) Reader.NamespaceURI == (object)id147_httpmynamespace)) { + if (((object) Reader.LocalName == (object)id140_string && (object) Reader.NamespaceURI == (object)id151_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; } @@ -12586,12 +13238,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithAnyAttribute Read87_TypeWithAnyAttribute(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithAnyAttribute Read88_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)id90_TypeWithAnyAttribute && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id91_TypeWithAnyAttribute && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -12604,7 +13256,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)id222_IntProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id234_IntProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@IntProperty = System.Xml.XmlConvert.ToInt32(Reader.Value); paramsRead[1] = true; } @@ -12626,7 +13278,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)id122_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id126_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Name = Reader.ReadElementString(); } @@ -12646,12 +13298,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.KnownTypesThroughConstructor Read88_KnownTypesThroughConstructor(bool isNullable, bool checkType) { + global::SerializationTypes.KnownTypesThroughConstructor Read89_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)id91_KnownTypesThroughConstructor && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id92_KnownTypesThroughConstructor && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -12676,12 +13328,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)id248_EnumValue && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id260_EnumValue && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@EnumValue = Read1_Object(false, true); paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id249_SimpleTypeValue && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id261_SimpleTypeValue && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@SimpleTypeValue = Read1_Object(false, true); paramsRead[1] = true; break; @@ -12698,12 +13350,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.SimpleKnownTypeValue Read89_SimpleKnownTypeValue(bool isNullable, bool checkType) { + global::SerializationTypes.SimpleKnownTypeValue Read90_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)id92_SimpleKnownTypeValue && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id93_SimpleKnownTypeValue && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -12728,7 +13380,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)id250_StrProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id262_StrProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@StrProperty = Reader.ReadElementString(); } @@ -12747,12 +13399,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithPropertyNameSpecified Read90_TypeWithPropertyNameSpecified(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithPropertyNameSpecified Read91_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)id94_TypeWithPropertyNameSpecified && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id95_TypeWithPropertyNameSpecified && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -12777,7 +13429,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)id251_MyField && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id263_MyField && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@MyFieldSpecified = true; { o.@MyField = Reader.ReadElementString(); @@ -12785,7 +13437,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id252_MyFieldIgnored && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id264_MyFieldIgnored && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@MyFieldIgnoredSpecified = true; { o.@MyFieldIgnored = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); @@ -12805,12 +13457,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithXmlSchemaFormAttribute Read91_TypeWithXmlSchemaFormAttribute(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithXmlSchemaFormAttribute Read92_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)id95_TypeWithXmlSchemaFormAttribute && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id96_TypeWithXmlSchemaFormAttribute && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -12841,7 +13493,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)id253_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id265_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; @@ -12854,7 +13506,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)id134_int && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id138_int && (object) Reader.NamespaceURI == (object)id2_Item)) { { a_0_0.Add(System.Xml.XmlConvert.ToInt32(Reader.ReadElementString())); } @@ -12873,7 +13525,7 @@ internal System.Collections.Hashtable EnumFlagsValues { } break; } - if (((object) Reader.LocalName == (object)id254_NoneSchemaFormListProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id266_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; @@ -12886,7 +13538,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)id149_NoneParameter && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id153_NoneParameter && (object) Reader.NamespaceURI == (object)id2_Item)) { { a_1_0.Add(Reader.ReadElementString()); } @@ -12905,7 +13557,7 @@ internal System.Collections.Hashtable EnumFlagsValues { } break; } - if (((object) Reader.LocalName == (object)id255_Item && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id267_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; @@ -12918,7 +13570,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)id151_QualifiedParameter && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id155_QualifiedParameter && (object) Reader.NamespaceURI == (object)id2_Item)) { { a_2_0.Add(System.Xml.XmlConvert.ToBoolean(Reader.ReadElementString())); } @@ -12949,12 +13601,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithTypeNameInXmlTypeAttribute Read92_Item(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithTypeNameInXmlTypeAttribute 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)id96_MyXmlType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id97_MyXmlType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -12965,7 +13617,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)id256_XmlAttributeForm && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id268_XmlAttributeForm && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@XmlAttributeForm = Reader.Value; paramsRead[0] = true; } @@ -12993,12 +13645,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.CustomElement Read94_CustomElement(bool isNullable, bool checkType) { + global::SerializationTypes.CustomElement Read95_CustomElement(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_CustomElement && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id100_CustomElement && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -13013,7 +13665,7 @@ internal System.Collections.Hashtable EnumFlagsValues { int ca_2 = 0; System.Span paramsRead = stackalloc bool[3]; while (Reader.MoveToNextAttribute()) { - if (!paramsRead[0] && ((object) Reader.LocalName == (object)id257_name && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id269_name && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@Name = Reader.Value; paramsRead[0] = true; } @@ -13051,12 +13703,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.CustomDocument Read95_CustomDocument(bool isNullable, bool checkType) { + global::SerializationTypes.CustomDocument Read96_CustomDocument(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_CustomDocument && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id99_CustomDocument && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -13086,8 +13738,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)id258_customElement && (object) Reader.NamespaceURI == (object)id2_Item)) { - if ((object)(a_0) == null) Reader.Skip(); else a_0.Add(Read94_CustomElement(false, true)); + if (((object) Reader.LocalName == (object)id270_customElement && (object) Reader.NamespaceURI == (object)id2_Item)) { + if ((object)(a_0) == null) Reader.Skip(); else a_0.Add(Read95_CustomElement(false, true)); break; } a_1 = (global::System.Xml.XmlNode[])EnsureArrayIndex(a_1, ca_1, typeof(global::System.Xml.XmlNode));a_1[ca_1++] = (global::System.Xml.XmlNode)ReadXmlNode(false); @@ -13103,12 +13755,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithNonPublicDefaultConstructor Read96_Item(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithNonPublicDefaultConstructor 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)id100_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id101_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -13141,7 +13793,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)id122_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id126_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Name = Reader.ReadElementString(); } @@ -13160,12 +13812,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.ServerSettings Read97_ServerSettings(bool isNullable, bool checkType) { + global::SerializationTypes.ServerSettings Read98_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)id101_ServerSettings && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id102_ServerSettings && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -13190,14 +13842,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)id259_DS2Root && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id271_DS2Root && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@DS2Root = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id260_MetricConfigUrl && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id272_MetricConfigUrl && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@MetricConfigUrl = Reader.ReadElementString(); } @@ -13216,12 +13868,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithXmlQualifiedName Read98_TypeWithXmlQualifiedName(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithXmlQualifiedName Read99_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)id102_TypeWithXmlQualifiedName && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id103_TypeWithXmlQualifiedName && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -13246,7 +13898,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)id155_Value && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id159_Value && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Value = ReadElementQualifiedName(); } @@ -13265,12 +13917,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWith2DArrayProperty2 Read99_TypeWith2DArrayProperty2(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWith2DArrayProperty2 Read100_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)id103_TypeWith2DArrayProperty2 && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id104_TypeWith2DArrayProperty2 && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -13297,7 +13949,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)id261_TwoDArrayOfSimpleType && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id273_TwoDArrayOfSimpleType && (object) Reader.NamespaceURI == (object)id2_Item)) { if (!ReadNull()) { global::SerializationTypes.SimpleType[][] a_0_0 = null; int ca_0_0 = 0; @@ -13367,12 +14019,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithPropertiesHavingDefaultValue Read100_Item(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithPropertiesHavingDefaultValue 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)id104_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); @@ -13397,21 +14049,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)id262_EmptyStringProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id274_EmptyStringProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@EmptyStringProperty = Reader.ReadElementString(); } paramsRead[0] = true; break; } - if (!paramsRead[1] && ((object) Reader.LocalName == (object)id221_StringProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id233_StringProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@StringProperty = Reader.ReadElementString(); } paramsRead[1] = true; break; } - if (!paramsRead[2] && ((object) Reader.LocalName == (object)id222_IntProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id234_IntProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -13421,7 +14073,7 @@ internal System.Collections.Hashtable EnumFlagsValues { paramsRead[2] = true; break; } - if (!paramsRead[3] && ((object) Reader.LocalName == (object)id263_CharProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[3] && ((object) Reader.LocalName == (object)id275_CharProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } @@ -13443,12 +14095,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithEnumPropertyHavingDefaultValue Read101_Item(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithEnumPropertyHavingDefaultValue 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)id105_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); @@ -13473,12 +14125,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)id264_EnumProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id276_EnumProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } else { - o.@EnumProperty = Read73_IntEnum(Reader.ReadElementString()); + o.@EnumProperty = Read74_IntEnum(Reader.ReadElementString()); } paramsRead[0] = true; break; @@ -13495,12 +14147,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithEnumFlagPropertyHavingDefaultValue Read102_Item(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithEnumFlagPropertyHavingDefaultValue 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)id106_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id107_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -13525,12 +14177,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)id264_EnumProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id276_EnumProperty && (object) Reader.NamespaceURI == (object)id2_Item)) { if (Reader.IsEmptyElement) { Reader.Skip(); } else { - o.@EnumProperty = Read69_EnumFlags(Reader.ReadElementString()); + o.@EnumProperty = Read70_EnumFlags(Reader.ReadElementString()); } paramsRead[0] = true; break; @@ -13547,12 +14199,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithShouldSerializeMethod Read103_TypeWithShouldSerializeMethod(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithShouldSerializeMethod Read104_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)id107_TypeWithShouldSerializeMethod && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id108_TypeWithShouldSerializeMethod && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -13577,7 +14229,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)id265_Foo && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id277_Foo && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@Foo = Reader.ReadElementString(); } @@ -13596,12 +14248,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.KnownTypesThroughConstructorWithArrayProperties Read104_Item(bool isNullable, bool checkType) { + global::SerializationTypes.KnownTypesThroughConstructorWithArrayProperties 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)id108_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id109_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -13626,12 +14278,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)id266_StringArrayValue && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id278_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)) { + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id279_IntArrayValue && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@IntArrayValue = Read1_Object(false, true); paramsRead[1] = true; break; @@ -13648,12 +14300,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.KnownTypesThroughConstructorWithValue Read105_Item(bool isNullable, bool checkType) { + global::SerializationTypes.KnownTypesThroughConstructorWithValue Read106_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)id109_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id110_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -13678,16 +14330,234 @@ 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)id155_Value && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id159_Value && (object) Reader.NamespaceURI == (object)id2_Item)) { o.@Value = Read1_Object(false, true); paramsRead[0] = true; break; } - UnknownNode((object)o, @":Value"); + UnknownNode((object)o, @":Value"); + } while (false); + } + else { + UnknownNode((object)o, @":Value"); + } + Reader.MoveToContent(); + } + ReadEndElement(); + return o; + } + + global::SerializationTypes.TypeWithTypesHavingCustomFormatter Read107_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)id111_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)id280_DateTimeContent && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + o.@DateTimeContent = ToDateTime(Reader.ReadElementString()); + } + paramsRead[0] = true; + break; + } + if (!paramsRead[1] && ((object) Reader.LocalName == (object)id281_QNameContent && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + o.@QNameContent = ReadElementQualifiedName(); + } + paramsRead[1] = true; + break; + } + if (!paramsRead[2] && ((object) Reader.LocalName == (object)id282_DateContent && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + o.@DateContent = ToDate(Reader.ReadElementString()); + } + paramsRead[2] = true; + break; + } + if (!paramsRead[3] && ((object) Reader.LocalName == (object)id283_NameContent && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + o.@NameContent = ToXmlName(Reader.ReadElementString()); + } + paramsRead[3] = true; + break; + } + if (!paramsRead[4] && ((object) Reader.LocalName == (object)id284_NCNameContent && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + o.@NCNameContent = ToXmlNCName(Reader.ReadElementString()); + } + paramsRead[4] = true; + break; + } + if (!paramsRead[5] && ((object) Reader.LocalName == (object)id285_NMTOKENContent && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + o.@NMTOKENContent = ToXmlNmToken(Reader.ReadElementString()); + } + paramsRead[5] = true; + break; + } + if (!paramsRead[6] && ((object) Reader.LocalName == (object)id286_NMTOKENSContent && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + o.@NMTOKENSContent = ToXmlNmTokens(Reader.ReadElementString()); + } + paramsRead[6] = true; + break; + } + if (!paramsRead[7] && ((object) Reader.LocalName == (object)id287_Base64BinaryContent && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + o.@Base64BinaryContent = ToByteArrayBase64(false); + } + paramsRead[7] = true; + break; + } + if (!paramsRead[8] && ((object) Reader.LocalName == (object)id288_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 Read109_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)id112_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::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); + } + } + 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(); + 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)id289_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 (((object) Reader.LocalName == (object)id290_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, @":Item, :Amount"); + } while (false); + } + else { + 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.ComplexChoiceB Read110_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)id116_ComplexChoiceB && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + } + else { + throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); + } + } + if (isNull) return null; + global::SerializationTypes.ComplexChoiceB o; + o = new global::SerializationTypes.ComplexChoiceB(); + 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)id126_Name && (object) Reader.NamespaceURI == (object)id2_Item)) { + { + o.@Name = Reader.ReadElementString(); + } + paramsRead[0] = true; + break; + } + UnknownNode((object)o, @":Name"); } while (false); } else { - UnknownNode((object)o, @":Value"); + UnknownNode((object)o, @":Name"); } Reader.MoveToContent(); } @@ -13695,21 +14565,23 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithTypesHavingCustomFormatter Read106_Item(bool isNullable, bool checkType) { + global::SerializationTypes.ComplexChoiceA Read111_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)id110_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id115_ComplexChoiceA && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { + if (((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id116_ComplexChoiceB && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) + return Read110_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); @@ -13725,74 +14597,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)id268_DateTimeContent && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id126_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)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"); + 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(); } @@ -13800,20 +14616,20 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithArrayPropertyHavingChoice Read108_Item(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithPropertyHavingComplexChoice Read112_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)id111_Item && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id113_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; @@ -13836,14 +14652,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)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(); - } + if (((object) Reader.LocalName == (object)id289_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++] = Read111_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)id278_Amount && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id290_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()); } @@ -13864,12 +14678,12 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithFieldsOrdered Read109_TypeWithFieldsOrdered(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithFieldsOrdered Read113_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)id113_TypeWithFieldsOrdered && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { + if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id117_TypeWithFieldsOrdered && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) { } else { throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType); @@ -13896,7 +14710,7 @@ internal System.Collections.Hashtable EnumFlagsValues { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { switch (state) { case 0: - if (((object) Reader.LocalName == (object)id280_IntField2 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id291_IntField2 && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@IntField2 = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); } @@ -13904,7 +14718,7 @@ internal System.Collections.Hashtable EnumFlagsValues { state = 1; break; case 1: - if (((object) Reader.LocalName == (object)id279_IntField1 && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id292_IntField1 && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@IntField1 = System.Xml.XmlConvert.ToInt32(Reader.ReadElementString()); } @@ -13912,7 +14726,7 @@ internal System.Collections.Hashtable EnumFlagsValues { state = 2; break; case 2: - if (((object) Reader.LocalName == (object)id281_strfld && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id293_strfld && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@StringField2 = Reader.ReadElementString(); } @@ -13920,7 +14734,7 @@ internal System.Collections.Hashtable EnumFlagsValues { state = 3; break; case 3: - if (((object) Reader.LocalName == (object)id281_strfld && (object) Reader.NamespaceURI == (object)id2_Item)) { + if (((object) Reader.LocalName == (object)id293_strfld && (object) Reader.NamespaceURI == (object)id2_Item)) { { o.@StringField1 = Reader.ReadElementString(); } @@ -13941,7 +14755,7 @@ internal System.Collections.Hashtable EnumFlagsValues { return o; } - global::SerializationTypes.TypeWithSchemaFormInXmlAttribute Read93_Item(bool isNullable, bool checkType) { + global::SerializationTypes.TypeWithSchemaFormInXmlAttribute Read94_Item(bool isNullable, bool checkType) { System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null; bool isNull = false; if (isNullable) isNull = ReadNull(); @@ -13957,7 +14771,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)id282_TestProperty && (object) Reader.NamespaceURI == (object)id283_httptestcom)) { + if (!paramsRead[0] && ((object) Reader.LocalName == (object)id294_TestProperty && (object) Reader.NamespaceURI == (object)id295_httptestcom)) { o.@TestProperty = Reader.Value; paramsRead[0] = true; } @@ -13988,574 +14802,598 @@ internal System.Collections.Hashtable EnumFlagsValues { protected override void InitCallbacks() { } - string id243_XmlEnumProperty; - string id56_ArrayOfAnyType; - string id245_XmlElementPropertyNode; - string id193_ShipCost; - string id79_WithEnums; - string id197_Z; + string id288_HexBinaryContent; + string id160_Child; + string id86_UIntEnum; + string id167_Quantity; + string id292_IntField1; + string id133_ParameterOfString; + string id286_NMTOKENSContent; + string id265_Item; + string id263_MyField; + string id88_ULongEnum; + string id24_httpwwwcontoso1com; + string id179_Age; + string id14_Vehicle; + string id182_GroupName; + string id76_EnumFlags; + string id220_NIntAField; + string id241_Some; + string id18_SimpleBaseClass; + string id192_Zip; + string id146_ArrayOfXElement; + string id97_MyXmlType; + string id50_SimpleType; string id48_XElementArrayWrapper; - string id124_A; - string id155_Value; - string id225_ClassID; - string id7_Item; - string id212_CurrentDateTime; - string id141_ArrayOfParameter; - string id105_Item; - string id251_MyField; - string id237_Struct2; - string id12_DogBreed; - string id267_IntArrayValue; + string id60_TypeWithEnumMembers; + string id117_TypeWithFieldsOrdered; + string id99_CustomDocument; + string id141_ArrayOfDouble; + string id271_DS2Root; + string id148_ArrayOfSimpleType; + string id107_Item; + string id255_XmlEnumProperty; + string id261_SimpleTypeValue; + string id249_Struct2; + string id29_DerivedClass1; + string id38_Item; + string id125_LastName; + string id106_Item; + string id215_DateTimeString; + string id118_Item; + string id124_MiddleName; + string id257_XmlElementPropertyNode; string id74_Item; - string id256_XmlAttributeForm; - string id88_AttributeTesting; - string id259_DS2Root; - string id275_Base64BinaryContent; - string id119_FirstName; - string id160_ItemName; - string id13_Group; - string id53_StructNotSerializable; - string id35_Trumpet; - string id46_XElementWrapper; - string id146_ArrayOfItemChoiceType; - string id201_DoubleField; - string id117_TypeClashA; - string id223_DateTimeProperty; - string id126_Value1; - string id121_LastName; - string id258_customElement; - string id33_Instrument; - string id255_Item; - string id45_Parameter; - string id174_ByteProperty; - string id176_Breed; - string id266_StringArrayValue; - string id184_BoolValue; - string id28_BaseClass1; - string id44_RootClass; - string id190_OrderDate; - string id249_SimpleTypeValue; - string id228_IsLoaded; - string id80_WithNullables; - string id233_Optionull; - string id57_anyType; - string id163_Quantity; - string id139_ArrayOfInstrument; - string id159_Modulation; - string id58_MyEnum; - string id77_WithStruct; - string id55_Item; - string id264_EnumProperty; - string id265_Foo; - string id200_Comment2; - string id24_httpwwwcontoso1com; - string id102_TypeWithXmlQualifiedName; - string id99_CustomElement; - string id34_Brass; - string id209_xelement; - string id111_Item; - string id213_F1; - string id272_NCNameContent; - string id98_CustomDocument; - string id281_strfld; - string id63_TypeA; - string id131_Item; - string id109_Item; - string id279_IntField1; - string id181_value; - string id185_Line1; - string id123_ContainerType; - string id90_TypeWithAnyAttribute; - string id217_MyStruct; - string id169_DefaultDTO; - string id166_Base64Content; + string id81_WithNullables; + string id54_StructNotSerializable; + string id195_Items; + string id132_XmlSerializerAttributes; + string id70_DerivedClassWithSameProperty2; + string id58_anyType; + string id274_EmptyStringProperty; + string id211_refs; + string id208_FloatProp; + string id280_DateTimeContent; + string id188_BoolValue; + string id79_SomeStruct; string id23_PurchaseOrder; - string id8_TypeWithByteProperty; - string id182_AttributeString; - string id140_ArrayOfTypeWithLinkedProperty; - string id161_Description; - string id16_BaseClass; - string id268_DateTimeContent; - string id199_Instruments; - string id78_SomeStruct; - string id250_StrProperty; - string id238_XmlAttributeName; - string id145_ArrayOfTypeA; - string id64_TypeB; - string id42_Document; - string id273_NMTOKENContent; - string id191_Items; - string id59_TypeWithEnumMembers; + string id136_ArrayOfOrderedItem; + string id92_KnownTypesThroughConstructor; + string id59_MyEnum; + string id185_value; + string id135_Item; + string id91_TypeWithAnyAttribute; + string id83_SByteEnum; + string id205_DoubleField; + string id116_ComplexChoiceB; + string id214_xelements; + string id19_SimpleDerivedClass; + string id150_ArrayOfItemChoiceType; + string id159_Value; + string id234_IntProperty; + string id202_Prop; + string id41_TypeWithLinkedProperty; + string id149_ArrayOfTypeA; + string id115_ComplexChoiceA; + string id22_DerivedIXmlSerializable; + string id184_EmployeeName; + string id245_Optionull; + string id36_Pet; + string id62_DCClassWithEnumAndStruct; + string id254_XmlIncludeProperty; + string id56_Item; + string id90_ItemChoiceType; + string id209_IntValue; + string id196_SubTotal; + string id281_QNameContent; + string id17_DerivedClass; + string id84_ShortEnum; + string id145_ArrayOfParameter; string id49_TypeWithDateTimeStringProperty; - string id196_Y; - string id231_Short; - string id128_XmlSerializerAttributes; - string id83_ShortEnum; - string id151_QualifiedParameter; - string id120_MiddleName; - string id89_ItemChoiceType; - string id26_OrderedItem; - string id172_TimeSpanProperty; - string id133_ArrayOfInt; - string id219_ByteArray; - string id252_MyFieldIgnored; - string id202_SingleField; - string id207_refs; - string id113_TypeWithFieldsOrdered; + string id164_ItemName; + string id69_DerivedClassWithSameProperty; + string id10_Animal; + string id268_XmlAttributeForm; + string id40_RootElement; + string id272_MetricConfigUrl; + string id183_GroupVehicle; + string id163_Modulation; + string id246_OptionalInt; + string id75_Item; + string id204_Comment2; + string id203_Instruments; + string id161_Children; + string id248_Struct1; + string id193_ShipTo; + string id200_Y; + string id55_TypeWithMyCollectionField; + string id77_ClassImplementsInterface; + string id33_Instrument; + string id9_TypeWithXmlNodeArrayProperty; + string id153_NoneParameter; + string id264_MyFieldIgnored; + string id73_SimpleDC; + string id5_Item; + string id275_CharProperty; + string id171_DTO; string id39_Item; - string id142_ArrayOfXElement; - string id108_Item; - string id278_Amount; - string id112_MoreChoices; - string id138_double; - string id43_httpexamplecom; - string id229_Some; string id20_BaseIXmlSerializable; - string id110_Item; - string id81_ByteEnum; - string id198_Prop; - string id82_SByteEnum; - string id192_SubTotal; - string id239_Word; - string id17_DerivedClass; - string id18_SimpleBaseClass; + string id131_Value2; + string id259_CustomXmlArrayProperty; + string id199_X; + string id96_TypeWithXmlSchemaFormAttribute; + string id233_StringProperty; + string id44_RootClass; + string id216_CurrentDateTime; + string id120_TypeClashB; + string id61_DCStruct; + string id114_MoreChoices; + string id154_ArrayOfBoolean; + string id7_Item; + string id109_Item; + string id282_DateContent; + string id13_Group; + string id46_XElementWrapper; + string id270_customElement; + string id112_Item; + string id52_TypeWithGetOnlyArrayProperties; + string id207_DoubleProp; + string id3_TypeWithXmlDocumentProperty; + string id35_Trumpet; + string id178_ByteProperty; + string id71_Item; + string id251_Word; + string id93_SimpleKnownTypeValue; + string id252_Number; + string id262_StrProperty; + string id100_CustomElement; + string id197_ShipCost; + string id122_Person; + string id222_NIntLField; + string id278_StringArrayValue; + string id273_TwoDArrayOfSimpleType; + string id169_BinaryHexContent; + string id244_Optional; + string id238_DisplayName; + string id228_Data; + string id287_Base64BinaryContent; + string id103_TypeWithXmlQualifiedName; + string id291_IntField2; + string id181_LicenseNumber; + string id229_MyStruct; + string id175_NullableDefaultDTO; + string id28_BaseClass1; + string id295_httptestcom; + string id21_Item; + string id173_DefaultDTO; + string id266_NoneSchemaFormListProperty; + string id157_P1; string id47_XElementStruct; - string id205_IntValue; - string id246_httpelement; - string id76_ClassImplementsInterface; - string id54_TypeWithMyCollectionField; - string id85_UIntEnum; - string id189_ShipTo; - string id127_Value2; - string id253_Item; - string id62_BuiltInTypes; - string id260_MetricConfigUrl; - string id115_Root; - string id283_httptestcom; - string id107_TypeWithShouldSerializeMethod; - string id274_NMTOKENSContent; - string id271_NameContent; - string id95_TypeWithXmlSchemaFormAttribute; - string id66_Item; - string id136_string; - string id149_NoneParameter; - string id214_F2; - string id234_OptionalInt; - string id242_XmlIncludeProperty; - string id73_Item; - string id257_name; - string id31_dateTime; - string id270_DateContent; - string id240_Number; - string id254_NoneSchemaFormListProperty; - string id104_Item; - string id41_TypeWithLinkedProperty; - string id5_Item; - string id179_GroupVehicle; - string id27_AliasedTestType; - string id215_Collection; - string id168_DTO2; - string id210_xelements; - string id222_IntProperty; - string id180_EmployeeName; - string id22_DerivedIXmlSerializable; - string id277_Item; - string id232_Optional; - string id276_HexBinaryContent; - string id152_ArrayOfArrayOfSimpleType; - string id144_ArrayOfSimpleType; - string id93_Item; - string id230_Int; - string id97_Item; - string id211_DateTimeString; - string id280_IntField2; - string id147_httpmynamespace; + string id139_ArrayOfString; + string id212_Parameters; + string id87_LongEnum; + string id155_QualifiedParameter; + string id121_TypeClashA; + string id187_DateTimeValue; + string id95_TypeWithPropertyNameSpecified; + string id166_UnitPrice; + string id110_Item; + string id236_ListProperty; string id11_Dog; - string id52_TypeWithGetOnlyArrayProperties; - string id61_DCClassWithEnumAndStruct; - string id175_Age; - string id114_Item; - string id71_TypeWithByteArrayAsXmlText; - string id4_TypeWithBinaryProperty; - string id118_Person; - string id261_TwoDArrayOfSimpleType; + string id247_OptionullInt; + string id276_EnumProperty; + string id232_Item; + string id72_TypeWithByteArrayAsXmlText; + string id65_TypeB; + string id31_dateTime; + string id85_IntEnum; + string id108_TypeWithShouldSerializeMethod; + string id279_IntArrayValue; + string id290_Amount; + string id102_ServerSettings; + string id138_int; + string id176_TimeSpanProperty; + string id165_Description; + string id45_Parameter; + string id226_NIntLProp; + string id42_Document; + string id177_TimeSpanProperty2; + string id82_ByteEnum; + string id269_name; + string id225_IntLProp; + string id126_Name; + string id151_httpmynamespace; string id32_Orchestra; - string id220_Item; - string id216_Data; - string id60_DCStruct; - string id148_ArrayOfString1; - string id165_BinaryHexContent; - string id91_KnownTypesThroughConstructor; - string id224_ListProperty; - string id195_X; - string id6_TypeWithTimeSpanProperty; - string id203_DoubleProp; - string id106_Item; - string id103_TypeWith2DArrayProperty2; - string id156_Child; - string id86_LongEnum; - string id9_TypeWithXmlNodeArrayProperty; - string id25_Address; - string id162_UnitPrice; - string id125_B; - string id68_DerivedClassWithSameProperty; + string id180_Breed; + string id224_NIntAProp; + string id235_DateTimeProperty; + string id113_Item; string id51_TypeWithGetSetArrayMembers; - string id236_Struct1; - string id150_ArrayOfBoolean; - string id177_LicenseNumber; - string id72_SimpleDC; - string id94_TypeWithPropertyNameSpecified; - string id96_MyXmlType; - string id101_ServerSettings; - string id226_DisplayName; - string id19_SimpleDerivedClass; - string id153_P1; - string id183_DateTimeValue; - string id154_P2; - string id2_Item; - string id269_QNameContent; + string id174_NullableDTO; + string id142_double; + string id129_B; + string id37_DefaultValuesSetToNaN; + string id162_IsValved; + string id250_XmlAttributeName; + string id27_AliasedTestType; + string id285_NMTOKENContent; + string id144_ArrayOfTypeWithLinkedProperty; + string id57_ArrayOfAnyType; string id1_TypeWithXmlElementProperty; - string id3_TypeWithXmlDocumentProperty; - string id263_CharProperty; - string id178_GroupName; - string id134_int; - string id186_City; - string id69_DerivedClassWithSameProperty2; - string id75_EnumFlags; - string id235_OptionullInt; - string id158_IsValved; - string id157_Children; - string id92_SimpleKnownTypeValue; - string id262_EmptyStringProperty; - string id194_TotalCost; - string id171_NullableDefaultDTO; - string id100_Item; - string id132_ArrayOfOrderedItem; - string id143_XElement; - string id15_Employee; - string id187_State; - string id173_TimeSpanProperty2; - string id188_Zip; - string id122_Name; - string id241_DecimalNumber; - string id221_StringProperty; - string id204_FloatProp; - string id218_MyEnum1; + string id186_AttributeString; + string id123_FirstName; + string id243_Short; + string id4_TypeWithBinaryProperty; + string id221_IntLField; + string id63_BuiltInTypes; + string id64_TypeA; + string id258_httpelement; + string id134_MsgDocumentType; + string id190_City; + string id189_Line1; + string id119_Root; + string id231_ByteArray; + string id143_ArrayOfInstrument; string id30_ArrayOfDateTime; - string id65_TypeHasArrayOfASerializedAsB; - string id87_ULongEnum; - string id84_IntEnum; - string id248_EnumValue; - string id50_SimpleType; - string id206_id; - string id247_CustomXmlArrayProperty; - string id38_Item; - string id36_Pet; - string id208_Parameters; - string id67_BaseClassWithSamePropertyName; - string id116_TypeClashB; - string id21_Item; - string id282_TestProperty; - string id129_ParameterOfString; - string id14_Vehicle; - string id130_MsgDocumentType; - string id10_Animal; - string id29_DerivedClass1; - string id135_ArrayOfString; - string id170_NullableDTO; - string id244_Item; - string id70_Item; - string id37_DefaultValuesSetToNaN; - string id40_RootElement; - string id227_Id; - string id137_ArrayOfDouble; - string id167_DTO; - string id164_LineTotal; + string id137_ArrayOfInt; + string id25_Address; + string id53_TypeWithArraylikeMembers; + string id98_Item; + string id227_Collection; + string id218_F2; + string id78_WithStruct; + string id104_TypeWith2DArrayProperty2; + string id170_Base64Content; + string id147_XElement; + string id260_EnumValue; + string id223_IntAProp; + string id15_Employee; + string id105_Item; + string id152_ArrayOfString1; + string id128_A; + string id284_NCNameContent; + string id219_IntAField; + string id210_id; + string id34_Brass; + string id158_P2; + string id294_TestProperty; + string id67_Item; + string id111_Item; + string id293_strfld; + string id130_Value1; + string id66_TypeHasArrayOfASerializedAsB; + string id217_F1; + string id16_BaseClass; + string id230_MyEnum1; + string id12_DogBreed; + string id168_LineTotal; + string id194_OrderDate; + string id277_Foo; + string id239_Id; + string id6_TypeWithTimeSpanProperty; + string id140_string; + string id206_SingleField; + string id201_Z; + string id26_OrderedItem; + string id198_TotalCost; + string id240_IsLoaded; + string id94_Item; + string id89_AttributeTesting; + string id68_BaseClassWithSamePropertyName; + string id2_Item; + string id289_Item; + string id191_State; + string id237_ClassID; + string id267_Item; + string id172_DTO2; + string id101_Item; + string id8_TypeWithByteProperty; + string id156_ArrayOfArrayOfSimpleType; + string id256_Item; + string id242_Int; + string id43_httpexamplecom; + string id213_xelement; + string id80_WithEnums; + string id127_ContainerType; + string id283_NameContent; + string id253_DecimalNumber; protected override void InitIDs() { - id243_XmlEnumProperty = Reader.NameTable.Add(@"XmlEnumProperty"); - id56_ArrayOfAnyType = Reader.NameTable.Add(@"ArrayOfAnyType"); - id245_XmlElementPropertyNode = Reader.NameTable.Add(@"XmlElementPropertyNode"); - id193_ShipCost = Reader.NameTable.Add(@"ShipCost"); - id79_WithEnums = Reader.NameTable.Add(@"WithEnums"); - id197_Z = Reader.NameTable.Add(@"Z"); - id48_XElementArrayWrapper = Reader.NameTable.Add(@"XElementArrayWrapper"); - id124_A = Reader.NameTable.Add(@"A"); - id155_Value = Reader.NameTable.Add(@"Value"); - id225_ClassID = Reader.NameTable.Add(@"ClassID"); - id7_Item = Reader.NameTable.Add(@"TypeWithDefaultTimeSpanProperty"); - id212_CurrentDateTime = Reader.NameTable.Add(@"CurrentDateTime"); - id141_ArrayOfParameter = Reader.NameTable.Add(@"ArrayOfParameter"); - id105_Item = Reader.NameTable.Add(@"TypeWithEnumPropertyHavingDefaultValue"); - id251_MyField = Reader.NameTable.Add(@"MyField"); - id237_Struct2 = Reader.NameTable.Add(@"Struct2"); - id12_DogBreed = Reader.NameTable.Add(@"DogBreed"); - id267_IntArrayValue = Reader.NameTable.Add(@"IntArrayValue"); - id74_Item = Reader.NameTable.Add(@"http://schemas.xmlsoap.org/ws/2005/04/discovery"); - id256_XmlAttributeForm = Reader.NameTable.Add(@"XmlAttributeForm"); - id88_AttributeTesting = Reader.NameTable.Add(@"AttributeTesting"); - id259_DS2Root = Reader.NameTable.Add(@"DS2Root"); - id275_Base64BinaryContent = Reader.NameTable.Add(@"Base64BinaryContent"); - id119_FirstName = Reader.NameTable.Add(@"FirstName"); - id160_ItemName = Reader.NameTable.Add(@"ItemName"); - id13_Group = Reader.NameTable.Add(@"Group"); - id53_StructNotSerializable = Reader.NameTable.Add(@"StructNotSerializable"); - id35_Trumpet = Reader.NameTable.Add(@"Trumpet"); - id46_XElementWrapper = Reader.NameTable.Add(@"XElementWrapper"); - id146_ArrayOfItemChoiceType = Reader.NameTable.Add(@"ArrayOfItemChoiceType"); - id201_DoubleField = Reader.NameTable.Add(@"DoubleField"); - id117_TypeClashA = Reader.NameTable.Add(@"TypeClashA"); - id223_DateTimeProperty = Reader.NameTable.Add(@"DateTimeProperty"); - id126_Value1 = Reader.NameTable.Add(@"Value1"); - id121_LastName = Reader.NameTable.Add(@"LastName"); - id258_customElement = Reader.NameTable.Add(@"customElement"); - id33_Instrument = Reader.NameTable.Add(@"Instrument"); - id255_Item = Reader.NameTable.Add(@"QualifiedSchemaFormListProperty"); - id45_Parameter = Reader.NameTable.Add(@"Parameter"); - id174_ByteProperty = Reader.NameTable.Add(@"ByteProperty"); - id176_Breed = Reader.NameTable.Add(@"Breed"); - id266_StringArrayValue = Reader.NameTable.Add(@"StringArrayValue"); - id184_BoolValue = Reader.NameTable.Add(@"BoolValue"); - id28_BaseClass1 = Reader.NameTable.Add(@"BaseClass1"); - id44_RootClass = Reader.NameTable.Add(@"RootClass"); - id190_OrderDate = Reader.NameTable.Add(@"OrderDate"); - id249_SimpleTypeValue = Reader.NameTable.Add(@"SimpleTypeValue"); - id228_IsLoaded = Reader.NameTable.Add(@"IsLoaded"); - id80_WithNullables = Reader.NameTable.Add(@"WithNullables"); - id233_Optionull = Reader.NameTable.Add(@"Optionull"); - id57_anyType = Reader.NameTable.Add(@"anyType"); - id163_Quantity = Reader.NameTable.Add(@"Quantity"); - id139_ArrayOfInstrument = Reader.NameTable.Add(@"ArrayOfInstrument"); - id159_Modulation = Reader.NameTable.Add(@"Modulation"); - id58_MyEnum = Reader.NameTable.Add(@"MyEnum"); - id77_WithStruct = Reader.NameTable.Add(@"WithStruct"); - id55_Item = Reader.NameTable.Add(@"TypeWithReadOnlyMyCollectionProperty"); - id264_EnumProperty = Reader.NameTable.Add(@"EnumProperty"); - id265_Foo = Reader.NameTable.Add(@"Foo"); - id200_Comment2 = Reader.NameTable.Add(@"Comment2"); + id288_HexBinaryContent = Reader.NameTable.Add(@"HexBinaryContent"); + id160_Child = Reader.NameTable.Add(@"Child"); + id86_UIntEnum = Reader.NameTable.Add(@"UIntEnum"); + id167_Quantity = Reader.NameTable.Add(@"Quantity"); + id292_IntField1 = Reader.NameTable.Add(@"IntField1"); + id133_ParameterOfString = Reader.NameTable.Add(@"ParameterOfString"); + id286_NMTOKENSContent = Reader.NameTable.Add(@"NMTOKENSContent"); + id265_Item = Reader.NameTable.Add(@"UnqualifiedSchemaFormListProperty"); + id263_MyField = Reader.NameTable.Add(@"MyField"); + id88_ULongEnum = Reader.NameTable.Add(@"ULongEnum"); id24_httpwwwcontoso1com = Reader.NameTable.Add(@"http://www.contoso1.com"); - id102_TypeWithXmlQualifiedName = Reader.NameTable.Add(@"TypeWithXmlQualifiedName"); - id99_CustomElement = Reader.NameTable.Add(@"CustomElement"); - id34_Brass = Reader.NameTable.Add(@"Brass"); - id209_xelement = Reader.NameTable.Add(@"xelement"); - id111_Item = Reader.NameTable.Add(@"TypeWithArrayPropertyHavingChoice"); - id213_F1 = Reader.NameTable.Add(@"F1"); - id272_NCNameContent = Reader.NameTable.Add(@"NCNameContent"); - id98_CustomDocument = Reader.NameTable.Add(@"CustomDocument"); - id281_strfld = Reader.NameTable.Add(@"strfld"); - id63_TypeA = Reader.NameTable.Add(@"TypeA"); - id131_Item = Reader.NameTable.Add(@"TypeWithMismatchBetweenAttributeAndPropertyType"); - id109_Item = Reader.NameTable.Add(@"KnownTypesThroughConstructorWithValue"); - id279_IntField1 = Reader.NameTable.Add(@"IntField1"); - id181_value = Reader.NameTable.Add(@"value"); - id185_Line1 = Reader.NameTable.Add(@"Line1"); - id123_ContainerType = Reader.NameTable.Add(@"ContainerType"); - id90_TypeWithAnyAttribute = Reader.NameTable.Add(@"TypeWithAnyAttribute"); - id217_MyStruct = Reader.NameTable.Add(@"MyStruct"); - id169_DefaultDTO = Reader.NameTable.Add(@"DefaultDTO"); - id166_Base64Content = Reader.NameTable.Add(@"Base64Content"); + id179_Age = Reader.NameTable.Add(@"Age"); + id14_Vehicle = Reader.NameTable.Add(@"Vehicle"); + id182_GroupName = Reader.NameTable.Add(@"GroupName"); + id76_EnumFlags = Reader.NameTable.Add(@"EnumFlags"); + id220_NIntAField = Reader.NameTable.Add(@"NIntAField"); + id241_Some = Reader.NameTable.Add(@"Some"); + id18_SimpleBaseClass = Reader.NameTable.Add(@"SimpleBaseClass"); + id192_Zip = Reader.NameTable.Add(@"Zip"); + id146_ArrayOfXElement = Reader.NameTable.Add(@"ArrayOfXElement"); + id97_MyXmlType = Reader.NameTable.Add(@"MyXmlType"); + id50_SimpleType = Reader.NameTable.Add(@"SimpleType"); + id48_XElementArrayWrapper = Reader.NameTable.Add(@"XElementArrayWrapper"); + id60_TypeWithEnumMembers = Reader.NameTable.Add(@"TypeWithEnumMembers"); + id117_TypeWithFieldsOrdered = Reader.NameTable.Add(@"TypeWithFieldsOrdered"); + id99_CustomDocument = Reader.NameTable.Add(@"CustomDocument"); + id141_ArrayOfDouble = Reader.NameTable.Add(@"ArrayOfDouble"); + id271_DS2Root = Reader.NameTable.Add(@"DS2Root"); + id148_ArrayOfSimpleType = Reader.NameTable.Add(@"ArrayOfSimpleType"); + id107_Item = Reader.NameTable.Add(@"TypeWithEnumFlagPropertyHavingDefaultValue"); + id255_XmlEnumProperty = Reader.NameTable.Add(@"XmlEnumProperty"); + id261_SimpleTypeValue = Reader.NameTable.Add(@"SimpleTypeValue"); + id249_Struct2 = Reader.NameTable.Add(@"Struct2"); + id29_DerivedClass1 = Reader.NameTable.Add(@"DerivedClass1"); + id38_Item = Reader.NameTable.Add(@"DefaultValuesSetToPositiveInfinity"); + id125_LastName = Reader.NameTable.Add(@"LastName"); + id106_Item = Reader.NameTable.Add(@"TypeWithEnumPropertyHavingDefaultValue"); + id215_DateTimeString = Reader.NameTable.Add(@"DateTimeString"); + id118_Item = Reader.NameTable.Add(@"TypeWithKnownTypesOfCollectionsWithConflictingXmlName"); + id124_MiddleName = Reader.NameTable.Add(@"MiddleName"); + id257_XmlElementPropertyNode = Reader.NameTable.Add(@"XmlElementPropertyNode"); + id74_Item = Reader.NameTable.Add(@"TypeWithXmlTextAttributeOnArray"); + id81_WithNullables = Reader.NameTable.Add(@"WithNullables"); + id54_StructNotSerializable = Reader.NameTable.Add(@"StructNotSerializable"); + id195_Items = Reader.NameTable.Add(@"Items"); + id132_XmlSerializerAttributes = Reader.NameTable.Add(@"XmlSerializerAttributes"); + id70_DerivedClassWithSameProperty2 = Reader.NameTable.Add(@"DerivedClassWithSameProperty2"); + id58_anyType = Reader.NameTable.Add(@"anyType"); + id274_EmptyStringProperty = Reader.NameTable.Add(@"EmptyStringProperty"); + id211_refs = Reader.NameTable.Add(@"refs"); + id208_FloatProp = Reader.NameTable.Add(@"FloatProp"); + id280_DateTimeContent = Reader.NameTable.Add(@"DateTimeContent"); + id188_BoolValue = Reader.NameTable.Add(@"BoolValue"); + id79_SomeStruct = Reader.NameTable.Add(@"SomeStruct"); id23_PurchaseOrder = Reader.NameTable.Add(@"PurchaseOrder"); - id8_TypeWithByteProperty = Reader.NameTable.Add(@"TypeWithByteProperty"); - id182_AttributeString = Reader.NameTable.Add(@"AttributeString"); - id140_ArrayOfTypeWithLinkedProperty = Reader.NameTable.Add(@"ArrayOfTypeWithLinkedProperty"); - id161_Description = Reader.NameTable.Add(@"Description"); - id16_BaseClass = Reader.NameTable.Add(@"BaseClass"); - id268_DateTimeContent = Reader.NameTable.Add(@"DateTimeContent"); - id199_Instruments = Reader.NameTable.Add(@"Instruments"); - id78_SomeStruct = Reader.NameTable.Add(@"SomeStruct"); - id250_StrProperty = Reader.NameTable.Add(@"StrProperty"); - id238_XmlAttributeName = Reader.NameTable.Add(@"XmlAttributeName"); - id145_ArrayOfTypeA = Reader.NameTable.Add(@"ArrayOfTypeA"); - id64_TypeB = Reader.NameTable.Add(@"TypeB"); - id42_Document = Reader.NameTable.Add(@"Document"); - id273_NMTOKENContent = Reader.NameTable.Add(@"NMTOKENContent"); - id191_Items = Reader.NameTable.Add(@"Items"); - id59_TypeWithEnumMembers = Reader.NameTable.Add(@"TypeWithEnumMembers"); + id136_ArrayOfOrderedItem = Reader.NameTable.Add(@"ArrayOfOrderedItem"); + id92_KnownTypesThroughConstructor = Reader.NameTable.Add(@"KnownTypesThroughConstructor"); + id59_MyEnum = Reader.NameTable.Add(@"MyEnum"); + id185_value = Reader.NameTable.Add(@"value"); + id135_Item = Reader.NameTable.Add(@"TypeWithMismatchBetweenAttributeAndPropertyType"); + id91_TypeWithAnyAttribute = Reader.NameTable.Add(@"TypeWithAnyAttribute"); + id83_SByteEnum = Reader.NameTable.Add(@"SByteEnum"); + id205_DoubleField = Reader.NameTable.Add(@"DoubleField"); + id116_ComplexChoiceB = Reader.NameTable.Add(@"ComplexChoiceB"); + id214_xelements = Reader.NameTable.Add(@"xelements"); + id19_SimpleDerivedClass = Reader.NameTable.Add(@"SimpleDerivedClass"); + id150_ArrayOfItemChoiceType = Reader.NameTable.Add(@"ArrayOfItemChoiceType"); + id159_Value = Reader.NameTable.Add(@"Value"); + id234_IntProperty = Reader.NameTable.Add(@"IntProperty"); + id202_Prop = Reader.NameTable.Add(@"Prop"); + id41_TypeWithLinkedProperty = Reader.NameTable.Add(@"TypeWithLinkedProperty"); + id149_ArrayOfTypeA = Reader.NameTable.Add(@"ArrayOfTypeA"); + id115_ComplexChoiceA = Reader.NameTable.Add(@"ComplexChoiceA"); + id22_DerivedIXmlSerializable = Reader.NameTable.Add(@"DerivedIXmlSerializable"); + id184_EmployeeName = Reader.NameTable.Add(@"EmployeeName"); + id245_Optionull = Reader.NameTable.Add(@"Optionull"); + id36_Pet = Reader.NameTable.Add(@"Pet"); + id62_DCClassWithEnumAndStruct = Reader.NameTable.Add(@"DCClassWithEnumAndStruct"); + id254_XmlIncludeProperty = Reader.NameTable.Add(@"XmlIncludeProperty"); + id56_Item = Reader.NameTable.Add(@"TypeWithReadOnlyMyCollectionProperty"); + id90_ItemChoiceType = Reader.NameTable.Add(@"ItemChoiceType"); + id209_IntValue = Reader.NameTable.Add(@"IntValue"); + id196_SubTotal = Reader.NameTable.Add(@"SubTotal"); + id281_QNameContent = Reader.NameTable.Add(@"QNameContent"); + id17_DerivedClass = Reader.NameTable.Add(@"DerivedClass"); + id84_ShortEnum = Reader.NameTable.Add(@"ShortEnum"); + id145_ArrayOfParameter = Reader.NameTable.Add(@"ArrayOfParameter"); id49_TypeWithDateTimeStringProperty = Reader.NameTable.Add(@"TypeWithDateTimeStringProperty"); - id196_Y = Reader.NameTable.Add(@"Y"); - id231_Short = Reader.NameTable.Add(@"Short"); - id128_XmlSerializerAttributes = Reader.NameTable.Add(@"XmlSerializerAttributes"); - id83_ShortEnum = Reader.NameTable.Add(@"ShortEnum"); - id151_QualifiedParameter = Reader.NameTable.Add(@"QualifiedParameter"); - id120_MiddleName = Reader.NameTable.Add(@"MiddleName"); - id89_ItemChoiceType = Reader.NameTable.Add(@"ItemChoiceType"); - id26_OrderedItem = Reader.NameTable.Add(@"OrderedItem"); - id172_TimeSpanProperty = Reader.NameTable.Add(@"TimeSpanProperty"); - id133_ArrayOfInt = Reader.NameTable.Add(@"ArrayOfInt"); - id219_ByteArray = Reader.NameTable.Add(@"ByteArray"); - id252_MyFieldIgnored = Reader.NameTable.Add(@"MyFieldIgnored"); - id202_SingleField = Reader.NameTable.Add(@"SingleField"); - id207_refs = Reader.NameTable.Add(@"refs"); - id113_TypeWithFieldsOrdered = Reader.NameTable.Add(@"TypeWithFieldsOrdered"); + id164_ItemName = Reader.NameTable.Add(@"ItemName"); + id69_DerivedClassWithSameProperty = Reader.NameTable.Add(@"DerivedClassWithSameProperty"); + id10_Animal = Reader.NameTable.Add(@"Animal"); + id268_XmlAttributeForm = Reader.NameTable.Add(@"XmlAttributeForm"); + id40_RootElement = Reader.NameTable.Add(@"RootElement"); + id272_MetricConfigUrl = Reader.NameTable.Add(@"MetricConfigUrl"); + id183_GroupVehicle = Reader.NameTable.Add(@"GroupVehicle"); + id163_Modulation = Reader.NameTable.Add(@"Modulation"); + id246_OptionalInt = Reader.NameTable.Add(@"OptionalInt"); + id75_Item = Reader.NameTable.Add(@"http://schemas.xmlsoap.org/ws/2005/04/discovery"); + id204_Comment2 = Reader.NameTable.Add(@"Comment2"); + id203_Instruments = Reader.NameTable.Add(@"Instruments"); + id161_Children = Reader.NameTable.Add(@"Children"); + id248_Struct1 = Reader.NameTable.Add(@"Struct1"); + id193_ShipTo = Reader.NameTable.Add(@"ShipTo"); + id200_Y = Reader.NameTable.Add(@"Y"); + id55_TypeWithMyCollectionField = Reader.NameTable.Add(@"TypeWithMyCollectionField"); + id77_ClassImplementsInterface = Reader.NameTable.Add(@"ClassImplementsInterface"); + id33_Instrument = Reader.NameTable.Add(@"Instrument"); + id9_TypeWithXmlNodeArrayProperty = Reader.NameTable.Add(@"TypeWithXmlNodeArrayProperty"); + id153_NoneParameter = Reader.NameTable.Add(@"NoneParameter"); + id264_MyFieldIgnored = Reader.NameTable.Add(@"MyFieldIgnored"); + id73_SimpleDC = Reader.NameTable.Add(@"SimpleDC"); + id5_Item = Reader.NameTable.Add(@"TypeWithDateTimeOffsetProperties"); + id275_CharProperty = Reader.NameTable.Add(@"CharProperty"); + id171_DTO = Reader.NameTable.Add(@"DTO"); id39_Item = Reader.NameTable.Add(@"DefaultValuesSetToNegativeInfinity"); - id142_ArrayOfXElement = Reader.NameTable.Add(@"ArrayOfXElement"); - id108_Item = Reader.NameTable.Add(@"KnownTypesThroughConstructorWithArrayProperties"); - id278_Amount = Reader.NameTable.Add(@"Amount"); - id112_MoreChoices = Reader.NameTable.Add(@"MoreChoices"); - id138_double = Reader.NameTable.Add(@"double"); - id43_httpexamplecom = Reader.NameTable.Add(@"http://example.com"); - id229_Some = Reader.NameTable.Add(@"Some"); id20_BaseIXmlSerializable = Reader.NameTable.Add(@"BaseIXmlSerializable"); - id110_Item = Reader.NameTable.Add(@"TypeWithTypesHavingCustomFormatter"); - id81_ByteEnum = Reader.NameTable.Add(@"ByteEnum"); - id198_Prop = Reader.NameTable.Add(@"Prop"); - id82_SByteEnum = Reader.NameTable.Add(@"SByteEnum"); - id192_SubTotal = Reader.NameTable.Add(@"SubTotal"); - id239_Word = Reader.NameTable.Add(@"Word"); - id17_DerivedClass = Reader.NameTable.Add(@"DerivedClass"); - id18_SimpleBaseClass = Reader.NameTable.Add(@"SimpleBaseClass"); + id131_Value2 = Reader.NameTable.Add(@"Value2"); + id259_CustomXmlArrayProperty = Reader.NameTable.Add(@"CustomXmlArrayProperty"); + id199_X = Reader.NameTable.Add(@"X"); + id96_TypeWithXmlSchemaFormAttribute = Reader.NameTable.Add(@"TypeWithXmlSchemaFormAttribute"); + id233_StringProperty = Reader.NameTable.Add(@"StringProperty"); + id44_RootClass = Reader.NameTable.Add(@"RootClass"); + id216_CurrentDateTime = Reader.NameTable.Add(@"CurrentDateTime"); + id120_TypeClashB = Reader.NameTable.Add(@"TypeClashB"); + id61_DCStruct = Reader.NameTable.Add(@"DCStruct"); + id114_MoreChoices = Reader.NameTable.Add(@"MoreChoices"); + id154_ArrayOfBoolean = Reader.NameTable.Add(@"ArrayOfBoolean"); + id7_Item = Reader.NameTable.Add(@"TypeWithDefaultTimeSpanProperty"); + id109_Item = Reader.NameTable.Add(@"KnownTypesThroughConstructorWithArrayProperties"); + id282_DateContent = Reader.NameTable.Add(@"DateContent"); + id13_Group = Reader.NameTable.Add(@"Group"); + id46_XElementWrapper = Reader.NameTable.Add(@"XElementWrapper"); + id270_customElement = Reader.NameTable.Add(@"customElement"); + id112_Item = Reader.NameTable.Add(@"TypeWithArrayPropertyHavingChoice"); + id52_TypeWithGetOnlyArrayProperties = Reader.NameTable.Add(@"TypeWithGetOnlyArrayProperties"); + id207_DoubleProp = Reader.NameTable.Add(@"DoubleProp"); + id3_TypeWithXmlDocumentProperty = Reader.NameTable.Add(@"TypeWithXmlDocumentProperty"); + id35_Trumpet = Reader.NameTable.Add(@"Trumpet"); + id178_ByteProperty = Reader.NameTable.Add(@"ByteProperty"); + id71_Item = Reader.NameTable.Add(@"TypeWithDateTimePropertyAsXmlTime"); + id251_Word = Reader.NameTable.Add(@"Word"); + id93_SimpleKnownTypeValue = Reader.NameTable.Add(@"SimpleKnownTypeValue"); + id252_Number = Reader.NameTable.Add(@"Number"); + id262_StrProperty = Reader.NameTable.Add(@"StrProperty"); + id100_CustomElement = Reader.NameTable.Add(@"CustomElement"); + id197_ShipCost = Reader.NameTable.Add(@"ShipCost"); + id122_Person = Reader.NameTable.Add(@"Person"); + id222_NIntLField = Reader.NameTable.Add(@"NIntLField"); + id278_StringArrayValue = Reader.NameTable.Add(@"StringArrayValue"); + id273_TwoDArrayOfSimpleType = Reader.NameTable.Add(@"TwoDArrayOfSimpleType"); + id169_BinaryHexContent = Reader.NameTable.Add(@"BinaryHexContent"); + id244_Optional = Reader.NameTable.Add(@"Optional"); + id238_DisplayName = Reader.NameTable.Add(@"DisplayName"); + id228_Data = Reader.NameTable.Add(@"Data"); + id287_Base64BinaryContent = Reader.NameTable.Add(@"Base64BinaryContent"); + id103_TypeWithXmlQualifiedName = Reader.NameTable.Add(@"TypeWithXmlQualifiedName"); + id291_IntField2 = Reader.NameTable.Add(@"IntField2"); + id181_LicenseNumber = Reader.NameTable.Add(@"LicenseNumber"); + id229_MyStruct = Reader.NameTable.Add(@"MyStruct"); + id175_NullableDefaultDTO = Reader.NameTable.Add(@"NullableDefaultDTO"); + id28_BaseClass1 = Reader.NameTable.Add(@"BaseClass1"); + id295_httptestcom = Reader.NameTable.Add(@"http://test.com"); + id21_Item = Reader.NameTable.Add(@"http://example.com/serializer-test-namespace"); + id173_DefaultDTO = Reader.NameTable.Add(@"DefaultDTO"); + id266_NoneSchemaFormListProperty = Reader.NameTable.Add(@"NoneSchemaFormListProperty"); + id157_P1 = Reader.NameTable.Add(@"P1"); id47_XElementStruct = Reader.NameTable.Add(@"XElementStruct"); - id205_IntValue = Reader.NameTable.Add(@"IntValue"); - id246_httpelement = Reader.NameTable.Add(@"http://element"); - id76_ClassImplementsInterface = Reader.NameTable.Add(@"ClassImplementsInterface"); - id54_TypeWithMyCollectionField = Reader.NameTable.Add(@"TypeWithMyCollectionField"); - id85_UIntEnum = Reader.NameTable.Add(@"UIntEnum"); - id189_ShipTo = Reader.NameTable.Add(@"ShipTo"); - id127_Value2 = Reader.NameTable.Add(@"Value2"); - id253_Item = Reader.NameTable.Add(@"UnqualifiedSchemaFormListProperty"); - id62_BuiltInTypes = Reader.NameTable.Add(@"BuiltInTypes"); - id260_MetricConfigUrl = Reader.NameTable.Add(@"MetricConfigUrl"); - id115_Root = Reader.NameTable.Add(@"Root"); - id283_httptestcom = Reader.NameTable.Add(@"http://test.com"); - id107_TypeWithShouldSerializeMethod = Reader.NameTable.Add(@"TypeWithShouldSerializeMethod"); - id274_NMTOKENSContent = Reader.NameTable.Add(@"NMTOKENSContent"); - id271_NameContent = Reader.NameTable.Add(@"NameContent"); - id95_TypeWithXmlSchemaFormAttribute = Reader.NameTable.Add(@"TypeWithXmlSchemaFormAttribute"); - id66_Item = Reader.NameTable.Add(@"__TypeNameWithSpecialCharacters漢ñ"); - id136_string = Reader.NameTable.Add(@"string"); - id149_NoneParameter = Reader.NameTable.Add(@"NoneParameter"); - id214_F2 = Reader.NameTable.Add(@"F2"); - id234_OptionalInt = Reader.NameTable.Add(@"OptionalInt"); - id242_XmlIncludeProperty = Reader.NameTable.Add(@"XmlIncludeProperty"); - id73_Item = Reader.NameTable.Add(@"TypeWithXmlTextAttributeOnArray"); - id257_name = Reader.NameTable.Add(@"name"); - id31_dateTime = Reader.NameTable.Add(@"dateTime"); - id270_DateContent = Reader.NameTable.Add(@"DateContent"); - id240_Number = Reader.NameTable.Add(@"Number"); - id254_NoneSchemaFormListProperty = Reader.NameTable.Add(@"NoneSchemaFormListProperty"); - id104_Item = Reader.NameTable.Add(@"TypeWithPropertiesHavingDefaultValue"); - id41_TypeWithLinkedProperty = Reader.NameTable.Add(@"TypeWithLinkedProperty"); - id5_Item = Reader.NameTable.Add(@"TypeWithDateTimeOffsetProperties"); - id179_GroupVehicle = Reader.NameTable.Add(@"GroupVehicle"); - id27_AliasedTestType = Reader.NameTable.Add(@"AliasedTestType"); - id215_Collection = Reader.NameTable.Add(@"Collection"); - id168_DTO2 = Reader.NameTable.Add(@"DTO2"); - id210_xelements = Reader.NameTable.Add(@"xelements"); - id222_IntProperty = Reader.NameTable.Add(@"IntProperty"); - id180_EmployeeName = Reader.NameTable.Add(@"EmployeeName"); - id22_DerivedIXmlSerializable = Reader.NameTable.Add(@"DerivedIXmlSerializable"); - id277_Item = Reader.NameTable.Add(@"Item"); - id232_Optional = Reader.NameTable.Add(@"Optional"); - id276_HexBinaryContent = Reader.NameTable.Add(@"HexBinaryContent"); - id152_ArrayOfArrayOfSimpleType = Reader.NameTable.Add(@"ArrayOfArrayOfSimpleType"); - id144_ArrayOfSimpleType = Reader.NameTable.Add(@"ArrayOfSimpleType"); - id93_Item = Reader.NameTable.Add(@"ClassImplementingIXmlSerializable"); - id230_Int = Reader.NameTable.Add(@"Int"); - id97_Item = Reader.NameTable.Add(@"TypeWithSchemaFormInXmlAttribute"); - id211_DateTimeString = Reader.NameTable.Add(@"DateTimeString"); - id280_IntField2 = Reader.NameTable.Add(@"IntField2"); - id147_httpmynamespace = Reader.NameTable.Add(@"http://mynamespace"); + id139_ArrayOfString = Reader.NameTable.Add(@"ArrayOfString"); + id212_Parameters = Reader.NameTable.Add(@"Parameters"); + id87_LongEnum = Reader.NameTable.Add(@"LongEnum"); + id155_QualifiedParameter = Reader.NameTable.Add(@"QualifiedParameter"); + id121_TypeClashA = Reader.NameTable.Add(@"TypeClashA"); + id187_DateTimeValue = Reader.NameTable.Add(@"DateTimeValue"); + id95_TypeWithPropertyNameSpecified = Reader.NameTable.Add(@"TypeWithPropertyNameSpecified"); + id166_UnitPrice = Reader.NameTable.Add(@"UnitPrice"); + id110_Item = Reader.NameTable.Add(@"KnownTypesThroughConstructorWithValue"); + id236_ListProperty = Reader.NameTable.Add(@"ListProperty"); id11_Dog = Reader.NameTable.Add(@"Dog"); - id52_TypeWithGetOnlyArrayProperties = Reader.NameTable.Add(@"TypeWithGetOnlyArrayProperties"); - id61_DCClassWithEnumAndStruct = Reader.NameTable.Add(@"DCClassWithEnumAndStruct"); - id175_Age = Reader.NameTable.Add(@"Age"); - id114_Item = Reader.NameTable.Add(@"TypeWithKnownTypesOfCollectionsWithConflictingXmlName"); - id71_TypeWithByteArrayAsXmlText = Reader.NameTable.Add(@"TypeWithByteArrayAsXmlText"); - id4_TypeWithBinaryProperty = Reader.NameTable.Add(@"TypeWithBinaryProperty"); - id118_Person = Reader.NameTable.Add(@"Person"); - id261_TwoDArrayOfSimpleType = Reader.NameTable.Add(@"TwoDArrayOfSimpleType"); + id247_OptionullInt = Reader.NameTable.Add(@"OptionullInt"); + id276_EnumProperty = Reader.NameTable.Add(@"EnumProperty"); + id232_Item = Reader.NameTable.Add(@"PropertyNameWithSpecialCharacters漢ñ"); + id72_TypeWithByteArrayAsXmlText = Reader.NameTable.Add(@"TypeWithByteArrayAsXmlText"); + id65_TypeB = Reader.NameTable.Add(@"TypeB"); + id31_dateTime = Reader.NameTable.Add(@"dateTime"); + id85_IntEnum = Reader.NameTable.Add(@"IntEnum"); + id108_TypeWithShouldSerializeMethod = Reader.NameTable.Add(@"TypeWithShouldSerializeMethod"); + id279_IntArrayValue = Reader.NameTable.Add(@"IntArrayValue"); + id290_Amount = Reader.NameTable.Add(@"Amount"); + id102_ServerSettings = Reader.NameTable.Add(@"ServerSettings"); + id138_int = Reader.NameTable.Add(@"int"); + id176_TimeSpanProperty = Reader.NameTable.Add(@"TimeSpanProperty"); + id165_Description = Reader.NameTable.Add(@"Description"); + id45_Parameter = Reader.NameTable.Add(@"Parameter"); + id226_NIntLProp = Reader.NameTable.Add(@"NIntLProp"); + id42_Document = Reader.NameTable.Add(@"Document"); + id177_TimeSpanProperty2 = Reader.NameTable.Add(@"TimeSpanProperty2"); + id82_ByteEnum = Reader.NameTable.Add(@"ByteEnum"); + id269_name = Reader.NameTable.Add(@"name"); + id225_IntLProp = Reader.NameTable.Add(@"IntLProp"); + id126_Name = Reader.NameTable.Add(@"Name"); + id151_httpmynamespace = Reader.NameTable.Add(@"http://mynamespace"); id32_Orchestra = Reader.NameTable.Add(@"Orchestra"); - id220_Item = Reader.NameTable.Add(@"PropertyNameWithSpecialCharacters漢ñ"); - id216_Data = Reader.NameTable.Add(@"Data"); - id60_DCStruct = Reader.NameTable.Add(@"DCStruct"); - id148_ArrayOfString1 = Reader.NameTable.Add(@"ArrayOfString1"); - id165_BinaryHexContent = Reader.NameTable.Add(@"BinaryHexContent"); - id91_KnownTypesThroughConstructor = Reader.NameTable.Add(@"KnownTypesThroughConstructor"); - id224_ListProperty = Reader.NameTable.Add(@"ListProperty"); - id195_X = Reader.NameTable.Add(@"X"); - id6_TypeWithTimeSpanProperty = Reader.NameTable.Add(@"TypeWithTimeSpanProperty"); - id203_DoubleProp = Reader.NameTable.Add(@"DoubleProp"); - id106_Item = Reader.NameTable.Add(@"TypeWithEnumFlagPropertyHavingDefaultValue"); - id103_TypeWith2DArrayProperty2 = Reader.NameTable.Add(@"TypeWith2DArrayProperty2"); - id156_Child = Reader.NameTable.Add(@"Child"); - id86_LongEnum = Reader.NameTable.Add(@"LongEnum"); - id9_TypeWithXmlNodeArrayProperty = Reader.NameTable.Add(@"TypeWithXmlNodeArrayProperty"); - id25_Address = Reader.NameTable.Add(@"Address"); - id162_UnitPrice = Reader.NameTable.Add(@"UnitPrice"); - id125_B = Reader.NameTable.Add(@"B"); - id68_DerivedClassWithSameProperty = Reader.NameTable.Add(@"DerivedClassWithSameProperty"); + id180_Breed = Reader.NameTable.Add(@"Breed"); + id224_NIntAProp = Reader.NameTable.Add(@"NIntAProp"); + id235_DateTimeProperty = Reader.NameTable.Add(@"DateTimeProperty"); + id113_Item = Reader.NameTable.Add(@"TypeWithPropertyHavingComplexChoice"); id51_TypeWithGetSetArrayMembers = Reader.NameTable.Add(@"TypeWithGetSetArrayMembers"); - id236_Struct1 = Reader.NameTable.Add(@"Struct1"); - id150_ArrayOfBoolean = Reader.NameTable.Add(@"ArrayOfBoolean"); - id177_LicenseNumber = Reader.NameTable.Add(@"LicenseNumber"); - id72_SimpleDC = Reader.NameTable.Add(@"SimpleDC"); - id94_TypeWithPropertyNameSpecified = Reader.NameTable.Add(@"TypeWithPropertyNameSpecified"); - id96_MyXmlType = Reader.NameTable.Add(@"MyXmlType"); - id101_ServerSettings = Reader.NameTable.Add(@"ServerSettings"); - id226_DisplayName = Reader.NameTable.Add(@"DisplayName"); - id19_SimpleDerivedClass = Reader.NameTable.Add(@"SimpleDerivedClass"); - id153_P1 = Reader.NameTable.Add(@"P1"); - id183_DateTimeValue = Reader.NameTable.Add(@"DateTimeValue"); - id154_P2 = Reader.NameTable.Add(@"P2"); - id2_Item = Reader.NameTable.Add(@""); - id269_QNameContent = Reader.NameTable.Add(@"QNameContent"); + id174_NullableDTO = Reader.NameTable.Add(@"NullableDTO"); + id142_double = Reader.NameTable.Add(@"double"); + id129_B = Reader.NameTable.Add(@"B"); + id37_DefaultValuesSetToNaN = Reader.NameTable.Add(@"DefaultValuesSetToNaN"); + id162_IsValved = Reader.NameTable.Add(@"IsValved"); + id250_XmlAttributeName = Reader.NameTable.Add(@"XmlAttributeName"); + id27_AliasedTestType = Reader.NameTable.Add(@"AliasedTestType"); + id285_NMTOKENContent = Reader.NameTable.Add(@"NMTOKENContent"); + id144_ArrayOfTypeWithLinkedProperty = Reader.NameTable.Add(@"ArrayOfTypeWithLinkedProperty"); + id57_ArrayOfAnyType = Reader.NameTable.Add(@"ArrayOfAnyType"); id1_TypeWithXmlElementProperty = Reader.NameTable.Add(@"TypeWithXmlElementProperty"); - id3_TypeWithXmlDocumentProperty = Reader.NameTable.Add(@"TypeWithXmlDocumentProperty"); - id263_CharProperty = Reader.NameTable.Add(@"CharProperty"); - id178_GroupName = Reader.NameTable.Add(@"GroupName"); - id134_int = Reader.NameTable.Add(@"int"); - id186_City = Reader.NameTable.Add(@"City"); - id69_DerivedClassWithSameProperty2 = Reader.NameTable.Add(@"DerivedClassWithSameProperty2"); - id75_EnumFlags = Reader.NameTable.Add(@"EnumFlags"); - id235_OptionullInt = Reader.NameTable.Add(@"OptionullInt"); - id158_IsValved = Reader.NameTable.Add(@"IsValved"); - id157_Children = Reader.NameTable.Add(@"Children"); - id92_SimpleKnownTypeValue = Reader.NameTable.Add(@"SimpleKnownTypeValue"); - id262_EmptyStringProperty = Reader.NameTable.Add(@"EmptyStringProperty"); - id194_TotalCost = Reader.NameTable.Add(@"TotalCost"); - id171_NullableDefaultDTO = Reader.NameTable.Add(@"NullableDefaultDTO"); - id100_Item = Reader.NameTable.Add(@"TypeWithNonPublicDefaultConstructor"); - id132_ArrayOfOrderedItem = Reader.NameTable.Add(@"ArrayOfOrderedItem"); - id143_XElement = Reader.NameTable.Add(@"XElement"); - id15_Employee = Reader.NameTable.Add(@"Employee"); - id187_State = Reader.NameTable.Add(@"State"); - id173_TimeSpanProperty2 = Reader.NameTable.Add(@"TimeSpanProperty2"); - id188_Zip = Reader.NameTable.Add(@"Zip"); - id122_Name = Reader.NameTable.Add(@"Name"); - id241_DecimalNumber = Reader.NameTable.Add(@"DecimalNumber"); - id221_StringProperty = Reader.NameTable.Add(@"StringProperty"); - id204_FloatProp = Reader.NameTable.Add(@"FloatProp"); - id218_MyEnum1 = Reader.NameTable.Add(@"MyEnum1"); + id186_AttributeString = Reader.NameTable.Add(@"AttributeString"); + id123_FirstName = Reader.NameTable.Add(@"FirstName"); + id243_Short = Reader.NameTable.Add(@"Short"); + id4_TypeWithBinaryProperty = Reader.NameTable.Add(@"TypeWithBinaryProperty"); + id221_IntLField = Reader.NameTable.Add(@"IntLField"); + id63_BuiltInTypes = Reader.NameTable.Add(@"BuiltInTypes"); + id64_TypeA = Reader.NameTable.Add(@"TypeA"); + id258_httpelement = Reader.NameTable.Add(@"http://element"); + id134_MsgDocumentType = Reader.NameTable.Add(@"MsgDocumentType"); + id190_City = Reader.NameTable.Add(@"City"); + id189_Line1 = Reader.NameTable.Add(@"Line1"); + id119_Root = Reader.NameTable.Add(@"Root"); + id231_ByteArray = Reader.NameTable.Add(@"ByteArray"); + id143_ArrayOfInstrument = Reader.NameTable.Add(@"ArrayOfInstrument"); id30_ArrayOfDateTime = Reader.NameTable.Add(@"ArrayOfDateTime"); - id65_TypeHasArrayOfASerializedAsB = Reader.NameTable.Add(@"TypeHasArrayOfASerializedAsB"); - id87_ULongEnum = Reader.NameTable.Add(@"ULongEnum"); - id84_IntEnum = Reader.NameTable.Add(@"IntEnum"); - id248_EnumValue = Reader.NameTable.Add(@"EnumValue"); - id50_SimpleType = Reader.NameTable.Add(@"SimpleType"); - id206_id = Reader.NameTable.Add(@"id"); - id247_CustomXmlArrayProperty = Reader.NameTable.Add(@"CustomXmlArrayProperty"); - id38_Item = Reader.NameTable.Add(@"DefaultValuesSetToPositiveInfinity"); - id36_Pet = Reader.NameTable.Add(@"Pet"); - id208_Parameters = Reader.NameTable.Add(@"Parameters"); - id67_BaseClassWithSamePropertyName = Reader.NameTable.Add(@"BaseClassWithSamePropertyName"); - id116_TypeClashB = Reader.NameTable.Add(@"TypeClashB"); - id21_Item = Reader.NameTable.Add(@"http://example.com/serializer-test-namespace"); - id282_TestProperty = Reader.NameTable.Add(@"TestProperty"); - id129_ParameterOfString = Reader.NameTable.Add(@"ParameterOfString"); - id14_Vehicle = Reader.NameTable.Add(@"Vehicle"); - id130_MsgDocumentType = Reader.NameTable.Add(@"MsgDocumentType"); - id10_Animal = Reader.NameTable.Add(@"Animal"); - id29_DerivedClass1 = Reader.NameTable.Add(@"DerivedClass1"); - id135_ArrayOfString = Reader.NameTable.Add(@"ArrayOfString"); - id170_NullableDTO = Reader.NameTable.Add(@"NullableDTO"); - id244_Item = Reader.NameTable.Add(@"XmlNamespaceDeclarationsProperty"); - id70_Item = Reader.NameTable.Add(@"TypeWithDateTimePropertyAsXmlTime"); - id37_DefaultValuesSetToNaN = Reader.NameTable.Add(@"DefaultValuesSetToNaN"); - id40_RootElement = Reader.NameTable.Add(@"RootElement"); - id227_Id = Reader.NameTable.Add(@"Id"); - id137_ArrayOfDouble = Reader.NameTable.Add(@"ArrayOfDouble"); - id167_DTO = Reader.NameTable.Add(@"DTO"); - id164_LineTotal = Reader.NameTable.Add(@"LineTotal"); + id137_ArrayOfInt = Reader.NameTable.Add(@"ArrayOfInt"); + id25_Address = Reader.NameTable.Add(@"Address"); + id53_TypeWithArraylikeMembers = Reader.NameTable.Add(@"TypeWithArraylikeMembers"); + id98_Item = Reader.NameTable.Add(@"TypeWithSchemaFormInXmlAttribute"); + id227_Collection = Reader.NameTable.Add(@"Collection"); + id218_F2 = Reader.NameTable.Add(@"F2"); + id78_WithStruct = Reader.NameTable.Add(@"WithStruct"); + id104_TypeWith2DArrayProperty2 = Reader.NameTable.Add(@"TypeWith2DArrayProperty2"); + id170_Base64Content = Reader.NameTable.Add(@"Base64Content"); + id147_XElement = Reader.NameTable.Add(@"XElement"); + id260_EnumValue = Reader.NameTable.Add(@"EnumValue"); + id223_IntAProp = Reader.NameTable.Add(@"IntAProp"); + id15_Employee = Reader.NameTable.Add(@"Employee"); + id105_Item = Reader.NameTable.Add(@"TypeWithPropertiesHavingDefaultValue"); + id152_ArrayOfString1 = Reader.NameTable.Add(@"ArrayOfString1"); + id128_A = Reader.NameTable.Add(@"A"); + id284_NCNameContent = Reader.NameTable.Add(@"NCNameContent"); + id219_IntAField = Reader.NameTable.Add(@"IntAField"); + id210_id = Reader.NameTable.Add(@"id"); + id34_Brass = Reader.NameTable.Add(@"Brass"); + id158_P2 = Reader.NameTable.Add(@"P2"); + id294_TestProperty = Reader.NameTable.Add(@"TestProperty"); + id67_Item = Reader.NameTable.Add(@"__TypeNameWithSpecialCharacters漢ñ"); + id111_Item = Reader.NameTable.Add(@"TypeWithTypesHavingCustomFormatter"); + id293_strfld = Reader.NameTable.Add(@"strfld"); + id130_Value1 = Reader.NameTable.Add(@"Value1"); + id66_TypeHasArrayOfASerializedAsB = Reader.NameTable.Add(@"TypeHasArrayOfASerializedAsB"); + id217_F1 = Reader.NameTable.Add(@"F1"); + id16_BaseClass = Reader.NameTable.Add(@"BaseClass"); + id230_MyEnum1 = Reader.NameTable.Add(@"MyEnum1"); + id12_DogBreed = Reader.NameTable.Add(@"DogBreed"); + id168_LineTotal = Reader.NameTable.Add(@"LineTotal"); + id194_OrderDate = Reader.NameTable.Add(@"OrderDate"); + id277_Foo = Reader.NameTable.Add(@"Foo"); + id239_Id = Reader.NameTable.Add(@"Id"); + id6_TypeWithTimeSpanProperty = Reader.NameTable.Add(@"TypeWithTimeSpanProperty"); + id140_string = Reader.NameTable.Add(@"string"); + id206_SingleField = Reader.NameTable.Add(@"SingleField"); + id201_Z = Reader.NameTable.Add(@"Z"); + id26_OrderedItem = Reader.NameTable.Add(@"OrderedItem"); + id198_TotalCost = Reader.NameTable.Add(@"TotalCost"); + id240_IsLoaded = Reader.NameTable.Add(@"IsLoaded"); + id94_Item = Reader.NameTable.Add(@"ClassImplementingIXmlSerializable"); + id89_AttributeTesting = Reader.NameTable.Add(@"AttributeTesting"); + id68_BaseClassWithSamePropertyName = Reader.NameTable.Add(@"BaseClassWithSamePropertyName"); + id2_Item = Reader.NameTable.Add(@""); + id289_Item = Reader.NameTable.Add(@"Item"); + id191_State = Reader.NameTable.Add(@"State"); + id237_ClassID = Reader.NameTable.Add(@"ClassID"); + id267_Item = Reader.NameTable.Add(@"QualifiedSchemaFormListProperty"); + id172_DTO2 = Reader.NameTable.Add(@"DTO2"); + id101_Item = Reader.NameTable.Add(@"TypeWithNonPublicDefaultConstructor"); + id8_TypeWithByteProperty = Reader.NameTable.Add(@"TypeWithByteProperty"); + id156_ArrayOfArrayOfSimpleType = Reader.NameTable.Add(@"ArrayOfArrayOfSimpleType"); + id256_Item = Reader.NameTable.Add(@"XmlNamespaceDeclarationsProperty"); + id242_Int = Reader.NameTable.Add(@"Int"); + id43_httpexamplecom = Reader.NameTable.Add(@"http://example.com"); + id213_xelement = Reader.NameTable.Add(@"xelement"); + id80_WithEnums = Reader.NameTable.Add(@"WithEnums"); + id127_ContainerType = Reader.NameTable.Add(@"ContainerType"); + id283_NameContent = Reader.NameTable.Add(@"NameContent"); + id253_DecimalNumber = Reader.NameTable.Add(@"DecimalNumber"); } } @@ -14575,11 +15413,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write111_TypeWithXmlElementProperty(objectToSerialize); + ((XmlSerializationWriter1)writer).Write115_TypeWithXmlElementProperty(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read115_TypeWithXmlElementProperty(); + return ((XmlSerializationReader1)reader).Read119_TypeWithXmlElementProperty(); } } @@ -14590,11 +15428,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write112_TypeWithXmlDocumentProperty(objectToSerialize); + ((XmlSerializationWriter1)writer).Write116_TypeWithXmlDocumentProperty(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read116_TypeWithXmlDocumentProperty(); + return ((XmlSerializationReader1)reader).Read120_TypeWithXmlDocumentProperty(); } } @@ -14605,11 +15443,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write113_TypeWithBinaryProperty(objectToSerialize); + ((XmlSerializationWriter1)writer).Write117_TypeWithBinaryProperty(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read117_TypeWithBinaryProperty(); + return ((XmlSerializationReader1)reader).Read121_TypeWithBinaryProperty(); } } @@ -14620,11 +15458,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write114_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write118_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read118_Item(); + return ((XmlSerializationReader1)reader).Read122_Item(); } } @@ -14635,11 +15473,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write115_TypeWithTimeSpanProperty(objectToSerialize); + ((XmlSerializationWriter1)writer).Write119_TypeWithTimeSpanProperty(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read119_TypeWithTimeSpanProperty(); + return ((XmlSerializationReader1)reader).Read123_TypeWithTimeSpanProperty(); } } @@ -14650,11 +15488,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write116_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write120_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read120_Item(); + return ((XmlSerializationReader1)reader).Read124_Item(); } } @@ -14665,11 +15503,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write117_TypeWithByteProperty(objectToSerialize); + ((XmlSerializationWriter1)writer).Write121_TypeWithByteProperty(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read121_TypeWithByteProperty(); + return ((XmlSerializationReader1)reader).Read125_TypeWithByteProperty(); } } @@ -14680,11 +15518,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write118_TypeWithXmlNodeArrayProperty(objectToSerialize); + ((XmlSerializationWriter1)writer).Write122_TypeWithXmlNodeArrayProperty(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read122_TypeWithXmlNodeArrayProperty(); + return ((XmlSerializationReader1)reader).Read126_TypeWithXmlNodeArrayProperty(); } } @@ -14695,11 +15533,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write119_Animal(objectToSerialize); + ((XmlSerializationWriter1)writer).Write123_Animal(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read123_Animal(); + return ((XmlSerializationReader1)reader).Read127_Animal(); } } @@ -14710,11 +15548,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write120_Dog(objectToSerialize); + ((XmlSerializationWriter1)writer).Write124_Dog(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read124_Dog(); + return ((XmlSerializationReader1)reader).Read128_Dog(); } } @@ -14725,11 +15563,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write121_DogBreed(objectToSerialize); + ((XmlSerializationWriter1)writer).Write125_DogBreed(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read125_DogBreed(); + return ((XmlSerializationReader1)reader).Read129_DogBreed(); } } @@ -14740,11 +15578,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write122_Group(objectToSerialize); + ((XmlSerializationWriter1)writer).Write126_Group(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read126_Group(); + return ((XmlSerializationReader1)reader).Read130_Group(); } } @@ -14755,11 +15593,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write123_Vehicle(objectToSerialize); + ((XmlSerializationWriter1)writer).Write127_Vehicle(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read127_Vehicle(); + return ((XmlSerializationReader1)reader).Read131_Vehicle(); } } @@ -14770,11 +15608,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write124_Employee(objectToSerialize); + ((XmlSerializationWriter1)writer).Write128_Employee(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read128_Employee(); + return ((XmlSerializationReader1)reader).Read132_Employee(); } } @@ -14785,11 +15623,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write125_BaseClass(objectToSerialize); + ((XmlSerializationWriter1)writer).Write129_BaseClass(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read129_BaseClass(); + return ((XmlSerializationReader1)reader).Read133_BaseClass(); } } @@ -14800,11 +15638,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write126_DerivedClass(objectToSerialize); + ((XmlSerializationWriter1)writer).Write130_DerivedClass(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read130_DerivedClass(); + return ((XmlSerializationReader1)reader).Read134_DerivedClass(); } } @@ -14815,11 +15653,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write127_SimpleBaseClass(objectToSerialize); + ((XmlSerializationWriter1)writer).Write131_SimpleBaseClass(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read131_SimpleBaseClass(); + return ((XmlSerializationReader1)reader).Read135_SimpleBaseClass(); } } @@ -14830,11 +15668,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write128_SimpleDerivedClass(objectToSerialize); + ((XmlSerializationWriter1)writer).Write132_SimpleDerivedClass(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read132_SimpleDerivedClass(); + return ((XmlSerializationReader1)reader).Read136_SimpleDerivedClass(); } } @@ -14845,11 +15683,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write129_BaseIXmlSerializable(objectToSerialize); + ((XmlSerializationWriter1)writer).Write133_BaseIXmlSerializable(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read133_BaseIXmlSerializable(); + return ((XmlSerializationReader1)reader).Read137_BaseIXmlSerializable(); } } @@ -14860,11 +15698,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write130_DerivedIXmlSerializable(objectToSerialize); + ((XmlSerializationWriter1)writer).Write134_DerivedIXmlSerializable(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read134_DerivedIXmlSerializable(); + return ((XmlSerializationReader1)reader).Read138_DerivedIXmlSerializable(); } } @@ -14875,11 +15713,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write131_PurchaseOrder(objectToSerialize); + ((XmlSerializationWriter1)writer).Write135_PurchaseOrder(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read135_PurchaseOrder(); + return ((XmlSerializationReader1)reader).Read139_PurchaseOrder(); } } @@ -14890,11 +15728,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write132_Address(objectToSerialize); + ((XmlSerializationWriter1)writer).Write136_Address(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read136_Address(); + return ((XmlSerializationReader1)reader).Read140_Address(); } } @@ -14905,11 +15743,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write133_OrderedItem(objectToSerialize); + ((XmlSerializationWriter1)writer).Write137_OrderedItem(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read137_OrderedItem(); + return ((XmlSerializationReader1)reader).Read141_OrderedItem(); } } @@ -14920,11 +15758,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write134_AliasedTestType(objectToSerialize); + ((XmlSerializationWriter1)writer).Write138_AliasedTestType(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read138_AliasedTestType(); + return ((XmlSerializationReader1)reader).Read142_AliasedTestType(); } } @@ -14935,11 +15773,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write135_BaseClass1(objectToSerialize); + ((XmlSerializationWriter1)writer).Write139_BaseClass1(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read139_BaseClass1(); + return ((XmlSerializationReader1)reader).Read143_BaseClass1(); } } @@ -14950,11 +15788,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write136_DerivedClass1(objectToSerialize); + ((XmlSerializationWriter1)writer).Write140_DerivedClass1(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read140_DerivedClass1(); + return ((XmlSerializationReader1)reader).Read144_DerivedClass1(); } } @@ -14965,11 +15803,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write137_ArrayOfDateTime(objectToSerialize); + ((XmlSerializationWriter1)writer).Write141_ArrayOfDateTime(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read141_ArrayOfDateTime(); + return ((XmlSerializationReader1)reader).Read145_ArrayOfDateTime(); } } @@ -14980,11 +15818,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write138_Orchestra(objectToSerialize); + ((XmlSerializationWriter1)writer).Write142_Orchestra(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read142_Orchestra(); + return ((XmlSerializationReader1)reader).Read146_Orchestra(); } } @@ -14995,11 +15833,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write139_Instrument(objectToSerialize); + ((XmlSerializationWriter1)writer).Write143_Instrument(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read143_Instrument(); + return ((XmlSerializationReader1)reader).Read147_Instrument(); } } @@ -15010,11 +15848,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write140_Brass(objectToSerialize); + ((XmlSerializationWriter1)writer).Write144_Brass(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read144_Brass(); + return ((XmlSerializationReader1)reader).Read148_Brass(); } } @@ -15025,11 +15863,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write141_Trumpet(objectToSerialize); + ((XmlSerializationWriter1)writer).Write145_Trumpet(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read145_Trumpet(); + return ((XmlSerializationReader1)reader).Read149_Trumpet(); } } @@ -15040,11 +15878,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write142_Pet(objectToSerialize); + ((XmlSerializationWriter1)writer).Write146_Pet(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read146_Pet(); + return ((XmlSerializationReader1)reader).Read150_Pet(); } } @@ -15055,11 +15893,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write143_DefaultValuesSetToNaN(objectToSerialize); + ((XmlSerializationWriter1)writer).Write147_DefaultValuesSetToNaN(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read147_DefaultValuesSetToNaN(); + return ((XmlSerializationReader1)reader).Read151_DefaultValuesSetToNaN(); } } @@ -15070,11 +15908,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write144_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write148_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read148_Item(); + return ((XmlSerializationReader1)reader).Read152_Item(); } } @@ -15085,11 +15923,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write145_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write149_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read149_Item(); + return ((XmlSerializationReader1)reader).Read153_Item(); } } @@ -15100,11 +15938,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write146_RootElement(objectToSerialize); + ((XmlSerializationWriter1)writer).Write150_RootElement(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read150_RootElement(); + return ((XmlSerializationReader1)reader).Read154_RootElement(); } } @@ -15115,11 +15953,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write147_TypeWithLinkedProperty(objectToSerialize); + ((XmlSerializationWriter1)writer).Write151_TypeWithLinkedProperty(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read151_TypeWithLinkedProperty(); + return ((XmlSerializationReader1)reader).Read155_TypeWithLinkedProperty(); } } @@ -15130,11 +15968,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write148_Document(objectToSerialize); + ((XmlSerializationWriter1)writer).Write152_Document(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read152_Document(); + return ((XmlSerializationReader1)reader).Read156_Document(); } } @@ -15145,11 +15983,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write149_RootClass(objectToSerialize); + ((XmlSerializationWriter1)writer).Write153_RootClass(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read153_RootClass(); + return ((XmlSerializationReader1)reader).Read157_RootClass(); } } @@ -15160,11 +15998,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write150_Parameter(objectToSerialize); + ((XmlSerializationWriter1)writer).Write154_Parameter(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read154_Parameter(); + return ((XmlSerializationReader1)reader).Read158_Parameter(); } } @@ -15175,11 +16013,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write151_XElementWrapper(objectToSerialize); + ((XmlSerializationWriter1)writer).Write155_XElementWrapper(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read155_XElementWrapper(); + return ((XmlSerializationReader1)reader).Read159_XElementWrapper(); } } @@ -15190,11 +16028,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write152_XElementStruct(objectToSerialize); + ((XmlSerializationWriter1)writer).Write156_XElementStruct(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read156_XElementStruct(); + return ((XmlSerializationReader1)reader).Read160_XElementStruct(); } } @@ -15205,11 +16043,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write153_XElementArrayWrapper(objectToSerialize); + ((XmlSerializationWriter1)writer).Write157_XElementArrayWrapper(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read157_XElementArrayWrapper(); + return ((XmlSerializationReader1)reader).Read161_XElementArrayWrapper(); } } @@ -15220,11 +16058,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write154_TypeWithDateTimeStringProperty(objectToSerialize); + ((XmlSerializationWriter1)writer).Write158_TypeWithDateTimeStringProperty(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read158_TypeWithDateTimeStringProperty(); + return ((XmlSerializationReader1)reader).Read162_TypeWithDateTimeStringProperty(); } } @@ -15235,41 +16073,56 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write155_SimpleType(objectToSerialize); + ((XmlSerializationWriter1)writer).Write159_SimpleType(objectToSerialize); + } + + protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { + return ((XmlSerializationReader1)reader).Read163_SimpleType(); + } + } + + public sealed class TypeWithGetSetArrayMembersSerializer : XmlSerializer1 { + + public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { + return xmlReader.IsStartElement(@"TypeWithGetSetArrayMembers", @""); + } + + protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { + ((XmlSerializationWriter1)writer).Write160_TypeWithGetSetArrayMembers(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read159_SimpleType(); + return ((XmlSerializationReader1)reader).Read164_TypeWithGetSetArrayMembers(); } } - public sealed class TypeWithGetSetArrayMembersSerializer : XmlSerializer1 { + public sealed class TypeWithGetOnlyArrayPropertiesSerializer : XmlSerializer1 { public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { - return xmlReader.IsStartElement(@"TypeWithGetSetArrayMembers", @""); + return xmlReader.IsStartElement(@"TypeWithGetOnlyArrayProperties", @""); } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write156_TypeWithGetSetArrayMembers(objectToSerialize); + ((XmlSerializationWriter1)writer).Write161_TypeWithGetOnlyArrayProperties(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read160_TypeWithGetSetArrayMembers(); + return ((XmlSerializationReader1)reader).Read165_TypeWithGetOnlyArrayProperties(); } } - public sealed class TypeWithGetOnlyArrayPropertiesSerializer : XmlSerializer1 { + public sealed class TypeWithArraylikeMembersSerializer : XmlSerializer1 { public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { - return xmlReader.IsStartElement(@"TypeWithGetOnlyArrayProperties", @""); + return xmlReader.IsStartElement(@"TypeWithArraylikeMembers", @""); } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write157_TypeWithGetOnlyArrayProperties(objectToSerialize); + ((XmlSerializationWriter1)writer).Write162_TypeWithArraylikeMembers(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read161_TypeWithGetOnlyArrayProperties(); + return ((XmlSerializationReader1)reader).Read166_TypeWithArraylikeMembers(); } } @@ -15280,11 +16133,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write158_StructNotSerializable(objectToSerialize); + ((XmlSerializationWriter1)writer).Write163_StructNotSerializable(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read162_StructNotSerializable(); + return ((XmlSerializationReader1)reader).Read167_StructNotSerializable(); } } @@ -15295,11 +16148,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write159_TypeWithMyCollectionField(objectToSerialize); + ((XmlSerializationWriter1)writer).Write164_TypeWithMyCollectionField(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read163_TypeWithMyCollectionField(); + return ((XmlSerializationReader1)reader).Read168_TypeWithMyCollectionField(); } } @@ -15310,11 +16163,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write160_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write165_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read164_Item(); + return ((XmlSerializationReader1)reader).Read169_Item(); } } @@ -15325,11 +16178,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write161_ArrayOfAnyType(objectToSerialize); + ((XmlSerializationWriter1)writer).Write166_ArrayOfAnyType(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read165_ArrayOfAnyType(); + return ((XmlSerializationReader1)reader).Read170_ArrayOfAnyType(); } } @@ -15340,11 +16193,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write162_MyEnum(objectToSerialize); + ((XmlSerializationWriter1)writer).Write167_MyEnum(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read166_MyEnum(); + return ((XmlSerializationReader1)reader).Read171_MyEnum(); } } @@ -15355,11 +16208,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write163_TypeWithEnumMembers(objectToSerialize); + ((XmlSerializationWriter1)writer).Write168_TypeWithEnumMembers(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read167_TypeWithEnumMembers(); + return ((XmlSerializationReader1)reader).Read172_TypeWithEnumMembers(); } } @@ -15370,11 +16223,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write164_DCStruct(objectToSerialize); + ((XmlSerializationWriter1)writer).Write169_DCStruct(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read168_DCStruct(); + return ((XmlSerializationReader1)reader).Read173_DCStruct(); } } @@ -15385,11 +16238,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write165_DCClassWithEnumAndStruct(objectToSerialize); + ((XmlSerializationWriter1)writer).Write170_DCClassWithEnumAndStruct(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read169_DCClassWithEnumAndStruct(); + return ((XmlSerializationReader1)reader).Read174_DCClassWithEnumAndStruct(); } } @@ -15400,11 +16253,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write166_BuiltInTypes(objectToSerialize); + ((XmlSerializationWriter1)writer).Write171_BuiltInTypes(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read170_BuiltInTypes(); + return ((XmlSerializationReader1)reader).Read175_BuiltInTypes(); } } @@ -15415,11 +16268,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write167_TypeA(objectToSerialize); + ((XmlSerializationWriter1)writer).Write172_TypeA(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read171_TypeA(); + return ((XmlSerializationReader1)reader).Read176_TypeA(); } } @@ -15430,11 +16283,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write168_TypeB(objectToSerialize); + ((XmlSerializationWriter1)writer).Write173_TypeB(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read172_TypeB(); + return ((XmlSerializationReader1)reader).Read177_TypeB(); } } @@ -15445,11 +16298,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write169_TypeHasArrayOfASerializedAsB(objectToSerialize); + ((XmlSerializationWriter1)writer).Write174_TypeHasArrayOfASerializedAsB(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read173_TypeHasArrayOfASerializedAsB(); + return ((XmlSerializationReader1)reader).Read178_TypeHasArrayOfASerializedAsB(); } } @@ -15460,11 +16313,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write170_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write175_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read174_Item(); + return ((XmlSerializationReader1)reader).Read179_Item(); } } @@ -15475,11 +16328,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write171_BaseClassWithSamePropertyName(objectToSerialize); + ((XmlSerializationWriter1)writer).Write176_BaseClassWithSamePropertyName(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read175_BaseClassWithSamePropertyName(); + return ((XmlSerializationReader1)reader).Read180_BaseClassWithSamePropertyName(); } } @@ -15490,11 +16343,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write172_DerivedClassWithSameProperty(objectToSerialize); + ((XmlSerializationWriter1)writer).Write177_DerivedClassWithSameProperty(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read176_DerivedClassWithSameProperty(); + return ((XmlSerializationReader1)reader).Read181_DerivedClassWithSameProperty(); } } @@ -15505,11 +16358,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write173_DerivedClassWithSameProperty2(objectToSerialize); + ((XmlSerializationWriter1)writer).Write178_DerivedClassWithSameProperty2(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read177_DerivedClassWithSameProperty2(); + return ((XmlSerializationReader1)reader).Read182_DerivedClassWithSameProperty2(); } } @@ -15520,11 +16373,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write174_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write179_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read178_Item(); + return ((XmlSerializationReader1)reader).Read183_Item(); } } @@ -15535,11 +16388,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write175_TypeWithByteArrayAsXmlText(objectToSerialize); + ((XmlSerializationWriter1)writer).Write180_TypeWithByteArrayAsXmlText(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read179_TypeWithByteArrayAsXmlText(); + return ((XmlSerializationReader1)reader).Read184_TypeWithByteArrayAsXmlText(); } } @@ -15550,11 +16403,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write176_SimpleDC(objectToSerialize); + ((XmlSerializationWriter1)writer).Write181_SimpleDC(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read180_SimpleDC(); + return ((XmlSerializationReader1)reader).Read185_SimpleDC(); } } @@ -15565,11 +16418,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write177_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write182_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read181_Item(); + return ((XmlSerializationReader1)reader).Read186_Item(); } } @@ -15580,11 +16433,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write178_EnumFlags(objectToSerialize); + ((XmlSerializationWriter1)writer).Write183_EnumFlags(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read182_EnumFlags(); + return ((XmlSerializationReader1)reader).Read187_EnumFlags(); } } @@ -15595,11 +16448,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write179_ClassImplementsInterface(objectToSerialize); + ((XmlSerializationWriter1)writer).Write184_ClassImplementsInterface(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read183_ClassImplementsInterface(); + return ((XmlSerializationReader1)reader).Read188_ClassImplementsInterface(); } } @@ -15610,11 +16463,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write180_WithStruct(objectToSerialize); + ((XmlSerializationWriter1)writer).Write185_WithStruct(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read184_WithStruct(); + return ((XmlSerializationReader1)reader).Read189_WithStruct(); } } @@ -15625,11 +16478,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write181_SomeStruct(objectToSerialize); + ((XmlSerializationWriter1)writer).Write186_SomeStruct(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read185_SomeStruct(); + return ((XmlSerializationReader1)reader).Read190_SomeStruct(); } } @@ -15640,11 +16493,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write182_WithEnums(objectToSerialize); + ((XmlSerializationWriter1)writer).Write187_WithEnums(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read186_WithEnums(); + return ((XmlSerializationReader1)reader).Read191_WithEnums(); } } @@ -15655,11 +16508,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write183_WithNullables(objectToSerialize); + ((XmlSerializationWriter1)writer).Write188_WithNullables(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read187_WithNullables(); + return ((XmlSerializationReader1)reader).Read192_WithNullables(); } } @@ -15670,11 +16523,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write184_ByteEnum(objectToSerialize); + ((XmlSerializationWriter1)writer).Write189_ByteEnum(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read188_ByteEnum(); + return ((XmlSerializationReader1)reader).Read193_ByteEnum(); } } @@ -15685,11 +16538,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write185_SByteEnum(objectToSerialize); + ((XmlSerializationWriter1)writer).Write190_SByteEnum(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read189_SByteEnum(); + return ((XmlSerializationReader1)reader).Read194_SByteEnum(); } } @@ -15700,11 +16553,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write186_ShortEnum(objectToSerialize); + ((XmlSerializationWriter1)writer).Write191_ShortEnum(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read190_ShortEnum(); + return ((XmlSerializationReader1)reader).Read195_ShortEnum(); } } @@ -15715,11 +16568,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write187_IntEnum(objectToSerialize); + ((XmlSerializationWriter1)writer).Write192_IntEnum(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read191_IntEnum(); + return ((XmlSerializationReader1)reader).Read196_IntEnum(); } } @@ -15730,11 +16583,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write188_UIntEnum(objectToSerialize); + ((XmlSerializationWriter1)writer).Write193_UIntEnum(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read192_UIntEnum(); + return ((XmlSerializationReader1)reader).Read197_UIntEnum(); } } @@ -15745,11 +16598,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write189_LongEnum(objectToSerialize); + ((XmlSerializationWriter1)writer).Write194_LongEnum(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read193_LongEnum(); + return ((XmlSerializationReader1)reader).Read198_LongEnum(); } } @@ -15760,11 +16613,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write190_ULongEnum(objectToSerialize); + ((XmlSerializationWriter1)writer).Write195_ULongEnum(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read194_ULongEnum(); + return ((XmlSerializationReader1)reader).Read199_ULongEnum(); } } @@ -15775,11 +16628,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write191_AttributeTesting(objectToSerialize); + ((XmlSerializationWriter1)writer).Write196_AttributeTesting(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read195_AttributeTesting(); + return ((XmlSerializationReader1)reader).Read200_AttributeTesting(); } } @@ -15790,11 +16643,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write192_ItemChoiceType(objectToSerialize); + ((XmlSerializationWriter1)writer).Write197_ItemChoiceType(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read196_ItemChoiceType(); + return ((XmlSerializationReader1)reader).Read201_ItemChoiceType(); } } @@ -15805,11 +16658,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write193_TypeWithAnyAttribute(objectToSerialize); + ((XmlSerializationWriter1)writer).Write198_TypeWithAnyAttribute(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read197_TypeWithAnyAttribute(); + return ((XmlSerializationReader1)reader).Read202_TypeWithAnyAttribute(); } } @@ -15820,11 +16673,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write194_KnownTypesThroughConstructor(objectToSerialize); + ((XmlSerializationWriter1)writer).Write199_KnownTypesThroughConstructor(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read198_KnownTypesThroughConstructor(); + return ((XmlSerializationReader1)reader).Read203_KnownTypesThroughConstructor(); } } @@ -15835,11 +16688,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write195_SimpleKnownTypeValue(objectToSerialize); + ((XmlSerializationWriter1)writer).Write200_SimpleKnownTypeValue(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read199_SimpleKnownTypeValue(); + return ((XmlSerializationReader1)reader).Read204_SimpleKnownTypeValue(); } } @@ -15850,11 +16703,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write196_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write201_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read200_Item(); + return ((XmlSerializationReader1)reader).Read205_Item(); } } @@ -15865,11 +16718,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write197_TypeWithPropertyNameSpecified(objectToSerialize); + ((XmlSerializationWriter1)writer).Write202_TypeWithPropertyNameSpecified(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read201_TypeWithPropertyNameSpecified(); + return ((XmlSerializationReader1)reader).Read206_TypeWithPropertyNameSpecified(); } } @@ -15880,11 +16733,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write198_TypeWithXmlSchemaFormAttribute(objectToSerialize); + ((XmlSerializationWriter1)writer).Write203_TypeWithXmlSchemaFormAttribute(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read202_TypeWithXmlSchemaFormAttribute(); + return ((XmlSerializationReader1)reader).Read207_TypeWithXmlSchemaFormAttribute(); } } @@ -15895,11 +16748,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write199_MyXmlType(objectToSerialize); + ((XmlSerializationWriter1)writer).Write204_MyXmlType(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read203_MyXmlType(); + return ((XmlSerializationReader1)reader).Read208_MyXmlType(); } } @@ -15910,11 +16763,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write200_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write205_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read204_Item(); + return ((XmlSerializationReader1)reader).Read209_Item(); } } @@ -15925,11 +16778,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write201_CustomDocument(objectToSerialize); + ((XmlSerializationWriter1)writer).Write206_CustomDocument(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read205_CustomDocument(); + return ((XmlSerializationReader1)reader).Read210_CustomDocument(); } } @@ -15940,11 +16793,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write202_CustomElement(objectToSerialize); + ((XmlSerializationWriter1)writer).Write207_CustomElement(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read206_CustomElement(); + return ((XmlSerializationReader1)reader).Read211_CustomElement(); } } @@ -15955,11 +16808,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(); } } @@ -15970,11 +16823,11 @@ 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(); } } @@ -15985,11 +16838,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write205_ServerSettings(objectToSerialize); + ((XmlSerializationWriter1)writer).Write210_ServerSettings(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read209_ServerSettings(); + return ((XmlSerializationReader1)reader).Read214_ServerSettings(); } } @@ -16000,11 +16853,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write206_TypeWithXmlQualifiedName(objectToSerialize); + ((XmlSerializationWriter1)writer).Write211_TypeWithXmlQualifiedName(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read210_TypeWithXmlQualifiedName(); + return ((XmlSerializationReader1)reader).Read215_TypeWithXmlQualifiedName(); } } @@ -16015,11 +16868,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write207_TypeWith2DArrayProperty2(objectToSerialize); + ((XmlSerializationWriter1)writer).Write212_TypeWith2DArrayProperty2(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read211_TypeWith2DArrayProperty2(); + return ((XmlSerializationReader1)reader).Read216_TypeWith2DArrayProperty2(); } } @@ -16030,11 +16883,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write208_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write213_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read212_Item(); + return ((XmlSerializationReader1)reader).Read217_Item(); } } @@ -16045,11 +16898,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write209_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write214_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read213_Item(); + return ((XmlSerializationReader1)reader).Read218_Item(); } } @@ -16060,11 +16913,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write210_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write215_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read214_Item(); + return ((XmlSerializationReader1)reader).Read219_Item(); } } @@ -16075,11 +16928,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write211_TypeWithShouldSerializeMethod(objectToSerialize); + ((XmlSerializationWriter1)writer).Write216_TypeWithShouldSerializeMethod(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read215_TypeWithShouldSerializeMethod(); + return ((XmlSerializationReader1)reader).Read220_TypeWithShouldSerializeMethod(); } } @@ -16090,11 +16943,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write212_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write217_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read216_Item(); + return ((XmlSerializationReader1)reader).Read221_Item(); } } @@ -16105,11 +16958,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write213_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write218_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read217_Item(); + return ((XmlSerializationReader1)reader).Read222_Item(); } } @@ -16120,11 +16973,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write214_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write219_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read218_Item(); + return ((XmlSerializationReader1)reader).Read223_Item(); } } @@ -16135,11 +16988,26 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write215_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write220_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read219_Item(); + return ((XmlSerializationReader1)reader).Read224_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).Write221_Item(objectToSerialize); + } + + protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { + return ((XmlSerializationReader1)reader).Read225_Item(); } } @@ -16150,11 +17018,41 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write216_MoreChoices(objectToSerialize); + ((XmlSerializationWriter1)writer).Write222_MoreChoices(objectToSerialize); + } + + protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { + return ((XmlSerializationReader1)reader).Read226_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).Write223_ComplexChoiceA(objectToSerialize); + } + + protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { + return ((XmlSerializationReader1)reader).Read227_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).Write224_ComplexChoiceB(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read220_MoreChoices(); + return ((XmlSerializationReader1)reader).Read228_ComplexChoiceB(); } } @@ -16165,11 +17063,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write217_TypeWithFieldsOrdered(objectToSerialize); + ((XmlSerializationWriter1)writer).Write225_TypeWithFieldsOrdered(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read221_TypeWithFieldsOrdered(); + return ((XmlSerializationReader1)reader).Read229_TypeWithFieldsOrdered(); } } @@ -16180,11 +17078,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write218_Item(objectToSerialize); + ((XmlSerializationWriter1)writer).Write226_Item(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read222_Item(); + return ((XmlSerializationReader1)reader).Read230_Item(); } } @@ -16195,11 +17093,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write219_Root(objectToSerialize); + ((XmlSerializationWriter1)writer).Write227_Root(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read223_Root(); + return ((XmlSerializationReader1)reader).Read231_Root(); } } @@ -16210,11 +17108,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write220_TypeClashB(objectToSerialize); + ((XmlSerializationWriter1)writer).Write228_TypeClashB(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read224_TypeClashB(); + return ((XmlSerializationReader1)reader).Read232_TypeClashB(); } } @@ -16225,11 +17123,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write221_TypeClashA(objectToSerialize); + ((XmlSerializationWriter1)writer).Write229_TypeClashA(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read225_TypeClashA(); + return ((XmlSerializationReader1)reader).Read233_TypeClashA(); } } @@ -16240,11 +17138,11 @@ public override System.Boolean CanDeserialize(System.Xml.XmlReader xmlReader) { } protected override void Serialize(object objectToSerialize, System.Xml.Serialization.XmlSerializationWriter writer) { - ((XmlSerializationWriter1)writer).Write222_Person(objectToSerialize); + ((XmlSerializationWriter1)writer).Write230_Person(objectToSerialize); } protected override object Deserialize(System.Xml.Serialization.XmlSerializationReader reader) { - return ((XmlSerializationReader1)reader).Read226_Person(); + return ((XmlSerializationReader1)reader).Read234_Person(); } } @@ -16256,118 +17154,122 @@ public override System.Collections.Hashtable ReadMethods { get { if (readMethods == null) { System.Collections.Hashtable _tmp = new System.Collections.Hashtable(); - _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[@"SimpleBaseClass::"] = @"Read131_SimpleBaseClass"; - _tmp[@"SimpleDerivedClass::"] = @"Read132_SimpleDerivedClass"; - _tmp[@"XmlSerializableBaseClass:http://example.com/serializer-test-namespace::True:"] = @"Read133_BaseIXmlSerializable"; - _tmp[@"XmlSerializableDerivedClass::"] = @"Read134_DerivedIXmlSerializable"; - _tmp[@"PurchaseOrder:http://www.contoso1.com:PurchaseOrder:False:"] = @"Read135_PurchaseOrder"; - _tmp[@"Address::"] = @"Read136_Address"; - _tmp[@"OrderedItem::"] = @"Read137_OrderedItem"; - _tmp[@"AliasedTestType::"] = @"Read138_AliasedTestType"; - _tmp[@"BaseClass1::"] = @"Read139_BaseClass1"; - _tmp[@"DerivedClass1::"] = @"Read140_DerivedClass1"; - _tmp[@"MyCollection1::"] = @"Read141_ArrayOfDateTime"; - _tmp[@"Orchestra::"] = @"Read142_Orchestra"; - _tmp[@"Instrument::"] = @"Read143_Instrument"; - _tmp[@"Brass::"] = @"Read144_Brass"; - _tmp[@"Trumpet::"] = @"Read145_Trumpet"; - _tmp[@"Pet::"] = @"Read146_Pet"; - _tmp[@"DefaultValuesSetToNaN::"] = @"Read147_DefaultValuesSetToNaN"; - _tmp[@"DefaultValuesSetToPositiveInfinity::"] = @"Read148_Item"; - _tmp[@"DefaultValuesSetToNegativeInfinity::"] = @"Read149_Item"; - _tmp[@"TypeWithMismatchBetweenAttributeAndPropertyType::RootElement:True:"] = @"Read150_RootElement"; - _tmp[@"TypeWithLinkedProperty::"] = @"Read151_TypeWithLinkedProperty"; - _tmp[@"MsgDocumentType:http://example.com:Document:True:"] = @"Read152_Document"; - _tmp[@"RootClass::"] = @"Read153_RootClass"; - _tmp[@"Parameter::"] = @"Read154_Parameter"; - _tmp[@"XElementWrapper::"] = @"Read155_XElementWrapper"; - _tmp[@"XElementStruct::"] = @"Read156_XElementStruct"; - _tmp[@"XElementArrayWrapper::"] = @"Read157_XElementArrayWrapper"; - _tmp[@"SerializationTypes.TypeWithDateTimeStringProperty::"] = @"Read158_TypeWithDateTimeStringProperty"; - _tmp[@"SerializationTypes.SimpleType::"] = @"Read159_SimpleType"; - _tmp[@"SerializationTypes.TypeWithGetSetArrayMembers::"] = @"Read160_TypeWithGetSetArrayMembers"; - _tmp[@"SerializationTypes.TypeWithGetOnlyArrayProperties::"] = @"Read161_TypeWithGetOnlyArrayProperties"; - _tmp[@"SerializationTypes.StructNotSerializable::"] = @"Read162_StructNotSerializable"; - _tmp[@"SerializationTypes.TypeWithMyCollectionField::"] = @"Read163_TypeWithMyCollectionField"; - _tmp[@"SerializationTypes.TypeWithReadOnlyMyCollectionProperty::"] = @"Read164_Item"; - _tmp[@"SerializationTypes.MyList::"] = @"Read165_ArrayOfAnyType"; - _tmp[@"SerializationTypes.MyEnum::"] = @"Read166_MyEnum"; - _tmp[@"SerializationTypes.TypeWithEnumMembers::"] = @"Read167_TypeWithEnumMembers"; - _tmp[@"SerializationTypes.DCStruct::"] = @"Read168_DCStruct"; - _tmp[@"SerializationTypes.DCClassWithEnumAndStruct::"] = @"Read169_DCClassWithEnumAndStruct"; - _tmp[@"SerializationTypes.BuiltInTypes::"] = @"Read170_BuiltInTypes"; - _tmp[@"SerializationTypes.TypeA::"] = @"Read171_TypeA"; - _tmp[@"SerializationTypes.TypeB::"] = @"Read172_TypeB"; - _tmp[@"SerializationTypes.TypeHasArrayOfASerializedAsB::"] = @"Read173_TypeHasArrayOfASerializedAsB"; - _tmp[@"SerializationTypes.__TypeNameWithSpecialCharacters漢ñ::"] = @"Read174_Item"; - _tmp[@"SerializationTypes.BaseClassWithSamePropertyName::"] = @"Read175_BaseClassWithSamePropertyName"; - _tmp[@"SerializationTypes.DerivedClassWithSameProperty::"] = @"Read176_DerivedClassWithSameProperty"; - _tmp[@"SerializationTypes.DerivedClassWithSameProperty2::"] = @"Read177_DerivedClassWithSameProperty2"; - _tmp[@"SerializationTypes.TypeWithDateTimePropertyAsXmlTime::"] = @"Read178_Item"; - _tmp[@"SerializationTypes.TypeWithByteArrayAsXmlText::"] = @"Read179_TypeWithByteArrayAsXmlText"; - _tmp[@"SerializationTypes.SimpleDC::"] = @"Read180_SimpleDC"; - _tmp[@"SerializationTypes.TypeWithXmlTextAttributeOnArray:http://schemas.xmlsoap.org/ws/2005/04/discovery::False:"] = @"Read181_Item"; - _tmp[@"SerializationTypes.EnumFlags::"] = @"Read182_EnumFlags"; - _tmp[@"SerializationTypes.ClassImplementsInterface::"] = @"Read183_ClassImplementsInterface"; - _tmp[@"SerializationTypes.WithStruct::"] = @"Read184_WithStruct"; - _tmp[@"SerializationTypes.SomeStruct::"] = @"Read185_SomeStruct"; - _tmp[@"SerializationTypes.WithEnums::"] = @"Read186_WithEnums"; - _tmp[@"SerializationTypes.WithNullables::"] = @"Read187_WithNullables"; - _tmp[@"SerializationTypes.ByteEnum::"] = @"Read188_ByteEnum"; - _tmp[@"SerializationTypes.SByteEnum::"] = @"Read189_SByteEnum"; - _tmp[@"SerializationTypes.ShortEnum::"] = @"Read190_ShortEnum"; - _tmp[@"SerializationTypes.IntEnum::"] = @"Read191_IntEnum"; - _tmp[@"SerializationTypes.UIntEnum::"] = @"Read192_UIntEnum"; - _tmp[@"SerializationTypes.LongEnum::"] = @"Read193_LongEnum"; - _tmp[@"SerializationTypes.ULongEnum::"] = @"Read194_ULongEnum"; - _tmp[@"SerializationTypes.XmlSerializerAttributes::AttributeTesting:False:"] = @"Read195_AttributeTesting"; - _tmp[@"SerializationTypes.ItemChoiceType::"] = @"Read196_ItemChoiceType"; - _tmp[@"SerializationTypes.TypeWithAnyAttribute::"] = @"Read197_TypeWithAnyAttribute"; - _tmp[@"SerializationTypes.KnownTypesThroughConstructor::"] = @"Read198_KnownTypesThroughConstructor"; - _tmp[@"SerializationTypes.SimpleKnownTypeValue::"] = @"Read199_SimpleKnownTypeValue"; - _tmp[@"SerializationTypes.ClassImplementingIXmlSerializable::"] = @"Read200_Item"; - _tmp[@"SerializationTypes.TypeWithPropertyNameSpecified::"] = @"Read201_TypeWithPropertyNameSpecified"; - _tmp[@"SerializationTypes.TypeWithXmlSchemaFormAttribute:::True:"] = @"Read202_TypeWithXmlSchemaFormAttribute"; - _tmp[@"SerializationTypes.TypeWithTypeNameInXmlTypeAttribute::"] = @"Read203_MyXmlType"; - _tmp[@"SerializationTypes.TypeWithSchemaFormInXmlAttribute::"] = @"Read204_Item"; - _tmp[@"SerializationTypes.CustomDocument::"] = @"Read205_CustomDocument"; - _tmp[@"SerializationTypes.CustomElement::"] = @"Read206_CustomElement"; - _tmp[@"SerializationTypes.CustomAttribute::"] = @"Read207_Item"; - _tmp[@"SerializationTypes.TypeWithNonPublicDefaultConstructor::"] = @"Read208_Item"; - _tmp[@"SerializationTypes.ServerSettings::"] = @"Read209_ServerSettings"; - _tmp[@"SerializationTypes.TypeWithXmlQualifiedName::"] = @"Read210_TypeWithXmlQualifiedName"; - _tmp[@"SerializationTypes.TypeWith2DArrayProperty2::"] = @"Read211_TypeWith2DArrayProperty2"; - _tmp[@"SerializationTypes.TypeWithPropertiesHavingDefaultValue::"] = @"Read212_Item"; - _tmp[@"SerializationTypes.TypeWithEnumPropertyHavingDefaultValue::"] = @"Read213_Item"; - _tmp[@"SerializationTypes.TypeWithEnumFlagPropertyHavingDefaultValue::"] = @"Read214_Item"; - _tmp[@"SerializationTypes.TypeWithShouldSerializeMethod::"] = @"Read215_TypeWithShouldSerializeMethod"; - _tmp[@"SerializationTypes.KnownTypesThroughConstructorWithArrayProperties::"] = @"Read216_Item"; - _tmp[@"SerializationTypes.KnownTypesThroughConstructorWithValue::"] = @"Read217_Item"; - _tmp[@"SerializationTypes.TypeWithTypesHavingCustomFormatter::"] = @"Read218_Item"; - _tmp[@"SerializationTypes.TypeWithArrayPropertyHavingChoice::"] = @"Read219_Item"; - _tmp[@"SerializationTypes.MoreChoices::"] = @"Read220_MoreChoices"; - _tmp[@"SerializationTypes.TypeWithFieldsOrdered::"] = @"Read221_TypeWithFieldsOrdered"; - _tmp[@"SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName::"] = @"Read222_Item"; - _tmp[@"SerializationTypes.NamespaceTypeNameClashContainer::Root:True:"] = @"Read223_Root"; - _tmp[@"SerializationTypes.TypeNameClashB.TypeNameClash::"] = @"Read224_TypeClashB"; - _tmp[@"SerializationTypes.TypeNameClashA.TypeNameClash::"] = @"Read225_TypeClashA"; - _tmp[@"Outer+Person::"] = @"Read226_Person"; + _tmp[@"TypeWithXmlElementProperty::"] = @"Read119_TypeWithXmlElementProperty"; + _tmp[@"TypeWithXmlDocumentProperty::"] = @"Read120_TypeWithXmlDocumentProperty"; + _tmp[@"TypeWithBinaryProperty::"] = @"Read121_TypeWithBinaryProperty"; + _tmp[@"TypeWithDateTimeOffsetProperties::"] = @"Read122_Item"; + _tmp[@"TypeWithTimeSpanProperty::"] = @"Read123_TypeWithTimeSpanProperty"; + _tmp[@"TypeWithDefaultTimeSpanProperty::"] = @"Read124_Item"; + _tmp[@"TypeWithByteProperty::"] = @"Read125_TypeWithByteProperty"; + _tmp[@"TypeWithXmlNodeArrayProperty:::True:"] = @"Read126_TypeWithXmlNodeArrayProperty"; + _tmp[@"Animal::"] = @"Read127_Animal"; + _tmp[@"Dog::"] = @"Read128_Dog"; + _tmp[@"DogBreed::"] = @"Read129_DogBreed"; + _tmp[@"Group::"] = @"Read130_Group"; + _tmp[@"Vehicle::"] = @"Read131_Vehicle"; + _tmp[@"Employee::"] = @"Read132_Employee"; + _tmp[@"BaseClass::"] = @"Read133_BaseClass"; + _tmp[@"DerivedClass::"] = @"Read134_DerivedClass"; + _tmp[@"SimpleBaseClass::"] = @"Read135_SimpleBaseClass"; + _tmp[@"SimpleDerivedClass::"] = @"Read136_SimpleDerivedClass"; + _tmp[@"XmlSerializableBaseClass:http://example.com/serializer-test-namespace::True:"] = @"Read137_BaseIXmlSerializable"; + _tmp[@"XmlSerializableDerivedClass::"] = @"Read138_DerivedIXmlSerializable"; + _tmp[@"PurchaseOrder:http://www.contoso1.com:PurchaseOrder:False:"] = @"Read139_PurchaseOrder"; + _tmp[@"Address::"] = @"Read140_Address"; + _tmp[@"OrderedItem::"] = @"Read141_OrderedItem"; + _tmp[@"AliasedTestType::"] = @"Read142_AliasedTestType"; + _tmp[@"BaseClass1::"] = @"Read143_BaseClass1"; + _tmp[@"DerivedClass1::"] = @"Read144_DerivedClass1"; + _tmp[@"MyCollection1::"] = @"Read145_ArrayOfDateTime"; + _tmp[@"Orchestra::"] = @"Read146_Orchestra"; + _tmp[@"Instrument::"] = @"Read147_Instrument"; + _tmp[@"Brass::"] = @"Read148_Brass"; + _tmp[@"Trumpet::"] = @"Read149_Trumpet"; + _tmp[@"Pet::"] = @"Read150_Pet"; + _tmp[@"DefaultValuesSetToNaN::"] = @"Read151_DefaultValuesSetToNaN"; + _tmp[@"DefaultValuesSetToPositiveInfinity::"] = @"Read152_Item"; + _tmp[@"DefaultValuesSetToNegativeInfinity::"] = @"Read153_Item"; + _tmp[@"TypeWithMismatchBetweenAttributeAndPropertyType::RootElement:True:"] = @"Read154_RootElement"; + _tmp[@"TypeWithLinkedProperty::"] = @"Read155_TypeWithLinkedProperty"; + _tmp[@"MsgDocumentType:http://example.com:Document:True:"] = @"Read156_Document"; + _tmp[@"RootClass::"] = @"Read157_RootClass"; + _tmp[@"Parameter::"] = @"Read158_Parameter"; + _tmp[@"XElementWrapper::"] = @"Read159_XElementWrapper"; + _tmp[@"XElementStruct::"] = @"Read160_XElementStruct"; + _tmp[@"XElementArrayWrapper::"] = @"Read161_XElementArrayWrapper"; + _tmp[@"SerializationTypes.TypeWithDateTimeStringProperty::"] = @"Read162_TypeWithDateTimeStringProperty"; + _tmp[@"SerializationTypes.SimpleType::"] = @"Read163_SimpleType"; + _tmp[@"SerializationTypes.TypeWithGetSetArrayMembers::"] = @"Read164_TypeWithGetSetArrayMembers"; + _tmp[@"SerializationTypes.TypeWithGetOnlyArrayProperties::"] = @"Read165_TypeWithGetOnlyArrayProperties"; + _tmp[@"SerializationTypes.TypeWithArraylikeMembers::"] = @"Read166_TypeWithArraylikeMembers"; + _tmp[@"SerializationTypes.StructNotSerializable::"] = @"Read167_StructNotSerializable"; + _tmp[@"SerializationTypes.TypeWithMyCollectionField::"] = @"Read168_TypeWithMyCollectionField"; + _tmp[@"SerializationTypes.TypeWithReadOnlyMyCollectionProperty::"] = @"Read169_Item"; + _tmp[@"SerializationTypes.MyList::"] = @"Read170_ArrayOfAnyType"; + _tmp[@"SerializationTypes.MyEnum::"] = @"Read171_MyEnum"; + _tmp[@"SerializationTypes.TypeWithEnumMembers::"] = @"Read172_TypeWithEnumMembers"; + _tmp[@"SerializationTypes.DCStruct::"] = @"Read173_DCStruct"; + _tmp[@"SerializationTypes.DCClassWithEnumAndStruct::"] = @"Read174_DCClassWithEnumAndStruct"; + _tmp[@"SerializationTypes.BuiltInTypes::"] = @"Read175_BuiltInTypes"; + _tmp[@"SerializationTypes.TypeA::"] = @"Read176_TypeA"; + _tmp[@"SerializationTypes.TypeB::"] = @"Read177_TypeB"; + _tmp[@"SerializationTypes.TypeHasArrayOfASerializedAsB::"] = @"Read178_TypeHasArrayOfASerializedAsB"; + _tmp[@"SerializationTypes.__TypeNameWithSpecialCharacters漢ñ::"] = @"Read179_Item"; + _tmp[@"SerializationTypes.BaseClassWithSamePropertyName::"] = @"Read180_BaseClassWithSamePropertyName"; + _tmp[@"SerializationTypes.DerivedClassWithSameProperty::"] = @"Read181_DerivedClassWithSameProperty"; + _tmp[@"SerializationTypes.DerivedClassWithSameProperty2::"] = @"Read182_DerivedClassWithSameProperty2"; + _tmp[@"SerializationTypes.TypeWithDateTimePropertyAsXmlTime::"] = @"Read183_Item"; + _tmp[@"SerializationTypes.TypeWithByteArrayAsXmlText::"] = @"Read184_TypeWithByteArrayAsXmlText"; + _tmp[@"SerializationTypes.SimpleDC::"] = @"Read185_SimpleDC"; + _tmp[@"SerializationTypes.TypeWithXmlTextAttributeOnArray:http://schemas.xmlsoap.org/ws/2005/04/discovery::False:"] = @"Read186_Item"; + _tmp[@"SerializationTypes.EnumFlags::"] = @"Read187_EnumFlags"; + _tmp[@"SerializationTypes.ClassImplementsInterface::"] = @"Read188_ClassImplementsInterface"; + _tmp[@"SerializationTypes.WithStruct::"] = @"Read189_WithStruct"; + _tmp[@"SerializationTypes.SomeStruct::"] = @"Read190_SomeStruct"; + _tmp[@"SerializationTypes.WithEnums::"] = @"Read191_WithEnums"; + _tmp[@"SerializationTypes.WithNullables::"] = @"Read192_WithNullables"; + _tmp[@"SerializationTypes.ByteEnum::"] = @"Read193_ByteEnum"; + _tmp[@"SerializationTypes.SByteEnum::"] = @"Read194_SByteEnum"; + _tmp[@"SerializationTypes.ShortEnum::"] = @"Read195_ShortEnum"; + _tmp[@"SerializationTypes.IntEnum::"] = @"Read196_IntEnum"; + _tmp[@"SerializationTypes.UIntEnum::"] = @"Read197_UIntEnum"; + _tmp[@"SerializationTypes.LongEnum::"] = @"Read198_LongEnum"; + _tmp[@"SerializationTypes.ULongEnum::"] = @"Read199_ULongEnum"; + _tmp[@"SerializationTypes.XmlSerializerAttributes::AttributeTesting:False:"] = @"Read200_AttributeTesting"; + _tmp[@"SerializationTypes.ItemChoiceType::"] = @"Read201_ItemChoiceType"; + _tmp[@"SerializationTypes.TypeWithAnyAttribute::"] = @"Read202_TypeWithAnyAttribute"; + _tmp[@"SerializationTypes.KnownTypesThroughConstructor::"] = @"Read203_KnownTypesThroughConstructor"; + _tmp[@"SerializationTypes.SimpleKnownTypeValue::"] = @"Read204_SimpleKnownTypeValue"; + _tmp[@"SerializationTypes.ClassImplementingIXmlSerializable::"] = @"Read205_Item"; + _tmp[@"SerializationTypes.TypeWithPropertyNameSpecified::"] = @"Read206_TypeWithPropertyNameSpecified"; + _tmp[@"SerializationTypes.TypeWithXmlSchemaFormAttribute:::True:"] = @"Read207_TypeWithXmlSchemaFormAttribute"; + _tmp[@"SerializationTypes.TypeWithTypeNameInXmlTypeAttribute::"] = @"Read208_MyXmlType"; + _tmp[@"SerializationTypes.TypeWithSchemaFormInXmlAttribute::"] = @"Read209_Item"; + _tmp[@"SerializationTypes.CustomDocument::"] = @"Read210_CustomDocument"; + _tmp[@"SerializationTypes.CustomElement::"] = @"Read211_CustomElement"; + _tmp[@"SerializationTypes.CustomAttribute::"] = @"Read212_Item"; + _tmp[@"SerializationTypes.TypeWithNonPublicDefaultConstructor::"] = @"Read213_Item"; + _tmp[@"SerializationTypes.ServerSettings::"] = @"Read214_ServerSettings"; + _tmp[@"SerializationTypes.TypeWithXmlQualifiedName::"] = @"Read215_TypeWithXmlQualifiedName"; + _tmp[@"SerializationTypes.TypeWith2DArrayProperty2::"] = @"Read216_TypeWith2DArrayProperty2"; + _tmp[@"SerializationTypes.TypeWithPropertiesHavingDefaultValue::"] = @"Read217_Item"; + _tmp[@"SerializationTypes.TypeWithEnumPropertyHavingDefaultValue::"] = @"Read218_Item"; + _tmp[@"SerializationTypes.TypeWithEnumFlagPropertyHavingDefaultValue::"] = @"Read219_Item"; + _tmp[@"SerializationTypes.TypeWithShouldSerializeMethod::"] = @"Read220_TypeWithShouldSerializeMethod"; + _tmp[@"SerializationTypes.KnownTypesThroughConstructorWithArrayProperties::"] = @"Read221_Item"; + _tmp[@"SerializationTypes.KnownTypesThroughConstructorWithValue::"] = @"Read222_Item"; + _tmp[@"SerializationTypes.TypeWithTypesHavingCustomFormatter::"] = @"Read223_Item"; + _tmp[@"SerializationTypes.TypeWithArrayPropertyHavingChoice::"] = @"Read224_Item"; + _tmp[@"SerializationTypes.TypeWithPropertyHavingComplexChoice::"] = @"Read225_Item"; + _tmp[@"SerializationTypes.MoreChoices::"] = @"Read226_MoreChoices"; + _tmp[@"SerializationTypes.ComplexChoiceA::"] = @"Read227_ComplexChoiceA"; + _tmp[@"SerializationTypes.ComplexChoiceB::"] = @"Read228_ComplexChoiceB"; + _tmp[@"SerializationTypes.TypeWithFieldsOrdered::"] = @"Read229_TypeWithFieldsOrdered"; + _tmp[@"SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName::"] = @"Read230_Item"; + _tmp[@"SerializationTypes.NamespaceTypeNameClashContainer::Root:True:"] = @"Read231_Root"; + _tmp[@"SerializationTypes.TypeNameClashB.TypeNameClash::"] = @"Read232_TypeClashB"; + _tmp[@"SerializationTypes.TypeNameClashA.TypeNameClash::"] = @"Read233_TypeClashA"; + _tmp[@"Outer+Person::"] = @"Read234_Person"; if (readMethods == null) readMethods = _tmp; } return readMethods; @@ -16378,118 +17280,122 @@ public override System.Collections.Hashtable WriteMethods { get { if (writeMethods == null) { System.Collections.Hashtable _tmp = new System.Collections.Hashtable(); - _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[@"SimpleBaseClass::"] = @"Write127_SimpleBaseClass"; - _tmp[@"SimpleDerivedClass::"] = @"Write128_SimpleDerivedClass"; - _tmp[@"XmlSerializableBaseClass:http://example.com/serializer-test-namespace::True:"] = @"Write129_BaseIXmlSerializable"; - _tmp[@"XmlSerializableDerivedClass::"] = @"Write130_DerivedIXmlSerializable"; - _tmp[@"PurchaseOrder:http://www.contoso1.com:PurchaseOrder:False:"] = @"Write131_PurchaseOrder"; - _tmp[@"Address::"] = @"Write132_Address"; - _tmp[@"OrderedItem::"] = @"Write133_OrderedItem"; - _tmp[@"AliasedTestType::"] = @"Write134_AliasedTestType"; - _tmp[@"BaseClass1::"] = @"Write135_BaseClass1"; - _tmp[@"DerivedClass1::"] = @"Write136_DerivedClass1"; - _tmp[@"MyCollection1::"] = @"Write137_ArrayOfDateTime"; - _tmp[@"Orchestra::"] = @"Write138_Orchestra"; - _tmp[@"Instrument::"] = @"Write139_Instrument"; - _tmp[@"Brass::"] = @"Write140_Brass"; - _tmp[@"Trumpet::"] = @"Write141_Trumpet"; - _tmp[@"Pet::"] = @"Write142_Pet"; - _tmp[@"DefaultValuesSetToNaN::"] = @"Write143_DefaultValuesSetToNaN"; - _tmp[@"DefaultValuesSetToPositiveInfinity::"] = @"Write144_Item"; - _tmp[@"DefaultValuesSetToNegativeInfinity::"] = @"Write145_Item"; - _tmp[@"TypeWithMismatchBetweenAttributeAndPropertyType::RootElement:True:"] = @"Write146_RootElement"; - _tmp[@"TypeWithLinkedProperty::"] = @"Write147_TypeWithLinkedProperty"; - _tmp[@"MsgDocumentType:http://example.com:Document:True:"] = @"Write148_Document"; - _tmp[@"RootClass::"] = @"Write149_RootClass"; - _tmp[@"Parameter::"] = @"Write150_Parameter"; - _tmp[@"XElementWrapper::"] = @"Write151_XElementWrapper"; - _tmp[@"XElementStruct::"] = @"Write152_XElementStruct"; - _tmp[@"XElementArrayWrapper::"] = @"Write153_XElementArrayWrapper"; - _tmp[@"SerializationTypes.TypeWithDateTimeStringProperty::"] = @"Write154_TypeWithDateTimeStringProperty"; - _tmp[@"SerializationTypes.SimpleType::"] = @"Write155_SimpleType"; - _tmp[@"SerializationTypes.TypeWithGetSetArrayMembers::"] = @"Write156_TypeWithGetSetArrayMembers"; - _tmp[@"SerializationTypes.TypeWithGetOnlyArrayProperties::"] = @"Write157_TypeWithGetOnlyArrayProperties"; - _tmp[@"SerializationTypes.StructNotSerializable::"] = @"Write158_StructNotSerializable"; - _tmp[@"SerializationTypes.TypeWithMyCollectionField::"] = @"Write159_TypeWithMyCollectionField"; - _tmp[@"SerializationTypes.TypeWithReadOnlyMyCollectionProperty::"] = @"Write160_Item"; - _tmp[@"SerializationTypes.MyList::"] = @"Write161_ArrayOfAnyType"; - _tmp[@"SerializationTypes.MyEnum::"] = @"Write162_MyEnum"; - _tmp[@"SerializationTypes.TypeWithEnumMembers::"] = @"Write163_TypeWithEnumMembers"; - _tmp[@"SerializationTypes.DCStruct::"] = @"Write164_DCStruct"; - _tmp[@"SerializationTypes.DCClassWithEnumAndStruct::"] = @"Write165_DCClassWithEnumAndStruct"; - _tmp[@"SerializationTypes.BuiltInTypes::"] = @"Write166_BuiltInTypes"; - _tmp[@"SerializationTypes.TypeA::"] = @"Write167_TypeA"; - _tmp[@"SerializationTypes.TypeB::"] = @"Write168_TypeB"; - _tmp[@"SerializationTypes.TypeHasArrayOfASerializedAsB::"] = @"Write169_TypeHasArrayOfASerializedAsB"; - _tmp[@"SerializationTypes.__TypeNameWithSpecialCharacters漢ñ::"] = @"Write170_Item"; - _tmp[@"SerializationTypes.BaseClassWithSamePropertyName::"] = @"Write171_BaseClassWithSamePropertyName"; - _tmp[@"SerializationTypes.DerivedClassWithSameProperty::"] = @"Write172_DerivedClassWithSameProperty"; - _tmp[@"SerializationTypes.DerivedClassWithSameProperty2::"] = @"Write173_DerivedClassWithSameProperty2"; - _tmp[@"SerializationTypes.TypeWithDateTimePropertyAsXmlTime::"] = @"Write174_Item"; - _tmp[@"SerializationTypes.TypeWithByteArrayAsXmlText::"] = @"Write175_TypeWithByteArrayAsXmlText"; - _tmp[@"SerializationTypes.SimpleDC::"] = @"Write176_SimpleDC"; - _tmp[@"SerializationTypes.TypeWithXmlTextAttributeOnArray:http://schemas.xmlsoap.org/ws/2005/04/discovery::False:"] = @"Write177_Item"; - _tmp[@"SerializationTypes.EnumFlags::"] = @"Write178_EnumFlags"; - _tmp[@"SerializationTypes.ClassImplementsInterface::"] = @"Write179_ClassImplementsInterface"; - _tmp[@"SerializationTypes.WithStruct::"] = @"Write180_WithStruct"; - _tmp[@"SerializationTypes.SomeStruct::"] = @"Write181_SomeStruct"; - _tmp[@"SerializationTypes.WithEnums::"] = @"Write182_WithEnums"; - _tmp[@"SerializationTypes.WithNullables::"] = @"Write183_WithNullables"; - _tmp[@"SerializationTypes.ByteEnum::"] = @"Write184_ByteEnum"; - _tmp[@"SerializationTypes.SByteEnum::"] = @"Write185_SByteEnum"; - _tmp[@"SerializationTypes.ShortEnum::"] = @"Write186_ShortEnum"; - _tmp[@"SerializationTypes.IntEnum::"] = @"Write187_IntEnum"; - _tmp[@"SerializationTypes.UIntEnum::"] = @"Write188_UIntEnum"; - _tmp[@"SerializationTypes.LongEnum::"] = @"Write189_LongEnum"; - _tmp[@"SerializationTypes.ULongEnum::"] = @"Write190_ULongEnum"; - _tmp[@"SerializationTypes.XmlSerializerAttributes::AttributeTesting:False:"] = @"Write191_AttributeTesting"; - _tmp[@"SerializationTypes.ItemChoiceType::"] = @"Write192_ItemChoiceType"; - _tmp[@"SerializationTypes.TypeWithAnyAttribute::"] = @"Write193_TypeWithAnyAttribute"; - _tmp[@"SerializationTypes.KnownTypesThroughConstructor::"] = @"Write194_KnownTypesThroughConstructor"; - _tmp[@"SerializationTypes.SimpleKnownTypeValue::"] = @"Write195_SimpleKnownTypeValue"; - _tmp[@"SerializationTypes.ClassImplementingIXmlSerializable::"] = @"Write196_Item"; - _tmp[@"SerializationTypes.TypeWithPropertyNameSpecified::"] = @"Write197_TypeWithPropertyNameSpecified"; - _tmp[@"SerializationTypes.TypeWithXmlSchemaFormAttribute:::True:"] = @"Write198_TypeWithXmlSchemaFormAttribute"; - _tmp[@"SerializationTypes.TypeWithTypeNameInXmlTypeAttribute::"] = @"Write199_MyXmlType"; - _tmp[@"SerializationTypes.TypeWithSchemaFormInXmlAttribute::"] = @"Write200_Item"; - _tmp[@"SerializationTypes.CustomDocument::"] = @"Write201_CustomDocument"; - _tmp[@"SerializationTypes.CustomElement::"] = @"Write202_CustomElement"; - _tmp[@"SerializationTypes.CustomAttribute::"] = @"Write203_Item"; - _tmp[@"SerializationTypes.TypeWithNonPublicDefaultConstructor::"] = @"Write204_Item"; - _tmp[@"SerializationTypes.ServerSettings::"] = @"Write205_ServerSettings"; - _tmp[@"SerializationTypes.TypeWithXmlQualifiedName::"] = @"Write206_TypeWithXmlQualifiedName"; - _tmp[@"SerializationTypes.TypeWith2DArrayProperty2::"] = @"Write207_TypeWith2DArrayProperty2"; - _tmp[@"SerializationTypes.TypeWithPropertiesHavingDefaultValue::"] = @"Write208_Item"; - _tmp[@"SerializationTypes.TypeWithEnumPropertyHavingDefaultValue::"] = @"Write209_Item"; - _tmp[@"SerializationTypes.TypeWithEnumFlagPropertyHavingDefaultValue::"] = @"Write210_Item"; - _tmp[@"SerializationTypes.TypeWithShouldSerializeMethod::"] = @"Write211_TypeWithShouldSerializeMethod"; - _tmp[@"SerializationTypes.KnownTypesThroughConstructorWithArrayProperties::"] = @"Write212_Item"; - _tmp[@"SerializationTypes.KnownTypesThroughConstructorWithValue::"] = @"Write213_Item"; - _tmp[@"SerializationTypes.TypeWithTypesHavingCustomFormatter::"] = @"Write214_Item"; - _tmp[@"SerializationTypes.TypeWithArrayPropertyHavingChoice::"] = @"Write215_Item"; - _tmp[@"SerializationTypes.MoreChoices::"] = @"Write216_MoreChoices"; - _tmp[@"SerializationTypes.TypeWithFieldsOrdered::"] = @"Write217_TypeWithFieldsOrdered"; - _tmp[@"SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName::"] = @"Write218_Item"; - _tmp[@"SerializationTypes.NamespaceTypeNameClashContainer::Root:True:"] = @"Write219_Root"; - _tmp[@"SerializationTypes.TypeNameClashB.TypeNameClash::"] = @"Write220_TypeClashB"; - _tmp[@"SerializationTypes.TypeNameClashA.TypeNameClash::"] = @"Write221_TypeClashA"; - _tmp[@"Outer+Person::"] = @"Write222_Person"; + _tmp[@"TypeWithXmlElementProperty::"] = @"Write115_TypeWithXmlElementProperty"; + _tmp[@"TypeWithXmlDocumentProperty::"] = @"Write116_TypeWithXmlDocumentProperty"; + _tmp[@"TypeWithBinaryProperty::"] = @"Write117_TypeWithBinaryProperty"; + _tmp[@"TypeWithDateTimeOffsetProperties::"] = @"Write118_Item"; + _tmp[@"TypeWithTimeSpanProperty::"] = @"Write119_TypeWithTimeSpanProperty"; + _tmp[@"TypeWithDefaultTimeSpanProperty::"] = @"Write120_Item"; + _tmp[@"TypeWithByteProperty::"] = @"Write121_TypeWithByteProperty"; + _tmp[@"TypeWithXmlNodeArrayProperty:::True:"] = @"Write122_TypeWithXmlNodeArrayProperty"; + _tmp[@"Animal::"] = @"Write123_Animal"; + _tmp[@"Dog::"] = @"Write124_Dog"; + _tmp[@"DogBreed::"] = @"Write125_DogBreed"; + _tmp[@"Group::"] = @"Write126_Group"; + _tmp[@"Vehicle::"] = @"Write127_Vehicle"; + _tmp[@"Employee::"] = @"Write128_Employee"; + _tmp[@"BaseClass::"] = @"Write129_BaseClass"; + _tmp[@"DerivedClass::"] = @"Write130_DerivedClass"; + _tmp[@"SimpleBaseClass::"] = @"Write131_SimpleBaseClass"; + _tmp[@"SimpleDerivedClass::"] = @"Write132_SimpleDerivedClass"; + _tmp[@"XmlSerializableBaseClass:http://example.com/serializer-test-namespace::True:"] = @"Write133_BaseIXmlSerializable"; + _tmp[@"XmlSerializableDerivedClass::"] = @"Write134_DerivedIXmlSerializable"; + _tmp[@"PurchaseOrder:http://www.contoso1.com:PurchaseOrder:False:"] = @"Write135_PurchaseOrder"; + _tmp[@"Address::"] = @"Write136_Address"; + _tmp[@"OrderedItem::"] = @"Write137_OrderedItem"; + _tmp[@"AliasedTestType::"] = @"Write138_AliasedTestType"; + _tmp[@"BaseClass1::"] = @"Write139_BaseClass1"; + _tmp[@"DerivedClass1::"] = @"Write140_DerivedClass1"; + _tmp[@"MyCollection1::"] = @"Write141_ArrayOfDateTime"; + _tmp[@"Orchestra::"] = @"Write142_Orchestra"; + _tmp[@"Instrument::"] = @"Write143_Instrument"; + _tmp[@"Brass::"] = @"Write144_Brass"; + _tmp[@"Trumpet::"] = @"Write145_Trumpet"; + _tmp[@"Pet::"] = @"Write146_Pet"; + _tmp[@"DefaultValuesSetToNaN::"] = @"Write147_DefaultValuesSetToNaN"; + _tmp[@"DefaultValuesSetToPositiveInfinity::"] = @"Write148_Item"; + _tmp[@"DefaultValuesSetToNegativeInfinity::"] = @"Write149_Item"; + _tmp[@"TypeWithMismatchBetweenAttributeAndPropertyType::RootElement:True:"] = @"Write150_RootElement"; + _tmp[@"TypeWithLinkedProperty::"] = @"Write151_TypeWithLinkedProperty"; + _tmp[@"MsgDocumentType:http://example.com:Document:True:"] = @"Write152_Document"; + _tmp[@"RootClass::"] = @"Write153_RootClass"; + _tmp[@"Parameter::"] = @"Write154_Parameter"; + _tmp[@"XElementWrapper::"] = @"Write155_XElementWrapper"; + _tmp[@"XElementStruct::"] = @"Write156_XElementStruct"; + _tmp[@"XElementArrayWrapper::"] = @"Write157_XElementArrayWrapper"; + _tmp[@"SerializationTypes.TypeWithDateTimeStringProperty::"] = @"Write158_TypeWithDateTimeStringProperty"; + _tmp[@"SerializationTypes.SimpleType::"] = @"Write159_SimpleType"; + _tmp[@"SerializationTypes.TypeWithGetSetArrayMembers::"] = @"Write160_TypeWithGetSetArrayMembers"; + _tmp[@"SerializationTypes.TypeWithGetOnlyArrayProperties::"] = @"Write161_TypeWithGetOnlyArrayProperties"; + _tmp[@"SerializationTypes.TypeWithArraylikeMembers::"] = @"Write162_TypeWithArraylikeMembers"; + _tmp[@"SerializationTypes.StructNotSerializable::"] = @"Write163_StructNotSerializable"; + _tmp[@"SerializationTypes.TypeWithMyCollectionField::"] = @"Write164_TypeWithMyCollectionField"; + _tmp[@"SerializationTypes.TypeWithReadOnlyMyCollectionProperty::"] = @"Write165_Item"; + _tmp[@"SerializationTypes.MyList::"] = @"Write166_ArrayOfAnyType"; + _tmp[@"SerializationTypes.MyEnum::"] = @"Write167_MyEnum"; + _tmp[@"SerializationTypes.TypeWithEnumMembers::"] = @"Write168_TypeWithEnumMembers"; + _tmp[@"SerializationTypes.DCStruct::"] = @"Write169_DCStruct"; + _tmp[@"SerializationTypes.DCClassWithEnumAndStruct::"] = @"Write170_DCClassWithEnumAndStruct"; + _tmp[@"SerializationTypes.BuiltInTypes::"] = @"Write171_BuiltInTypes"; + _tmp[@"SerializationTypes.TypeA::"] = @"Write172_TypeA"; + _tmp[@"SerializationTypes.TypeB::"] = @"Write173_TypeB"; + _tmp[@"SerializationTypes.TypeHasArrayOfASerializedAsB::"] = @"Write174_TypeHasArrayOfASerializedAsB"; + _tmp[@"SerializationTypes.__TypeNameWithSpecialCharacters漢ñ::"] = @"Write175_Item"; + _tmp[@"SerializationTypes.BaseClassWithSamePropertyName::"] = @"Write176_BaseClassWithSamePropertyName"; + _tmp[@"SerializationTypes.DerivedClassWithSameProperty::"] = @"Write177_DerivedClassWithSameProperty"; + _tmp[@"SerializationTypes.DerivedClassWithSameProperty2::"] = @"Write178_DerivedClassWithSameProperty2"; + _tmp[@"SerializationTypes.TypeWithDateTimePropertyAsXmlTime::"] = @"Write179_Item"; + _tmp[@"SerializationTypes.TypeWithByteArrayAsXmlText::"] = @"Write180_TypeWithByteArrayAsXmlText"; + _tmp[@"SerializationTypes.SimpleDC::"] = @"Write181_SimpleDC"; + _tmp[@"SerializationTypes.TypeWithXmlTextAttributeOnArray:http://schemas.xmlsoap.org/ws/2005/04/discovery::False:"] = @"Write182_Item"; + _tmp[@"SerializationTypes.EnumFlags::"] = @"Write183_EnumFlags"; + _tmp[@"SerializationTypes.ClassImplementsInterface::"] = @"Write184_ClassImplementsInterface"; + _tmp[@"SerializationTypes.WithStruct::"] = @"Write185_WithStruct"; + _tmp[@"SerializationTypes.SomeStruct::"] = @"Write186_SomeStruct"; + _tmp[@"SerializationTypes.WithEnums::"] = @"Write187_WithEnums"; + _tmp[@"SerializationTypes.WithNullables::"] = @"Write188_WithNullables"; + _tmp[@"SerializationTypes.ByteEnum::"] = @"Write189_ByteEnum"; + _tmp[@"SerializationTypes.SByteEnum::"] = @"Write190_SByteEnum"; + _tmp[@"SerializationTypes.ShortEnum::"] = @"Write191_ShortEnum"; + _tmp[@"SerializationTypes.IntEnum::"] = @"Write192_IntEnum"; + _tmp[@"SerializationTypes.UIntEnum::"] = @"Write193_UIntEnum"; + _tmp[@"SerializationTypes.LongEnum::"] = @"Write194_LongEnum"; + _tmp[@"SerializationTypes.ULongEnum::"] = @"Write195_ULongEnum"; + _tmp[@"SerializationTypes.XmlSerializerAttributes::AttributeTesting:False:"] = @"Write196_AttributeTesting"; + _tmp[@"SerializationTypes.ItemChoiceType::"] = @"Write197_ItemChoiceType"; + _tmp[@"SerializationTypes.TypeWithAnyAttribute::"] = @"Write198_TypeWithAnyAttribute"; + _tmp[@"SerializationTypes.KnownTypesThroughConstructor::"] = @"Write199_KnownTypesThroughConstructor"; + _tmp[@"SerializationTypes.SimpleKnownTypeValue::"] = @"Write200_SimpleKnownTypeValue"; + _tmp[@"SerializationTypes.ClassImplementingIXmlSerializable::"] = @"Write201_Item"; + _tmp[@"SerializationTypes.TypeWithPropertyNameSpecified::"] = @"Write202_TypeWithPropertyNameSpecified"; + _tmp[@"SerializationTypes.TypeWithXmlSchemaFormAttribute:::True:"] = @"Write203_TypeWithXmlSchemaFormAttribute"; + _tmp[@"SerializationTypes.TypeWithTypeNameInXmlTypeAttribute::"] = @"Write204_MyXmlType"; + _tmp[@"SerializationTypes.TypeWithSchemaFormInXmlAttribute::"] = @"Write205_Item"; + _tmp[@"SerializationTypes.CustomDocument::"] = @"Write206_CustomDocument"; + _tmp[@"SerializationTypes.CustomElement::"] = @"Write207_CustomElement"; + _tmp[@"SerializationTypes.CustomAttribute::"] = @"Write208_Item"; + _tmp[@"SerializationTypes.TypeWithNonPublicDefaultConstructor::"] = @"Write209_Item"; + _tmp[@"SerializationTypes.ServerSettings::"] = @"Write210_ServerSettings"; + _tmp[@"SerializationTypes.TypeWithXmlQualifiedName::"] = @"Write211_TypeWithXmlQualifiedName"; + _tmp[@"SerializationTypes.TypeWith2DArrayProperty2::"] = @"Write212_TypeWith2DArrayProperty2"; + _tmp[@"SerializationTypes.TypeWithPropertiesHavingDefaultValue::"] = @"Write213_Item"; + _tmp[@"SerializationTypes.TypeWithEnumPropertyHavingDefaultValue::"] = @"Write214_Item"; + _tmp[@"SerializationTypes.TypeWithEnumFlagPropertyHavingDefaultValue::"] = @"Write215_Item"; + _tmp[@"SerializationTypes.TypeWithShouldSerializeMethod::"] = @"Write216_TypeWithShouldSerializeMethod"; + _tmp[@"SerializationTypes.KnownTypesThroughConstructorWithArrayProperties::"] = @"Write217_Item"; + _tmp[@"SerializationTypes.KnownTypesThroughConstructorWithValue::"] = @"Write218_Item"; + _tmp[@"SerializationTypes.TypeWithTypesHavingCustomFormatter::"] = @"Write219_Item"; + _tmp[@"SerializationTypes.TypeWithArrayPropertyHavingChoice::"] = @"Write220_Item"; + _tmp[@"SerializationTypes.TypeWithPropertyHavingComplexChoice::"] = @"Write221_Item"; + _tmp[@"SerializationTypes.MoreChoices::"] = @"Write222_MoreChoices"; + _tmp[@"SerializationTypes.ComplexChoiceA::"] = @"Write223_ComplexChoiceA"; + _tmp[@"SerializationTypes.ComplexChoiceB::"] = @"Write224_ComplexChoiceB"; + _tmp[@"SerializationTypes.TypeWithFieldsOrdered::"] = @"Write225_TypeWithFieldsOrdered"; + _tmp[@"SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName::"] = @"Write226_Item"; + _tmp[@"SerializationTypes.NamespaceTypeNameClashContainer::Root:True:"] = @"Write227_Root"; + _tmp[@"SerializationTypes.TypeNameClashB.TypeNameClash::"] = @"Write228_TypeClashB"; + _tmp[@"SerializationTypes.TypeNameClashA.TypeNameClash::"] = @"Write229_TypeClashA"; + _tmp[@"Outer+Person::"] = @"Write230_Person"; if (writeMethods == null) writeMethods = _tmp; } return writeMethods; @@ -16500,118 +17406,122 @@ public override System.Collections.Hashtable TypedSerializers { get { if (typedSerializers == null) { System.Collections.Hashtable _tmp = new System.Collections.Hashtable(); - _tmp.Add(@"DerivedClass::", new DerivedClassSerializer()); - _tmp.Add(@"XElementStruct::", new XElementStructSerializer()); - _tmp.Add(@"Orchestra::", new OrchestraSerializer()); - _tmp.Add(@"SerializationTypes.KnownTypesThroughConstructorWithArrayProperties::", new KnownTypesThroughConstructorWithArrayPropertiesSerializer()); - _tmp.Add(@"DefaultValuesSetToNaN::", new DefaultValuesSetToNaNSerializer()); - _tmp.Add(@"SerializationTypes.CustomAttribute::", new CustomAttributeSerializer()); - _tmp.Add(@"SerializationTypes.WithEnums::", new WithEnumsSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithGetOnlyArrayProperties::", new TypeWithGetOnlyArrayPropertiesSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName::", new TypeWithKnownTypesOfCollectionsWithConflictingXmlNameSerializer()); + _tmp.Add(@"SerializationTypes.SomeStruct::", new SomeStructSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithNonPublicDefaultConstructor::", new TypeWithNonPublicDefaultConstructorSerializer()); + _tmp.Add(@"XmlSerializableDerivedClass::", new XmlSerializableDerivedClassSerializer()); + _tmp.Add(@"SerializationTypes.EnumFlags::", new EnumFlagsSerializer()); + _tmp.Add(@"SerializationTypes.ComplexChoiceB::", new ComplexChoiceBSerializer()); _tmp.Add(@"XmlSerializableBaseClass:http://example.com/serializer-test-namespace::True:", new XmlSerializableBaseClassSerializer()); - _tmp.Add(@"SerializationTypes.KnownTypesThroughConstructorWithValue::", new KnownTypesThroughConstructorWithValueSerializer()); - _tmp.Add(@"SerializationTypes.ItemChoiceType::", new ItemChoiceTypeSerializer()); - _tmp.Add(@"TypeWithDateTimeOffsetProperties::", new TypeWithDateTimeOffsetPropertiesSerializer()); - _tmp.Add(@"TypeWithXmlElementProperty::", new TypeWithXmlElementPropertySerializer()); - _tmp.Add(@"SerializationTypes.TypeWithByteArrayAsXmlText::", new TypeWithByteArrayAsXmlTextSerializer()); - _tmp.Add(@"Vehicle::", new VehicleSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithXmlTextAttributeOnArray:http://schemas.xmlsoap.org/ws/2005/04/discovery::False:", new TypeWithXmlTextAttributeOnArraySerializer()); - _tmp.Add(@"SerializationTypes.__TypeNameWithSpecialCharacters漢ñ::", new __TypeNameWithSpecialCharacters漢ñSerializer()); _tmp.Add(@"SerializationTypes.WithStruct::", new WithStructSerializer()); + _tmp.Add(@"Trumpet::", new TrumpetSerializer()); + _tmp.Add(@"SerializationTypes.DerivedClassWithSameProperty2::", new DerivedClassWithSameProperty2Serializer()); + _tmp.Add(@"SerializationTypes.MyList::", new MyListSerializer()); + _tmp.Add(@"SerializationTypes.SimpleDC::", new SimpleDCSerializer()); + _tmp.Add(@"Pet::", new PetSerializer()); + _tmp.Add(@"Brass::", new BrassSerializer()); + _tmp.Add(@"SerializationTypes.KnownTypesThroughConstructor::", new KnownTypesThroughConstructorSerializer()); + _tmp.Add(@"SerializationTypes.ComplexChoiceA::", new ComplexChoiceASerializer()); + _tmp.Add(@"SerializationTypes.TypeWithXmlSchemaFormAttribute:::True:", new TypeWithXmlSchemaFormAttributeSerializer()); + _tmp.Add(@"Employee::", new EmployeeSerializer()); + _tmp.Add(@"SerializationTypes.__TypeNameWithSpecialCharacters漢ñ::", new __TypeNameWithSpecialCharacters漢ñSerializer()); + _tmp.Add(@"DogBreed::", new DogBreedSerializer()); + _tmp.Add(@"DefaultValuesSetToPositiveInfinity::", new DefaultValuesSetToPositiveInfinitySerializer()); + _tmp.Add(@"AliasedTestType::", new AliasedTestTypeSerializer()); _tmp.Add(@"SerializationTypes.SimpleKnownTypeValue::", new SimpleKnownTypeValueSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithEnumPropertyHavingDefaultValue::", new TypeWithEnumPropertyHavingDefaultValueSerializer()); - _tmp.Add(@"SimpleBaseClass::", new SimpleBaseClassSerializer()); - _tmp.Add(@"SerializationTypes.ShortEnum::", new ShortEnumSerializer()); - _tmp.Add(@"BaseClass1::", new BaseClass1Serializer()); _tmp.Add(@"XElementArrayWrapper::", new XElementArrayWrapperSerializer()); - _tmp.Add(@"Instrument::", new InstrumentSerializer()); - _tmp.Add(@"DerivedClass1::", new DerivedClass1Serializer()); - _tmp.Add(@"SerializationTypes.TypeWithMyCollectionField::", new TypeWithMyCollectionFieldSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithSchemaFormInXmlAttribute::", new TypeWithSchemaFormInXmlAttributeSerializer()); - _tmp.Add(@"SerializationTypes.CustomDocument::", new CustomDocumentSerializer()); - _tmp.Add(@"SerializationTypes.NamespaceTypeNameClashContainer::Root:True:", new NamespaceTypeNameClashContainerSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithReadOnlyMyCollectionProperty::", new TypeWithReadOnlyMyCollectionPropertySerializer()); - _tmp.Add(@"SerializationTypes.ULongEnum::", new ULongEnumSerializer()); + _tmp.Add(@"Parameter::", new ParameterSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithDateTimeStringProperty::", new TypeWithDateTimeStringPropertySerializer()); + _tmp.Add(@"SerializationTypes.UIntEnum::", new UIntEnumSerializer()); _tmp.Add(@"SerializationTypes.TypeA::", new TypeASerializer()); + _tmp.Add(@"SerializationTypes.DerivedClassWithSameProperty::", new DerivedClassWithSamePropertySerializer()); + _tmp.Add(@"DerivedClass::", new DerivedClassSerializer()); + _tmp.Add(@"Orchestra::", new OrchestraSerializer()); + _tmp.Add(@"SerializationTypes.ClassImplementingIXmlSerializable::", new ClassImplementingIXmlSerializableSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithTypeNameInXmlTypeAttribute::", new TypeWithTypeNameInXmlTypeAttributeSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithEnumMembers::", new TypeWithEnumMembersSerializer()); + _tmp.Add(@"SerializationTypes.XmlSerializerAttributes::AttributeTesting:False:", new XmlSerializerAttributesSerializer()); + _tmp.Add(@"SerializationTypes.ServerSettings::", new ServerSettingsSerializer()); _tmp.Add(@"SerializationTypes.SByteEnum::", new SByteEnumSerializer()); - _tmp.Add(@"SerializationTypes.DCClassWithEnumAndStruct::", new DCClassWithEnumAndStructSerializer()); - _tmp.Add(@"SerializationTypes.KnownTypesThroughConstructor::", new KnownTypesThroughConstructorSerializer()); + _tmp.Add(@"SerializationTypes.KnownTypesThroughConstructorWithValue::", new KnownTypesThroughConstructorWithValueSerializer()); + _tmp.Add(@"MyCollection1::", new MyCollection1Serializer()); + _tmp.Add(@"RootClass::", new RootClassSerializer()); + _tmp.Add(@"OrderedItem::", new OrderedItemSerializer()); _tmp.Add(@"SerializationTypes.TypeNameClashA.TypeNameClash::", new TypeNameClashSerializer1()); - _tmp.Add(@"BaseClass::", new BaseClassSerializer()); - _tmp.Add(@"SerializationTypes.SimpleDC::", new SimpleDCSerializer()); + _tmp.Add(@"SerializationTypes.WithEnums::", new WithEnumsSerializer()); + _tmp.Add(@"SerializationTypes.IntEnum::", new IntEnumSerializer()); + _tmp.Add(@"Outer+Person::", new PersonSerializer()); + _tmp.Add(@"XElementStruct::", new XElementStructSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithMyCollectionField::", new TypeWithMyCollectionFieldSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithGetOnlyArrayProperties::", new TypeWithGetOnlyArrayPropertiesSerializer()); + _tmp.Add(@"Instrument::", new InstrumentSerializer()); + _tmp.Add(@"Address::", new AddressSerializer()); _tmp.Add(@"SerializationTypes.StructNotSerializable::", new StructNotSerializableSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithDateTimePropertyAsXmlTime::", new TypeWithDateTimePropertyAsXmlTimeSerializer()); - _tmp.Add(@"MsgDocumentType:http://example.com:Document:True:", new MsgDocumentTypeSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithXmlSchemaFormAttribute:::True:", new TypeWithXmlSchemaFormAttributeSerializer()); - _tmp.Add(@"SerializationTypes.TypeNameClashB.TypeNameClash::", new TypeNameClashSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithDateTimeStringProperty::", new TypeWithDateTimeStringPropertySerializer()); - _tmp.Add(@"OrderedItem::", new OrderedItemSerializer()); - _tmp.Add(@"XElementWrapper::", new XElementWrapperSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithKnownTypesOfCollectionsWithConflictingXmlName::", new TypeWithKnownTypesOfCollectionsWithConflictingXmlNameSerializer()); + _tmp.Add(@"TypeWithByteProperty::", new TypeWithBytePropertySerializer()); + _tmp.Add(@"SerializationTypes.BaseClassWithSamePropertyName::", new BaseClassWithSamePropertyNameSerializer()); + _tmp.Add(@"SimpleDerivedClass::", new SimpleDerivedClassSerializer()); + _tmp.Add(@"SerializationTypes.BuiltInTypes::", new BuiltInTypesSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithEnumPropertyHavingDefaultValue::", new TypeWithEnumPropertyHavingDefaultValueSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithGetSetArrayMembers::", new TypeWithGetSetArrayMembersSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithArraylikeMembers::", new TypeWithArraylikeMembersSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithShouldSerializeMethod::", new TypeWithShouldSerializeMethodSerializer()); + _tmp.Add(@"SerializationTypes.ClassImplementsInterface::", new ClassImplementsInterfaceSerializer()); + _tmp.Add(@"SerializationTypes.TypeHasArrayOfASerializedAsB::", new TypeHasArrayOfASerializedAsBSerializer()); _tmp.Add(@"TypeWithLinkedProperty::", new TypeWithLinkedPropertySerializer()); - _tmp.Add(@"Pet::", new PetSerializer()); + _tmp.Add(@"SerializationTypes.CustomDocument::", new CustomDocumentSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithAnyAttribute::", new TypeWithAnyAttributeSerializer()); + _tmp.Add(@"SerializationTypes.ULongEnum::", new ULongEnumSerializer()); + _tmp.Add(@"SerializationTypes.SimpleType::", new SimpleTypeSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithSchemaFormInXmlAttribute::", new TypeWithSchemaFormInXmlAttributeSerializer()); + _tmp.Add(@"SerializationTypes.ShortEnum::", new ShortEnumSerializer()); + _tmp.Add(@"SimpleBaseClass::", new SimpleBaseClassSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithFieldsOrdered::", new TypeWithFieldsOrderedSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithReadOnlyMyCollectionProperty::", new TypeWithReadOnlyMyCollectionPropertySerializer()); + _tmp.Add(@"SerializationTypes.TypeWithDateTimePropertyAsXmlTime::", new TypeWithDateTimePropertyAsXmlTimeSerializer()); + _tmp.Add(@"SerializationTypes.DCStruct::", new DCStructSerializer()); + _tmp.Add(@"SerializationTypes.CustomAttribute::", new CustomAttributeSerializer()); + _tmp.Add(@"BaseClass1::", new BaseClass1Serializer()); _tmp.Add(@"SerializationTypes.TypeB::", new TypeBSerializer()); - _tmp.Add(@"XmlSerializableDerivedClass::", new XmlSerializableDerivedClassSerializer()); - _tmp.Add(@"SerializationTypes.BuiltInTypes::", new BuiltInTypesSerializer()); - _tmp.Add(@"DefaultValuesSetToNegativeInfinity::", new DefaultValuesSetToNegativeInfinitySerializer()); - _tmp.Add(@"SerializationTypes.EnumFlags::", new EnumFlagsSerializer()); - _tmp.Add(@"TypeWithBinaryProperty::", new TypeWithBinaryPropertySerializer()); - _tmp.Add(@"SerializationTypes.TypeWithNonPublicDefaultConstructor::", new TypeWithNonPublicDefaultConstructorSerializer()); - _tmp.Add(@"DefaultValuesSetToPositiveInfinity::", new DefaultValuesSetToPositiveInfinitySerializer()); - _tmp.Add(@"Trumpet::", new TrumpetSerializer()); - _tmp.Add(@"SerializationTypes.ClassImplementingIXmlSerializable::", new ClassImplementingIXmlSerializableSerializer()); - _tmp.Add(@"SerializationTypes.BaseClassWithSamePropertyName::", new BaseClassWithSamePropertyNameSerializer()); - _tmp.Add(@"RootClass::", new RootClassSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithXmlQualifiedName::", new TypeWithXmlQualifiedNameSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithTypeNameInXmlTypeAttribute::", new TypeWithTypeNameInXmlTypeAttributeSerializer()); - _tmp.Add(@"SerializationTypes.WithNullables::", new WithNullablesSerializer()); _tmp.Add(@"Animal::", new AnimalSerializer()); - _tmp.Add(@"SerializationTypes.SomeStruct::", new SomeStructSerializer()); - _tmp.Add(@"Parameter::", new ParameterSerializer()); - _tmp.Add(@"TypeWithMismatchBetweenAttributeAndPropertyType::RootElement:True:", new TypeWithMismatchBetweenAttributeAndPropertyTypeSerializer()); - _tmp.Add(@"SerializationTypes.DerivedClassWithSameProperty::", new DerivedClassWithSamePropertySerializer()); - _tmp.Add(@"DogBreed::", new DogBreedSerializer()); + _tmp.Add(@"DefaultValuesSetToNaN::", new DefaultValuesSetToNaNSerializer()); + _tmp.Add(@"TypeWithXmlDocumentProperty::", new TypeWithXmlDocumentPropertySerializer()); + _tmp.Add(@"SerializationTypes.CustomElement::", new CustomElementSerializer()); + _tmp.Add(@"XElementWrapper::", new XElementWrapperSerializer()); + _tmp.Add(@"TypeWithTimeSpanProperty::", new TypeWithTimeSpanPropertySerializer()); + _tmp.Add(@"SerializationTypes.MyEnum::", new MyEnumSerializer()); + _tmp.Add(@"SerializationTypes.KnownTypesThroughConstructorWithArrayProperties::", new KnownTypesThroughConstructorWithArrayPropertiesSerializer()); _tmp.Add(@"SerializationTypes.TypeWithPropertiesHavingDefaultValue::", new TypeWithPropertiesHavingDefaultValueSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithAnyAttribute::", new TypeWithAnyAttributeSerializer()); - _tmp.Add(@"Employee::", new EmployeeSerializer()); - _tmp.Add(@"Outer+Person::", new PersonSerializer()); - _tmp.Add(@"SimpleDerivedClass::", new SimpleDerivedClassSerializer()); + _tmp.Add(@"Group::", new GroupSerializer()); + _tmp.Add(@"SerializationTypes.ByteEnum::", new ByteEnumSerializer()); + _tmp.Add(@"DerivedClass1::", new DerivedClass1Serializer()); + _tmp.Add(@"TypeWithDefaultTimeSpanProperty::", new TypeWithDefaultTimeSpanPropertySerializer()); + _tmp.Add(@"SerializationTypes.ItemChoiceType::", new ItemChoiceTypeSerializer()); + _tmp.Add(@"PurchaseOrder:http://www.contoso1.com:PurchaseOrder:False:", new PurchaseOrderSerializer()); + _tmp.Add(@"TypeWithXmlElementProperty::", new TypeWithXmlElementPropertySerializer()); + _tmp.Add(@"SerializationTypes.WithNullables::", new WithNullablesSerializer()); + _tmp.Add(@"BaseClass::", new BaseClassSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithByteArrayAsXmlText::", new TypeWithByteArrayAsXmlTextSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithTypesHavingCustomFormatter::", new TypeWithTypesHavingCustomFormatterSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithPropertyHavingComplexChoice::", new TypeWithPropertyHavingComplexChoiceSerializer()); + _tmp.Add(@"Dog::", new DogSerializer()); + _tmp.Add(@"MsgDocumentType:http://example.com:Document:True:", new MsgDocumentTypeSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithXmlTextAttributeOnArray:http://schemas.xmlsoap.org/ws/2005/04/discovery::False:", new TypeWithXmlTextAttributeOnArraySerializer()); + _tmp.Add(@"Vehicle::", new VehicleSerializer()); _tmp.Add(@"TypeWithXmlNodeArrayProperty:::True:", new TypeWithXmlNodeArrayPropertySerializer()); - _tmp.Add(@"AliasedTestType::", new AliasedTestTypeSerializer()); + _tmp.Add(@"SerializationTypes.NamespaceTypeNameClashContainer::Root:True:", new NamespaceTypeNameClashContainerSerializer()); _tmp.Add(@"SerializationTypes.TypeWithEnumFlagPropertyHavingDefaultValue::", new TypeWithEnumFlagPropertyHavingDefaultValueSerializer()); - _tmp.Add(@"SerializationTypes.SimpleType::", new SimpleTypeSerializer()); - _tmp.Add(@"SerializationTypes.LongEnum::", new LongEnumSerializer()); - _tmp.Add(@"MyCollection1::", new MyCollection1Serializer()); - _tmp.Add(@"TypeWithByteProperty::", new TypeWithBytePropertySerializer()); - _tmp.Add(@"SerializationTypes.ServerSettings::", new ServerSettingsSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithArrayPropertyHavingChoice::", new TypeWithArrayPropertyHavingChoiceSerializer()); + _tmp.Add(@"SerializationTypes.TypeWithXmlQualifiedName::", new TypeWithXmlQualifiedNameSerializer()); + _tmp.Add(@"TypeWithDateTimeOffsetProperties::", new TypeWithDateTimeOffsetPropertiesSerializer()); + _tmp.Add(@"SerializationTypes.TypeNameClashB.TypeNameClash::", new TypeNameClashSerializer()); _tmp.Add(@"SerializationTypes.TypeWith2DArrayProperty2::", new TypeWith2DArrayProperty2Serializer()); - _tmp.Add(@"SerializationTypes.ByteEnum::", new ByteEnumSerializer()); - _tmp.Add(@"Group::", new GroupSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithGetSetArrayMembers::", new TypeWithGetSetArrayMembersSerializer()); - _tmp.Add(@"SerializationTypes.MyEnum::", new MyEnumSerializer()); - _tmp.Add(@"Dog::", new DogSerializer()); - _tmp.Add(@"SerializationTypes.TypeHasArrayOfASerializedAsB::", new TypeHasArrayOfASerializedAsBSerializer()); - _tmp.Add(@"SerializationTypes.DerivedClassWithSameProperty2::", new DerivedClassWithSameProperty2Serializer()); - _tmp.Add(@"TypeWithXmlDocumentProperty::", new TypeWithXmlDocumentPropertySerializer()); - _tmp.Add(@"SerializationTypes.ClassImplementsInterface::", new ClassImplementsInterfaceSerializer()); - _tmp.Add(@"Address::", new AddressSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithEnumMembers::", new TypeWithEnumMembersSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithShouldSerializeMethod::", new TypeWithShouldSerializeMethodSerializer()); - _tmp.Add(@"SerializationTypes.MoreChoices::", new MoreChoicesSerializer()); - _tmp.Add(@"SerializationTypes.XmlSerializerAttributes::AttributeTesting:False:", new XmlSerializerAttributesSerializer()); + _tmp.Add(@"TypeWithMismatchBetweenAttributeAndPropertyType::RootElement:True:", new TypeWithMismatchBetweenAttributeAndPropertyTypeSerializer()); + _tmp.Add(@"DefaultValuesSetToNegativeInfinity::", new DefaultValuesSetToNegativeInfinitySerializer()); + _tmp.Add(@"SerializationTypes.TypeWithArrayPropertyHavingChoice::", new TypeWithArrayPropertyHavingChoiceSerializer()); + _tmp.Add(@"TypeWithBinaryProperty::", new TypeWithBinaryPropertySerializer()); _tmp.Add(@"SerializationTypes.TypeWithPropertyNameSpecified::", new TypeWithPropertyNameSpecifiedSerializer()); - _tmp.Add(@"SerializationTypes.UIntEnum::", new UIntEnumSerializer()); - _tmp.Add(@"TypeWithTimeSpanProperty::", new TypeWithTimeSpanPropertySerializer()); - _tmp.Add(@"SerializationTypes.MyList::", new MyListSerializer()); - _tmp.Add(@"Brass::", new BrassSerializer()); - _tmp.Add(@"SerializationTypes.CustomElement::", new CustomElementSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithTypesHavingCustomFormatter::", new TypeWithTypesHavingCustomFormatterSerializer()); - _tmp.Add(@"SerializationTypes.TypeWithFieldsOrdered::", new TypeWithFieldsOrderedSerializer()); - _tmp.Add(@"PurchaseOrder:http://www.contoso1.com:PurchaseOrder:False:", new PurchaseOrderSerializer()); - _tmp.Add(@"SerializationTypes.IntEnum::", new IntEnumSerializer()); - _tmp.Add(@"SerializationTypes.DCStruct::", new DCStructSerializer()); - _tmp.Add(@"TypeWithDefaultTimeSpanProperty::", new TypeWithDefaultTimeSpanPropertySerializer()); + _tmp.Add(@"SerializationTypes.LongEnum::", new LongEnumSerializer()); + _tmp.Add(@"SerializationTypes.MoreChoices::", new MoreChoicesSerializer()); + _tmp.Add(@"SerializationTypes.DCClassWithEnumAndStruct::", new DCClassWithEnumAndStructSerializer()); if (typedSerializers == null) typedSerializers = _tmp; } return typedSerializers; @@ -16665,6 +17575,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; @@ -16723,7 +17634,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; @@ -16780,6 +17694,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(); @@ -16838,7 +17753,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.Private.Xml/src/System/Xml/Serialization/Mappings.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Mappings.cs index 08f4819eacdc28..0861f1d78f76bd 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Mappings.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Mappings.cs @@ -981,6 +981,31 @@ internal MemberMapping Clone() { return new MemberMapping(this); } + + internal bool Hides(MemberMapping mapping) + { + // Semantics. But all mappings would hide a null mapping, so indicating that this particular instance of mapping + // specifically hides a null mapping is not necessary and could be misleading. So just return false. + if (mapping == null) + return false; + + var baseMember = mapping.MemberInfo; + var derivedMember = this.MemberInfo; + + // Similarly, if either mapping (or both) lacks MemberInfo, then its not appropriate to say that one hides the other. + if (baseMember == null || derivedMember == null) + return false; + + // If the member names are different, they don't hide each other + if (baseMember.Name != derivedMember.Name) + return false; + + // Names are the same. So, regardless of field or property or accessibility or return type, if derivedDeclaringType is a + // subclass of baseDeclaringType, then the base member is hidden. + Type? baseDeclaringType = baseMember.DeclaringType; + Type? derivedDeclaringType = derivedMember.DeclaringType; + return baseDeclaringType != null && derivedDeclaringType != null && baseDeclaringType.IsAssignableFrom(derivedDeclaringType); + } } internal sealed class MembersMapping : TypeMapping 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 1b65d3a3a9ec76..66436843a79964 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 @@ -1633,6 +1633,11 @@ private static XmlSerializationCollectionFixupCallback GetCreateCollectionOfObje { 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(); @@ -1645,26 +1650,51 @@ private static XmlSerializationCollectionFixupCallback GetCreateCollectionOfObje 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) @@ -1680,6 +1710,21 @@ private static XmlSerializationCollectionFixupCallback GetCreateCollectionOfObje 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) @@ -1729,23 +1774,29 @@ private static XmlSerializationCollectionFixupCallback GetCreateCollectionOfObje 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) @@ -1757,9 +1808,10 @@ private static XmlSerializationCollectionFixupCallback GetCreateCollectionOfObje var setMemberValue = GetSetMemberValueDelegate(o, memberInfo.Name); setMemberValue(o, collection); } + + member.EnsureCollection?.Invoke(o!); } - ReadEndElement(); return o; } } @@ -2031,6 +2083,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 d26a26e68e1a77..e978fe1e6a8190 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; @@ -122,7 +123,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); } } @@ -146,10 +147,10 @@ private void WriteArray(object o, object? choiceSource, ElementAccessor[] elemen } } - WriteArrayItems(elements, text, choice, o); + WriteArrayItems(elements, text, choice, o, choiceSource); } - 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; @@ -158,7 +159,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 @@ -169,16 +171,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); } } } } - 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; @@ -216,16 +220,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; @@ -274,6 +297,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) @@ -369,7 +444,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/Types.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Types.cs index 30448a56fce3c7..3403d679a962e6 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Types.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Types.cs @@ -1033,13 +1033,16 @@ internal static MemberMapping[] GetAllMembers(StructMapping mapping) internal static void GetAllMembers(StructMapping mapping, List list) { + // Order matters. Legacy behavior gives deference to base mappings. So we start there. + // But we want to replace base mappings with overrides from the derived class. if (mapping.BaseMapping != null) { GetAllMembers(mapping.BaseMapping, list); } for (int i = 0; i < mapping.Members!.Length; i++) { - list.Add(mapping.Members[i]); + if (!TryReplaceHiddenMapping(list, mapping.Members[i])) + list.Add(mapping.Members[i]); } } @@ -1060,6 +1063,9 @@ internal static MemberMapping[] GetSettableMembers(StructMapping structMapping) private static void GetSettableMembers(StructMapping mapping, List list) { + // Similar to GetAllMembers, we want to replace base mappings with overrides from the derived class. + // Although I don't believe order matters here. We just want to make sure we don't have duplicates. + // Start with the base mapping. if (mapping.BaseMapping != null) { GetSettableMembers(mapping.BaseMapping, list); @@ -1075,9 +1081,25 @@ private static void GetSettableMembers(StructMapping mapping, List