public static BaseCommand ToBaseCommand(this CommandSendError value) { return(new BaseCommand { type = BaseCommand.Type.SendError, SendError = value }); }
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())); }
public static void Throw(this CommandSendError command) => Throw(command.Error, command.Message);