public async Task HandleAsync(ChannelReader <byte> reader, ChannelWriter <byte> writer, Client clientModel) { var request = await RS_REALMLIST_Reader.ReadAsync(reader); var realmList = await accountStorage.GetRealmListAsync(); var realms = realmList.Select(x => new AUTH_REALMLIST.Realm( x.address, x.name, x.port, x.timezone, x.icon, x.realmflags, x.population, x.numchars)); await AUTH_REALMLIST_Writer.WriteAsync(writer, new AUTH_REALMLIST(request.Unk, realms.ToArray())); }
public async Task HandleAsync(ChannelReader <byte> reader, ChannelWriter <byte> writer, Client clientModel) { Requests.RS_REALMLIST request = await RS_REALMLIST_Reader.ReadAsync(reader); System.Collections.Generic.List <Storage.Entities.RealmListItemEntitiy> realmList = await accountStorage.GetRealmListAsync(); System.Collections.Generic.IEnumerable <AUTH_REALMLIST.Realm> realms = realmList.Select(x => new AUTH_REALMLIST.Realm( x.address, x.name, x.port, x.timezone, x.icon, x.realmflags, x.population, x.numchars)); await AUTH_REALMLIST_Writer.WriteAsync(writer, new AUTH_REALMLIST(request.Unk, realms.ToArray())); }