Skip to content

Add Process.StartShellExecute extension - #64

Merged
Tyrrrz merged 4 commits into
primefrom
copilot/add-process-start-shellexecute-extension
Apr 18, 2026
Merged

Tyrrrz merged 4 commits into
primefrom
copilot/add-process-start-shellexecute-extension

Conversation

Copilot AI commented Apr 18, 2026 •

Copy link
Copy Markdown
Contributor

Adds a StartShellExecute static extension on Process that opens a file or URL using the OS default handler (UseShellExecute = true).

Changes

  • ProcessExtensions.cs — new StartShellExecute(string fileName) method wrapping Process.Start(new ProcessStartInfo(fileName) { UseShellExecute = true })

Usage

// Open a file with its default associated application
using var process = Process.StartShellExecute("document.pdf");

// Open a URL in the default browser
using var process = Process.StartShellExecute("https://example.com");

@Tyrrrz Tyrrrz added the enhancement New feature or request label Apr 18, 2026
@Tyrrrz
Tyrrrz marked this pull request as ready for review April 18, 2026 19:43
Copilot AI review requested due to automatic review settings April 18, 2026 19:43
Agent-Logs-Url: https://github.com/Tyrrrz/PowerKit/sessions/2ca895cb-64e4-47d5-adeb-e85162081899

Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a new Process.StartShellExecute(string fileName) extension to start a file/URL via the OS shell (UseShellExecute = true), plus a corresponding test in the PowerKit test suite.

Changes:

  • Add Process.StartShellExecute(string fileName) that wraps Process.Start(new ProcessStartInfo(fileName) { UseShellExecute = true }).
  • Add StartShellExecute_Test (Windows-only) in ProcessExtensionsTests.

Reviewed changes

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

File Description
PowerKit/Extensions/ProcessExtensions.cs Adds the StartShellExecute helper on Process.
PowerKit.Tests/Extensions/ProcessExtensionsTests.cs Adds a Windows-only test exercising StartShellExecute.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@codecov

codecov Bot commented Apr 18, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 94.85%. Comparing base (ca0f66e) to head (aa5a05f).
⚠️ Report is 1 commits behind head on prime.

Files with missing lines Patch % Lines
PowerKit/Extensions/ProcessExtensions.cs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            prime      #64      +/-   ##
==========================================
- Coverage   94.89%   94.85%   -0.05%     
==========================================
  Files         120      120              
  Lines        2332     2333       +1     
  Branches      177      177              
==========================================
  Hits         2213     2213              
- Misses         85       86       +1     
  Partials       34       34              

☔ 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.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants