fromValue static method

Implementation

static NSURLSessionAuthChallengeDisposition fromValue(int value) => switch (value) {
  0 => NSURLSessionAuthChallengeUseCredential,
  1 => NSURLSessionAuthChallengePerformDefaultHandling,
  2 => NSURLSessionAuthChallengeCancelAuthenticationChallenge,
  3 => NSURLSessionAuthChallengeRejectProtectionSpace,
  _ => throw ArgumentError('Unknown value for NSURLSessionAuthChallengeDisposition: $value'),
};