Skip to content

Commit e38ff77

Browse files
committed
- v10.0.4
1 parent 5c14609 commit e38ff77

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

Shuttle.Core.Reflection/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
[assembly: AssemblyTitle(".NET Standard 2.0")]
3030
#endif
3131

32-
[assembly: AssemblyVersion("10.0.3.0")]
32+
[assembly: AssemblyVersion("10.0.4.0")]
3333
[assembly: AssemblyCopyright("Copyright © Eben Roux 2017")]
3434
[assembly: AssemblyProduct("Shuttle.Core.Reflection")]
3535
[assembly: AssemblyCompany("Shuttle")]
3636
[assembly: AssemblyConfiguration("Release")]
37-
[assembly: AssemblyInformationalVersion("10.0.3")]
37+
[assembly: AssemblyInformationalVersion("10.0.4")]
3838
[assembly: ComVisible(false)]

Shuttle.Core.Reflection/ReflectionService.cs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,11 @@ public IEnumerable<Assembly> GetAssemblies()
160160

161161
public IEnumerable<Assembly> GetMatchingAssemblies(string regex, string folder)
162162
{
163-
var expression = new Regex(regex, RegexOptions.IgnoreCase);
163+
return GetMatchingAssemblies(new Regex(regex, RegexOptions.IgnoreCase), folder);
164+
}
165+
166+
private IEnumerable<Assembly> GetMatchingAssemblies(Regex expression, string folder)
167+
{
164168
var result = new List<Assembly>();
165169

166170
if (Directory.Exists(folder))
@@ -175,14 +179,16 @@ public IEnumerable<Assembly> GetMatchingAssemblies(string regex, string folder)
175179
.Where(file => expression.IsMatch(Path.GetFileNameWithoutExtension(file)))
176180
.Select(GetAssembly)
177181
.Where(assembly => assembly != null));
178-
}
182+
}
179183

180-
return result;
181-
}
184+
return result;
185+
}
182186

183187
public IEnumerable<Assembly> GetMatchingAssemblies(string regex)
184188
{
185-
var assemblies = new List<Assembly>(AppDomain.CurrentDomain.GetAssemblies());
189+
var expression = new Regex(regex, RegexOptions.IgnoreCase);
190+
var assemblies = new List<Assembly>(AppDomain.CurrentDomain.GetAssemblies()
191+
.Where(assembly => expression.IsMatch(assembly.FullName)));
186192

187193
foreach (
188194
var assembly in

0 commit comments

Comments
 (0)