Repository navigation
Conversation
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…ual instead of hidden.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Several added test declarations lack the repository-required behavior-focused XML summaries.
5 open findings
What changed in this PR
Normalizes internal UDT and XML TDS metadata naming and cloning while preserving parser and reader behavior.
Changes:
- Introduces
TdsUdtTypeInfoandTdsXmlTypeInfo. - Replaces
CopyFromwith typed cloning and copy constructors. - Updates consumers and adds clone/default-value tests.
Required XML summaries remain missing from several new tests. CI is still running.
| File | Description |
|---|---|
TdsXmlTypeInfoTests.cs |
Tests XML metadata cloning and defaults. |
TdsUdtTypeInfoTests.cs |
Tests UDT metadata cloning and defaults. |
TdsColumnMetadataTests.cs |
Tests column cloning and packed flags. |
SqlParameter.cs |
Migrates XML metadata and cloning. |
SqlDbColumn.cs |
Uses normalized UDT metadata. |
SqlDataReader.cs |
Updates UDT/XML metadata access. |
SqlConnection.cs |
Updates UDT type resolution. |
TdsXmlTypeInfo.cs |
Adds normalized XML metadata type. |
TdsUdtTypeInfo.cs |
Adds normalized UDT metadata type. |
TdsTypeInfo.cs |
Adds copy construction and renamed properties. |
TdsColumnMetadataToken.cs |
Uses typed column cloning. |
TdsColumnMetadata.cs |
Adds typed copy construction. |
SqlMetaDataXmlSchemaCollection.cs |
Removes legacy XML metadata type. |
SqlMetaDataUdt.cs |
Removes legacy UDT metadata type. |
TdsParser.cs |
Populates normalized metadata types. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| Assert.Equal(original.XmlTypeInfo.Name, clone.XmlTypeInfo.Name); | ||
| } | ||
|
|
||
| [Fact] |
|
|
||
| namespace Microsoft.Data.SqlClient.Parser.Tokens; | ||
|
|
||
| public class TdsUdtTypeInfoTests |
|
|
||
| public class TdsUdtTypeInfoTests | ||
| { | ||
| [Fact] |
|
|
||
| namespace Microsoft.Data.SqlClient.Parser.Tokens; | ||
|
|
||
| public class TdsXmlTypeInfoTests |
|
|
||
| public class TdsXmlTypeInfoTests | ||
| { | ||
| [Fact] |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Applies the normalized TDS metadata model to user-defined type and XML schema metadata.
SqlMetaDataUdtandSqlMetaDataXmlSchemaCollectiontoTdsUdtTypeInfoandTdsXmlTypeInfo.CopyFrompattern with conventional clone methods and copy constructors across UDT, XML, column, and general type metadata.This is layer 3 of 3 in the TDS parser organization stack. It targets
dev/russellben/tokens/tdstypeinfo(PR #4811), so review should focus on UDT/XML metadata and clone semantics.Issues
Supersedes closed PR #4677. No linked issue; this is an internal naming and maintainability refactor.
Testing
Adds focused unit coverage for cloning the affected metadata types. No new test run was performed during PR submission.
Guidelines
Tests added or updated
Public API changes documented (not applicable; no public API change intended)
Verified against customer repro (not applicable)
Ensure no breaking changes introduced
Contributing
Code of Conduct
Best Practices
Coding Style
Review Process