Example #1
0
        public virtual bool Push(CDriver.Progress progress)
        {
            for (int i = 0; i < this.EmptyListsToPush.Length; i++)
            {
                for (int j = 0; j < this.MedOrganizers[i].StreamCount; j++)
                {
                    IOrganizerItem organizerItem = this.MedOrganizers[i].GetStream(j + 1) as IOrganizerItem;
                    organizerItem.GetType();
                }
                foreach (IOrganizerItem current in this.EmptyListsToPush[i])
                {
                    current.Commit();
                }
            }
            if (this.Events != null)
            {
                foreach (COrganizerEntry cOrganizerEntry in this.Events)
                {
                    cOrganizerEntry.Commit();
                }
            }
            if (this.Notes != null)
            {
                foreach (COrganizerEntry cOrganizerEntry2 in this.Notes)
                {
                    cOrganizerEntry2.Commit();
                }
            }
            if (this.Tasks != null)
            {
                foreach (COrganizerEntry cOrganizerEntry3 in this.Tasks)
                {
                    cOrganizerEntry3.Commit();
                }
            }
            int min = 0;
            int max = 1000 / ((this.MedOrganizers.Length > 0) ? this.MedOrganizers.Length : 1);

            for (int k = 0; k < this.MedOrganizers.Length; k++)
            {
                IOrganizer organizer = this.MedOrganizers[k];
                for (int l = 0; l < organizer.StreamCount; l++)
                {
                    IOrganizerItem organizerItem2 = organizer.GetStream(l + 1) as IOrganizerItem;
                    organizerItem2.GetType();
                }
                IOperation operation = organizer.Flush() as IOperation;
                if (!CDriver.OperationToProgress(operation, progress, min, max))
                {
                    return(false);
                }
            }
            return(progress(1000));
        }