public static BaseCommand ToBaseCommand(this CommandAuthResponse value) { return(new BaseCommand { type = BaseCommand.Type.AuthResponse, authResponse = value }); }
public static ReadOnlySequence <byte> NewAuthResponse(string authMethod, AuthData clientData, int clientProtocolVersion, string clientVersion) { var authData = new AuthData { auth_data = clientData.auth_data, AuthMethodName = authMethod }; var response = new CommandAuthResponse { Response = authData, ProtocolVersion = clientProtocolVersion, ClientVersion = clientVersion ?? "Pulsar Client" }; return(Serializer.Serialize(response.ToBaseCommand())); }