Du kan inte välja fler än 25 ämnen
Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
|
- using AppleAuth.Enums;
- using AppleAuth.Interfaces;
- using System;
-
- namespace AppleAuth.Extensions
- {
- public static class AppleErrorExtensions
- {
- public static AuthorizationErrorCode GetAuthorizationErrorCode(this IAppleError error)
- {
- if (error.Domain == "com.apple.AuthenticationServices.AuthorizationError" &&
- Enum.IsDefined(typeof(AuthorizationErrorCode), error.Code))
- {
- return (AuthorizationErrorCode)error.Code;
- }
-
- return AuthorizationErrorCode.Unknown;
- }
- }
- }
|