Skip to content

Commit f92814a

Browse files
Improve readability with type aliases
1 parent 7b05340 commit f92814a

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/AspNetCore/WebApi/src/Asp.Versioning.Mvc.ApiExplorer/ApiVersionDescriptionProviderFactory.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
11
// Copyright (c) .NET Foundation and contributors. All rights reserved.
22

3-
namespace Microsoft.AspNetCore.Builder;
3+
#pragma warning disable SA1135 // Using directives should be qualified
4+
#pragma warning disable SA1200 // Using directives should be placed correctly
45

56
using Asp.Versioning;
67
using Asp.Versioning.ApiExplorer;
7-
using Microsoft.AspNetCore.Routing;
88
using Microsoft.Extensions.Options;
99

10+
namespace Microsoft.AspNetCore.Builder;
11+
12+
using Microsoft.AspNetCore.Routing;
13+
using Activator = Func<IEnumerable<IApiVersionMetadataCollationProvider>, ISunsetPolicyManager, IOptions<ApiExplorerOptions>, IApiVersionDescriptionProvider>;
14+
1015
internal sealed class ApiVersionDescriptionProviderFactory : IApiVersionDescriptionProviderFactory
1116
{
1217
private readonly ISunsetPolicyManager sunsetPolicyManager;
1318
private readonly IApiVersionMetadataCollationProvider[] providers;
1419
private readonly IOptions<ApiExplorerOptions> options;
15-
private readonly Func<IEnumerable<IApiVersionMetadataCollationProvider>, ISunsetPolicyManager, IOptions<ApiExplorerOptions>, IApiVersionDescriptionProvider> activator;
20+
private readonly Activator activator;
1621

1722
public ApiVersionDescriptionProviderFactory(
18-
Func<IEnumerable<IApiVersionMetadataCollationProvider>, ISunsetPolicyManager, IOptions<ApiExplorerOptions>, IApiVersionDescriptionProvider> activator,
23+
Activator activator,
1924
ISunsetPolicyManager sunsetPolicyManager,
2025
IEnumerable<IApiVersionMetadataCollationProvider> providers,
2126
IOptions<ApiExplorerOptions> options )

0 commit comments

Comments
 (0)