Class ContactInfoObjectQueryExtensions
- Namespace
- CMS.ContactManagement
- Assembly
- CMS.ContactManagement.dll
Extensions of ObjectQuery<TObject>.
public static class ContactInfoObjectQueryExtensions
- Inheritance
-
objectContactInfoObjectQueryExtensions
Methods
CreatedAfter(ObjectQuery<ContactInfo>, DateTime)
Returns ObjectQuery<TObject> with contacts that have been created later than from.
public static ObjectQuery<ContactInfo> CreatedAfter(this ObjectQuery<ContactInfo> contactsQuery, DateTime from)
Parameters
contactsQueryObjectQuery<ContactInfo>fromDateTime
Returns
Exceptions
- ArgumentNullException
contactsQueryis null
CreatedBefore(ObjectQuery<ContactInfo>, DateTime)
Returns ObjectQuery<TObject> with contacts that have been created before to.
public static ObjectQuery<ContactInfo> CreatedBefore(this ObjectQuery<ContactInfo> contactsQuery, DateTime to)
Parameters
contactsQueryObjectQuery<ContactInfo>toDateTime
Returns
Exceptions
- ArgumentNullException
contactsQueryis null
NotWithAge(ObjectQuery<ContactInfo>, int)
Returns ObjectQuery<TObject> with contacts that are not exactly yearsOld years old.
public static ObjectQuery<ContactInfo> NotWithAge(this ObjectQuery<ContactInfo> contactsQuery, int yearsOld)
Parameters
contactsQueryObjectQuery<ContactInfo>yearsOldint
Returns
Exceptions
- ArgumentNullException
contactsQueryis null
OlderThan(ObjectQuery<ContactInfo>, int)
Returns ObjectQuery<TObject> with contacts that are older than yearsOld (contacts with age yearsOld are not included).
public static ObjectQuery<ContactInfo> OlderThan(this ObjectQuery<ContactInfo> contactsQuery, int yearsOld)
Parameters
contactsQueryObjectQuery<ContactInfo>yearsOldint
Returns
Exceptions
- ArgumentNullException
contactsQueryis null
WithAge(ObjectQuery<ContactInfo>, int)
Returns ObjectQuery<TObject> with contacts that are exactly age of yearsOld years old.
public static ObjectQuery<ContactInfo> WithAge(this ObjectQuery<ContactInfo> contactsQuery, int yearsOld)
Parameters
contactsQueryObjectQuery<ContactInfo>yearsOldint
Returns
Exceptions
- ArgumentNullException
contactsQueryis null
WithBirthdayAfter(ObjectQuery<ContactInfo>, DateTime)
Returns ObjectQuery<TObject> with contacts that have date of birth later than fromExclusive. The method takes only Date part.
public static ObjectQuery<ContactInfo> WithBirthdayAfter(this ObjectQuery<ContactInfo> contactsQuery, DateTime fromExclusive)
Parameters
contactsQueryObjectQuery<ContactInfo>fromExclusiveDateTime
Returns
Exceptions
- ArgumentNullException
contactsQueryis null
WithBirthdayBefore(ObjectQuery<ContactInfo>, DateTime)
Returns ObjectQuery<TObject> with contacts that have date of birth sooner than toExclusive. The method takes only Date part.
public static ObjectQuery<ContactInfo> WithBirthdayBefore(this ObjectQuery<ContactInfo> contactsQuery, DateTime toExclusive)
Parameters
contactsQueryObjectQuery<ContactInfo>toExclusiveDateTime
Returns
Exceptions
- ArgumentNullException
contactsQueryis null
WithEmail(ObjectQuery<ContactInfo>, string)
Filters out contacts whose email address does not match given email.
public static ObjectQuery<ContactInfo> WithEmail(this ObjectQuery<ContactInfo> contactsQuery, string email)
Parameters
contactsQueryObjectQuery<ContactInfo>Query which will be changed to omit contacts not satisfying the condition
emailstringEmail address the contacts will be filtered for. Can be null, in such case filters contacts with email address set to null
Returns
- ObjectQuery<ContactInfo>
Modified query
Remarks
Since email address is not unique per contact on single site, query can contain multiple contacts.
Exceptions
- ArgumentNullException
contactsQueryis null
YoungerThan(ObjectQuery<ContactInfo>, int)
Returns ObjectQuery<TObject> with contacts that are younger than yearsOld (contacts with age yearsOld are not included).
public static ObjectQuery<ContactInfo> YoungerThan(this ObjectQuery<ContactInfo> contactsQuery, int yearsOld)
Parameters
contactsQueryObjectQuery<ContactInfo>yearsOldint
Returns
Exceptions
- ArgumentNullException
contactsQueryis null