Пример #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: 0x0600256D RID: 9581 RVA: 0x000D89FC File Offset: 0x000D6BFC
        internal override void RenderContents(TextWriter writer, UserContext userContext, RecipientWellType type, RecipientWellNode.RenderFlags flags, RenderRecipientWellNode wellNode)
        {
            if (writer == null)
            {
                throw new ArgumentNullException("writer");
            }
            if (userContext == null)
            {
                throw new ArgumentNullException("userContext");
            }
            if (!this.HasRecipients(type))
            {
                return;
            }
            RecipientWellNode.RenderFlags renderFlags = flags & ~RecipientWellNode.RenderFlags.RenderCommas;
            bool   flag        = true;
            string smtpAddress = null;
            string alias       = null;
            int    num         = 0;
            MultiValuedProperty <string> addressList      = this.GetAddressList(type);
            IRecipientSession            recipientSession = Utilities.CreateADRecipientSession(ConsistencyMode.IgnoreInvalid, userContext);

            foreach (string text in addressList)
            {
                ADObjectId  adObjectId  = null;
                ADRecipient adrecipient = recipientSession.FindByLegacyExchangeDN(text);
                bool        flag2       = (flags & RecipientWellNode.RenderFlags.ReadOnly) != RecipientWellNode.RenderFlags.None;
                if (adrecipient != null)
                {
                    adObjectId  = adrecipient.Id;
                    smtpAddress = adrecipient.PrimarySmtpAddress.ToString();
                    if (flag2)
                    {
                        alias = adrecipient.Alias;
                    }
                    if (adrecipient is IADDistributionList)
                    {
                        num |= 1;
                    }
                    if (DirectoryAssistance.IsADRecipientRoom(adrecipient))
                    {
                        num |= 2;
                    }
                }
                if (wellNode(writer, userContext, (adrecipient != null) ? adrecipient.DisplayName : text.ToString(), smtpAddress, (adrecipient != null) ? adrecipient.LegacyExchangeDN : text.ToString(), "EX", alias, (adrecipient != null) ? AddressOrigin.Directory : AddressOrigin.Unknown, num, null, EmailAddressIndex.None, adObjectId, renderFlags, null, null) && flag)
                {
                    flag = false;
                    if ((flags & RecipientWellNode.RenderFlags.RenderCommas) != RecipientWellNode.RenderFlags.None)
                    {
                        renderFlags |= RecipientWellNode.RenderFlags.RenderCommas;
                    }
                }
            }
        }
Пример #3
0
 // Token: 0x060024FE RID: 9470 RVA: 0x000D65A8 File Offset: 0x000D47A8
 public override void Render(TextWriter writer, UserContext userContext, RecipientWellType type, RecipientWell.RenderFlags flags, string id, string content, string extraStyle)
 {
     RecipientWellNode.RenderFlags renderFlags = RecipientWellNode.RenderFlags.RenderCommas;
     if ((flags & RecipientWell.RenderFlags.ReadOnly) != RecipientWell.RenderFlags.None)
     {
         renderFlags |= RecipientWellNode.RenderFlags.ReadOnly;
     }
     if (content != null)
     {
         Utilities.HtmlEncode(content, writer);
         return;
     }
     this.RenderContents(writer, userContext, type, renderFlags, new RenderRecipientWellNode(PrintRecipientWellNode.Render));
 }
Пример #4
0
        // Token: 0x060000B4 RID: 180 RVA: 0x00006AB4 File Offset: 0x00004CB4
        public void Render(TextWriter writer, RecipientWellType type, RecipientWell.RenderFlags flags, string id)
        {
            if (writer == null)
            {
                throw new ArgumentNullException("writer");
            }
            if (id == null)
            {
                throw new ArgumentNullException("id");
            }
            if (!this.HasRecipients(type))
            {
                return;
            }
            bool flag = (flags & RecipientWell.RenderFlags.ReadOnly) != RecipientWell.RenderFlags.None;

            if (!flag)
            {
                writer.Write("<table class=\"rcptWll\" cellspacing=0 cellpadding=0 border=0><tr><td>");
            }
            if (!string.IsNullOrEmpty(id))
            {
                writer.Write("<div id=\"div{0}\"", id);
            }
            else
            {
                writer.Write("<div id=\"div{0}\"", RecipientWell.GetWellName(type));
            }
            if (flag)
            {
                writer.Write(" class=\"rwWRO\"");
            }
            writer.Write(">");
            RecipientWellNode.RenderFlags renderFlags = RecipientWellNode.RenderFlags.RenderCommas;
            if (flag)
            {
                renderFlags |= RecipientWellNode.RenderFlags.ReadOnly;
            }
            this.RenderContents(writer, type, renderFlags);
            writer.Write("</div>");
            if (!flag)
            {
                writer.Write("</td></tr></table>");
            }
        }
        // Token: 0x060000BF RID: 191 RVA: 0x00006CF0 File Offset: 0x00004EF0
        protected override void RenderContents(TextWriter writer, RecipientWellType type, RecipientWellNode.RenderFlags flags)
        {
            if (!this.HasRecipients(type))
            {
                return;
            }
            AdRecipientBatchQuery     adRecipientBatchQuery = new AdRecipientBatchQuery(this.GetRecipientCollection(type), this.UserContext);
            IEnumerator <Participant> recipientCollection   = this.GetRecipientCollection(type);

            RecipientWellNode.RenderFlags renderFlags = flags & ~RecipientWellNode.RenderFlags.RenderCommas;
            bool flag = true;
            RecipientItemType recipientItemType = ItemRecipientWell.GetRecipientItemType(type);
            bool isWebPartRequest = OwaContext.Current.UserContext.IsWebPartRequest;
            int  num = 0;

            while (recipientCollection.MoveNext())
            {
                Participant            participant                = recipientCollection.Current;
                int                    recipientFlags             = 0;
                ADObjectId             adObjectId                 = null;
                int                    readItemType               = 1;
                string                 smtpAddressAndADObjectInfo = ItemRecipientWell.GetSmtpAddressAndADObjectInfo(participant, adRecipientBatchQuery, out adObjectId, out recipientFlags, out readItemType);
                StoreObjectId          storeObjectId              = null;
                StoreParticipantOrigin storeParticipantOrigin     = participant.Origin as StoreParticipantOrigin;
                if (storeParticipantOrigin != null)
                {
                    storeObjectId = storeParticipantOrigin.OriginItemId;
                }
                string idString = ItemRecipientWell.BuildRecipientIdString(recipientItemType, num++);
                if (RecipientWellNode.Render(this.UserContext, writer, participant.DisplayName, smtpAddressAndADObjectInfo, participant.EmailAddress, participant.RoutingType, RecipientAddress.ToAddressOrigin(participant), recipientFlags, readItemType, recipientItemType, adObjectId, storeObjectId, renderFlags, idString, isWebPartRequest) && flag)
                {
                    flag = false;
                    if ((flags & RecipientWellNode.RenderFlags.RenderCommas) != RecipientWellNode.RenderFlags.None)
                    {
                        renderFlags |= RecipientWellNode.RenderFlags.RenderCommas;
                    }
                }
            }
        }
Пример #6
0
 // Token: 0x06002387 RID: 9095 RVA: 0x000CC5D4 File Offset: 0x000CA7D4
 internal override void RenderContents(TextWriter writer, UserContext userContext, RecipientWellType type, RecipientWellNode.RenderFlags flags, RenderRecipientWellNode wellNode)
 {
     if (writer == null)
     {
         throw new ArgumentNullException("writer");
     }
     if (userContext == null)
     {
         throw new ArgumentNullException("userContext");
     }
     if (this.meetingRequest.IsDelegated())
     {
         Utilities.SanitizeHtmlEncode(CalendarUtilities.GetDisplayAttendees(this.meetingRequest, type), writer);
         return;
     }
     base.RenderContents(writer, userContext, type, flags, wellNode);
 }
Пример #7
0
 internal override void RenderContents(TextWriter writer, UserContext userContext, RecipientWellType type, RecipientWellNode.RenderFlags flags, RenderRecipientWellNode wellNode)
 {
     if (writer == null)
     {
         throw new ArgumentNullException("writer");
     }
     if (userContext == null)
     {
         throw new ArgumentNullException("userContext");
     }
     this.HasRecipients(type);
 }
 // Token: 0x06001E92 RID: 7826
 internal abstract void RenderContents(TextWriter writer, UserContext userContext, RecipientWellType type, RecipientWellNode.RenderFlags flags, RenderRecipientWellNode wellNode);
        // Token: 0x06001E97 RID: 7831 RVA: 0x000B0420 File Offset: 0x000AE620
        public virtual void Render(TextWriter writer, UserContext userContext, RecipientWellType type, RecipientWell.RenderFlags flags, string id, string content, string extraStyle)
        {
            if (writer == null)
            {
                throw new ArgumentNullException("writer");
            }
            if (userContext == null)
            {
                throw new ArgumentNullException("userContext");
            }
            if (id == null)
            {
                throw new ArgumentNullException("id");
            }
            bool flag = (flags & RecipientWell.RenderFlags.ReadOnly) != RecipientWell.RenderFlags.None;

            if (flag && !this.HasRecipients(type) && type != RecipientWellType.From)
            {
                return;
            }
            if (flags != RecipientWell.RenderFlags.Hidden)
            {
                writer.Write("<div id=divFH>M</div>");
            }
            if (!string.IsNullOrEmpty(id))
            {
                writer.Write("<div id=\"div{0}\"", id);
            }
            else
            {
                writer.Write("<div id=\"div{0}\"", RecipientWell.GetWellName(type));
            }
            if ((flags & RecipientWell.RenderFlags.Hidden) != RecipientWell.RenderFlags.None)
            {
                writer.Write(" disabled");
            }
            this.RenderAdditionalExpandos(writer);
            if (!flag)
            {
                writer.Write(" class=\"rwW");
                writer.Write(string.IsNullOrEmpty(extraStyle) ? SanitizedHtmlString.Empty : SanitizedHtmlString.Format(" {0}", new object[]
                {
                    extraStyle
                }));
                writer.Write("\" contentEditable=\"true\" ");
                writer.Write("spellcheck=\"false\" ");
                writer.Write(">");
            }
            else
            {
                writer.Write(" class=\"rwW rwWRO\" ");
                writer.Write(">");
            }
            RecipientWellNode.RenderFlags renderFlags = RecipientWellNode.RenderFlags.RenderCommas;
            if ((flags & RecipientWell.RenderFlags.ReadOnly) != RecipientWell.RenderFlags.None)
            {
                renderFlags |= RecipientWellNode.RenderFlags.ReadOnly;
            }
            if (content != null)
            {
                Utilities.SanitizeHtmlEncode(content, writer);
            }
            else
            {
                if (userContext.BrowserType != BrowserType.IE && this.HasRecipients(type))
                {
                    writer.Write("&nbsp;");
                }
                this.RenderContents(writer, userContext, type, renderFlags, RecipientWell.wellNodeRenderDelegate);
                if (userContext.BrowserType != BrowserType.IE && this.HasRecipients(type))
                {
                    writer.Write("&nbsp;");
                }
            }
            writer.Write("</div>");
        }
Пример #10
0
        // Token: 0x0600251F RID: 9503 RVA: 0x000D67BC File Offset: 0x000D49BC
        internal static bool Render(TextWriter writer, UserContext userContext, string displayName, string smtpAddress, string routingAddress, string routingType, string alias, AddressOrigin addressOrigin, int recipientFlags, StoreObjectId storeObjectId, EmailAddressIndex emailAddressIndex, ADObjectId adObjectId, RecipientWellNode.RenderFlags flags, string sipUri, string mobilePhoneNumber)
        {
            if (writer == null)
            {
                throw new ArgumentNullException("writer");
            }
            if (userContext == null)
            {
                throw new ArgumentNullException("userContext");
            }
            if (string.CompareOrdinal(routingType, "SMTP") == 0 && ImceaAddress.IsImceaAddress(routingAddress) && Utilities.TryDecodeImceaAddress(routingAddress, ref routingType, ref routingAddress))
            {
                smtpAddress = null;
            }
            bool   flag  = (flags & RecipientWellNode.RenderFlags.ReadOnly) != RecipientWellNode.RenderFlags.None;
            bool   flag2 = false;
            string text  = "rwRR";

            if (string.CompareOrdinal(routingType, "MAPIPDL") != 0 && (string.IsNullOrEmpty(routingAddress) || string.IsNullOrEmpty(routingType)))
            {
                if (string.IsNullOrEmpty(displayName))
                {
                    ExTraceGlobals.MailDataTracer.TraceDebug(0L, "Found recipient without an email address or display name");
                    return(false);
                }
                text           = "rwUR";
                flag2          = true;
                routingAddress = null;
                smtpAddress    = null;
                routingType    = null;
            }
            else if (string.IsNullOrEmpty(displayName))
            {
                if (!string.IsNullOrEmpty(smtpAddress))
                {
                    displayName = smtpAddress;
                }
                else if (!string.IsNullOrEmpty(routingAddress))
                {
                    displayName = routingAddress;
                }
            }
            if (flag)
            {
                text = (flag2 ? "rwURO" : "rwRRO");
            }
            if ((recipientFlags & 1) != 0)
            {
                text += " rwDL";
            }
            if ((flags & RecipientWellNode.RenderFlags.RenderCommas) != RecipientWellNode.RenderFlags.None)
            {
                writer.Write(userContext.DirectionMark);
                writer.Write("; ");
            }
            if ((flags & RecipientWellNode.RenderFlags.RenderSkinnyHtml) != RecipientWellNode.RenderFlags.None)
            {
                if (!flag)
                {
                    writer.Write("<span>");
                }
                writer.Write("<span class=\"");
            }
            else if (flag)
            {
                writer.Write("<span id=\"spnR\" ");
                writer.Write(" ");
                Utilities.RenderScriptHandler(writer, "oncontextmenu", "onRwCm(event);");
                writer.Write(" ");
                Utilities.RenderScriptHandler(writer, "ondblclick", "onDblClkReadRcp(event);");
                writer.Write(" ");
                Utilities.RenderScriptHandler(writer, "onclick", "onClkRcp(event);");
                writer.Write(" class=\"");
            }
            else
            {
                writer.Write("<span tabindex=\"-1\" contenteditable=\"false\">");
                if (userContext.BrowserType == BrowserType.IE)
                {
                    writer.Write("<span tabindex=\"-1\" contenteditable=\"true\" id=\"spnR\" ");
                }
                else
                {
                    writer.Write("<span tabindex=\"-1\" contenteditable=\"false\" id=\"spnR\" ");
                }
                writer.Write(" ");
                Utilities.RenderScriptHandler(writer, "oncontextmenu", "onContextMenuSpnRw(event);");
                writer.Write(" ");
                Utilities.RenderScriptHandler(writer, "onclick", "onClkRcp(event);");
                writer.Write(" ");
                Utilities.RenderScriptHandler(writer, "onkeydown", "onKDRcp(event);");
                writer.Write(" ");
                Utilities.RenderScriptHandler(writer, "ondblclick", "onDblClkRcp(event);");
                writer.Write(" ondrop=\"return(false);\" class=\"");
            }
            writer.Write(text);
            writer.Write("\" _ao=\"{0}\" _rf=\"{1}\" _rt=\"", (int)addressOrigin, recipientFlags);
            if (routingType != null)
            {
                Utilities.SanitizeHtmlEncode(routingType, writer);
            }
            writer.Write("\" _em=\"");
            if (routingAddress != null)
            {
                Utilities.SanitizeHtmlEncode(routingAddress, writer);
            }
            if (storeObjectId != null)
            {
                writer.Write("\" _id=\"");
                Utilities.SanitizeHtmlEncode(storeObjectId.ToBase64String(), writer);
                writer.Write("\" _ei=\"");
                writer.Write((int)emailAddressIndex);
            }
            else if (adObjectId != null)
            {
                writer.Write("\" _id=\"");
                Utilities.SanitizeHtmlEncode(Convert.ToBase64String(adObjectId.ObjectGuid.ToByteArray()), writer);
            }
            writer.Write("\" title=\"");
            if (smtpAddress != null)
            {
                Utilities.SanitizeHtmlEncode(smtpAddress, writer);
            }
            if (!flag || addressOrigin == AddressOrigin.OneOff || (addressOrigin == AddressOrigin.Directory && !userContext.IsFeatureEnabled(Feature.GlobalAddressList)))
            {
                if (smtpAddress != null)
                {
                    writer.Write("\" _sa=\"");
                    Utilities.SanitizeHtmlEncode(smtpAddress, writer);
                }
                else if (routingType != null && routingAddress != null)
                {
                    writer.Write("\" _imcea=\"");
                    Utilities.SanitizeHtmlEncode(ImceaAddress.Encode(routingType, routingAddress, OwaConfigurationManager.Configuration.DefaultAcceptedDomain.DomainName.ToString()), writer);
                }
            }
            if (userContext.IsInstantMessageEnabled() && userContext.InstantMessagingType == InstantMessagingTypeOptions.Ocs && sipUri != null)
            {
                writer.Write("\" ");
                if (adObjectId == null)
                {
                    writer.Write("_sipTrsp=1 ");
                }
                writer.Write("_uri=\"");
                Utilities.SanitizeHtmlEncode(sipUri, writer);
            }
            if (userContext.IsSmsEnabled && mobilePhoneNumber != null)
            {
                writer.Write("\" _mo=\"");
                Utilities.SanitizeHtmlEncode(mobilePhoneNumber, writer);
            }
            if ((smtpAddress != null || routingAddress != null || mobilePhoneNumber != null || Utilities.IsMapiPDL(routingType)) && (!flag || addressOrigin == AddressOrigin.OneOff || (addressOrigin == AddressOrigin.Store && (!userContext.IsFeatureEnabled(Feature.Contacts) || userContext.IsSmsEnabled)) || (addressOrigin == AddressOrigin.Directory && (!userContext.IsFeatureEnabled(Feature.GlobalAddressList) || userContext.IsSmsEnabled))) && displayName != null)
            {
                writer.Write("\" _dn=\"");
                Utilities.SanitizeHtmlEncode(displayName, writer);
            }
            if (!flag && alias != null)
            {
                writer.Write("\" _al=\"");
                Utilities.SanitizeHtmlEncode(alias, writer);
            }
            writer.Write("\">");
            if (userContext.IsInstantMessageEnabled() && flag && !string.IsNullOrEmpty(routingType) && ((string.CompareOrdinal(routingType, "EX") == 0 && (recipientFlags & 1) == 0) || string.CompareOrdinal(routingType, "SMTP") == 0))
            {
                RenderingUtilities.RenderPresenceJellyBean(writer, userContext, true, "onRwCmJb(event);", false, null);
            }
            if (displayName != null)
            {
                Utilities.SanitizeHtmlEncode(displayName, writer);
            }
            RecipientWellNode.RenderFormattedAddress(writer, userContext, displayName, smtpAddress, routingAddress, routingType);
            writer.Write("</span>");
            if (!flag)
            {
                writer.Write("</span>");
            }
            return(true);
        }
Пример #11
0
        internal override void RenderContents(TextWriter writer, UserContext userContext, RecipientWellType type, RecipientWellNode.RenderFlags flags, RenderRecipientWellNode wellNode)
        {
            if (writer == null)
            {
                throw new ArgumentNullException("writer");
            }
            if (userContext == null)
            {
                throw new ArgumentNullException("userContext");
            }
            if (!this.HasRecipients(type))
            {
                return;
            }
            IEnumerator <Participant> recipientsCollection = this.GetRecipientsCollection(type);

            RecipientWellNode.RenderFlags renderFlags = flags & ~RecipientWellNode.RenderFlags.RenderCommas;
            bool flag  = true;
            bool flag2 = userContext.IsInstantMessageEnabled();

            Result <ADRawEntry>[] array = null;
            int num = 0;

            while (recipientsCollection.MoveNext())
            {
                Participant participant       = recipientsCollection.Current;
                string      smtpAddress       = null;
                string      alias             = null;
                string      text              = null;
                int         num2              = 0;
                ADObjectId  adObjectId        = null;
                string      mobilePhoneNumber = null;
                if (participant.RoutingType == "EX" && !string.IsNullOrEmpty(participant.EmailAddress))
                {
                    bool flag3 = (flags & RecipientWellNode.RenderFlags.ReadOnly) != RecipientWellNode.RenderFlags.None;
                    if (flag3)
                    {
                        alias = Utilities.GetParticipantProperty <string>(participant, ParticipantSchema.Alias, null);
                    }
                    bool participantProperty = Utilities.GetParticipantProperty <bool>(participant, ParticipantSchema.IsDistributionList, false);
                    if (participantProperty)
                    {
                        num2 |= 1;
                    }
                    bool participantProperty2 = Utilities.GetParticipantProperty <bool>(participant, ParticipantSchema.IsRoom, false);
                    if (participantProperty2)
                    {
                        num2 |= 2;
                    }
                    smtpAddress = Utilities.GetParticipantProperty <string>(participant, ParticipantSchema.SmtpAddress, null);
                    if (flag2 && !participantProperty && !participantProperty2)
                    {
                        text = Utilities.GetParticipantProperty <string>(participant, ParticipantSchema.SipUri, null);
                        if (text == null || text.Trim().Length == 0)
                        {
                            if (array == null)
                            {
                                array = AdRecipientBatchQuery.FindAdResultsByLegacyExchangeDNs(this.GetRecipientsCollection(type), userContext);
                            }
                            ADRawEntry data = array[num].Data;
                            if (data != null)
                            {
                                adObjectId = (ADObjectId)data[ADObjectSchema.Id];
                                text       = InstantMessageUtilities.GetSipUri((ProxyAddressCollection)data[ADRecipientSchema.EmailAddresses]);
                                if (text != null && text.Trim().Length == 0)
                                {
                                    text = null;
                                }
                            }
                        }
                    }
                    if (userContext.IsSmsEnabled)
                    {
                        if (array == null)
                        {
                            array = AdRecipientBatchQuery.FindAdResultsByLegacyExchangeDNs(this.GetRecipientsCollection(type), userContext);
                        }
                        ADRawEntry data2 = array[num].Data;
                        if (data2 != null)
                        {
                            mobilePhoneNumber = (string)data2[ADOrgPersonSchema.MobilePhone];
                        }
                    }
                    num++;
                }
                else if (participant.RoutingType == "SMTP")
                {
                    smtpAddress = participant.EmailAddress;
                    if (flag2)
                    {
                        text = participant.EmailAddress;
                    }
                }
                else if (string.CompareOrdinal(participant.RoutingType, "MAPIPDL") == 0)
                {
                    num2 |= 1;
                }
                StoreObjectId          storeObjectId          = null;
                EmailAddressIndex      emailAddressIndex      = EmailAddressIndex.None;
                StoreParticipantOrigin storeParticipantOrigin = participant.Origin as StoreParticipantOrigin;
                if (storeParticipantOrigin != null && storeParticipantOrigin.OriginItemId != null)
                {
                    storeObjectId     = storeParticipantOrigin.OriginItemId;
                    emailAddressIndex = storeParticipantOrigin.EmailAddressIndex;
                }
                if (wellNode(writer, userContext, participant.DisplayName, smtpAddress, participant.EmailAddress, participant.RoutingType, alias, RecipientAddress.ToAddressOrigin(participant), num2, storeObjectId, emailAddressIndex, adObjectId, renderFlags, text, mobilePhoneNumber) && flag)
                {
                    flag = false;
                    if ((flags & RecipientWellNode.RenderFlags.RenderCommas) != RecipientWellNode.RenderFlags.None)
                    {
                        renderFlags |= RecipientWellNode.RenderFlags.RenderCommas;
                    }
                }
            }
        }
Пример #12
0
 // Token: 0x06002523 RID: 9507 RVA: 0x000D6DDC File Offset: 0x000D4FDC
 internal new static bool Render(TextWriter writer, UserContext userContext, string displayName, string smtpAddress, string routingAddress, string routingType, string alias, AddressOrigin addressOrigin, int recipientFlags, StoreObjectId storeObjectId, EmailAddressIndex emailAddressIndex, ADObjectId adObjectId, RecipientWellNode.RenderFlags flags, string sipUri, string mobilePhoneNumber)
 {
     if (writer == null)
     {
         throw new ArgumentNullException("writer");
     }
     if (string.IsNullOrEmpty(routingAddress) || string.IsNullOrEmpty(routingType))
     {
         if (string.IsNullOrEmpty(displayName))
         {
             ExTraceGlobals.CoreTracer.TraceDebug(0L, "Found recipient without an email address or display name");
             return(false);
         }
         routingAddress = null;
         smtpAddress    = null;
         routingType    = null;
     }
     else if (string.IsNullOrEmpty(displayName))
     {
         if (!string.IsNullOrEmpty(smtpAddress))
         {
             displayName = smtpAddress;
         }
         else if (!string.IsNullOrEmpty(routingAddress))
         {
             displayName = routingAddress;
         }
     }
     if ((flags & RecipientWellNode.RenderFlags.RenderCommas) != RecipientWellNode.RenderFlags.None)
     {
         writer.Write("; ");
     }
     if (displayName != null)
     {
         Utilities.HtmlEncode(displayName.Trim(new char[]
         {
             '\''
         }), writer);
     }
     RecipientWellNode.RenderFormattedAddress(writer, userContext, displayName, smtpAddress, routingAddress, routingType);
     return(true);
 }
Пример #13
0
 // Token: 0x060024FF RID: 9471 RVA: 0x000D65E4 File Offset: 0x000D47E4
 internal override void RenderContents(TextWriter writer, UserContext userContext, RecipientWellType type, RecipientWellNode.RenderFlags flags, RenderRecipientWellNode wellNode)
 {
     this.delegateRecipient.RenderContents(writer, userContext, type, flags, wellNode);
 }
        // Token: 0x060003A4 RID: 932 RVA: 0x00020A9C File Offset: 0x0001EC9C
        internal static bool Render(UserContext userContext, TextWriter writer, string displayName, string smtpAddress, string routingAddress, string routingType, AddressOrigin addressOrigin, int recipientFlags, int readItemType, RecipientItemType recipientWell, ADObjectId adObjectId, StoreObjectId storeObjectId, RecipientWellNode.RenderFlags flags, string idString, bool isWebPartRequest)
        {
            if (userContext == null)
            {
                throw new ArgumentNullException("userContext");
            }
            if (writer == null)
            {
                throw new ArgumentNullException("writer");
            }
            bool flag  = (flags & RecipientWellNode.RenderFlags.ReadOnly) != RecipientWellNode.RenderFlags.None;
            bool flag2 = false;

            if (string.CompareOrdinal(routingType, "MAPIPDL") != 0 && (string.IsNullOrEmpty(routingAddress) || string.IsNullOrEmpty(routingType)))
            {
                if (string.IsNullOrEmpty(displayName))
                {
                    ExTraceGlobals.MailDataTracer.TraceDebug(0L, "Found recipient without an email address or display name");
                    return(false);
                }
                flag2          = true;
                routingAddress = null;
                smtpAddress    = null;
                routingType    = null;
            }
            else if (string.IsNullOrEmpty(displayName))
            {
                if (!string.IsNullOrEmpty(smtpAddress))
                {
                    displayName = smtpAddress;
                }
                else if (!string.IsNullOrEmpty(routingAddress))
                {
                    displayName = routingAddress;
                }
            }
            if ((flags & RecipientWellNode.RenderFlags.RenderCommas) != RecipientWellNode.RenderFlags.None)
            {
                writer.Write("; ");
            }
            writer.Write("<span class=\"");
            if (flag2)
            {
                writer.Write("rwURO\">");
                if (displayName != null)
                {
                    Utilities.HtmlEncode(displayName, writer);
                }
            }
            else
            {
                writer.Write("rwRO");
                if ((recipientFlags & 1) != 0)
                {
                    writer.Write(" rwDL");
                }
                writer.Write("\">");
            }
            bool flag3 = false;

            if (!string.IsNullOrEmpty(idString))
            {
                if ((userContext.IsFeatureEnabled(Feature.Contacts) && storeObjectId != null) || adObjectId != null)
                {
                    writer.Write("<a href=\"#\"");
                    if (storeObjectId != null)
                    {
                        writer.Write(" id=\"");
                        Utilities.HtmlEncode(storeObjectId.ToBase64String(), writer);
                    }
                    else if (adObjectId != null)
                    {
                        writer.Write(" id=\"");
                        Utilities.HtmlEncode(Utilities.GetBase64StringFromADObjectId(adObjectId), writer);
                    }
                    writer.Write("\" onClick=\"return onClkRcpt(this,{0}", readItemType);
                    if (!flag)
                    {
                        writer.Write(",{0}", (int)recipientWell);
                    }
                    writer.Write(");\">");
                    flag3 = true;
                }
                else if (routingType == "SMTP" && !string.IsNullOrEmpty(smtpAddress) && flag && !isWebPartRequest)
                {
                    writer.Write("<a href=\"");
                    Utilities.HtmlEncode("?ae=Item&t=IPM.Note&a=New&to=", writer);
                    Utilities.HtmlEncode(Utilities.UrlEncode(smtpAddress), writer);
                    if (!string.IsNullOrEmpty(displayName))
                    {
                        Utilities.HtmlEncode("&nm=", writer);
                        Utilities.HtmlEncode(Utilities.UrlEncode(displayName), writer);
                    }
                    writer.Write("\" class=\"emadr\">");
                    flag3 = true;
                }
            }
            if (!flag2)
            {
                if (displayName != null)
                {
                    Utilities.HtmlEncode(displayName, writer);
                }
                RecipientWellNode.RenderFormattedAddress(writer, displayName, smtpAddress, routingAddress, routingType);
            }
            if (flag3)
            {
                writer.Write("</a>");
            }
            if (!flag && !string.IsNullOrEmpty(idString))
            {
                writer.Write(" <span class=\"sq\">[<a href=\"#\" onClick=\"return onClkRmRcp('");
                writer.Write(idString);
                writer.Write("')\">");
                writer.Write(LocalizedStrings.GetHtmlEncoded(341226654));
                writer.Write("</a>]</span>");
            }
            writer.Write("</span>");
            return(true);
        }
Пример #15
0
 // Token: 0x060000B2 RID: 178
 protected abstract void RenderContents(TextWriter writer, RecipientWellType type, RecipientWellNode.RenderFlags flags);