How to resolve type using ServiceStack Funq IoC

前端 未结 3 910
粉色の甜心
粉色の甜心 2021-01-21 23:20

I\'m trying to write a JobActivator for HangFire using ServiceStack IoC and I\'m having trouble resolving from a type. I\'m sure this will be an easy answer for someone with mo

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-22 00:15

    I think you want to get a T and to return a T

    public T ActivateJob() where T : class
    {
        return _container.Resolve();  
    }
    

提交回复
热议问题