-
-
Save justinyoo/eac25f494182227cbba59c6b61a87ccc to your computer and use it in GitHub Desktop.
Make Your Azure WebJobs Testable Again
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
public static class Program | |
{ | |
public static IJobHostBuilder WebJobHost { get; set; } = | |
new AutofacJobHostBuilder(new WebJobModule()) | |
.AddConfiguration(p => p.UseDevelopmentSettingsIfNecessary()); | |
public static void Main() | |
{ | |
WebJobHost.BuildHost(); | |
WebJobHost.IsRunning = true; | |
WebJobHost.RunAndBlock(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment