public static bool TryGetPublishedCalendar(MailboxSession mailboxSession, StoreObjectId folderId, ObscureKind?obscureKind, out PublishedCalendar calendar) { calendar = null; try { calendar = new PublishedCalendar(mailboxSession, folderId); calendar.obscureKind = obscureKind; } catch (FolderNotPublishedException) { } return(calendar != null); }
internal void PopulateUrls(Folder folderToShare) { using (PublishedFolder publishedFolder = PublishedFolder.Create(folderToShare)) { PublishedCalendar publishedCalendar = publishedFolder as PublishedCalendar; if (publishedCalendar != null) { if (this.PrimarySharingProvider == SharingProvider.SharingProviderPublish) { publishedCalendar.TrySetObscureKind(ObscureKind.Normal); } this.ICalUrl = publishedCalendar.ICalUrl; } this.BrowseUrl = publishedFolder.BrowseUrl; } }