Skip to content

Commit

Permalink
Remove dependency on System.ValueTuple
Browse files Browse the repository at this point in the history
  • Loading branch information
mlaily committed Jun 10, 2018
1 parent 339ad6c commit c466911
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
11 changes: 8 additions & 3 deletions MovieBarCodeGenerator/CLI/CLIUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ namespace MovieBarCodeGenerator.CLI
{
public static class CLIUtils
{
private class WildCardInput
{
public string PathPartWithoutWildcards { get; set; }
public string FilePattern { get; set; }
}
/// <summary>
/// the accepted input can be:
/// - a simple file path
Expand All @@ -26,8 +31,8 @@ public static IEnumerable<string> GetExpandedAndValidatedFilePaths(IEnumerable<s
return Enumerable.Empty<string>();
}

List<(string PathPartWithoutWildcards, string FilePattern)> allInputFiles
= new List<(string PathPartWithoutWildcards, string FilePattern)>();
List<WildCardInput> allInputFiles
= new List<WildCardInput>();
// At this point, the input files list might contain wildcards needing to be expanded.
// To do that, we either keep just the file path,
// or, if the path contains a wildcard, we split the directory path and the file pattern:
Expand All @@ -44,7 +49,7 @@ public static IEnumerable<string> GetExpandedAndValidatedFilePaths(IEnumerable<s
}
inputPattern = Path.GetFileName(item);
}
allInputFiles.Add((rawInputWithoutWildCards, inputPattern));
allInputFiles.Add(new WildCardInput { PathPartWithoutWildcards = rawInputWithoutWildCards, FilePattern = inputPattern });
}

IEnumerable<string> LazyEnumeration()
Expand Down
3 changes: 0 additions & 3 deletions MovieBarCodeGenerator/MovieBarCodeGenerator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.ValueTuple, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.4.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
Expand Down

0 comments on commit c466911

Please sign in to comment.