示例#1
0
 private void ChatClientOnOnNewSubscriber(object sender, NewSubscriberEventArgs eventArgs)
 {
     if (sender is IChatClient chatClient)
     {
         chatClient.SendMessage($"Welcome, {eventArgs.SubscriberName}! You are awesome! Thank you for subscribing!");
     }
 }
示例#2
0
 private void ChatClientOnOnNewSubscriber(object sender, NewSubscriberEventArgs eventArgs)
 {
     _logger.LogInformation($"Running {nameof(ChatClientOnOnNewSubscriber)}()");
     if (sender is IChatClient chatClient)
     {
         chatClient.SendMessage(
             $"Welcome, {eventArgs.SubscriberName}! You are awesome! Thank you for subscribing!");
     }
 }