Created
May 27, 2018 20:22
-
-
Save explorer14/23f1e5b758878bf6165b182fa6623096 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal class MyActivator : IJobActivator | |
{ | |
private readonly IServiceProvider serviceProvider; | |
public MyActivator(IServiceProvider serviceProvider) | |
{ | |
this.serviceProvider = serviceProvider; | |
} | |
public T CreateInstance<T>() | |
{ | |
return this.serviceProvider.GetService<T>(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment