-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compact Formatter und Stability Index
- Loading branch information
Sven
authored and
Sven
committed
Mar 22, 2022
1 parent
5eac8d1
commit 967daf0
Showing
19 changed files
with
219 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
Source/ModuleAnalyzer.App/Factory/DefaultCommandVisitorFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,24 @@ | ||
namespace PsModuleAnalyzer.Core.Model | ||
using System.Reflection; | ||
|
||
namespace PsModuleAnalyzer.Core.Model | ||
{ | ||
public class ModuleCommandCall | ||
{ | ||
public readonly IModuleCommand Target; | ||
private readonly ModuleDefinition _module; | ||
public readonly IModuleCommand Source; | ||
public readonly IModuleCommand Target; | ||
public readonly List<ModuleCommandParameter> Parameters = new(); | ||
public int References { get => CalculateReferences(); } | ||
|
||
public ModuleCommandCall(IModuleCommand source, IModuleCommand target) | ||
public ModuleCommandCall(IModuleCommand source, IModuleCommand target, ModuleDefinition module) | ||
{ | ||
_module = module; | ||
Source = source; | ||
Target = target; | ||
} | ||
|
||
private int CalculateReferences() | ||
=> _module.ModuleCommandCalls | ||
.Count(calls => calls.Source.Name == Source.Name && calls.Target.Name == Target.Name); | ||
} | ||
} |
Oops, something went wrong.