Method LinkStart
- Namespace
- MaaFramework.Binding
- Assembly
- MaaFramework.Binding.dll
LinkStart()
Starts the connection.
bool LinkStart()
Returns
LinkStart(ProcessStartInfo, CancellationToken)
Starts the agent server process using the specified System.Diagnostics.ProcessStartInfo and connects to the agent server.
To start a new process, the current MaaFramework.Binding.IMaaAgentClient.AgentServerProcess must have exited first.
The agent server process will be killed when System.IDisposable.Dispose is called.
bool LinkStart(ProcessStartInfo info, CancellationToken cancellationToken = default)
Parameters
info
ProcessStartInfo-
The process start info.
cancellationToken
CancellationToken-
An optional token to cancel the asynchronous operation waiting for the connection.
Returns
Exceptions
- OperationCanceledException
-
The
cancellationToken
has had cancellation requested.
LinkStart(AgentServerStartupMethod, CancellationToken)
Starts the agent server process using the specified System.Diagnostics.ProcessStartInfo and connects to the agent server.
To start a new process, the current MaaFramework.Binding.IMaaAgentClient.AgentServerProcess must have exited first.
The agent server process will be killed when System.IDisposable.Dispose is called.
bool LinkStart(IMaaAgentClient.AgentServerStartupMethod method, CancellationToken cancellationToken = default)
Parameters
method
IMaaAgentClient.AgentServerStartupMethod-
The delegate method that defines how to start the agent server process.
cancellationToken
CancellationToken-
An optional token to cancel the asynchronous operation waiting for the connection.
Returns
Exceptions
- OperationCanceledException
-
The
cancellationToken
has had cancellation requested.