TermRemoteCtl/apps/windows_agent/src/TermRemoteCtl.Agent/Terminal/ConPtySessionFactory.cs

18 lines
505 B
C#

using System.Runtime.Versioning;
namespace TermRemoteCtl.Agent.Terminal;
[SupportedOSPlatform("windows")]
internal sealed class ConPtySessionFactory : IConPtySessionFactory
{
public IConPtySession Create(string sessionId)
{
ConPtyInterop.EnsureSupported();
return new HelperBackedConPtySession(
sessionId,
ConPtyInterop.ResolveShellPath(),
ConPtyInterop.ResolveShellArguments(),
HelperPathResolver.ResolveHelperExePath());
}
}