Фильтрация встреч с сервера Exchange

Фильтрация встреч с использованием EWS

IEWSClient предоставляет возможность фильтровать встречи с сервера Exchange с помощью ExchangeQueryBuilder. Встречи могут быть отфильтрованы по следующим критериям:

  • Даты
  • Повторения

Фильтрация встреч по датам

// 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);

Фильтрация встреч по повторяющимся событиям

// 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);