Skip to content

Commit c8690e2

Browse files
authored
refactor: make Orchestrator implementation details internal (#1696)
Make 8 classes internal in the Orchestrator project: - Converter classes: CommaDelimitedConverter, KeyValueDelimitedConverter, SemicolonDelimitedConverter - CLI helpers: ArgumentHelper, IArgumentHelper - Concrete service implementations: DetectorProcessingService, DetectorRestrictionService, DefaultGraphTranslationService Kept public: ServiceCollectionExtensions, ScanExecutionService, ScanCommand, ScanSettings, LoggingEnricher, DetectorRestrictions, all experiment types, all service interfaces, DetectorRunResult, DetectorProcessingResult. Part of #455
1 parent aeb08db commit c8690e2

File tree

9 files changed

+9
-8
lines changed

9 files changed

+9
-8
lines changed

src/Microsoft.ComponentDetection.Orchestrator/ArgumentHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace Microsoft.ComponentDetection.Orchestrator;
55
using CommandLine;
66
using Microsoft.ComponentDetection.Orchestrator.Commands;
77

8-
public class ArgumentHelper : IArgumentHelper
8+
internal class ArgumentHelper : IArgumentHelper
99
{
1010
private readonly IEnumerable<ScanSettings> argumentSets;
1111

src/Microsoft.ComponentDetection.Orchestrator/Extensions/CommaDelimitedConverter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Microsoft.ComponentDetection.Orchestrator.Extensions;
88
/// <summary>
99
/// Converts a comma separated string to an array of strings.
1010
/// </summary>
11-
public class CommaDelimitedConverter : TypeConverter
11+
internal class CommaDelimitedConverter : TypeConverter
1212
{
1313
/// <inheritdoc />
1414
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)

src/Microsoft.ComponentDetection.Orchestrator/Extensions/KeyValueDelimitedConverter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Microsoft.ComponentDetection.Orchestrator.Extensions;
99
/// <summary>
1010
/// Converts a comma separated string of key value pairs to a dictionary.
1111
/// </summary>
12-
public class KeyValueDelimitedConverter : TypeConverter
12+
internal class KeyValueDelimitedConverter : TypeConverter
1313
{
1414
/// <inheritdoc />
1515
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)

src/Microsoft.ComponentDetection.Orchestrator/Extensions/SemicolonDelimitedConverter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Microsoft.ComponentDetection.Orchestrator.Extensions;
88
/// <summary>
99
/// Converts a semicolon separated string to an array of strings.
1010
/// </summary>
11-
public class SemicolonDelimitedConverter : TypeConverter
11+
internal class SemicolonDelimitedConverter : TypeConverter
1212
{
1313
/// <inheritdoc />
1414
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)

src/Microsoft.ComponentDetection.Orchestrator/IArgumentHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ namespace Microsoft.ComponentDetection.Orchestrator;
22

33
using CommandLine;
44

5-
public interface IArgumentHelper
5+
internal interface IArgumentHelper
66
{
77
ParserResult<object> ParseArguments(string[] args);
88

src/Microsoft.ComponentDetection.Orchestrator/Microsoft.ComponentDetection.Orchestrator.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<InternalsVisibleTo Include="Microsoft.ComponentDetection.Orchestrator.Tests" />
55
<InternalsVisibleTo Include="Microsoft.ComponentDetection" />
66
<InternalsVisibleTo Include="Microsoft.ComponentDetection.TestsUtilities" />
7+
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" PublicKey="0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7" />
78
</ItemGroup>
89

910
<ItemGroup>

src/Microsoft.ComponentDetection.Orchestrator/Services/DetectorProcessingService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace Microsoft.ComponentDetection.Orchestrator.Services;
2222
using Spectre.Console;
2323
using static System.Environment;
2424

25-
public class DetectorProcessingService : IDetectorProcessingService
25+
internal class DetectorProcessingService : IDetectorProcessingService
2626
{
2727
private const int DefaultMaxDetectionThreads = 5;
2828
private const int ExperimentalTimeoutSeconds = 240; // 4 minutes

src/Microsoft.ComponentDetection.Orchestrator/Services/DetectorRestrictionService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace Microsoft.ComponentDetection.Orchestrator.Services;
77
using Microsoft.ComponentDetection.Orchestrator.Exceptions;
88
using Microsoft.Extensions.Logging;
99

10-
public class DetectorRestrictionService : IDetectorRestrictionService
10+
internal class DetectorRestrictionService : IDetectorRestrictionService
1111
{
1212
private readonly IList<string> oldDetectorIds = ["MSLicenseDevNpm", "MSLicenseDevNpmList", "MSLicenseNpm", "MSLicenseNpmList"];
1313
private readonly string newDetectorId = "NpmWithRoots";

src/Microsoft.ComponentDetection.Orchestrator/Services/GraphTranslation/DefaultGraphTranslationService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace Microsoft.ComponentDetection.Orchestrator.Services.GraphTranslation;
1515
using Microsoft.ComponentDetection.Orchestrator.Commands;
1616
using Microsoft.Extensions.Logging;
1717

18-
public class DefaultGraphTranslationService : IGraphTranslationService
18+
internal class DefaultGraphTranslationService : IGraphTranslationService
1919
{
2020
private readonly ILogger<DefaultGraphTranslationService> logger;
2121

0 commit comments

Comments
 (0)