MailKit.Net.Imap.ImapClient.CreateAuthenticationException C# (CSharp) Метод

CreateAuthenticationException() статический приватный Метод

static private CreateAuthenticationException ( ImapCommand ic ) : MailKit.Security.AuthenticationException
ic ImapCommand
Результат MailKit.Security.AuthenticationException
		static AuthenticationException CreateAuthenticationException (ImapCommand ic)
		{
			if (string.IsNullOrEmpty (ic.ResponseText)) {
				for (int i = 0; i < ic.RespCodes.Count; i++) {
					if (ic.RespCodes[i].IsError || ic.RespCodes[i].Type == ImapResponseCodeType.Alert)
						return new AuthenticationException (ic.RespCodes[i].Message);
				}

				return new AuthenticationException ();
			}

			return new AuthenticationException (ic.ResponseText);
		}