//************************************************************************* // Constructor: EmailParticipantCriteria() // /// <summary> /// Initializes a new instance of the <see /// cref="EmailParticipantCriteria" /> class. /// </summary> //************************************************************************* public EmailParticipantCriteria() { m_sParticipant = null; m_eIncludedIn = IncludedIn.None; AssertValid(); }
//************************************************************************* // Method: AppendParticipantClauseToQuery() // /// <summary> /// Appends a participant clause to a query. /// </summary> /// /// <param name="sEscapedParticipant"> /// The participant to use in the clause. /// </param> /// /// <param name="eIncludedIn"> /// The IncludedIn value from a ParticipantCriteria object. /// </param> /// /// <param name="eFlagToCheck"> /// The flag to check in <paramref name="eIncludedIn" />. /// </param> /// /// <param name="oStringBuilder"> /// The query to append to. /// </param> /// /// <param name="bParticipantClauseAppended"> /// true if a participant clause has already been appended. Gets updated /// by this method. /// </param> /// /// <remarks> /// If <paramref name="eIncludedIn" /> includes <paramref /// name="eFlagToCheck" />, this method appends a clause that looks like /// this, in pseudocode: " Contains(To, Participant)". If necessary, the /// clause is prepended with " OR". /// </remarks> //************************************************************************* protected void AppendParticipantClauseToQuery( String sEscapedParticipant, IncludedIn eIncludedIn, IncludedIn eFlagToCheck, StringBuilder oStringBuilder, ref Boolean bParticipantClauseAppended ) { Debug.Assert( !String.IsNullOrEmpty(sEscapedParticipant) ); Debug.Assert(oStringBuilder != null); AssertValid(); if ( (eIncludedIn & eFlagToCheck) != 0 ) { if (bParticipantClauseAppended) { oStringBuilder.Append(" OR"); } oStringBuilder.AppendFormat( " Contains(System.Message.{0}Address, '\"{1}\"')" , eFlagToCheck.ToString(), sEscapedParticipant ); bParticipantClauseAppended = true; } }