Skip to content
This repository was archived by the owner on Nov 22, 2018. It is now read-only.

Commit 272343c

Browse files
committed
Return IServiceCollection from AddDirectoryBrowser extension methods
1 parent d42eb56 commit 272343c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Microsoft.AspNetCore.StaticFiles/DirectoryBrowserServiceExtensions.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,17 @@ public static class DirectoryBrowserServiceExtensions
1414
/// Adds directory browser middleware services.
1515
/// </summary>
1616
/// <param name="services">The <see cref="IServiceCollection" /> to add services to.</param>
17-
public static void AddDirectoryBrowser(this IServiceCollection services)
17+
/// <returns>The <see cref="IServiceCollection"/> so that additional calls can be chained.</returns>
18+
public static IServiceCollection AddDirectoryBrowser(this IServiceCollection services)
1819
{
1920
if (services == null)
2021
{
2122
throw new ArgumentNullException(nameof(services));
2223
}
2324

2425
services.AddWebEncoders();
26+
27+
return services;
2528
}
2629
}
2730
}

0 commit comments

Comments
 (0)