public Task AppendEvents(string streamName, CommandMetadata metadata, params object[] events) { if (!events.Any()) { return(Task.CompletedTask); } var preparedEvents = events.Select(e => e.Serialize( Uuid.NewUuid(), EventMetadata.From(metadata) )).ToList(); return(_client.AppendToStreamAsync(_tenantPrefix + streamName, StreamState.Any, preparedEvents)); }