Ejemplo n.º 1
0
    public static bool IsOldVersion(this ISaveAsJson source, JSON data)
    {
        if (!data.ContainsKey(VersionKey))
        {
            throw new KeyNotFoundException($"El archivo NO contiene la VersionKey '{VersionKey}' para el tipo de archivo: {source.GetType()}");
        }

        int fileVersion = data.GetInt(VersionKey);

        return(fileVersion < source.Version);
    }