Beispiel #1
0
        private void PublishPendingVersions()
        {
            var scheduledForAutoPublish = versionRepository.GetVersionsScheduledForPublish(Utility.CurrentTime()).ToList();

            foreach (var version in scheduledForAutoPublish)
            {
                try
                {
                    var scheduledVersion = versionRepository.DeserializeVersion(version);
                    scheduledVersion["FuturePublishDate"] = null;
                    if (scheduledVersion.VersionOf.HasValue && scheduledVersion.VersionOf.Value != null)
                    {
                        versioner.Publish(persister, scheduledVersion);
                    }
                    else
                    {
                        //Delete versions if master item doesn't exists
                        versioner.DeleteVersion(scheduledVersion);
                    }
                }
                catch (Exception ex)
                {
                    while (ex.InnerException != null)
                    {
                        ex = ex.InnerException;
                    }
                    logger.Error(ex);
                }
            }
        }
        private void PublishPendingVersions()
        {
            var scheduledForAutoPublish = versionRepository.GetVersionsScheduledForPublish(Utility.CurrentTime()).ToList();

            foreach (var version in scheduledForAutoPublish)
            {
                var scheduledVersion = version.Version;
                scheduledVersion["FuturePublishDate"] = null;
                versioner.Publish(persister, scheduledVersion);
            }
        }
        private void PublishPendingVersions()
        {
            var scheduledForAutoPublish = versionRepository.GetVersionsScheduledForPublish(Utility.CurrentTime()).ToList();

            foreach (var version in scheduledForAutoPublish)
            {
                try
                {
                    var scheduledVersion = versionRepository.DeserializeVersion(version);
                    scheduledVersion["FuturePublishDate"] = null;
                    versioner.Publish(persister, scheduledVersion);
                }
                catch (Exception ex)
                {
                    while (ex.InnerException != null)
                    {
                        ex = ex.InnerException;
                    }
                    logger.Error(ex);
                }
            }
        }