我只是尝试了这个:
public class FooJob : IJob
{
public FooJob() { }
public void Execute(JobExecutionContext context)
{
Thread.CurrentThread.SetApartmentState(ApartmentState.STA);
}
}
但它会产生 InvalidOperationException。想法?
我只是尝试了这个:
public class FooJob : IJob
{
public FooJob() { }
public void Execute(JobExecutionContext context)
{
Thread.CurrentThread.SetApartmentState(ApartmentState.STA);
}
}
但它会产生 InvalidOperationException。想法?