Exemple #1
0
        private static SavedGameRequestStatus AsRequestStatus(CommonErrorStatus.SnapshotOpenStatus status)
        {
            switch ((status + 5))
            {
            case ((CommonErrorStatus.SnapshotOpenStatus) 0):
                return(SavedGameRequestStatus.TimeoutError);

            case ~CommonErrorStatus.SnapshotOpenStatus.ERROR_NOT_AUTHORIZED:
                return(SavedGameRequestStatus.AuthenticationError);
            }
            if (status == CommonErrorStatus.SnapshotOpenStatus.VALID)
            {
                return(SavedGameRequestStatus.Success);
            }
            Logger.e("Encountered unknown status: " + status);
            return(SavedGameRequestStatus.InternalError);
        }
Exemple #2
0
        private static SavedGameRequestStatus AsRequestStatus(CommonErrorStatus.SnapshotOpenStatus status)
        {
            switch (status)
            {
            case CommonErrorStatus.SnapshotOpenStatus.VALID:
                return(SavedGameRequestStatus.Success);

            case CommonErrorStatus.SnapshotOpenStatus.ERROR_NOT_AUTHORIZED:
                return(SavedGameRequestStatus.AuthenticationError);

            case CommonErrorStatus.SnapshotOpenStatus.ERROR_TIMEOUT:
                return(SavedGameRequestStatus.TimeoutError);

            default:
                Logger.e("Encountered unknown status: " + status);
                return(SavedGameRequestStatus.InternalError);
            }
        }
Exemple #3
0
        private static SavedGameRequestStatus AsRequestStatus(CommonErrorStatus.SnapshotOpenStatus status)
        {
            CommonErrorStatus.SnapshotOpenStatus snapshotOpenStatus = status;
            switch (snapshotOpenStatus + 5)
            {
            case ~(CommonErrorStatus.SnapshotOpenStatus.ERROR_INTERNAL | CommonErrorStatus.SnapshotOpenStatus.VALID):
                return(SavedGameRequestStatus.TimeoutError);

            case ~CommonErrorStatus.SnapshotOpenStatus.ERROR_NOT_AUTHORIZED:
                return(SavedGameRequestStatus.AuthenticationError);

            default:
                if (snapshotOpenStatus == CommonErrorStatus.SnapshotOpenStatus.VALID)
                {
                    return(SavedGameRequestStatus.Success);
                }
                Logger.e("Encountered unknown status: " + (object)status);
                return(SavedGameRequestStatus.InternalError);
            }
        }