Filtrar Compromissos do Servidor Exchange

O IEWSClient fornece a facilidade de filtrar compromissos do servidor Exchange usando o ExchangeQueryBuilder. Os compromissos podem ser filtrados com base em:

  • Datas
  • Recorrências

Filtrando Compromissos por Datas

// For complete examples and data files, please go to https://github.com/aspose-email/Aspose.Email-for-C
System::SharedPtr<IEWSClient> client = GetExchangeEWSClient(GetExchangeTestUser());
System::DateTime startTime(2017, 9, 15);
System::DateTime endTime(2017, 10, 10);
System::SharedPtr<ExchangeQueryBuilder> builder = System::MakeObject<ExchangeQueryBuilder>();
builder->get_Appointment()->get_Start()->Since(startTime);
builder->get_Appointment()->get_End()->BeforeOrEqual(endTime);
System::SharedPtr<MailQuery> query = builder->GetQuery();
System::ArrayPtr<System::SharedPtr<Appointment>> appointments = client->ListAppointments(query);

Filtrando Compromissos por Eventos Recorrentes

// For complete examples and data files, please go to https://github.com/aspose-email/Aspose.Email-for-C
builder = System::MakeObject<ExchangeQueryBuilder>();
builder->get_Appointment()->get_IsRecurring()->Equals(false);
query = builder->GetQuery();
appointments = client->ListAppointments(query);