public async Task <IAsyncEnumerable <Person> > OnTypingAsync( [Service] IEventTopicObserver eventTopicObserver, [GlobalState] string currentUserEmail, CancellationToken cancellationToken) => await eventTopicObserver.SubscribeAsync <string, Person>( $"typing_to_{currentUserEmail}", cancellationToken) .ConfigureAwait(false);
public async Task <IAsyncEnumerable <Message> > OnMessageReceivedAsync( [GlobalState] string currentUserEmail, [Service] IEventTopicObserver eventTopicObserver, CancellationToken cancellationToken) { return(await eventTopicObserver.SubscribeAsync <string, Message>( currentUserEmail, cancellationToken) .ConfigureAwait(false)); }
public async Task <IAsyncEnumerable <Person> > OnOnlineAsync( [Service] IEventTopicObserver eventTopicObserver, CancellationToken cancellationToken) => await eventTopicObserver.SubscribeAsync <string, Person>( "online", cancellationToken) .ConfigureAwait(false);