Skip to content

Commit

Permalink
[#NON] #REVIEW 'assemblyName: DotNet.Testcontainers; function: DoNotC…
Browse files Browse the repository at this point in the history
…onsumeStdoutOrStderr'

{Dipose DoNotConsumeStdoutOrStderr.}
  • Loading branch information
HofmeisterAn committed Jul 7, 2020
1 parent 07710ac commit 9927961
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#addin nuget:?package=Cake.Sonar&version=1.1.25

#addin nuget:?package=Cake.Git&version=0.21.0
#addin nuget:?package=Cake.Git&version=0.22.0

#load "./build/parameters.cake"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,33 @@
namespace DotNet.Testcontainers.Containers.OutputConsumers.Common
{
using System;
using System.IO;

/// <inheritdoc cref="IOutputConsumer" />
internal sealed class DoNotConsumeStdoutOrStderr : IOutputConsumer
{
public DoNotConsumeStdoutOrStderr()
{
this.Stdout = Stream.Null;
this.Stderr = Stream.Null;
}

~DoNotConsumeStdoutOrStderr()
{
this.Dispose();
}

/// <inheritdoc />
public Stream Stdout { get; } = Stream.Null;
public Stream Stdout { get; }

/// <inheritdoc />
public Stream Stderr { get; } = Stream.Null;
public Stream Stderr { get; }

public void Dispose()
{
this.Stdout.Dispose();
this.Stderr.Dispose();
GC.SuppressFinalize(this);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ namespace DotNet.Testcontainers.Containers.WaitStrategies.Windows
{
internal class UntilCommandIsCompleted : Unix.UntilCommandIsCompleted
{
public UntilCommandIsCompleted(string command) : base("PowerShell", "-Command", command)
public UntilCommandIsCompleted(string command) : this("PowerShell", "-Command", command)
{
}

Expand Down
2 changes: 1 addition & 1 deletion tools/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Cake" version="0.38.1" />
<package id="Cake" version="0.38.4" />
</packages>

0 comments on commit 9927961

Please sign in to comment.