Beispiel #1
0
        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;
            }
        }
Beispiel #2
0
        public Event InitialMasterOperation(Event updateToMaster)
        {
            StoreId           entityStoreId     = this.GetEntityStoreId();
            EventDataProvider eventDataProvider = this.Scope.EventDataProvider;
            Event             eventObject       = eventDataProvider.Read(entityStoreId);

            this.Validate(eventObject);
            RespondToEvent respondToEvent = new RespondToEvent
            {
                EntityKey                = updateToMaster.Id,
                UpdateToEvent            = updateToMaster,
                SkipDeclinedEventRemoval = true,
                Parameters               = base.Parameters,
                Scope = this.Scope
            };

            respondToEvent.Execute(this.Context);
            return(this.Scope.Read(base.EntityKey, null));
        }