// Token: 0x06000FA8 RID: 4008 RVA: 0x0003FD3C File Offset: 0x0003DF3C
        private ImapConnectionSettings BuildImapConnectionSettings(XElement settings)
        {
            Fqdn attributeValue  = GlobalConnectionSettingsProvider.GetAttributeValue <Fqdn>(settings, "in-serv", new Func <string, string, Fqdn>(GlobalConnectionSettingsProvider.ServerAttributeToFqdn));
            int  attributeValue2 = GlobalConnectionSettingsProvider.GetAttributeValue <int>(settings, "in-port", new Func <string, string, int>(GlobalConnectionSettingsProvider.ServerAttributeToInteger));
            ImapSecurityMechanism attributeValue3 = GlobalConnectionSettingsProvider.GetAttributeValue <ImapSecurityMechanism>(settings, "in-ssl", delegate(string attrName, string val)
            {
                if (!val.Equals("1", StringComparison.Ordinal))
                {
                    return(ImapSecurityMechanism.None);
                }
                return(ImapSecurityMechanism.Ssl);
            });

            return(new ImapConnectionSettings(attributeValue, attributeValue2, ImapAuthenticationMechanism.Basic, attributeValue3));
        }
 // Token: 0x06000F76 RID: 3958 RVA: 0x0003F25C File Offset: 0x0003D45C
 public ImapConnectionSettings(Fqdn serverName, int portNumber, ImapAuthenticationMechanism authentication, ImapSecurityMechanism security) : base(ConnectionSettingsType.Imap)
 {
     if (serverName == null)
     {
         throw new ArgumentNullException("serverName", "The serverName parameter cannot be null.");
     }
     if (portNumber < 0)
     {
         throw new ArgumentException("serverName", "The portNumber parameter must have a value greater than 0.");
     }
     this.ServerName     = serverName;
     this.Port           = portNumber;
     this.Authentication = authentication;
     this.Security       = security;
 }
 // Token: 0x060000F7 RID: 247 RVA: 0x00006357 File Offset: 0x00004557
 public static string ToStringParameterValue(ImapSecurityMechanism securityMechanism)
 {
     return(securityMechanism.ToString());
 }
Exemple #4
0
 // Token: 0x060001C6 RID: 454 RVA: 0x0000A83A File Offset: 0x00008A3A
 public ImapAuthenticationParameters(NetworkCredential networkCredential, ImapAuthenticationMechanism imapAuthenticationMechanism, ImapSecurityMechanism imapSecurityMechanism) : base(networkCredential)
 {
     this.ImapAuthenticationMechanism = imapAuthenticationMechanism;
     this.ImapSecurityMechanism       = imapSecurityMechanism;
 }
Exemple #5
0
 // Token: 0x060001C5 RID: 453 RVA: 0x0000A821 File Offset: 0x00008A21
 public ImapAuthenticationParameters(string userName, SecureString userPassword, ImapAuthenticationMechanism imapAuthenticationMechanism, ImapSecurityMechanism imapSecurityMechanism) : base(userName, userPassword)
 {
     this.ImapAuthenticationMechanism = imapAuthenticationMechanism;
     this.ImapSecurityMechanism       = imapSecurityMechanism;
 }