Exemplo n.º 1
0
        /// <summary>
        /// The run once.
        /// </summary>
        public override void RunOnce()
        {
            try
            {
                if (this.ForumNewId.Equals(-1))
                {
                    LegacyDb.forum_delete(this.ForumId);
                    this.Logger.Info("Forum (ID: {0}) Delete Task Complete.".FormatWith(this.ForumId));
                }
                else
                {
                    LegacyDb.forum_move(this.ForumId, this.ForumNewId);

                    this.Logger.Info(
                        "Forum (ID: {0}) Delete Task Complete, and Topics has been moved to Forum (ID: {1})".FormatWith(this.ForumId, this.ForumNewId));
                }
            }
            catch (Exception x)
            {
                this.Logger.Error(x, "Error In (ID: {0}) Delete Task".FormatWith(this.ForumId));
            }
        }