Exemplo n.º 1
0
        static Server CreateServerFromStored(ISupportServers game, IServerBla stored,
                                             IDictionary <string, string> settings)
        {
            var server = game.CreateServer(stored.Address);

            server.UpdateInfoFromResult(CreateQueryResult(stored.QueryMode, settings));
            return(server);
        }
Exemplo n.º 2
0
        static Dictionary <string, string> ToDict(IServerBla stored) => stored.QueryMode == ServerQueryMode.Steam
    ? new Dictionary <string, string>
        {
            { "name", stored.Name },
            { "modNames:1-1", stored.Mod },
            { "folder", stored.GameName }
        }

    : new Dictionary <string, string> {
            { "hostname", stored.Name },
            { "mod", stored.Mod },
            { "gamename", stored.GameName }
        };
Exemplo n.º 3
0
 public static Server FromStored(ISupportServers game, IServerBla stored) => CreateServerFromStored(game, stored, ToDict(stored));