Example #1
0
 public static BaseCommand ToBaseCommand(this CommandSendError value)
 {
     return(new BaseCommand
     {
         type = BaseCommand.Type.SendError,
         SendError = value
     });
 }
Example #2
0
        public static ReadOnlySequence <byte> NewSendError(long producerId, long sequenceId, ServerError error, string errorMsg)
        {
            var sendError = new CommandSendError
            {
                ProducerId = (ulong)producerId,
                SequenceId = (ulong)sequenceId,
                Error      = error,
                Message    = errorMsg
            };

            return(Serializer.Serialize(sendError.ToBaseCommand()));
        }
Example #3
0
 public static void Throw(this CommandSendError command)
 => Throw(command.Error, command.Message);