Skip to content

Commit

Permalink
registration fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ffMathy committed Mar 7, 2020
1 parent ce54ab1 commit a4adfed
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/FluffySpoon.AspNet.NGrok/NGrokHostedService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ internal void InjectServerAddressesFeature(IServerAddressesFeature? feature)

private async void RunAsync()
{
if (_options.Disable)
return;

await _nGrokDownloader.DownloadExecutableAsync();

var url = await AdjustApplicationHttpUrlIfNeededAsync();
Expand Down
3 changes: 0 additions & 3 deletions src/FluffySpoon.AspNet.NGrok/NgrokAspNetCoreExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ public static IWebHostBuilder UseNGrok(this IWebHostBuilder builder)
return builder
.ConfigureServices((context, services) =>
{
if (services.All(x => x.ImplementationType != typeof(NGrokHostedService)))
return;
services.AddSingleton<IHostedService>(p => p.GetRequiredService<NGrokHostedService>());
});
}
Expand Down
1 change: 1 addition & 0 deletions src/FluffySpoon.AspNet.NGrok/NgrokOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace FluffySpoon.AspNet.NGrok
{
public class NGrokOptions
{
public bool Disable { get; set; }

public bool ShowNGrokWindow { get; set; }

Expand Down

0 comments on commit a4adfed

Please sign in to comment.