Method GetRestServerAgentAsync
- Namespace
- Kepware.Api.ClientHandler
- Assembly
- Kepware.Api.dll
GetRestServerAgentAsync(string, CancellationToken)
Gets a REST Server agent with the specified name.
public Task<RestServerAgent?> GetRestServerAgentAsync(string name, CancellationToken cancellationToken = default)
Parameters
namestringThe name of the agent.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<RestServerAgent>
The loaded RestServerAgent or null if not found.
Exceptions
- ArgumentException
Thrown when the name is null or empty.