Rename *.Win32.cs files to *.Windows.cs under src/libraries#126450
Rename *.Win32.cs files to *.Windows.cs under src/libraries#126450adamsitnik merged 12 commits intomainfrom
Conversation
- Simple renames (git mv): - FileSystemWatcher.Win32.cs → FileSystemWatcher.Windows.cs - Helper.Win32.cs → Helper.Windows.cs - SerialPort.Win32.cs → SerialPort.Windows.cs - HijriCalendar.Win32.cs → HijriCalendar.Windows.cs - TimeZoneInfo.Win32.cs → TimeZoneInfo.Windows.cs - Merges into existing *.Windows.cs files: - Process.Win32.cs → Process.Windows.cs - ProcessManager.Win32.cs → ProcessManager.Windows.cs - ProcessStartInfo.Win32.cs → ProcessStartInfo.Windows.cs - NamedPipeServerStream.Win32.cs → NamedPipeServerStream.Windows.cs - SerialStream.Win32.cs → SerialStream.Windows.cs - Environment.Win32.cs → Environment.Windows.cs - Update all csproj/projitems references accordingly Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/83a23c04-d0aa-492f-acdb-eedb3180129e Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Windows.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj
Outdated
Show resolved
Hide resolved
src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Windows.cs
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/4fbed1e0-953b-46f4-9dbb-362ec3c39f8d Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/f3b5a881-2020-4b1e-aba9-b3379e2efbf4 Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
|
@adamsitnik This is fixing an artificial split of Windows-specific implementation for Process and a few other types that makes it hard to navigate the code (for me at least). This artificial split is left-over from the times when Windows Store apps were not allowed to use most Win32 APIs. |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
This PR standardizes Windows-specific source file naming under src/libraries by renaming *.Win32.cs files to *.Windows.cs, merging content where *.Windows.cs already existed, and updating project item includes accordingly. This reduces historical ambiguity around “Win32 vs Windows” naming and aligns with current platform-specific file conventions.
Changes:
- Renamed / merged multiple Windows-specific partial implementation files from
*.Win32.csto*.Windows.cs. - Updated
.csprojand.projitemscompile includes to match the new filenames (and removed deleted*.Win32.csentries). - Updated cross-platform coding guidelines documentation examples to reflect the
*.Windows.csconvention.
Reviewed changes
Copilot reviewed 19 out of 24 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Windows.cs | New Windows-specific implementation file (renamed from Win32 variant). |
| src/libraries/System.Private.CoreLib/src/System/Globalization/HijriCalendar.Windows.cs | New Windows-specific Hijri calendar registry logic file. |
| src/libraries/System.Private.CoreLib/src/System/Environment.Windows.cs | Merged Windows registry/env-var logic into the Windows file. |
| src/libraries/System.Private.CoreLib/src/System/Environment.Win32.cs | Deleted after merge into Environment.Windows.cs. |
| src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems | Updated compile includes to reference *.Windows.cs files. |
| src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.Windows.cs | Merged Win32-only helper (OpenPort) into Windows file. |
| src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.Win32.cs | Deleted after merge into SerialStream.Windows.cs. |
| src/libraries/System.IO.Ports/src/System/IO/Ports/SerialPort.Windows.cs | New Windows-specific SerialPort implementation file. |
| src/libraries/System.IO.Ports/src/System.IO.Ports.csproj | Updated compile includes to use *.Windows.cs filenames. |
| src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeServerStream.Windows.cs | Merged Win32-only helper into Windows file. |
| src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeServerStream.Win32.cs | Deleted after merge into NamedPipeServerStream.Windows.cs. |
| src/libraries/System.IO.Pipes/src/System.IO.Pipes.csproj | Removed deleted *.Win32.cs compile include. |
| src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.Windows.cs | New Windows-specific helper file (renamed from Win32 variant). |
| src/libraries/System.IO.IsolatedStorage/src/System.IO.IsolatedStorage.csproj | Updated compile include to Helper.Windows.cs. |
| src/libraries/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.Windows.cs | New Windows-specific watcher implementation file (renamed from Win32 variant). |
| src/libraries/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj | Updated compile include to FileSystemWatcher.Windows.cs. |
| src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessStartInfo.Windows.cs | Merged Win32-only Verbs implementation into Windows file. |
| src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessStartInfo.Win32.cs | Deleted after merge into ProcessStartInfo.Windows.cs. |
| src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Windows.cs | Merged Win32-only helpers (main window + module/process info). |
| src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Win32.cs | Deleted after merge into ProcessManager.Windows.cs. |
| src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Windows.cs | Merged Win32-only fields/helpers into Windows file. |
| src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Win32.cs | Deleted after merge into Process.Windows.cs. |
| src/libraries/System.Diagnostics.Process/src/System.Diagnostics.Process.csproj | Removed redundant Windows-only ItemGroup after consolidating includes. |
| docs/coding-guidelines/cross-platform-guidelines.md | Updated naming guidance example to use *.Windows.cs. |
src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Windows.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Windows.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeServerStream.Windows.cs
Show resolved
Hide resolved
src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Windows.cs
Outdated
Show resolved
Hide resolved
…s/ProcessManager.Windows.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…s/ProcessManager.Windows.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…s/ProcessManager.Windows.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeServerStream.Windows.cs
Outdated
Show resolved
Hide resolved
@copilot Address this feedback |
…cs in IsolatedStorage.Tests.csproj Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/cd6ef44b-8964-4040-91cc-d7a2bff92c64 Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Windows.cs
Show resolved
Hide resolved
🤖 Copilot Code Review — PR #126450Note This review was generated by Copilot. Holistic AssessmentMotivation: Justified housekeeping — the Approach: The approach is correct and well-executed — simple Summary: ✅ LGTM. This is a purely mechanical rename/merge with no functional code changes. The merged content is identical to the original source. All review feedback from Detailed Findings✅ File Renames — Correct and completeAll 11
No remaining ✅ Content Merges — No code lost or modifiedVerified the merged content for the 6 merge targets ( ✅ Project File Updates — Consistent
✅ Review Feedback — All addressed
✅ Documentation — Updated
💡 Using Directive Order — MinorIn
|
|
Tagging subscribers to this area: @dotnet/area-meta |
adamsitnik
left a comment
There was a problem hiding this comment.
LGTM, let's merge it now so we don't have to solve even more merge conflicts in the near future.
@jkotas thank you for improving this and providing the historical background!
…26450) Renames all `*.Win32.cs` files under `src/libraries` to `*.Windows.cs`. If a corresponding `*.Windows.cs` already exists, the content of the `*.Win32.cs` file is merged into it. `win32.cs` vs. `windows.cs` is a historic leftover from the times when Windows Store apps were not able to use the full Win32 API surface. It does not make sense anymore. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com> Co-authored-by: Jan Kotas <jkotas@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Renames all
*.Win32.csfiles undersrc/librariesto*.Windows.cs. If a corresponding*.Windows.csalready exists, the content of the*.Win32.csfile is merged into it.win32.csvs.windows.csis a historic leftover from the times when Windows Store apps were not able to use the full Win32 API surface. It does not make sense anymore.Changes
Simple renames (git history preserved via
git mv):FileSystemWatcher.Win32.cs→FileSystemWatcher.Windows.csHelper.Win32.cs→Helper.Windows.csSerialPort.Win32.cs→SerialPort.Windows.csHijriCalendar.Win32.cs→HijriCalendar.Windows.csTimeZoneInfo.Win32.cs→TimeZoneInfo.Windows.csMerges (Win32.cs content merged into existing Windows.cs, then Win32.cs deleted):
Process.Win32.cs→ merged intoProcess.Windows.csProcessManager.Win32.cs→ merged intoProcessManager.Windows.csProcessStartInfo.Win32.cs→ merged intoProcessStartInfo.Windows.csNamedPipeServerStream.Win32.cs→ merged intoNamedPipeServerStream.Windows.csSerialStream.Win32.cs→ merged intoSerialStream.Windows.csEnvironment.Win32.cs→ merged intoEnvironment.Windows.csBuild/project file updates:
.csproj/.projitemsreferences'$(TargetPlatformIdentifier)' == 'windows'ItemGroupblocks inSystem.Diagnostics.Process.csprojSystem.IO.IsolatedStorage.Tests.csproj(Helper.Win32.cs→Helper.Windows.cs)Code style fixes (per review feedback):
Process.Windows.cs,ProcessManager.Windows.cs,Environment.Windows.cs) to conform with coding guidelinesMainWindowFinderstruct indentation inProcessManager.Windows.csusingdirectives and fixed missing blank lines inEnvironment.Windows.csDocumentation:
docs/coding-guidelines/cross-platform-guidelines.mdto useWindows.csnaming convention in the exampleNote
This PR was created with the assistance of GitHub Copilot.