コード例 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="parent"></param>
        /// <param name="configContext"></param>
        /// <param name="section"></param>
        /// <returns></returns>
        public object Create(object parent, object configContext, System.Xml.XmlNode section)
        {
            TaskConfiguration config = new TaskConfiguration();

            config.LoadValuesFromConfigurationXml(section);
            return(config);
        }
コード例 #2
0
        /// <summary>
        /// 获取定时任务配置
        /// </summary>
        /// <returns></returns>
        public static TaskConfiguration GetConfig()
        {
            string            key = "mysoft.framework/task";
            TaskConfiguration obj = CacheHelper.Get <TaskConfiguration>(key);

            if (obj == null)
            {
                var tmp = ConfigurationManager.GetSection(key);
                obj = tmp as TaskConfiguration;
                CacheHelper.Permanent(key, obj);;
            }

            return(obj);
        }
コード例 #3
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="parent"></param>
 /// <param name="configContext"></param>
 /// <param name="section"></param>
 /// <returns></returns>
 public object Create(object parent, object configContext, System.Xml.XmlNode section)
 {
     TaskConfiguration config = new TaskConfiguration();
     config.LoadValuesFromConfigurationXml(section);
     return config;
 }
コード例 #4
0
 /// <summary>
 /// 实例化TaskRunner
 /// </summary>
 public TaskRunner(TaskConfiguration cfg)
 {
     this.cfg = cfg;
 }
コード例 #5
0
 /// <summary>
 /// 实例化TaskRunner
 /// </summary>
 public TaskRunner()
 {
     this.cfg = new TaskConfiguration();
 }