Skip to content

Commit

Permalink
asd
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyrrrz committed Nov 23, 2023
1 parent 045c946 commit fd2acf4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
15 changes: 0 additions & 15 deletions CliWrap.Magic/CliWrapExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,6 @@ namespace CliWrap.Magic;
/// </summary>
public static class CliWrapExtensions
{
/// <summary>
/// Deconstructs the result into its components.
/// </summary>
public static void Deconstruct(
this BufferedCommandResult result,
out int exitCode,
out string standardOutput,
out string standardError
)
{
exitCode = result.ExitCode;
standardOutput = result.StandardOutput;
standardError = result.StandardError;
}

/// <summary>
/// Executes the command with magic.
/// </summary>
Expand Down
15 changes: 14 additions & 1 deletion CliWrap.Magic/MagicalCommandResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace CliWrap.Magic;
/// <summary>
/// Result of a command execution, with buffered text data from standard output and standard error streams.
/// </summary>
public class MagicalCommandResult : BufferedCommandResult
public partial class MagicalCommandResult : BufferedCommandResult
{
/// <summary>
/// Initializes an instance of <see cref="MagicalCommandResult" />.
Expand All @@ -20,6 +20,19 @@ string standardError
)
: base(exitCode, startTime, exitTime, standardOutput, standardError) { }

/// <summary>
/// Deconstructs the result into its components.
/// </summary>
public void Deconstruct(out int exitCode, out string standardOutput, out string standardError)
{
exitCode = ExitCode;
standardOutput = StandardOutput;
standardError = StandardError;
}
}

public partial class MagicalCommandResult
{
/// <summary>
/// Converts the result to an integer value that corresponds to the <see cref="CommandResult.ExitCode" /> property.
/// </summary>
Expand Down

0 comments on commit fd2acf4

Please sign in to comment.