refactor(codebase): 整理 C# 註解、命名與格式#9
Merged
Merged
Conversation
Contributor
perditavojo
commented
Apr 16, 2026
- 統一事件處理器、引數與區域變數命名
- 補強註解可讀性並維持既有行為
- 套用 .editorconfig,並確認建置與測試通過
- 統一事件處理器、引數與區域變數命名 - 補強註解可讀性並維持既有行為 - 套用 .editorconfig,並確認建置與測試通過
Contributor
There was a problem hiding this comment.
Pull request overview
此 PR 以不改變既有行為為前提,統一與整理專案內多處 C# 的命名、註解與格式(包含事件處理器參數命名與測試中的變數命名),以提升可讀性與一致性。
Changes:
- 統一多個測試案例中的區域變數命名(例如
ex→capturedException、a/b→first/second、s→settings)。 - 重命名並補強多處事件處理器/私有方法的命名與 XML 註解(例如
UpdateState→RefreshInputState、Button eye-tracker handlers 命名一致化)。 - AppSettings 儲存流程中變數命名整理(
strJsonContent→jsonContent、strTempPath→tempPath)。
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/InputBox.Tests/VibrationPatternsTests.cs | 測試區域變數命名一致化,提升可讀性。 |
| tests/InputBox.Tests/TaskExtensionsTests.cs | 例外捕捉變數命名一致化(capturedException)。 |
| tests/InputBox.Tests/GamepadRepeatSettingsTests.cs | Record.Exception 結果變數命名一致化。 |
| tests/InputBox.Tests/AppSettingsTests.cs | 測試內 AppSettings 變數命名由 s 統一為 settings/snapshot。 |
| tests/InputBox.Tests/AnnouncementServiceTests.cs | Record.Exception 結果變數命名一致化。 |
| src/InputBox/Core/Input/FormInputContext.cs | 方法/參數命名與註解補強(UpdateState→RefreshInputState)。 |
| src/InputBox/Core/Extensions/ButtonEyeTrackerExtensions.cs | 狀態表與事件處理器命名一致化(_btnStates→_buttonStates、handlers rename)。 |
| src/InputBox/Core/Controls/PhraseEditDialog.cs | TextBox Enter/Leave handlers 命名與註解一致化。 |
| src/InputBox/Core/Configuration/AppSettings.cs | Save/WriteConfigToFile 區域變數命名整理。 |
Contributor
Author
|
@copilot apply changes based on the comments in this thread |
Agent-Logs-Url: https://github.com/rubujo/InputBox/sessions/5b199bb9-1211-47e7-aacd-5601adbe2787 Co-authored-by: perditavojo <117562794+perditavojo@users.noreply.github.com>
Contributor
Fixed in commit |
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.