Ejemplo n.º 1
0
        /// <summary>
        /// Cargar estructura de las subcarpetas
        /// </summary>
        /// <param name="oParentFolder">Carpeta raiz</param>
        /// <param name="oFolders">Listado de todas las carpetas</param>
        /// <param name="idFolders">Carpetas ya anidadas.</param>
        /// <returns></returns>
        private List <EmailFolderDTO> ObtenerSubcarpetas(Folder oParentFolder, ref List <Folder> oFolders, ref List <string> idFolders)
        {
            var subFolders = oFolders.Where(x => (x.ParentFolderId.UniqueId ?? "") == (oParentFolder.Id.UniqueId ?? "")).ToList();

            List <EmailFolderDTO> lFolders = new List <EmailFolderDTO>();
            EmailFolderDTO        lFolder;

            for (int i = 0, loopTo = subFolders.Count - 1; i <= loopTo; i++)
            {
                if (!idFolders.Contains(subFolders[i].Id.UniqueId))
                {
                    idFolders.Add(subFolders[i].Id.UniqueId);
                    lFolder = new EmailFolderDTO();
                    lFolder.loadFolder(subFolders[i]);

                    lFolder.children = ObtenerSubcarpetas(subFolders[i], ref oFolders, ref idFolders);

                    lFolders.Add(lFolder);
                }
            }

            return(lFolders);
        }
Ejemplo n.º 2
0
        void CargarEmails(EmailFolderDTO carpeta)
        {
            js.Log("CargarEmails: " + carpeta.Name);

            CargarEmailsPrincipal.InvokeAsync(carpeta.IdFolder);
        }