public void ExecuteOnInstance(Event seriesInstance) { base.Parameters.MeetingRequestIdToBeDeleted = null; Event @event = new Event { Id = seriesInstance.Id, ChangeKey = seriesInstance.ChangeKey }; IActionPropagationState actionPropagationState = @event; actionPropagationState.LastExecutedAction = new Guid?(this.CommandId); IEventInternal eventInternal = @event; eventInternal.SeriesToInstancePropagation = true; RespondToEvent respondToEvent = new RespondToEvent { EntityKey = @event.Id, UpdateToEvent = @event, Parameters = base.Parameters, Scope = this.Scope }; respondToEvent.Execute(new CommandContext { IfMatchETag = seriesInstance.ChangeKey }); if (base.Parameters.Response != ResponseType.Declined) { Event event2 = this.Scope.Read(base.EntityKey, null); seriesInstance.ChangeKey = event2.ChangeKey; } }
public void ExecuteOnInstance(Event seriesInstanceInformation) { Event @event = new Event { Id = seriesInstanceInformation.Id, ChangeKey = seriesInstanceInformation.ChangeKey, Type = EventType.Exception }; this.PrepareDataForInstance(@event); IActionPropagationState actionPropagationState = @event; actionPropagationState.LastExecutedAction = new Guid?(this.CommandId); UpdateEvent updateEvent = new UpdateEvent { EntityKey = @event.Id, Entity = @event, Scope = this.Scope, SeriesSequenceNumber = new int?(this.seriesSequenceNumber), SendMeetingMessagesOnSave = true, MasterGoid = this.masterGoid, PropagationInProgress = true }; Event event2 = updateEvent.Execute(new CommandContext { IfMatchETag = seriesInstanceInformation.ChangeKey }); seriesInstanceInformation.ChangeKey = event2.ChangeKey; }
private Event GetInstancePropagationData(IStorePropertyBag propertyBag) { Event basicSeriesEventData = EventExtensions.GetBasicSeriesEventData(propertyBag, this.Scope); IActionPropagationState actionPropagationState = basicSeriesEventData; actionPropagationState.LastExecutedAction = propertyBag.GetValueOrDefault <Guid?>(CalendarItemSchema.LastExecutedCalendarInteropAction, null); return(basicSeriesEventData); }
protected virtual bool IsPropagationPending(IActionPropagationState master, IActionPropagationState instance) { Guid?lastExecutedAction = master.LastExecutedAction; if (lastExecutedAction == null) { return(false); } Guid?lastExecutedAction2 = instance.LastExecutedAction; return(lastExecutedAction2 == null || !lastExecutedAction.Value.Equals(lastExecutedAction2.Value)); }
public override Event ConvertToEntity(ICalendarItemBase master, ICalendarItemBase instance) { Event @event = EventTranslator.Instance.ConvertToEntity(master); Event event2 = EventTranslator.Instance.ConvertToEntity(instance); @event.SeriesMasterId = @event.Id; @event.ChangeKey = event2.ChangeKey; @event.End = event2.End; @event.Id = event2.Id; @event.StoreId = event2.StoreId; @event.PopupReminderSettings = event2.PopupReminderSettings; @event.Start = event2.Start; @event.Type = event2.Type; IEventInternal eventInternal = @event; IEventInternal eventInternal2 = event2; eventInternal.GlobalObjectId = eventInternal2.GlobalObjectId; eventInternal.InstanceCreationIndex = eventInternal2.InstanceCreationIndex; IActionPropagationState actionPropagationState = @event; IActionPropagationState actionPropagationState2 = event2; actionPropagationState.LastExecutedAction = actionPropagationState2.LastExecutedAction; PropertyChangeMetadata propertyChangeMetadata; if (CalendarItemAccessors.PropertyChangeMetadata.TryGetValue(instance, out propertyChangeMetadata)) { IEnumerable <PropertyChangeMetadata.PropertyGroup> overriddenGroups = propertyChangeMetadata.GetOverriddenGroups(); foreach (ITranslationRule <ICalendarItemBase, Event> translationRule2 in from translationRule in base.Strategy.EnumerateRules <ICalendarItemBase, Event>() let storageRule = translationRule as IStorageTranslationRule <ICalendarItemBase, Event> where storageRule != null && overriddenGroups.Contains(storageRule.StoragePropertyGroup) select translationRule) { translationRule2.FromLeftToRightType(instance, @event); } } return(@event); }
public void ExecuteOnInstance(Event seriesInstance) { Event @event = new Event { Id = seriesInstance.Id, ChangeKey = seriesInstance.ChangeKey }; IActionPropagationState actionPropagationState = @event; actionPropagationState.LastExecutedAction = new Guid?(this.CommandId); ForwardEvent forwardEvent = new ForwardEvent { EntityKey = @event.Id, UpdateToEvent = @event, Parameters = base.Parameters, Scope = this.Scope, SeriesSequenceNumber = new int?(this.seriesSequenceNumber) }; forwardEvent.Execute(new CommandContext { IfMatchETag = seriesInstance.ChangeKey }); }