Quartz .Net Job calling WCF service
What's the best way for me to call a WCF Se开发者_JS百科rvice from within a Quartz .Net job?
Is the easiest way to write a separate exe that spins up a WCF proxy and have that exe called from within the job? This seems like it would work but is a bit convoluted. It'd be nicer if I could somehow have the Job have the proxy injected in someway.
Thanks, Matt
A separate exe sounds a bit like over complicating things. A job should be quite able to call the service by itself also unless there's some dependency graph that needs to be accounted for. Are you using some IoC framework?
If you look things from unit testing perspective wouldn't it be just sufficient to have satisfactory interface for the proxy and and then allow setting of different version of it (mock) to the job via setter property?
精彩评论