Пример #1
0
        public void FetchAllSavedGames(DataSource source,
                                       Action <SavedGameRequestStatus, List <ISavedGameMetadata> > callback)
        {
            Misc.CheckNotNull(callback);

            callback = ToOnGameThread(callback);

            mSnapshotManager.FetchAll(AsDataSource(source),
                                      response => {
                if (!response.RequestSucceeded())
                {
                    callback(AsRequestStatus(response.ResponseStatus()),
                             new List <ISavedGameMetadata>());
                }
                else
                {
                    callback(SavedGameRequestStatus.Success,
                             response.Data().Cast <ISavedGameMetadata>().ToList());
                }
            });
        }