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

MessageEventArgs<T>

public class MessageEventArgs<T> : EventArgs
Provides data for message events.
using Renci.SshNet.Common; using System; using System.Text.RegularExpressions; using Renci.SshNet.Common; using System; using System.Text.RegularExpressions; namespace Renci.SshNet { public class ExpectAction { public Regex Expect { get; set; } public Action<string> Action { get; set; } public ExpectAction(Regex expect, Action<string> action) { ThrowHelper.ThrowIfNull(expect, "expect"); ThrowHelper.ThrowIfNull(action, "action"); Expect = expect; Action = action; } public ExpectAction(string expect, Action<string> action) { ThrowHelper.ThrowIfNull(expect, "expect"); ThrowHelper.ThrowIfNull(action, "action"); Expect = new Regex(Regex.Escape(expect)); Action = action; } } }