Skip to content

Conversation

@konard
Copy link
Member

@konard konard commented Oct 30, 2025

Summary

This PR adds a new script ReplaceAwaitResultWithResult.sh that automates the replacement of .AwaitResult() calls with .Result property access in all C# files.

Changes

  • Created CodeChanges/ReplaceAwaitResultWithResult.sh
  • The script uses sed with regex to find and replace .AwaitResult() with .Result
  • Handles edge cases with spaces around the dot operator (e.g., . AwaitResult ())

Usage

bash CodeChanges/ReplaceAwaitResultWithResult.sh

The script will recursively find all .cs files in the current directory and subdirectories and perform the replacement.

Testing

  • Tested locally with various edge cases including:
    • Simple .AwaitResult() calls
    • Chained method calls
    • Multiple occurrences on the same line
    • Cases with extra spaces around operators
    • Correctly ignores AwaitResult without parentheses

Fixes #20


🤖 Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: undefined
@konard konard self-assigned this Oct 30, 2025
This script finds all .cs files and replaces .AwaitResult() calls with .Result property access.
The replacement handles cases with or without spaces around the dot operator.

Fixes #20

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard changed the title [WIP] Write and run script that changes AwaitResult() to Result in .*.cs files Add script to replace .AwaitResult() with .Result in C# files Oct 30, 2025
This file was used for AI processing and is no longer needed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard marked this pull request as ready for review October 30, 2025 04:23
@konard
Copy link
Member Author

konard commented Oct 30, 2025

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

📎 Log file uploaded as GitHub Gist (215KB)
🔗 View complete solution draft log


Now working session is ended, feel free to review and add any feedback on the solution draft.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Write and run script that changes AwaitResult() to Result in .*.cs files

2 participants