コード例 #1
0
ファイル: CommandExtensions.cs プロジェクト: eaba/dotpulsar
 public static BaseCommand AsBaseCommand(this CommandPong command)
 {
     return(new BaseCommand
     {
         CommandType = BaseCommand.Type.Pong,
         Pong = command
     });
 }
コード例 #2
0
 public static BaseCommand ToBaseCommand(this CommandPong value)
 {
     return(new BaseCommand
     {
         type = BaseCommand.Type.Pong,
         Pong = value
     });
 }
コード例 #3
0
 public PingPongHandler(IConnection connection)
 {
     _connection = connection;
     _pong       = new CommandPong();
 }
コード例 #4
0
 public Task Send(CommandPong command, CancellationToken cancellationToken)
 => Send(command.AsBaseCommand(), cancellationToken);
コード例 #5
0
ファイル: Connection.cs プロジェクト: eaba/dotpulsar
 public async Task Send(CommandPong command) => await Send(command.AsBaseCommand());