Фильтрация встреч с сервера Exchange
Contents
[
Hide
]
Фильтрация встреч с использованием EWS
IEWSClient предоставляет возможность фильтровать встречи с сервера Exchange с помощью ExchangeQueryBuilder. Встречи могут быть отфильтрованы по следующим критериям:
- Даты
- Повторения
Фильтрация встреч по датам
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-email/Aspose.Email-for-.NET | |
IEWSClient client = EWSClient.GetEWSClient(mailboxUri, username, password, domain); | |
DateTime startTime = new DateTime(2017,09, 15); | |
DateTime endTime = new DateTime(2017, 10, 10); | |
ExchangeQueryBuilder builder = new ExchangeQueryBuilder(); | |
builder.Appointment.Start.Since(startTime); | |
builder.Appointment.End.BeforeOrEqual(endTime); | |
MailQuery query = builder.GetQuery(); | |
Appointment[] appointments = client.ListAppointments(query); |
Фильтрация встреч по повторяющимся событиям
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-email/Aspose.Email-for-.NET | |
builder = new ExchangeQueryBuilder(); | |
builder.Appointment.IsRecurring.Equals(false); | |
query = builder.GetQuery(); | |
appointments = client.ListAppointments(query); |