Skip to content

Instantly share code, notes, and snippets.

@justinyoo
Created September 5, 2017 13:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justinyoo/eac25f494182227cbba59c6b61a87ccc to your computer and use it in GitHub Desktop.
Save justinyoo/eac25f494182227cbba59c6b61a87ccc to your computer and use it in GitHub Desktop.
Make Your Azure WebJobs Testable Again
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