Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Merge | SqlBuffer#3368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
benrr101 merged 2 commits intomainfromdev/russellben/merge/sqlbuffer
May 23, 2025
Merged

Merge | SqlBuffer#3368

benrr101 merged 2 commits intomainfromdev/russellben/merge/sqlbuffer
May 23, 2025

Conversation

benrr101
Copy link
Contributor

Description

The SqlBuffer class has a netfx-specific partial with two methods in it. We can easily add them to the common project SqlBuffer class and remove the netfx partial. That is exactly what this PR does.

Issues

Assists with#1261

Testing

Project still builds, no changes to the functionality of the code at all.

@benrr101benrr101 added this to the6.1-preview2 milestoneMay 20, 2025
@CopilotCopilotAI review requested due to automatic review settingsMay 20, 2025 23:07
@benrr101benrr101 added the Common Project 🚮Things that relate to the common project project labelMay 20, 2025
@benrr101benrr101 requested a review froma team as acode ownerMay 20, 2025 23:07
Copy link
Contributor

@CopilotCopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Pull Request Overview

This PR merges two .NET Framework–specific methods (SetToDate andSetToDateTime2) into the commonSqlBuffer class and removes the separate NetFX partial file and its csproj include, reducing code duplication.

  • Convertedinternal sealed partial class SqlBuffer to a single class and added#if NETFRAMEWORK guards around the two date methods.
  • DeletedSqlBuffer.netfx.cs and removed its compile entry from the NetFX project file.
  • No behavioral changes; class still builds under all TFMs.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

FileDescription
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlBuffer.csRemovedpartial keyword, inlined NetFX methods with#if NETFRAMEWORK
src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlBuffer.netfx.csDeleted redundant NetFX partial file
src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csprojRemoved<Compile Include="SqlBuffer.netfx.cs" />
Comments suppressed due to low confidence (2)

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlBuffer.cs:1262

  • These new methods lack direct unit tests—add tests to verify thatSetToDate andSetToDateTime2 correctly set internal fields for various inputs.
internal void SetToDateTime2(DateTime dateTime, byte scale)

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlBuffer.cs:1242

  • [nitpick] Consider adding XML doc comments to explain whatSetToDate does and any expectations (e.g., valid date range).
internal void SetToDate(DateTime date)

@codecovCodecov
Copy link

codecovbot commentedMay 22, 2025
edited
Loading

Codecov Report

Attention: Patch coverage is0% with10 lines in your changes missing coverage. Please review.

Project coverage is 67.08%. Comparing base(b8948f2) to head(4d9843c).
Report is 3 commits behind head on main.

Files with missing linesPatch %Lines
...qlClient/src/Microsoft/Data/SqlClient/SqlBuffer.cs0.00%10 Missing⚠️
Additional details and impacted files
@@            Coverage Diff             @@##             main    #3368      +/-   ##==========================================+ Coverage   67.04%   67.08%   +0.04%==========================================  Files         300      299       -1       Lines       65376    65376              ==========================================+ Hits        43831    43860      +29+ Misses      21545    21516      -29
FlagCoverage Δ
addons92.58% <ø> (ø)
netcore72.21% <ø> (+0.02%)⬆️
netfx65.23% <0.00%> (+0.04%)⬆️

Flags with carried forward coverage won't be shown.Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report?Share it here.

🚀 New features to boost your workflow:
  • ❄️Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@benrr101benrr101 merged commit9ef7f78 intomainMay 23, 2025
251 checks passed
@benrr101benrr101 deleted the dev/russellben/merge/sqlbuffer branchMay 23, 2025 16:18
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

@mdaiglemdaiglemdaigle approved these changes

@paulmedynskipaulmedynskipaulmedynski approved these changes

Assignees
No one assigned
Labels
Common Project 🚮Things that relate to the common project project
Projects
None yet
Milestone
6.1-preview2
Development

Successfully merging this pull request may close these issues.

3 participants
@benrr101@mdaigle@paulmedynski

[8]ページ先頭

©2009-2025 Movatter.jp