コード例 #1
0
        public void ExecuteJob()
        {
            this.m_IsRunning = true;
            HtmlContent content = this.CreateJobInstance();

            if (content != null)
            {
                this.m_LastStart = DateTime.Now;
                try
                {
                    content.CreateMethod            = CreateContentType.CreateAuto;
                    content.NodeIdArray             = this.m_NodeArry;
                    content.SiteUrl                 = this.m_SiteUrl;
                    content.PhysicalApplicationPath = this.m_SiteMapth;
                    content.EnableCreateNodePage    = this.m_CreateNodePage;
                    content.EnableCreateIndexPage   = this.m_CreateIndexPage;
                    content.Work();
                    this.m_LastEnd = this.m_LastSucess = DateTime.Now;
                }
                catch (Exception)
                {
                    this.m_Enabled = !this.EnableShutDown;
                    this.m_LastEnd = DateTime.Now;
                }
            }
            this.m_IsRunning = false;
        }
コード例 #2
0
 private static void CreateContent(NodeInfo nodeInfo, string generalId)
 {
     if (nodeInfo.IsCreateContentPage)
     {
         HtmlContent content = new HtmlContent();
         content.CreateMethod          = CreateContentType.CreateByGeneralId;
         content.NodeIdArray           = string.Empty;
         content.ContentGeneralIdArray = generalId;
         content.CommonCreateHtml();
     }
 }
コード例 #3
0
 public HtmlContent CreateJobInstance()
 {
     if (this.Enabled && (this.m_Job == null))
     {
         if (this.m_JobType != null)
         {
             this.m_Job = Activator.CreateInstance(this.m_JobType) as HtmlContent;
         }
         this.m_Enabled = this.m_Job != null;
         if (!this.m_Enabled)
         {
             this.Dispose();
         }
     }
     return(this.m_Job);
 }