ServiceStack.Funq.Quartz question

ServiceStack.Funq.Quartz Sample Code is

 public class MyServices : Service
    {
        public object Any(Hello request)
        {
            return new HelloResponse { Result = "Hello, {0}!".Fmt(request.Name) };
        }
    }
public class HelloJob : IJob
    {
        private MyServices MyServices { get; set; }
        public HelloJob(MyServices myServices)
        {
            MyServices = myServices;
        }
        public void Execute(IJobExecutionContext context)
        {
            var response = MyServices.Any(new ServiceModel.Hello
            {
                Name = "CodeRevver"
            });
            response.PrintDump();
        }
    }

The above is works fine.
if I in the MyServices Class, removed the Any function, and comment the Execute inner code.

 public class MyServices : Service
    {
       
    }

the quartz.net will get the error

【Quartz.Core.ErrorLogger】 An error occurred instantiating job to be executed. job= 'JobGroup1.GetUserJob111' Problem instantiating type 'ServiceStackWithQuartz.HelloJob'

why the class must have public object Any(Hello request) function ?

Please post any issues with Community Projects on their GitHub Project as I don’t expect they’ll get notifications when posting here, they’ll more likely be monitoring StackOverflow for issues. But If you know the project maintainers are on here then feel free to post with their @handle so they get a notifcation.

The GitHub Project for ServiceStack.Funq.Quartz is at: https://github.com/CodeRevver/ServiceStackWithQuartz

Ok , I See. I have copy the question to StackOverflow .

1 Like