Men*_*nan 0 asp.net scheduled-tasks quartz.net quartz.net-2.0
我开始implamenet在quartz.net 2.0.1上的第一个示例,但它给出了一个错误.
我创建了一个名为QuartzSample的asp.net web应用程序
我的简单代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Quartz;
namespace QuartzSample
{
public class Quartz : IJob
{
public void Execute(JobExecutionContext context)
{
SendMail();
}
private void SendMail()
{
// ...
}
}
}
Run Code Online (Sandbox Code Playgroud)
错误:
The type or namespace name 'JobExecutionContext' could not be found (are you missing a using directive or an assembly reference?)
Run Code Online (Sandbox Code Playgroud)
我找不到JobExecutionContext,但是,我找到了IJobExecutionContext.我相信这是前者的替代品.
[编辑]找到迁移指南:http://quartznet.sourceforge.net/migration_guide.html
从外观上看,他们已经将一堆类改为接口.如果您有Visual Studio,Intellisense应该能够帮助您找到要使用的正确界面.
该教程尚未更新以适应2.0更改.
归档时间: |
|
查看次数: |
3709 次 |
最近记录: |