/// <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); }
/// <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); }
/// <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; }
/// <summary> /// 实例化TaskRunner /// </summary> public TaskRunner(TaskConfiguration cfg) { this.cfg = cfg; }
/// <summary> /// 实例化TaskRunner /// </summary> public TaskRunner() { this.cfg = new TaskConfiguration(); }