Exemplo n.º 1
0
    public void loadJson(JsonObject jo)
    {
        if (!jo.ContainsKey("Type"))
        {
            throw new InvalidLoadType("Missing Type field, this is not valid json object");
        }
        if (jo["Type"] != _MySavingType)
        {
            throw new InvalidLoadType("JsonObject has invalid type: " + jo["Type"]);
        }

        HashSet <string> importedFlags = JsonFactory.fromJsonHashSet(jo["FSet"]);

        this.flags = importedFlags;
    }