Skip to content

Commit

Permalink
Make FilterPath internal
Browse files Browse the repository at this point in the history
  • Loading branch information
AArnott committed Dec 21, 2019
1 parent 32d626e commit dc5930e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Expand Up @@ -18,6 +18,7 @@
</EmbeddedResource>
<EmbeddedResource Include="Keys\*.snk" />
<EmbeddedResource Include="Keys\*.pfx" />
<Compile Include="..\NerdBank.GitVersioning\FilterPath.cs" Link="FilterPath.cs" />
<EmbeddedResource Include="..\NerdBank.GitVersioning\version.schema.json" Link="version.schema.json" />
<EmbeddedResource Include="test.vcprj" />
<EmbeddedResource Include="test.prj" />
Expand Down
14 changes: 7 additions & 7 deletions src/NerdBank.GitVersioning/FilterPath.cs
Expand Up @@ -10,25 +10,25 @@ namespace Nerdbank.GitVersioning
/// <summary>
/// A filter (include or exclude) representing a repo relative path.
/// </summary>
public class FilterPath
internal class FilterPath
{
private readonly StringComparison stringComparison;

/// <summary>
/// True if this <see cref="FilterPath"/> represents an exclude filter.
/// </summary>
public bool IsExclude { get; }
internal bool IsExclude { get; }

/// <summary>
/// Path relative to the repository root that this <see cref="FilterPath"/> represents.
/// Slashes are canonical for this OS.
/// </summary>
public string RepoRelativePath { get; }
internal string RepoRelativePath { get; }

/// <summary>
/// True if this <see cref="FilterPath"/> represents the root of the repository.
/// </summary>
public bool IsRoot => this.RepoRelativePath == "";
internal bool IsRoot => this.RepoRelativePath == "";

/// <summary>
/// Parses a pathspec-like string into a root-relative path.
Expand Down Expand Up @@ -107,7 +107,7 @@ private static string ParsePath(string path, string relativeTo)
/// </param>
/// <param name="ignoreCase">Whether case should be ignored by <see cref="Excludes"/></param>
/// <exception cref="FormatException">Invalid path spec.</exception>
public FilterPath(string pathSpec, string relativeTo, bool ignoreCase = false)
internal FilterPath(string pathSpec, string relativeTo, bool ignoreCase = false)
{
Requires.NotNullOrEmpty(pathSpec, nameof(pathSpec));

Expand Down Expand Up @@ -155,7 +155,7 @@ public FilterPath(string pathSpec, string relativeTo, bool ignoreCase = false)
/// <c>null</c> if no path filters are set. Otherwise, returns a list of
/// <see cref="FilterPath"/> instances.
/// </returns>
public static IReadOnlyList<FilterPath> FromVersionOptions(VersionOptions versionOptions,
internal static IReadOnlyList<FilterPath> FromVersionOptions(VersionOptions versionOptions,
string relativeRepoProjectDirectory,
IRepository repository)
{
Expand All @@ -177,7 +177,7 @@ public FilterPath(string pathSpec, string relativeTo, bool ignoreCase = false)
/// True if this <see cref="FilterPath"/> is an excluding filter that matches
/// <paramref name="repoRelativePath"/>, otherwise false.
/// </returns>
public bool Excludes(string repoRelativePath)
internal bool Excludes(string repoRelativePath)
{
if (repoRelativePath is null)
throw new ArgumentNullException(nameof(repoRelativePath));
Expand Down

0 comments on commit dc5930e

Please sign in to comment.