Пример #1
0
        /// <summary>
        /// Raises <b>Namespace</b> event.
        /// </summary>
        /// <param name="response">Default IMAP server response.</param>
        /// <returns>Returns event args.</returns>
        private IMAP_e_Namespace OnNamespace(IMAP_r_ServerStatus response)
        {
            IMAP_e_Namespace eArgs = new IMAP_e_Namespace(response);            
            if(this.Namespace != null){                
                this.Namespace(this,eArgs);
            }

            return eArgs;
        }
Пример #2
0
 private void m_pImapServer_Session_Namespace(object sender,IMAP_e_Namespace e)
 {
     SharedFolderRoot[] rootFolders =  m_pApi.GetSharedFolderRoots();
     List<IMAP_Namespace_Entry> publicFolders = new List<IMAP_Namespace_Entry>();
     List<IMAP_Namespace_Entry> usersFolders = new List<IMAP_Namespace_Entry>();
     foreach(SharedFolderRoot rootFolder in rootFolders){
         if(rootFolder.Enabled){
             if(rootFolder.RootType == SharedFolderRootType_enum.BoundedRootFolder){
                 publicFolders.Add(new IMAP_Namespace_Entry(rootFolder.FolderName,'/'));
             }
             else{
                 usersFolders.Add(new IMAP_Namespace_Entry(rootFolder.FolderName,'/'));
             }
         }
     }
     
     e.NamespaceResponse = new IMAP_r_u_Namespace(new IMAP_Namespace_Entry[]{new IMAP_Namespace_Entry("",'/')},usersFolders.ToArray(),publicFolders.ToArray());
 }