private string GetInlineReferenceUrl(AttachmentPolicy.Level level, AttachmentLink imageAttachmentLink, HtmlWriter writer) { imageAttachmentLink.MarkInline(true); if (AttachmentPolicy.Level.Allow == level) { StringBuilder stringBuilder = new StringBuilder(); if (this.isEmbeddedItem) { stringBuilder.Append(this.embeddedItemUrl); } else { stringBuilder.Append(OwaSafeHtmlCallbackBase.AttachmentBaseUrl); bool flag = this.owaStoreObjectIdType == OwaStoreObjectIdType.OtherUserMailboxObject || this.owaStoreObjectIdType == OwaStoreObjectIdType.ArchiveMailboxObject; OwaStoreObjectId owaStoreObjectId = OwaStoreObjectId.CreateFromItemId(this.itemId, flag ? null : this.parentId, this.owaStoreObjectIdType, this.legacyDN); stringBuilder.Append(Utilities.UrlEncode(owaStoreObjectId.ToString())); stringBuilder.Append("&attcnt=1&attid0="); } stringBuilder.Append(Utilities.UrlEncode(imageAttachmentLink.AttachmentId.ToBase64String())); if (!this.isEmbeddedItem && !string.IsNullOrEmpty(imageAttachmentLink.ContentId)) { stringBuilder.Append("&attcid0="); stringBuilder.Append(Utilities.UrlEncode(imageAttachmentLink.ContentId)); } return(stringBuilder.ToString()); } this.hasBlockedImagesInCurrentPass = true; this.hasBlockedInlineAttachments = true; return(OwaSafeHtmlOutboundCallbacks.BlockedUrlPageValue); }
internal PublicFolderViewStates(UserContext userContext, Folder folder) { if (userContext == null) { throw new ArgumentNullException("userContext"); } if (folder == null) { throw new ArgumentNullException("folder"); } this.cache = PublicFolderViewStatesCache.GetInstance(userContext); OwaStoreObjectId owaStoreObjectId = OwaStoreObjectId.CreateFromStoreObject(folder); this.folderId = owaStoreObjectId.ToString(); }
public OtherMailboxConfigEntry(string displayName, OwaStoreObjectId rootFolderId) { this.mailboxDisplayName = displayName; this.mailboxRootFolderId = rootFolderId.ToString(); }
internal void AsyncAcquireLicenses(OrganizationId organizationId, OwaStoreObjectId messageId, string publishLicense, string userSmtpAddress, SecurityIdentifier userSid, RecipientTypeDetails userType, string requestCorrelator) { if (organizationId == null) { throw new ArgumentNullException("organizationId"); } if (messageId == null) { throw new ArgumentNullException("messageId"); } if (string.IsNullOrEmpty(publishLicense)) { throw new ArgumentNullException("publishLicense"); } if (string.IsNullOrEmpty(userSmtpAddress)) { throw new ArgumentNullException("userSmtpAddress"); } if (userSid == null) { throw new ArgumentNullException("userSid"); } if (string.IsNullOrEmpty("requestCorrelator")) { throw new ArgumentNullException("requestCorrelator"); } this.licensingResponseQueue.InitializeErrorIconUrl(this.userContext.GetThemeFileUrl(ThemeFileId.Error)); this.userCulture = this.userContext.UserCulture; this.licensingResponseQueue.InitializeUserCulture(this.userContext.UserCulture); try { IrmLicensingManager.Tracer.TraceDebug((long)this.GetHashCode(), "AsyncAcquireLicenses: issuing async license req. orgId: {0}; msgId: {1}; userId: {2}; correlator: {3}", new object[] { organizationId, messageId, userSmtpAddress, requestCorrelator }); RmsClientManager.BeginAcquireUseLicenseAndUsageRights(new RmsClientManagerContext(organizationId, RmsClientManagerContext.ContextId.MessageId, messageId.ToString(), publishLicense), publishLicense, userSmtpAddress, userSid, userType, new AsyncCallback(this.AcquireUseLicenseAndUsageRightsCallback), new IrmLicensingManager.AsyncState(messageId, requestCorrelator)); } catch (ExchangeConfigurationException arg) { IrmLicensingManager.Tracer.TraceError <string, ExchangeConfigurationException>((long)this.GetHashCode(), "AsyncAcquireLicenses: exception at BeginAcquireUseLicenseAndUsageRights. Correlator: {0}; Exception: {1}", requestCorrelator, arg); this.HandleExchangeConfigurationException(messageId, requestCorrelator); } catch (RightsManagementException ex) { IrmLicensingManager.Tracer.TraceError <string, RightsManagementException>((long)this.GetHashCode(), "AsyncAcquireLicenses: exception at BeginAcquireUseLicenseAndUsageRights. Correlator: {0}; Exception: {1}", requestCorrelator, ex); this.HandleRightsManagementException(ex, messageId, requestCorrelator); } }