Пример #1
0
 // Token: 0x06002520 RID: 9504 RVA: 0x000D6C78 File Offset: 0x000D4E78
 public void Render(TextWriter writer, UserContext userContext, RecipientWellNode.RenderFlags flags)
 {
     if (writer == null)
     {
         throw new ArgumentNullException("writer");
     }
     RecipientWellNode.Render(writer, userContext, this.displayName, this.smtpAddress, this.routingAddress, this.routingType, this.alias, this.addressOrigin, this.recipientFlags, this.storeObjectId, this.emailAddressIndex, this.adObjectId, flags, this.sipUri, this.mobilePhoneNumber);
 }
 // 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>");
 }