// Token: 0x06001E91 RID: 7825 RVA: 0x000B01D0 File Offset: 0x000AE3D0 internal static void ResolveAndRenderChunk(TextWriter writer, string chunk, ArrayList wellNodes, RecipientCache recipientCache, UserContext userContext, AnrManager.Options options) { if (writer == null) { throw new ArgumentNullException("writer"); } if (chunk == null) { throw new ArgumentNullException("chunk"); } if (userContext == null) { throw new ArgumentNullException("userContext"); } writer.Write("<div id=\"chk\">"); string[] array = Utilities.ParseRecipientChunk(chunk); if (array != null) { for (int i = 0; i < array.Length; i++) { string text = array[i].Trim(); if (text.IndexOf(Globals.HtmlDirectionCharacterString, StringComparison.Ordinal) != -1) { text = Utilities.RemoveHTMLDirectionCharacters(text); } if (text.Length > 0) { RecipientAddress recipientAddress = AnrManager.ResolveAnrString(text, options, userContext); RecipientWellNode recipientWellNode = new RecipientWellNode(text, null); if (recipientAddress != null) { recipientWellNode.DisplayName = recipientAddress.DisplayName; recipientWellNode.SmtpAddress = recipientAddress.SmtpAddress; recipientWellNode.AddressOrigin = recipientAddress.AddressOrigin; recipientWellNode.RoutingAddress = recipientAddress.RoutingAddress; recipientWellNode.RoutingType = recipientAddress.RoutingType; recipientWellNode.RecipientFlags = recipientAddress.RecipientFlags; recipientWellNode.StoreObjectId = recipientAddress.StoreObjectId; recipientWellNode.EmailAddressIndex = recipientAddress.EmailAddressIndex; recipientWellNode.ADObjectId = recipientAddress.ADObjectId; recipientWellNode.SipUri = recipientAddress.SipUri; recipientWellNode.MobilePhoneNumber = recipientAddress.MobilePhoneNumber; } if ((recipientWellNode.RoutingAddress != null || Utilities.IsMapiPDL(recipientWellNode.RoutingType)) && recipientCache != null) { string itemId = string.Empty; if (recipientWellNode.StoreObjectId != null) { itemId = recipientWellNode.StoreObjectId.ToBase64String(); } else if (recipientWellNode.ADObjectId != null) { itemId = Convert.ToBase64String(recipientWellNode.ADObjectId.ObjectGuid.ToByteArray()); } recipientCache.AddEntry(recipientWellNode.DisplayName, recipientWellNode.SmtpAddress, recipientWellNode.RoutingAddress, string.Empty, recipientWellNode.RoutingType, recipientWellNode.AddressOrigin, recipientWellNode.RecipientFlags, itemId, recipientWellNode.EmailAddressIndex, recipientWellNode.SipUri, recipientWellNode.MobilePhoneNumber); } recipientWellNode.Render(writer, userContext, RecipientWellNode.RenderFlags.RenderSkinnyHtml); if (wellNodes != null) { wellNodes.Add(recipientWellNode); } } } } writer.Write("</div>"); }
// Token: 0x060000B0 RID: 176 RVA: 0x000068A0 File Offset: 0x00004AA0 public static void ResolveRecipients(string chunk, ArrayList wellNodes, UserContext userContext, bool resolveAgainstContactsFirst) { if (chunk == null) { throw new ArgumentNullException("chunk"); } if (userContext == null) { throw new ArgumentNullException("userContext"); } string[] array = Utilities.ParseRecipientChunk(chunk); if (array != null) { RecipientCache recipientCache = AutoCompleteCache.TryGetCache(OwaContext.Current.UserContext); for (int i = 0; i < array.Length; i++) { string text = array[i].Trim(); if (text.Length > 0) { RecipientAddress recipientAddress = AnrManager.ResolveAnrString(text, resolveAgainstContactsFirst, userContext); RecipientWellNode recipientWellNode = new RecipientWellNode(text, null); if (recipientAddress != null) { recipientWellNode.DisplayName = recipientAddress.DisplayName; recipientWellNode.SmtpAddress = recipientAddress.SmtpAddress; recipientWellNode.AddressOrigin = recipientAddress.AddressOrigin; recipientWellNode.RoutingAddress = recipientAddress.RoutingAddress; recipientWellNode.RoutingType = recipientAddress.RoutingType; recipientWellNode.RecipientFlags = recipientAddress.RecipientFlags; recipientWellNode.StoreObjectId = recipientAddress.StoreObjectId; recipientWellNode.ADObjectId = recipientAddress.ADObjectId; recipientWellNode.EmailAddressIndex = recipientAddress.EmailAddressIndex; } if ((recipientWellNode.RoutingAddress != null || Utilities.IsMapiPDL(recipientWellNode.RoutingType)) && recipientCache != null) { string itemId = string.Empty; if (recipientWellNode.AddressOrigin == AddressOrigin.Store && recipientWellNode.StoreObjectId != null) { itemId = recipientWellNode.StoreObjectId.ToBase64String(); } else if (recipientWellNode.AddressOrigin == AddressOrigin.Directory && recipientWellNode.ADObjectId != null) { itemId = Convert.ToBase64String(recipientWellNode.ADObjectId.ObjectGuid.ToByteArray()); } if (string.IsNullOrEmpty(recipientWellNode.DisplayName)) { recipientWellNode.DisplayName = recipientWellNode.SmtpAddress; } if (userContext.UserOptions.AddRecipientsToAutoCompleteCache) { recipientCache.AddEntry(recipientWellNode.DisplayName, recipientWellNode.SmtpAddress, recipientWellNode.RoutingAddress, string.Empty, recipientWellNode.RoutingType, recipientWellNode.AddressOrigin, recipientWellNode.RecipientFlags, itemId, recipientWellNode.EmailAddressIndex); } } if (wellNodes != null) { wellNodes.Add(recipientWellNode); } } } if (recipientCache != null && recipientCache.IsDirty) { recipientCache.Commit(true); } } }