資源簡介
采用Quartz.NET開源作業調度框架,實現簡單的定時任務。
配合Topshelf.NET,直接安裝Windows服務。

代碼片段和文件信息
using?System.Collections.Specialized;
using?System.Configuration;
namespace?QuartzTH
{
///?
///?Configuration?for?the?Quartz?server.
///?
public?class?Configuration
{
private?const?string?PrefixServerConfiguration?=?“quartz.server“;
private?const?string?KeyServiceName?=?PrefixServerConfiguration?+?“.serviceName“;
private?const?string?KeyServiceDisplayName?=?PrefixServerConfiguration?+?“.serviceDisplayName“;
private?const?string?KeyServiceDescription?=?PrefixServerConfiguration?+?“.serviceDescription“;
????????private?const?string?KeyServerImplementationType?=?PrefixServerConfiguration?+?“.type“;
private?const?string?DefaultServiceName?=?“THServer“;
private?const?string?DefaultServiceDisplayName?=?“TH?Server“;
private?const?string?DefaultServiceDescription?=?“TH‘s?Quartz?Job?Scheduling?Server“;
????private?static?readonly?string?DefaultServerImplementationType?=?typeof(THServer).AssemblyQualifiedName;
????private?static?readonly?NameValueCollection?configuration;
????????///?
????????///?Initializes?the? ?class.
????????///?
static?Configuration()
{
configuration?=?(NameValueCollection)?ConfigurationManager.GetSection(“quartz“);
}
????????///?
????????///?Gets?the?name?of?the?service.
????????///?
????????///?The?name?of?the?service.
public?static?string?ServiceName
{
get?{?return?GetConfigurationOrDefault(KeyServiceName?DefaultServiceName);?}
}
????????///?
????????///?Gets?the?display?name?of?the?service.
????????///?
????????///?The?display?name?of?the?service.
public?static?string?ServiceDisplayName
{
get?{?return?GetConfigurationOrDefault(KeyServiceDisplayName?DefaultServiceDisplayName);?}
}
????????///?
????????///?Gets?the?service?description.
????????///?
????????///?The?service?description.
public?static?string?ServiceDescription
{
get?{?return?GetConfigurationOrDefault(KeyServiceDescription?DefaultServiceDescription);?}
}
????????///?
????????///?Gets?the?type?name?of?the?server?implementation.
????????///?
????????///?The?type?of?the?server?implementation.
????public?static?string?ServerImplementationType
????{
????????????get?{?return?GetConfigurationOrDefault(KeyServerImplementationType?DefaultServerImplementationType);?}
????}
///?
///?Returns?configuration?value?with?given?key.?If?configuration
///?for?the?does?not?exists?return?the?default?value.
///?
///?Key?to?read?configuration?with.
///?Default?value?to?return?if?configuration?is?not?found
///?The?configuration?value.
private?static?string?GetConfigurationOrDefault(string?configurationKey?string?defaultValue
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
????..A..H.????101888??2015-11-12?10:52??QuartJobApp\QuartJobApp\.vs\QuartJobApp\v14\.suo
?????文件?????135574??2015-10-15?16:14??QuartJobApp\QuartJobApp\packages\Common.Logging.3.3.0\Common.Logging.3.3.0.nupkg
?????文件??????44544??2015-10-15?16:14??QuartJobApp\QuartJobApp\packages\Common.Logging.3.3.0\lib\net35\Common.Logging.dll
?????文件?????153088??2015-10-15?16:14??QuartJobApp\QuartJobApp\packages\Common.Logging.3.3.0\lib\net35\Common.Logging.pdb
?????文件?????167814??2015-10-15?16:14??QuartJobApp\QuartJobApp\packages\Common.Logging.3.3.0\lib\net35\Common.Logging.xm
?????文件??????44544??2015-10-15?16:14??QuartJobApp\QuartJobApp\packages\Common.Logging.3.3.0\lib\net40\Common.Logging.dll
?????文件?????169472??2015-10-15?16:14??QuartJobApp\QuartJobApp\packages\Common.Logging.3.3.0\lib\net40\Common.Logging.pdb
?????文件?????167494??2015-10-15?16:14??QuartJobApp\QuartJobApp\packages\Common.Logging.3.3.0\lib\net40\Common.Logging.xm
?????文件??????32121??2015-10-15?16:14??QuartJobApp\QuartJobApp\packages\Common.Logging.Core.3.3.0\Common.Logging.Core.3.3.0.nupkg
?????文件???????9728??2015-10-15?16:14??QuartJobApp\QuartJobApp\packages\Common.Logging.Core.3.3.0\lib\net35\Common.Logging.Core.dll
?????文件??????11776??2015-10-15?16:14??QuartJobApp\QuartJobApp\packages\Common.Logging.Core.3.3.0\lib\net35\Common.Logging.Core.pdb
?????文件??????54432??2015-10-15?16:14??QuartJobApp\QuartJobApp\packages\Common.Logging.Core.3.3.0\lib\net35\Common.Logging.Core.xm
?????文件??????10240??2015-10-15?16:14??QuartJobApp\QuartJobApp\packages\Common.Logging.Core.3.3.0\lib\net40\Common.Logging.Core.dll
?????文件??????11776??2015-10-15?16:14??QuartJobApp\QuartJobApp\packages\Common.Logging.Core.3.3.0\lib\net40\Common.Logging.Core.pdb
?????文件??????54432??2015-10-15?16:14??QuartJobApp\QuartJobApp\packages\Common.Logging.Core.3.3.0\lib\net40\Common.Logging.Core.xm
?????文件??????10240??2015-10-15?16:14??QuartJobApp\QuartJobApp\packages\Common.Logging.Core.3.3.0\lib\portable-win+net40+sl40+wp7\Common.Logging.Core.dll
?????文件??????11776??2015-10-15?16:14??QuartJobApp\QuartJobApp\packages\Common.Logging.Core.3.3.0\lib\portable-win+net40+sl40+wp7\Common.Logging.Core.pdb
?????文件??????54432??2015-10-15?16:14??QuartJobApp\QuartJobApp\packages\Common.Logging.Core.3.3.0\lib\portable-win+net40+sl40+wp7\Common.Logging.Core.xm
?????文件??????37586??2015-10-15?16:14??QuartJobApp\QuartJobApp\packages\Common.Logging.Log4Net1211.3.3.0\Common.Logging.Log4Net1211.3.3.0.nupkg
?????文件??????15360??2015-10-15?16:14??QuartJobApp\QuartJobApp\packages\Common.Logging.Log4Net1211.3.3.0\lib\net35\Common.Logging.Log4Net1211.dll
?????文件??????38400??2015-10-15?16:14??QuartJobApp\QuartJobApp\packages\Common.Logging.Log4Net1211.3.3.0\lib\net35\Common.Logging.Log4Net1211.pdb
?????文件??????17250??2015-10-15?16:14??QuartJobApp\QuartJobApp\packages\Common.Logging.Log4Net1211.3.3.0\lib\net35\Common.Logging.Log4Net1211.xm
?????文件??????15360??2015-10-15?16:14??QuartJobApp\QuartJobApp\packages\Common.Logging.Log4Net1211.3.3.0\lib\net40\Common.Logging.Log4Net1211.dll
?????文件??????42496??2015-10-15?16:14??QuartJobApp\QuartJobApp\packages\Common.Logging.Log4Net1211.3.3.0\lib\net40\Common.Logging.Log4Net1211.pdb
?????文件??????17250??2015-10-15?16:14??QuartJobApp\QuartJobApp\packages\Common.Logging.Log4Net1211.3.3.0\lib\net40\Common.Logging.Log4Net1211.xm
?????文件?????299008??2015-10-15?16:13??QuartJobApp\QuartJobApp\packages\log4net.2.0.3\lib\net10-full\log4net.dll
?????文件????1432719??2015-10-15?16:13??QuartJobApp\QuartJobApp\packages\log4net.2.0.3\lib\net10-full\log4net.xm
?????文件?????299008??2015-10-15?16:13??QuartJobApp\QuartJobApp\packages\log4net.2.0.3\lib\net11-full\log4net.dll
?????文件????1433870??2015-10-15?16:13??QuartJobApp\QuartJobApp\packages\log4net.2.0.3\lib\net11-full\log4net.xm
?????文件?????303104??2015-10-15?16:13??QuartJobApp\QuartJobApp\packages\log4net.2.0.3\lib\net20-full\log4net.dll
............此處省略108個文件信息
- 上一篇:kiwi Syslog 8.3.7 破解版
- 下一篇:數據庫原理 PPT詳細、完整
評論
共有 條評論