private static void MapServerInclPlayers(Action<Server> act, ServerQueryResult x) { var r = (SourceParseResult)x.Settings; // TODO: Why not map from x instead? var serverInfo = r.MapTo<ArmaServerWithPlayers>(); serverInfo.Ping = x.Ping; serverInfo.Players = x.Players.OfType<SourcePlayer>().ToList(); act(serverInfo); }
private static void MapServer(Action<Server> act, ServerQueryResult x) { var r = (SourceParseResult) x.Settings; // TODO: Why not map from x instead? var serverInfo = r.MapTo<ArmaServer>(); serverInfo.Ping = x.Ping; act(serverInfo); }