Ejemplo n.º 1
0
 /// <summary>
 /// Recycle the old version.
 /// </summary>
 /// <param name="version">The old version to recycle.</param>
 public override void HandleVersion(SC.Data.Items.Item version)
 {
     Assert.ArgumentNotNull(version, "version");
     SC.Diagnostics.Log.Audit(
         this,
         "Recycle version : {0}",
         new string[] { SC.Diagnostics.AuditFormatter.FormatItem(version) });
     version.RecycleVersion();
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Archives the old version.
        /// </summary>
        /// <param name="version">The old version to archive.</param>
        public override void HandleVersion(SC.Data.Items.Item version)
        {
            Assert.ArgumentNotNull(version, "version");
            SC.Data.Archiving.Archive archive = version.Database.Archives["archive"];

            if (archive != null)
            {
                SC.Diagnostics.Log.Audit(
                    new object(),
                    "Archive version: {0}",
                    new string[] { SC.Diagnostics.AuditFormatter.FormatItem(version) });
                archive.ArchiveVersion(version);
            }
            else
            {
                SC.Diagnostics.Log.Audit(
                    this,
                    "Recycle version : {0}",
                    new string[] { SC.Diagnostics.AuditFormatter.FormatItem(version) });
                version.RecycleVersion();
            }
        }