Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Microsoft.ComponentDetection.Common/Column.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#nullable disable
namespace Microsoft.ComponentDetection.Common;

public class Column
internal class Column
{
public int Width { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Microsoft.ComponentDetection.Common;
using Microsoft.ComponentDetection.Contracts;

/// <inheritdoc/>
public class CommandLineInvocationService : ICommandLineInvocationService
internal class CommandLineInvocationService : ICommandLineInvocationService
{
private readonly IDictionary<string, string> commandLocatableCache = new ConcurrentDictionary<string, string>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Microsoft.ComponentDetection.Common;
/// <summary>
/// Compares two <see cref="TypedComponent"/>s by their <see cref="TypedComponent.Id"/>.
/// </summary>
public class ComponentComparer : EqualityComparer<TypedComponent>
internal class ComponentComparer : EqualityComparer<TypedComponent>
{
/// <summary>
/// Determines whether the specified objects are equal.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Microsoft.ComponentDetection.Common;
using Microsoft.Extensions.Logging;

/// <inheritdoc />
public class ComponentStreamEnumerableFactory : IComponentStreamEnumerableFactory
internal class ComponentStreamEnumerableFactory : IComponentStreamEnumerableFactory
{
private readonly IPathUtilityService pathUtilityService;
private readonly ILogger<ComponentStreamEnumerable> logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ namespace Microsoft.ComponentDetection.Common;

using System;

public class ConsoleWritingService : IConsoleWritingService
internal class ConsoleWritingService : IConsoleWritingService
{
public void Write(string content)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Microsoft.ComponentDetection.Common;
/// Merges dependnecy Scope in their order of Priority.
/// Higher priority scope, as indicated by its lower enum value is given precendence.
/// </summary>
public static class DependencyScopeComparer
internal static class DependencyScopeComparer
{
public static DependencyScope? GetMergedDependencyScope(DependencyScope? scope1, DependencyScope? scope2)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Microsoft.ComponentDetection.Common;
using Microsoft.ComponentDetection.Contracts;

[DebuggerDisplay("{Name}")]
public class DirectoryItemFacade
internal class DirectoryItemFacade
{
public string Name { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Microsoft.ComponentDetection.Common;
using System.Diagnostics;

[DebuggerDisplay("{Name}")]
public class DirectoryItemFacadeOptimized
internal class DirectoryItemFacadeOptimized
{
public string Name { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Microsoft.ComponentDetection.Common;
using Microsoft.ComponentDetection.Contracts;

/// <inheritdoc />
public class DirectoryUtilityService : IDirectoryUtilityService
internal class DirectoryUtilityService : IDirectoryUtilityService
{
/// <inheritdoc />
public void Delete(string path, bool recursive) => Directory.Delete(path, recursive);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ namespace Microsoft.ComponentDetection.Common;

using System;

public class DockerReferenceException : Exception
internal class DockerReferenceException : Exception
{
public DockerReferenceException(string reference, string exceptionErrorMessage)
: base($"Error while parsing docker reference {reference} : {exceptionErrorMessage}")
Expand All @@ -26,7 +26,7 @@ public DockerReferenceException(string message, Exception innerException)
}

// ReferenceInvalidFormat represents an error while trying to parse a string as a reference.
public class ReferenceInvalidFormatException : DockerReferenceException
internal class ReferenceInvalidFormatException : DockerReferenceException
{
private const string ErrorMessage = "invalid reference format";

Expand All @@ -46,7 +46,7 @@ public ReferenceInvalidFormatException(string message, Exception innerException)
}

// TagInvalidFormat represents an error while trying to parse a string as a tag.
public class ReferenceTagInvalidFormatException : DockerReferenceException
internal class ReferenceTagInvalidFormatException : DockerReferenceException
{
private const string ErrorMessage = "invalid tag format";

Expand All @@ -66,7 +66,7 @@ public ReferenceTagInvalidFormatException(string message, Exception innerExcepti
}

// DigestInvalidFormat represents an error while trying to parse a string as a tag.
public class ReferenceDigestInvalidFormatException : DockerReferenceException
internal class ReferenceDigestInvalidFormatException : DockerReferenceException
{
private const string ErrorMessage = "invalid digest format";

Expand All @@ -86,7 +86,7 @@ public ReferenceDigestInvalidFormatException(string message, Exception innerExce
}

// NameContainsUppercase is returned for invalid repository names that contain uppercase characters.
public class ReferenceNameContainsUppercaseException : DockerReferenceException
internal class ReferenceNameContainsUppercaseException : DockerReferenceException
{
private const string ErrorMessage = "repository name must be lowercase";

Expand All @@ -106,7 +106,7 @@ public ReferenceNameContainsUppercaseException(string message, Exception innerEx
}

// NameEmpty is returned for empty, invalid repository names.
public class ReferenceNameEmptyException : DockerReferenceException
internal class ReferenceNameEmptyException : DockerReferenceException
{
private const string ErrorMessage = "repository name must have at least one component";

Expand All @@ -126,7 +126,7 @@ public ReferenceNameEmptyException(string message, Exception innerException)
}

// ErrNameTooLong is returned when a repository name is longer than NameTotalLengthMax.
public class ReferenceNameTooLongException : DockerReferenceException
internal class ReferenceNameTooLongException : DockerReferenceException
{
private const string ErrorMessage = "repository name must not be more than 255 characters";

Expand All @@ -146,7 +146,7 @@ public ReferenceNameTooLongException(string message, Exception innerException)
}

// ErrNameNotCanonical is returned when a name is not canonical.
public class ReferenceNameNotCanonicalException : DockerReferenceException
internal class ReferenceNameNotCanonicalException : DockerReferenceException
{
private const string ErrorMessage = "repository name must be canonical";

Expand All @@ -165,7 +165,7 @@ public ReferenceNameNotCanonicalException(string message, Exception innerExcepti
}
}

public class InvalidDigestFormatError : DockerReferenceException
internal class InvalidDigestFormatError : DockerReferenceException
{
private const string ErrorMessage = "invalid digest format";

Expand All @@ -184,7 +184,7 @@ public InvalidDigestFormatError(string message, Exception innerException)
}
}

public class UnsupportedAlgorithmError : DockerReferenceException
internal class UnsupportedAlgorithmError : DockerReferenceException
{
private const string ErrorMessage = "unsupported digest algorithm";

Expand All @@ -203,7 +203,7 @@ public UnsupportedAlgorithmError(string message, Exception innerException)
}
}

public class InvalidDigestLengthError : DockerReferenceException
internal class InvalidDigestLengthError : DockerReferenceException
{
private const string ErrorMessage = "invalid checksum digest length";

Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.ComponentDetection.Common/DockerService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace Microsoft.ComponentDetection.Common;
using Microsoft.ComponentDetection.Contracts.BcdeModels;
using Microsoft.Extensions.Logging;

public class DockerService : IDockerService
internal class DockerService : IDockerService
{
// Base image annotations from ADO dockerTask
private const string BaseImageRefAnnotation = "image.base.ref.name";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Microsoft.ComponentDetection.Common;
using System.Linq;
using Microsoft.ComponentDetection.Contracts;

public class EnvironmentVariableService : IEnvironmentVariableService
internal class EnvironmentVariableService : IEnvironmentVariableService
{
public bool DoesEnvironmentVariableExist(string name)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Microsoft.ComponentDetection.Common;
using Microsoft.ComponentDetection.Contracts.Internal;
using Microsoft.Extensions.Logging;

public class FastDirectoryWalkerFactory : IObservableDirectoryWalkerFactory
internal class FastDirectoryWalkerFactory : IObservableDirectoryWalkerFactory
{
private readonly ConcurrentDictionary<DirectoryInfo, Lazy<IObservable<FileSystemInfo>>> pendingScans = new ConcurrentDictionary<DirectoryInfo, Lazy<IObservable<FileSystemInfo>>>();
private readonly IPathUtilityService pathUtilityService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Microsoft.ComponentDetection.Common;
using Microsoft.ComponentDetection.Contracts;

/// <inheritdoc />
public class FileUtilityService : IFileUtilityService
internal class FileUtilityService : IFileUtilityService
{
/// <inheritdoc />
public string ReadAllText(string filePath)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
<InternalsVisibleTo Include="Microsoft.ComponentDetection.Orchestrator" />
<InternalsVisibleTo Include="Microsoft.ComponentDetection.Detectors" />
<InternalsVisibleTo Include="Microsoft.ComponentDetection.TestsUtilities" />
<InternalsVisibleTo Include="Microsoft.ComponentDetection.Detectors.Tests" />
<InternalsVisibleTo Include="Microsoft.ComponentDetection.Orchestrator.Tests" />
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" Key="0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Microsoft.ComponentDetection.Common;
using Microsoft.Extensions.Logging;

// We may want to consider breaking this class into Win/Mac/Linux variants if it gets bigger
public class PathUtilityService : IPathUtilityService
internal class PathUtilityService : IPathUtilityService
{
public const uint CreationDispositionRead = 0x3;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Microsoft.ComponentDetection.Common;
using Microsoft.ComponentDetection.Contracts;
using Microsoft.Extensions.Logging;

public class SafeFileEnumerableFactory : ISafeFileEnumerableFactory
internal class SafeFileEnumerableFactory : ISafeFileEnumerableFactory
{
private readonly IPathUtilityService pathUtilityService;
private readonly ILogger<SafeFileEnumerableFactory> logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Microsoft.ComponentDetection.Common;
using System.Linq;
using System.Text;

public class TabularStringFormat
internal class TabularStringFormat
{
public const char DefaultVerticalLineChar = '|';
public const char DefaultHorizontalLineChar = '_';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Microsoft.ComponentDetection.Common.Telemetry.Records;
using System.Threading;
using System.Threading.Tasks;

public class BcdeExecutionTelemetryRecord : BaseDetectionTelemetryRecord
internal class BcdeExecutionTelemetryRecord : BaseDetectionTelemetryRecord
{
public override string RecordName => "BcdeExecution";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ namespace Microsoft.ComponentDetection.Common.Telemetry.Records;
using System;
using Microsoft.ComponentDetection.Contracts;

public class CommandLineInvocationTelemetryRecord : BaseDetectionTelemetryRecord
internal class CommandLineInvocationTelemetryRecord : BaseDetectionTelemetryRecord
{
public override string RecordName => "CommandLineInvocation";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ namespace Microsoft.ComponentDetection.Common.Telemetry.Records;

using System;

public class DependencyGraphTranslationRecord : BaseDetectionTelemetryRecord
internal class DependencyGraphTranslationRecord : BaseDetectionTelemetryRecord
{
public override string RecordName => "DependencyGraphTranslationRecord";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ namespace Microsoft.ComponentDetection.Common.Telemetry.Records;

using System.Runtime.CompilerServices;

public class DetectedComponentScopeRecord : BaseDetectionTelemetryRecord
internal class DetectedComponentScopeRecord : BaseDetectionTelemetryRecord
{
public override string RecordName => "ComponentScopeRecord";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Microsoft.ComponentDetection.Common.Telemetry.Records;

public class DetectorExecutionTelemetryRecord : BaseDetectionTelemetryRecord
internal class DetectorExecutionTelemetryRecord : BaseDetectionTelemetryRecord
{
public override string RecordName => "DetectorExecution";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Microsoft.ComponentDetection.Common.Telemetry.Records;

public class DockerServiceImageExistsLocallyTelemetryRecord : BaseDetectionTelemetryRecord
internal class DockerServiceImageExistsLocallyTelemetryRecord : BaseDetectionTelemetryRecord
{
public override string RecordName => "DockerServiceImageExistsLocally";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Microsoft.ComponentDetection.Common.Telemetry.Records;

public class DockerServiceInspectImageTelemetryRecord : BaseDetectionTelemetryRecord
internal class DockerServiceInspectImageTelemetryRecord : BaseDetectionTelemetryRecord
{
public override string RecordName => "DockerServiceInspectImage";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Microsoft.ComponentDetection.Common.Telemetry.Records;

public class DockerServiceSystemInfoTelemetryRecord : BaseDetectionTelemetryRecord
internal class DockerServiceSystemInfoTelemetryRecord : BaseDetectionTelemetryRecord
{
public override string RecordName => "DockerServiceSystemInfo";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Microsoft.ComponentDetection.Common.Telemetry.Records;

public class DockerServiceTelemetryRecord : BaseDetectionTelemetryRecord
internal class DockerServiceTelemetryRecord : BaseDetectionTelemetryRecord
{
public override string RecordName => "DockerService";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Microsoft.ComponentDetection.Common.Telemetry.Records;

public class DockerServiceTryPullImageTelemetryRecord : BaseDetectionTelemetryRecord
internal class DockerServiceTryPullImageTelemetryRecord : BaseDetectionTelemetryRecord
{
public override string RecordName => "DockerServiceTryPullImage";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Microsoft.ComponentDetection.Common.Telemetry.Records;

public class FailedParsingFileRecord : BaseDetectionTelemetryRecord
internal class FailedParsingFileRecord : BaseDetectionTelemetryRecord
{
public override string RecordName => "FailedParsingFile";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Microsoft.ComponentDetection.Common.Telemetry.Records;

public class GoReplaceTelemetryRecord : BaseDetectionTelemetryRecord
internal class GoReplaceTelemetryRecord : BaseDetectionTelemetryRecord
{
public override string RecordName => "GoReplace";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Microsoft.ComponentDetection.Common.Telemetry.Records;

public class InvalidParseVersionTelemetryRecord : BaseDetectionTelemetryRecord
internal class InvalidParseVersionTelemetryRecord : BaseDetectionTelemetryRecord
{
public override string RecordName => "InvalidParseVersion";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Microsoft.ComponentDetection.Common.Telemetry.Records;

public class LinuxContainerDetectorImageDetectionFailed : BaseDetectionTelemetryRecord
internal class LinuxContainerDetectorImageDetectionFailed : BaseDetectionTelemetryRecord
{
public override string RecordName => "LinuxContainerDetectorImageDetectionFailed";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Microsoft.ComponentDetection.Common.Telemetry.Records;

public class LinuxContainerDetectorLayerAwareness : BaseDetectionTelemetryRecord
internal class LinuxContainerDetectorLayerAwareness : BaseDetectionTelemetryRecord
{
public override string RecordName => "LinuxContainerDetectorLayerAwareness";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Microsoft.ComponentDetection.Common.Telemetry.Records;

public class LinuxContainerDetectorMissingRepoNameAndTagRecord : BaseDetectionTelemetryRecord
internal class LinuxContainerDetectorMissingRepoNameAndTagRecord : BaseDetectionTelemetryRecord
{
public override string RecordName => "MissingRepoNameAndTag";
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Microsoft.ComponentDetection.Common.Telemetry.Records;

public class LinuxContainerDetectorMissingVersion : BaseDetectionTelemetryRecord
internal class LinuxContainerDetectorMissingVersion : BaseDetectionTelemetryRecord
{
public override string RecordName { get; } = "MissingVersion";

Expand Down
Loading
Loading