驱蚊app
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.
 
 
 
 
 

21 rader
589 B

  1. using AppleAuth.Enums;
  2. using AppleAuth.Interfaces;
  3. using System;
  4. namespace AppleAuth.Extensions
  5. {
  6. public static class AppleErrorExtensions
  7. {
  8. public static AuthorizationErrorCode GetAuthorizationErrorCode(this IAppleError error)
  9. {
  10. if (error.Domain == "com.apple.AuthenticationServices.AuthorizationError" &&
  11. Enum.IsDefined(typeof(AuthorizationErrorCode), error.Code))
  12. {
  13. return (AuthorizationErrorCode)error.Code;
  14. }
  15. return AuthorizationErrorCode.Unknown;
  16. }
  17. }
  18. }