Exemplo n.º 1
0
        protected override void Handle(Request req)
        {
            JsonObject    root = ParseJson(req);
            List <object> list = (List <object>)root["servers"];

            for (int i = 0; i < list.Count; i++)
            {
                JsonObject      obj   = (JsonObject)list[i];
                ServerListEntry entry = FetchServerTask.ParseEntry(obj);
                Servers.Add(entry);
            }
        }
Exemplo n.º 2
0
        protected override void Handle(Request req)
        {
            int           index = 0; bool success = true;
            JsonObject    root = (JsonObject)Json.ParseValue((string)req.Data, ref index, ref success);
            List <object> list = (List <object>)root["servers"];

            for (int i = 0; i < list.Count; i++)
            {
                JsonObject      obj   = (JsonObject)list[i];
                ServerListEntry entry = FetchServerTask.ParseEntry(obj);
                Servers.Add(entry);
            }
        }