and sorry for the poor title of the question
I am trying to get all available rooms (not reserved) from my exchange server. The fact is that I also get the numbers that I ordered, but no one accepted .
I would like to remove them from the list after I reserve the room.
This is the code that I use to reserve the number
ExchangeService service;
//...code to new-up and config service
var request = new Appointment(service)
{
Subject = booking.Subject,
Start = booking.Start,
End = booking.End,
Location = booking.Room
};
request.RequiredAttendees.Add(booking.Person);
request.RequiredAttendees.Add(booking.Room);
request.Save(SendInvitationsMode.SendOnlyToAll);
Note that I tried to call request.Accept () right after Save (), but without this "real reservation" of the room. Pressing accept in Outlook is the only "fix." Needless to say, I tried everything I could find on this issue (I do not regularly work with Exchange).
And then the code will get free rooms
var rooms = service.GetRooms(locationAddress);
var rooms= rooms.Select(i => new AttendeeInfo { SmtpAddress = i.Address, AttendeeType = MeetingAttendeeType.Room });
var availability = service.GetUserAvailability(rooms, timeframe, AvailabilityData.FreeBusy);
foreach (var a in availability.AttendeesAvailability)
{
}
, -, Outlook, , .
, , //, , , .
Edit
, AvailabilityData. GetUserAvailability ( FreeBusy, FreeBusyAndSuggestions , !)