Skip to content

Commit 1de86b4

Browse files
committed
C#: Address review comments.
1 parent d968a91 commit 1de86b4

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public DependencyManager(string srcDir, IDependencyOptions options, ILogger logg
143143
DateTime.Now - startTime);
144144
}
145145

146-
public DependencyManager(string srcDir) : this(srcDir, DependencyOptionsFactory.Default, new ConsoleLogger(Verbosity.Info)) { }
146+
public DependencyManager(string srcDir) : this(srcDir, DependencyOptions.Default, new ConsoleLogger(Verbosity.Info)) { }
147147

148148
private IEnumerable<string> GetFiles(string pattern, bool recurseSubdirectories = true)
149149
{

csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyOptions.cs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ public interface IDependencyOptions
5353

5454
public class DependencyOptions : IDependencyOptions
5555
{
56+
private static readonly DependencyOptions instance = new DependencyOptions();
57+
58+
public static IDependencyOptions Default => instance;
59+
5660
public IList<string> DllDirs { get; set; } = new List<string>();
5761

5862
public IList<string> Excludes { get; set; } = new List<string>();
@@ -70,11 +74,4 @@ public class DependencyOptions : IDependencyOptions
7074
public bool ExcludesFile(string path) =>
7175
Excludes.Any(path.Contains);
7276
}
73-
74-
public class DependencyOptionsFactory
75-
{
76-
private static readonly DependencyOptions instance = new DependencyOptions();
77-
78-
public static IDependencyOptions Default => instance;
79-
}
80-
}
77+
}

0 commit comments

Comments
 (0)