// Token: 0x06002F13 RID: 12051 RVA: 0x0010F384 File Offset: 0x0010D584 private void ResolveOneRecipientAndRenderResults(TextWriter output) { string text = (string)base.GetParameter("n"); if (text.IndexOf(Globals.HtmlDirectionCharacterString, StringComparison.Ordinal) != -1) { text = Utilities.RemoveHTMLDirectionCharacters(text); } List <RecipientAddress> list = new List <RecipientAddress>(); AnrManager.Options options = this.ReadAnrOptions(); AnrManager.ResolveOneRecipient(text, base.UserContext, list, options); if (list.Count == 0) { RecipientAddress recipientAddress = AnrManager.ResolveAnrStringToOneOffEmail(text, options); if (recipientAddress != null) { list.Add(recipientAddress); } } bool flag = false; output.Write("new Array("); foreach (RecipientAddress recipientAddress2 in list) { if (flag) { output.Write(","); } else { flag = true; } output.Write("new Recip(\""); if (recipientAddress2.DisplayName != null) { Utilities.JavascriptEncode(recipientAddress2.DisplayName, output); } output.Write("\",\""); if (recipientAddress2.RoutingAddress != null) { Utilities.JavascriptEncode(recipientAddress2.RoutingAddress, output); } output.Write("\",\""); if (recipientAddress2.SmtpAddress != null) { Utilities.JavascriptEncode(recipientAddress2.SmtpAddress, output); } output.Write("\",\""); if (recipientAddress2.Alias != null) { Utilities.JavascriptEncode(recipientAddress2.Alias, output); } output.Write("\",\""); if (recipientAddress2.RoutingType != null) { Utilities.JavascriptEncode(recipientAddress2.RoutingType, output); } output.Write("\",{0},\"", (int)recipientAddress2.AddressOrigin); if (recipientAddress2.ADObjectId != null) { Utilities.JavascriptEncode(Convert.ToBase64String(recipientAddress2.ADObjectId.ObjectGuid.ToByteArray()), output); } else if (recipientAddress2.StoreObjectId != null) { Utilities.JavascriptEncode(recipientAddress2.StoreObjectId.ToBase64String(), output); } output.Write("\","); output.Write(recipientAddress2.RecipientFlags); output.Write(","); output.Write((int)recipientAddress2.EmailAddressIndex); output.Write(",\""); if (base.UserContext.IsInstantMessageEnabled() && base.UserContext.InstantMessagingType == InstantMessagingTypeOptions.Ocs && recipientAddress2.SipUri != null) { Utilities.JavascriptEncode(recipientAddress2.SipUri, output); } output.Write("\",\""); if (base.UserContext.IsSmsEnabled && recipientAddress2.MobilePhoneNumber != null) { Utilities.JavascriptEncode(recipientAddress2.MobilePhoneNumber, output); } output.Write("\")"); } output.Write(")"); }
// Token: 0x060000C0 RID: 192 RVA: 0x00006DF0 File Offset: 0x00004FF0 protected override bool RenderAnrContents(TextWriter writer, UserContext userContext, RecipientWellType type, bool isTableStartRendered) { bool flag = isTableStartRendered; bool flag2 = false; if (this.HasRecipients(type)) { AdRecipientBatchQuery adRecipientBatchQuery = new AdRecipientBatchQuery(this.GetRecipientCollection(type), this.UserContext); IEnumerator <Participant> recipientCollection = this.GetRecipientCollection(type); string empty = string.Empty; int num = 0; List <RecipientAddress> list = new List <RecipientAddress>(); RecipientItemType recipientItemType = ItemRecipientWell.GetRecipientItemType(type); int num2 = 0; while (recipientCollection.MoveNext()) { Participant participant = recipientCollection.Current; string text = ItemRecipientWell.BuildRecipientIdString(recipientItemType, num2++); if (string.CompareOrdinal(participant.RoutingType, "MAPIPDL") != 0 && (string.IsNullOrEmpty(participant.EmailAddress) || string.IsNullOrEmpty(participant.RoutingType)) && !string.IsNullOrEmpty(participant.DisplayName)) { num = 0; ADObjectId adobjectId = null; int num3; ItemRecipientWell.GetSmtpAddressAndADObjectInfo(participant, adRecipientBatchQuery, out adobjectId, out num, out num3); StoreParticipantOrigin storeParticipantOrigin = participant.Origin as StoreParticipantOrigin; if (storeParticipantOrigin != null) { StoreObjectId originItemId = storeParticipantOrigin.OriginItemId; } if (!flag) { writer.Write("<table cellspacing=0 cellpadding=0 class=\"anrot\" id=\"tblANR\"><tr><td class=\"msg\"><h1 tabindex=0>"); writer.Write(LocalizedStrings.GetHtmlEncoded(147143837)); writer.Write("</h1></td></tr><tr><td class=\"h100\"><table cellspacing=0 cellpadding=0 class=\"anrit\">"); flag = true; } if (!flag2) { string value = null; if (this is CalendarItemRecipientWell) { switch (type) { case RecipientWellType.To: value = LocalizedStrings.GetHtmlEncoded(609567352); break; case RecipientWellType.Cc: value = LocalizedStrings.GetHtmlEncoded(633037671); break; case RecipientWellType.Bcc: value = LocalizedStrings.GetHtmlEncoded(-1107183092); break; } } else { switch (type) { case RecipientWellType.To: value = LocalizedStrings.GetHtmlEncoded(-1105875540); break; case RecipientWellType.Cc: value = LocalizedStrings.GetHtmlEncoded(701860997); break; case RecipientWellType.Bcc: value = LocalizedStrings.GetHtmlEncoded(1482538735); break; } } writer.Write("<tr><td class=\"hdr\" tabindex=0>"); writer.Write(value); writer.Write("</td></tr>"); flag2 = true; } writer.Write("<tr><td class=\"rcpt\" nowrap><span tabindex=0>"); Utilities.CropAndRenderText(writer, participant.DisplayName, 24); writer.Write("</span> [<a href=\"#\" title=\""); writer.Write(Utilities.HtmlEncode(participant.DisplayName)); writer.Write("\" onClick=\"return onClkRmRcp('{0}')\">{1}</a>]", text, LocalizedStrings.GetHtmlEncoded(341226654)); writer.Write("</td></tr>"); list.Clear(); AnrManager.ResolveOneRecipient(participant.DisplayName, userContext, list); if (list.Count == 0) { RecipientAddress recipientAddress = AnrManager.ResolveAnrStringToOneOffEmail(participant.DisplayName); if (recipientAddress != null) { list.Add(recipientAddress); } } int num4 = 0; while (num4 < list.Count && num4 < 100) { RecipientAddress recipientAddress2 = list[num4]; if (recipientAddress2.DisplayName != null) { writer.Write("<tr><td><a href=\"#\" title=\""); Utilities.HtmlEncode(recipientAddress2.DisplayName, writer); if (recipientAddress2.SmtpAddress != null) { writer.Write(" ["); Utilities.HtmlEncode(recipientAddress2.SmtpAddress, writer); writer.Write("]"); } writer.Write("\" onClick=\"return onClkAddAnr(this,'"); ResolvedRecipientDetail resolvedRecipientDetail = new ResolvedRecipientDetail(recipientAddress2); resolvedRecipientDetail.RenderConcatenatedDetails(true, writer); writer.Write("',"); writer.Write((int)recipientItemType); writer.Write(",'"); writer.Write(text); writer.Write("')\">"); Utilities.CropAndRenderText(writer, recipientAddress2.DisplayName, 24); if (string.IsNullOrEmpty(recipientAddress2.DisplayName) && !string.IsNullOrEmpty(recipientAddress2.SmtpAddress)) { writer.Write("("); Utilities.CropAndRenderText(writer, recipientAddress2.SmtpAddress, 24); writer.Write(")"); } writer.Write("</a></td></tr>"); } num4++; } } } } return(flag); }