// ReSharper disable once UnusedMember.Local private static UserFolder ToUserFolder(MailUserFolderData folder, int tenant, string user) { if (folder == null) { return(null); } var utcNow = DateTime.UtcNow; var userFolder = new UserFolder { Tenant = tenant, User = user, Id = folder.Id, ParentId = folder.ParentId, Name = folder.Name, FolderCount = folder.FolderCount, UnreadCount = folder.UnreadCount, TotalCount = folder.TotalCount, UnreadChainCount = folder.UnreadChainCount, TotalChainCount = folder.TotalChainCount, TimeModified = utcNow }; return(userFolder); }
private static MailUserFolderData ToMailUserFolderData(UserFolder folder) { if (folder == null) { return(null); } var userFolderData = new MailUserFolderData { Id = folder.Id, ParentId = folder.ParentId, Name = folder.Name, FolderCount = folder.FolderCount, UnreadCount = folder.UnreadCount, TotalCount = folder.TotalCount, UnreadChainCount = folder.UnreadChainCount, TotalChainCount = folder.TotalChainCount }; return(userFolderData); }