Class SignalRService
public sealed class SignalRService : ISignalRService, IAsyncDisposable
- Inheritance
-
SignalRService
- Implements
- Inherited Members
Constructors
SignalRService(string, Action<HttpConnectionOptions>?)
public SignalRService(string baseUrl, Action<HttpConnectionOptions>? configureConnection = null)
Parameters
baseUrlstringconfigureConnectionAction<HttpConnectionOptions>
Properties
ConnectionError
public string ConnectionError { get; }
Property Value
IsConnected
public bool IsConnected { get; }
Property Value
Methods
ConnectAsync()
public Task ConnectAsync()
Returns
ConnectAsync(string, string?)
public Task ConnectAsync(string baseUrl, string? token = null)
Parameters
Returns
DisposeAsync()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.
public ValueTask DisposeAsync()
Returns
- ValueTask
A task that represents the asynchronous dispose operation.
StreamChatAsync(string, string, CancellationToken)
Streams a chat message to an agent and yields content chunks as they arrive.
public IAsyncEnumerable<AgentStreamChunk> StreamChatAsync(string agentId, string message, CancellationToken ct = default)
Parameters
agentIdstringmessagestringctCancellationToken
Returns
Events
OnActivityEvent
public event EventHandler<ActivityEventArgs>? OnActivityEvent
Event Type
OnAgentMessage
public event EventHandler<AgentMessageEventArgs>? OnAgentMessage
Event Type
OnChannelStatusChanged
public event EventHandler<ChannelStatusEventArgs>? OnChannelStatusChanged
Event Type
OnStateChanged
public event EventHandler? OnStateChanged