Esempio n. 1
0
 private void readInbox(ProtocolClient client)
 {
     // Base clases have been sealed, so can't extend a generic 'readInbox' function
     if (client.GetType() == typeof(Pop3Client))
     {
         readInbox((Pop3Client)client);
     }
     else if (client.GetType() == typeof(ImapClient))
     {
         readInbox((ImapClient)client);
     }
 }
Esempio n. 2
0
        private bool connect(ProtocolClient client)
        {
            if (client.GetType() == typeof(Pop3Client))
            {
                return(connect((Pop3Client)client));
            }
            else if (client.GetType() == typeof(ImapClient))
            {
                return(connect((ImapClient)client));
            }

            return(false);
        }