protected IEnumerable <Event> CreateSeriesInstances(Event master, Event masterChange, Dictionary <int, Event> occurrencesAlreadyCreated, int initialInstanceCreationIndex = 0)
        {
            IEnumerable <Event> result;

            try
            {
                this.Scope.EventDataProvider.BeforeStoreObjectSaved += new Action <Event, ICalendarItemBase>(this.StampRetryProperties);
                result = CreateSeriesInternalBase.CreateSeriesInstances <int>(master, masterChange, this.Scope.EventDataProvider, occurrencesAlreadyCreated, (IEventInternal e) => e.InstanceCreationIndex, delegate(IEventInternal e)
                {
                    e.InstanceCreationIndex = initialInstanceCreationIndex++;
                });
            }
            finally
            {
                this.Scope.EventDataProvider.BeforeStoreObjectSaved -= new Action <Event, ICalendarItemBase>(this.StampRetryProperties);
            }
            return(result);
        }
Esempio n. 2
0
        private void CreateSeriesInstances()
        {
            IDictionary <string, Event> occurrencesAlreadyCreated = this.FindOccurences();

            CreateSeriesInternalBase.CreateSeriesInstances <string>(base.Entity, base.Entity, this.Scope.EventDataProvider, occurrencesAlreadyCreated, (IEventInternal e) => e.GlobalObjectId, null);
        }