2014-11-23 5 views
1

모든 약속에 특정 날짜 peroid를 부여하고 싶습니다. 내가 API를 확인, 그것은 특정 사용자에 대한 약속을 얻을 수있을 것 같습니다?모든 사용자의 모든 약속 가져 오기 또는 한 방의 모든 약속 가져 오기

DateTime startDate = DateTime.Now; 
      DateTime endDate = startDate.AddDays(365); 
      const int NUM_APPTS = 5; 

      // Initialize the calendar folder object with only the folder ID. 
      CalendarFolder calendar = CalendarFolder.Bind(service, WellKnownFolderName.Calendar, new PropertySet()); 

      // Set the start and end time and number of appointments to retrieve. 
      CalendarView cView = new CalendarView(startDate, endDate, NUM_APPTS); 

      // Limit the properties returned to the appointment's subject, start time, and end time. 
      cView.PropertySet = new PropertySet(AppointmentSchema.Subject, AppointmentSchema.Start, AppointmentSchema.End); 

      // Retrieve a collection of appointments by using the calendar view. 
      FindItemsResults<Appointment> appointments = calendar.FindAppointments(cView); 

      Console.WriteLine("\nThe first " + NUM_APPTS + " appointments on your calendar from " + startDate.Date.ToShortDateString() + 
           " to " + endDate.Date.ToShortDateString() + " are: \n"); 

      foreach (Appointment a in appointments) 
      { 
       Console.Write("Subject: " + a.Subject.ToString() + " "); 
       Console.Write("Start: " + a.Start.ToString() + " "); 
       Console.Write("End: " + a.End.ToString()); 
       Console.WriteLine(); 
      } 

모든 약속을 얻거나 특정 방의 모든 약속을 가져올 수 있으면 코드로 정보를 추출 할 수 있기를 바랍니다. 감사!

답변

0

EWS에서는 findItems 작업이 사서함 폴더별로 수행되므로 다른 달력을 쿼리하려면 여러 작업을 수행해야합니다. 당신의 코드에서 당신은 당신이 과부하 예를 들어

FolderId cfFolderId = new FolderId(WellKnownFolderName.Calendar, "[email protected]"); 
CalendarFolder calendar = CalendarFolder.Bind(service, cfFolderId, new PropertySet()); 

건배 글렌

FolderId를 사용할 필요가 [email protected]의 기본 SMTP 주소를했다 룸 사서함을 조회하기를 원한다면
관련 문제