private void GenerateObscureUrls(string owaHttpExternalUrl) { string domain = this.user.PrimarySmtpAddress.Domain; Guid mailboxGuid = base.InnerMailboxFolderDataProvider.MailboxSession.MailboxGuid; ObscureUrl obscureUrl = ObscureUrl.CreatePublishCalendarUrl(owaHttpExternalUrl, mailboxGuid, domain); this.DataObject.PublishedCalendarUrl = obscureUrl.ToString() + ".html"; this.DataObject.PublishedICalUrl = obscureUrl.ToString() + ".ics"; }
internal static object PublishedUrlGetter(IPropertyBag propertyBag, SimpleProviderPropertyDefinition propertyDefinition) { string text = (string)propertyBag[propertyDefinition]; if (string.IsNullOrEmpty(text)) { return(null); } PublishingUrl publishingUrl = PublishingUrl.Create(text); ObscureUrl obscureUrl = publishingUrl as ObscureUrl; if (obscureUrl == null) { return(text); } return(obscureUrl.ChangeToKind(ObscureKind.Normal).ToString()); }
internal static void PublishedUrlSetter(object value, IPropertyBag propertyBag, SimpleProviderPropertyDefinition propertyDefinition) { string text = (string)value; if (string.IsNullOrEmpty(text)) { propertyBag[propertyDefinition] = null; return; } PublishingUrl publishingUrl = PublishingUrl.Create(text); ObscureUrl obscureUrl = publishingUrl as ObscureUrl; if (obscureUrl == null) { propertyBag[propertyDefinition] = text; return; } propertyBag[propertyDefinition] = obscureUrl.ChangeToKind(ObscureKind.Restricted).ToString(); }