public void Respond(string key, RespondToEventParameters parameters, CommandContext context = null) { RespondToEventBase respondToEventBase = base.CommandFactory.CreateRespondToCommand(key, this); respondToEventBase.Parameters = parameters; respondToEventBase.Execute(context); }
// Token: 0x06000CF4 RID: 3316 RVA: 0x00046138 File Offset: 0x00044338 public void FillRespondToEventParameters(XmlNode requestNode) { this.RespondToEventParameters = new RespondToEventParameters(); string userResponse; if ((userResponse = this.UserResponse) != null) { if (!(userResponse == "1")) { if (!(userResponse == "2")) { if (!(userResponse == "3")) { goto IL_6C; } this.RespondToEventParameters.Response = ResponseType.Declined; } else { this.RespondToEventParameters.Response = ResponseType.TentativelyAccepted; } } else { this.RespondToEventParameters.Response = ResponseType.Accepted; } XmlNode xmlNode = requestNode["SendResponse", "MeetingResponse:"]; if (xmlNode == null) { this.RespondToEventParameters.SendResponse = false; return; } this.RespondToEventParameters.SendResponse = true; XmlNode xmlNode2 = xmlNode["Importance", "MeetingResponse:"]; if (xmlNode2 != null) { this.RespondToEventParameters.Importance = EventParametersParser.ParseImportance(xmlNode2); } XmlNode xmlNode3 = xmlNode["Body", "AirSyncBase:"]; if (xmlNode3 != null) { this.RespondToEventParameters.Notes = EventParametersParser.ParseBody(xmlNode3); } XmlNode xmlNode4 = xmlNode["ProposedStartTime", "MeetingResponse:"]; if (xmlNode4 != null) { this.RespondToEventParameters.ProposedStartTime = new ExDateTime?(EventParametersParser.ParseDateTime(xmlNode4, "ProposedStartTime")); } XmlNode xmlNode5 = xmlNode["ProposedEndTime", "MeetingResponse:"]; if (xmlNode5 != null) { this.RespondToEventParameters.ProposedEndTime = new ExDateTime?(EventParametersParser.ParseDateTime(xmlNode5, "ProposedEndTime")); } return; } IL_6C: throw new RequestParsingException("InvalidUserResponse:" + this.UserResponse); }
public virtual void RespondToEvent(StoreId id, RespondToEventParameters parameters, Event updateToEvent = null) { if (parameters == null) { throw new InvalidRequestException(CalendaringStrings.ErrorMissingRequiredRespondParameter); } MeetingResponse meetingResponse = null; try { try { using (ICalendarItemBase calendarItemBase = this.Bind(id)) { calendarItemBase.OpenAsReadWrite(); if (updateToEvent != null) { EventTranslator.Instance.SetPropertiesFromEntityOnStorageObject(updateToEvent, calendarItemBase); } meetingResponse = calendarItemBase.RespondToMeetingRequest(default(ResponseTypeConverter).Convert(parameters.Response), true, true, parameters.ProposedStartTime, parameters.ProposedEndTime); } } catch (ObjectNotFoundException innerException) { throw new AccessDeniedException(Strings.ErrorAccessDenied, innerException); } if (parameters.SendResponse) { EventWorkflowParametersTranslator <RespondToEventParameters, RespondToEventParametersSchema> .Instance.SetPropertiesFromEntityOnStorageObject(parameters, meetingResponse); MeetingMessage.SendLocalOrRemote(meetingResponse, true, true); } } finally { if (meetingResponse != null) { meetingResponse.Dispose(); } } }
protected override VoidResult OnExecute() { Event @event = this.ReadEvent(base.EntityKey); if (@event.IsOrganizer) { this.CancelEvent(base.EntityKey); } else if (@event.IsCancelled) { this.DeleteCancelledEventFromAttendeesCalendar(@event); } else { RespondToEventParameters parameters = new RespondToEventParameters { Response = ResponseType.Declined, SendResponse = true }; this.RespondToEvent(base.EntityKey, parameters); } return(VoidResult.Value); }
protected virtual void RespondToEvent(string eventId, RespondToEventParameters parameters) { this.Scope.Respond(eventId, parameters, this.Context); }
public void Respond(RespondToEventParameters parameters, CommandContext context = null) { RespondToMeetingRequestMessage respondToMeetingRequestMessage = base.CommandFactory.CreateRespondCommand(this, parameters); respondToMeetingRequestMessage.Execute(context); }
public RespondToMeetingRequestMessage CreateRespondCommand(MeetingRequestMessages scope, RespondToEventParameters respondToEventParameters) { return(new RespondToMeetingRequestMessage { Scope = scope, Parameters = respondToEventParameters }); }