@@ -210,19 +210,15 @@ private void ResolveConflicts()
210
210
/// Store that a particular reference file is used.
211
211
/// </summary>
212
212
/// <param name="reference">The filename of the reference.</param>
213
- private void UseReference ( string reference )
214
- {
213
+ private void UseReference ( string reference ) =>
215
214
usedReferences [ reference ] = true ;
216
- }
217
215
218
216
/// <summary>
219
217
/// Store that a particular source file is used (by a project file).
220
218
/// </summary>
221
219
/// <param name="sourceFile">The source file.</param>
222
- private void UseSource ( FileInfo sourceFile )
223
- {
220
+ private void UseSource ( FileInfo sourceFile ) =>
224
221
sources [ sourceFile . FullName ] = sourceFile . Exists ;
225
- }
226
222
227
223
/// <summary>
228
224
/// The list of resolved reference files.
@@ -256,10 +252,8 @@ private void UseSource(FileInfo sourceFile)
256
252
/// </summary>
257
253
/// <param name="id">The assembly ID.</param>
258
254
/// <param name="projectFile">The project file making the reference.</param>
259
- private void UnresolvedReference ( string id , string projectFile )
260
- {
255
+ private void UnresolvedReference ( string id , string projectFile ) =>
261
256
unresolvedReferences [ id ] = projectFile ;
262
- }
263
257
264
258
private readonly TemporaryDirectory packageDirectory ;
265
259
@@ -318,10 +312,8 @@ private void AnalyseProject(FileInfo project)
318
312
319
313
}
320
314
321
- private bool Restore ( string target , string ? pathToNugetConfig = null )
322
- {
323
- return dotnet . RestoreToDirectory ( target , packageDirectory . DirInfo . FullName , pathToNugetConfig ) ;
324
- }
315
+ private bool Restore ( string target , string ? pathToNugetConfig = null ) =>
316
+ dotnet . RestoreToDirectory ( target , packageDirectory . DirInfo . FullName , pathToNugetConfig ) ;
325
317
326
318
private void Restore ( IEnumerable < string > targets , string ? pathToNugetConfig = null )
327
319
{
@@ -434,12 +426,17 @@ private void AnalyseSolutions(IEnumerable<string> solutions)
434
426
} ) ;
435
427
}
436
428
437
- public void Dispose ( )
438
- {
429
+ public void Dispose ( ) =>
439
430
packageDirectory ? . Dispose ( ) ;
440
- }
441
431
442
432
[ GeneratedRegex ( "<PackageReference .*Include=\" (.*?)\" .*/>" , RegexOptions . IgnoreCase | RegexOptions . Compiled | RegexOptions . Singleline ) ]
443
433
private static partial Regex PackageReference ( ) ;
434
+
435
+ [ GeneratedRegex ( "<FrameworkReference .*Include=\" (.*?)\" .*/>" , RegexOptions . IgnoreCase | RegexOptions . Compiled | RegexOptions . Singleline ) ]
436
+ private static partial Regex FrameworkReference ( ) ;
437
+
438
+ [ GeneratedRegex ( "<Project .*Sdk=\" (.*?)\" .*/>" , RegexOptions . IgnoreCase | RegexOptions . Compiled | RegexOptions . Singleline ) ]
439
+ private static partial Regex ProjectSdk ( ) ;
440
+
444
441
}
445
442
}
0 commit comments