<PackageReference Include="SSH.NET" Version="2016.0.0" />

CountdownEvent

Represents a synchronization primitive that is signaled when its count reaches zero.
public int CurrentCount { get; }

Gets the number of remaining signals required to set the event.

public bool IsSet { get; }

Indicates whether the CountdownEvent's current count has reached zero.

public CountdownEvent(int initialCount)

Initializes a new instance of CountdownEvent class with the specified count.

public void AddCount()

Increments the CountdownEvent's current count by one.

public void Dispose()

Releases all resources used by the current instance of the CountdownEvent class.

protected virtual void Dispose(bool disposing)

Releases the unmanaged resources used by the CountdownEvent, and optionally releases the managed resources.

public bool Signal()

Registers a signal with the CountdownEvent, decrementing the value of CurrentCount.

public bool Wait(TimeSpan timeout)

Blocks the current thread until the CountdownEvent is set, using a TimeSpan to measure the timeout.