From 91aa878cbe7af3edc523ea6f2996db8b50cc1a81 Mon Sep 17 00:00:00 2001 From: ATrefzer <36333177+ATrefzer@users.noreply.github.com> Date: Fri, 3 Jul 2026 19:30:50 +0200 Subject: [PATCH 1/9] Step 1: Analyzer Sdk --- .../CSharpCodeAnalyst.AnalyzerSdk.csproj | 36 + .../Shared/Contracts/IAnalyzer.cs | 0 .../Shared/Contracts/IPublisher.cs | 0 .../Contracts/TabularData/ColumnType.cs | 0 .../Contracts/TabularData/Table.cs | 0 .../TabularData/TableColumnDefinition.cs | 0 .../Contracts/TabularData/TableRow.cs | 0 .../Shared/Messages/AddNodeToGraphRequest.cs | 0 .../Shared/Messages/ShowPartitionsRequest.cs | 0 .../Shared/Messages/ShowTabularDataRequest.cs | 0 .../Shared/Notifications/IUserNotification.cs | 0 .../Shared/Resources/SdkStrings.Designer.cs | 90 +++ .../Shared/Resources/SdkStrings.resx | 129 ++++ .../Shared/Search/PascalCaseSearch.cs | 0 .../Shared/Search/SearchExpression.cs | 2 +- .../Shared/Search/SearchExpressionFactory.cs | 4 +- .../Services/SourceLocationNavigator.cs | 6 +- .../Shared/UI/ToastManager.cs | 0 .../Shared/UI/ToastNotification.xaml | 4 +- .../Shared/UI/ToastNotification.xaml.cs | 0 .../Shared/Wpf/IconLoader.cs | 2 +- .../Shared/Wpf/WpfCommand.cs | 0 .../CSharpCodeAnalyst.Analyzers.csproj | 55 ++ .../Analyzers/ArchitecturalRules/Analyzer.cs | 2 +- .../ArchitecturalRules/PatternMatcher.cs | 0 .../ArchitecturalRules/PersistenceData.cs | 0 .../ArchitecturalRulesDialog.xaml | 2 +- .../ArchitecturalRulesDialog.xaml.cs | 2 +- .../Presentation/RelationshipViewModel.cs | 0 .../RelationshipViewModelTemplate.xaml | 0 .../Presentation/RuleViolationViewModel.cs | 2 +- .../Presentation/RuleViolationsViewModel.cs | 2 +- .../ArchitecturalRules/RuleParser.cs | 2 +- .../ArchitecturalRules/Rules/DenyRule.cs | 0 .../ArchitecturalRules/Rules/IsolateRule.cs | 0 .../ArchitecturalRules/Rules/RestrictRule.cs | 0 .../Rules/RestrictRuleGroup.cs | 0 .../ArchitecturalRules/Rules/RuleBase.cs | 0 .../Analyzers/ArchitecturalRules/Violation.cs | 0 .../ArchitecturalRules/ViolationFormatter.cs | 2 +- .../Analyzers/EventRegistration/Analyzer.cs | 2 +- .../Presentation/EventImbalanceViewModel.cs | 2 +- .../Presentation/EventImbalancesViewModel.cs | 2 +- .../Presentation/SourceLocationTemplate.xaml | 0 .../Analyzers/EventRegistration/Result.cs | 0 .../Analyzers/MethodComplexity/Analyzer.cs | 2 +- .../MethodComplexityRowViewModel.cs | 0 .../Presentation/MethodComplexityViewModel.cs | 2 +- .../Analyzers/Resources/Strings.Designer.cs | 639 ++++++++++++++++++ .../Features/Analyzers/Resources/Strings.resx | 334 +++++++++ .../Analyzers/TypeCohesion/Analyzer.cs | 2 +- .../Presentation/TypeCohesionRowViewModel.cs | 0 .../Presentation/TypeCohesionViewModel.cs | 2 +- .../Analyzers/TypeDependencies/Analyzer.cs | 2 +- .../Presentation/TypeDependenciesViewModel.cs | 2 +- .../Presentation/TypeDependencyViewModel.cs | 0 CSharpCodeAnalyst.sln | 40 +- CSharpCodeAnalyst/CSharpCodeAnalyst.csproj | 17 +- .../Resources/Strings.Designer.cs | 554 --------------- CSharpCodeAnalyst/Resources/Strings.resx | 194 ------ Tests/Tests.csproj | 2 + 61 files changed, 1340 insertions(+), 800 deletions(-) create mode 100644 CSharpCodeAnalyst.AnalyzerSdk/CSharpCodeAnalyst.AnalyzerSdk.csproj rename {CSharpCodeAnalyst => CSharpCodeAnalyst.AnalyzerSdk}/Shared/Contracts/IAnalyzer.cs (100%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.AnalyzerSdk}/Shared/Contracts/IPublisher.cs (100%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.AnalyzerSdk}/Shared/DynamicDataGrid/Contracts/TabularData/ColumnType.cs (100%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.AnalyzerSdk}/Shared/DynamicDataGrid/Contracts/TabularData/Table.cs (100%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.AnalyzerSdk}/Shared/DynamicDataGrid/Contracts/TabularData/TableColumnDefinition.cs (100%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.AnalyzerSdk}/Shared/DynamicDataGrid/Contracts/TabularData/TableRow.cs (100%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.AnalyzerSdk}/Shared/Messages/AddNodeToGraphRequest.cs (100%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.AnalyzerSdk}/Shared/Messages/ShowPartitionsRequest.cs (100%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.AnalyzerSdk}/Shared/Messages/ShowTabularDataRequest.cs (100%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.AnalyzerSdk}/Shared/Notifications/IUserNotification.cs (100%) create mode 100644 CSharpCodeAnalyst.AnalyzerSdk/Shared/Resources/SdkStrings.Designer.cs create mode 100644 CSharpCodeAnalyst.AnalyzerSdk/Shared/Resources/SdkStrings.resx rename {CSharpCodeAnalyst => CSharpCodeAnalyst.AnalyzerSdk}/Shared/Search/PascalCaseSearch.cs (100%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.AnalyzerSdk}/Shared/Search/SearchExpression.cs (99%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.AnalyzerSdk}/Shared/Search/SearchExpressionFactory.cs (94%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.AnalyzerSdk}/Shared/Services/SourceLocationNavigator.cs (97%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.AnalyzerSdk}/Shared/UI/ToastManager.cs (100%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.AnalyzerSdk}/Shared/UI/ToastNotification.xaml (88%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.AnalyzerSdk}/Shared/UI/ToastNotification.xaml.cs (100%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.AnalyzerSdk}/Shared/Wpf/IconLoader.cs (96%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.AnalyzerSdk}/Shared/Wpf/WpfCommand.cs (100%) create mode 100644 CSharpCodeAnalyst.Analyzers/CSharpCodeAnalyst.Analyzers.csproj rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Features/Analyzers/ArchitecturalRules/Analyzer.cs (99%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Features/Analyzers/ArchitecturalRules/PatternMatcher.cs (100%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Features/Analyzers/ArchitecturalRules/PersistenceData.cs (100%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Features/Analyzers/ArchitecturalRules/Presentation/ArchitecturalRulesDialog.xaml (97%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Features/Analyzers/ArchitecturalRules/Presentation/ArchitecturalRulesDialog.xaml.cs (98%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Features/Analyzers/ArchitecturalRules/Presentation/RelationshipViewModel.cs (100%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Features/Analyzers/ArchitecturalRules/Presentation/RelationshipViewModelTemplate.xaml (100%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Features/Analyzers/ArchitecturalRules/Presentation/RuleViolationViewModel.cs (98%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Features/Analyzers/ArchitecturalRules/Presentation/RuleViolationsViewModel.cs (97%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Features/Analyzers/ArchitecturalRules/RuleParser.cs (98%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Features/Analyzers/ArchitecturalRules/Rules/DenyRule.cs (100%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Features/Analyzers/ArchitecturalRules/Rules/IsolateRule.cs (100%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Features/Analyzers/ArchitecturalRules/Rules/RestrictRule.cs (100%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Features/Analyzers/ArchitecturalRules/Rules/RestrictRuleGroup.cs (100%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Features/Analyzers/ArchitecturalRules/Rules/RuleBase.cs (100%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Features/Analyzers/ArchitecturalRules/Violation.cs (100%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Features/Analyzers/ArchitecturalRules/ViolationFormatter.cs (96%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Features/Analyzers/EventRegistration/Analyzer.cs (97%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Features/Analyzers/EventRegistration/Presentation/EventImbalanceViewModel.cs (96%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Features/Analyzers/EventRegistration/Presentation/EventImbalancesViewModel.cs (96%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Features/Analyzers/EventRegistration/Presentation/SourceLocationTemplate.xaml (100%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Features/Analyzers/EventRegistration/Result.cs (100%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Features/Analyzers/MethodComplexity/Analyzer.cs (97%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Features/Analyzers/MethodComplexity/Presentation/MethodComplexityRowViewModel.cs (100%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Features/Analyzers/MethodComplexity/Presentation/MethodComplexityViewModel.cs (98%) create mode 100644 CSharpCodeAnalyst.Analyzers/Features/Analyzers/Resources/Strings.Designer.cs create mode 100644 CSharpCodeAnalyst.Analyzers/Features/Analyzers/Resources/Strings.resx rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Features/Analyzers/TypeCohesion/Analyzer.cs (96%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Features/Analyzers/TypeCohesion/Presentation/TypeCohesionRowViewModel.cs (100%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Features/Analyzers/TypeCohesion/Presentation/TypeCohesionViewModel.cs (98%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Features/Analyzers/TypeDependencies/Analyzer.cs (97%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Features/Analyzers/TypeDependencies/Presentation/TypeDependenciesViewModel.cs (98%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Features/Analyzers/TypeDependencies/Presentation/TypeDependencyViewModel.cs (100%) diff --git a/CSharpCodeAnalyst.AnalyzerSdk/CSharpCodeAnalyst.AnalyzerSdk.csproj b/CSharpCodeAnalyst.AnalyzerSdk/CSharpCodeAnalyst.AnalyzerSdk.csproj new file mode 100644 index 00000000..61861cf8 --- /dev/null +++ b/CSharpCodeAnalyst.AnalyzerSdk/CSharpCodeAnalyst.AnalyzerSdk.csproj @@ -0,0 +1,36 @@ + + + + net10.0-windows + enable + enable + true + + CSharpCodeAnalyst + + + + + + + + + True + True + SdkStrings.resx + + + + + + PublicResXFileCodeGenerator + SdkStrings.Designer.cs + + + + + + + + diff --git a/CSharpCodeAnalyst/Shared/Contracts/IAnalyzer.cs b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Contracts/IAnalyzer.cs similarity index 100% rename from CSharpCodeAnalyst/Shared/Contracts/IAnalyzer.cs rename to CSharpCodeAnalyst.AnalyzerSdk/Shared/Contracts/IAnalyzer.cs diff --git a/CSharpCodeAnalyst/Shared/Contracts/IPublisher.cs b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Contracts/IPublisher.cs similarity index 100% rename from CSharpCodeAnalyst/Shared/Contracts/IPublisher.cs rename to CSharpCodeAnalyst.AnalyzerSdk/Shared/Contracts/IPublisher.cs diff --git a/CSharpCodeAnalyst/Shared/DynamicDataGrid/Contracts/TabularData/ColumnType.cs b/CSharpCodeAnalyst.AnalyzerSdk/Shared/DynamicDataGrid/Contracts/TabularData/ColumnType.cs similarity index 100% rename from CSharpCodeAnalyst/Shared/DynamicDataGrid/Contracts/TabularData/ColumnType.cs rename to CSharpCodeAnalyst.AnalyzerSdk/Shared/DynamicDataGrid/Contracts/TabularData/ColumnType.cs diff --git a/CSharpCodeAnalyst/Shared/DynamicDataGrid/Contracts/TabularData/Table.cs b/CSharpCodeAnalyst.AnalyzerSdk/Shared/DynamicDataGrid/Contracts/TabularData/Table.cs similarity index 100% rename from CSharpCodeAnalyst/Shared/DynamicDataGrid/Contracts/TabularData/Table.cs rename to CSharpCodeAnalyst.AnalyzerSdk/Shared/DynamicDataGrid/Contracts/TabularData/Table.cs diff --git a/CSharpCodeAnalyst/Shared/DynamicDataGrid/Contracts/TabularData/TableColumnDefinition.cs b/CSharpCodeAnalyst.AnalyzerSdk/Shared/DynamicDataGrid/Contracts/TabularData/TableColumnDefinition.cs similarity index 100% rename from CSharpCodeAnalyst/Shared/DynamicDataGrid/Contracts/TabularData/TableColumnDefinition.cs rename to CSharpCodeAnalyst.AnalyzerSdk/Shared/DynamicDataGrid/Contracts/TabularData/TableColumnDefinition.cs diff --git a/CSharpCodeAnalyst/Shared/DynamicDataGrid/Contracts/TabularData/TableRow.cs b/CSharpCodeAnalyst.AnalyzerSdk/Shared/DynamicDataGrid/Contracts/TabularData/TableRow.cs similarity index 100% rename from CSharpCodeAnalyst/Shared/DynamicDataGrid/Contracts/TabularData/TableRow.cs rename to CSharpCodeAnalyst.AnalyzerSdk/Shared/DynamicDataGrid/Contracts/TabularData/TableRow.cs diff --git a/CSharpCodeAnalyst/Shared/Messages/AddNodeToGraphRequest.cs b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/AddNodeToGraphRequest.cs similarity index 100% rename from CSharpCodeAnalyst/Shared/Messages/AddNodeToGraphRequest.cs rename to CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/AddNodeToGraphRequest.cs diff --git a/CSharpCodeAnalyst/Shared/Messages/ShowPartitionsRequest.cs b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/ShowPartitionsRequest.cs similarity index 100% rename from CSharpCodeAnalyst/Shared/Messages/ShowPartitionsRequest.cs rename to CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/ShowPartitionsRequest.cs diff --git a/CSharpCodeAnalyst/Shared/Messages/ShowTabularDataRequest.cs b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/ShowTabularDataRequest.cs similarity index 100% rename from CSharpCodeAnalyst/Shared/Messages/ShowTabularDataRequest.cs rename to CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/ShowTabularDataRequest.cs diff --git a/CSharpCodeAnalyst/Shared/Notifications/IUserNotification.cs b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Notifications/IUserNotification.cs similarity index 100% rename from CSharpCodeAnalyst/Shared/Notifications/IUserNotification.cs rename to CSharpCodeAnalyst.AnalyzerSdk/Shared/Notifications/IUserNotification.cs diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Resources/SdkStrings.Designer.cs b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Resources/SdkStrings.Designer.cs new file mode 100644 index 00000000..f26a6f69 --- /dev/null +++ b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Resources/SdkStrings.Designer.cs @@ -0,0 +1,90 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace CSharpCodeAnalyst.Shared.Resources { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "18.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class SdkStrings { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal SdkStrings() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CSharpCodeAnalyst.Shared.Resources.SdkStrings", typeof(SdkStrings).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Error. + /// + public static string Error_Title { + get { + return ResourceManager.GetString("Error_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation failed: {0}. + /// + public static string OperationFailed_Message { + get { + return ResourceManager.GetString("OperationFailed_Message", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation completed successfully!. + /// + public static string Message_OperationCompleted_Successful { + get { + return ResourceManager.GetString("Message_OperationCompleted_Successful", resourceCulture); + } + } + } +} diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Resources/SdkStrings.resx b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Resources/SdkStrings.resx new file mode 100644 index 00000000..aa6e7524 --- /dev/null +++ b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Resources/SdkStrings.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Error + + + Operation failed: {0} + + + Operation completed successfully! + + diff --git a/CSharpCodeAnalyst/Shared/Search/PascalCaseSearch.cs b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Search/PascalCaseSearch.cs similarity index 100% rename from CSharpCodeAnalyst/Shared/Search/PascalCaseSearch.cs rename to CSharpCodeAnalyst.AnalyzerSdk/Shared/Search/PascalCaseSearch.cs diff --git a/CSharpCodeAnalyst/Shared/Search/SearchExpression.cs b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Search/SearchExpression.cs similarity index 99% rename from CSharpCodeAnalyst/Shared/Search/SearchExpression.cs rename to CSharpCodeAnalyst.AnalyzerSdk/Shared/Search/SearchExpression.cs index 3ee5fcf5..6e0d7ca6 100644 --- a/CSharpCodeAnalyst/Shared/Search/SearchExpression.cs +++ b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Search/SearchExpression.cs @@ -6,7 +6,7 @@ namespace CSharpCodeAnalyst.Shared.Search; /// /// Helper to build (very) simple search expressions with AND/OR/TERM /// -internal interface IExpression +public interface IExpression { bool Evaluate(CodeElement? item); } diff --git a/CSharpCodeAnalyst/Shared/Search/SearchExpressionFactory.cs b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Search/SearchExpressionFactory.cs similarity index 94% rename from CSharpCodeAnalyst/Shared/Search/SearchExpressionFactory.cs rename to CSharpCodeAnalyst.AnalyzerSdk/Shared/Search/SearchExpressionFactory.cs index b7301795..dafe88ef 100644 --- a/CSharpCodeAnalyst/Shared/Search/SearchExpressionFactory.cs +++ b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Search/SearchExpressionFactory.cs @@ -1,6 +1,6 @@ namespace CSharpCodeAnalyst.Shared.Search; -internal static class SearchExpressionFactory +public static class SearchExpressionFactory { private static Term CreateTerm(string search, TextSearchField searchField) { @@ -39,7 +39,7 @@ public static IExpression CreateSearchExpression(string searchText, TextSearchFi return root; } - internal enum TextSearchField + public enum TextSearchField { FullName, Name diff --git a/CSharpCodeAnalyst/Shared/Services/SourceLocationNavigator.cs b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Services/SourceLocationNavigator.cs similarity index 97% rename from CSharpCodeAnalyst/Shared/Services/SourceLocationNavigator.cs rename to CSharpCodeAnalyst.AnalyzerSdk/Shared/Services/SourceLocationNavigator.cs index d7800a16..f81a4cdc 100644 --- a/CSharpCodeAnalyst/Shared/Services/SourceLocationNavigator.cs +++ b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Services/SourceLocationNavigator.cs @@ -3,7 +3,7 @@ using System.Runtime.InteropServices; using System.Windows; using CodeGraph.Graph; -using CSharpCodeAnalyst.Resources; +using CSharpCodeAnalyst.Shared.Resources; namespace CSharpCodeAnalyst.Shared.Services; @@ -75,8 +75,8 @@ public static void Open(SourceLocation location) } catch (Exception ex) { - var message = string.Format(Strings.OperationFailed_Message, ex.Message); - MessageBox.Show(message, Strings.Error_Title, MessageBoxButton.OK, MessageBoxImage.Error); + var message = string.Format(SdkStrings.OperationFailed_Message, ex.Message); + MessageBox.Show(message, SdkStrings.Error_Title, MessageBoxButton.OK, MessageBoxImage.Error); } } diff --git a/CSharpCodeAnalyst/Shared/UI/ToastManager.cs b/CSharpCodeAnalyst.AnalyzerSdk/Shared/UI/ToastManager.cs similarity index 100% rename from CSharpCodeAnalyst/Shared/UI/ToastManager.cs rename to CSharpCodeAnalyst.AnalyzerSdk/Shared/UI/ToastManager.cs diff --git a/CSharpCodeAnalyst/Shared/UI/ToastNotification.xaml b/CSharpCodeAnalyst.AnalyzerSdk/Shared/UI/ToastNotification.xaml similarity index 88% rename from CSharpCodeAnalyst/Shared/UI/ToastNotification.xaml rename to CSharpCodeAnalyst.AnalyzerSdk/Shared/UI/ToastNotification.xaml index fcd6b4d0..d4076f38 100644 --- a/CSharpCodeAnalyst/Shared/UI/ToastNotification.xaml +++ b/CSharpCodeAnalyst.AnalyzerSdk/Shared/UI/ToastNotification.xaml @@ -1,7 +1,7 @@ diff --git a/CSharpCodeAnalyst/Shared/UI/ToastNotification.xaml.cs b/CSharpCodeAnalyst.AnalyzerSdk/Shared/UI/ToastNotification.xaml.cs similarity index 100% rename from CSharpCodeAnalyst/Shared/UI/ToastNotification.xaml.cs rename to CSharpCodeAnalyst.AnalyzerSdk/Shared/UI/ToastNotification.xaml.cs diff --git a/CSharpCodeAnalyst/Shared/Wpf/IconLoader.cs b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Wpf/IconLoader.cs similarity index 96% rename from CSharpCodeAnalyst/Shared/Wpf/IconLoader.cs rename to CSharpCodeAnalyst.AnalyzerSdk/Shared/Wpf/IconLoader.cs index 8522aae1..add8bf16 100644 --- a/CSharpCodeAnalyst/Shared/Wpf/IconLoader.cs +++ b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Wpf/IconLoader.cs @@ -3,7 +3,7 @@ namespace CSharpCodeAnalyst.Shared.Wpf; -internal static class IconLoader +public static class IconLoader { private static readonly Dictionary IconCache = new(); diff --git a/CSharpCodeAnalyst/Shared/Wpf/WpfCommand.cs b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Wpf/WpfCommand.cs similarity index 100% rename from CSharpCodeAnalyst/Shared/Wpf/WpfCommand.cs rename to CSharpCodeAnalyst.AnalyzerSdk/Shared/Wpf/WpfCommand.cs diff --git a/CSharpCodeAnalyst.Analyzers/CSharpCodeAnalyst.Analyzers.csproj b/CSharpCodeAnalyst.Analyzers/CSharpCodeAnalyst.Analyzers.csproj new file mode 100644 index 00000000..87004358 --- /dev/null +++ b/CSharpCodeAnalyst.Analyzers/CSharpCodeAnalyst.Analyzers.csproj @@ -0,0 +1,55 @@ + + + + net10.0-windows + enable + enable + true + + CSharpCodeAnalyst + + + + + + + + + + MSBuild:Compile + Wpf + Designer + + + MSBuild:Compile + Wpf + Designer + + + MSBuild:Compile + Wpf + Designer + + + + + + True + True + Strings.resx + + + + + + PublicResXFileCodeGenerator + Strings.Designer.cs + + + + + + + + diff --git a/CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/Analyzer.cs b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Analyzer.cs similarity index 99% rename from CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/Analyzer.cs rename to CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Analyzer.cs index 59e9c6a7..30d51afd 100644 --- a/CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/Analyzer.cs +++ b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Analyzer.cs @@ -5,7 +5,7 @@ using CodeGraph.Graph; using CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Presentation; using CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Rules; -using CSharpCodeAnalyst.Resources; +using CSharpCodeAnalyst.Features.Analyzers.Resources; using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.Messages; using CSharpCodeAnalyst.Shared.Notifications; diff --git a/CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/PatternMatcher.cs b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/PatternMatcher.cs similarity index 100% rename from CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/PatternMatcher.cs rename to CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/PatternMatcher.cs diff --git a/CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/PersistenceData.cs b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/PersistenceData.cs similarity index 100% rename from CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/PersistenceData.cs rename to CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/PersistenceData.cs diff --git a/CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/Presentation/ArchitecturalRulesDialog.xaml b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Presentation/ArchitecturalRulesDialog.xaml similarity index 97% rename from CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/Presentation/ArchitecturalRulesDialog.xaml rename to CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Presentation/ArchitecturalRulesDialog.xaml index e325fe7a..ce34ded1 100644 --- a/CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/Presentation/ArchitecturalRulesDialog.xaml +++ b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Presentation/ArchitecturalRulesDialog.xaml @@ -3,7 +3,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:resources="clr-namespace:CSharpCodeAnalyst.Resources" + xmlns:resources="clr-namespace:CSharpCodeAnalyst.Features.Analyzers.Resources" mc:Ignorable="d" Title="{x:Static resources:Strings.ArchitecturalRules_Title}" Height="600" Width="800" diff --git a/CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/Presentation/ArchitecturalRulesDialog.xaml.cs b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Presentation/ArchitecturalRulesDialog.xaml.cs similarity index 98% rename from CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/Presentation/ArchitecturalRulesDialog.xaml.cs rename to CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Presentation/ArchitecturalRulesDialog.xaml.cs index 2224e29d..18b78f01 100644 --- a/CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/Presentation/ArchitecturalRulesDialog.xaml.cs +++ b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Presentation/ArchitecturalRulesDialog.xaml.cs @@ -2,7 +2,7 @@ using System.IO; using System.Runtime.CompilerServices; using System.Windows; -using CSharpCodeAnalyst.Resources; +using CSharpCodeAnalyst.Features.Analyzers.Resources; using Microsoft.Win32; namespace CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Presentation; diff --git a/CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/Presentation/RelationshipViewModel.cs b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Presentation/RelationshipViewModel.cs similarity index 100% rename from CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/Presentation/RelationshipViewModel.cs rename to CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Presentation/RelationshipViewModel.cs diff --git a/CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/Presentation/RelationshipViewModelTemplate.xaml b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Presentation/RelationshipViewModelTemplate.xaml similarity index 100% rename from CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/Presentation/RelationshipViewModelTemplate.xaml rename to CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Presentation/RelationshipViewModelTemplate.xaml diff --git a/CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/Presentation/RuleViolationViewModel.cs b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Presentation/RuleViolationViewModel.cs similarity index 98% rename from CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/Presentation/RuleViolationViewModel.cs rename to CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Presentation/RuleViolationViewModel.cs index f1d76890..1ecf8164 100644 --- a/CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/Presentation/RuleViolationViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Presentation/RuleViolationViewModel.cs @@ -3,7 +3,7 @@ using System.Windows.Input; using System.Windows.Media; using CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Rules; -using CSharpCodeAnalyst.Resources; +using CSharpCodeAnalyst.Features.Analyzers.Resources; using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; using CSharpCodeAnalyst.Shared.Services; using CSharpCodeAnalyst.Shared.Wpf; diff --git a/CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/Presentation/RuleViolationsViewModel.cs b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Presentation/RuleViolationsViewModel.cs similarity index 97% rename from CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/Presentation/RuleViolationsViewModel.cs rename to CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Presentation/RuleViolationsViewModel.cs index 9d6fea64..c06a5d1a 100644 --- a/CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/Presentation/RuleViolationsViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Presentation/RuleViolationsViewModel.cs @@ -1,6 +1,6 @@ using System.Collections.ObjectModel; using System.Windows; -using CSharpCodeAnalyst.Resources; +using CSharpCodeAnalyst.Features.Analyzers.Resources; using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; namespace CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Presentation; diff --git a/CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/RuleParser.cs b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/RuleParser.cs similarity index 98% rename from CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/RuleParser.cs rename to CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/RuleParser.cs index d95d0cfe..1b2dbdef 100644 --- a/CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/RuleParser.cs +++ b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/RuleParser.cs @@ -1,6 +1,6 @@ using System.Text.RegularExpressions; using CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Rules; -using CSharpCodeAnalyst.Resources; +using CSharpCodeAnalyst.Features.Analyzers.Resources; namespace CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules; diff --git a/CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/Rules/DenyRule.cs b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Rules/DenyRule.cs similarity index 100% rename from CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/Rules/DenyRule.cs rename to CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Rules/DenyRule.cs diff --git a/CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/Rules/IsolateRule.cs b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Rules/IsolateRule.cs similarity index 100% rename from CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/Rules/IsolateRule.cs rename to CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Rules/IsolateRule.cs diff --git a/CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/Rules/RestrictRule.cs b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Rules/RestrictRule.cs similarity index 100% rename from CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/Rules/RestrictRule.cs rename to CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Rules/RestrictRule.cs diff --git a/CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/Rules/RestrictRuleGroup.cs b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Rules/RestrictRuleGroup.cs similarity index 100% rename from CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/Rules/RestrictRuleGroup.cs rename to CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Rules/RestrictRuleGroup.cs diff --git a/CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/Rules/RuleBase.cs b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Rules/RuleBase.cs similarity index 100% rename from CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/Rules/RuleBase.cs rename to CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Rules/RuleBase.cs diff --git a/CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/Violation.cs b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Violation.cs similarity index 100% rename from CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/Violation.cs rename to CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Violation.cs diff --git a/CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/ViolationFormatter.cs b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/ViolationFormatter.cs similarity index 96% rename from CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/ViolationFormatter.cs rename to CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/ViolationFormatter.cs index a9eaa387..183b3611 100644 --- a/CSharpCodeAnalyst/Features/Analyzers/ArchitecturalRules/ViolationFormatter.cs +++ b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/ViolationFormatter.cs @@ -1,5 +1,5 @@ using System.Text; -using CSharpCodeAnalyst.Resources; +using CSharpCodeAnalyst.Features.Analyzers.Resources; namespace CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules; diff --git a/CSharpCodeAnalyst/Features/Analyzers/EventRegistration/Analyzer.cs b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/EventRegistration/Analyzer.cs similarity index 97% rename from CSharpCodeAnalyst/Features/Analyzers/EventRegistration/Analyzer.cs rename to CSharpCodeAnalyst.Analyzers/Features/Analyzers/EventRegistration/Analyzer.cs index e895a77b..fed02e19 100644 --- a/CSharpCodeAnalyst/Features/Analyzers/EventRegistration/Analyzer.cs +++ b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/EventRegistration/Analyzer.cs @@ -1,6 +1,6 @@ using CodeGraph.Graph; using CSharpCodeAnalyst.Features.Analyzers.EventRegistration.Presentation; -using CSharpCodeAnalyst.Resources; +using CSharpCodeAnalyst.Features.Analyzers.Resources; using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.Messages; using CSharpCodeAnalyst.Shared.UI; diff --git a/CSharpCodeAnalyst/Features/Analyzers/EventRegistration/Presentation/EventImbalanceViewModel.cs b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/EventRegistration/Presentation/EventImbalanceViewModel.cs similarity index 96% rename from CSharpCodeAnalyst/Features/Analyzers/EventRegistration/Presentation/EventImbalanceViewModel.cs rename to CSharpCodeAnalyst.Analyzers/Features/Analyzers/EventRegistration/Presentation/EventImbalanceViewModel.cs index 85c6bce6..60e1c249 100644 --- a/CSharpCodeAnalyst/Features/Analyzers/EventRegistration/Presentation/EventImbalanceViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/EventRegistration/Presentation/EventImbalanceViewModel.cs @@ -2,7 +2,7 @@ using System.Windows; using System.Windows.Input; using CodeGraph.Graph; -using CSharpCodeAnalyst.Resources; +using CSharpCodeAnalyst.Features.Analyzers.Resources; using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; using CSharpCodeAnalyst.Shared.Services; using CSharpCodeAnalyst.Shared.Wpf; diff --git a/CSharpCodeAnalyst/Features/Analyzers/EventRegistration/Presentation/EventImbalancesViewModel.cs b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/EventRegistration/Presentation/EventImbalancesViewModel.cs similarity index 96% rename from CSharpCodeAnalyst/Features/Analyzers/EventRegistration/Presentation/EventImbalancesViewModel.cs rename to CSharpCodeAnalyst.Analyzers/Features/Analyzers/EventRegistration/Presentation/EventImbalancesViewModel.cs index f643cbe7..df2eefeb 100644 --- a/CSharpCodeAnalyst/Features/Analyzers/EventRegistration/Presentation/EventImbalancesViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/EventRegistration/Presentation/EventImbalancesViewModel.cs @@ -1,6 +1,6 @@ using System.Collections.ObjectModel; using System.Windows; -using CSharpCodeAnalyst.Resources; +using CSharpCodeAnalyst.Features.Analyzers.Resources; using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; namespace CSharpCodeAnalyst.Features.Analyzers.EventRegistration.Presentation; diff --git a/CSharpCodeAnalyst/Features/Analyzers/EventRegistration/Presentation/SourceLocationTemplate.xaml b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/EventRegistration/Presentation/SourceLocationTemplate.xaml similarity index 100% rename from CSharpCodeAnalyst/Features/Analyzers/EventRegistration/Presentation/SourceLocationTemplate.xaml rename to CSharpCodeAnalyst.Analyzers/Features/Analyzers/EventRegistration/Presentation/SourceLocationTemplate.xaml diff --git a/CSharpCodeAnalyst/Features/Analyzers/EventRegistration/Result.cs b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/EventRegistration/Result.cs similarity index 100% rename from CSharpCodeAnalyst/Features/Analyzers/EventRegistration/Result.cs rename to CSharpCodeAnalyst.Analyzers/Features/Analyzers/EventRegistration/Result.cs diff --git a/CSharpCodeAnalyst/Features/Analyzers/MethodComplexity/Analyzer.cs b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/MethodComplexity/Analyzer.cs similarity index 97% rename from CSharpCodeAnalyst/Features/Analyzers/MethodComplexity/Analyzer.cs rename to CSharpCodeAnalyst.Analyzers/Features/Analyzers/MethodComplexity/Analyzer.cs index 404cc411..345b9465 100644 --- a/CSharpCodeAnalyst/Features/Analyzers/MethodComplexity/Analyzer.cs +++ b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/MethodComplexity/Analyzer.cs @@ -1,6 +1,6 @@ using CodeGraph.Metrics; using CSharpCodeAnalyst.Features.Analyzers.MethodComplexity.Presentation; -using CSharpCodeAnalyst.Resources; +using CSharpCodeAnalyst.Features.Analyzers.Resources; using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.Messages; using CSharpCodeAnalyst.Shared.UI; diff --git a/CSharpCodeAnalyst/Features/Analyzers/MethodComplexity/Presentation/MethodComplexityRowViewModel.cs b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/MethodComplexity/Presentation/MethodComplexityRowViewModel.cs similarity index 100% rename from CSharpCodeAnalyst/Features/Analyzers/MethodComplexity/Presentation/MethodComplexityRowViewModel.cs rename to CSharpCodeAnalyst.Analyzers/Features/Analyzers/MethodComplexity/Presentation/MethodComplexityRowViewModel.cs diff --git a/CSharpCodeAnalyst/Features/Analyzers/MethodComplexity/Presentation/MethodComplexityViewModel.cs b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/MethodComplexity/Presentation/MethodComplexityViewModel.cs similarity index 98% rename from CSharpCodeAnalyst/Features/Analyzers/MethodComplexity/Presentation/MethodComplexityViewModel.cs rename to CSharpCodeAnalyst.Analyzers/Features/Analyzers/MethodComplexity/Presentation/MethodComplexityViewModel.cs index 05b3e304..21abd63b 100644 --- a/CSharpCodeAnalyst/Features/Analyzers/MethodComplexity/Presentation/MethodComplexityViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/MethodComplexity/Presentation/MethodComplexityViewModel.cs @@ -1,6 +1,6 @@ using System.Collections.ObjectModel; using System.Windows; -using CSharpCodeAnalyst.Resources; +using CSharpCodeAnalyst.Features.Analyzers.Resources; using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; using CSharpCodeAnalyst.Shared.Messages; diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/Resources/Strings.Designer.cs b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/Resources/Strings.Designer.cs new file mode 100644 index 00000000..1fb148da --- /dev/null +++ b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/Resources/Strings.Designer.cs @@ -0,0 +1,639 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace CSharpCodeAnalyst.Features.Analyzers.Resources { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "18.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class Strings { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Strings() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CSharpCodeAnalyst.Features.Analyzers.Resources.Strings", typeof(Strings).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Error. + /// + public static string Error_Title { + get { + return ResourceManager.GetString("Error_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation failed: {0}. + /// + public static string OperationFailed_Message { + get { + return ResourceManager.GetString("OperationFailed_Message", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to _Close. + /// + public static string Close_Button { + get { + return ResourceManager.GetString("Close_Button", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Show in Code Explorer. + /// + public static string CopyToExplorerGraph_MenuItem { + get { + return ResourceManager.GetString("CopyToExplorerGraph_MenuItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Jump to code. + /// + public static string JumpToCode { + get { + return ResourceManager.GetString("JumpToCode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Architectural rules. + /// + public static string Analyzer_ArchitecturalRules_Label { + get { + return ResourceManager.GetString("Analyzer_ArchitecturalRules_Label", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Validates your architectural constraints based on user-defined rules. + /// + public static string Analyzer_ArchitecturalRules_Tooltip { + get { + return ResourceManager.GetString("Analyzer_ArchitecturalRules_Tooltip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No rule violations found!. + /// + public static string Analyzer_ArchitecturalRules_NoData { + get { + return ResourceManager.GetString("Analyzer_ArchitecturalRules_NoData", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error parsing rules: {0}. + /// + public static string Analyzer_ArchitecturalRules_ParseError { + get { + return ResourceManager.GetString("Analyzer_ArchitecturalRules_ParseError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Event registrations. + /// + public static string Analyzer_EventRegistration_Label { + get { + return ResourceManager.GetString("Analyzer_EventRegistration_Label", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Finds imbalances between number of event registrations / un-registrations. + /// + public static string Analyzer_EventRegistration_Tooltip { + get { + return ResourceManager.GetString("Analyzer_EventRegistration_Tooltip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No event handler registration / un-registration imbalances found. + /// + public static string Analyzer_EventRegistration_NoData { + get { + return ResourceManager.GetString("Analyzer_EventRegistration_NoData", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Type Dependencies. + /// + public static string Analyzer_TypeDependencies_Label { + get { + return ResourceManager.GetString("Analyzer_TypeDependencies_Label", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Ranks types by their role in the dependency structure (fan-in, fan-out, importance). Helps you find the types to understand first.. + /// + public static string Analyzer_TypeDependencies_Tooltip { + get { + return ResourceManager.GetString("Analyzer_TypeDependencies_Tooltip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No types found to rank. + /// + public static string Analyzer_TypeDependencies_NoData { + get { + return ResourceManager.GetString("Analyzer_TypeDependencies_NoData", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Type Cohesion. + /// + public static string Analyzer_TypeCohesion_Label { + get { + return ResourceManager.GetString("Analyzer_TypeCohesion_Label", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Finds classes whose members split into independent groups (partitions) — candidates for splitting. Double-click a row to view its partitions.. + /// + public static string Analyzer_TypeCohesion_Tooltip { + get { + return ResourceManager.GetString("Analyzer_TypeCohesion_Tooltip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No classes with separable partitions found. + /// + public static string Analyzer_TypeCohesion_NoData { + get { + return ResourceManager.GetString("Analyzer_TypeCohesion_NoData", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Method Complexity. + /// + public static string Analyzer_MethodComplexity_Label { + get { + return ResourceManager.GetString("Analyzer_MethodComplexity_Label", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Lines of code and cyclomatic complexity per method. Requires 'Collect source metrics on import' to be enabled before importing.. + /// + public static string Analyzer_MethodComplexity_Tooltip { + get { + return ResourceManager.GetString("Analyzer_MethodComplexity_Tooltip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No source metrics available. Enable 'Collect source metrics on import' in the settings and re-import the solution.. + /// + public static string Analyzer_MethodComplexity_NoData { + get { + return ResourceManager.GetString("Analyzer_MethodComplexity_NoData", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Rule text cannot be empty. + /// + public static string Analyzer_Empty_Rule { + get { + return ResourceManager.GetString("Analyzer_Empty_Rule", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Rule Type. + /// + public static string Column_ArchitecturalRules_RuleType { + get { + return ResourceManager.GetString("Column_ArchitecturalRules_RuleType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Source. + /// + public static string Column_ArchitecturalRules_Source { + get { + return ResourceManager.GetString("Column_ArchitecturalRules_Source", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Target. + /// + public static string Column_ArchitecturalRules_Target { + get { + return ResourceManager.GetString("Column_ArchitecturalRules_Target", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Violations. + /// + public static string Column_ArchitecturalRules_Violations { + get { + return ResourceManager.GetString("Column_ArchitecturalRules_Violations", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Class. + /// + public static string Column_TypeCohesion_Class { + get { + return ResourceManager.GetString("Column_TypeCohesion_Class", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Partitions. + /// + public static string Column_TypeCohesion_Partitions { + get { + return ResourceManager.GetString("Column_TypeCohesion_Partitions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Members. + /// + public static string Column_TypeCohesion_Members { + get { + return ResourceManager.GetString("Column_TypeCohesion_Members", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Largest %. + /// + public static string Column_TypeCohesion_LargestPartition { + get { + return ResourceManager.GetString("Column_TypeCohesion_LargestPartition", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Method. + /// + public static string Column_MethodComplexity_Method { + get { + return ResourceManager.GetString("Column_MethodComplexity_Method", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Code. + /// + public static string Column_MethodComplexity_Code { + get { + return ResourceManager.GetString("Column_MethodComplexity_Code", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Statements. + /// + public static string Column_MethodComplexity_Statements { + get { + return ResourceManager.GetString("Column_MethodComplexity_Statements", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Comments. + /// + public static string Column_MethodComplexity_Comments { + get { + return ResourceManager.GetString("Column_MethodComplexity_Comments", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Comment %. + /// + public static string Column_MethodComplexity_CommentRatio { + get { + return ResourceManager.GetString("Column_MethodComplexity_CommentRatio", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Complexity. + /// + public static string Column_MethodComplexity_Complexity { + get { + return ResourceManager.GetString("Column_MethodComplexity_Complexity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to #. + /// + public static string Column_TypeDependencies_Rank { + get { + return ResourceManager.GetString("Column_TypeDependencies_Rank", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Type. + /// + public static string Column_TypeDependencies_Element { + get { + return ResourceManager.GetString("Column_TypeDependencies_Element", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Fan-in. + /// + public static string Column_TypeDependencies_FanIn { + get { + return ResourceManager.GetString("Column_TypeDependencies_FanIn", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Fan-out. + /// + public static string Column_TypeDependencies_FanOut { + get { + return ResourceManager.GetString("Column_TypeDependencies_FanOut", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Blast radius. + /// + public static string Column_TypeDependencies_BlastRadius { + get { + return ResourceManager.GetString("Column_TypeDependencies_BlastRadius", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Score. + /// + public static string Column_TypeDependencies_Score { + get { + return ResourceManager.GetString("Column_TypeDependencies_Score", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Event handler (possible errors). + /// + public static string Column_EventRegistration_Header { + get { + return ResourceManager.GetString("Column_EventRegistration_Header", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Show partitions. + /// + public static string ShowPartitions { + get { + return ResourceManager.GetString("ShowPartitions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Success. + /// + public static string Success_Title { + get { + return ResourceManager.GetString("Success_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Save/_Validate. + /// + public static string Validate { + get { + return ResourceManager.GetString("Validate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No rule violations found.. + /// + public static string Cmd_NoRuleViolations { + get { + return ResourceManager.GetString("Cmd_NoRuleViolations", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Violations. + /// + public static string Cmd_ViolationsHeader { + get { + return ResourceManager.GetString("Cmd_ViolationsHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to - Rule Type: {0}. + /// + public static string Cmd_RuleTypeLine { + get { + return ResourceManager.GetString("Cmd_RuleTypeLine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to (!) Invalid relationship with missing elements.. + /// + public static string Cmd_InvalidRelationship { + get { + return ResourceManager.GetString("Cmd_InvalidRelationship", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Architectural rules configuration. + /// + public static string ArchitecturalRules_Title { + get { + return ResourceManager.GetString("ArchitecturalRules_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Define the architectural rules for your solution:. + /// + public static string Rules_Header { + get { + return ResourceManager.GetString("Rules_Header", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Rules definition. + /// + public static string Rules_RuleDefinition { + get { + return ResourceManager.GetString("Rules_RuleDefinition", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to _Load from file.... + /// + public static string Rules_LoadFromFile { + get { + return ResourceManager.GetString("Rules_LoadFromFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to _Save to file.... + /// + public static string Rules_SaveToFile { + get { + return ResourceManager.GetString("Rules_SaveToFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to _Clear. + /// + public static string Rules_Clear { + get { + return ResourceManager.GetString("Rules_Clear", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Three rules are supported: DENY, RESTRICT, ISOLATE, with pattern and example info. + /// + public static string ArchitectureRules_Info { + get { + return ResourceManager.GetString("ArchitectureRules_Info", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Load rules. + /// + public static string ArchitecturalRules_LoadDialog_Title { + get { + return ResourceManager.GetString("ArchitecturalRules_LoadDialog_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Save rules. + /// + public static string ArchitecturalRules_SaveDialog_Title { + get { + return ResourceManager.GetString("ArchitecturalRules_SaveDialog_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error loading file: {0}. + /// + public static string ArchitecturalRules_LoadFileError_Message { + get { + return ResourceManager.GetString("ArchitecturalRules_LoadFileError_Message", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error saving file: {0}. + /// + public static string ArchitecturalRules_SaveFileError_Message { + get { + return ResourceManager.GetString("ArchitecturalRules_SaveFileError_Message", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Rules saved successfully!. + /// + public static string ArchitecturalRules_SaveFileSuccess_Message { + get { + return ResourceManager.GetString("ArchitecturalRules_SaveFileSuccess_Message", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to clear all rules?. + /// + public static string ArchitecturalRules_ClearConfirm_Message { + get { + return ResourceManager.GetString("ArchitecturalRules_ClearConfirm_Message", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Confirm Clear. + /// + public static string ArchitecturalRules_ClearConfirm_Title { + get { + return ResourceManager.GetString("ArchitecturalRules_ClearConfirm_Title", resourceCulture); + } + } + } +} diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/Resources/Strings.resx b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/Resources/Strings.resx new file mode 100644 index 00000000..b2608a19 --- /dev/null +++ b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/Resources/Strings.resx @@ -0,0 +1,334 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + Error + + + Operation failed: {0} + + + _Close + + + Show in Code Explorer + + + Jump to code + + + + Architectural rules + + + Validates your architectural constraints based on user-defined rules + + + No rule violations found! + + + Error parsing rules: {0} + + + Event registrations + + + Finds imbalances between number of event registrations / un-registrations + + + No event handler registration / un-registration imbalances found + + + Type Dependencies + + + Ranks types by their role in the dependency structure (fan-in, fan-out, importance). Helps you find the types to understand first. + + + No types found to rank + + + Type Cohesion + + + Finds classes whose members split into independent groups (partitions) — candidates for splitting. Double-click a row to view its partitions. + + + No classes with separable partitions found + + + Method Complexity + + + Lines of code and cyclomatic complexity per method. Requires 'Collect source metrics on import' to be enabled before importing. + + + No source metrics available. Enable 'Collect source metrics on import' in the settings and re-import the solution. + + + Rule text cannot be empty + + + + Rule Type + + + Source + + + Target + + + Violations + + + Class + + + Partitions + + + Members + + + Largest % + + + Method + + + Code + + + Statements + + + Comments + + + Comment % + + + Complexity + + + # + + + Type + + + Fan-in + + + Fan-out + + + Blast radius + + + Score + + + Event handler (possible errors) + + + + Show partitions + + + Success + + + Save/_Validate + + + + No rule violations found. + + + Violations + + + - Rule Type: {0} + + + (!) Invalid relationship with missing elements. + + + + Architectural rules configuration + + + Define the architectural rules for your solution: + + + Rules definition + + + _Load from file... + + + _Save to file... + + + _Clear + + + Three rules are supported: + +DENY: Forbids dependencies from source to target +RESTRICT: Allows only specified dependencies +ISOLATE: Completely isolates the source from external dependencies + +Patterns: +MyApp.Business → exact match +MyApp.Business.* → element + direct children +MyApp.Business.** → element + all descendants + +Examples: +DENY: MyApp.Business.** -> MyApp.Data.** +RESTRICT: MyApp.Controllers.** -> MyApp.Services.** +ISOLATE: MyApp.Domain.** + + + Load rules + + + Save rules + + + Error loading file: {0} + + + Error saving file: {0} + + + Rules saved successfully! + + + Are you sure you want to clear all rules? + + + Confirm Clear + + diff --git a/CSharpCodeAnalyst/Features/Analyzers/TypeCohesion/Analyzer.cs b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeCohesion/Analyzer.cs similarity index 96% rename from CSharpCodeAnalyst/Features/Analyzers/TypeCohesion/Analyzer.cs rename to CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeCohesion/Analyzer.cs index 701471cc..0b404f21 100644 --- a/CSharpCodeAnalyst/Features/Analyzers/TypeCohesion/Analyzer.cs +++ b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeCohesion/Analyzer.cs @@ -1,6 +1,6 @@ using CodeGraph.Algorithms.Partitioning; using CSharpCodeAnalyst.Features.Analyzers.TypeCohesion.Presentation; -using CSharpCodeAnalyst.Resources; +using CSharpCodeAnalyst.Features.Analyzers.Resources; using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.Messages; using CSharpCodeAnalyst.Shared.UI; diff --git a/CSharpCodeAnalyst/Features/Analyzers/TypeCohesion/Presentation/TypeCohesionRowViewModel.cs b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeCohesion/Presentation/TypeCohesionRowViewModel.cs similarity index 100% rename from CSharpCodeAnalyst/Features/Analyzers/TypeCohesion/Presentation/TypeCohesionRowViewModel.cs rename to CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeCohesion/Presentation/TypeCohesionRowViewModel.cs diff --git a/CSharpCodeAnalyst/Features/Analyzers/TypeCohesion/Presentation/TypeCohesionViewModel.cs b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeCohesion/Presentation/TypeCohesionViewModel.cs similarity index 98% rename from CSharpCodeAnalyst/Features/Analyzers/TypeCohesion/Presentation/TypeCohesionViewModel.cs rename to CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeCohesion/Presentation/TypeCohesionViewModel.cs index e351fc9e..58df3db5 100644 --- a/CSharpCodeAnalyst/Features/Analyzers/TypeCohesion/Presentation/TypeCohesionViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeCohesion/Presentation/TypeCohesionViewModel.cs @@ -1,7 +1,7 @@ using System.Collections.ObjectModel; using System.Windows; using CodeGraph.Algorithms.Partitioning; -using CSharpCodeAnalyst.Resources; +using CSharpCodeAnalyst.Features.Analyzers.Resources; using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; using CSharpCodeAnalyst.Shared.Messages; diff --git a/CSharpCodeAnalyst/Features/Analyzers/TypeDependencies/Analyzer.cs b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeDependencies/Analyzer.cs similarity index 97% rename from CSharpCodeAnalyst/Features/Analyzers/TypeDependencies/Analyzer.cs rename to CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeDependencies/Analyzer.cs index bf924fa1..8a83f144 100644 --- a/CSharpCodeAnalyst/Features/Analyzers/TypeDependencies/Analyzer.cs +++ b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeDependencies/Analyzer.cs @@ -1,6 +1,6 @@ using CodeGraph.Algorithms.Metrics; using CSharpCodeAnalyst.Features.Analyzers.TypeDependencies.Presentation; -using CSharpCodeAnalyst.Resources; +using CSharpCodeAnalyst.Features.Analyzers.Resources; using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.Messages; using CSharpCodeAnalyst.Shared.UI; diff --git a/CSharpCodeAnalyst/Features/Analyzers/TypeDependencies/Presentation/TypeDependenciesViewModel.cs b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeDependencies/Presentation/TypeDependenciesViewModel.cs similarity index 98% rename from CSharpCodeAnalyst/Features/Analyzers/TypeDependencies/Presentation/TypeDependenciesViewModel.cs rename to CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeDependencies/Presentation/TypeDependenciesViewModel.cs index 9000e89d..0c717e91 100644 --- a/CSharpCodeAnalyst/Features/Analyzers/TypeDependencies/Presentation/TypeDependenciesViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeDependencies/Presentation/TypeDependenciesViewModel.cs @@ -1,7 +1,7 @@ using System.Collections.ObjectModel; using System.Windows; using CodeGraph.Algorithms.Metrics; -using CSharpCodeAnalyst.Resources; +using CSharpCodeAnalyst.Features.Analyzers.Resources; using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; using CSharpCodeAnalyst.Shared.Messages; diff --git a/CSharpCodeAnalyst/Features/Analyzers/TypeDependencies/Presentation/TypeDependencyViewModel.cs b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeDependencies/Presentation/TypeDependencyViewModel.cs similarity index 100% rename from CSharpCodeAnalyst/Features/Analyzers/TypeDependencies/Presentation/TypeDependencyViewModel.cs rename to CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeDependencies/Presentation/TypeDependencyViewModel.cs diff --git a/CSharpCodeAnalyst.sln b/CSharpCodeAnalyst.sln index 757ac4da..5138e6be 100644 --- a/CSharpCodeAnalyst.sln +++ b/CSharpCodeAnalyst.sln @@ -28,6 +28,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CodeGraph", "CodeGraph\Code EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApprovalTestTool", "ApprovalTestTool\ApprovalTestTool.csproj", "{767539BE-FBE3-4B46-9A5E-21D60E1B278B}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpCodeAnalyst.AnalyzerSdk", "CSharpCodeAnalyst.AnalyzerSdk\CSharpCodeAnalyst.AnalyzerSdk.csproj", "{98DF020B-7487-4E52-8BF9-DEC19BB83668}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpCodeAnalyst.Analyzers", "CSharpCodeAnalyst.Analyzers\CSharpCodeAnalyst.Analyzers.csproj", "{6D1C8D81-45A7-476E-9C06-6920B2739862}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -98,18 +102,30 @@ Global {767539BE-FBE3-4B46-9A5E-21D60E1B278B}.Release|x64.Build.0 = Release|Any CPU {767539BE-FBE3-4B46-9A5E-21D60E1B278B}.Release|x86.ActiveCfg = Release|Any CPU {767539BE-FBE3-4B46-9A5E-21D60E1B278B}.Release|x86.Build.0 = Release|Any CPU - {391D7263-AFC7-4FC7-BED1-105930871AC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {391D7263-AFC7-4FC7-BED1-105930871AC9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {391D7263-AFC7-4FC7-BED1-105930871AC9}.Debug|x64.ActiveCfg = Debug|Any CPU - {391D7263-AFC7-4FC7-BED1-105930871AC9}.Debug|x64.Build.0 = Debug|Any CPU - {391D7263-AFC7-4FC7-BED1-105930871AC9}.Debug|x86.ActiveCfg = Debug|Any CPU - {391D7263-AFC7-4FC7-BED1-105930871AC9}.Debug|x86.Build.0 = Debug|Any CPU - {391D7263-AFC7-4FC7-BED1-105930871AC9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {391D7263-AFC7-4FC7-BED1-105930871AC9}.Release|Any CPU.Build.0 = Release|Any CPU - {391D7263-AFC7-4FC7-BED1-105930871AC9}.Release|x64.ActiveCfg = Release|Any CPU - {391D7263-AFC7-4FC7-BED1-105930871AC9}.Release|x64.Build.0 = Release|Any CPU - {391D7263-AFC7-4FC7-BED1-105930871AC9}.Release|x86.ActiveCfg = Release|Any CPU - {391D7263-AFC7-4FC7-BED1-105930871AC9}.Release|x86.Build.0 = Release|Any CPU + {98DF020B-7487-4E52-8BF9-DEC19BB83668}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {98DF020B-7487-4E52-8BF9-DEC19BB83668}.Debug|Any CPU.Build.0 = Debug|Any CPU + {98DF020B-7487-4E52-8BF9-DEC19BB83668}.Debug|x64.ActiveCfg = Debug|Any CPU + {98DF020B-7487-4E52-8BF9-DEC19BB83668}.Debug|x64.Build.0 = Debug|Any CPU + {98DF020B-7487-4E52-8BF9-DEC19BB83668}.Debug|x86.ActiveCfg = Debug|Any CPU + {98DF020B-7487-4E52-8BF9-DEC19BB83668}.Debug|x86.Build.0 = Debug|Any CPU + {98DF020B-7487-4E52-8BF9-DEC19BB83668}.Release|Any CPU.ActiveCfg = Release|Any CPU + {98DF020B-7487-4E52-8BF9-DEC19BB83668}.Release|Any CPU.Build.0 = Release|Any CPU + {98DF020B-7487-4E52-8BF9-DEC19BB83668}.Release|x64.ActiveCfg = Release|Any CPU + {98DF020B-7487-4E52-8BF9-DEC19BB83668}.Release|x64.Build.0 = Release|Any CPU + {98DF020B-7487-4E52-8BF9-DEC19BB83668}.Release|x86.ActiveCfg = Release|Any CPU + {98DF020B-7487-4E52-8BF9-DEC19BB83668}.Release|x86.Build.0 = Release|Any CPU + {6D1C8D81-45A7-476E-9C06-6920B2739862}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6D1C8D81-45A7-476E-9C06-6920B2739862}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6D1C8D81-45A7-476E-9C06-6920B2739862}.Debug|x64.ActiveCfg = Debug|Any CPU + {6D1C8D81-45A7-476E-9C06-6920B2739862}.Debug|x64.Build.0 = Debug|Any CPU + {6D1C8D81-45A7-476E-9C06-6920B2739862}.Debug|x86.ActiveCfg = Debug|Any CPU + {6D1C8D81-45A7-476E-9C06-6920B2739862}.Debug|x86.Build.0 = Debug|Any CPU + {6D1C8D81-45A7-476E-9C06-6920B2739862}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6D1C8D81-45A7-476E-9C06-6920B2739862}.Release|Any CPU.Build.0 = Release|Any CPU + {6D1C8D81-45A7-476E-9C06-6920B2739862}.Release|x64.ActiveCfg = Release|Any CPU + {6D1C8D81-45A7-476E-9C06-6920B2739862}.Release|x64.Build.0 = Release|Any CPU + {6D1C8D81-45A7-476E-9C06-6920B2739862}.Release|x86.ActiveCfg = Release|Any CPU + {6D1C8D81-45A7-476E-9C06-6920B2739862}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/CSharpCodeAnalyst/CSharpCodeAnalyst.csproj b/CSharpCodeAnalyst/CSharpCodeAnalyst.csproj index d6b53c4c..0c11d56d 100644 --- a/CSharpCodeAnalyst/CSharpCodeAnalyst.csproj +++ b/CSharpCodeAnalyst/CSharpCodeAnalyst.csproj @@ -19,21 +19,6 @@ - - MSBuild:Compile - Wpf - Designer - - - MSBuild:Compile - Wpf - Designer - - - MSBuild:Compile - Wpf - Designer - MSBuild:Compile @@ -159,6 +144,8 @@ + + diff --git a/CSharpCodeAnalyst/Resources/Strings.Designer.cs b/CSharpCodeAnalyst/Resources/Strings.Designer.cs index 5d645868..da707f45 100644 --- a/CSharpCodeAnalyst/Resources/Strings.Designer.cs +++ b/CSharpCodeAnalyst/Resources/Strings.Designer.cs @@ -251,231 +251,6 @@ public static string AllOutgoingRelationshipsDeep { } } - /// - /// Looks up a localized string similar to Rule text cannot be empty. - /// - public static string Analyzer_Empty_Rule { - get { - return ResourceManager.GetString("Analyzer_Empty_Rule", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Architectural rules. - /// - public static string Analyzer_ArchitecturalRules_Label { - get { - return ResourceManager.GetString("Analyzer_ArchitecturalRules_Label", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Validates your architectural constraints based on user-defined rules. - /// - public static string Analyzer_ArchitecturalRules_Tooltip { - get { - return ResourceManager.GetString("Analyzer_ArchitecturalRules_Tooltip", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to No rule violations found!. - /// - public static string Analyzer_ArchitecturalRules_NoData { - get { - return ResourceManager.GetString("Analyzer_ArchitecturalRules_NoData", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Error parsing rules: {0}. - /// - public static string Analyzer_ArchitecturalRules_ParseError { - get { - return ResourceManager.GetString("Analyzer_ArchitecturalRules_ParseError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Load rules. - /// - public static string ArchitecturalRules_LoadDialog_Title { - get { - return ResourceManager.GetString("ArchitecturalRules_LoadDialog_Title", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Save rules. - /// - public static string ArchitecturalRules_SaveDialog_Title { - get { - return ResourceManager.GetString("ArchitecturalRules_SaveDialog_Title", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Error loading file: {0}. - /// - public static string ArchitecturalRules_LoadFileError_Message { - get { - return ResourceManager.GetString("ArchitecturalRules_LoadFileError_Message", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Error saving file: {0}. - /// - public static string ArchitecturalRules_SaveFileError_Message { - get { - return ResourceManager.GetString("ArchitecturalRules_SaveFileError_Message", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Rules saved successfully!. - /// - public static string ArchitecturalRules_SaveFileSuccess_Message { - get { - return ResourceManager.GetString("ArchitecturalRules_SaveFileSuccess_Message", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Are you sure you want to clear all rules?. - /// - public static string ArchitecturalRules_ClearConfirm_Message { - get { - return ResourceManager.GetString("ArchitecturalRules_ClearConfirm_Message", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Confirm Clear. - /// - public static string ArchitecturalRules_ClearConfirm_Title { - get { - return ResourceManager.GetString("ArchitecturalRules_ClearConfirm_Title", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Rule Type. - /// - public static string Column_ArchitecturalRules_RuleType { - get { - return ResourceManager.GetString("Column_ArchitecturalRules_RuleType", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Source. - /// - public static string Column_ArchitecturalRules_Source { - get { - return ResourceManager.GetString("Column_ArchitecturalRules_Source", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Target. - /// - public static string Column_ArchitecturalRules_Target { - get { - return ResourceManager.GetString("Column_ArchitecturalRules_Target", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Violations. - /// - public static string Column_ArchitecturalRules_Violations { - get { - return ResourceManager.GetString("Column_ArchitecturalRules_Violations", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Event registrations. - /// - public static string Analyzer_EventRegistration_Label { - get { - return ResourceManager.GetString("Analyzer_EventRegistration_Label", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Finds imbalances between number of event registrations / un-registrations. - /// - public static string Analyzer_EventRegistration_Tooltip { - get { - return ResourceManager.GetString("Analyzer_EventRegistration_Tooltip", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to No event handler registration / un-registration imbalances found. - /// - public static string Analyzer_EventRegistration_NoData { - get { - return ResourceManager.GetString("Analyzer_EventRegistration_NoData", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Type Cohesion. - /// - public static string Analyzer_TypeCohesion_Label { - get { - return ResourceManager.GetString("Analyzer_TypeCohesion_Label", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to No classes with separable partitions found. - /// - public static string Analyzer_TypeCohesion_NoData { - get { - return ResourceManager.GetString("Analyzer_TypeCohesion_NoData", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Finds classes whose members split into independent groups (partitions) — candidates for splitting. Double-click a row to view its partitions.. - /// - public static string Analyzer_TypeCohesion_Tooltip { - get { - return ResourceManager.GetString("Analyzer_TypeCohesion_Tooltip", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Type Dependencies. - /// - public static string Analyzer_TypeDependencies_Label { - get { - return ResourceManager.GetString("Analyzer_TypeDependencies_Label", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to No types found to rank. - /// - public static string Analyzer_TypeDependencies_NoData { - get { - return ResourceManager.GetString("Analyzer_TypeDependencies_NoData", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Ranks types by their role in the dependency structure (fan-in, fan-out, importance). Helps you find the types to understand first.. - /// - public static string Analyzer_TypeDependencies_Tooltip { - get { - return ResourceManager.GetString("Analyzer_TypeDependencies_Tooltip", resourceCulture); - } - } - /// /// Looks up a localized string similar to Analyzers. /// @@ -503,38 +278,6 @@ public static string AppTitle { } } - /// - /// Looks up a localized string similar to Architectural rules configuration. - /// - public static string ArchitecturalRules_Title { - get { - return ResourceManager.GetString("ArchitecturalRules_Title", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Three rules are supported: - /// - ///DENY: Forbids dependencies from source to target - ///RESTRICT: Allows only specified dependencies - ///ISOLATE: Completely isolates the source from external dependencies - /// - ///Patterns: - ///MyApp.Business → exact match - ///MyApp.Business.* → element + direct children - ///MyApp.Business.** → element + all descendants - /// - ///Examples: - ///DENY: MyApp.Business.** -> MyApp.Data.** - ///RESTRICT: MyApp.Controllers.** -> MyApp.Services.** - ///ISOLATE: MyApp.Domain.**. - /// - public static string ArchitectureRules_Info { - get { - return ResourceManager.GetString("ArchitectureRules_Info", resourceCulture); - } - } - /// /// Looks up a localized string similar to Bottom to Top. /// @@ -634,42 +377,6 @@ public static string Cmd_RulesFile { } } - /// - /// Looks up a localized string similar to No rule violations found.. - /// - public static string Cmd_NoRuleViolations { - get { - return ResourceManager.GetString("Cmd_NoRuleViolations", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Violations. - /// - public static string Cmd_ViolationsHeader { - get { - return ResourceManager.GetString("Cmd_ViolationsHeader", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to - Rule Type: {0}. - /// - public static string Cmd_RuleTypeLine { - get { - return ResourceManager.GetString("Cmd_RuleTypeLine", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to (!) Invalid relationship with missing elements.. - /// - public static string Cmd_InvalidRelationship { - get { - return ResourceManager.GetString("Cmd_InvalidRelationship", resourceCulture); - } - } - /// /// Looks up a localized string similar to Rules file not found.. /// @@ -787,69 +494,6 @@ public static string CollapseTree_Tooltip { } } - /// - /// Looks up a localized string similar to Event handler (possible errors). - /// - public static string Column_EventRegistration_Header { - get { - return ResourceManager.GetString("Column_EventRegistration_Header", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Class. - /// - public static string Column_TypeCohesion_Class { - get { - return ResourceManager.GetString("Column_TypeCohesion_Class", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Largest %. - /// - public static string Column_TypeCohesion_LargestPartition { - get { - return ResourceManager.GetString("Column_TypeCohesion_LargestPartition", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Method Complexity. - /// - public static string Analyzer_MethodComplexity_Label { - get { - return ResourceManager.GetString("Analyzer_MethodComplexity_Label", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Lines of code and cyclomatic complexity per method. - /// - public static string Analyzer_MethodComplexity_Tooltip { - get { - return ResourceManager.GetString("Analyzer_MethodComplexity_Tooltip", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to No source metrics available. - /// - public static string Analyzer_MethodComplexity_NoData { - get { - return ResourceManager.GetString("Analyzer_MethodComplexity_NoData", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Method. - /// - public static string Column_MethodComplexity_Method { - get { - return ResourceManager.GetString("Column_MethodComplexity_Method", resourceCulture); - } - } - /// /// Looks up a localized string similar to Lines. /// @@ -859,123 +503,6 @@ public static string Column_MethodComplexity_Lines { } } - /// - /// Looks up a localized string similar to Code. - /// - public static string Column_MethodComplexity_Code { - get { - return ResourceManager.GetString("Column_MethodComplexity_Code", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Statements. - /// - public static string Column_MethodComplexity_Statements { - get { - return ResourceManager.GetString("Column_MethodComplexity_Statements", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Comments. - /// - public static string Column_MethodComplexity_Comments { - get { - return ResourceManager.GetString("Column_MethodComplexity_Comments", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Comment %. - /// - public static string Column_MethodComplexity_CommentRatio { - get { - return ResourceManager.GetString("Column_MethodComplexity_CommentRatio", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Complexity. - /// - public static string Column_MethodComplexity_Complexity { - get { - return ResourceManager.GetString("Column_MethodComplexity_Complexity", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Members. - /// - public static string Column_TypeCohesion_Members { - get { - return ResourceManager.GetString("Column_TypeCohesion_Members", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Partitions. - /// - public static string Column_TypeCohesion_Partitions { - get { - return ResourceManager.GetString("Column_TypeCohesion_Partitions", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Blast radius. - /// - public static string Column_TypeDependencies_BlastRadius { - get { - return ResourceManager.GetString("Column_TypeDependencies_BlastRadius", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Type. - /// - public static string Column_TypeDependencies_Element { - get { - return ResourceManager.GetString("Column_TypeDependencies_Element", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Fan-in. - /// - public static string Column_TypeDependencies_FanIn { - get { - return ResourceManager.GetString("Column_TypeDependencies_FanIn", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Fan-out. - /// - public static string Column_TypeDependencies_FanOut { - get { - return ResourceManager.GetString("Column_TypeDependencies_FanOut", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to #. - /// - public static string Column_TypeDependencies_Rank { - get { - return ResourceManager.GetString("Column_TypeDependencies_Rank", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Score. - /// - public static string Column_TypeDependencies_Score { - get { - return ResourceManager.GetString("Column_TypeDependencies_Score", resourceCulture); - } - } - /// /// Looks up a localized string similar to Complete relationships ///If code elements are selected, adds missing relationships between them. @@ -1144,15 +671,6 @@ public static string Error_Title { } } - /// - /// Looks up a localized string similar to Success. - /// - public static string Success_Title { - get { - return ResourceManager.GetString("Success_Title", resourceCulture); - } - } - /// /// Looks up a localized string similar to ❌ Errors. /// @@ -2107,15 +1625,6 @@ public static string Message_FiltersAreActive { } } - /// - /// Looks up a localized string similar to Operation completed successfully!. - /// - public static string Message_OperationCompleted_Successful { - get { - return ResourceManager.GetString("Message_OperationCompleted_Successful", resourceCulture); - } - } - /// /// Looks up a localized string similar to Clear movement parent. /// @@ -2649,51 +2158,6 @@ public static string Restore_Tooltip { } } - /// - /// Looks up a localized string similar to _Clear. - /// - public static string Rules_Clear { - get { - return ResourceManager.GetString("Rules_Clear", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Define the architectural rules for your solution:. - /// - public static string Rules_Header { - get { - return ResourceManager.GetString("Rules_Header", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to _Load from file.... - /// - public static string Rules_LoadFromFile { - get { - return ResourceManager.GetString("Rules_LoadFromFile", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Rules definition. - /// - public static string Rules_RuleDefinition { - get { - return ResourceManager.GetString("Rules_RuleDefinition", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to _Save to file.... - /// - public static string Rules_SaveToFile { - get { - return ResourceManager.GetString("Rules_SaveToFile", resourceCulture); - } - } - /// /// Looks up a localized string similar to Do you want to save the project so you don't have to import it again?. /// @@ -3161,15 +2625,6 @@ public static string Settings_WarnIfFiltersActive_Tooltip { } } - /// - /// Looks up a localized string similar to Show partitions. - /// - public static string ShowPartitions { - get { - return ResourceManager.GetString("ShowPartitions", resourceCulture); - } - } - /// /// Looks up a localized string similar to Snapshot. /// @@ -3361,15 +2816,6 @@ public static string Undo_Tooltip { } } - /// - /// Looks up a localized string similar to Save/_Validate. - /// - public static string Validate { - get { - return ResourceManager.GetString("Validate", resourceCulture); - } - } - /// /// Looks up a localized string similar to Warning. /// diff --git a/CSharpCodeAnalyst/Resources/Strings.resx b/CSharpCodeAnalyst/Resources/Strings.resx index 40c79a4a..b9d4e66a 100644 --- a/CSharpCodeAnalyst/Resources/Strings.resx +++ b/CSharpCodeAnalyst/Resources/Strings.resx @@ -443,9 +443,6 @@ If you abort the graph is maintained but not rendered. Use undo to get to the pr Error - - Success - Invalid project filter regular expression. @@ -458,9 +455,6 @@ If you abort the graph is maintained but not rendered. Use undo to get to the pr Undo - - Save/_Validate - Operation failed: {0} @@ -740,138 +734,6 @@ Search with resharper style = Use at least one uppercase character in a search t Export SVG ... - - Architectural rules - - - Validates your architectural constraints based on user-defined rules - - - No rule violations found! - - - Error parsing rules: {0} - - - Load rules - - - Save rules - - - Error loading file: {0} - - - Error saving file: {0} - - - Rules saved successfully! - - - Are you sure you want to clear all rules? - - - Confirm Clear - - - Rule Type - - - Source - - - Target - - - Violations - - - Event registrations - - - Finds imbalances between number of event registrations / un-registrations - - - No event handler registration / un-registration imbalances found - - - Type Dependencies - - - Ranks types by their role in the dependency structure (fan-in, fan-out, importance). Helps you find the types to understand first. - - - No types found to rank - - - Type Cohesion - - - Finds classes whose members split into independent groups (partitions) — candidates for splitting. Double-click a row to view its partitions. - - - No classes with separable partitions found - - - Class - - - Partitions - - - Members - - - Largest % - - - Method Complexity - - - Lines of code and cyclomatic complexity per method. Requires 'Collect source metrics on import' to be enabled before importing. - - - No source metrics available. Enable 'Collect source metrics on import' in the settings and re-import the solution. - - - Method - - - Code - - - Statements - - - Comments - - - Comment % - - - Complexity - - - Show partitions - - - # - - - Type - - - Fan-in - - - Fan-out - - - Blast radius - - - Score - Cycles @@ -881,9 +743,6 @@ Search with resharper style = Use at least one uppercase character in a search t Analyzers - - Event handler (possible errors) - Left to Right @@ -914,9 +773,6 @@ Search with resharper style = Use at least one uppercase character in a search t No data available - - Rule text cannot be empty - Copy full qualified _name @@ -947,18 +803,6 @@ Search with resharper style = Use at least one uppercase character in a search t Rules file: {0} - - No rule violations found. - - - Violations - - - - Rule Type: {0} - - - (!) Invalid relationship with missing elements. - Include _external code @@ -977,9 +821,6 @@ Search with resharper style = Use at least one uppercase character in a search t Model the getter and setter of each property as separate elements (get_Prop / set_Prop). This distinguishes read from write access and avoids false cycles caused by merging both directions onto a single property node. - - Operation completed successfully! - Hide filters are active! @@ -1061,23 +902,6 @@ Search with resharper style = Use at least one uppercase character in a search t Clear movement parent - - Three rules are supported: - -DENY: Forbids dependencies from source to target -RESTRICT: Allows only specified dependencies -ISOLATE: Completely isolates the source from external dependencies - -Patterns: -MyApp.Business → exact match -MyApp.Business.* → element + direct children -MyApp.Business.** → element + all descendants - -Examples: -DENY: MyApp.Business.** -> MyApp.Data.** -RESTRICT: MyApp.Controllers.** -> MyApp.Services.** -ISOLATE: MyApp.Domain.** - Info @@ -1120,24 +944,6 @@ ISOLATE: MyApp.Domain.** ⚠️ Warnings - - Architectural rules configuration - - - _Load from file... - - - _Clear - - - _Save to file... - - - Rules definition - - - Define the architectural rules for your solution: - Solution files (*.sln)|*.sln|Solution files (*.slnx)|*.slnx|C# project (*.csproj)|*.csproj diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index 24238688..ac7a4f7b 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -24,6 +24,8 @@ + + From 7ccb11f0f47ee2ddbdc973d33fd9cc26a1fcac0d Mon Sep 17 00:00:00 2001 From: ATrefzer <36333177+ATrefzer@users.noreply.github.com> Date: Fri, 3 Jul 2026 20:04:19 +0200 Subject: [PATCH 2/9] Cleanup --- .../CSharpCodeAnalyst.AnalyzerSdk.csproj | 17 +- .../Messages/OpenSourceLocationRequest.cs | 8 + .../Shared/Resources/SdkStrings.Designer.cs | 90 --- .../Shared/Resources/SdkStrings.resx | 129 ----- .../ArchitecturalRules/Analyzer.cs | 10 +- .../ArchitecturalRules/PatternMatcher.cs | 2 +- .../ArchitecturalRules/PersistenceData.cs | 2 +- .../ArchitecturalRulesDialog.xaml | 4 +- .../ArchitecturalRulesDialog.xaml.cs | 4 +- .../Presentation/RelationshipViewModel.cs | 2 +- .../RelationshipViewModelTemplate.xaml | 2 +- .../Presentation/RuleViolationViewModel.cs | 28 +- .../Presentation/RuleViolationsViewModel.cs | 11 +- .../ArchitecturalRules/RuleParser.cs | 6 +- .../ArchitecturalRules/Rules/DenyRule.cs | 2 +- .../ArchitecturalRules/Rules/IsolateRule.cs | 2 +- .../ArchitecturalRules/Rules/RestrictRule.cs | 2 +- .../Rules/RestrictRuleGroup.cs | 2 +- .../ArchitecturalRules/Rules/RuleBase.cs | 2 +- .../ArchitecturalRules/Violation.cs | 4 +- .../ArchitecturalRules/ViolationFormatter.cs | 4 +- .../CSharpCodeAnalyst.Analyzers.csproj | 14 +- .../EventRegistration/Analyzer.cs | 16 +- .../Presentation/EventImbalanceViewModel.cs | 39 ++ .../Presentation/EventImbalancesViewModel.cs | 11 +- .../Presentation/SourceLocationTemplate.xaml | 0 .../EventRegistration/Result.cs | 2 +- .../Presentation/EventImbalanceViewModel.cs | 47 -- .../MethodComplexity/Analyzer.cs | 16 +- .../MethodComplexityRowViewModel.cs | 2 +- .../Presentation/MethodComplexityViewModel.cs | 9 +- .../Resources/Strings.Designer.cs | 546 +++++++++--------- .../Analyzers => }/Resources/Strings.resx | 0 .../Analyzers => }/TypeCohesion/Analyzer.cs | 14 +- .../Presentation/TypeCohesionRowViewModel.cs | 2 +- .../Presentation/TypeCohesionViewModel.cs | 9 +- .../TypeDependencies/Analyzer.cs | 14 +- .../Presentation/TypeDependenciesViewModel.cs | 9 +- .../Presentation/TypeDependencyViewModel.cs | 2 +- CSharpCodeAnalyst/App.xaml.cs | 2 + .../CommandLine/ConsoleValidationCommand.cs | 2 +- .../Features/Analyzers/AnalyzerManager.cs | 14 +- .../Services/SourceLocationNavigator.cs | 6 +- .../Shared/UI/ToastManager.cs | 0 .../Shared/UI/ToastNotification.xaml | 3 +- .../Shared/UI/ToastNotification.xaml.cs | 0 .../AnalyzerIntegrationTests.cs | 4 +- .../ArchitecturalRules/PatternMatcherTests.cs | 2 +- .../ArchitecturalRules/RuleParserTests.cs | 4 +- .../ArchitecturalRules/RuleValidationTests.cs | 2 +- 50 files changed, 452 insertions(+), 672 deletions(-) create mode 100644 CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/OpenSourceLocationRequest.cs delete mode 100644 CSharpCodeAnalyst.AnalyzerSdk/Shared/Resources/SdkStrings.Designer.cs delete mode 100644 CSharpCodeAnalyst.AnalyzerSdk/Shared/Resources/SdkStrings.resx rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/ArchitecturalRules/Analyzer.cs (96%) rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/ArchitecturalRules/PatternMatcher.cs (97%) rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/ArchitecturalRules/PersistenceData.cs (57%) rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/ArchitecturalRules/Presentation/ArchitecturalRulesDialog.xaml (95%) rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/ArchitecturalRules/Presentation/ArchitecturalRulesDialog.xaml.cs (96%) rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/ArchitecturalRules/Presentation/RelationshipViewModel.cs (90%) rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/ArchitecturalRules/Presentation/RelationshipViewModelTemplate.xaml (97%) rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/ArchitecturalRules/Presentation/RuleViolationViewModel.cs (80%) rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/ArchitecturalRules/Presentation/RuleViolationsViewModel.cs (84%) rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/ArchitecturalRules/RuleParser.cs (95%) rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/ArchitecturalRules/Rules/DenyRule.cs (91%) rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/ArchitecturalRules/Rules/IsolateRule.cs (91%) rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/ArchitecturalRules/Rules/RestrictRule.cs (91%) rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/ArchitecturalRules/Rules/RestrictRuleGroup.cs (94%) rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/ArchitecturalRules/Rules/RuleBase.cs (89%) rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/ArchitecturalRules/Violation.cs (84%) rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/ArchitecturalRules/ViolationFormatter.cs (92%) rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/EventRegistration/Analyzer.cs (80%) create mode 100644 CSharpCodeAnalyst.Analyzers/EventRegistration/Presentation/EventImbalanceViewModel.cs rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/EventRegistration/Presentation/EventImbalancesViewModel.cs (74%) rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/EventRegistration/Presentation/SourceLocationTemplate.xaml (100%) rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/EventRegistration/Result.cs (84%) delete mode 100644 CSharpCodeAnalyst.Analyzers/Features/Analyzers/EventRegistration/Presentation/EventImbalanceViewModel.cs rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/MethodComplexity/Analyzer.cs (75%) rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/MethodComplexity/Presentation/MethodComplexityRowViewModel.cs (93%) rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/MethodComplexity/Presentation/MethodComplexityViewModel.cs (92%) rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/Resources/Strings.Designer.cs (93%) rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/Resources/Strings.resx (100%) rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/TypeCohesion/Analyzer.cs (75%) rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/TypeCohesion/Presentation/TypeCohesionRowViewModel.cs (93%) rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/TypeCohesion/Presentation/TypeCohesionViewModel.cs (92%) rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/TypeDependencies/Analyzer.cs (75%) rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/TypeDependencies/Presentation/TypeDependenciesViewModel.cs (93%) rename CSharpCodeAnalyst.Analyzers/{Features/Analyzers => }/TypeDependencies/Presentation/TypeDependencyViewModel.cs (93%) rename {CSharpCodeAnalyst.AnalyzerSdk => CSharpCodeAnalyst}/Shared/Services/SourceLocationNavigator.cs (97%) rename {CSharpCodeAnalyst.AnalyzerSdk => CSharpCodeAnalyst}/Shared/UI/ToastManager.cs (100%) rename {CSharpCodeAnalyst.AnalyzerSdk => CSharpCodeAnalyst}/Shared/UI/ToastNotification.xaml (88%) rename {CSharpCodeAnalyst.AnalyzerSdk => CSharpCodeAnalyst}/Shared/UI/ToastNotification.xaml.cs (100%) diff --git a/CSharpCodeAnalyst.AnalyzerSdk/CSharpCodeAnalyst.AnalyzerSdk.csproj b/CSharpCodeAnalyst.AnalyzerSdk/CSharpCodeAnalyst.AnalyzerSdk.csproj index 61861cf8..4709f3c7 100644 --- a/CSharpCodeAnalyst.AnalyzerSdk/CSharpCodeAnalyst.AnalyzerSdk.csproj +++ b/CSharpCodeAnalyst.AnalyzerSdk/CSharpCodeAnalyst.AnalyzerSdk.csproj @@ -6,7 +6,7 @@ enable true + so those namespaces (and any embedded resource manifest names) still line up. --> CSharpCodeAnalyst @@ -14,21 +14,6 @@ - - - True - True - SdkStrings.resx - - - - - - PublicResXFileCodeGenerator - SdkStrings.Designer.cs - - - diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/OpenSourceLocationRequest.cs b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/OpenSourceLocationRequest.cs new file mode 100644 index 00000000..9ee7b835 --- /dev/null +++ b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/OpenSourceLocationRequest.cs @@ -0,0 +1,8 @@ +using CodeGraph.Graph; + +namespace CSharpCodeAnalyst.Shared.Messages; + +public class OpenSourceLocationRequest(SourceLocation location) +{ + public SourceLocation Location { get; } = location; +} diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Resources/SdkStrings.Designer.cs b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Resources/SdkStrings.Designer.cs deleted file mode 100644 index f26a6f69..00000000 --- a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Resources/SdkStrings.Designer.cs +++ /dev/null @@ -1,90 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace CSharpCodeAnalyst.Shared.Resources { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "18.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - public class SdkStrings { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal SdkStrings() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - public static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CSharpCodeAnalyst.Shared.Resources.SdkStrings", typeof(SdkStrings).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - public static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to Error. - /// - public static string Error_Title { - get { - return ResourceManager.GetString("Error_Title", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Operation failed: {0}. - /// - public static string OperationFailed_Message { - get { - return ResourceManager.GetString("OperationFailed_Message", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Operation completed successfully!. - /// - public static string Message_OperationCompleted_Successful { - get { - return ResourceManager.GetString("Message_OperationCompleted_Successful", resourceCulture); - } - } - } -} diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Resources/SdkStrings.resx b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Resources/SdkStrings.resx deleted file mode 100644 index aa6e7524..00000000 --- a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Resources/SdkStrings.resx +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Error - - - Operation failed: {0} - - - Operation completed successfully! - - diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Analyzer.cs b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Analyzer.cs similarity index 96% rename from CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Analyzer.cs rename to CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Analyzer.cs index 30d51afd..db17ddf2 100644 --- a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Analyzer.cs +++ b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Analyzer.cs @@ -3,14 +3,14 @@ using System.Text.Json; using System.Windows; using CodeGraph.Graph; -using CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Presentation; -using CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Rules; -using CSharpCodeAnalyst.Features.Analyzers.Resources; +using CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Presentation; +using CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Rules; +using CSharpCodeAnalyst.Analyzers.Resources; using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.Messages; using CSharpCodeAnalyst.Shared.Notifications; -namespace CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules; +namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules; public class Analyzer : IAnalyzer { @@ -163,7 +163,7 @@ private void OnValidateRules(string rulesText) else { // Show violations in tabular format - var violationsViewModel = new RuleViolationsViewModel(violations, _currentGraph); + var violationsViewModel = new RuleViolationsViewModel(violations, _currentGraph, _messaging); _messaging.Publish(new ShowTabularDataRequest(Id, Name, violationsViewModel)); } } diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/PatternMatcher.cs b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/PatternMatcher.cs similarity index 97% rename from CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/PatternMatcher.cs rename to CSharpCodeAnalyst.Analyzers/ArchitecturalRules/PatternMatcher.cs index 2a236a89..1decb69a 100644 --- a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/PatternMatcher.cs +++ b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/PatternMatcher.cs @@ -1,6 +1,6 @@ using CodeGraph.Graph; -namespace CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules; +namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules; public static class PatternMatcher { diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/PersistenceData.cs b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/PersistenceData.cs similarity index 57% rename from CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/PersistenceData.cs rename to CSharpCodeAnalyst.Analyzers/ArchitecturalRules/PersistenceData.cs index 8591395c..89dda29c 100644 --- a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/PersistenceData.cs +++ b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/PersistenceData.cs @@ -1,4 +1,4 @@ -namespace CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules; +namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules; public class PersistenceData { diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Presentation/ArchitecturalRulesDialog.xaml b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/ArchitecturalRulesDialog.xaml similarity index 95% rename from CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Presentation/ArchitecturalRulesDialog.xaml rename to CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/ArchitecturalRulesDialog.xaml index ce34ded1..e228bef6 100644 --- a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Presentation/ArchitecturalRulesDialog.xaml +++ b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/ArchitecturalRulesDialog.xaml @@ -1,9 +1,9 @@ - /// A line in the detail view. Note a view model is created for each source location in a relationship. diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Presentation/RelationshipViewModelTemplate.xaml b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/RelationshipViewModelTemplate.xaml similarity index 97% rename from CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Presentation/RelationshipViewModelTemplate.xaml rename to CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/RelationshipViewModelTemplate.xaml index b6f6b0d8..e418238d 100644 --- a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Presentation/RelationshipViewModelTemplate.xaml +++ b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/RelationshipViewModelTemplate.xaml @@ -2,7 +2,7 @@ xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml' xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:presentation="clr-namespace:CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Presentation" + xmlns:presentation="clr-namespace:CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Presentation" mc:Ignorable="d"> CreateRelationshipDetails() return details; } - private static void OnOpenSourceLocation(RelationshipViewModel? detailViewModel) + private void OnOpenSourceLocation(RelationshipViewModel? detailViewModel) { if (detailViewModel?.SourceLocation is null) { return; } - try - { - SourceLocationNavigator.Open(detailViewModel.SourceLocation.File, - detailViewModel.SourceLocation.Line, - detailViewModel.SourceLocation.Column); - } - catch (Exception ex) - { - var message = string.Format(Strings.OperationFailed_Message, ex.Message); - MessageBox.Show(message, Strings.Error_Title, MessageBoxButton.OK, - MessageBoxImage.Error); - } + _messaging.Publish(new OpenSourceLocationRequest(detailViewModel.SourceLocation)); } } \ No newline at end of file diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Presentation/RuleViolationsViewModel.cs b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/RuleViolationsViewModel.cs similarity index 84% rename from CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Presentation/RuleViolationsViewModel.cs rename to CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/RuleViolationsViewModel.cs index c06a5d1a..13b716db 100644 --- a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Presentation/RuleViolationsViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/RuleViolationsViewModel.cs @@ -1,17 +1,18 @@ using System.Collections.ObjectModel; using System.Windows; -using CSharpCodeAnalyst.Features.Analyzers.Resources; +using CSharpCodeAnalyst.Analyzers.Resources; +using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; -namespace CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Presentation; +namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Presentation; public class RuleViolationsViewModel : Table { private readonly ObservableCollection _violations; - public RuleViolationsViewModel(List violations, CodeGraph.Graph.CodeGraph codeGraph) + public RuleViolationsViewModel(List violations, CodeGraph.Graph.CodeGraph codeGraph, IPublisher messaging) { - var violationViewModels = violations.Select(v => new RuleViolationViewModel(v, codeGraph)); + var violationViewModels = violations.Select(v => new RuleViolationViewModel(v, codeGraph, messaging)); _violations = new ObservableCollection(violationViewModels); } @@ -61,7 +62,7 @@ public override ObservableCollection GetData() public override DataTemplate GetRowDetailsTemplate() { var uri = new Uri( - "/CSharpCodeAnalyst;component/Features/Analyzers/ArchitecturalRules/Presentation/RelationshipViewModelTemplate.xaml", + "/CSharpCodeAnalyst.Analyzers;component/ArchitecturalRules/Presentation/RelationshipViewModelTemplate.xaml", UriKind.Relative); return (DataTemplate)Application.LoadComponent(uri); } diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/RuleParser.cs b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/RuleParser.cs similarity index 95% rename from CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/RuleParser.cs rename to CSharpCodeAnalyst.Analyzers/ArchitecturalRules/RuleParser.cs index 1b2dbdef..2ab9b687 100644 --- a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/RuleParser.cs +++ b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/RuleParser.cs @@ -1,8 +1,8 @@ using System.Text.RegularExpressions; -using CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Rules; -using CSharpCodeAnalyst.Features.Analyzers.Resources; +using CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Rules; +using CSharpCodeAnalyst.Analyzers.Resources; -namespace CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules; +namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules; public static class RuleParser { diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Rules/DenyRule.cs b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/DenyRule.cs similarity index 91% rename from CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Rules/DenyRule.cs rename to CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/DenyRule.cs index 2ea429fa..ee7239c1 100644 --- a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Rules/DenyRule.cs +++ b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/DenyRule.cs @@ -1,6 +1,6 @@ using CodeGraph.Graph; -namespace CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Rules; +namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Rules; /// /// Denies dependencies from source to target patterns diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Rules/IsolateRule.cs b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/IsolateRule.cs similarity index 91% rename from CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Rules/IsolateRule.cs rename to CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/IsolateRule.cs index fbf55da7..33779e62 100644 --- a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Rules/IsolateRule.cs +++ b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/IsolateRule.cs @@ -1,6 +1,6 @@ using CodeGraph.Graph; -namespace CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Rules; +namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Rules; /// /// Isolates source pattern from any external dependencies diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Rules/RestrictRule.cs b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/RestrictRule.cs similarity index 91% rename from CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Rules/RestrictRule.cs rename to CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/RestrictRule.cs index b584936c..61fafea3 100644 --- a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Rules/RestrictRule.cs +++ b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/RestrictRule.cs @@ -1,6 +1,6 @@ using CodeGraph.Graph; -namespace CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Rules; +namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Rules; /// /// Restricts source to only depend on target patterns (all others are denied) diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Rules/RestrictRuleGroup.cs b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/RestrictRuleGroup.cs similarity index 94% rename from CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Rules/RestrictRuleGroup.cs rename to CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/RestrictRuleGroup.cs index dfae1898..4c3135a6 100644 --- a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Rules/RestrictRuleGroup.cs +++ b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/RestrictRuleGroup.cs @@ -1,6 +1,6 @@ using CodeGraph.Graph; -namespace CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Rules; +namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Rules; /// /// Groups multiple RESTRICT rules with the same source pattern diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Rules/RuleBase.cs b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/RuleBase.cs similarity index 89% rename from CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Rules/RuleBase.cs rename to CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/RuleBase.cs index ebf04f14..7390cae4 100644 --- a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Rules/RuleBase.cs +++ b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/RuleBase.cs @@ -1,6 +1,6 @@ using CodeGraph.Graph; -namespace CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Rules; +namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Rules; public abstract class RuleBase { diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Violation.cs b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Violation.cs similarity index 84% rename from CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Violation.cs rename to CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Violation.cs index 5fc7f118..6bd04dd6 100644 --- a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/Violation.cs +++ b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Violation.cs @@ -1,7 +1,7 @@ using CodeGraph.Graph; -using CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Rules; +using CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Rules; -namespace CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules; +namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules; public class Violation { diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/ViolationFormatter.cs b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/ViolationFormatter.cs similarity index 92% rename from CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/ViolationFormatter.cs rename to CSharpCodeAnalyst.Analyzers/ArchitecturalRules/ViolationFormatter.cs index 183b3611..5e597d4a 100644 --- a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/ArchitecturalRules/ViolationFormatter.cs +++ b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/ViolationFormatter.cs @@ -1,7 +1,7 @@ using System.Text; -using CSharpCodeAnalyst.Features.Analyzers.Resources; +using CSharpCodeAnalyst.Analyzers.Resources; -namespace CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules; +namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules; public static class ViolationsFormatter { diff --git a/CSharpCodeAnalyst.Analyzers/CSharpCodeAnalyst.Analyzers.csproj b/CSharpCodeAnalyst.Analyzers/CSharpCodeAnalyst.Analyzers.csproj index 87004358..5d2dafe7 100644 --- a/CSharpCodeAnalyst.Analyzers/CSharpCodeAnalyst.Analyzers.csproj +++ b/CSharpCodeAnalyst.Analyzers/CSharpCodeAnalyst.Analyzers.csproj @@ -5,9 +5,7 @@ enable enable true - - CSharpCodeAnalyst + CSharpCodeAnalyst.Analyzers @@ -16,17 +14,17 @@ - + MSBuild:Compile Wpf Designer - + MSBuild:Compile Wpf Designer - + MSBuild:Compile Wpf Designer @@ -34,7 +32,7 @@ - + True True Strings.resx @@ -42,7 +40,7 @@ - + PublicResXFileCodeGenerator Strings.Designer.cs diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/EventRegistration/Analyzer.cs b/CSharpCodeAnalyst.Analyzers/EventRegistration/Analyzer.cs similarity index 80% rename from CSharpCodeAnalyst.Analyzers/Features/Analyzers/EventRegistration/Analyzer.cs rename to CSharpCodeAnalyst.Analyzers/EventRegistration/Analyzer.cs index fed02e19..e50a452a 100644 --- a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/EventRegistration/Analyzer.cs +++ b/CSharpCodeAnalyst.Analyzers/EventRegistration/Analyzer.cs @@ -1,11 +1,11 @@ using CodeGraph.Graph; -using CSharpCodeAnalyst.Features.Analyzers.EventRegistration.Presentation; -using CSharpCodeAnalyst.Features.Analyzers.Resources; +using CSharpCodeAnalyst.Analyzers.EventRegistration.Presentation; +using CSharpCodeAnalyst.Analyzers.Resources; using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.Messages; -using CSharpCodeAnalyst.Shared.UI; +using CSharpCodeAnalyst.Shared.Notifications; -namespace CSharpCodeAnalyst.Features.Analyzers.EventRegistration; +namespace CSharpCodeAnalyst.Analyzers.EventRegistration; /// /// Finds imbalances between event registrations and un-registrations. @@ -13,10 +13,12 @@ namespace CSharpCodeAnalyst.Features.Analyzers.EventRegistration; public class Analyzer : IAnalyzer { private readonly IPublisher _messaging; + private readonly IUserNotification _userNotification; - public Analyzer(IPublisher messaging) + public Analyzer(IPublisher messaging, IUserNotification userNotification) { _messaging = messaging; + _userNotification = userNotification; } public void Analyze(CodeGraph.Graph.CodeGraph graph) @@ -25,11 +27,11 @@ public void Analyze(CodeGraph.Graph.CodeGraph graph) if (imbalances.Count == 0) { - ToastManager.ShowSuccess(Strings.Analyzer_EventRegistration_NoData); + _userNotification.ShowSuccess(Strings.Analyzer_EventRegistration_NoData); return; } - var vm = new EventImbalancesViewModel(imbalances); + var vm = new EventImbalancesViewModel(imbalances, _messaging); _messaging.Publish(new ShowTabularDataRequest(Id, Name, vm)); } diff --git a/CSharpCodeAnalyst.Analyzers/EventRegistration/Presentation/EventImbalanceViewModel.cs b/CSharpCodeAnalyst.Analyzers/EventRegistration/Presentation/EventImbalanceViewModel.cs new file mode 100644 index 00000000..f551cffa --- /dev/null +++ b/CSharpCodeAnalyst.Analyzers/EventRegistration/Presentation/EventImbalanceViewModel.cs @@ -0,0 +1,39 @@ +using System.Collections.ObjectModel; +using System.Windows.Input; +using CodeGraph.Graph; +using CSharpCodeAnalyst.Shared.Contracts; +using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; +using CSharpCodeAnalyst.Shared.Messages; +using CSharpCodeAnalyst.Shared.Wpf; + +namespace CSharpCodeAnalyst.Analyzers.EventRegistration.Presentation; + +public class EventImbalanceViewModel : TableRow +{ + private readonly IPublisher _messaging; + + internal EventImbalanceViewModel(Result imbalance, IPublisher messaging) + { + _messaging = messaging; + Description = imbalance.Handler.FullName; + Locations = new ObservableCollection(imbalance.Locations); + OpenSourceLocationCommand = new WpfCommand(OnOpenSourceLocation); + } + + public ICommand OpenSourceLocationCommand { get; set; } + + public ObservableCollection Locations { get; set; } + + public string Description { get; } + + + private void OnOpenSourceLocation(SourceLocation? location) + { + if (location is null) + { + return; + } + + _messaging.Publish(new OpenSourceLocationRequest(location)); + } +} \ No newline at end of file diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/EventRegistration/Presentation/EventImbalancesViewModel.cs b/CSharpCodeAnalyst.Analyzers/EventRegistration/Presentation/EventImbalancesViewModel.cs similarity index 74% rename from CSharpCodeAnalyst.Analyzers/Features/Analyzers/EventRegistration/Presentation/EventImbalancesViewModel.cs rename to CSharpCodeAnalyst.Analyzers/EventRegistration/Presentation/EventImbalancesViewModel.cs index df2eefeb..18626a41 100644 --- a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/EventRegistration/Presentation/EventImbalancesViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/EventRegistration/Presentation/EventImbalancesViewModel.cs @@ -1,17 +1,18 @@ using System.Collections.ObjectModel; using System.Windows; -using CSharpCodeAnalyst.Features.Analyzers.Resources; +using CSharpCodeAnalyst.Analyzers.Resources; +using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; -namespace CSharpCodeAnalyst.Features.Analyzers.EventRegistration.Presentation; +namespace CSharpCodeAnalyst.Analyzers.EventRegistration.Presentation; internal class EventImbalancesViewModel : Table { private readonly ObservableCollection _imbalances; - internal EventImbalancesViewModel(List imbalances) + internal EventImbalancesViewModel(List imbalances, IPublisher messaging) { - var tmp = imbalances.Select(i => new EventImbalanceViewModel(i)); + var tmp = imbalances.Select(i => new EventImbalanceViewModel(i, messaging)); _imbalances = new ObservableCollection(tmp); } @@ -37,7 +38,7 @@ public override ObservableCollection GetData() public override DataTemplate GetRowDetailsTemplate() { var uri = new Uri( - "/CSharpCodeAnalyst;component/Features/Analyzers/EventRegistration/Presentation/SourceLocationTemplate.xaml", + "/CSharpCodeAnalyst.Analyzers;component/EventRegistration/Presentation/SourceLocationTemplate.xaml", UriKind.Relative); return (DataTemplate)Application.LoadComponent(uri); } diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/EventRegistration/Presentation/SourceLocationTemplate.xaml b/CSharpCodeAnalyst.Analyzers/EventRegistration/Presentation/SourceLocationTemplate.xaml similarity index 100% rename from CSharpCodeAnalyst.Analyzers/Features/Analyzers/EventRegistration/Presentation/SourceLocationTemplate.xaml rename to CSharpCodeAnalyst.Analyzers/EventRegistration/Presentation/SourceLocationTemplate.xaml diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/EventRegistration/Result.cs b/CSharpCodeAnalyst.Analyzers/EventRegistration/Result.cs similarity index 84% rename from CSharpCodeAnalyst.Analyzers/Features/Analyzers/EventRegistration/Result.cs rename to CSharpCodeAnalyst.Analyzers/EventRegistration/Result.cs index 58ab04f9..495dc349 100644 --- a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/EventRegistration/Result.cs +++ b/CSharpCodeAnalyst.Analyzers/EventRegistration/Result.cs @@ -1,6 +1,6 @@ using CodeGraph.Graph; -namespace CSharpCodeAnalyst.Features.Analyzers.EventRegistration; +namespace CSharpCodeAnalyst.Analyzers.EventRegistration; public class Result { diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/EventRegistration/Presentation/EventImbalanceViewModel.cs b/CSharpCodeAnalyst.Analyzers/Features/Analyzers/EventRegistration/Presentation/EventImbalanceViewModel.cs deleted file mode 100644 index 60e1c249..00000000 --- a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/EventRegistration/Presentation/EventImbalanceViewModel.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System.Collections.ObjectModel; -using System.Windows; -using System.Windows.Input; -using CodeGraph.Graph; -using CSharpCodeAnalyst.Features.Analyzers.Resources; -using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; -using CSharpCodeAnalyst.Shared.Services; -using CSharpCodeAnalyst.Shared.Wpf; - -namespace CSharpCodeAnalyst.Features.Analyzers.EventRegistration.Presentation; - -public class EventImbalanceViewModel : TableRow -{ - internal EventImbalanceViewModel(Result imbalance) - { - Description = imbalance.Handler.FullName; - Locations = new ObservableCollection(imbalance.Locations); - OpenSourceLocationCommand = new WpfCommand(OnOpenSourceLocation); - } - - public ICommand OpenSourceLocationCommand { get; set; } - - public ObservableCollection Locations { get; set; } - - public string Description { get; } - - - private static void OnOpenSourceLocation(SourceLocation? location) - { - if (location is null) - { - return; - } - - try - { - // Create a new instance to find newly open studio instance. - SourceLocationNavigator.Open(location.File, location.Line, location.Column); - } - catch (Exception ex) - { - var message = string.Format(Strings.OperationFailed_Message, ex.Message); - MessageBox.Show(message, Strings.Error_Title, MessageBoxButton.OK, - MessageBoxImage.Error); - } - } -} \ No newline at end of file diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/MethodComplexity/Analyzer.cs b/CSharpCodeAnalyst.Analyzers/MethodComplexity/Analyzer.cs similarity index 75% rename from CSharpCodeAnalyst.Analyzers/Features/Analyzers/MethodComplexity/Analyzer.cs rename to CSharpCodeAnalyst.Analyzers/MethodComplexity/Analyzer.cs index 345b9465..73d6c687 100644 --- a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/MethodComplexity/Analyzer.cs +++ b/CSharpCodeAnalyst.Analyzers/MethodComplexity/Analyzer.cs @@ -1,11 +1,11 @@ using CodeGraph.Metrics; -using CSharpCodeAnalyst.Features.Analyzers.MethodComplexity.Presentation; -using CSharpCodeAnalyst.Features.Analyzers.Resources; +using CSharpCodeAnalyst.Analyzers.MethodComplexity.Presentation; +using CSharpCodeAnalyst.Analyzers.Resources; using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.Messages; -using CSharpCodeAnalyst.Shared.UI; +using CSharpCodeAnalyst.Shared.Notifications; -namespace CSharpCodeAnalyst.Features.Analyzers.MethodComplexity; +namespace CSharpCodeAnalyst.Analyzers.MethodComplexity; /// /// Lists per-method source metrics (lines of code, cyclomatic complexity) collected during @@ -16,10 +16,12 @@ public class Analyzer : IAnalyzer { private readonly MetricStore _metricStore; private readonly IPublisher _messaging; + private readonly IUserNotification _userNotification; - public Analyzer(IPublisher messaging, MetricStore metricStore) + public Analyzer(IPublisher messaging, IUserNotification userNotification, MetricStore metricStore) { _messaging = messaging; + _userNotification = userNotification; _metricStore = metricStore; } @@ -31,7 +33,7 @@ public void Analyze(CodeGraph.Graph.CodeGraph graph) { if (_metricStore.IsEmpty) { - ToastManager.ShowInfo(Strings.Analyzer_MethodComplexity_NoData); + _userNotification.ShowSuccess(Strings.Analyzer_MethodComplexity_NoData); return; } @@ -45,7 +47,7 @@ public void Analyze(CodeGraph.Graph.CodeGraph graph) if (rows.Count == 0) { - ToastManager.ShowInfo(Strings.Analyzer_MethodComplexity_NoData); + _userNotification.ShowSuccess(Strings.Analyzer_MethodComplexity_NoData); return; } diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/MethodComplexity/Presentation/MethodComplexityRowViewModel.cs b/CSharpCodeAnalyst.Analyzers/MethodComplexity/Presentation/MethodComplexityRowViewModel.cs similarity index 93% rename from CSharpCodeAnalyst.Analyzers/Features/Analyzers/MethodComplexity/Presentation/MethodComplexityRowViewModel.cs rename to CSharpCodeAnalyst.Analyzers/MethodComplexity/Presentation/MethodComplexityRowViewModel.cs index 305b7221..22f236ed 100644 --- a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/MethodComplexity/Presentation/MethodComplexityRowViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/MethodComplexity/Presentation/MethodComplexityRowViewModel.cs @@ -3,7 +3,7 @@ using CodeGraph.Metrics; using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; -namespace CSharpCodeAnalyst.Features.Analyzers.MethodComplexity.Presentation; +namespace CSharpCodeAnalyst.Analyzers.MethodComplexity.Presentation; public class MethodComplexityRowViewModel : TableRow { diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/MethodComplexity/Presentation/MethodComplexityViewModel.cs b/CSharpCodeAnalyst.Analyzers/MethodComplexity/Presentation/MethodComplexityViewModel.cs similarity index 92% rename from CSharpCodeAnalyst.Analyzers/Features/Analyzers/MethodComplexity/Presentation/MethodComplexityViewModel.cs rename to CSharpCodeAnalyst.Analyzers/MethodComplexity/Presentation/MethodComplexityViewModel.cs index 21abd63b..e7f8dfc6 100644 --- a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/MethodComplexity/Presentation/MethodComplexityViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/MethodComplexity/Presentation/MethodComplexityViewModel.cs @@ -1,14 +1,13 @@ using System.Collections.ObjectModel; using System.Windows; -using CSharpCodeAnalyst.Features.Analyzers.Resources; +using CSharpCodeAnalyst.Analyzers.Resources; using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; using CSharpCodeAnalyst.Shared.Messages; using CSharpCodeAnalyst.Shared.Search; -using CSharpCodeAnalyst.Shared.Services; using CSharpCodeAnalyst.Shared.Wpf; -namespace CSharpCodeAnalyst.Features.Analyzers.MethodComplexity.Presentation; +namespace CSharpCodeAnalyst.Analyzers.MethodComplexity.Presentation; internal class MethodComplexityViewModel : Table { @@ -119,8 +118,8 @@ private static bool CanJumpToCode(MethodComplexityRowViewModel row) return row.Element.SourceLocations.Count > 0; } - private static void JumpToCode(MethodComplexityRowViewModel row) + private void JumpToCode(MethodComplexityRowViewModel row) { - SourceLocationNavigator.Open(row.Element.SourceLocations[0]); + _messaging.Publish(new OpenSourceLocationRequest(row.Element.SourceLocations[0])); } } diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/Resources/Strings.Designer.cs b/CSharpCodeAnalyst.Analyzers/Resources/Strings.Designer.cs similarity index 93% rename from CSharpCodeAnalyst.Analyzers/Features/Analyzers/Resources/Strings.Designer.cs rename to CSharpCodeAnalyst.Analyzers/Resources/Strings.Designer.cs index 1fb148da..45bcbaaa 100644 --- a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/Resources/Strings.Designer.cs +++ b/CSharpCodeAnalyst.Analyzers/Resources/Strings.Designer.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version:4.0.30319.42000 @@ -8,10 +8,10 @@ // //------------------------------------------------------------------------------ -namespace CSharpCodeAnalyst.Features.Analyzers.Resources { +namespace CSharpCodeAnalyst.Analyzers.Resources { using System; - - + + /// /// A strongly-typed resource class, for looking up localized strings, etc. /// @@ -23,15 +23,15 @@ namespace CSharpCodeAnalyst.Features.Analyzers.Resources { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class Strings { - + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal Strings() { } - + /// /// Returns the cached ResourceManager instance used by this class. /// @@ -39,13 +39,13 @@ internal Strings() { public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CSharpCodeAnalyst.Features.Analyzers.Resources.Strings", typeof(Strings).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CSharpCodeAnalyst.Analyzers.Resources.Strings", typeof(Strings).Assembly); resourceMan = temp; } return resourceMan; } } - + /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. @@ -59,133 +59,142 @@ internal Strings() { resourceCulture = value; } } - + /// - /// Looks up a localized string similar to Error. + /// Looks up a localized string similar to Architectural rules. /// - public static string Error_Title { + public static string Analyzer_ArchitecturalRules_Label { get { - return ResourceManager.GetString("Error_Title", resourceCulture); + return ResourceManager.GetString("Analyzer_ArchitecturalRules_Label", resourceCulture); } } - + /// - /// Looks up a localized string similar to Operation failed: {0}. + /// Looks up a localized string similar to No rule violations found!. /// - public static string OperationFailed_Message { + public static string Analyzer_ArchitecturalRules_NoData { get { - return ResourceManager.GetString("OperationFailed_Message", resourceCulture); + return ResourceManager.GetString("Analyzer_ArchitecturalRules_NoData", resourceCulture); } } - + /// - /// Looks up a localized string similar to _Close. + /// Looks up a localized string similar to Error parsing rules: {0}. /// - public static string Close_Button { + public static string Analyzer_ArchitecturalRules_ParseError { get { - return ResourceManager.GetString("Close_Button", resourceCulture); + return ResourceManager.GetString("Analyzer_ArchitecturalRules_ParseError", resourceCulture); } } - + /// - /// Looks up a localized string similar to Show in Code Explorer. + /// Looks up a localized string similar to Validates your architectural constraints based on user-defined rules. /// - public static string CopyToExplorerGraph_MenuItem { + public static string Analyzer_ArchitecturalRules_Tooltip { get { - return ResourceManager.GetString("CopyToExplorerGraph_MenuItem", resourceCulture); + return ResourceManager.GetString("Analyzer_ArchitecturalRules_Tooltip", resourceCulture); } } - + /// - /// Looks up a localized string similar to Jump to code. + /// Looks up a localized string similar to Rule text cannot be empty. /// - public static string JumpToCode { + public static string Analyzer_Empty_Rule { get { - return ResourceManager.GetString("JumpToCode", resourceCulture); + return ResourceManager.GetString("Analyzer_Empty_Rule", resourceCulture); } } - + /// - /// Looks up a localized string similar to Architectural rules. + /// Looks up a localized string similar to Event registrations. /// - public static string Analyzer_ArchitecturalRules_Label { + public static string Analyzer_EventRegistration_Label { get { - return ResourceManager.GetString("Analyzer_ArchitecturalRules_Label", resourceCulture); + return ResourceManager.GetString("Analyzer_EventRegistration_Label", resourceCulture); } } - + /// - /// Looks up a localized string similar to Validates your architectural constraints based on user-defined rules. + /// Looks up a localized string similar to No event handler registration / un-registration imbalances found. /// - public static string Analyzer_ArchitecturalRules_Tooltip { + public static string Analyzer_EventRegistration_NoData { get { - return ResourceManager.GetString("Analyzer_ArchitecturalRules_Tooltip", resourceCulture); + return ResourceManager.GetString("Analyzer_EventRegistration_NoData", resourceCulture); } } - + /// - /// Looks up a localized string similar to No rule violations found!. + /// Looks up a localized string similar to Finds imbalances between number of event registrations / un-registrations. /// - public static string Analyzer_ArchitecturalRules_NoData { + public static string Analyzer_EventRegistration_Tooltip { get { - return ResourceManager.GetString("Analyzer_ArchitecturalRules_NoData", resourceCulture); + return ResourceManager.GetString("Analyzer_EventRegistration_Tooltip", resourceCulture); } } - + /// - /// Looks up a localized string similar to Error parsing rules: {0}. + /// Looks up a localized string similar to Method Complexity. /// - public static string Analyzer_ArchitecturalRules_ParseError { + public static string Analyzer_MethodComplexity_Label { get { - return ResourceManager.GetString("Analyzer_ArchitecturalRules_ParseError", resourceCulture); + return ResourceManager.GetString("Analyzer_MethodComplexity_Label", resourceCulture); } } - + /// - /// Looks up a localized string similar to Event registrations. + /// Looks up a localized string similar to No source metrics available. Enable 'Collect source metrics on import' in the settings and re-import the solution.. /// - public static string Analyzer_EventRegistration_Label { + public static string Analyzer_MethodComplexity_NoData { get { - return ResourceManager.GetString("Analyzer_EventRegistration_Label", resourceCulture); + return ResourceManager.GetString("Analyzer_MethodComplexity_NoData", resourceCulture); } } - + /// - /// Looks up a localized string similar to Finds imbalances between number of event registrations / un-registrations. + /// Looks up a localized string similar to Lines of code and cyclomatic complexity per method. Requires 'Collect source metrics on import' to be enabled before importing.. /// - public static string Analyzer_EventRegistration_Tooltip { + public static string Analyzer_MethodComplexity_Tooltip { get { - return ResourceManager.GetString("Analyzer_EventRegistration_Tooltip", resourceCulture); + return ResourceManager.GetString("Analyzer_MethodComplexity_Tooltip", resourceCulture); } } - + /// - /// Looks up a localized string similar to No event handler registration / un-registration imbalances found. + /// Looks up a localized string similar to Type Cohesion. /// - public static string Analyzer_EventRegistration_NoData { + public static string Analyzer_TypeCohesion_Label { get { - return ResourceManager.GetString("Analyzer_EventRegistration_NoData", resourceCulture); + return ResourceManager.GetString("Analyzer_TypeCohesion_Label", resourceCulture); } } - + /// - /// Looks up a localized string similar to Type Dependencies. + /// Looks up a localized string similar to No classes with separable partitions found. /// - public static string Analyzer_TypeDependencies_Label { + public static string Analyzer_TypeCohesion_NoData { get { - return ResourceManager.GetString("Analyzer_TypeDependencies_Label", resourceCulture); + return ResourceManager.GetString("Analyzer_TypeCohesion_NoData", resourceCulture); } } - + /// - /// Looks up a localized string similar to Ranks types by their role in the dependency structure (fan-in, fan-out, importance). Helps you find the types to understand first.. + /// Looks up a localized string similar to Finds classes whose members split into independent groups (partitions) — candidates for splitting. Double-click a row to view its partitions.. /// - public static string Analyzer_TypeDependencies_Tooltip { + public static string Analyzer_TypeCohesion_Tooltip { get { - return ResourceManager.GetString("Analyzer_TypeDependencies_Tooltip", resourceCulture); + return ResourceManager.GetString("Analyzer_TypeCohesion_Tooltip", resourceCulture); } } - + + /// + /// Looks up a localized string similar to Type Dependencies. + /// + public static string Analyzer_TypeDependencies_Label { + get { + return ResourceManager.GetString("Analyzer_TypeDependencies_Label", resourceCulture); + } + } + /// /// Looks up a localized string similar to No types found to rank. /// @@ -194,367 +203,381 @@ public static string Analyzer_TypeDependencies_NoData { return ResourceManager.GetString("Analyzer_TypeDependencies_NoData", resourceCulture); } } - + /// - /// Looks up a localized string similar to Type Cohesion. + /// Looks up a localized string similar to Ranks types by their role in the dependency structure (fan-in, fan-out, importance). Helps you find the types to understand first.. /// - public static string Analyzer_TypeCohesion_Label { + public static string Analyzer_TypeDependencies_Tooltip { get { - return ResourceManager.GetString("Analyzer_TypeCohesion_Label", resourceCulture); + return ResourceManager.GetString("Analyzer_TypeDependencies_Tooltip", resourceCulture); } } - + /// - /// Looks up a localized string similar to Finds classes whose members split into independent groups (partitions) — candidates for splitting. Double-click a row to view its partitions.. + /// Looks up a localized string similar to Are you sure you want to clear all rules?. /// - public static string Analyzer_TypeCohesion_Tooltip { + public static string ArchitecturalRules_ClearConfirm_Message { get { - return ResourceManager.GetString("Analyzer_TypeCohesion_Tooltip", resourceCulture); + return ResourceManager.GetString("ArchitecturalRules_ClearConfirm_Message", resourceCulture); } } - + /// - /// Looks up a localized string similar to No classes with separable partitions found. + /// Looks up a localized string similar to Confirm Clear. /// - public static string Analyzer_TypeCohesion_NoData { + public static string ArchitecturalRules_ClearConfirm_Title { get { - return ResourceManager.GetString("Analyzer_TypeCohesion_NoData", resourceCulture); + return ResourceManager.GetString("ArchitecturalRules_ClearConfirm_Title", resourceCulture); } } - + /// - /// Looks up a localized string similar to Method Complexity. + /// Looks up a localized string similar to Load rules. /// - public static string Analyzer_MethodComplexity_Label { + public static string ArchitecturalRules_LoadDialog_Title { get { - return ResourceManager.GetString("Analyzer_MethodComplexity_Label", resourceCulture); + return ResourceManager.GetString("ArchitecturalRules_LoadDialog_Title", resourceCulture); } } - + /// - /// Looks up a localized string similar to Lines of code and cyclomatic complexity per method. Requires 'Collect source metrics on import' to be enabled before importing.. + /// Looks up a localized string similar to Error loading file: {0}. /// - public static string Analyzer_MethodComplexity_Tooltip { + public static string ArchitecturalRules_LoadFileError_Message { get { - return ResourceManager.GetString("Analyzer_MethodComplexity_Tooltip", resourceCulture); + return ResourceManager.GetString("ArchitecturalRules_LoadFileError_Message", resourceCulture); } } - + /// - /// Looks up a localized string similar to No source metrics available. Enable 'Collect source metrics on import' in the settings and re-import the solution.. + /// Looks up a localized string similar to Save rules. /// - public static string Analyzer_MethodComplexity_NoData { + public static string ArchitecturalRules_SaveDialog_Title { get { - return ResourceManager.GetString("Analyzer_MethodComplexity_NoData", resourceCulture); + return ResourceManager.GetString("ArchitecturalRules_SaveDialog_Title", resourceCulture); } } - + /// - /// Looks up a localized string similar to Rule text cannot be empty. + /// Looks up a localized string similar to Error saving file: {0}. /// - public static string Analyzer_Empty_Rule { + public static string ArchitecturalRules_SaveFileError_Message { get { - return ResourceManager.GetString("Analyzer_Empty_Rule", resourceCulture); + return ResourceManager.GetString("ArchitecturalRules_SaveFileError_Message", resourceCulture); } } - + /// - /// Looks up a localized string similar to Rule Type. + /// Looks up a localized string similar to Rules saved successfully!. /// - public static string Column_ArchitecturalRules_RuleType { + public static string ArchitecturalRules_SaveFileSuccess_Message { get { - return ResourceManager.GetString("Column_ArchitecturalRules_RuleType", resourceCulture); + return ResourceManager.GetString("ArchitecturalRules_SaveFileSuccess_Message", resourceCulture); } } - + /// - /// Looks up a localized string similar to Source. + /// Looks up a localized string similar to Architectural rules configuration. /// - public static string Column_ArchitecturalRules_Source { + public static string ArchitecturalRules_Title { get { - return ResourceManager.GetString("Column_ArchitecturalRules_Source", resourceCulture); + return ResourceManager.GetString("ArchitecturalRules_Title", resourceCulture); } } - - /// - /// Looks up a localized string similar to Target. + + /// + /// Looks up a localized string similar to Three rules are supported: + /// + ///DENY: Forbids dependencies from source to target + ///RESTRICT: Allows only specified dependencies + ///ISOLATE: Completely isolates the source from external dependencies + /// + ///Patterns: + ///MyApp.Business → exact match + ///MyApp.Business.* → element + direct children + ///MyApp.Business.** → element + all descendants + /// + ///Examples: + ///DENY: MyApp.Business.** -> MyApp.Data.** + ///RESTRICT: MyApp.Controllers.** -> MyApp.Services.** + ///ISOLATE: MyApp.Domain.**. /// - public static string Column_ArchitecturalRules_Target { + public static string ArchitectureRules_Info { get { - return ResourceManager.GetString("Column_ArchitecturalRules_Target", resourceCulture); + return ResourceManager.GetString("ArchitectureRules_Info", resourceCulture); } } - + /// - /// Looks up a localized string similar to Violations. + /// Looks up a localized string similar to _Close. /// - public static string Column_ArchitecturalRules_Violations { + public static string Close_Button { get { - return ResourceManager.GetString("Column_ArchitecturalRules_Violations", resourceCulture); + return ResourceManager.GetString("Close_Button", resourceCulture); } } - + /// - /// Looks up a localized string similar to Class. + /// Looks up a localized string similar to (!) Invalid relationship with missing elements.. /// - public static string Column_TypeCohesion_Class { + public static string Cmd_InvalidRelationship { get { - return ResourceManager.GetString("Column_TypeCohesion_Class", resourceCulture); + return ResourceManager.GetString("Cmd_InvalidRelationship", resourceCulture); } } - + /// - /// Looks up a localized string similar to Partitions. + /// Looks up a localized string similar to No rule violations found.. /// - public static string Column_TypeCohesion_Partitions { + public static string Cmd_NoRuleViolations { get { - return ResourceManager.GetString("Column_TypeCohesion_Partitions", resourceCulture); + return ResourceManager.GetString("Cmd_NoRuleViolations", resourceCulture); } } - + /// - /// Looks up a localized string similar to Members. + /// Looks up a localized string similar to - Rule Type: {0}. /// - public static string Column_TypeCohesion_Members { + public static string Cmd_RuleTypeLine { get { - return ResourceManager.GetString("Column_TypeCohesion_Members", resourceCulture); + return ResourceManager.GetString("Cmd_RuleTypeLine", resourceCulture); } } - + /// - /// Looks up a localized string similar to Largest %. + /// Looks up a localized string similar to Violations. /// - public static string Column_TypeCohesion_LargestPartition { + public static string Cmd_ViolationsHeader { get { - return ResourceManager.GetString("Column_TypeCohesion_LargestPartition", resourceCulture); + return ResourceManager.GetString("Cmd_ViolationsHeader", resourceCulture); } } - + /// - /// Looks up a localized string similar to Method. + /// Looks up a localized string similar to Rule Type. /// - public static string Column_MethodComplexity_Method { + public static string Column_ArchitecturalRules_RuleType { get { - return ResourceManager.GetString("Column_MethodComplexity_Method", resourceCulture); + return ResourceManager.GetString("Column_ArchitecturalRules_RuleType", resourceCulture); } } - + /// - /// Looks up a localized string similar to Code. + /// Looks up a localized string similar to Source. /// - public static string Column_MethodComplexity_Code { + public static string Column_ArchitecturalRules_Source { get { - return ResourceManager.GetString("Column_MethodComplexity_Code", resourceCulture); + return ResourceManager.GetString("Column_ArchitecturalRules_Source", resourceCulture); } } - + /// - /// Looks up a localized string similar to Statements. + /// Looks up a localized string similar to Target. /// - public static string Column_MethodComplexity_Statements { + public static string Column_ArchitecturalRules_Target { get { - return ResourceManager.GetString("Column_MethodComplexity_Statements", resourceCulture); + return ResourceManager.GetString("Column_ArchitecturalRules_Target", resourceCulture); } } - + /// - /// Looks up a localized string similar to Comments. + /// Looks up a localized string similar to Violations. /// - public static string Column_MethodComplexity_Comments { + public static string Column_ArchitecturalRules_Violations { get { - return ResourceManager.GetString("Column_MethodComplexity_Comments", resourceCulture); + return ResourceManager.GetString("Column_ArchitecturalRules_Violations", resourceCulture); } } - + /// - /// Looks up a localized string similar to Comment %. + /// Looks up a localized string similar to Event handler (possible errors). /// - public static string Column_MethodComplexity_CommentRatio { + public static string Column_EventRegistration_Header { get { - return ResourceManager.GetString("Column_MethodComplexity_CommentRatio", resourceCulture); + return ResourceManager.GetString("Column_EventRegistration_Header", resourceCulture); } } - + /// - /// Looks up a localized string similar to Complexity. + /// Looks up a localized string similar to Code. /// - public static string Column_MethodComplexity_Complexity { + public static string Column_MethodComplexity_Code { get { - return ResourceManager.GetString("Column_MethodComplexity_Complexity", resourceCulture); + return ResourceManager.GetString("Column_MethodComplexity_Code", resourceCulture); } } - + /// - /// Looks up a localized string similar to #. + /// Looks up a localized string similar to Comment %. /// - public static string Column_TypeDependencies_Rank { + public static string Column_MethodComplexity_CommentRatio { get { - return ResourceManager.GetString("Column_TypeDependencies_Rank", resourceCulture); + return ResourceManager.GetString("Column_MethodComplexity_CommentRatio", resourceCulture); } } - + /// - /// Looks up a localized string similar to Type. + /// Looks up a localized string similar to Comments. /// - public static string Column_TypeDependencies_Element { + public static string Column_MethodComplexity_Comments { get { - return ResourceManager.GetString("Column_TypeDependencies_Element", resourceCulture); + return ResourceManager.GetString("Column_MethodComplexity_Comments", resourceCulture); } } - + /// - /// Looks up a localized string similar to Fan-in. + /// Looks up a localized string similar to Complexity. /// - public static string Column_TypeDependencies_FanIn { + public static string Column_MethodComplexity_Complexity { get { - return ResourceManager.GetString("Column_TypeDependencies_FanIn", resourceCulture); + return ResourceManager.GetString("Column_MethodComplexity_Complexity", resourceCulture); } } - + /// - /// Looks up a localized string similar to Fan-out. + /// Looks up a localized string similar to Method. /// - public static string Column_TypeDependencies_FanOut { + public static string Column_MethodComplexity_Method { get { - return ResourceManager.GetString("Column_TypeDependencies_FanOut", resourceCulture); + return ResourceManager.GetString("Column_MethodComplexity_Method", resourceCulture); } } - + /// - /// Looks up a localized string similar to Blast radius. + /// Looks up a localized string similar to Statements. /// - public static string Column_TypeDependencies_BlastRadius { + public static string Column_MethodComplexity_Statements { get { - return ResourceManager.GetString("Column_TypeDependencies_BlastRadius", resourceCulture); + return ResourceManager.GetString("Column_MethodComplexity_Statements", resourceCulture); } } - + /// - /// Looks up a localized string similar to Score. + /// Looks up a localized string similar to Class. /// - public static string Column_TypeDependencies_Score { + public static string Column_TypeCohesion_Class { get { - return ResourceManager.GetString("Column_TypeDependencies_Score", resourceCulture); + return ResourceManager.GetString("Column_TypeCohesion_Class", resourceCulture); } } - + /// - /// Looks up a localized string similar to Event handler (possible errors). + /// Looks up a localized string similar to Largest %. /// - public static string Column_EventRegistration_Header { + public static string Column_TypeCohesion_LargestPartition { get { - return ResourceManager.GetString("Column_EventRegistration_Header", resourceCulture); + return ResourceManager.GetString("Column_TypeCohesion_LargestPartition", resourceCulture); } } - + /// - /// Looks up a localized string similar to Show partitions. + /// Looks up a localized string similar to Members. /// - public static string ShowPartitions { + public static string Column_TypeCohesion_Members { get { - return ResourceManager.GetString("ShowPartitions", resourceCulture); + return ResourceManager.GetString("Column_TypeCohesion_Members", resourceCulture); } } - + /// - /// Looks up a localized string similar to Success. + /// Looks up a localized string similar to Partitions. /// - public static string Success_Title { + public static string Column_TypeCohesion_Partitions { get { - return ResourceManager.GetString("Success_Title", resourceCulture); + return ResourceManager.GetString("Column_TypeCohesion_Partitions", resourceCulture); } } - + /// - /// Looks up a localized string similar to Save/_Validate. + /// Looks up a localized string similar to Blast radius. /// - public static string Validate { + public static string Column_TypeDependencies_BlastRadius { get { - return ResourceManager.GetString("Validate", resourceCulture); + return ResourceManager.GetString("Column_TypeDependencies_BlastRadius", resourceCulture); } } - + /// - /// Looks up a localized string similar to No rule violations found.. + /// Looks up a localized string similar to Type. /// - public static string Cmd_NoRuleViolations { + public static string Column_TypeDependencies_Element { get { - return ResourceManager.GetString("Cmd_NoRuleViolations", resourceCulture); + return ResourceManager.GetString("Column_TypeDependencies_Element", resourceCulture); } } - + /// - /// Looks up a localized string similar to Violations. + /// Looks up a localized string similar to Fan-in. /// - public static string Cmd_ViolationsHeader { + public static string Column_TypeDependencies_FanIn { get { - return ResourceManager.GetString("Cmd_ViolationsHeader", resourceCulture); + return ResourceManager.GetString("Column_TypeDependencies_FanIn", resourceCulture); } } - + /// - /// Looks up a localized string similar to - Rule Type: {0}. + /// Looks up a localized string similar to Fan-out. /// - public static string Cmd_RuleTypeLine { + public static string Column_TypeDependencies_FanOut { get { - return ResourceManager.GetString("Cmd_RuleTypeLine", resourceCulture); + return ResourceManager.GetString("Column_TypeDependencies_FanOut", resourceCulture); } } - + /// - /// Looks up a localized string similar to (!) Invalid relationship with missing elements.. + /// Looks up a localized string similar to #. /// - public static string Cmd_InvalidRelationship { + public static string Column_TypeDependencies_Rank { get { - return ResourceManager.GetString("Cmd_InvalidRelationship", resourceCulture); + return ResourceManager.GetString("Column_TypeDependencies_Rank", resourceCulture); } } - + /// - /// Looks up a localized string similar to Architectural rules configuration. + /// Looks up a localized string similar to Score. /// - public static string ArchitecturalRules_Title { + public static string Column_TypeDependencies_Score { get { - return ResourceManager.GetString("ArchitecturalRules_Title", resourceCulture); + return ResourceManager.GetString("Column_TypeDependencies_Score", resourceCulture); } } - + /// - /// Looks up a localized string similar to Define the architectural rules for your solution:. + /// Looks up a localized string similar to Show in Code Explorer. /// - public static string Rules_Header { + public static string CopyToExplorerGraph_MenuItem { get { - return ResourceManager.GetString("Rules_Header", resourceCulture); + return ResourceManager.GetString("CopyToExplorerGraph_MenuItem", resourceCulture); } } - + /// - /// Looks up a localized string similar to Rules definition. + /// Looks up a localized string similar to Error. /// - public static string Rules_RuleDefinition { + public static string Error_Title { get { - return ResourceManager.GetString("Rules_RuleDefinition", resourceCulture); + return ResourceManager.GetString("Error_Title", resourceCulture); } } - + /// - /// Looks up a localized string similar to _Load from file.... + /// Looks up a localized string similar to Jump to code. /// - public static string Rules_LoadFromFile { + public static string JumpToCode { get { - return ResourceManager.GetString("Rules_LoadFromFile", resourceCulture); + return ResourceManager.GetString("JumpToCode", resourceCulture); } } - + /// - /// Looks up a localized string similar to _Save to file.... + /// Looks up a localized string similar to Operation failed: {0}. /// - public static string Rules_SaveToFile { + public static string OperationFailed_Message { get { - return ResourceManager.GetString("Rules_SaveToFile", resourceCulture); + return ResourceManager.GetString("OperationFailed_Message", resourceCulture); } } - + /// /// Looks up a localized string similar to _Clear. /// @@ -563,76 +586,67 @@ public static string Rules_Clear { return ResourceManager.GetString("Rules_Clear", resourceCulture); } } - - /// - /// Looks up a localized string similar to Three rules are supported: DENY, RESTRICT, ISOLATE, with pattern and example info. - /// - public static string ArchitectureRules_Info { - get { - return ResourceManager.GetString("ArchitectureRules_Info", resourceCulture); - } - } - + /// - /// Looks up a localized string similar to Load rules. + /// Looks up a localized string similar to Define the architectural rules for your solution:. /// - public static string ArchitecturalRules_LoadDialog_Title { + public static string Rules_Header { get { - return ResourceManager.GetString("ArchitecturalRules_LoadDialog_Title", resourceCulture); + return ResourceManager.GetString("Rules_Header", resourceCulture); } } - + /// - /// Looks up a localized string similar to Save rules. + /// Looks up a localized string similar to _Load from file.... /// - public static string ArchitecturalRules_SaveDialog_Title { + public static string Rules_LoadFromFile { get { - return ResourceManager.GetString("ArchitecturalRules_SaveDialog_Title", resourceCulture); + return ResourceManager.GetString("Rules_LoadFromFile", resourceCulture); } } - + /// - /// Looks up a localized string similar to Error loading file: {0}. + /// Looks up a localized string similar to Rules definition. /// - public static string ArchitecturalRules_LoadFileError_Message { + public static string Rules_RuleDefinition { get { - return ResourceManager.GetString("ArchitecturalRules_LoadFileError_Message", resourceCulture); + return ResourceManager.GetString("Rules_RuleDefinition", resourceCulture); } } - + /// - /// Looks up a localized string similar to Error saving file: {0}. + /// Looks up a localized string similar to _Save to file.... /// - public static string ArchitecturalRules_SaveFileError_Message { + public static string Rules_SaveToFile { get { - return ResourceManager.GetString("ArchitecturalRules_SaveFileError_Message", resourceCulture); + return ResourceManager.GetString("Rules_SaveToFile", resourceCulture); } } - + /// - /// Looks up a localized string similar to Rules saved successfully!. + /// Looks up a localized string similar to Show partitions. /// - public static string ArchitecturalRules_SaveFileSuccess_Message { + public static string ShowPartitions { get { - return ResourceManager.GetString("ArchitecturalRules_SaveFileSuccess_Message", resourceCulture); + return ResourceManager.GetString("ShowPartitions", resourceCulture); } } - + /// - /// Looks up a localized string similar to Are you sure you want to clear all rules?. + /// Looks up a localized string similar to Success. /// - public static string ArchitecturalRules_ClearConfirm_Message { + public static string Success_Title { get { - return ResourceManager.GetString("ArchitecturalRules_ClearConfirm_Message", resourceCulture); + return ResourceManager.GetString("Success_Title", resourceCulture); } } - + /// - /// Looks up a localized string similar to Confirm Clear. + /// Looks up a localized string similar to Save/_Validate. /// - public static string ArchitecturalRules_ClearConfirm_Title { + public static string Validate { get { - return ResourceManager.GetString("ArchitecturalRules_ClearConfirm_Title", resourceCulture); + return ResourceManager.GetString("Validate", resourceCulture); } } } diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/Resources/Strings.resx b/CSharpCodeAnalyst.Analyzers/Resources/Strings.resx similarity index 100% rename from CSharpCodeAnalyst.Analyzers/Features/Analyzers/Resources/Strings.resx rename to CSharpCodeAnalyst.Analyzers/Resources/Strings.resx diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeCohesion/Analyzer.cs b/CSharpCodeAnalyst.Analyzers/TypeCohesion/Analyzer.cs similarity index 75% rename from CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeCohesion/Analyzer.cs rename to CSharpCodeAnalyst.Analyzers/TypeCohesion/Analyzer.cs index 0b404f21..0514ba06 100644 --- a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeCohesion/Analyzer.cs +++ b/CSharpCodeAnalyst.Analyzers/TypeCohesion/Analyzer.cs @@ -1,11 +1,11 @@ using CodeGraph.Algorithms.Partitioning; -using CSharpCodeAnalyst.Features.Analyzers.TypeCohesion.Presentation; -using CSharpCodeAnalyst.Features.Analyzers.Resources; +using CSharpCodeAnalyst.Analyzers.TypeCohesion.Presentation; +using CSharpCodeAnalyst.Analyzers.Resources; using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.Messages; -using CSharpCodeAnalyst.Shared.UI; +using CSharpCodeAnalyst.Shared.Notifications; -namespace CSharpCodeAnalyst.Features.Analyzers.TypeCohesion; +namespace CSharpCodeAnalyst.Analyzers.TypeCohesion; /// /// Flags classes whose members fall into several independent groups (partitions) and are @@ -14,10 +14,12 @@ namespace CSharpCodeAnalyst.Features.Analyzers.TypeCohesion; public class Analyzer : IAnalyzer { private readonly IPublisher _messaging; + private readonly IUserNotification _userNotification; - public Analyzer(IPublisher messaging) + public Analyzer(IPublisher messaging, IUserNotification userNotification) { _messaging = messaging; + _userNotification = userNotification; } public string Id { get; } = "TypeCohesion"; @@ -30,7 +32,7 @@ public void Analyze(CodeGraph.Graph.CodeGraph graph) if (results.Count == 0) { - ToastManager.ShowInfo(Strings.Analyzer_TypeCohesion_NoData); + _userNotification.ShowSuccess(Strings.Analyzer_TypeCohesion_NoData); return; } diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeCohesion/Presentation/TypeCohesionRowViewModel.cs b/CSharpCodeAnalyst.Analyzers/TypeCohesion/Presentation/TypeCohesionRowViewModel.cs similarity index 93% rename from CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeCohesion/Presentation/TypeCohesionRowViewModel.cs rename to CSharpCodeAnalyst.Analyzers/TypeCohesion/Presentation/TypeCohesionRowViewModel.cs index d11365c6..1f5370ac 100644 --- a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeCohesion/Presentation/TypeCohesionRowViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/TypeCohesion/Presentation/TypeCohesionRowViewModel.cs @@ -3,7 +3,7 @@ using CodeGraph.Graph; using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; -namespace CSharpCodeAnalyst.Features.Analyzers.TypeCohesion.Presentation; +namespace CSharpCodeAnalyst.Analyzers.TypeCohesion.Presentation; public class TypeCohesionRowViewModel : TableRow { diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeCohesion/Presentation/TypeCohesionViewModel.cs b/CSharpCodeAnalyst.Analyzers/TypeCohesion/Presentation/TypeCohesionViewModel.cs similarity index 92% rename from CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeCohesion/Presentation/TypeCohesionViewModel.cs rename to CSharpCodeAnalyst.Analyzers/TypeCohesion/Presentation/TypeCohesionViewModel.cs index 58df3db5..96dc2a5e 100644 --- a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeCohesion/Presentation/TypeCohesionViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/TypeCohesion/Presentation/TypeCohesionViewModel.cs @@ -1,15 +1,14 @@ using System.Collections.ObjectModel; using System.Windows; using CodeGraph.Algorithms.Partitioning; -using CSharpCodeAnalyst.Features.Analyzers.Resources; +using CSharpCodeAnalyst.Analyzers.Resources; using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; using CSharpCodeAnalyst.Shared.Messages; using CSharpCodeAnalyst.Shared.Search; -using CSharpCodeAnalyst.Shared.Services; using CSharpCodeAnalyst.Shared.Wpf; -namespace CSharpCodeAnalyst.Features.Analyzers.TypeCohesion.Presentation; +namespace CSharpCodeAnalyst.Analyzers.TypeCohesion.Presentation; internal class TypeCohesionViewModel : Table { @@ -112,8 +111,8 @@ private static bool CanJumpToCode(TypeCohesionRowViewModel row) return row.Element.SourceLocations.Count > 0; } - private static void JumpToCode(TypeCohesionRowViewModel row) + private void JumpToCode(TypeCohesionRowViewModel row) { - SourceLocationNavigator.Open(row.Element.SourceLocations[0]); + _messaging.Publish(new OpenSourceLocationRequest(row.Element.SourceLocations[0])); } } diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeDependencies/Analyzer.cs b/CSharpCodeAnalyst.Analyzers/TypeDependencies/Analyzer.cs similarity index 75% rename from CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeDependencies/Analyzer.cs rename to CSharpCodeAnalyst.Analyzers/TypeDependencies/Analyzer.cs index 8a83f144..4ebee0d1 100644 --- a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeDependencies/Analyzer.cs +++ b/CSharpCodeAnalyst.Analyzers/TypeDependencies/Analyzer.cs @@ -1,11 +1,11 @@ using CodeGraph.Algorithms.Metrics; -using CSharpCodeAnalyst.Features.Analyzers.TypeDependencies.Presentation; -using CSharpCodeAnalyst.Features.Analyzers.Resources; +using CSharpCodeAnalyst.Analyzers.TypeDependencies.Presentation; +using CSharpCodeAnalyst.Analyzers.Resources; using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.Messages; -using CSharpCodeAnalyst.Shared.UI; +using CSharpCodeAnalyst.Shared.Notifications; -namespace CSharpCodeAnalyst.Features.Analyzers.TypeDependencies; +namespace CSharpCodeAnalyst.Analyzers.TypeDependencies; /// /// Describes how each type sits in the dependency structure (fan-in, fan-out, blast radius and @@ -14,10 +14,12 @@ namespace CSharpCodeAnalyst.Features.Analyzers.TypeDependencies; public class Analyzer : IAnalyzer { private readonly IPublisher _messaging; + private readonly IUserNotification _userNotification; - public Analyzer(IPublisher messaging) + public Analyzer(IPublisher messaging, IUserNotification userNotification) { _messaging = messaging; + _userNotification = userNotification; } public string Id { get; } = "TypeDependencies"; @@ -30,7 +32,7 @@ public void Analyze(CodeGraph.Graph.CodeGraph graph) if (results.Count == 0) { - ToastManager.ShowInfo(Strings.Analyzer_TypeDependencies_NoData); + _userNotification.ShowSuccess(Strings.Analyzer_TypeDependencies_NoData); return; } diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeDependencies/Presentation/TypeDependenciesViewModel.cs b/CSharpCodeAnalyst.Analyzers/TypeDependencies/Presentation/TypeDependenciesViewModel.cs similarity index 93% rename from CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeDependencies/Presentation/TypeDependenciesViewModel.cs rename to CSharpCodeAnalyst.Analyzers/TypeDependencies/Presentation/TypeDependenciesViewModel.cs index 0c717e91..2c1803fb 100644 --- a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeDependencies/Presentation/TypeDependenciesViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/TypeDependencies/Presentation/TypeDependenciesViewModel.cs @@ -1,15 +1,14 @@ using System.Collections.ObjectModel; using System.Windows; using CodeGraph.Algorithms.Metrics; -using CSharpCodeAnalyst.Features.Analyzers.Resources; +using CSharpCodeAnalyst.Analyzers.Resources; using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; using CSharpCodeAnalyst.Shared.Messages; using CSharpCodeAnalyst.Shared.Search; -using CSharpCodeAnalyst.Shared.Services; using CSharpCodeAnalyst.Shared.Wpf; -namespace CSharpCodeAnalyst.Features.Analyzers.TypeDependencies.Presentation; +namespace CSharpCodeAnalyst.Analyzers.TypeDependencies.Presentation; internal class TypeDependenciesViewModel : Table { @@ -130,8 +129,8 @@ private static bool CanJumpToCode(TypeDependencyViewModel row) return row.Element.SourceLocations.Count > 0; } - private static void JumpToCode(TypeDependencyViewModel row) + private void JumpToCode(TypeDependencyViewModel row) { - SourceLocationNavigator.Open(row.Element.SourceLocations[0]); + _messaging.Publish(new OpenSourceLocationRequest(row.Element.SourceLocations[0])); } } diff --git a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeDependencies/Presentation/TypeDependencyViewModel.cs b/CSharpCodeAnalyst.Analyzers/TypeDependencies/Presentation/TypeDependencyViewModel.cs similarity index 93% rename from CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeDependencies/Presentation/TypeDependencyViewModel.cs rename to CSharpCodeAnalyst.Analyzers/TypeDependencies/Presentation/TypeDependencyViewModel.cs index 3a69bd55..62f87d17 100644 --- a/CSharpCodeAnalyst.Analyzers/Features/Analyzers/TypeDependencies/Presentation/TypeDependencyViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/TypeDependencies/Presentation/TypeDependencyViewModel.cs @@ -3,7 +3,7 @@ using CodeGraph.Graph; using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; -namespace CSharpCodeAnalyst.Features.Analyzers.TypeDependencies.Presentation; +namespace CSharpCodeAnalyst.Analyzers.TypeDependencies.Presentation; public class TypeDependencyViewModel : TableRow { diff --git a/CSharpCodeAnalyst/App.xaml.cs b/CSharpCodeAnalyst/App.xaml.cs index 4a303a92..b96b594e 100644 --- a/CSharpCodeAnalyst/App.xaml.cs +++ b/CSharpCodeAnalyst/App.xaml.cs @@ -13,6 +13,7 @@ using CSharpCodeAnalyst.Features.Tree; using CSharpCodeAnalyst.Shared.Messages; using CSharpCodeAnalyst.Shared.Notifications; +using CSharpCodeAnalyst.Shared.Services; using Microsoft.Extensions.Configuration; namespace CSharpCodeAnalyst; @@ -143,6 +144,7 @@ private void StartUi() messaging.Subscribe(viewModel.HandleCycleCalculationComplete); messaging.Subscribe(viewModel.HandleShowPartitionsRequest); messaging.Subscribe(viewModel.HandleShowCycleGroupRequest); + messaging.Subscribe(r => SourceLocationNavigator.Open(r.Location)); // Refactorings are forwarded to all other view models diff --git a/CSharpCodeAnalyst/CommandLine/ConsoleValidationCommand.cs b/CSharpCodeAnalyst/CommandLine/ConsoleValidationCommand.cs index f935b196..b048f226 100644 --- a/CSharpCodeAnalyst/CommandLine/ConsoleValidationCommand.cs +++ b/CSharpCodeAnalyst/CommandLine/ConsoleValidationCommand.cs @@ -4,7 +4,7 @@ using CodeParser.Parser; using CodeParser.Parser.Config; using CSharpCodeAnalyst.Configuration; -using CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules; +using CSharpCodeAnalyst.Analyzers.ArchitecturalRules; using CSharpCodeAnalyst.Resources; using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.Messages; diff --git a/CSharpCodeAnalyst/Features/Analyzers/AnalyzerManager.cs b/CSharpCodeAnalyst/Features/Analyzers/AnalyzerManager.cs index 1ed071d9..e188a785 100644 --- a/CSharpCodeAnalyst/Features/Analyzers/AnalyzerManager.cs +++ b/CSharpCodeAnalyst/Features/Analyzers/AnalyzerManager.cs @@ -1,7 +1,11 @@ using CodeGraph.Metrics; -using CSharpCodeAnalyst.Features.Analyzers.EventRegistration; +using CSharpCodeAnalyst.Analyzers.EventRegistration; using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.Notifications; +using ArchitecturalRules = CSharpCodeAnalyst.Analyzers.ArchitecturalRules; +using MethodComplexity = CSharpCodeAnalyst.Analyzers.MethodComplexity; +using TypeCohesion = CSharpCodeAnalyst.Analyzers.TypeCohesion; +using TypeDependencies = CSharpCodeAnalyst.Analyzers.TypeDependencies; namespace CSharpCodeAnalyst.Features.Analyzers; @@ -63,7 +67,7 @@ public void LoadAnalyzers(IPublisher messaging, IUserNotification userNotificati { _analyzers.Clear(); - IAnalyzer analyzer = new Analyzer(messaging); + IAnalyzer analyzer = new Analyzer(messaging, userNotification); analyzer.DataChanged += (_, _) => RaiseAnalyzerDataChanged(); _analyzers.Add(analyzer.Id, analyzer); @@ -71,15 +75,15 @@ public void LoadAnalyzers(IPublisher messaging, IUserNotification userNotificati analyzer.DataChanged += (_, _) => RaiseAnalyzerDataChanged(); _analyzers.Add(analyzer.Id, analyzer); - analyzer = new TypeDependencies.Analyzer(messaging); + analyzer = new TypeDependencies.Analyzer(messaging, userNotification); analyzer.DataChanged += (_, _) => RaiseAnalyzerDataChanged(); _analyzers.Add(analyzer.Id, analyzer); - analyzer = new TypeCohesion.Analyzer(messaging); + analyzer = new TypeCohesion.Analyzer(messaging, userNotification); analyzer.DataChanged += (_, _) => RaiseAnalyzerDataChanged(); _analyzers.Add(analyzer.Id, analyzer); - analyzer = new MethodComplexity.Analyzer(messaging, metricStore); + analyzer = new MethodComplexity.Analyzer(messaging, userNotification, metricStore); analyzer.DataChanged += (_, _) => RaiseAnalyzerDataChanged(); _analyzers.Add(analyzer.Id, analyzer); } diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Services/SourceLocationNavigator.cs b/CSharpCodeAnalyst/Shared/Services/SourceLocationNavigator.cs similarity index 97% rename from CSharpCodeAnalyst.AnalyzerSdk/Shared/Services/SourceLocationNavigator.cs rename to CSharpCodeAnalyst/Shared/Services/SourceLocationNavigator.cs index f81a4cdc..d7800a16 100644 --- a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Services/SourceLocationNavigator.cs +++ b/CSharpCodeAnalyst/Shared/Services/SourceLocationNavigator.cs @@ -3,7 +3,7 @@ using System.Runtime.InteropServices; using System.Windows; using CodeGraph.Graph; -using CSharpCodeAnalyst.Shared.Resources; +using CSharpCodeAnalyst.Resources; namespace CSharpCodeAnalyst.Shared.Services; @@ -75,8 +75,8 @@ public static void Open(SourceLocation location) } catch (Exception ex) { - var message = string.Format(SdkStrings.OperationFailed_Message, ex.Message); - MessageBox.Show(message, SdkStrings.Error_Title, MessageBoxButton.OK, MessageBoxImage.Error); + var message = string.Format(Strings.OperationFailed_Message, ex.Message); + MessageBox.Show(message, Strings.Error_Title, MessageBoxButton.OK, MessageBoxImage.Error); } } diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/UI/ToastManager.cs b/CSharpCodeAnalyst/Shared/UI/ToastManager.cs similarity index 100% rename from CSharpCodeAnalyst.AnalyzerSdk/Shared/UI/ToastManager.cs rename to CSharpCodeAnalyst/Shared/UI/ToastManager.cs diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/UI/ToastNotification.xaml b/CSharpCodeAnalyst/Shared/UI/ToastNotification.xaml similarity index 88% rename from CSharpCodeAnalyst.AnalyzerSdk/Shared/UI/ToastNotification.xaml rename to CSharpCodeAnalyst/Shared/UI/ToastNotification.xaml index d4076f38..941de6c8 100644 --- a/CSharpCodeAnalyst.AnalyzerSdk/Shared/UI/ToastNotification.xaml +++ b/CSharpCodeAnalyst/Shared/UI/ToastNotification.xaml @@ -1,7 +1,6 @@ diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/UI/ToastNotification.xaml.cs b/CSharpCodeAnalyst/Shared/UI/ToastNotification.xaml.cs similarity index 100% rename from CSharpCodeAnalyst.AnalyzerSdk/Shared/UI/ToastNotification.xaml.cs rename to CSharpCodeAnalyst/Shared/UI/ToastNotification.xaml.cs diff --git a/Tests/UnitTests/ArchitecturalRules/AnalyzerIntegrationTests.cs b/Tests/UnitTests/ArchitecturalRules/AnalyzerIntegrationTests.cs index 205fb0a0..5b62b37f 100644 --- a/Tests/UnitTests/ArchitecturalRules/AnalyzerIntegrationTests.cs +++ b/Tests/UnitTests/ArchitecturalRules/AnalyzerIntegrationTests.cs @@ -1,7 +1,7 @@ using CodeGraph.Graph; using CodeParserTests.Helper; -using CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules; -using CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Rules; +using CSharpCodeAnalyst.Analyzers.ArchitecturalRules; +using CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Rules; namespace CodeParserTests.UnitTests.ArchitecturalRules; diff --git a/Tests/UnitTests/ArchitecturalRules/PatternMatcherTests.cs b/Tests/UnitTests/ArchitecturalRules/PatternMatcherTests.cs index eb113ac5..63e8f0f7 100644 --- a/Tests/UnitTests/ArchitecturalRules/PatternMatcherTests.cs +++ b/Tests/UnitTests/ArchitecturalRules/PatternMatcherTests.cs @@ -1,5 +1,5 @@ using CodeParserTests.Helper; -using CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules; +using CSharpCodeAnalyst.Analyzers.ArchitecturalRules; namespace CodeParserTests.UnitTests.ArchitecturalRules; diff --git a/Tests/UnitTests/ArchitecturalRules/RuleParserTests.cs b/Tests/UnitTests/ArchitecturalRules/RuleParserTests.cs index a5059453..00cb892a 100644 --- a/Tests/UnitTests/ArchitecturalRules/RuleParserTests.cs +++ b/Tests/UnitTests/ArchitecturalRules/RuleParserTests.cs @@ -1,5 +1,5 @@ -using CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules; -using CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Rules; +using CSharpCodeAnalyst.Analyzers.ArchitecturalRules; +using CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Rules; namespace CodeParserTests.UnitTests.ArchitecturalRules; diff --git a/Tests/UnitTests/ArchitecturalRules/RuleValidationTests.cs b/Tests/UnitTests/ArchitecturalRules/RuleValidationTests.cs index 2a26c0ed..81cb4a95 100644 --- a/Tests/UnitTests/ArchitecturalRules/RuleValidationTests.cs +++ b/Tests/UnitTests/ArchitecturalRules/RuleValidationTests.cs @@ -1,6 +1,6 @@ using CodeGraph.Graph; using CodeParserTests.Helper; -using CSharpCodeAnalyst.Features.Analyzers.ArchitecturalRules.Rules; +using CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Rules; namespace CodeParserTests.UnitTests.ArchitecturalRules; From 53548e37851accc5b97868bbdd88b98250dda824 Mon Sep 17 00:00:00 2001 From: ATrefzer <36333177+ATrefzer@users.noreply.github.com> Date: Fri, 3 Jul 2026 20:16:51 +0200 Subject: [PATCH 3/9] Fix dirty bog --- .../ArchitecturalRules/Analyzer.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Analyzer.cs b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Analyzer.cs index db17ddf2..f668208f 100644 --- a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Analyzer.cs +++ b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Analyzer.cs @@ -115,8 +115,10 @@ public void SetPersistentData(string? data) var persistentData = JsonSerializer.Deserialize(data); if (persistentData != null) { - var rulesText = persistentData.RulesText ?? string.Empty; - ParseAndStoreRules(rulesText); + // Set directly instead of going through ParseAndStoreRules: loading a saved + // project is not a user edit and must not mark the analyzer dirty. + _rulesText = persistentData.RulesText ?? string.Empty; + _rules = RuleParser.ParseRules(_rulesText); } } catch (Exception ex) @@ -127,6 +129,8 @@ public void SetPersistentData(string? data) _rulesText = string.Empty; _rules.Clear(); } + + SetDirty(false); } public bool IsDirty() From 7345f268e86602675a26c73a18b5ba4a673e4b39 Mon Sep 17 00:00:00 2001 From: ATrefzer <36333177+ATrefzer@users.noreply.github.com> Date: Fri, 3 Jul 2026 20:39:51 +0200 Subject: [PATCH 4/9] Adjust namespaces --- ApprovalTestTool/ApprovalTestTool.csproj | 4 +- ApprovalTestTool/Program.cs | 4 +- .../CSharpCodeAnalyst.AnalyzerSdk.csproj | 2 +- .../Shared/Messages/AddNodeToGraphRequest.cs | 2 +- .../Messages/OpenSourceLocationRequest.cs | 2 +- .../Shared/Messages/ShowPartitionsRequest.cs | 2 +- .../Shared/Search/SearchExpression.cs | 2 +- .../ArchitecturalRules/Analyzer.cs | 2 +- .../ArchitecturalRules/PatternMatcher.cs | 2 +- .../Presentation/RelationshipViewModel.cs | 2 +- .../ArchitecturalRules/Rules/DenyRule.cs | 2 +- .../ArchitecturalRules/Rules/IsolateRule.cs | 2 +- .../ArchitecturalRules/Rules/RestrictRule.cs | 2 +- .../Rules/RestrictRuleGroup.cs | 2 +- .../ArchitecturalRules/Rules/RuleBase.cs | 2 +- .../ArchitecturalRules/Violation.cs | 2 +- .../CSharpCodeAnalyst.Analyzers.csproj | 2 +- .../EventRegistration/Analyzer.cs | 4 +- .../Presentation/EventImbalanceViewModel.cs | 2 +- .../Presentation/SourceLocationTemplate.xaml | 4 +- .../EventRegistration/Result.cs | 2 +- .../MethodComplexity/Analyzer.cs | 2 +- .../MethodComplexityRowViewModel.cs | 4 +- .../TypeCohesion/Analyzer.cs | 2 +- .../Presentation/TypeCohesionRowViewModel.cs | 4 +- .../Presentation/TypeCohesionViewModel.cs | 2 +- .../TypeDependencies/Analyzer.cs | 2 +- .../Presentation/TypeDependenciesViewModel.cs | 2 +- .../Presentation/TypeDependencyViewModel.cs | 4 +- CSharpCodeAnalyst.sln | 4 +- CSharpCodeAnalyst/App.xaml.cs | 4 +- CSharpCodeAnalyst/CSharpCodeAnalyst.csproj | 4 +- .../CommandLine/ConsoleValidationCommand.cs | 4 +- .../Configuration/SettingsDialog.xaml.cs | 2 +- .../AdvancedSearch/AdvancedSearchViewModel.cs | 2 +- .../AdvancedSearch/SearchItemViewModel.cs | 2 +- .../Features/Ai/AiAdvisorService.cs | 6 +-- .../Features/Analyzers/AnalyzerManager.cs | 4 +- .../CycleGroups/CycleGroupViewModel.cs | 4 +- .../CycleGroups/CycleGroupsViewModel.cs | 2 +- CSharpCodeAnalyst/Features/Export/Exporter.cs | 2 +- .../Graph/CodeElementContextCommand.cs | 2 +- .../Filtering/GraphHideDialogViewModel.cs | 2 +- .../Graph/Filtering/GraphHideFilter.cs | 2 +- .../Features/Graph/GlobalCommand.cs | 2 +- .../Features/Graph/GraphSession.cs | 2 +- .../Features/Graph/GraphViewModel.cs | 6 +-- .../Features/Graph/GraphViewState.cs | 2 +- .../Graph/ICodeElementContextCommand.cs | 2 +- .../Features/Graph/IGlobalCommand.cs | 2 +- .../Graph/IRelationshipContextCommand.cs | 2 +- .../Graph/RelationshipContextCommand.cs | 2 +- .../Features/Graph/SeparatorCommand.cs | 2 +- .../Features/Help/LegendDialog.xaml.cs | 4 +- .../Features/Help/QuickInfoFactory.cs | 2 +- CSharpCodeAnalyst/Features/Import/Importer.cs | 10 ++-- .../Features/Import/JdepsReader.cs | 2 +- .../Features/Info/InfoPanelViewModel.cs | 2 +- .../Features/Refactoring/CodeElementNaming.cs | 2 +- .../Features/Refactoring/CodeElementSpecs.cs | 2 +- .../CreateCodeElementDialogViewModel.cs | 2 +- .../Refactoring/ICodeElementNaming.cs | 2 +- .../Refactoring/IRefactoringInteraction.cs | 2 +- .../Refactoring/RefactoringInteraction.cs | 2 +- .../Refactoring/RefactoringService.cs | 2 +- .../Features/Tree/TreeItemViewModel.cs | 2 +- .../Features/Tree/TreeViewModel.cs | 2 +- .../WebGraph/WebContextMenuFactory.cs | 2 +- .../Features/WebGraph/WebGraphBuilder.cs | 6 +-- .../Features/WebGraph/WebGraphControl.xaml.cs | 2 +- CSharpCodeAnalyst/MainViewModel.cs | 14 ++--- .../Persistence/Dto/ProjectData.cs | 4 +- .../Dto/SerializableCodeElement.cs | 2 +- .../Dto/SerializableRelationship.cs | 2 +- .../Shared/Filter/FilterDialog.xaml.cs | 2 +- .../Shared/Messages/CodeElementIconMapper.cs | 2 +- .../Shared/Messages/CodeGraphRefactored.cs | 2 +- .../Messages/CycleCalculationComplete.cs | 2 +- .../Shared/Messages/ShowCycleGroupRequest.cs | 2 +- CSharpCodeAnalyst/Shared/QuickInfo.cs | 2 +- .../Services/SourceLocationNavigator.cs | 2 +- .../Shared/UI/CodeElementLineViewModel.cs | 2 +- .../Cycles/CodeElementClassifier.cs | 4 +- .../Algorithms/Cycles/CodeGraphBuilder.cs | 4 +- CodeGraph/Algorithms/Cycles/CycleFinder.cs | 2 +- CodeGraph/Algorithms/Cycles/CycleGroup.cs | 2 +- .../Cycles/IncompleteLogicException.cs | 2 +- .../Cycles/RelationshipClassifier.cs | 4 +- CodeGraph/Algorithms/Cycles/SearchGraph.cs | 4 +- .../Algorithms/Cycles/SearchGraphBuilder.cs | 4 +- CodeGraph/Algorithms/Cycles/SearchNode.cs | 4 +- .../Algorithms/Cycles/SearchNodeComparer.cs | 2 +- CodeGraph/Algorithms/Cycles/Tarjan.cs | 4 +- .../Algorithms/Metrics/DependencyMetrics.cs | 4 +- .../Metrics/TypeDependencyAnalysis.cs | 4 +- .../Partitioning/CodeElementPartitioner.cs | 4 +- .../Partitioning/TypeCohesionAnalysis.cs | 4 +- ...roj => CSharpCodeAnalyst.CodeGraph.csproj} | 1 - CodeGraph/Colors/ColorDefinitions.cs | 4 +- CodeGraph/Contracts/ICodeGraphExplorer.cs | 6 +-- CodeGraph/Contracts/IGraphRepresentation.cs | 2 +- CodeGraph/Contracts/IParserDiagnostics.cs | 2 +- CodeGraph/Contracts/IProgress.cs | 2 +- CodeGraph/Contracts/ParserProgressArg.cs | 2 +- CodeGraph/Exploration/CodeGraphExplorer.cs | 10 ++-- CodeGraph/Exploration/Context.cs | 4 +- CodeGraph/Export/CodeGraphSerializer.cs | 4 +- CodeGraph/Export/DgmlExport.cs | 6 +-- CodeGraph/Export/DgmlFileBuilder.cs | 2 +- CodeGraph/Export/DgmlHierarchyExport.cs | 6 +-- CodeGraph/Export/DgmlRelationshipExport.cs | 6 +-- CodeGraph/Export/DsiExport.cs | 2 +- CodeGraph/Export/PlantUmlExport.cs | 4 +- CodeGraph/Graph/CodeElement.cs | 2 +- CodeGraph/Graph/CodeElementType.cs | 2 +- CodeGraph/Graph/CodeGraph.cs | 4 +- CodeGraph/Graph/CodeGraphExtensions.cs | 2 +- CodeGraph/Graph/Relationship.cs | 2 +- CodeGraph/Graph/RelationshipAttribute.cs | 2 +- CodeGraph/Graph/RelationshipType.cs | 2 +- CodeGraph/Graph/RelationshipTypeExtensions.cs | 2 +- CodeGraph/Graph/SourceLocation.cs | 2 +- CodeGraph/Metrics/MemberMetrics.cs | 2 +- CodeGraph/Metrics/MetricStore.cs | 2 +- ...oj => CSharpCodeAnalyst.CodeParser.csproj} | 2 +- CodeParser/Parser/Artifacts.cs | 4 +- .../Parser/CodeGraphPlausibilityChecks.cs | 2 +- CodeParser/Parser/Config/ParserConfig.cs | 2 +- .../Config/ProjectExclusionRegExCollection.cs | 2 +- CodeParser/Parser/ExternalCodeElementCache.cs | 4 +- CodeParser/Parser/HierarchyAnalyzer.cs | 6 +-- CodeParser/Parser/ISyntaxNodeHandler.cs | 4 +- CodeParser/Parser/Initializer.cs | 2 +- CodeParser/Parser/LambdaBodyWalker.cs | 4 +- CodeParser/Parser/MethodBodyWalker.cs | 4 +- CodeParser/Parser/ParseResult.cs | 4 +- CodeParser/Parser/Parser.cs | 10 ++-- CodeParser/Parser/ParserDiagnostics.cs | 4 +- CodeParser/Parser/Progress.cs | 4 +- CodeParser/Parser/ProjectSelector.cs | 2 +- CodeParser/Parser/PropertyAccessClassifier.cs | 2 +- CodeParser/Parser/RelationshipAnalyzer.cs | 6 +-- CodeParser/Parser/SourceMetricsCollector.cs | 4 +- CodeParser/Parser/SymbolExtensions.cs | 4 +- CodeParser/Parser/SyntaxExtensions.cs | 4 +- CodeParser/Parser/SyntaxWalkerBase.cs | 4 +- Tests/ApprovalTests/ApprovalTestBase.cs | 52 +++++++++---------- .../ApprovalTests/ModuleLevelApprovalTests.cs | 4 +- .../OldCSharpLanguageApprovalTests.cs | 6 +-- Tests/ApprovalTests/SolutionApprovalTest.cs | 2 +- Tests/Helper/TestCodeGraph.cs | 4 +- Tests/Tests.csproj | 4 +- .../AnalyzerIntegrationTests.cs | 4 +- .../ArchitecturalRules/RuleValidationTests.cs | 2 +- .../UnitTests/Cycles/CodeGraphBuilderTests.cs | 10 ++-- Tests/UnitTests/Cycles/CycleFinderTests.cs | 10 ++-- Tests/UnitTests/Cycles/TarjanTests.cs | 2 +- .../Exploration/CodeGraphExplorerTests.cs | 4 +- .../Export/CodeGraphSerializerTests.cs | 8 +-- Tests/UnitTests/Export/PlantUmlExportTests.cs | 6 +-- Tests/UnitTests/Import/JdepsReaderTest.cs | 2 +- .../Metrics/TypeCohesionAnalysisTests.cs | 4 +- .../Metrics/TypeDependencyAnalysisTests.cs | 4 +- .../Parser/AssignmentDuplicateParseTests.cs | 8 +-- ...icLanguageFeatures_BasicCallsParseTests.cs | 2 +- ...Features_IndexersAndOperatorsParseTests.cs | 2 +- ...cLanguageFeatures_InheritanceParseTests.cs | 2 +- ...LanguageFeatures_InitializersParseTests.cs | 2 +- ...sicLanguageFeatures_OverloadsParseTests.cs | 2 +- ...guageFeatures_PatternMatchingParseTests.cs | 2 +- ...guageFeatures_StructsAndEnumsParseTests.cs | 2 +- ...LanguageFeatures_TypeContextsParseTests.cs | 2 +- .../EventDeRegistrationInLambdaParseTests.cs | 8 +-- .../Parser/Events_InterfaceParseTests.cs | 2 +- .../Events_PublishSubscribeParseTests.cs | 2 +- ...c_PropertyChainSplitAccessorsParseTests.cs | 2 +- .../Parser/FollowIncomingCallsParseTests.cs | 8 +-- Tests/UnitTests/Parser/GenericsParseTests.cs | 2 +- .../Parser/InMemoryCycleParseTestBase.cs | 3 +- .../InMemoryFollowIncomingCallsTestBase.cs | 3 +- .../UnitTests/Parser/InMemoryParseTestBase.cs | 8 +-- .../Parser/LambdaConstructorReferenceTests.cs | 10 ++-- .../Parser/MemberAccessDuplicateParseTests.cs | 8 +-- .../MethodGroups_DelegatesParseTests.cs | 2 +- .../Parser/MethodGroups_EventsParseTests.cs | 2 +- .../Parser/MethodGroups_LinqParseTests.cs | 2 +- .../UnitTests/Parser/NameOfDetectionTests.cs | 2 +- .../UnitTests/Parser/NamespacesParseTests.cs | 2 +- .../ObjectOriented_InheritanceParseTests.cs | 2 +- .../ObjectOriented_InterfacesParseTests.cs | 2 +- .../ObjectOriented_PolymorphismParseTests.cs | 2 +- .../Parser/OrderProcessingParseTests.cs | 2 +- .../UnitTests/Parser/ProjectSelectorTests.cs | 2 +- .../Parser/PropertyAccessClassifierTests.cs | 2 +- .../Parser/RecordsAndStructsParseTests.cs | 8 +-- .../UnitTests/Parser/SingleFileParseTests.cs | 6 +-- .../Parser/SourceMetricsParseTests.cs | 12 ++--- .../Parser/SplitPropertyAccessorsTests.cs | 10 ++-- .../CodeElementPartitionerBaseClassTests.cs | 4 +- 199 files changed, 358 insertions(+), 361 deletions(-) rename CodeGraph/{CodeGraph.csproj => CSharpCodeAnalyst.CodeGraph.csproj} (87%) rename CodeParser/{CodeParser.csproj => CSharpCodeAnalyst.CodeParser.csproj} (93%) diff --git a/ApprovalTestTool/ApprovalTestTool.csproj b/ApprovalTestTool/ApprovalTestTool.csproj index 73b16b97..97d7414e 100644 --- a/ApprovalTestTool/ApprovalTestTool.csproj +++ b/ApprovalTestTool/ApprovalTestTool.csproj @@ -12,8 +12,8 @@ - - + + diff --git a/ApprovalTestTool/Program.cs b/ApprovalTestTool/Program.cs index 9bc65bc8..7f5a206e 100644 --- a/ApprovalTestTool/Program.cs +++ b/ApprovalTestTool/Program.cs @@ -1,6 +1,6 @@ using System.Reflection; -using CodeParser.Parser; -using CodeParser.Parser.Config; +using CSharpCodeAnalyst.CodeParser.Parser; +using CSharpCodeAnalyst.CodeParser.Parser.Config; using LibGit2Sharp; namespace ApprovalTestTool; diff --git a/CSharpCodeAnalyst.AnalyzerSdk/CSharpCodeAnalyst.AnalyzerSdk.csproj b/CSharpCodeAnalyst.AnalyzerSdk/CSharpCodeAnalyst.AnalyzerSdk.csproj index 4709f3c7..2982552a 100644 --- a/CSharpCodeAnalyst.AnalyzerSdk/CSharpCodeAnalyst.AnalyzerSdk.csproj +++ b/CSharpCodeAnalyst.AnalyzerSdk/CSharpCodeAnalyst.AnalyzerSdk.csproj @@ -11,7 +11,7 @@ - + diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/AddNodeToGraphRequest.cs b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/AddNodeToGraphRequest.cs index fe49c704..f9e76a01 100644 --- a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/AddNodeToGraphRequest.cs +++ b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/AddNodeToGraphRequest.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Shared.Messages; diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/OpenSourceLocationRequest.cs b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/OpenSourceLocationRequest.cs index 9ee7b835..9843d56a 100644 --- a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/OpenSourceLocationRequest.cs +++ b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/OpenSourceLocationRequest.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Shared.Messages; diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/ShowPartitionsRequest.cs b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/ShowPartitionsRequest.cs index 8f1971ec..d1d0f682 100644 --- a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/ShowPartitionsRequest.cs +++ b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/ShowPartitionsRequest.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Shared.Messages; diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Search/SearchExpression.cs b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Search/SearchExpression.cs index 6e0d7ca6..21fe90e5 100644 --- a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Search/SearchExpression.cs +++ b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Search/SearchExpression.cs @@ -1,5 +1,5 @@ using System.Text.RegularExpressions; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Shared.Search; diff --git a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Analyzer.cs b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Analyzer.cs index f668208f..14805c3b 100644 --- a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Analyzer.cs +++ b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Analyzer.cs @@ -2,10 +2,10 @@ using System.IO; using System.Text.Json; using System.Windows; -using CodeGraph.Graph; using CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Presentation; using CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Rules; using CSharpCodeAnalyst.Analyzers.Resources; +using CSharpCodeAnalyst.CodeGraph.Graph; using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.Messages; using CSharpCodeAnalyst.Shared.Notifications; diff --git a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/PatternMatcher.cs b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/PatternMatcher.cs index 1decb69a..8afc495d 100644 --- a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/PatternMatcher.cs +++ b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/PatternMatcher.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules; diff --git a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/RelationshipViewModel.cs b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/RelationshipViewModel.cs index 455b087c..60fc7a24 100644 --- a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/RelationshipViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/RelationshipViewModel.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Presentation; diff --git a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/DenyRule.cs b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/DenyRule.cs index ee7239c1..b98a0de3 100644 --- a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/DenyRule.cs +++ b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/DenyRule.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Rules; diff --git a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/IsolateRule.cs b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/IsolateRule.cs index 33779e62..806085c7 100644 --- a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/IsolateRule.cs +++ b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/IsolateRule.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Rules; diff --git a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/RestrictRule.cs b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/RestrictRule.cs index 61fafea3..16eee9a5 100644 --- a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/RestrictRule.cs +++ b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/RestrictRule.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Rules; diff --git a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/RestrictRuleGroup.cs b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/RestrictRuleGroup.cs index 4c3135a6..e4e1c832 100644 --- a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/RestrictRuleGroup.cs +++ b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/RestrictRuleGroup.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Rules; diff --git a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/RuleBase.cs b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/RuleBase.cs index 7390cae4..93cb6b32 100644 --- a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/RuleBase.cs +++ b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Rules/RuleBase.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Rules; diff --git a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Violation.cs b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Violation.cs index 6bd04dd6..7f2ab026 100644 --- a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Violation.cs +++ b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Violation.cs @@ -1,5 +1,5 @@ -using CodeGraph.Graph; using CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Rules; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules; diff --git a/CSharpCodeAnalyst.Analyzers/CSharpCodeAnalyst.Analyzers.csproj b/CSharpCodeAnalyst.Analyzers/CSharpCodeAnalyst.Analyzers.csproj index 5d2dafe7..b1f9aa01 100644 --- a/CSharpCodeAnalyst.Analyzers/CSharpCodeAnalyst.Analyzers.csproj +++ b/CSharpCodeAnalyst.Analyzers/CSharpCodeAnalyst.Analyzers.csproj @@ -9,7 +9,7 @@ - + diff --git a/CSharpCodeAnalyst.Analyzers/EventRegistration/Analyzer.cs b/CSharpCodeAnalyst.Analyzers/EventRegistration/Analyzer.cs index e50a452a..35ae3d0c 100644 --- a/CSharpCodeAnalyst.Analyzers/EventRegistration/Analyzer.cs +++ b/CSharpCodeAnalyst.Analyzers/EventRegistration/Analyzer.cs @@ -1,6 +1,6 @@ -using CodeGraph.Graph; -using CSharpCodeAnalyst.Analyzers.EventRegistration.Presentation; +using CSharpCodeAnalyst.Analyzers.EventRegistration.Presentation; using CSharpCodeAnalyst.Analyzers.Resources; +using CSharpCodeAnalyst.CodeGraph.Graph; using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.Messages; using CSharpCodeAnalyst.Shared.Notifications; diff --git a/CSharpCodeAnalyst.Analyzers/EventRegistration/Presentation/EventImbalanceViewModel.cs b/CSharpCodeAnalyst.Analyzers/EventRegistration/Presentation/EventImbalanceViewModel.cs index f551cffa..ec5ff363 100644 --- a/CSharpCodeAnalyst.Analyzers/EventRegistration/Presentation/EventImbalanceViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/EventRegistration/Presentation/EventImbalanceViewModel.cs @@ -1,6 +1,6 @@ using System.Collections.ObjectModel; using System.Windows.Input; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; using CSharpCodeAnalyst.Shared.Messages; diff --git a/CSharpCodeAnalyst.Analyzers/EventRegistration/Presentation/SourceLocationTemplate.xaml b/CSharpCodeAnalyst.Analyzers/EventRegistration/Presentation/SourceLocationTemplate.xaml index d8662ab5..8eca0b49 100644 --- a/CSharpCodeAnalyst.Analyzers/EventRegistration/Presentation/SourceLocationTemplate.xaml +++ b/CSharpCodeAnalyst.Analyzers/EventRegistration/Presentation/SourceLocationTemplate.xaml @@ -2,12 +2,12 @@ xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml' xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:graph="clr-namespace:CodeGraph.Graph;assembly=CodeGraph" + xmlns:graph1="clr-namespace:CSharpCodeAnalyst.CodeGraph.Graph;assembly=CSharpCodeAnalyst.CodeGraph" mc:Ignorable="d"> - + diff --git a/CSharpCodeAnalyst.Analyzers/EventRegistration/Result.cs b/CSharpCodeAnalyst.Analyzers/EventRegistration/Result.cs index 495dc349..0de66807 100644 --- a/CSharpCodeAnalyst.Analyzers/EventRegistration/Result.cs +++ b/CSharpCodeAnalyst.Analyzers/EventRegistration/Result.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Analyzers.EventRegistration; diff --git a/CSharpCodeAnalyst.Analyzers/MethodComplexity/Analyzer.cs b/CSharpCodeAnalyst.Analyzers/MethodComplexity/Analyzer.cs index 73d6c687..6b81351d 100644 --- a/CSharpCodeAnalyst.Analyzers/MethodComplexity/Analyzer.cs +++ b/CSharpCodeAnalyst.Analyzers/MethodComplexity/Analyzer.cs @@ -1,6 +1,6 @@ -using CodeGraph.Metrics; using CSharpCodeAnalyst.Analyzers.MethodComplexity.Presentation; using CSharpCodeAnalyst.Analyzers.Resources; +using CSharpCodeAnalyst.CodeGraph.Metrics; using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.Messages; using CSharpCodeAnalyst.Shared.Notifications; diff --git a/CSharpCodeAnalyst.Analyzers/MethodComplexity/Presentation/MethodComplexityRowViewModel.cs b/CSharpCodeAnalyst.Analyzers/MethodComplexity/Presentation/MethodComplexityRowViewModel.cs index 22f236ed..d93d4288 100644 --- a/CSharpCodeAnalyst.Analyzers/MethodComplexity/Presentation/MethodComplexityRowViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/MethodComplexity/Presentation/MethodComplexityRowViewModel.cs @@ -1,6 +1,6 @@ using System.Globalization; -using CodeGraph.Graph; -using CodeGraph.Metrics; +using CSharpCodeAnalyst.CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Metrics; using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; namespace CSharpCodeAnalyst.Analyzers.MethodComplexity.Presentation; diff --git a/CSharpCodeAnalyst.Analyzers/TypeCohesion/Analyzer.cs b/CSharpCodeAnalyst.Analyzers/TypeCohesion/Analyzer.cs index 0514ba06..18a85fc1 100644 --- a/CSharpCodeAnalyst.Analyzers/TypeCohesion/Analyzer.cs +++ b/CSharpCodeAnalyst.Analyzers/TypeCohesion/Analyzer.cs @@ -1,6 +1,6 @@ -using CodeGraph.Algorithms.Partitioning; using CSharpCodeAnalyst.Analyzers.TypeCohesion.Presentation; using CSharpCodeAnalyst.Analyzers.Resources; +using CSharpCodeAnalyst.CodeGraph.Algorithms.Partitioning; using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.Messages; using CSharpCodeAnalyst.Shared.Notifications; diff --git a/CSharpCodeAnalyst.Analyzers/TypeCohesion/Presentation/TypeCohesionRowViewModel.cs b/CSharpCodeAnalyst.Analyzers/TypeCohesion/Presentation/TypeCohesionRowViewModel.cs index 1f5370ac..d75de9c5 100644 --- a/CSharpCodeAnalyst.Analyzers/TypeCohesion/Presentation/TypeCohesionRowViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/TypeCohesion/Presentation/TypeCohesionRowViewModel.cs @@ -1,6 +1,6 @@ using System.Globalization; -using CodeGraph.Algorithms.Partitioning; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Algorithms.Partitioning; +using CSharpCodeAnalyst.CodeGraph.Graph; using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; namespace CSharpCodeAnalyst.Analyzers.TypeCohesion.Presentation; diff --git a/CSharpCodeAnalyst.Analyzers/TypeCohesion/Presentation/TypeCohesionViewModel.cs b/CSharpCodeAnalyst.Analyzers/TypeCohesion/Presentation/TypeCohesionViewModel.cs index 96dc2a5e..218e295a 100644 --- a/CSharpCodeAnalyst.Analyzers/TypeCohesion/Presentation/TypeCohesionViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/TypeCohesion/Presentation/TypeCohesionViewModel.cs @@ -1,7 +1,7 @@ using System.Collections.ObjectModel; using System.Windows; -using CodeGraph.Algorithms.Partitioning; using CSharpCodeAnalyst.Analyzers.Resources; +using CSharpCodeAnalyst.CodeGraph.Algorithms.Partitioning; using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; using CSharpCodeAnalyst.Shared.Messages; diff --git a/CSharpCodeAnalyst.Analyzers/TypeDependencies/Analyzer.cs b/CSharpCodeAnalyst.Analyzers/TypeDependencies/Analyzer.cs index 4ebee0d1..8280e049 100644 --- a/CSharpCodeAnalyst.Analyzers/TypeDependencies/Analyzer.cs +++ b/CSharpCodeAnalyst.Analyzers/TypeDependencies/Analyzer.cs @@ -1,6 +1,6 @@ -using CodeGraph.Algorithms.Metrics; using CSharpCodeAnalyst.Analyzers.TypeDependencies.Presentation; using CSharpCodeAnalyst.Analyzers.Resources; +using CSharpCodeAnalyst.CodeGraph.Algorithms.Metrics; using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.Messages; using CSharpCodeAnalyst.Shared.Notifications; diff --git a/CSharpCodeAnalyst.Analyzers/TypeDependencies/Presentation/TypeDependenciesViewModel.cs b/CSharpCodeAnalyst.Analyzers/TypeDependencies/Presentation/TypeDependenciesViewModel.cs index 2c1803fb..b6f871e0 100644 --- a/CSharpCodeAnalyst.Analyzers/TypeDependencies/Presentation/TypeDependenciesViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/TypeDependencies/Presentation/TypeDependenciesViewModel.cs @@ -1,7 +1,7 @@ using System.Collections.ObjectModel; using System.Windows; -using CodeGraph.Algorithms.Metrics; using CSharpCodeAnalyst.Analyzers.Resources; +using CSharpCodeAnalyst.CodeGraph.Algorithms.Metrics; using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; using CSharpCodeAnalyst.Shared.Messages; diff --git a/CSharpCodeAnalyst.Analyzers/TypeDependencies/Presentation/TypeDependencyViewModel.cs b/CSharpCodeAnalyst.Analyzers/TypeDependencies/Presentation/TypeDependencyViewModel.cs index 62f87d17..576523b3 100644 --- a/CSharpCodeAnalyst.Analyzers/TypeDependencies/Presentation/TypeDependencyViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/TypeDependencies/Presentation/TypeDependencyViewModel.cs @@ -1,6 +1,6 @@ using System.Globalization; -using CodeGraph.Algorithms.Metrics; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Algorithms.Metrics; +using CSharpCodeAnalyst.CodeGraph.Graph; using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; namespace CSharpCodeAnalyst.Analyzers.TypeDependencies.Presentation; diff --git a/CSharpCodeAnalyst.sln b/CSharpCodeAnalyst.sln index 5138e6be..3242e20b 100644 --- a/CSharpCodeAnalyst.sln +++ b/CSharpCodeAnalyst.sln @@ -8,7 +8,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CSharpCodeAnalyst", "CSharp {7D5EA751-84A3-43F1-BCCE-C9D10536AB1B} = {7D5EA751-84A3-43F1-BCCE-C9D10536AB1B} EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CodeParser", "CodeParser\CodeParser.csproj", "{8D89C41C-F2EB-4E54-8297-1A552BEE2396}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CSharpCodeAnalyst.CodeParser", "CodeParser\CSharpCodeAnalyst.CodeParser.csproj", "{8D89C41C-F2EB-4E54-8297-1A552BEE2396}" ProjectSection(ProjectDependencies) = postProject {7D5EA751-84A3-43F1-BCCE-C9D10536AB1B} = {7D5EA751-84A3-43F1-BCCE-C9D10536AB1B} EndProjectSection @@ -24,7 +24,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution .editorconfig = .editorconfig EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CodeGraph", "CodeGraph\CodeGraph.csproj", "{7D5EA751-84A3-43F1-BCCE-C9D10536AB1B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CSharpCodeAnalyst.CodeGraph", "CodeGraph\CSharpCodeAnalyst.CodeGraph.csproj", "{7D5EA751-84A3-43F1-BCCE-C9D10536AB1B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApprovalTestTool", "ApprovalTestTool\ApprovalTestTool.csproj", "{767539BE-FBE3-4B46-9A5E-21D60E1B278B}" EndProject diff --git a/CSharpCodeAnalyst/App.xaml.cs b/CSharpCodeAnalyst/App.xaml.cs index b96b594e..7678718c 100644 --- a/CSharpCodeAnalyst/App.xaml.cs +++ b/CSharpCodeAnalyst/App.xaml.cs @@ -1,7 +1,7 @@ using System.IO; using System.Windows; -using CodeGraph.Exploration; -using CodeParser.Parser; +using CSharpCodeAnalyst.CodeGraph.Exploration; +using CSharpCodeAnalyst.CodeParser.Parser; using CSharpCodeAnalyst.CommandLine; using CSharpCodeAnalyst.Configuration; using CSharpCodeAnalyst.Features.AdvancedSearch; diff --git a/CSharpCodeAnalyst/CSharpCodeAnalyst.csproj b/CSharpCodeAnalyst/CSharpCodeAnalyst.csproj index 0c11d56d..7e5dbe70 100644 --- a/CSharpCodeAnalyst/CSharpCodeAnalyst.csproj +++ b/CSharpCodeAnalyst/CSharpCodeAnalyst.csproj @@ -142,8 +142,8 @@ - - + + diff --git a/CSharpCodeAnalyst/CommandLine/ConsoleValidationCommand.cs b/CSharpCodeAnalyst/CommandLine/ConsoleValidationCommand.cs index b048f226..c9e644e5 100644 --- a/CSharpCodeAnalyst/CommandLine/ConsoleValidationCommand.cs +++ b/CSharpCodeAnalyst/CommandLine/ConsoleValidationCommand.cs @@ -1,10 +1,10 @@ using System.Diagnostics; using System.IO; using System.Text; -using CodeParser.Parser; -using CodeParser.Parser.Config; using CSharpCodeAnalyst.Configuration; using CSharpCodeAnalyst.Analyzers.ArchitecturalRules; +using CSharpCodeAnalyst.CodeParser.Parser; +using CSharpCodeAnalyst.CodeParser.Parser.Config; using CSharpCodeAnalyst.Resources; using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.Messages; diff --git a/CSharpCodeAnalyst/Configuration/SettingsDialog.xaml.cs b/CSharpCodeAnalyst/Configuration/SettingsDialog.xaml.cs index 9dc32529..1133570d 100644 --- a/CSharpCodeAnalyst/Configuration/SettingsDialog.xaml.cs +++ b/CSharpCodeAnalyst/Configuration/SettingsDialog.xaml.cs @@ -1,6 +1,6 @@ using System.Text.RegularExpressions; using System.Windows; -using CodeParser.Parser.Config; +using CSharpCodeAnalyst.CodeParser.Parser.Config; using CSharpCodeAnalyst.Resources; namespace CSharpCodeAnalyst.Configuration; diff --git a/CSharpCodeAnalyst/Features/AdvancedSearch/AdvancedSearchViewModel.cs b/CSharpCodeAnalyst/Features/AdvancedSearch/AdvancedSearchViewModel.cs index 56070d84..f34cea20 100644 --- a/CSharpCodeAnalyst/Features/AdvancedSearch/AdvancedSearchViewModel.cs +++ b/CSharpCodeAnalyst/Features/AdvancedSearch/AdvancedSearchViewModel.cs @@ -3,7 +3,7 @@ using System.Windows; using System.Windows.Input; using System.Windows.Threading; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; using CSharpCodeAnalyst.Features.Refactoring; using CSharpCodeAnalyst.Shared.Messages; using CSharpCodeAnalyst.Shared.Search; diff --git a/CSharpCodeAnalyst/Features/AdvancedSearch/SearchItemViewModel.cs b/CSharpCodeAnalyst/Features/AdvancedSearch/SearchItemViewModel.cs index 76e8ad63..318db254 100644 --- a/CSharpCodeAnalyst/Features/AdvancedSearch/SearchItemViewModel.cs +++ b/CSharpCodeAnalyst/Features/AdvancedSearch/SearchItemViewModel.cs @@ -1,7 +1,7 @@ using System.ComponentModel; using System.Diagnostics; using System.Windows.Media.Imaging; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; using CSharpCodeAnalyst.Shared.Messages; namespace CSharpCodeAnalyst.Features.AdvancedSearch; diff --git a/CSharpCodeAnalyst/Features/Ai/AiAdvisorService.cs b/CSharpCodeAnalyst/Features/Ai/AiAdvisorService.cs index cc0080dc..8fce51ea 100644 --- a/CSharpCodeAnalyst/Features/Ai/AiAdvisorService.cs +++ b/CSharpCodeAnalyst/Features/Ai/AiAdvisorService.cs @@ -1,6 +1,6 @@ -using CodeGraph.Algorithms.Cycles; -using CodeGraph.Export; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Algorithms.Cycles; +using CSharpCodeAnalyst.CodeGraph.Export; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Features.Ai; diff --git a/CSharpCodeAnalyst/Features/Analyzers/AnalyzerManager.cs b/CSharpCodeAnalyst/Features/Analyzers/AnalyzerManager.cs index e188a785..c5992ea4 100644 --- a/CSharpCodeAnalyst/Features/Analyzers/AnalyzerManager.cs +++ b/CSharpCodeAnalyst/Features/Analyzers/AnalyzerManager.cs @@ -1,5 +1,5 @@ -using CodeGraph.Metrics; -using CSharpCodeAnalyst.Analyzers.EventRegistration; +using CSharpCodeAnalyst.Analyzers.EventRegistration; +using CSharpCodeAnalyst.CodeGraph.Metrics; using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.Notifications; using ArchitecturalRules = CSharpCodeAnalyst.Analyzers.ArchitecturalRules; diff --git a/CSharpCodeAnalyst/Features/CycleGroups/CycleGroupViewModel.cs b/CSharpCodeAnalyst/Features/CycleGroups/CycleGroupViewModel.cs index 017116ab..a71b2f0d 100644 --- a/CSharpCodeAnalyst/Features/CycleGroups/CycleGroupViewModel.cs +++ b/CSharpCodeAnalyst/Features/CycleGroups/CycleGroupViewModel.cs @@ -1,6 +1,6 @@ using System.Collections.ObjectModel; -using CodeGraph.Algorithms.Cycles; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Algorithms.Cycles; +using CSharpCodeAnalyst.CodeGraph.Graph; using CSharpCodeAnalyst.Resources; using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; using CSharpCodeAnalyst.Shared.UI; diff --git a/CSharpCodeAnalyst/Features/CycleGroups/CycleGroupsViewModel.cs b/CSharpCodeAnalyst/Features/CycleGroups/CycleGroupsViewModel.cs index 144c25f7..2b8844b7 100644 --- a/CSharpCodeAnalyst/Features/CycleGroups/CycleGroupsViewModel.cs +++ b/CSharpCodeAnalyst/Features/CycleGroups/CycleGroupsViewModel.cs @@ -1,6 +1,6 @@ using System.Collections.ObjectModel; using System.Windows; -using CodeGraph.Algorithms.Cycles; +using CSharpCodeAnalyst.CodeGraph.Algorithms.Cycles; using CSharpCodeAnalyst.Resources; using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; using CSharpCodeAnalyst.Shared.Messages; diff --git a/CSharpCodeAnalyst/Features/Export/Exporter.cs b/CSharpCodeAnalyst/Features/Export/Exporter.cs index 7afe4b05..964119b8 100644 --- a/CSharpCodeAnalyst/Features/Export/Exporter.cs +++ b/CSharpCodeAnalyst/Features/Export/Exporter.cs @@ -1,7 +1,7 @@ using System.Diagnostics; using System.IO; using System.Windows; -using CodeGraph.Export; +using CSharpCodeAnalyst.CodeGraph.Export; using CSharpCodeAnalyst.Resources; using CSharpCodeAnalyst.Shared.Notifications; diff --git a/CSharpCodeAnalyst/Features/Graph/CodeElementContextCommand.cs b/CSharpCodeAnalyst/Features/Graph/CodeElementContextCommand.cs index 4fd76ac8..7820f820 100644 --- a/CSharpCodeAnalyst/Features/Graph/CodeElementContextCommand.cs +++ b/CSharpCodeAnalyst/Features/Graph/CodeElementContextCommand.cs @@ -1,5 +1,5 @@ using System.Windows.Media; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Features.Graph; diff --git a/CSharpCodeAnalyst/Features/Graph/Filtering/GraphHideDialogViewModel.cs b/CSharpCodeAnalyst/Features/Graph/Filtering/GraphHideDialogViewModel.cs index 726da97d..fb2424dd 100644 --- a/CSharpCodeAnalyst/Features/Graph/Filtering/GraphHideDialogViewModel.cs +++ b/CSharpCodeAnalyst/Features/Graph/Filtering/GraphHideDialogViewModel.cs @@ -2,7 +2,7 @@ using System.ComponentModel; using System.Runtime.CompilerServices; using System.Windows.Input; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; using CSharpCodeAnalyst.Shared.Wpf; namespace CSharpCodeAnalyst.Features.Graph.Filtering; diff --git a/CSharpCodeAnalyst/Features/Graph/Filtering/GraphHideFilter.cs b/CSharpCodeAnalyst/Features/Graph/Filtering/GraphHideFilter.cs index 4b0e1d4b..727ca4b6 100644 --- a/CSharpCodeAnalyst/Features/Graph/Filtering/GraphHideFilter.cs +++ b/CSharpCodeAnalyst/Features/Graph/Filtering/GraphHideFilter.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Features.Graph.Filtering; diff --git a/CSharpCodeAnalyst/Features/Graph/GlobalCommand.cs b/CSharpCodeAnalyst/Features/Graph/GlobalCommand.cs index 22108b6e..a8aef9f9 100644 --- a/CSharpCodeAnalyst/Features/Graph/GlobalCommand.cs +++ b/CSharpCodeAnalyst/Features/Graph/GlobalCommand.cs @@ -1,6 +1,6 @@ using System.Windows.Input; using System.Windows.Media; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Features.Graph; diff --git a/CSharpCodeAnalyst/Features/Graph/GraphSession.cs b/CSharpCodeAnalyst/Features/Graph/GraphSession.cs index 555ee4f7..bf032293 100644 --- a/CSharpCodeAnalyst/Features/Graph/GraphSession.cs +++ b/CSharpCodeAnalyst/Features/Graph/GraphSession.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Features.Graph; diff --git a/CSharpCodeAnalyst/Features/Graph/GraphViewModel.cs b/CSharpCodeAnalyst/Features/Graph/GraphViewModel.cs index 0465f5c3..420c385c 100644 --- a/CSharpCodeAnalyst/Features/Graph/GraphViewModel.cs +++ b/CSharpCodeAnalyst/Features/Graph/GraphViewModel.cs @@ -2,9 +2,9 @@ using System.ComponentModel; using System.Windows; using System.Windows.Input; -using CodeGraph.Contracts; -using CodeGraph.Exploration; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Contracts; +using CSharpCodeAnalyst.CodeGraph.Exploration; +using CSharpCodeAnalyst.CodeGraph.Graph; using CSharpCodeAnalyst.Configuration; using CSharpCodeAnalyst.Features.Graph.Filtering; using CSharpCodeAnalyst.Features.Graph.RenderOptions; diff --git a/CSharpCodeAnalyst/Features/Graph/GraphViewState.cs b/CSharpCodeAnalyst/Features/Graph/GraphViewState.cs index 0342d054..de7eeb41 100644 --- a/CSharpCodeAnalyst/Features/Graph/GraphViewState.cs +++ b/CSharpCodeAnalyst/Features/Graph/GraphViewState.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; using CSharpCodeAnalyst.Features.Graph.Filtering; using CSharpCodeAnalyst.Features.Graph.RenderOptions; diff --git a/CSharpCodeAnalyst/Features/Graph/ICodeElementContextCommand.cs b/CSharpCodeAnalyst/Features/Graph/ICodeElementContextCommand.cs index d4d2fd1c..efe2f201 100644 --- a/CSharpCodeAnalyst/Features/Graph/ICodeElementContextCommand.cs +++ b/CSharpCodeAnalyst/Features/Graph/ICodeElementContextCommand.cs @@ -1,5 +1,5 @@ using System.Windows.Media; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Features.Graph; diff --git a/CSharpCodeAnalyst/Features/Graph/IGlobalCommand.cs b/CSharpCodeAnalyst/Features/Graph/IGlobalCommand.cs index 16798bec..e011b55c 100644 --- a/CSharpCodeAnalyst/Features/Graph/IGlobalCommand.cs +++ b/CSharpCodeAnalyst/Features/Graph/IGlobalCommand.cs @@ -1,6 +1,6 @@ using System.Windows.Input; using System.Windows.Media; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Features.Graph; diff --git a/CSharpCodeAnalyst/Features/Graph/IRelationshipContextCommand.cs b/CSharpCodeAnalyst/Features/Graph/IRelationshipContextCommand.cs index 0aa6705b..1f2303b7 100644 --- a/CSharpCodeAnalyst/Features/Graph/IRelationshipContextCommand.cs +++ b/CSharpCodeAnalyst/Features/Graph/IRelationshipContextCommand.cs @@ -1,5 +1,5 @@ using System.Windows.Media; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Features.Graph; diff --git a/CSharpCodeAnalyst/Features/Graph/RelationshipContextCommand.cs b/CSharpCodeAnalyst/Features/Graph/RelationshipContextCommand.cs index c2b4fd15..e07bdfce 100644 --- a/CSharpCodeAnalyst/Features/Graph/RelationshipContextCommand.cs +++ b/CSharpCodeAnalyst/Features/Graph/RelationshipContextCommand.cs @@ -1,5 +1,5 @@ using System.Windows.Media; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Features.Graph; diff --git a/CSharpCodeAnalyst/Features/Graph/SeparatorCommand.cs b/CSharpCodeAnalyst/Features/Graph/SeparatorCommand.cs index 2b797659..6c4d3721 100644 --- a/CSharpCodeAnalyst/Features/Graph/SeparatorCommand.cs +++ b/CSharpCodeAnalyst/Features/Graph/SeparatorCommand.cs @@ -1,5 +1,5 @@ using System.Windows.Media; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Features.Graph; diff --git a/CSharpCodeAnalyst/Features/Help/LegendDialog.xaml.cs b/CSharpCodeAnalyst/Features/Help/LegendDialog.xaml.cs index 82a3e0d8..62345e16 100644 --- a/CSharpCodeAnalyst/Features/Help/LegendDialog.xaml.cs +++ b/CSharpCodeAnalyst/Features/Help/LegendDialog.xaml.cs @@ -1,7 +1,7 @@ using System.Windows; using System.Windows.Media; -using CodeGraph.Colors; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Colors; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Features.Help; diff --git a/CSharpCodeAnalyst/Features/Help/QuickInfoFactory.cs b/CSharpCodeAnalyst/Features/Help/QuickInfoFactory.cs index 1f9d6886..19b3e621 100644 --- a/CSharpCodeAnalyst/Features/Help/QuickInfoFactory.cs +++ b/CSharpCodeAnalyst/Features/Help/QuickInfoFactory.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; using CSharpCodeAnalyst.Resources; using CSharpCodeAnalyst.Shared; diff --git a/CSharpCodeAnalyst/Features/Import/Importer.cs b/CSharpCodeAnalyst/Features/Import/Importer.cs index 072a62c4..d4a33a6a 100644 --- a/CSharpCodeAnalyst/Features/Import/Importer.cs +++ b/CSharpCodeAnalyst/Features/Import/Importer.cs @@ -1,8 +1,8 @@ -using CodeGraph.Contracts; -using CodeGraph.Export; -using CodeGraph.Metrics; -using CodeParser.Parser; -using CodeParser.Parser.Config; +using CSharpCodeAnalyst.CodeGraph.Contracts; +using CSharpCodeAnalyst.CodeGraph.Export; +using CSharpCodeAnalyst.CodeGraph.Metrics; +using CSharpCodeAnalyst.CodeParser.Parser; +using CSharpCodeAnalyst.CodeParser.Parser.Config; using CSharpCodeAnalyst.Resources; using CSharpCodeAnalyst.Shared; using CSharpCodeAnalyst.Shared.Notifications; diff --git a/CSharpCodeAnalyst/Features/Import/JdepsReader.cs b/CSharpCodeAnalyst/Features/Import/JdepsReader.cs index d9965a2c..93225459 100644 --- a/CSharpCodeAnalyst/Features/Import/JdepsReader.cs +++ b/CSharpCodeAnalyst/Features/Import/JdepsReader.cs @@ -1,5 +1,5 @@ using System.IO; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Features.Import; diff --git a/CSharpCodeAnalyst/Features/Info/InfoPanelViewModel.cs b/CSharpCodeAnalyst/Features/Info/InfoPanelViewModel.cs index c7f77d2c..f9ec2dbe 100644 --- a/CSharpCodeAnalyst/Features/Info/InfoPanelViewModel.cs +++ b/CSharpCodeAnalyst/Features/Info/InfoPanelViewModel.cs @@ -2,7 +2,7 @@ using System.Runtime.CompilerServices; using System.Windows; using System.Windows.Input; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; using CSharpCodeAnalyst.Features.Help; using CSharpCodeAnalyst.Resources; using CSharpCodeAnalyst.Shared; diff --git a/CSharpCodeAnalyst/Features/Refactoring/CodeElementNaming.cs b/CSharpCodeAnalyst/Features/Refactoring/CodeElementNaming.cs index 531b5258..d7eb18f8 100644 --- a/CSharpCodeAnalyst/Features/Refactoring/CodeElementNaming.cs +++ b/CSharpCodeAnalyst/Features/Refactoring/CodeElementNaming.cs @@ -1,5 +1,5 @@ using System.Diagnostics; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Features.Refactoring; diff --git a/CSharpCodeAnalyst/Features/Refactoring/CodeElementSpecs.cs b/CSharpCodeAnalyst/Features/Refactoring/CodeElementSpecs.cs index 39c707cf..22e21b3c 100644 --- a/CSharpCodeAnalyst/Features/Refactoring/CodeElementSpecs.cs +++ b/CSharpCodeAnalyst/Features/Refactoring/CodeElementSpecs.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Features.Refactoring; diff --git a/CSharpCodeAnalyst/Features/Refactoring/CreateCodeElementDialogViewModel.cs b/CSharpCodeAnalyst/Features/Refactoring/CreateCodeElementDialogViewModel.cs index 4a398c55..ad646195 100644 --- a/CSharpCodeAnalyst/Features/Refactoring/CreateCodeElementDialogViewModel.cs +++ b/CSharpCodeAnalyst/Features/Refactoring/CreateCodeElementDialogViewModel.cs @@ -2,7 +2,7 @@ using System.ComponentModel; using System.Diagnostics; using System.Runtime.CompilerServices; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Features.Refactoring; diff --git a/CSharpCodeAnalyst/Features/Refactoring/ICodeElementNaming.cs b/CSharpCodeAnalyst/Features/Refactoring/ICodeElementNaming.cs index 65a6086a..4ec192e6 100644 --- a/CSharpCodeAnalyst/Features/Refactoring/ICodeElementNaming.cs +++ b/CSharpCodeAnalyst/Features/Refactoring/ICodeElementNaming.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Features.Refactoring; diff --git a/CSharpCodeAnalyst/Features/Refactoring/IRefactoringInteraction.cs b/CSharpCodeAnalyst/Features/Refactoring/IRefactoringInteraction.cs index 68617f3f..d231731b 100644 --- a/CSharpCodeAnalyst/Features/Refactoring/IRefactoringInteraction.cs +++ b/CSharpCodeAnalyst/Features/Refactoring/IRefactoringInteraction.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Features.Refactoring; diff --git a/CSharpCodeAnalyst/Features/Refactoring/RefactoringInteraction.cs b/CSharpCodeAnalyst/Features/Refactoring/RefactoringInteraction.cs index 10c4399e..61faea12 100644 --- a/CSharpCodeAnalyst/Features/Refactoring/RefactoringInteraction.cs +++ b/CSharpCodeAnalyst/Features/Refactoring/RefactoringInteraction.cs @@ -1,5 +1,5 @@ using System.Windows; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; using CSharpCodeAnalyst.Resources; namespace CSharpCodeAnalyst.Features.Refactoring; diff --git a/CSharpCodeAnalyst/Features/Refactoring/RefactoringService.cs b/CSharpCodeAnalyst/Features/Refactoring/RefactoringService.cs index b7b21bd1..54c27916 100644 --- a/CSharpCodeAnalyst/Features/Refactoring/RefactoringService.cs +++ b/CSharpCodeAnalyst/Features/Refactoring/RefactoringService.cs @@ -1,5 +1,5 @@ using System.Diagnostics; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; using CSharpCodeAnalyst.Resources; using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.Messages; diff --git a/CSharpCodeAnalyst/Features/Tree/TreeItemViewModel.cs b/CSharpCodeAnalyst/Features/Tree/TreeItemViewModel.cs index d63f044e..22bc101f 100644 --- a/CSharpCodeAnalyst/Features/Tree/TreeItemViewModel.cs +++ b/CSharpCodeAnalyst/Features/Tree/TreeItemViewModel.cs @@ -2,7 +2,7 @@ using System.ComponentModel; using System.Diagnostics; using System.Windows.Media.Imaging; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; using CSharpCodeAnalyst.Shared.Messages; namespace CSharpCodeAnalyst.Features.Tree; diff --git a/CSharpCodeAnalyst/Features/Tree/TreeViewModel.cs b/CSharpCodeAnalyst/Features/Tree/TreeViewModel.cs index 51a9e165..dd26dab3 100644 --- a/CSharpCodeAnalyst/Features/Tree/TreeViewModel.cs +++ b/CSharpCodeAnalyst/Features/Tree/TreeViewModel.cs @@ -3,7 +3,7 @@ using System.Diagnostics; using System.Windows; using System.Windows.Input; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; using CSharpCodeAnalyst.Features.Refactoring; using CSharpCodeAnalyst.Shared.Messages; using CSharpCodeAnalyst.Shared.Search; diff --git a/CSharpCodeAnalyst/Features/WebGraph/WebContextMenuFactory.cs b/CSharpCodeAnalyst/Features/WebGraph/WebContextMenuFactory.cs index f8f2dce7..e149e33c 100644 --- a/CSharpCodeAnalyst/Features/WebGraph/WebContextMenuFactory.cs +++ b/CSharpCodeAnalyst/Features/WebGraph/WebContextMenuFactory.cs @@ -1,6 +1,6 @@ using System.Windows.Controls; using System.Windows.Media; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; using CSharpCodeAnalyst.Features.Graph; namespace CSharpCodeAnalyst.Features.WebGraph; diff --git a/CSharpCodeAnalyst/Features/WebGraph/WebGraphBuilder.cs b/CSharpCodeAnalyst/Features/WebGraph/WebGraphBuilder.cs index 1feaab51..1c4e65b0 100644 --- a/CSharpCodeAnalyst/Features/WebGraph/WebGraphBuilder.cs +++ b/CSharpCodeAnalyst/Features/WebGraph/WebGraphBuilder.cs @@ -1,13 +1,13 @@ using System.Text.Json; -using CodeGraph.Colors; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Colors; +using CSharpCodeAnalyst.CodeGraph.Graph; using CSharpCodeAnalyst.Features.Graph; using CSharpCodeAnalyst.Features.Graph.Filtering; namespace CSharpCodeAnalyst.Features.WebGraph; /// -/// Transforms a into the JSON shape that +/// Transforms a into the JSON shape that /// the Cytoscape front-end (app.js / renderGraph) expects: { nodes: [...], edges: [...] }. /// It honours the presentation state (collapse/expand) and the (hidden element and /// relationship types). diff --git a/CSharpCodeAnalyst/Features/WebGraph/WebGraphControl.xaml.cs b/CSharpCodeAnalyst/Features/WebGraph/WebGraphControl.xaml.cs index 995a2343..e87f5025 100644 --- a/CSharpCodeAnalyst/Features/WebGraph/WebGraphControl.xaml.cs +++ b/CSharpCodeAnalyst/Features/WebGraph/WebGraphControl.xaml.cs @@ -7,7 +7,7 @@ using System.Windows.Controls.Primitives; using System.Windows.Media.Imaging; using System.Windows.Threading; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; using CSharpCodeAnalyst.Configuration; using CSharpCodeAnalyst.Features.Graph; using CSharpCodeAnalyst.Features.Graph.RenderOptions; diff --git a/CSharpCodeAnalyst/MainViewModel.cs b/CSharpCodeAnalyst/MainViewModel.cs index 7d30933d..f87da267 100644 --- a/CSharpCodeAnalyst/MainViewModel.cs +++ b/CSharpCodeAnalyst/MainViewModel.cs @@ -6,13 +6,13 @@ using System.Runtime.CompilerServices; using System.Windows; using System.Windows.Input; -using CodeGraph.Algorithms.Cycles; -using CodeGraph.Algorithms.Metrics; -using CodeGraph.Algorithms.Partitioning; -using CodeGraph.Graph; -using CodeGraph.Metrics; -using CodeParser.Parser; -using CodeParser.Parser.Config; +using CSharpCodeAnalyst.CodeGraph.Algorithms.Cycles; +using CSharpCodeAnalyst.CodeGraph.Algorithms.Metrics; +using CSharpCodeAnalyst.CodeGraph.Algorithms.Partitioning; +using CSharpCodeAnalyst.CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Metrics; +using CSharpCodeAnalyst.CodeParser.Parser; +using CSharpCodeAnalyst.CodeParser.Parser.Config; using CSharpCodeAnalyst.Configuration; using CSharpCodeAnalyst.Features.AdvancedSearch; using CSharpCodeAnalyst.Features.Ai; diff --git a/CSharpCodeAnalyst/Persistence/Dto/ProjectData.cs b/CSharpCodeAnalyst/Persistence/Dto/ProjectData.cs index 3fd8076b..b3918834 100644 --- a/CSharpCodeAnalyst/Persistence/Dto/ProjectData.cs +++ b/CSharpCodeAnalyst/Persistence/Dto/ProjectData.cs @@ -1,5 +1,5 @@ -using CodeGraph.Graph; -using CodeGraph.Metrics; +using CSharpCodeAnalyst.CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Metrics; using CSharpCodeAnalyst.Features.Gallery; namespace CSharpCodeAnalyst.Persistence.Dto; diff --git a/CSharpCodeAnalyst/Persistence/Dto/SerializableCodeElement.cs b/CSharpCodeAnalyst/Persistence/Dto/SerializableCodeElement.cs index 17150c14..68b00419 100644 --- a/CSharpCodeAnalyst/Persistence/Dto/SerializableCodeElement.cs +++ b/CSharpCodeAnalyst/Persistence/Dto/SerializableCodeElement.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Persistence.Dto; diff --git a/CSharpCodeAnalyst/Persistence/Dto/SerializableRelationship.cs b/CSharpCodeAnalyst/Persistence/Dto/SerializableRelationship.cs index dfc63652..4ae6c982 100644 --- a/CSharpCodeAnalyst/Persistence/Dto/SerializableRelationship.cs +++ b/CSharpCodeAnalyst/Persistence/Dto/SerializableRelationship.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Persistence.Dto; diff --git a/CSharpCodeAnalyst/Shared/Filter/FilterDialog.xaml.cs b/CSharpCodeAnalyst/Shared/Filter/FilterDialog.xaml.cs index 4df39b65..b5392ec2 100644 --- a/CSharpCodeAnalyst/Shared/Filter/FilterDialog.xaml.cs +++ b/CSharpCodeAnalyst/Shared/Filter/FilterDialog.xaml.cs @@ -1,6 +1,6 @@ using System.Text.RegularExpressions; using System.Windows; -using CodeParser.Parser.Config; +using CSharpCodeAnalyst.CodeParser.Parser.Config; using CSharpCodeAnalyst.Resources; namespace CSharpCodeAnalyst.Shared.Filter; diff --git a/CSharpCodeAnalyst/Shared/Messages/CodeElementIconMapper.cs b/CSharpCodeAnalyst/Shared/Messages/CodeElementIconMapper.cs index 1fb297fa..582eab77 100644 --- a/CSharpCodeAnalyst/Shared/Messages/CodeElementIconMapper.cs +++ b/CSharpCodeAnalyst/Shared/Messages/CodeElementIconMapper.cs @@ -1,5 +1,5 @@ using System.Windows.Media.Imaging; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Shared.Messages; diff --git a/CSharpCodeAnalyst/Shared/Messages/CodeGraphRefactored.cs b/CSharpCodeAnalyst/Shared/Messages/CodeGraphRefactored.cs index 689faf11..35f6a050 100644 --- a/CSharpCodeAnalyst/Shared/Messages/CodeGraphRefactored.cs +++ b/CSharpCodeAnalyst/Shared/Messages/CodeGraphRefactored.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Shared.Messages; diff --git a/CSharpCodeAnalyst/Shared/Messages/CycleCalculationComplete.cs b/CSharpCodeAnalyst/Shared/Messages/CycleCalculationComplete.cs index 74404038..f5f0368d 100644 --- a/CSharpCodeAnalyst/Shared/Messages/CycleCalculationComplete.cs +++ b/CSharpCodeAnalyst/Shared/Messages/CycleCalculationComplete.cs @@ -1,4 +1,4 @@ -using CodeGraph.Algorithms.Cycles; +using CSharpCodeAnalyst.CodeGraph.Algorithms.Cycles; namespace CSharpCodeAnalyst.Shared.Messages; diff --git a/CSharpCodeAnalyst/Shared/Messages/ShowCycleGroupRequest.cs b/CSharpCodeAnalyst/Shared/Messages/ShowCycleGroupRequest.cs index 611303ef..be805b67 100644 --- a/CSharpCodeAnalyst/Shared/Messages/ShowCycleGroupRequest.cs +++ b/CSharpCodeAnalyst/Shared/Messages/ShowCycleGroupRequest.cs @@ -1,4 +1,4 @@ -using CodeGraph.Algorithms.Cycles; +using CSharpCodeAnalyst.CodeGraph.Algorithms.Cycles; namespace CSharpCodeAnalyst.Shared.Messages; diff --git a/CSharpCodeAnalyst/Shared/QuickInfo.cs b/CSharpCodeAnalyst/Shared/QuickInfo.cs index 5045d21e..df317a4b 100644 --- a/CSharpCodeAnalyst/Shared/QuickInfo.cs +++ b/CSharpCodeAnalyst/Shared/QuickInfo.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.Shared; diff --git a/CSharpCodeAnalyst/Shared/Services/SourceLocationNavigator.cs b/CSharpCodeAnalyst/Shared/Services/SourceLocationNavigator.cs index d7800a16..36e3cdfa 100644 --- a/CSharpCodeAnalyst/Shared/Services/SourceLocationNavigator.cs +++ b/CSharpCodeAnalyst/Shared/Services/SourceLocationNavigator.cs @@ -2,7 +2,7 @@ using System.IO; using System.Runtime.InteropServices; using System.Windows; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; using CSharpCodeAnalyst.Resources; namespace CSharpCodeAnalyst.Shared.Services; diff --git a/CSharpCodeAnalyst/Shared/UI/CodeElementLineViewModel.cs b/CSharpCodeAnalyst/Shared/UI/CodeElementLineViewModel.cs index a11537e4..26b5272e 100644 --- a/CSharpCodeAnalyst/Shared/UI/CodeElementLineViewModel.cs +++ b/CSharpCodeAnalyst/Shared/UI/CodeElementLineViewModel.cs @@ -1,5 +1,5 @@ using System.Windows.Media.Imaging; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; using CSharpCodeAnalyst.Shared.Messages; namespace CSharpCodeAnalyst.Shared.UI; diff --git a/CodeGraph/Algorithms/Cycles/CodeElementClassifier.cs b/CodeGraph/Algorithms/Cycles/CodeElementClassifier.cs index cda1d137..df19a8fd 100644 --- a/CodeGraph/Algorithms/Cycles/CodeElementClassifier.cs +++ b/CodeGraph/Algorithms/Cycles/CodeElementClassifier.cs @@ -1,6 +1,6 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; -namespace CodeGraph.Algorithms.Cycles; +namespace CSharpCodeAnalyst.CodeGraph.Algorithms.Cycles; public static class CodeElementClassifier { diff --git a/CodeGraph/Algorithms/Cycles/CodeGraphBuilder.cs b/CodeGraph/Algorithms/Cycles/CodeGraphBuilder.cs index 5e2e5f37..bc6632f1 100644 --- a/CodeGraph/Algorithms/Cycles/CodeGraphBuilder.cs +++ b/CodeGraph/Algorithms/Cycles/CodeGraphBuilder.cs @@ -1,6 +1,6 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; -namespace CodeGraph.Algorithms.Cycles; +namespace CSharpCodeAnalyst.CodeGraph.Algorithms.Cycles; public static class CodeGraphBuilder { diff --git a/CodeGraph/Algorithms/Cycles/CycleFinder.cs b/CodeGraph/Algorithms/Cycles/CycleFinder.cs index 3b213d58..271471f3 100644 --- a/CodeGraph/Algorithms/Cycles/CycleFinder.cs +++ b/CodeGraph/Algorithms/Cycles/CycleFinder.cs @@ -1,4 +1,4 @@ -namespace CodeGraph.Algorithms.Cycles; +namespace CSharpCodeAnalyst.CodeGraph.Algorithms.Cycles; public static class CycleFinder { diff --git a/CodeGraph/Algorithms/Cycles/CycleGroup.cs b/CodeGraph/Algorithms/Cycles/CycleGroup.cs index 99e60c96..68277fea 100644 --- a/CodeGraph/Algorithms/Cycles/CycleGroup.cs +++ b/CodeGraph/Algorithms/Cycles/CycleGroup.cs @@ -1,4 +1,4 @@ -namespace CodeGraph.Algorithms.Cycles; +namespace CSharpCodeAnalyst.CodeGraph.Algorithms.Cycles; public class CycleGroup(Graph.CodeGraph codeGraph) { diff --git a/CodeGraph/Algorithms/Cycles/IncompleteLogicException.cs b/CodeGraph/Algorithms/Cycles/IncompleteLogicException.cs index 081241c0..d56b24a4 100644 --- a/CodeGraph/Algorithms/Cycles/IncompleteLogicException.cs +++ b/CodeGraph/Algorithms/Cycles/IncompleteLogicException.cs @@ -1,4 +1,4 @@ -namespace CodeGraph.Algorithms.Cycles; +namespace CSharpCodeAnalyst.CodeGraph.Algorithms.Cycles; [Serializable] internal class IncompleteLogicException : Exception diff --git a/CodeGraph/Algorithms/Cycles/RelationshipClassifier.cs b/CodeGraph/Algorithms/Cycles/RelationshipClassifier.cs index da92ff02..4ee7796d 100644 --- a/CodeGraph/Algorithms/Cycles/RelationshipClassifier.cs +++ b/CodeGraph/Algorithms/Cycles/RelationshipClassifier.cs @@ -1,6 +1,6 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; -namespace CodeGraph.Algorithms.Cycles; +namespace CSharpCodeAnalyst.CodeGraph.Algorithms.Cycles; public static class RelationshipClassifier { diff --git a/CodeGraph/Algorithms/Cycles/SearchGraph.cs b/CodeGraph/Algorithms/Cycles/SearchGraph.cs index 02f374fd..76ad9657 100644 --- a/CodeGraph/Algorithms/Cycles/SearchGraph.cs +++ b/CodeGraph/Algorithms/Cycles/SearchGraph.cs @@ -1,6 +1,6 @@ -using CodeGraph.Contracts; +using CSharpCodeAnalyst.CodeGraph.Contracts; -namespace CodeGraph.Algorithms.Cycles; +namespace CSharpCodeAnalyst.CodeGraph.Algorithms.Cycles; public class SearchGraph : IGraphRepresentation { diff --git a/CodeGraph/Algorithms/Cycles/SearchGraphBuilder.cs b/CodeGraph/Algorithms/Cycles/SearchGraphBuilder.cs index a123335b..2ec596b1 100644 --- a/CodeGraph/Algorithms/Cycles/SearchGraphBuilder.cs +++ b/CodeGraph/Algorithms/Cycles/SearchGraphBuilder.cs @@ -1,6 +1,6 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; -namespace CodeGraph.Algorithms.Cycles; +namespace CSharpCodeAnalyst.CodeGraph.Algorithms.Cycles; public static class SearchGraphBuilder { diff --git a/CodeGraph/Algorithms/Cycles/SearchNode.cs b/CodeGraph/Algorithms/Cycles/SearchNode.cs index 1285d2a2..61e44324 100644 --- a/CodeGraph/Algorithms/Cycles/SearchNode.cs +++ b/CodeGraph/Algorithms/Cycles/SearchNode.cs @@ -1,9 +1,9 @@ using System.Diagnostics; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; // ReSharper disable NotResolvedInText -namespace CodeGraph.Algorithms.Cycles; +namespace CSharpCodeAnalyst.CodeGraph.Algorithms.Cycles; [DebuggerDisplay("{OriginalElement.ElementType}: {OriginalElement.Name}")] public class SearchNode(string id, CodeElement originalElement) diff --git a/CodeGraph/Algorithms/Cycles/SearchNodeComparer.cs b/CodeGraph/Algorithms/Cycles/SearchNodeComparer.cs index a84f1578..6dc4674b 100644 --- a/CodeGraph/Algorithms/Cycles/SearchNodeComparer.cs +++ b/CodeGraph/Algorithms/Cycles/SearchNodeComparer.cs @@ -1,6 +1,6 @@ using System.Runtime.CompilerServices; -namespace CodeGraph.Algorithms.Cycles; +namespace CSharpCodeAnalyst.CodeGraph.Algorithms.Cycles; public class SearchNodeComparer : IEqualityComparer { diff --git a/CodeGraph/Algorithms/Cycles/Tarjan.cs b/CodeGraph/Algorithms/Cycles/Tarjan.cs index 8413097a..3a3840de 100644 --- a/CodeGraph/Algorithms/Cycles/Tarjan.cs +++ b/CodeGraph/Algorithms/Cycles/Tarjan.cs @@ -1,6 +1,6 @@ -using CodeGraph.Contracts; +using CSharpCodeAnalyst.CodeGraph.Contracts; -namespace CodeGraph.Algorithms.Cycles; +namespace CSharpCodeAnalyst.CodeGraph.Algorithms.Cycles; /// /// Returns the strongly connected components. diff --git a/CodeGraph/Algorithms/Metrics/DependencyMetrics.cs b/CodeGraph/Algorithms/Metrics/DependencyMetrics.cs index 4ccd61ff..75e781c3 100644 --- a/CodeGraph/Algorithms/Metrics/DependencyMetrics.cs +++ b/CodeGraph/Algorithms/Metrics/DependencyMetrics.cs @@ -1,6 +1,6 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; -namespace CodeGraph.Algorithms.Metrics; +namespace CSharpCodeAnalyst.CodeGraph.Algorithms.Metrics; public class InOutDegree(CodeElement element) { diff --git a/CodeGraph/Algorithms/Metrics/TypeDependencyAnalysis.cs b/CodeGraph/Algorithms/Metrics/TypeDependencyAnalysis.cs index 8c4ad391..e73af1ed 100644 --- a/CodeGraph/Algorithms/Metrics/TypeDependencyAnalysis.cs +++ b/CodeGraph/Algorithms/Metrics/TypeDependencyAnalysis.cs @@ -1,6 +1,6 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; -namespace CodeGraph.Algorithms.Metrics; +namespace CSharpCodeAnalyst.CodeGraph.Algorithms.Metrics; /// /// One row of the type-dependency result: a type with its coupling degrees, its change impact diff --git a/CodeGraph/Algorithms/Partitioning/CodeElementPartitioner.cs b/CodeGraph/Algorithms/Partitioning/CodeElementPartitioner.cs index 113367e4..54463390 100644 --- a/CodeGraph/Algorithms/Partitioning/CodeElementPartitioner.cs +++ b/CodeGraph/Algorithms/Partitioning/CodeElementPartitioner.cs @@ -1,6 +1,6 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; -namespace CodeGraph.Algorithms.Partitioning; +namespace CSharpCodeAnalyst.CodeGraph.Algorithms.Partitioning; /// /// Finds disjunct partitions of code elements that are related to each other. diff --git a/CodeGraph/Algorithms/Partitioning/TypeCohesionAnalysis.cs b/CodeGraph/Algorithms/Partitioning/TypeCohesionAnalysis.cs index 33e6b093..c5bc529d 100644 --- a/CodeGraph/Algorithms/Partitioning/TypeCohesionAnalysis.cs +++ b/CodeGraph/Algorithms/Partitioning/TypeCohesionAnalysis.cs @@ -1,6 +1,6 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; -namespace CodeGraph.Algorithms.Partitioning; +namespace CSharpCodeAnalyst.CodeGraph.Algorithms.Partitioning; /// /// One row of the cohesion result: a class that decomposes into several independent member diff --git a/CodeGraph/CodeGraph.csproj b/CodeGraph/CSharpCodeAnalyst.CodeGraph.csproj similarity index 87% rename from CodeGraph/CodeGraph.csproj rename to CodeGraph/CSharpCodeAnalyst.CodeGraph.csproj index 8c076cd6..ce6e4cc2 100644 --- a/CodeGraph/CodeGraph.csproj +++ b/CodeGraph/CSharpCodeAnalyst.CodeGraph.csproj @@ -4,7 +4,6 @@ net10.0.0 enable enable - CodeGraph diff --git a/CodeGraph/Colors/ColorDefinitions.cs b/CodeGraph/Colors/ColorDefinitions.cs index 8f1ee85f..9c1281d7 100644 --- a/CodeGraph/Colors/ColorDefinitions.cs +++ b/CodeGraph/Colors/ColorDefinitions.cs @@ -1,6 +1,6 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; -namespace CodeGraph.Colors; +namespace CSharpCodeAnalyst.CodeGraph.Colors; public static class ColorDefinitions { diff --git a/CodeGraph/Contracts/ICodeGraphExplorer.cs b/CodeGraph/Contracts/ICodeGraphExplorer.cs index 7ca34a7d..79819d0e 100644 --- a/CodeGraph/Contracts/ICodeGraphExplorer.cs +++ b/CodeGraph/Contracts/ICodeGraphExplorer.cs @@ -1,7 +1,7 @@ -using CodeGraph.Exploration; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Exploration; +using CSharpCodeAnalyst.CodeGraph.Graph; -namespace CodeGraph.Contracts; +namespace CSharpCodeAnalyst.CodeGraph.Contracts; public interface ICodeGraphExplorer { diff --git a/CodeGraph/Contracts/IGraphRepresentation.cs b/CodeGraph/Contracts/IGraphRepresentation.cs index 28d85ac2..7fa1e05b 100644 --- a/CodeGraph/Contracts/IGraphRepresentation.cs +++ b/CodeGraph/Contracts/IGraphRepresentation.cs @@ -1,4 +1,4 @@ -namespace CodeGraph.Contracts; +namespace CSharpCodeAnalyst.CodeGraph.Contracts; public interface IGraphRepresentation { diff --git a/CodeGraph/Contracts/IParserDiagnostics.cs b/CodeGraph/Contracts/IParserDiagnostics.cs index a2ec5200..96028eac 100644 --- a/CodeGraph/Contracts/IParserDiagnostics.cs +++ b/CodeGraph/Contracts/IParserDiagnostics.cs @@ -1,4 +1,4 @@ -namespace CodeGraph.Contracts; +namespace CSharpCodeAnalyst.CodeGraph.Contracts; public interface IParserDiagnostics { diff --git a/CodeGraph/Contracts/IProgress.cs b/CodeGraph/Contracts/IProgress.cs index d8e08471..a4f4a419 100644 --- a/CodeGraph/Contracts/IProgress.cs +++ b/CodeGraph/Contracts/IProgress.cs @@ -1,4 +1,4 @@ -namespace CodeGraph.Contracts; +namespace CSharpCodeAnalyst.CodeGraph.Contracts; public interface IProgress { diff --git a/CodeGraph/Contracts/ParserProgressArg.cs b/CodeGraph/Contracts/ParserProgressArg.cs index f27639d1..676a634c 100644 --- a/CodeGraph/Contracts/ParserProgressArg.cs +++ b/CodeGraph/Contracts/ParserProgressArg.cs @@ -1,4 +1,4 @@ -namespace CodeGraph.Contracts; +namespace CSharpCodeAnalyst.CodeGraph.Contracts; public class ParserProgressArg(string message) : EventArgs { diff --git a/CodeGraph/Exploration/CodeGraphExplorer.cs b/CodeGraph/Exploration/CodeGraphExplorer.cs index 400bff38..c6451814 100644 --- a/CodeGraph/Exploration/CodeGraphExplorer.cs +++ b/CodeGraph/Exploration/CodeGraphExplorer.cs @@ -1,9 +1,9 @@ -using CodeGraph.Algorithms.Cycles; -using CodeGraph.Contracts; -using CodeGraph.Graph; -using System.Diagnostics; +using System.Diagnostics; +using CSharpCodeAnalyst.CodeGraph.Algorithms.Cycles; +using CSharpCodeAnalyst.CodeGraph.Contracts; +using CSharpCodeAnalyst.CodeGraph.Graph; -namespace CodeGraph.Exploration; +namespace CSharpCodeAnalyst.CodeGraph.Exploration; public class CodeGraphExplorer : ICodeGraphExplorer { diff --git a/CodeGraph/Exploration/Context.cs b/CodeGraph/Exploration/Context.cs index 35f0f002..ded7bab7 100644 --- a/CodeGraph/Exploration/Context.cs +++ b/CodeGraph/Exploration/Context.cs @@ -1,6 +1,6 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; -namespace CodeGraph.Exploration; +namespace CSharpCodeAnalyst.CodeGraph.Exploration; internal class Context(Graph.CodeGraph codeGraph) { diff --git a/CodeGraph/Export/CodeGraphSerializer.cs b/CodeGraph/Export/CodeGraphSerializer.cs index b8dd431c..30053320 100644 --- a/CodeGraph/Export/CodeGraphSerializer.cs +++ b/CodeGraph/Export/CodeGraphSerializer.cs @@ -1,7 +1,7 @@ using System.Text; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; -namespace CodeGraph.Export; +namespace CSharpCodeAnalyst.CodeGraph.Export; /// /// Serializes and deserializes CodeGraph to/from a human-readable text format. diff --git a/CodeGraph/Export/DgmlExport.cs b/CodeGraph/Export/DgmlExport.cs index 18d495c6..2b824b53 100644 --- a/CodeGraph/Export/DgmlExport.cs +++ b/CodeGraph/Export/DgmlExport.cs @@ -1,7 +1,7 @@ -using CodeGraph.Colors; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Colors; +using CSharpCodeAnalyst.CodeGraph.Graph; -namespace CodeGraph.Export; +namespace CSharpCodeAnalyst.CodeGraph.Export; public static class DgmlExport { diff --git a/CodeGraph/Export/DgmlFileBuilder.cs b/CodeGraph/Export/DgmlFileBuilder.cs index b097edec..ee2faa5b 100644 --- a/CodeGraph/Export/DgmlFileBuilder.cs +++ b/CodeGraph/Export/DgmlFileBuilder.cs @@ -1,6 +1,6 @@ using System.Xml; -namespace CodeGraph.Export; +namespace CSharpCodeAnalyst.CodeGraph.Export; /// /// Builder class to create a directed graph file to be processed with Visual Studio's diff --git a/CodeGraph/Export/DgmlHierarchyExport.cs b/CodeGraph/Export/DgmlHierarchyExport.cs index c095ca48..56953246 100644 --- a/CodeGraph/Export/DgmlHierarchyExport.cs +++ b/CodeGraph/Export/DgmlHierarchyExport.cs @@ -1,7 +1,7 @@ -using CodeGraph.Colors; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Colors; +using CSharpCodeAnalyst.CodeGraph.Graph; -namespace CodeGraph.Export; +namespace CSharpCodeAnalyst.CodeGraph.Export; /// /// Debug class to export the hierarchy of a code graph to a dgml file. diff --git a/CodeGraph/Export/DgmlRelationshipExport.cs b/CodeGraph/Export/DgmlRelationshipExport.cs index 101cc2f9..dafa9900 100644 --- a/CodeGraph/Export/DgmlRelationshipExport.cs +++ b/CodeGraph/Export/DgmlRelationshipExport.cs @@ -1,7 +1,7 @@ -using CodeGraph.Colors; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Colors; +using CSharpCodeAnalyst.CodeGraph.Graph; -namespace CodeGraph.Export; +namespace CSharpCodeAnalyst.CodeGraph.Export; /// /// Debug class to export the relationship information of a code graph to a dgml file. diff --git a/CodeGraph/Export/DsiExport.cs b/CodeGraph/Export/DsiExport.cs index 8c4bb2ea..c756b292 100644 --- a/CodeGraph/Export/DsiExport.cs +++ b/CodeGraph/Export/DsiExport.cs @@ -1,6 +1,6 @@ using System.Xml.Linq; -namespace CodeGraph.Export; +namespace CSharpCodeAnalyst.CodeGraph.Export; public static class DsiExport { diff --git a/CodeGraph/Export/PlantUmlExport.cs b/CodeGraph/Export/PlantUmlExport.cs index f44ca257..c38f9567 100644 --- a/CodeGraph/Export/PlantUmlExport.cs +++ b/CodeGraph/Export/PlantUmlExport.cs @@ -1,7 +1,7 @@ using System.Text; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; -namespace CodeGraph.Export; +namespace CSharpCodeAnalyst.CodeGraph.Export; /// /// Exports a CodeGraph to PlantUML syntax. diff --git a/CodeGraph/Graph/CodeElement.cs b/CodeGraph/Graph/CodeElement.cs index d1e73171..b16709ed 100644 --- a/CodeGraph/Graph/CodeElement.cs +++ b/CodeGraph/Graph/CodeElement.cs @@ -1,6 +1,6 @@ using System.Diagnostics; -namespace CodeGraph.Graph; +namespace CSharpCodeAnalyst.CodeGraph.Graph; [DebuggerDisplay("{ElementType}: {Name} {(IsExternal ? \"(External)\" : \"\")}")] public class CodeElement(string id, CodeElementType elementType, string name, string fullName, CodeElement? parent) diff --git a/CodeGraph/Graph/CodeElementType.cs b/CodeGraph/Graph/CodeElementType.cs index 4dfa67d6..81144a7b 100644 --- a/CodeGraph/Graph/CodeElementType.cs +++ b/CodeGraph/Graph/CodeElementType.cs @@ -1,4 +1,4 @@ -namespace CodeGraph.Graph; +namespace CSharpCodeAnalyst.CodeGraph.Graph; public enum CodeElementType { diff --git a/CodeGraph/Graph/CodeGraph.cs b/CodeGraph/Graph/CodeGraph.cs index a355cc45..1b3e7671 100644 --- a/CodeGraph/Graph/CodeGraph.cs +++ b/CodeGraph/Graph/CodeGraph.cs @@ -1,6 +1,6 @@ -using CodeGraph.Contracts; +using CSharpCodeAnalyst.CodeGraph.Contracts; -namespace CodeGraph.Graph; +namespace CSharpCodeAnalyst.CodeGraph.Graph; public record IntegrationResult(CodeElement CodeElement, bool IsAdded); diff --git a/CodeGraph/Graph/CodeGraphExtensions.cs b/CodeGraph/Graph/CodeGraphExtensions.cs index 91bb6ce0..8edf5112 100644 --- a/CodeGraph/Graph/CodeGraphExtensions.cs +++ b/CodeGraph/Graph/CodeGraphExtensions.cs @@ -1,4 +1,4 @@ -namespace CodeGraph.Graph; +namespace CSharpCodeAnalyst.CodeGraph.Graph; /// /// Set of basic algorithms to build for higher algorithms diff --git a/CodeGraph/Graph/Relationship.cs b/CodeGraph/Graph/Relationship.cs index c9a8ef8b..5069d9f9 100644 --- a/CodeGraph/Graph/Relationship.cs +++ b/CodeGraph/Graph/Relationship.cs @@ -1,7 +1,7 @@ using System.Diagnostics; using System.Text.Json.Serialization; -namespace CodeGraph.Graph; +namespace CSharpCodeAnalyst.CodeGraph.Graph; [DebuggerDisplay("{Type}")] public class Relationship diff --git a/CodeGraph/Graph/RelationshipAttribute.cs b/CodeGraph/Graph/RelationshipAttribute.cs index 5b4cf3e7..93a9fc5e 100644 --- a/CodeGraph/Graph/RelationshipAttribute.cs +++ b/CodeGraph/Graph/RelationshipAttribute.cs @@ -1,4 +1,4 @@ -namespace CodeGraph.Graph; +namespace CSharpCodeAnalyst.CodeGraph.Graph; [Flags] public enum RelationshipAttribute : uint diff --git a/CodeGraph/Graph/RelationshipType.cs b/CodeGraph/Graph/RelationshipType.cs index 9433f89f..8d81238f 100644 --- a/CodeGraph/Graph/RelationshipType.cs +++ b/CodeGraph/Graph/RelationshipType.cs @@ -1,4 +1,4 @@ -namespace CodeGraph.Graph; +namespace CSharpCodeAnalyst.CodeGraph.Graph; public enum RelationshipType { diff --git a/CodeGraph/Graph/RelationshipTypeExtensions.cs b/CodeGraph/Graph/RelationshipTypeExtensions.cs index c186a4e2..40a41f82 100644 --- a/CodeGraph/Graph/RelationshipTypeExtensions.cs +++ b/CodeGraph/Graph/RelationshipTypeExtensions.cs @@ -1,4 +1,4 @@ -namespace CodeGraph.Graph; +namespace CSharpCodeAnalyst.CodeGraph.Graph; public static class RelationshipTypeExtensions { diff --git a/CodeGraph/Graph/SourceLocation.cs b/CodeGraph/Graph/SourceLocation.cs index aa50bd91..76c28f2c 100644 --- a/CodeGraph/Graph/SourceLocation.cs +++ b/CodeGraph/Graph/SourceLocation.cs @@ -1,4 +1,4 @@ -namespace CodeGraph.Graph; +namespace CSharpCodeAnalyst.CodeGraph.Graph; public class SourceLocation { diff --git a/CodeGraph/Metrics/MemberMetrics.cs b/CodeGraph/Metrics/MemberMetrics.cs index 869afbc7..05ca461a 100644 --- a/CodeGraph/Metrics/MemberMetrics.cs +++ b/CodeGraph/Metrics/MemberMetrics.cs @@ -1,4 +1,4 @@ -namespace CodeGraph.Metrics; +namespace CSharpCodeAnalyst.CodeGraph.Metrics; /// /// Source-level metrics for a single member (method, ...), collected optionally during parsing diff --git a/CodeGraph/Metrics/MetricStore.cs b/CodeGraph/Metrics/MetricStore.cs index fe840dad..68830d0b 100644 --- a/CodeGraph/Metrics/MetricStore.cs +++ b/CodeGraph/Metrics/MetricStore.cs @@ -1,4 +1,4 @@ -namespace CodeGraph.Metrics; +namespace CSharpCodeAnalyst.CodeGraph.Metrics; /// /// Holds the optional per-member source metrics, keyed by . diff --git a/CodeParser/CodeParser.csproj b/CodeParser/CSharpCodeAnalyst.CodeParser.csproj similarity index 93% rename from CodeParser/CodeParser.csproj rename to CodeParser/CSharpCodeAnalyst.CodeParser.csproj index 1f574074..fd4b065d 100644 --- a/CodeParser/CodeParser.csproj +++ b/CodeParser/CSharpCodeAnalyst.CodeParser.csproj @@ -20,7 +20,7 @@ - + diff --git a/CodeParser/Parser/Artifacts.cs b/CodeParser/Parser/Artifacts.cs index 37856bc4..364e5767 100644 --- a/CodeParser/Parser/Artifacts.cs +++ b/CodeParser/Parser/Artifacts.cs @@ -1,9 +1,9 @@ using System.Collections.ObjectModel; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace CodeParser.Parser; +namespace CSharpCodeAnalyst.CodeParser.Parser; /// /// Artifacts from the first phase of the parser. diff --git a/CodeParser/Parser/CodeGraphPlausibilityChecks.cs b/CodeParser/Parser/CodeGraphPlausibilityChecks.cs index 436b391b..b57d51da 100644 --- a/CodeParser/Parser/CodeGraphPlausibilityChecks.cs +++ b/CodeParser/Parser/CodeGraphPlausibilityChecks.cs @@ -1,6 +1,6 @@ using System.Diagnostics; -namespace CodeParser.Parser; +namespace CSharpCodeAnalyst.CodeParser.Parser; internal static class CodeGraphPlausibilityChecks { diff --git a/CodeParser/Parser/Config/ParserConfig.cs b/CodeParser/Parser/Config/ParserConfig.cs index ee811a76..aedd915e 100644 --- a/CodeParser/Parser/Config/ParserConfig.cs +++ b/CodeParser/Parser/Config/ParserConfig.cs @@ -1,4 +1,4 @@ -namespace CodeParser.Parser.Config; +namespace CSharpCodeAnalyst.CodeParser.Parser.Config; public class ParserConfig { diff --git a/CodeParser/Parser/Config/ProjectExclusionRegExCollection.cs b/CodeParser/Parser/Config/ProjectExclusionRegExCollection.cs index 51a1006c..c4a4c158 100644 --- a/CodeParser/Parser/Config/ProjectExclusionRegExCollection.cs +++ b/CodeParser/Parser/Config/ProjectExclusionRegExCollection.cs @@ -1,6 +1,6 @@ using System.Text.RegularExpressions; -namespace CodeParser.Parser.Config; +namespace CSharpCodeAnalyst.CodeParser.Parser.Config; public class ProjectExclusionRegExCollection { diff --git a/CodeParser/Parser/ExternalCodeElementCache.cs b/CodeParser/Parser/ExternalCodeElementCache.cs index 0d37f32e..e1887a41 100644 --- a/CodeParser/Parser/ExternalCodeElementCache.cs +++ b/CodeParser/Parser/ExternalCodeElementCache.cs @@ -1,7 +1,7 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; using Microsoft.CodeAnalysis; -namespace CodeParser.Parser; +namespace CSharpCodeAnalyst.CodeParser.Parser; /// /// In pass 1 only internal code elements are created. diff --git a/CodeParser/Parser/HierarchyAnalyzer.cs b/CodeParser/Parser/HierarchyAnalyzer.cs index 7004cdf4..0e961fb6 100644 --- a/CodeParser/Parser/HierarchyAnalyzer.cs +++ b/CodeParser/Parser/HierarchyAnalyzer.cs @@ -1,10 +1,10 @@ using System.Diagnostics; -using CodeGraph.Graph; -using CodeParser.Parser.Config; +using CSharpCodeAnalyst.CodeGraph.Graph; +using CSharpCodeAnalyst.CodeParser.Parser.Config; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace CodeParser.Parser; +namespace CSharpCodeAnalyst.CodeParser.Parser; /// /// Extracts all code elements found in the solution together with other artifacts needed for phase 2. diff --git a/CodeParser/Parser/ISyntaxNodeHandler.cs b/CodeParser/Parser/ISyntaxNodeHandler.cs index 7d896ddd..9d06d67f 100644 --- a/CodeParser/Parser/ISyntaxNodeHandler.cs +++ b/CodeParser/Parser/ISyntaxNodeHandler.cs @@ -1,8 +1,8 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace CodeParser.Parser; +namespace CSharpCodeAnalyst.CodeParser.Parser; /// /// Methods the syntax walkers call to report findings. diff --git a/CodeParser/Parser/Initializer.cs b/CodeParser/Parser/Initializer.cs index c408fe40..9a9e365c 100644 --- a/CodeParser/Parser/Initializer.cs +++ b/CodeParser/Parser/Initializer.cs @@ -1,7 +1,7 @@ using System.Diagnostics; using Microsoft.Build.Locator; -namespace CodeParser.Parser; +namespace CSharpCodeAnalyst.CodeParser.Parser; public static class Initializer { diff --git a/CodeParser/Parser/LambdaBodyWalker.cs b/CodeParser/Parser/LambdaBodyWalker.cs index f99eae74..f4b6f293 100644 --- a/CodeParser/Parser/LambdaBodyWalker.cs +++ b/CodeParser/Parser/LambdaBodyWalker.cs @@ -1,9 +1,9 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace CodeParser.Parser; +namespace CSharpCodeAnalyst.CodeParser.Parser; /// /// Specialized walker for lambda/anonymous method bodies. diff --git a/CodeParser/Parser/MethodBodyWalker.cs b/CodeParser/Parser/MethodBodyWalker.cs index fac6bbaa..e37bd938 100644 --- a/CodeParser/Parser/MethodBodyWalker.cs +++ b/CodeParser/Parser/MethodBodyWalker.cs @@ -1,8 +1,8 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace CodeParser.Parser; +namespace CSharpCodeAnalyst.CodeParser.Parser; /// /// Syntax walker for analyzing method and property bodies. diff --git a/CodeParser/Parser/ParseResult.cs b/CodeParser/Parser/ParseResult.cs index c8fce04c..e523ad47 100644 --- a/CodeParser/Parser/ParseResult.cs +++ b/CodeParser/Parser/ParseResult.cs @@ -1,6 +1,6 @@ -using CodeGraph.Metrics; +using CSharpCodeAnalyst.CodeGraph.Metrics; -namespace CodeParser.Parser; +namespace CSharpCodeAnalyst.CodeParser.Parser; /// /// The complete output of a parse: the code graph together with the (optional) per-member source diff --git a/CodeParser/Parser/Parser.cs b/CodeParser/Parser/Parser.cs index c59f8e94..1ba65dfc 100644 --- a/CodeParser/Parser/Parser.cs +++ b/CodeParser/Parser/Parser.cs @@ -1,14 +1,14 @@ using System.Diagnostics; -using CodeGraph.Contracts; -using CodeGraph.Graph; -using CodeGraph.Metrics; -using CodeParser.Parser.Config; +using CSharpCodeAnalyst.CodeGraph.Contracts; +using CSharpCodeAnalyst.CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Metrics; +using CSharpCodeAnalyst.CodeParser.Parser.Config; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.MSBuild; using Microsoft.CodeAnalysis.Text; -namespace CodeParser.Parser; +namespace CSharpCodeAnalyst.CodeParser.Parser; /// /// Parses a solution and builds a code graph. diff --git a/CodeParser/Parser/ParserDiagnostics.cs b/CodeParser/Parser/ParserDiagnostics.cs index add48936..2fc43282 100644 --- a/CodeParser/Parser/ParserDiagnostics.cs +++ b/CodeParser/Parser/ParserDiagnostics.cs @@ -1,7 +1,7 @@ -using CodeGraph.Contracts; +using CSharpCodeAnalyst.CodeGraph.Contracts; using Microsoft.CodeAnalysis; -namespace CodeParser.Parser; +namespace CSharpCodeAnalyst.CodeParser.Parser; internal class ParserDiagnostics : IParserDiagnostics { diff --git a/CodeParser/Parser/Progress.cs b/CodeParser/Parser/Progress.cs index 852c13ce..6988cad3 100644 --- a/CodeParser/Parser/Progress.cs +++ b/CodeParser/Parser/Progress.cs @@ -1,6 +1,6 @@ -using CodeGraph.Contracts; +using CSharpCodeAnalyst.CodeGraph.Contracts; -namespace CodeParser.Parser; +namespace CSharpCodeAnalyst.CodeParser.Parser; public class Progress : IProgress { diff --git a/CodeParser/Parser/ProjectSelector.cs b/CodeParser/Parser/ProjectSelector.cs index 03dddd51..e48015e8 100644 --- a/CodeParser/Parser/ProjectSelector.cs +++ b/CodeParser/Parser/ProjectSelector.cs @@ -1,6 +1,6 @@ using System.Text.RegularExpressions; -namespace CodeParser.Parser; +namespace CSharpCodeAnalyst.CodeParser.Parser; /// /// A project reduced to the bits needed to decide which one to keep when several projects share the diff --git a/CodeParser/Parser/PropertyAccessClassifier.cs b/CodeParser/Parser/PropertyAccessClassifier.cs index e8586f2e..f6b4269a 100644 --- a/CodeParser/Parser/PropertyAccessClassifier.cs +++ b/CodeParser/Parser/PropertyAccessClassifier.cs @@ -2,7 +2,7 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace CodeParser.Parser; +namespace CSharpCodeAnalyst.CodeParser.Parser; /// /// Whether a property reference reads (getter), writes (setter) or does both. diff --git a/CodeParser/Parser/RelationshipAnalyzer.cs b/CodeParser/Parser/RelationshipAnalyzer.cs index efd91d19..bb454cbd 100644 --- a/CodeParser/Parser/RelationshipAnalyzer.cs +++ b/CodeParser/Parser/RelationshipAnalyzer.cs @@ -1,11 +1,11 @@ using System.Diagnostics; -using CodeGraph.Graph; -using CodeParser.Parser.Config; +using CSharpCodeAnalyst.CodeGraph.Graph; +using CSharpCodeAnalyst.CodeParser.Parser.Config; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace CodeParser.Parser; +namespace CSharpCodeAnalyst.CodeParser.Parser; /// /// Phase 2/2 of the parser: Analyzing relationships between code elements. diff --git a/CodeParser/Parser/SourceMetricsCollector.cs b/CodeParser/Parser/SourceMetricsCollector.cs index 619d4730..8d2ef92f 100644 --- a/CodeParser/Parser/SourceMetricsCollector.cs +++ b/CodeParser/Parser/SourceMetricsCollector.cs @@ -1,9 +1,9 @@ -using CodeGraph.Metrics; +using CSharpCodeAnalyst.CodeGraph.Metrics; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace CodeParser.Parser; +namespace CSharpCodeAnalyst.CodeParser.Parser; /// /// Computes source-level metrics for a member from its declaration syntax. Deliberately diff --git a/CodeParser/Parser/SymbolExtensions.cs b/CodeParser/Parser/SymbolExtensions.cs index 0cbfae74..1f830b62 100644 --- a/CodeParser/Parser/SymbolExtensions.cs +++ b/CodeParser/Parser/SymbolExtensions.cs @@ -1,9 +1,9 @@ using System.Diagnostics; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace CodeParser.Parser; +namespace CSharpCodeAnalyst.CodeParser.Parser; /// /// Symbol identification across compilations. diff --git a/CodeParser/Parser/SyntaxExtensions.cs b/CodeParser/Parser/SyntaxExtensions.cs index f231bb24..821bb7f8 100644 --- a/CodeParser/Parser/SyntaxExtensions.cs +++ b/CodeParser/Parser/SyntaxExtensions.cs @@ -1,8 +1,8 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace CodeParser.Parser; +namespace CSharpCodeAnalyst.CodeParser.Parser; internal static class SyntaxExtensions { diff --git a/CodeParser/Parser/SyntaxWalkerBase.cs b/CodeParser/Parser/SyntaxWalkerBase.cs index d2db7f25..5b98853d 100644 --- a/CodeParser/Parser/SyntaxWalkerBase.cs +++ b/CodeParser/Parser/SyntaxWalkerBase.cs @@ -1,9 +1,9 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; -namespace CodeParser.Parser; +namespace CSharpCodeAnalyst.CodeParser.Parser; /// /// diff --git a/Tests/ApprovalTests/ApprovalTestBase.cs b/Tests/ApprovalTests/ApprovalTestBase.cs index c2198d9b..fc585285 100644 --- a/Tests/ApprovalTests/ApprovalTestBase.cs +++ b/Tests/ApprovalTests/ApprovalTestBase.cs @@ -1,6 +1,6 @@ -using CodeGraph.Graph; -using CodeParser.Parser; -using CodeParser.Parser.Config; +using CSharpCodeAnalyst.CodeGraph.Graph; +using CSharpCodeAnalyst.CodeParser.Parser; +using CSharpCodeAnalyst.CodeParser.Parser.Config; namespace CodeParserTests.ApprovalTests; @@ -33,7 +33,7 @@ public override int GetHashCode() internal static class Init { - private static CodeGraph.Graph.CodeGraph? _instance; + private static CodeGraph? _instance; static Init() { @@ -41,7 +41,7 @@ static Init() Initializer.InitializeMsBuildLocator(); } - public static async Task LoadAsync() + public static async Task LoadAsync() { if (_instance == null) { @@ -61,7 +61,7 @@ static Init() public abstract class ApprovalTestBase { - protected CodeGraph.Graph.CodeGraph Graph = null!; + protected CodeGraph Graph = null!; public static string DumpRelationships(HashSet relationships) @@ -76,17 +76,17 @@ public static string DumpCodeElements(HashSet nodes) return formattedNodes; } - protected HashSet GetAllStructs(CodeGraph.Graph.CodeGraph graph) + protected HashSet GetAllStructs(CodeGraph graph) { return GetElementOfType(graph, CodeElementType.Struct); } - protected HashSet GetAllEnums(CodeGraph.Graph.CodeGraph graph) + protected HashSet GetAllEnums(CodeGraph graph) { return GetElementOfType(graph, CodeElementType.Enum); } - protected HashSet GetAllProperties(CodeGraph.Graph.CodeGraph graph) + protected HashSet GetAllProperties(CodeGraph graph) { return GetElementOfType(graph, CodeElementType.Property); } @@ -101,7 +101,7 @@ protected bool IsInProject(CodeElement element, string projectFilter) return element.FullName.StartsWith(projectFilter); } - protected CodeGraph.Graph.CodeGraph GetTestGraph(string rootElementName) + protected CodeGraph GetTestGraph(string rootElementName) { var root = Graph.Nodes.Values.Single(n => n.FullName == rootElementName); return Graph.SubGraphOf(root); @@ -113,31 +113,31 @@ public async Task FixtureSetup() Graph = await Init.LoadAsync(); } - protected HashSet GetAllClasses(CodeGraph.Graph.CodeGraph graph) + protected HashSet GetAllClasses(CodeGraph graph) { return GetElementOfType(graph, CodeElementType.Class); } - protected HashSet GetAllClasses(CodeGraph.Graph.CodeGraph graph, string inNamespace) + protected HashSet GetAllClasses(CodeGraph graph, string inNamespace) { return GetElementOfType(graph, CodeElementType.Class, inNamespace); } - protected static HashSet GetAllNodes(CodeGraph.Graph.CodeGraph graph) + protected static HashSet GetAllNodes(CodeGraph graph) { return graph.Nodes.Values .Select(n => n.FullName) .ToHashSet(); } - protected static HashSet GetAllNodesOfType(CodeGraph.Graph.CodeGraph graph, CodeElementType type) + protected static HashSet GetAllNodesOfType(CodeGraph graph, CodeElementType type) { return graph.Nodes.Values.Where(n => n.ElementType == type) .Select(n => n.FullName) .ToHashSet(); } - private static HashSet GetElementOfType(CodeGraph.Graph.CodeGraph graph, CodeElementType type, string? inNamespace = null!) + private static HashSet GetElementOfType(CodeGraph graph, CodeElementType type, string? inNamespace = null!) { var elements = graph.Nodes.Values .Where(n => n.ElementType == type); @@ -151,7 +151,7 @@ private static HashSet GetElementOfType(CodeGraph.Graph.CodeGraph graph, .ToHashSet(); } - public HashSet GetAllMethodGroupUsages(CodeGraph.Graph.CodeGraph graph) + public HashSet GetAllMethodGroupUsages(CodeGraph graph) { return graph.GetAllRelationships() .Where(r => r.Type == RelationshipType.Uses && r.Attributes.HasFlag(RelationshipAttribute.IsMethodGroup)) @@ -160,7 +160,7 @@ public HashSet GetAllMethodGroupUsages(CodeGraph.Graph.CodeGraph graph) .ToHashSet(); } - public HashSet GetRelationshipsOfType(CodeGraph.Graph.CodeGraph graph, RelationshipType type) + public HashSet GetRelationshipsOfType(CodeGraph graph, RelationshipType type) { return graph.GetAllRelationships() .Where(r => r.Type == type) @@ -169,7 +169,7 @@ public HashSet GetRelationshipsOfType(CodeGraph.Graph.CodeGraph graph, R .ToHashSet(); } - protected HashSet GetAllRelationships(CodeGraph.Graph.CodeGraph graph) + protected HashSet GetAllRelationships(CodeGraph graph) { return graph.GetAllRelationships() .Select(CreateResolvedRelationShip) @@ -185,7 +185,7 @@ public ResolvedRelationship CreateResolvedRelationShip(Relationship relationship return new ResolvedRelationship(Graph.Nodes[relationship.SourceId].FullName, Graph.Nodes[relationship.TargetId].FullName); } - public static HashSet GetAllEventImplementations(CodeGraph.Graph.CodeGraph graph) + public static HashSet GetAllEventImplementations(CodeGraph graph) { var actual = graph.Nodes.Values .SelectMany(n => n.Relationships) @@ -198,7 +198,7 @@ public static HashSet GetAllEventImplementations(CodeGraph.Graph.CodeGra return actual; } - public static HashSet GetAllPropertyOverrides(CodeGraph.Graph.CodeGraph graph) + public static HashSet GetAllPropertyOverrides(CodeGraph graph) { var actual = graph.Nodes.Values .SelectMany(n => n.Relationships) @@ -211,7 +211,7 @@ public static HashSet GetAllPropertyOverrides(CodeGraph.Graph.CodeGraph return actual; } - protected static HashSet GetAllPropertyImplementations(CodeGraph.Graph.CodeGraph graph) + protected static HashSet GetAllPropertyImplementations(CodeGraph graph) { var actual = graph.Nodes.Values .SelectMany(n => n.Relationships) @@ -224,7 +224,7 @@ protected static HashSet GetAllPropertyImplementations(CodeGraph.Graph.C return actual; } - protected static HashSet GetAllMethodImplementations(CodeGraph.Graph.CodeGraph graph) + protected static HashSet GetAllMethodImplementations(CodeGraph graph) { var actual = graph.Nodes.Values .SelectMany(n => n.Relationships) @@ -237,7 +237,7 @@ protected static HashSet GetAllMethodImplementations(CodeGraph.Graph.Cod return actual; } - protected static HashSet GetAllMethodOverrides(CodeGraph.Graph.CodeGraph graph) + protected static HashSet GetAllMethodOverrides(CodeGraph graph) { var actual = graph.Nodes.Values .SelectMany(n => n.Relationships) @@ -250,7 +250,7 @@ protected static HashSet GetAllMethodOverrides(CodeGraph.Graph.CodeGraph return actual; } - public static HashSet GetAllEventInvocations(CodeGraph.Graph.CodeGraph graph) + public static HashSet GetAllEventInvocations(CodeGraph graph) { var actual = graph.Nodes.Values .SelectMany(n => n.Relationships) @@ -261,7 +261,7 @@ public static HashSet GetAllEventInvocations(CodeGraph.Graph.CodeGraph g return actual; } - protected static HashSet GetAllInterfaceImplementations(CodeGraph.Graph.CodeGraph graph) + protected static HashSet GetAllInterfaceImplementations(CodeGraph graph) { var actual = graph.Nodes.Values .SelectMany(n => n.Relationships) @@ -275,7 +275,7 @@ protected static HashSet GetAllInterfaceImplementations(CodeGraph.Graph. return actual; } - protected static HashSet GetAllClassInheritance(CodeGraph.Graph.CodeGraph graph) + protected static HashSet GetAllClassInheritance(CodeGraph graph) { var actual = graph.Nodes.Values .SelectMany(n => n.Relationships) diff --git a/Tests/ApprovalTests/ModuleLevelApprovalTests.cs b/Tests/ApprovalTests/ModuleLevelApprovalTests.cs index 5b28dbd7..3d937009 100644 --- a/Tests/ApprovalTests/ModuleLevelApprovalTests.cs +++ b/Tests/ApprovalTests/ModuleLevelApprovalTests.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.ApprovalTests; @@ -6,7 +6,7 @@ namespace CodeParserTests.ApprovalTests; public class ModuleLevelApprovalTests : ApprovalTestBase { - private CodeGraph.Graph.CodeGraph GetTestAssemblyGraph() + private CodeGraph GetTestAssemblyGraph() { var g0 = GetTestGraph("ModuleLevel0"); var g1 = GetTestGraph("ModuleLevel1"); diff --git a/Tests/ApprovalTests/OldCSharpLanguageApprovalTests.cs b/Tests/ApprovalTests/OldCSharpLanguageApprovalTests.cs index 51acf745..ff50ae94 100644 --- a/Tests/ApprovalTests/OldCSharpLanguageApprovalTests.cs +++ b/Tests/ApprovalTests/OldCSharpLanguageApprovalTests.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; // ReSharper disable StringLiteralTypo @@ -9,7 +9,7 @@ namespace CodeParserTests.ApprovalTests; /// public class OldCSharpLanguageApprovalTests : ApprovalTestBase { - private CodeGraph.Graph.CodeGraph GetTestAssemblyGraph() + private CodeGraph GetTestAssemblyGraph() { return GetTestGraph("Old.CSharpLanguage"); } @@ -330,7 +330,7 @@ public void FindsAllEventUsages() Assert.That(actual, Is.EquivalentTo(expected)); } - private static HashSet GetAllEventUsages(CodeGraph.Graph.CodeGraph graph) + private static HashSet GetAllEventUsages(CodeGraph graph) { var actual = graph.Nodes.Values .SelectMany(n => n.Relationships) diff --git a/Tests/ApprovalTests/SolutionApprovalTest.cs b/Tests/ApprovalTests/SolutionApprovalTest.cs index 3020b22a..9c1e221d 100644 --- a/Tests/ApprovalTests/SolutionApprovalTest.cs +++ b/Tests/ApprovalTests/SolutionApprovalTest.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.ApprovalTests; diff --git a/Tests/Helper/TestCodeGraph.cs b/Tests/Helper/TestCodeGraph.cs index ebd7c625..9d1f7c9f 100644 --- a/Tests/Helper/TestCodeGraph.cs +++ b/Tests/Helper/TestCodeGraph.cs @@ -1,8 +1,8 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.Helper; -public class TestCodeGraph : CodeGraph.Graph.CodeGraph +public class TestCodeGraph : CodeGraph { public CodeElement CreateNamespace(string id, CodeElement? parent = null) { diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index ac7a4f7b..3a959390 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -21,8 +21,8 @@ - - + + diff --git a/Tests/UnitTests/ArchitecturalRules/AnalyzerIntegrationTests.cs b/Tests/UnitTests/ArchitecturalRules/AnalyzerIntegrationTests.cs index 5b62b37f..c7b64be3 100644 --- a/Tests/UnitTests/ArchitecturalRules/AnalyzerIntegrationTests.cs +++ b/Tests/UnitTests/ArchitecturalRules/AnalyzerIntegrationTests.cs @@ -1,7 +1,7 @@ -using CodeGraph.Graph; using CodeParserTests.Helper; using CSharpCodeAnalyst.Analyzers.ArchitecturalRules; using CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Rules; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.UnitTests.ArchitecturalRules; @@ -17,7 +17,7 @@ public void SetUp() private TestCodeGraph _codeGraph; - private static List ExecuteRulesAnalysis(string rulesText, CodeGraph.Graph.CodeGraph graph) + private static List ExecuteRulesAnalysis(string rulesText, CodeGraph graph) { var rules = RuleParser.ParseRules(rulesText); var violations = new List(); diff --git a/Tests/UnitTests/ArchitecturalRules/RuleValidationTests.cs b/Tests/UnitTests/ArchitecturalRules/RuleValidationTests.cs index 81cb4a95..470eb012 100644 --- a/Tests/UnitTests/ArchitecturalRules/RuleValidationTests.cs +++ b/Tests/UnitTests/ArchitecturalRules/RuleValidationTests.cs @@ -1,6 +1,6 @@ -using CodeGraph.Graph; using CodeParserTests.Helper; using CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Rules; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.UnitTests.ArchitecturalRules; diff --git a/Tests/UnitTests/Cycles/CodeGraphBuilderTests.cs b/Tests/UnitTests/Cycles/CodeGraphBuilderTests.cs index b8dac4a2..37002f84 100644 --- a/Tests/UnitTests/Cycles/CodeGraphBuilderTests.cs +++ b/Tests/UnitTests/Cycles/CodeGraphBuilderTests.cs @@ -1,5 +1,5 @@ -using CodeGraph.Algorithms.Cycles; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Algorithms.Cycles; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.UnitTests.Cycles; @@ -12,7 +12,7 @@ public class CodeGraphGeneratorTests [Test] public void GenerateDetailedCodeGraph_SimpleClassDependency_PreservesDependency() { - var originalGraph = new CodeGraph.Graph.CodeGraph(); + var originalGraph = new CodeGraph(); var classA = new CodeElement("A", CodeElementType.Class, "ClassA", "", null); @@ -38,7 +38,7 @@ public void GenerateDetailedCodeGraph_SimpleClassDependency_PreservesDependency( [Test] public void GenerateDetailedCodeGraph_MethodDependency_PreservesMethodLevelDependency() { - var originalGraph = new CodeGraph.Graph.CodeGraph(); + var originalGraph = new CodeGraph(); var classA = new CodeElement("A", CodeElementType.Class, "ClassA", "", null); @@ -75,7 +75,7 @@ public void GenerateDetailedCodeGraph_MethodDependency_PreservesMethodLevelDepen [Test] public void GenerateDetailedCodeGraph_MultipleDependencies_PreservesAllDependencies() { - var originalGraph = new CodeGraph.Graph.CodeGraph(); + var originalGraph = new CodeGraph(); var classA = new CodeElement("A", CodeElementType.Class, "ClassA", "", null); diff --git a/Tests/UnitTests/Cycles/CycleFinderTests.cs b/Tests/UnitTests/Cycles/CycleFinderTests.cs index 72f0a5a0..09ba8982 100644 --- a/Tests/UnitTests/Cycles/CycleFinderTests.cs +++ b/Tests/UnitTests/Cycles/CycleFinderTests.cs @@ -1,6 +1,6 @@ -using CodeGraph.Algorithms.Cycles; -using CodeGraph.Graph; -using CodeParserTests.Helper; +using CodeParserTests.Helper; +using CSharpCodeAnalyst.CodeGraph.Algorithms.Cycles; +using CSharpCodeAnalyst.CodeGraph.Graph; // ReSharper disable InconsistentNaming @@ -352,9 +352,9 @@ public void FindStronglyConnectedComponents_ShouldFindSCC() Assert.That(scc.CodeGraph.Nodes.ContainsKey("C")); } - private static CodeGraph.Graph.CodeGraph CreateCodeGraphForShouldFindScc() + private static CodeGraph CreateCodeGraphForShouldFindScc() { - var codeStructure = new CodeGraph.Graph.CodeGraph(); + var codeStructure = new CodeGraph(); // Create nodes var nodeA = new CodeElement("A", CodeElementType.Class, diff --git a/Tests/UnitTests/Cycles/TarjanTests.cs b/Tests/UnitTests/Cycles/TarjanTests.cs index 3ba5075d..0959ce92 100644 --- a/Tests/UnitTests/Cycles/TarjanTests.cs +++ b/Tests/UnitTests/Cycles/TarjanTests.cs @@ -1,4 +1,4 @@ -using CodeGraph.Algorithms.Cycles; +using CSharpCodeAnalyst.CodeGraph.Algorithms.Cycles; namespace CodeParserTests.UnitTests.Cycles; diff --git a/Tests/UnitTests/Exploration/CodeGraphExplorerTests.cs b/Tests/UnitTests/Exploration/CodeGraphExplorerTests.cs index 5ea1cf80..718f867f 100644 --- a/Tests/UnitTests/Exploration/CodeGraphExplorerTests.cs +++ b/Tests/UnitTests/Exploration/CodeGraphExplorerTests.cs @@ -1,6 +1,6 @@ -using CodeGraph.Exploration; -using CodeGraph.Graph; using CodeParserTests.Helper; +using CSharpCodeAnalyst.CodeGraph.Exploration; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.UnitTests.Exploration; diff --git a/Tests/UnitTests/Export/CodeGraphSerializerTests.cs b/Tests/UnitTests/Export/CodeGraphSerializerTests.cs index f9ce0905..05cafcae 100644 --- a/Tests/UnitTests/Export/CodeGraphSerializerTests.cs +++ b/Tests/UnitTests/Export/CodeGraphSerializerTests.cs @@ -1,15 +1,15 @@ using System.Text; -using CodeGraph.Export; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Export; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.UnitTests.Export; [TestFixture] public class CodeGraphSerializerTests { - private CodeGraph.Graph.CodeGraph CreateSampleGraph() + private CodeGraph CreateSampleGraph() { - var g = new CodeGraph.Graph.CodeGraph(); + var g = new CodeGraph(); var asm = new CodeElement("Asm", CodeElementType.Assembly, "Asm", "Asm", null); var ns = new CodeElement("Ns", CodeElementType.Namespace, "Ns", "Ns", asm); var cls = new CodeElement("Cls", CodeElementType.Class, "Cls", "Ns.Cls", ns); diff --git a/Tests/UnitTests/Export/PlantUmlExportTests.cs b/Tests/UnitTests/Export/PlantUmlExportTests.cs index db012469..28eb4e83 100644 --- a/Tests/UnitTests/Export/PlantUmlExportTests.cs +++ b/Tests/UnitTests/Export/PlantUmlExportTests.cs @@ -1,13 +1,13 @@ -using CodeGraph.Export; -using CodeGraph.Graph; using CodeParserTests.Helper; +using CSharpCodeAnalyst.CodeGraph.Export; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.UnitTests.Export; [TestFixture] public class PlantUmlExportTests { - private static string Export(CodeGraph.Graph.CodeGraph g) + private static string Export(CodeGraph g) { var exporter = new PlantUmlExport(); return exporter.Export(g); diff --git a/Tests/UnitTests/Import/JdepsReaderTest.cs b/Tests/UnitTests/Import/JdepsReaderTest.cs index 962c7e90..cc7f8360 100644 --- a/Tests/UnitTests/Import/JdepsReaderTest.cs +++ b/Tests/UnitTests/Import/JdepsReaderTest.cs @@ -1,5 +1,5 @@ using System.Text; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; using CSharpCodeAnalyst.Features.Import; namespace CodeParserTests.UnitTests.Import; diff --git a/Tests/UnitTests/Metrics/TypeCohesionAnalysisTests.cs b/Tests/UnitTests/Metrics/TypeCohesionAnalysisTests.cs index 3090805c..a074aa9b 100644 --- a/Tests/UnitTests/Metrics/TypeCohesionAnalysisTests.cs +++ b/Tests/UnitTests/Metrics/TypeCohesionAnalysisTests.cs @@ -1,6 +1,6 @@ -using CodeGraph.Algorithms.Partitioning; -using CodeGraph.Graph; using CodeParserTests.Helper; +using CSharpCodeAnalyst.CodeGraph.Algorithms.Partitioning; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.UnitTests.Metrics; diff --git a/Tests/UnitTests/Metrics/TypeDependencyAnalysisTests.cs b/Tests/UnitTests/Metrics/TypeDependencyAnalysisTests.cs index 02faf26f..35210b05 100644 --- a/Tests/UnitTests/Metrics/TypeDependencyAnalysisTests.cs +++ b/Tests/UnitTests/Metrics/TypeDependencyAnalysisTests.cs @@ -1,6 +1,6 @@ -using CodeGraph.Algorithms.Metrics; -using CodeGraph.Graph; using CodeParserTests.Helper; +using CSharpCodeAnalyst.CodeGraph.Algorithms.Metrics; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.UnitTests.Metrics; diff --git a/Tests/UnitTests/Parser/AssignmentDuplicateParseTests.cs b/Tests/UnitTests/Parser/AssignmentDuplicateParseTests.cs index c431ba77..b440942d 100644 --- a/Tests/UnitTests/Parser/AssignmentDuplicateParseTests.cs +++ b/Tests/UnitTests/Parser/AssignmentDuplicateParseTests.cs @@ -1,5 +1,5 @@ -using CodeGraph.Graph; -using CodeParser.Parser.Config; +using CSharpCodeAnalyst.CodeGraph.Graph; +using CSharpCodeAnalyst.CodeParser.Parser.Config; namespace CodeParserTests.UnitTests.Parser; @@ -30,13 +30,13 @@ public void TestMethod() } """; - private CodeGraph.Graph.CodeGraph _graph = null!; + private CodeGraph _graph = null!; [OneTimeSetUp] public async Task Setup() { // Split off to mirror the original parser configuration of this scenario. - var parser = new CodeParser.Parser.Parser(new ParserConfig(new ProjectExclusionRegExCollection(), false)); + var parser = new CSharpCodeAnalyst.CodeParser.Parser.Parser(new ParserConfig(new ProjectExclusionRegExCollection(), false)); var result = await parser.ParseSourceAsync(Code); _graph = result.CodeGraph; } diff --git a/Tests/UnitTests/Parser/BasicLanguageFeatures_BasicCallsParseTests.cs b/Tests/UnitTests/Parser/BasicLanguageFeatures_BasicCallsParseTests.cs index 5175bd1b..3e85f993 100644 --- a/Tests/UnitTests/Parser/BasicLanguageFeatures_BasicCallsParseTests.cs +++ b/Tests/UnitTests/Parser/BasicLanguageFeatures_BasicCallsParseTests.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.UnitTests.Parser; diff --git a/Tests/UnitTests/Parser/BasicLanguageFeatures_IndexersAndOperatorsParseTests.cs b/Tests/UnitTests/Parser/BasicLanguageFeatures_IndexersAndOperatorsParseTests.cs index 10d9de55..e382645e 100644 --- a/Tests/UnitTests/Parser/BasicLanguageFeatures_IndexersAndOperatorsParseTests.cs +++ b/Tests/UnitTests/Parser/BasicLanguageFeatures_IndexersAndOperatorsParseTests.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.UnitTests.Parser; diff --git a/Tests/UnitTests/Parser/BasicLanguageFeatures_InheritanceParseTests.cs b/Tests/UnitTests/Parser/BasicLanguageFeatures_InheritanceParseTests.cs index 701f0f24..e66de675 100644 --- a/Tests/UnitTests/Parser/BasicLanguageFeatures_InheritanceParseTests.cs +++ b/Tests/UnitTests/Parser/BasicLanguageFeatures_InheritanceParseTests.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.UnitTests.Parser; diff --git a/Tests/UnitTests/Parser/BasicLanguageFeatures_InitializersParseTests.cs b/Tests/UnitTests/Parser/BasicLanguageFeatures_InitializersParseTests.cs index 93d55696..40076d87 100644 --- a/Tests/UnitTests/Parser/BasicLanguageFeatures_InitializersParseTests.cs +++ b/Tests/UnitTests/Parser/BasicLanguageFeatures_InitializersParseTests.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.UnitTests.Parser; diff --git a/Tests/UnitTests/Parser/BasicLanguageFeatures_OverloadsParseTests.cs b/Tests/UnitTests/Parser/BasicLanguageFeatures_OverloadsParseTests.cs index aed308e2..3b29e717 100644 --- a/Tests/UnitTests/Parser/BasicLanguageFeatures_OverloadsParseTests.cs +++ b/Tests/UnitTests/Parser/BasicLanguageFeatures_OverloadsParseTests.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.UnitTests.Parser; diff --git a/Tests/UnitTests/Parser/BasicLanguageFeatures_PatternMatchingParseTests.cs b/Tests/UnitTests/Parser/BasicLanguageFeatures_PatternMatchingParseTests.cs index 871b7ff3..d9d46c78 100644 --- a/Tests/UnitTests/Parser/BasicLanguageFeatures_PatternMatchingParseTests.cs +++ b/Tests/UnitTests/Parser/BasicLanguageFeatures_PatternMatchingParseTests.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.UnitTests.Parser; diff --git a/Tests/UnitTests/Parser/BasicLanguageFeatures_StructsAndEnumsParseTests.cs b/Tests/UnitTests/Parser/BasicLanguageFeatures_StructsAndEnumsParseTests.cs index 4b0039d4..561318e5 100644 --- a/Tests/UnitTests/Parser/BasicLanguageFeatures_StructsAndEnumsParseTests.cs +++ b/Tests/UnitTests/Parser/BasicLanguageFeatures_StructsAndEnumsParseTests.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.UnitTests.Parser; diff --git a/Tests/UnitTests/Parser/BasicLanguageFeatures_TypeContextsParseTests.cs b/Tests/UnitTests/Parser/BasicLanguageFeatures_TypeContextsParseTests.cs index 01ce98fb..282ad0aa 100644 --- a/Tests/UnitTests/Parser/BasicLanguageFeatures_TypeContextsParseTests.cs +++ b/Tests/UnitTests/Parser/BasicLanguageFeatures_TypeContextsParseTests.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.UnitTests.Parser; diff --git a/Tests/UnitTests/Parser/EventDeRegistrationInLambdaParseTests.cs b/Tests/UnitTests/Parser/EventDeRegistrationInLambdaParseTests.cs index d9538999..db5e32a9 100644 --- a/Tests/UnitTests/Parser/EventDeRegistrationInLambdaParseTests.cs +++ b/Tests/UnitTests/Parser/EventDeRegistrationInLambdaParseTests.cs @@ -1,5 +1,5 @@ -using CodeGraph.Graph; -using CodeParser.Parser.Config; +using CSharpCodeAnalyst.CodeGraph.Graph; +using CSharpCodeAnalyst.CodeParser.Parser.Config; namespace CodeParserTests.UnitTests.Parser; @@ -51,12 +51,12 @@ public static void LoopOver(this IEnumerable enumerable, Action action) } """; - private CodeGraph.Graph.CodeGraph _graph = null!; + private CodeGraph _graph = null!; [OneTimeSetUp] public async Task Setup() { - var parser = new CodeParser.Parser.Parser(new ParserConfig(new ProjectExclusionRegExCollection(), false)); + var parser = new CSharpCodeAnalyst.CodeParser.Parser.Parser(new ParserConfig(new ProjectExclusionRegExCollection(), false)); var result = await parser.ParseSourceAsync(Code); _graph = result.CodeGraph; } diff --git a/Tests/UnitTests/Parser/Events_InterfaceParseTests.cs b/Tests/UnitTests/Parser/Events_InterfaceParseTests.cs index c1692709..50d73836 100644 --- a/Tests/UnitTests/Parser/Events_InterfaceParseTests.cs +++ b/Tests/UnitTests/Parser/Events_InterfaceParseTests.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.UnitTests.Parser; diff --git a/Tests/UnitTests/Parser/Events_PublishSubscribeParseTests.cs b/Tests/UnitTests/Parser/Events_PublishSubscribeParseTests.cs index 50ec34ce..be1b2793 100644 --- a/Tests/UnitTests/Parser/Events_PublishSubscribeParseTests.cs +++ b/Tests/UnitTests/Parser/Events_PublishSubscribeParseTests.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.UnitTests.Parser; diff --git a/Tests/UnitTests/Parser/FollowHeuristic_PropertyChainSplitAccessorsParseTests.cs b/Tests/UnitTests/Parser/FollowHeuristic_PropertyChainSplitAccessorsParseTests.cs index 05d8533f..a5dcaabb 100644 --- a/Tests/UnitTests/Parser/FollowHeuristic_PropertyChainSplitAccessorsParseTests.cs +++ b/Tests/UnitTests/Parser/FollowHeuristic_PropertyChainSplitAccessorsParseTests.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.UnitTests.Parser; diff --git a/Tests/UnitTests/Parser/FollowIncomingCallsParseTests.cs b/Tests/UnitTests/Parser/FollowIncomingCallsParseTests.cs index 63db0366..5065cc79 100644 --- a/Tests/UnitTests/Parser/FollowIncomingCallsParseTests.cs +++ b/Tests/UnitTests/Parser/FollowIncomingCallsParseTests.cs @@ -1,5 +1,5 @@ -using CodeGraph.Graph; -using CodeParser.Parser.Config; +using CSharpCodeAnalyst.CodeGraph.Graph; +using CSharpCodeAnalyst.CodeParser.Parser.Config; namespace CodeParserTests.UnitTests.Parser; @@ -60,12 +60,12 @@ public Driver() } """; - private CodeGraph.Graph.CodeGraph _graph = null!; + private CodeGraph _graph = null!; [OneTimeSetUp] public async Task Setup() { - var parser = new CodeParser.Parser.Parser(new ParserConfig(new ProjectExclusionRegExCollection(), false)); + var parser = new CSharpCodeAnalyst.CodeParser.Parser.Parser(new ParserConfig(new ProjectExclusionRegExCollection(), false)); var result = await parser.ParseSourceAsync(Code); _graph = result.CodeGraph; } diff --git a/Tests/UnitTests/Parser/GenericsParseTests.cs b/Tests/UnitTests/Parser/GenericsParseTests.cs index 7bcec7b6..0ba459f8 100644 --- a/Tests/UnitTests/Parser/GenericsParseTests.cs +++ b/Tests/UnitTests/Parser/GenericsParseTests.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.UnitTests.Parser; diff --git a/Tests/UnitTests/Parser/InMemoryCycleParseTestBase.cs b/Tests/UnitTests/Parser/InMemoryCycleParseTestBase.cs index 48eb4b1c..b4e2c3e4 100644 --- a/Tests/UnitTests/Parser/InMemoryCycleParseTestBase.cs +++ b/Tests/UnitTests/Parser/InMemoryCycleParseTestBase.cs @@ -1,5 +1,4 @@ -using CodeGraph.Algorithms.Cycles; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Algorithms.Cycles; namespace CodeParserTests.UnitTests.Parser; diff --git a/Tests/UnitTests/Parser/InMemoryFollowIncomingCallsTestBase.cs b/Tests/UnitTests/Parser/InMemoryFollowIncomingCallsTestBase.cs index 0e3af6c5..cd30b75b 100644 --- a/Tests/UnitTests/Parser/InMemoryFollowIncomingCallsTestBase.cs +++ b/Tests/UnitTests/Parser/InMemoryFollowIncomingCallsTestBase.cs @@ -1,5 +1,4 @@ -using CodeGraph.Exploration; -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Exploration; namespace CodeParserTests.UnitTests.Parser; diff --git a/Tests/UnitTests/Parser/InMemoryParseTestBase.cs b/Tests/UnitTests/Parser/InMemoryParseTestBase.cs index 1ebc9104..129e328e 100644 --- a/Tests/UnitTests/Parser/InMemoryParseTestBase.cs +++ b/Tests/UnitTests/Parser/InMemoryParseTestBase.cs @@ -1,5 +1,5 @@ -using CodeGraph.Graph; -using CodeParser.Parser.Config; +using CSharpCodeAnalyst.CodeGraph.Graph; +using CSharpCodeAnalyst.CodeParser.Parser.Config; namespace CodeParserTests.UnitTests.Parser; @@ -12,7 +12,7 @@ namespace CodeParserTests.UnitTests.Parser; /// public abstract class InMemoryParseTestBase { - protected CodeGraph.Graph.CodeGraph Graph = null!; + protected CodeGraph Graph = null!; /// The C# snippet to parse. One compilation unit; typically under namespace Demo;. protected abstract string Code { get; } @@ -23,7 +23,7 @@ public abstract class InMemoryParseTestBase [OneTimeSetUp] public async Task ParseCode() { - var parser = new CodeParser.Parser.Parser( + var parser = new CSharpCodeAnalyst.CodeParser.Parser.Parser( new ParserConfig(new ProjectExclusionRegExCollection(), false, splitPropertyAccessors: SplitPropertyAccessors)); var result = await parser.ParseSourceAsync(Code); Graph = result.CodeGraph; diff --git a/Tests/UnitTests/Parser/LambdaConstructorReferenceTests.cs b/Tests/UnitTests/Parser/LambdaConstructorReferenceTests.cs index ce6c68e8..fc61783c 100644 --- a/Tests/UnitTests/Parser/LambdaConstructorReferenceTests.cs +++ b/Tests/UnitTests/Parser/LambdaConstructorReferenceTests.cs @@ -1,5 +1,5 @@ -using CodeGraph.Graph; -using CodeParser.Parser.Config; +using CSharpCodeAnalyst.CodeGraph.Graph; +using CSharpCodeAnalyst.CodeParser.Parser.Config; namespace CodeParserTests.UnitTests.Parser; @@ -33,7 +33,7 @@ public void BuildDirect() } """; - private CodeGraph.Graph.CodeGraph _graph = null!; + private CodeGraph _graph = null!; [OneTimeSetUp] public void Setup() @@ -93,9 +93,9 @@ private static bool Has(CodeElement source, CodeElement target, RelationshipType return source.Relationships.Any(r => r.TargetId == target.Id && r.Type == type); } - private static CodeGraph.Graph.CodeGraph Parse(string code) + private static CodeGraph Parse(string code) { - var parser = new CodeParser.Parser.Parser(new ParserConfig(new ProjectExclusionRegExCollection(), false)); + var parser = new CSharpCodeAnalyst.CodeParser.Parser.Parser(new ParserConfig(new ProjectExclusionRegExCollection(), false)); return parser.ParseSourceAsync(code).GetAwaiter().GetResult().CodeGraph; } } diff --git a/Tests/UnitTests/Parser/MemberAccessDuplicateParseTests.cs b/Tests/UnitTests/Parser/MemberAccessDuplicateParseTests.cs index 12aeaaab..1887f6c1 100644 --- a/Tests/UnitTests/Parser/MemberAccessDuplicateParseTests.cs +++ b/Tests/UnitTests/Parser/MemberAccessDuplicateParseTests.cs @@ -1,5 +1,5 @@ -using CodeGraph.Graph; -using CodeParser.Parser.Config; +using CSharpCodeAnalyst.CodeGraph.Graph; +using CSharpCodeAnalyst.CodeParser.Parser.Config; namespace CodeParserTests.UnitTests.Parser; @@ -36,13 +36,13 @@ public void TestMethod() } """; - private CodeGraph.Graph.CodeGraph _graph = null!; + private CodeGraph _graph = null!; [OneTimeSetUp] public void Setup() { // Split off to mirror the original parser configuration of this scenario. - var parser = new CodeParser.Parser.Parser(new ParserConfig(new ProjectExclusionRegExCollection(), false)); + var parser = new CSharpCodeAnalyst.CodeParser.Parser.Parser(new ParserConfig(new ProjectExclusionRegExCollection(), false)); _graph = parser.ParseSourceAsync(Code).GetAwaiter().GetResult().CodeGraph; } diff --git a/Tests/UnitTests/Parser/MethodGroups_DelegatesParseTests.cs b/Tests/UnitTests/Parser/MethodGroups_DelegatesParseTests.cs index bb2dd165..9d29661e 100644 --- a/Tests/UnitTests/Parser/MethodGroups_DelegatesParseTests.cs +++ b/Tests/UnitTests/Parser/MethodGroups_DelegatesParseTests.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.UnitTests.Parser; diff --git a/Tests/UnitTests/Parser/MethodGroups_EventsParseTests.cs b/Tests/UnitTests/Parser/MethodGroups_EventsParseTests.cs index 1db458c4..049aee58 100644 --- a/Tests/UnitTests/Parser/MethodGroups_EventsParseTests.cs +++ b/Tests/UnitTests/Parser/MethodGroups_EventsParseTests.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.UnitTests.Parser; diff --git a/Tests/UnitTests/Parser/MethodGroups_LinqParseTests.cs b/Tests/UnitTests/Parser/MethodGroups_LinqParseTests.cs index 78d3ac43..38e39ac2 100644 --- a/Tests/UnitTests/Parser/MethodGroups_LinqParseTests.cs +++ b/Tests/UnitTests/Parser/MethodGroups_LinqParseTests.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.UnitTests.Parser; diff --git a/Tests/UnitTests/Parser/NameOfDetectionTests.cs b/Tests/UnitTests/Parser/NameOfDetectionTests.cs index e8423509..021eae78 100644 --- a/Tests/UnitTests/Parser/NameOfDetectionTests.cs +++ b/Tests/UnitTests/Parser/NameOfDetectionTests.cs @@ -1,4 +1,4 @@ -using CodeParser.Parser; +using CSharpCodeAnalyst.CodeParser.Parser; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; diff --git a/Tests/UnitTests/Parser/NamespacesParseTests.cs b/Tests/UnitTests/Parser/NamespacesParseTests.cs index 821fd348..514f46f7 100644 --- a/Tests/UnitTests/Parser/NamespacesParseTests.cs +++ b/Tests/UnitTests/Parser/NamespacesParseTests.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.UnitTests.Parser; diff --git a/Tests/UnitTests/Parser/ObjectOriented_InheritanceParseTests.cs b/Tests/UnitTests/Parser/ObjectOriented_InheritanceParseTests.cs index 462cc5ba..e07c9949 100644 --- a/Tests/UnitTests/Parser/ObjectOriented_InheritanceParseTests.cs +++ b/Tests/UnitTests/Parser/ObjectOriented_InheritanceParseTests.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.UnitTests.Parser; diff --git a/Tests/UnitTests/Parser/ObjectOriented_InterfacesParseTests.cs b/Tests/UnitTests/Parser/ObjectOriented_InterfacesParseTests.cs index 8ad615f9..4bbd2c54 100644 --- a/Tests/UnitTests/Parser/ObjectOriented_InterfacesParseTests.cs +++ b/Tests/UnitTests/Parser/ObjectOriented_InterfacesParseTests.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.UnitTests.Parser; diff --git a/Tests/UnitTests/Parser/ObjectOriented_PolymorphismParseTests.cs b/Tests/UnitTests/Parser/ObjectOriented_PolymorphismParseTests.cs index 7eb52845..f05eefaa 100644 --- a/Tests/UnitTests/Parser/ObjectOriented_PolymorphismParseTests.cs +++ b/Tests/UnitTests/Parser/ObjectOriented_PolymorphismParseTests.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.UnitTests.Parser; diff --git a/Tests/UnitTests/Parser/OrderProcessingParseTests.cs b/Tests/UnitTests/Parser/OrderProcessingParseTests.cs index 5b323ebb..671d928e 100644 --- a/Tests/UnitTests/Parser/OrderProcessingParseTests.cs +++ b/Tests/UnitTests/Parser/OrderProcessingParseTests.cs @@ -1,4 +1,4 @@ -using CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.UnitTests.Parser; diff --git a/Tests/UnitTests/Parser/ProjectSelectorTests.cs b/Tests/UnitTests/Parser/ProjectSelectorTests.cs index 0ea10c3f..87b94cd0 100644 --- a/Tests/UnitTests/Parser/ProjectSelectorTests.cs +++ b/Tests/UnitTests/Parser/ProjectSelectorTests.cs @@ -1,4 +1,4 @@ -using CodeParser.Parser; +using CSharpCodeAnalyst.CodeParser.Parser; namespace CodeParserTests.UnitTests.Parser; diff --git a/Tests/UnitTests/Parser/PropertyAccessClassifierTests.cs b/Tests/UnitTests/Parser/PropertyAccessClassifierTests.cs index 09fb809c..fedaf669 100644 --- a/Tests/UnitTests/Parser/PropertyAccessClassifierTests.cs +++ b/Tests/UnitTests/Parser/PropertyAccessClassifierTests.cs @@ -1,4 +1,4 @@ -using CodeParser.Parser; +using CSharpCodeAnalyst.CodeParser.Parser; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; diff --git a/Tests/UnitTests/Parser/RecordsAndStructsParseTests.cs b/Tests/UnitTests/Parser/RecordsAndStructsParseTests.cs index 78c768cc..a7be1e35 100644 --- a/Tests/UnitTests/Parser/RecordsAndStructsParseTests.cs +++ b/Tests/UnitTests/Parser/RecordsAndStructsParseTests.cs @@ -1,5 +1,5 @@ -using CodeGraph.Graph; -using CodeParser.Parser.Config; +using CSharpCodeAnalyst.CodeGraph.Graph; +using CSharpCodeAnalyst.CodeParser.Parser.Config; namespace CodeParserTests.UnitTests.Parser; @@ -69,13 +69,13 @@ partial void OnCreated() } """; - private CodeGraph.Graph.CodeGraph _graph = null!; + private CodeGraph _graph = null!; [OneTimeSetUp] public void Setup() { // Split off to mirror the original parser configuration of this scenario. - var parser = new CodeParser.Parser.Parser(new ParserConfig(new ProjectExclusionRegExCollection(), false)); + var parser = new CSharpCodeAnalyst.CodeParser.Parser.Parser(new ParserConfig(new ProjectExclusionRegExCollection(), false)); _graph = parser.ParseSourceAsync(Code).GetAwaiter().GetResult().CodeGraph; } diff --git a/Tests/UnitTests/Parser/SingleFileParseTests.cs b/Tests/UnitTests/Parser/SingleFileParseTests.cs index 2db51f1e..ac5d45ae 100644 --- a/Tests/UnitTests/Parser/SingleFileParseTests.cs +++ b/Tests/UnitTests/Parser/SingleFileParseTests.cs @@ -1,7 +1,7 @@ using System; using System.IO; -using CodeGraph.Graph; -using CodeParser.Parser.Config; +using CSharpCodeAnalyst.CodeGraph.Graph; +using CSharpCodeAnalyst.CodeParser.Parser.Config; namespace CodeParserTests.UnitTests.Parser; @@ -27,7 +27,7 @@ public void Bar() { } try { - var parser = new CodeParser.Parser.Parser(new ParserConfig(new ProjectExclusionRegExCollection(), false)); + var parser = new CSharpCodeAnalyst.CodeParser.Parser.Parser(new ParserConfig(new ProjectExclusionRegExCollection(), false)); var graph = parser.ParseAsync(path).GetAwaiter().GetResult().CodeGraph; var foo = graph.Nodes.Values.SingleOrDefault(n => n.ElementType == CodeElementType.Class && n.Name == "Foo"); diff --git a/Tests/UnitTests/Parser/SourceMetricsParseTests.cs b/Tests/UnitTests/Parser/SourceMetricsParseTests.cs index b2cb86ea..8009eb73 100644 --- a/Tests/UnitTests/Parser/SourceMetricsParseTests.cs +++ b/Tests/UnitTests/Parser/SourceMetricsParseTests.cs @@ -1,7 +1,7 @@ -using CodeGraph.Graph; -using CodeGraph.Metrics; -using CodeParser.Parser; -using CodeParser.Parser.Config; +using CSharpCodeAnalyst.CodeGraph.Graph; +using CSharpCodeAnalyst.CodeGraph.Metrics; +using CSharpCodeAnalyst.CodeParser.Parser; +using CSharpCodeAnalyst.CodeParser.Parser.Config; namespace CodeParserTests.UnitTests.Parser; @@ -59,9 +59,9 @@ abstract class Abstract } """; - private static CodeParser.Parser.Parser CreateParser(bool collectMetrics) + private static CSharpCodeAnalyst.CodeParser.Parser.Parser CreateParser(bool collectMetrics) { - return new CodeParser.Parser.Parser( + return new CSharpCodeAnalyst.CodeParser.Parser.Parser( new ParserConfig(new ProjectExclusionRegExCollection(), false, collectSourceMetrics: collectMetrics)); } diff --git a/Tests/UnitTests/Parser/SplitPropertyAccessorsTests.cs b/Tests/UnitTests/Parser/SplitPropertyAccessorsTests.cs index 9fe0675a..3be2e0a7 100644 --- a/Tests/UnitTests/Parser/SplitPropertyAccessorsTests.cs +++ b/Tests/UnitTests/Parser/SplitPropertyAccessorsTests.cs @@ -1,6 +1,6 @@ -using CodeGraph.Graph; -using CodeParser.Parser; -using CodeParser.Parser.Config; +using CSharpCodeAnalyst.CodeGraph.Graph; +using CSharpCodeAnalyst.CodeParser.Parser; +using CSharpCodeAnalyst.CodeParser.Parser.Config; namespace CodeParserTests.UnitTests.Parser; @@ -12,7 +12,7 @@ namespace CodeParserTests.UnitTests.Parser; [TestFixture] public class SplitPropertyAccessorsTests { - private CodeGraph.Graph.CodeGraph _graph = null!; + private CodeGraph _graph = null!; [OneTimeSetUp] public async Task FixtureSetup() @@ -27,7 +27,7 @@ public async Task FixtureSetup() // already registered } - var parser = new CodeParser.Parser.Parser(new ParserConfig(new ProjectExclusionRegExCollection(), false, + var parser = new CSharpCodeAnalyst.CodeParser.Parser.Parser(new ParserConfig(new ProjectExclusionRegExCollection(), false, splitPropertyAccessors: true)); _graph = (await parser.ParseAsync(@"..\..\..\..\TestSuite\TestSuite.sln")).CodeGraph; } diff --git a/Tests/UnitTests/Partitioning/CodeElementPartitionerBaseClassTests.cs b/Tests/UnitTests/Partitioning/CodeElementPartitionerBaseClassTests.cs index 1d200d58..f8610b56 100644 --- a/Tests/UnitTests/Partitioning/CodeElementPartitionerBaseClassTests.cs +++ b/Tests/UnitTests/Partitioning/CodeElementPartitionerBaseClassTests.cs @@ -1,6 +1,6 @@ -using CodeGraph.Algorithms.Partitioning; -using CodeGraph.Graph; using CodeParserTests.Helper; +using CSharpCodeAnalyst.CodeGraph.Algorithms.Partitioning; +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CodeParserTests.UnitTests.Partitioning; From 735b6c101fd4327462d31142166b2c7ae873a5ec Mon Sep 17 00:00:00 2001 From: ATrefzer <36333177+ATrefzer@users.noreply.github.com> Date: Fri, 3 Jul 2026 21:08:16 +0200 Subject: [PATCH 5/9] Fix broken xaml resources --- .../CSharpCodeAnalyst.AnalyzerSdk.csproj | 4 ++++ .../Shared}/Resources/blue-info_16.png | Bin .../Shared}/Styles/ImageStyles.xaml | 2 +- .../Shared/Wpf/IconLoader.cs | 17 +++++++++++++---- .../Presentation/ArchitecturalRulesDialog.xaml | 2 +- .../CSharpCodeAnalyst.Analyzers.csproj | 4 ++++ .../Resources/error.png | Bin CSharpCodeAnalyst/CSharpCodeAnalyst.csproj | 7 ------- .../AdvancedSearch/AdvancedSearchControl.xaml | 2 +- .../Features/Graph/GraphToolbarControl.xaml | 2 +- .../Features/Tree/TreeControl.xaml | 2 +- CSharpCodeAnalyst/MainWindow.xaml | 2 +- 12 files changed, 27 insertions(+), 17 deletions(-) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.AnalyzerSdk/Shared}/Resources/blue-info_16.png (100%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.AnalyzerSdk/Shared}/Styles/ImageStyles.xaml (81%) rename {CSharpCodeAnalyst => CSharpCodeAnalyst.Analyzers}/Resources/error.png (100%) diff --git a/CSharpCodeAnalyst.AnalyzerSdk/CSharpCodeAnalyst.AnalyzerSdk.csproj b/CSharpCodeAnalyst.AnalyzerSdk/CSharpCodeAnalyst.AnalyzerSdk.csproj index 2982552a..abc4ea60 100644 --- a/CSharpCodeAnalyst.AnalyzerSdk/CSharpCodeAnalyst.AnalyzerSdk.csproj +++ b/CSharpCodeAnalyst.AnalyzerSdk/CSharpCodeAnalyst.AnalyzerSdk.csproj @@ -14,6 +14,10 @@ + + + + diff --git a/CSharpCodeAnalyst/Resources/blue-info_16.png b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Resources/blue-info_16.png similarity index 100% rename from CSharpCodeAnalyst/Resources/blue-info_16.png rename to CSharpCodeAnalyst.AnalyzerSdk/Shared/Resources/blue-info_16.png diff --git a/CSharpCodeAnalyst/Styles/ImageStyles.xaml b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Styles/ImageStyles.xaml similarity index 81% rename from CSharpCodeAnalyst/Styles/ImageStyles.xaml rename to CSharpCodeAnalyst.AnalyzerSdk/Shared/Styles/ImageStyles.xaml index 0fee93aa..07937efb 100644 --- a/CSharpCodeAnalyst/Styles/ImageStyles.xaml +++ b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Styles/ImageStyles.xaml @@ -4,7 +4,7 @@ - + diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Wpf/IconLoader.cs b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Wpf/IconLoader.cs index add8bf16..04dab5c9 100644 --- a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Wpf/IconLoader.cs +++ b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Wpf/IconLoader.cs @@ -1,4 +1,5 @@ -using System.Windows.Media; +using System.Reflection; +using System.Windows.Media; using System.Windows.Media.Imaging; namespace CSharpCodeAnalyst.Shared.Wpf; @@ -7,25 +8,33 @@ public static class IconLoader { private static readonly Dictionary IconCache = new(); + /// + /// Loads an icon embedded as a WPF "Resource" in the calling assembly (e.g. the host or an + /// analyzer plugin), not necessarily the entry assembly - so each assembly can ship its own + /// icons without depending on another assembly's resources. + /// public static ImageSource? LoadIcon(string iconPath) { try { - if (IconCache.TryGetValue(iconPath, out var icon)) + var assemblyName = Assembly.GetCallingAssembly().GetName().Name; + var cacheKey = $"{assemblyName}|{iconPath}"; + + if (IconCache.TryGetValue(cacheKey, out var icon)) { return icon; } var bitmap = new BitmapImage(); bitmap.BeginInit(); - bitmap.UriSource = new Uri($"pack://application:,,,/{iconPath}"); + bitmap.UriSource = new Uri($"pack://application:,,,/{assemblyName};component/{iconPath}"); bitmap.DecodePixelWidth = 16; bitmap.DecodePixelHeight = 16; bitmap.CacheOption = BitmapCacheOption.OnLoad; bitmap.EndInit(); bitmap.Freeze(); - IconCache[iconPath] = bitmap; + IconCache[cacheKey] = bitmap; return bitmap; } catch diff --git a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/ArchitecturalRulesDialog.xaml b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/ArchitecturalRulesDialog.xaml index e228bef6..93af8618 100644 --- a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/ArchitecturalRulesDialog.xaml +++ b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/ArchitecturalRulesDialog.xaml @@ -14,7 +14,7 @@ - + diff --git a/CSharpCodeAnalyst.Analyzers/CSharpCodeAnalyst.Analyzers.csproj b/CSharpCodeAnalyst.Analyzers/CSharpCodeAnalyst.Analyzers.csproj index b1f9aa01..46a088b9 100644 --- a/CSharpCodeAnalyst.Analyzers/CSharpCodeAnalyst.Analyzers.csproj +++ b/CSharpCodeAnalyst.Analyzers/CSharpCodeAnalyst.Analyzers.csproj @@ -13,6 +13,10 @@ + + + + MSBuild:Compile diff --git a/CSharpCodeAnalyst/Resources/error.png b/CSharpCodeAnalyst.Analyzers/Resources/error.png similarity index 100% rename from CSharpCodeAnalyst/Resources/error.png rename to CSharpCodeAnalyst.Analyzers/Resources/error.png diff --git a/CSharpCodeAnalyst/CSharpCodeAnalyst.csproj b/CSharpCodeAnalyst/CSharpCodeAnalyst.csproj index 7e5dbe70..ddf2e8c3 100644 --- a/CSharpCodeAnalyst/CSharpCodeAnalyst.csproj +++ b/CSharpCodeAnalyst/CSharpCodeAnalyst.csproj @@ -22,11 +22,6 @@ MSBuild:Compile - - MSBuild:Compile - Wpf - Designer - @@ -52,7 +47,6 @@ - @@ -111,7 +105,6 @@ - diff --git a/CSharpCodeAnalyst/Features/AdvancedSearch/AdvancedSearchControl.xaml b/CSharpCodeAnalyst/Features/AdvancedSearch/AdvancedSearchControl.xaml index fbd823a6..461f8869 100644 --- a/CSharpCodeAnalyst/Features/AdvancedSearch/AdvancedSearchControl.xaml +++ b/CSharpCodeAnalyst/Features/AdvancedSearch/AdvancedSearchControl.xaml @@ -14,7 +14,7 @@ - + diff --git a/CSharpCodeAnalyst/Features/Graph/GraphToolbarControl.xaml b/CSharpCodeAnalyst/Features/Graph/GraphToolbarControl.xaml index 4ef93f8a..f44eb363 100644 --- a/CSharpCodeAnalyst/Features/Graph/GraphToolbarControl.xaml +++ b/CSharpCodeAnalyst/Features/Graph/GraphToolbarControl.xaml @@ -16,7 +16,7 @@ - + diff --git a/CSharpCodeAnalyst/Features/Tree/TreeControl.xaml b/CSharpCodeAnalyst/Features/Tree/TreeControl.xaml index 500d7e10..5acb3025 100644 --- a/CSharpCodeAnalyst/Features/Tree/TreeControl.xaml +++ b/CSharpCodeAnalyst/Features/Tree/TreeControl.xaml @@ -16,7 +16,7 @@ - + diff --git a/CSharpCodeAnalyst/MainWindow.xaml b/CSharpCodeAnalyst/MainWindow.xaml index 7e36ed70..7b0fc3d8 100644 --- a/CSharpCodeAnalyst/MainWindow.xaml +++ b/CSharpCodeAnalyst/MainWindow.xaml @@ -25,7 +25,7 @@ - + From 9b40966449a8f840dfc55397aea4e476bd8bb69f Mon Sep 17 00:00:00 2001 From: ATrefzer <36333177+ATrefzer@users.noreply.github.com> Date: Fri, 3 Jul 2026 21:50:31 +0200 Subject: [PATCH 6/9] Cleanup --- .../CSharpCodeAnalyst.AnalyzerSdk.csproj | 7 +- .../{Shared => }/Contracts/IAnalyzer.cs | 2 +- .../{Shared => }/Contracts/IPublisher.cs | 2 +- .../Contracts/TabularData/ColumnType.cs | 2 +- .../Contracts/TabularData/Table.cs | 2 +- .../TabularData/TableColumnDefinition.cs | 5 +- .../Contracts/TabularData/TableRow.cs | 2 +- .../Messages/AddNodeToGraphRequest.cs | 2 +- .../Messages/OpenSourceLocationRequest.cs | 2 +- .../Messages/ShowPartitionsRequest.cs | 2 +- .../Messages/ShowTabularDataRequest.cs | 4 +- .../Notifications/IUserNotification.cs | 2 +- .../{Shared => }/Resources/blue-info_16.png | Bin .../Resources/error.png | Bin .../{Shared => }/Search/PascalCaseSearch.cs | 2 +- .../{Shared => }/Search/SearchExpression.cs | 2 +- .../Search/SearchExpressionFactory.cs | 2 +- .../Shared/Wpf/IconLoader.cs | 45 ----------- .../{Shared => }/Styles/ImageStyles.xaml | 2 +- .../Wpf/IconLoader.cs | 73 ++++++++++++++++++ .../{Shared => }/Wpf/WpfCommand.cs | 2 +- .../ArchitecturalRules/Analyzer.cs | 6 +- .../ArchitecturalRulesDialog.xaml | 2 +- .../Presentation/RuleViolationViewModel.cs | 10 +-- .../Presentation/RuleViolationsViewModel.cs | 4 +- .../CSharpCodeAnalyst.Analyzers.csproj | 4 - .../EventRegistration/Analyzer.cs | 6 +- .../Presentation/EventImbalanceViewModel.cs | 8 +- .../Presentation/EventImbalancesViewModel.cs | 4 +- .../MethodComplexity/Analyzer.cs | 6 +- .../MethodComplexityRowViewModel.cs | 2 +- .../Presentation/MethodComplexityViewModel.cs | 10 +-- .../TypeCohesion/Analyzer.cs | 6 +- .../Presentation/TypeCohesionRowViewModel.cs | 2 +- .../Presentation/TypeCohesionViewModel.cs | 10 +-- .../TypeDependencies/Analyzer.cs | 6 +- .../Presentation/TypeDependenciesViewModel.cs | 10 +-- .../Presentation/TypeDependencyViewModel.cs | 2 +- CSharpCodeAnalyst/App.xaml.cs | 1 + .../CommandLine/ConsoleValidationCommand.cs | 1 + .../AdvancedSearch/AdvancedSearchControl.xaml | 2 +- .../AdvancedSearch/AdvancedSearchViewModel.cs | 4 +- .../Features/Analyzers/AnalyzerManager.cs | 2 + .../CycleGroups/CycleGroupViewModel.cs | 2 +- .../CycleGroups/CycleGroupsViewModel.cs | 3 +- CSharpCodeAnalyst/Features/Export/Exporter.cs | 1 + .../Gallery/GalleryEditorViewModel.cs | 1 + .../Filtering/GraphHideDialogViewModel.cs | 1 + .../Features/Graph/GraphDropHandler.cs | 2 + .../Features/Graph/GraphSearchViewModel.cs | 3 +- .../Features/Graph/GraphToolbarControl.xaml | 2 +- .../Features/Graph/GraphViewModel.cs | 3 + CSharpCodeAnalyst/Features/Import/Importer.cs | 3 +- .../Features/Info/InfoPanelViewModel.cs | 1 + .../Features/Partitions/PartitionViewModel.cs | 2 +- .../Partitions/PartitionsViewModel.cs | 2 +- .../Refactoring/RefactoringService.cs | 1 + .../Features/Tree/TreeControl.xaml | 2 +- .../Features/Tree/TreeViewModel.cs | 4 +- .../Features/WebGraph/WebGraphControl.xaml.cs | 1 + CSharpCodeAnalyst/MainViewModel.cs | 6 +- CSharpCodeAnalyst/MainWindow.xaml | 2 +- CSharpCodeAnalyst/MainWindow.xaml.cs | 1 + .../Persistence/Json/ProjectService.cs | 1 + .../Shared/Contracts/IAnalyzerManager.cs | 4 +- .../DynamicDataGrid/DynamicDataGrid.xaml.cs | 2 +- .../Shared/Messages/MessageBus.cs | 3 +- .../Notifications/ConsoleUserNotification.cs | 1 + .../Notifications/WindowsUserNotification.cs | 1 + .../Shared/Tabs/DynamicTabViewModel.cs | 2 +- CodeGraph/CSharpCodeAnalyst.CodeGraph.csproj | 1 + .../UnitTests/Search/PascalCaseSearchTests.cs | 2 +- 72 files changed, 194 insertions(+), 136 deletions(-) rename CSharpCodeAnalyst.AnalyzerSdk/{Shared => }/Contracts/IAnalyzer.cs (90%) rename CSharpCodeAnalyst.AnalyzerSdk/{Shared => }/Contracts/IPublisher.cs (65%) rename CSharpCodeAnalyst.AnalyzerSdk/{Shared => }/DynamicDataGrid/Contracts/TabularData/ColumnType.cs (65%) rename CSharpCodeAnalyst.AnalyzerSdk/{Shared => }/DynamicDataGrid/Contracts/TabularData/Table.cs (96%) rename CSharpCodeAnalyst.AnalyzerSdk/{Shared => }/DynamicDataGrid/Contracts/TabularData/TableColumnDefinition.cs (80%) rename CSharpCodeAnalyst.AnalyzerSdk/{Shared => }/DynamicDataGrid/Contracts/TabularData/TableRow.cs (88%) rename CSharpCodeAnalyst.AnalyzerSdk/{Shared => }/Messages/AddNodeToGraphRequest.cs (89%) rename CSharpCodeAnalyst.AnalyzerSdk/{Shared => }/Messages/OpenSourceLocationRequest.cs (76%) rename CSharpCodeAnalyst.AnalyzerSdk/{Shared => }/Messages/ShowPartitionsRequest.cs (87%) rename CSharpCodeAnalyst.AnalyzerSdk/{Shared => }/Messages/ShowTabularDataRequest.cs (79%) rename CSharpCodeAnalyst.AnalyzerSdk/{Shared => }/Notifications/IUserNotification.cs (88%) rename CSharpCodeAnalyst.AnalyzerSdk/{Shared => }/Resources/blue-info_16.png (100%) rename {CSharpCodeAnalyst.Analyzers => CSharpCodeAnalyst.AnalyzerSdk}/Resources/error.png (100%) rename CSharpCodeAnalyst.AnalyzerSdk/{Shared => }/Search/PascalCaseSearch.cs (96%) rename CSharpCodeAnalyst.AnalyzerSdk/{Shared => }/Search/SearchExpression.cs (98%) rename CSharpCodeAnalyst.AnalyzerSdk/{Shared => }/Search/SearchExpressionFactory.cs (96%) delete mode 100644 CSharpCodeAnalyst.AnalyzerSdk/Shared/Wpf/IconLoader.cs rename CSharpCodeAnalyst.AnalyzerSdk/{Shared => }/Styles/ImageStyles.xaml (91%) create mode 100644 CSharpCodeAnalyst.AnalyzerSdk/Wpf/IconLoader.cs rename CSharpCodeAnalyst.AnalyzerSdk/{Shared => }/Wpf/WpfCommand.cs (97%) diff --git a/CSharpCodeAnalyst.AnalyzerSdk/CSharpCodeAnalyst.AnalyzerSdk.csproj b/CSharpCodeAnalyst.AnalyzerSdk/CSharpCodeAnalyst.AnalyzerSdk.csproj index abc4ea60..cc4d1a63 100644 --- a/CSharpCodeAnalyst.AnalyzerSdk/CSharpCodeAnalyst.AnalyzerSdk.csproj +++ b/CSharpCodeAnalyst.AnalyzerSdk/CSharpCodeAnalyst.AnalyzerSdk.csproj @@ -1,4 +1,4 @@ - + net10.0-windows @@ -7,7 +7,7 @@ true - CSharpCodeAnalyst + CSharpCodeAnalyst.AnalyzerSdk @@ -15,7 +15,8 @@ - + + diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Contracts/IAnalyzer.cs b/CSharpCodeAnalyst.AnalyzerSdk/Contracts/IAnalyzer.cs similarity index 90% rename from CSharpCodeAnalyst.AnalyzerSdk/Shared/Contracts/IAnalyzer.cs rename to CSharpCodeAnalyst.AnalyzerSdk/Contracts/IAnalyzer.cs index d07bfc55..4da8804b 100644 --- a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Contracts/IAnalyzer.cs +++ b/CSharpCodeAnalyst.AnalyzerSdk/Contracts/IAnalyzer.cs @@ -1,4 +1,4 @@ -namespace CSharpCodeAnalyst.Shared.Contracts; +namespace CSharpCodeAnalyst.AnalyzerSdk.Contracts; public interface IAnalyzer { diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Contracts/IPublisher.cs b/CSharpCodeAnalyst.AnalyzerSdk/Contracts/IPublisher.cs similarity index 65% rename from CSharpCodeAnalyst.AnalyzerSdk/Shared/Contracts/IPublisher.cs rename to CSharpCodeAnalyst.AnalyzerSdk/Contracts/IPublisher.cs index 6c6f8565..d76e3b40 100644 --- a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Contracts/IPublisher.cs +++ b/CSharpCodeAnalyst.AnalyzerSdk/Contracts/IPublisher.cs @@ -1,4 +1,4 @@ -namespace CSharpCodeAnalyst.Shared.Contracts; +namespace CSharpCodeAnalyst.AnalyzerSdk.Contracts; public interface IPublisher { diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/DynamicDataGrid/Contracts/TabularData/ColumnType.cs b/CSharpCodeAnalyst.AnalyzerSdk/DynamicDataGrid/Contracts/TabularData/ColumnType.cs similarity index 65% rename from CSharpCodeAnalyst.AnalyzerSdk/Shared/DynamicDataGrid/Contracts/TabularData/ColumnType.cs rename to CSharpCodeAnalyst.AnalyzerSdk/DynamicDataGrid/Contracts/TabularData/ColumnType.cs index 6dd9f4d1..b90c269a 100644 --- a/CSharpCodeAnalyst.AnalyzerSdk/Shared/DynamicDataGrid/Contracts/TabularData/ColumnType.cs +++ b/CSharpCodeAnalyst.AnalyzerSdk/DynamicDataGrid/Contracts/TabularData/ColumnType.cs @@ -1,4 +1,4 @@ -namespace CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; +namespace CSharpCodeAnalyst.AnalyzerSdk.DynamicDataGrid.Contracts.TabularData; /// /// Available column types for the dynamic data grid diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/DynamicDataGrid/Contracts/TabularData/Table.cs b/CSharpCodeAnalyst.AnalyzerSdk/DynamicDataGrid/Contracts/TabularData/Table.cs similarity index 96% rename from CSharpCodeAnalyst.AnalyzerSdk/Shared/DynamicDataGrid/Contracts/TabularData/Table.cs rename to CSharpCodeAnalyst.AnalyzerSdk/DynamicDataGrid/Contracts/TabularData/Table.cs index bad068dc..46df2f21 100644 --- a/CSharpCodeAnalyst.AnalyzerSdk/Shared/DynamicDataGrid/Contracts/TabularData/Table.cs +++ b/CSharpCodeAnalyst.AnalyzerSdk/DynamicDataGrid/Contracts/TabularData/Table.cs @@ -6,7 +6,7 @@ using System.Windows.Input; using System.Windows.Markup; -namespace CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; +namespace CSharpCodeAnalyst.AnalyzerSdk.DynamicDataGrid.Contracts.TabularData; /// /// Main interface for table data. diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/DynamicDataGrid/Contracts/TabularData/TableColumnDefinition.cs b/CSharpCodeAnalyst.AnalyzerSdk/DynamicDataGrid/Contracts/TabularData/TableColumnDefinition.cs similarity index 80% rename from CSharpCodeAnalyst.AnalyzerSdk/Shared/DynamicDataGrid/Contracts/TabularData/TableColumnDefinition.cs rename to CSharpCodeAnalyst.AnalyzerSdk/DynamicDataGrid/Contracts/TabularData/TableColumnDefinition.cs index 68af3871..a1a06626 100644 --- a/CSharpCodeAnalyst.AnalyzerSdk/Shared/DynamicDataGrid/Contracts/TabularData/TableColumnDefinition.cs +++ b/CSharpCodeAnalyst.AnalyzerSdk/DynamicDataGrid/Contracts/TabularData/TableColumnDefinition.cs @@ -1,7 +1,6 @@ -using System.Collections; -using System.Windows.Input; +using System.Windows.Input; -namespace CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; +namespace CSharpCodeAnalyst.AnalyzerSdk.DynamicDataGrid.Contracts.TabularData; public class TableColumnDefinition { diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/DynamicDataGrid/Contracts/TabularData/TableRow.cs b/CSharpCodeAnalyst.AnalyzerSdk/DynamicDataGrid/Contracts/TabularData/TableRow.cs similarity index 88% rename from CSharpCodeAnalyst.AnalyzerSdk/Shared/DynamicDataGrid/Contracts/TabularData/TableRow.cs rename to CSharpCodeAnalyst.AnalyzerSdk/DynamicDataGrid/Contracts/TabularData/TableRow.cs index ff9833fe..f2702439 100644 --- a/CSharpCodeAnalyst.AnalyzerSdk/Shared/DynamicDataGrid/Contracts/TabularData/TableRow.cs +++ b/CSharpCodeAnalyst.AnalyzerSdk/DynamicDataGrid/Contracts/TabularData/TableRow.cs @@ -1,7 +1,7 @@ using System.ComponentModel; using System.Runtime.CompilerServices; -namespace CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; +namespace CSharpCodeAnalyst.AnalyzerSdk.DynamicDataGrid.Contracts.TabularData; public abstract class TableRow : INotifyPropertyChanged { diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/AddNodeToGraphRequest.cs b/CSharpCodeAnalyst.AnalyzerSdk/Messages/AddNodeToGraphRequest.cs similarity index 89% rename from CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/AddNodeToGraphRequest.cs rename to CSharpCodeAnalyst.AnalyzerSdk/Messages/AddNodeToGraphRequest.cs index f9e76a01..e78448f9 100644 --- a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/AddNodeToGraphRequest.cs +++ b/CSharpCodeAnalyst.AnalyzerSdk/Messages/AddNodeToGraphRequest.cs @@ -1,6 +1,6 @@ using CSharpCodeAnalyst.CodeGraph.Graph; -namespace CSharpCodeAnalyst.Shared.Messages; +namespace CSharpCodeAnalyst.AnalyzerSdk.Messages; public class AddNodeToGraphRequest { diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/OpenSourceLocationRequest.cs b/CSharpCodeAnalyst.AnalyzerSdk/Messages/OpenSourceLocationRequest.cs similarity index 76% rename from CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/OpenSourceLocationRequest.cs rename to CSharpCodeAnalyst.AnalyzerSdk/Messages/OpenSourceLocationRequest.cs index 9843d56a..c916fff8 100644 --- a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/OpenSourceLocationRequest.cs +++ b/CSharpCodeAnalyst.AnalyzerSdk/Messages/OpenSourceLocationRequest.cs @@ -1,6 +1,6 @@ using CSharpCodeAnalyst.CodeGraph.Graph; -namespace CSharpCodeAnalyst.Shared.Messages; +namespace CSharpCodeAnalyst.AnalyzerSdk.Messages; public class OpenSourceLocationRequest(SourceLocation location) { diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/ShowPartitionsRequest.cs b/CSharpCodeAnalyst.AnalyzerSdk/Messages/ShowPartitionsRequest.cs similarity index 87% rename from CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/ShowPartitionsRequest.cs rename to CSharpCodeAnalyst.AnalyzerSdk/Messages/ShowPartitionsRequest.cs index d1d0f682..564a76b7 100644 --- a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/ShowPartitionsRequest.cs +++ b/CSharpCodeAnalyst.AnalyzerSdk/Messages/ShowPartitionsRequest.cs @@ -1,6 +1,6 @@ using CSharpCodeAnalyst.CodeGraph.Graph; -namespace CSharpCodeAnalyst.Shared.Messages; +namespace CSharpCodeAnalyst.AnalyzerSdk.Messages; public class ShowPartitionsRequest { diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/ShowTabularDataRequest.cs b/CSharpCodeAnalyst.AnalyzerSdk/Messages/ShowTabularDataRequest.cs similarity index 79% rename from CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/ShowTabularDataRequest.cs rename to CSharpCodeAnalyst.AnalyzerSdk/Messages/ShowTabularDataRequest.cs index 3d56592b..01db22b3 100644 --- a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Messages/ShowTabularDataRequest.cs +++ b/CSharpCodeAnalyst.AnalyzerSdk/Messages/ShowTabularDataRequest.cs @@ -1,6 +1,6 @@ -using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; +using CSharpCodeAnalyst.AnalyzerSdk.DynamicDataGrid.Contracts.TabularData; -namespace CSharpCodeAnalyst.Shared.Messages; +namespace CSharpCodeAnalyst.AnalyzerSdk.Messages; /// /// Requests a dynamic result tab. keys the tab: publishing again under the diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Notifications/IUserNotification.cs b/CSharpCodeAnalyst.AnalyzerSdk/Notifications/IUserNotification.cs similarity index 88% rename from CSharpCodeAnalyst.AnalyzerSdk/Shared/Notifications/IUserNotification.cs rename to CSharpCodeAnalyst.AnalyzerSdk/Notifications/IUserNotification.cs index 75a7ac9a..96cd6f6e 100644 --- a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Notifications/IUserNotification.cs +++ b/CSharpCodeAnalyst.AnalyzerSdk/Notifications/IUserNotification.cs @@ -1,4 +1,4 @@ -namespace CSharpCodeAnalyst.Shared.Notifications; +namespace CSharpCodeAnalyst.AnalyzerSdk.Notifications; public interface IUserNotification { diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Resources/blue-info_16.png b/CSharpCodeAnalyst.AnalyzerSdk/Resources/blue-info_16.png similarity index 100% rename from CSharpCodeAnalyst.AnalyzerSdk/Shared/Resources/blue-info_16.png rename to CSharpCodeAnalyst.AnalyzerSdk/Resources/blue-info_16.png diff --git a/CSharpCodeAnalyst.Analyzers/Resources/error.png b/CSharpCodeAnalyst.AnalyzerSdk/Resources/error.png similarity index 100% rename from CSharpCodeAnalyst.Analyzers/Resources/error.png rename to CSharpCodeAnalyst.AnalyzerSdk/Resources/error.png diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Search/PascalCaseSearch.cs b/CSharpCodeAnalyst.AnalyzerSdk/Search/PascalCaseSearch.cs similarity index 96% rename from CSharpCodeAnalyst.AnalyzerSdk/Shared/Search/PascalCaseSearch.cs rename to CSharpCodeAnalyst.AnalyzerSdk/Search/PascalCaseSearch.cs index e1309626..633303bb 100644 --- a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Search/PascalCaseSearch.cs +++ b/CSharpCodeAnalyst.AnalyzerSdk/Search/PascalCaseSearch.cs @@ -1,7 +1,7 @@ using System.Text; using System.Text.RegularExpressions; -namespace CSharpCodeAnalyst.Shared.Search; +namespace CSharpCodeAnalyst.AnalyzerSdk.Search; public static class PascalCaseSearch { diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Search/SearchExpression.cs b/CSharpCodeAnalyst.AnalyzerSdk/Search/SearchExpression.cs similarity index 98% rename from CSharpCodeAnalyst.AnalyzerSdk/Shared/Search/SearchExpression.cs rename to CSharpCodeAnalyst.AnalyzerSdk/Search/SearchExpression.cs index 21fe90e5..72ba1c79 100644 --- a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Search/SearchExpression.cs +++ b/CSharpCodeAnalyst.AnalyzerSdk/Search/SearchExpression.cs @@ -1,7 +1,7 @@ using System.Text.RegularExpressions; using CSharpCodeAnalyst.CodeGraph.Graph; -namespace CSharpCodeAnalyst.Shared.Search; +namespace CSharpCodeAnalyst.AnalyzerSdk.Search; /// /// Helper to build (very) simple search expressions with AND/OR/TERM diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Search/SearchExpressionFactory.cs b/CSharpCodeAnalyst.AnalyzerSdk/Search/SearchExpressionFactory.cs similarity index 96% rename from CSharpCodeAnalyst.AnalyzerSdk/Shared/Search/SearchExpressionFactory.cs rename to CSharpCodeAnalyst.AnalyzerSdk/Search/SearchExpressionFactory.cs index dafe88ef..21d57a83 100644 --- a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Search/SearchExpressionFactory.cs +++ b/CSharpCodeAnalyst.AnalyzerSdk/Search/SearchExpressionFactory.cs @@ -1,4 +1,4 @@ -namespace CSharpCodeAnalyst.Shared.Search; +namespace CSharpCodeAnalyst.AnalyzerSdk.Search; public static class SearchExpressionFactory { diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Wpf/IconLoader.cs b/CSharpCodeAnalyst.AnalyzerSdk/Shared/Wpf/IconLoader.cs deleted file mode 100644 index 04dab5c9..00000000 --- a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Wpf/IconLoader.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System.Reflection; -using System.Windows.Media; -using System.Windows.Media.Imaging; - -namespace CSharpCodeAnalyst.Shared.Wpf; - -public static class IconLoader -{ - private static readonly Dictionary IconCache = new(); - - /// - /// Loads an icon embedded as a WPF "Resource" in the calling assembly (e.g. the host or an - /// analyzer plugin), not necessarily the entry assembly - so each assembly can ship its own - /// icons without depending on another assembly's resources. - /// - public static ImageSource? LoadIcon(string iconPath) - { - try - { - var assemblyName = Assembly.GetCallingAssembly().GetName().Name; - var cacheKey = $"{assemblyName}|{iconPath}"; - - if (IconCache.TryGetValue(cacheKey, out var icon)) - { - return icon; - } - - var bitmap = new BitmapImage(); - bitmap.BeginInit(); - bitmap.UriSource = new Uri($"pack://application:,,,/{assemblyName};component/{iconPath}"); - bitmap.DecodePixelWidth = 16; - bitmap.DecodePixelHeight = 16; - bitmap.CacheOption = BitmapCacheOption.OnLoad; - bitmap.EndInit(); - bitmap.Freeze(); - - IconCache[cacheKey] = bitmap; - return bitmap; - } - catch - { - return null; - } - } -} \ No newline at end of file diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Styles/ImageStyles.xaml b/CSharpCodeAnalyst.AnalyzerSdk/Styles/ImageStyles.xaml similarity index 91% rename from CSharpCodeAnalyst.AnalyzerSdk/Shared/Styles/ImageStyles.xaml rename to CSharpCodeAnalyst.AnalyzerSdk/Styles/ImageStyles.xaml index 07937efb..9444ba69 100644 --- a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Styles/ImageStyles.xaml +++ b/CSharpCodeAnalyst.AnalyzerSdk/Styles/ImageStyles.xaml @@ -4,7 +4,7 @@ - + diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Wpf/IconLoader.cs b/CSharpCodeAnalyst.AnalyzerSdk/Wpf/IconLoader.cs new file mode 100644 index 00000000..6dddd127 --- /dev/null +++ b/CSharpCodeAnalyst.AnalyzerSdk/Wpf/IconLoader.cs @@ -0,0 +1,73 @@ +using System.Reflection; +using System.Windows.Media; +using System.Windows.Media.Imaging; + +namespace CSharpCodeAnalyst.AnalyzerSdk.Wpf; + +public static class IconLoader +{ + private static readonly Dictionary IconCache = new(); + + /// + /// Loads an icon embedded as a WPF "Resource" in the calling assembly (e.g. the host or an + /// analyzer plugin), not necessarily the entry assembly - so each assembly can ship its own + /// icons without depending on another assembly's resources. + /// + public static ImageSource? LoadIcon(string iconPath) + { + try + { + var assemblyName = Assembly.GetCallingAssembly().GetName().Name; + var cacheKey = $"{assemblyName}|{iconPath}"; + + if (IconCache.TryGetValue(cacheKey, out var icon)) + { + return icon; + } + + var bitmap = Load(assemblyName, iconPath); + + IconCache[cacheKey] = bitmap; + return bitmap; + } + catch + { + return null; + } + } + + public static ImageSource? LoadIcon(string assemblyName, string iconPath) + { + try + { + var cacheKey = $"{assemblyName}|{iconPath}"; + + if (IconCache.TryGetValue(cacheKey, out var icon)) + { + return icon; + } + + var bitmap = Load(assemblyName, iconPath); + + IconCache[cacheKey] = bitmap; + return bitmap; + } + catch + { + return null; + } + } + + private static BitmapImage Load(string? assemblyName, string iconPath) + { + var bitmap = new BitmapImage(); + bitmap.BeginInit(); + bitmap.UriSource = new Uri($"pack://application:,,,/{assemblyName};component/{iconPath}"); + bitmap.DecodePixelWidth = 16; + bitmap.DecodePixelHeight = 16; + bitmap.CacheOption = BitmapCacheOption.OnLoad; + bitmap.EndInit(); + bitmap.Freeze(); + return bitmap; + } +} \ No newline at end of file diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Wpf/WpfCommand.cs b/CSharpCodeAnalyst.AnalyzerSdk/Wpf/WpfCommand.cs similarity index 97% rename from CSharpCodeAnalyst.AnalyzerSdk/Shared/Wpf/WpfCommand.cs rename to CSharpCodeAnalyst.AnalyzerSdk/Wpf/WpfCommand.cs index 78795673..4a6c68de 100644 --- a/CSharpCodeAnalyst.AnalyzerSdk/Shared/Wpf/WpfCommand.cs +++ b/CSharpCodeAnalyst.AnalyzerSdk/Wpf/WpfCommand.cs @@ -1,6 +1,6 @@ using System.Windows.Input; -namespace CSharpCodeAnalyst.Shared.Wpf; +namespace CSharpCodeAnalyst.AnalyzerSdk.Wpf; public class WpfCommand : ICommand { diff --git a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Analyzer.cs b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Analyzer.cs index 14805c3b..588e0e89 100644 --- a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Analyzer.cs +++ b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Analyzer.cs @@ -5,10 +5,10 @@ using CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Presentation; using CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Rules; using CSharpCodeAnalyst.Analyzers.Resources; +using CSharpCodeAnalyst.AnalyzerSdk.Contracts; +using CSharpCodeAnalyst.AnalyzerSdk.Messages; +using CSharpCodeAnalyst.AnalyzerSdk.Notifications; using CSharpCodeAnalyst.CodeGraph.Graph; -using CSharpCodeAnalyst.Shared.Contracts; -using CSharpCodeAnalyst.Shared.Messages; -using CSharpCodeAnalyst.Shared.Notifications; namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules; diff --git a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/ArchitecturalRulesDialog.xaml b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/ArchitecturalRulesDialog.xaml index 93af8618..ba5b03e2 100644 --- a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/ArchitecturalRulesDialog.xaml +++ b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/ArchitecturalRulesDialog.xaml @@ -14,7 +14,7 @@ - + diff --git a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/RuleViolationViewModel.cs b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/RuleViolationViewModel.cs index 24547312..661a848b 100644 --- a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/RuleViolationViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/RuleViolationViewModel.cs @@ -2,10 +2,10 @@ using System.Windows.Input; using System.Windows.Media; using CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Rules; -using CSharpCodeAnalyst.Shared.Contracts; -using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; -using CSharpCodeAnalyst.Shared.Messages; -using CSharpCodeAnalyst.Shared.Wpf; +using CSharpCodeAnalyst.AnalyzerSdk.Contracts; +using CSharpCodeAnalyst.AnalyzerSdk.DynamicDataGrid.Contracts.TabularData; +using CSharpCodeAnalyst.AnalyzerSdk.Messages; +using CSharpCodeAnalyst.AnalyzerSdk.Wpf; namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Presentation; @@ -17,7 +17,7 @@ public class RuleViolationViewModel : TableRow public RuleViolationViewModel(Violation violation, CodeGraph.Graph.CodeGraph codeGraph, IPublisher messaging) { - ErrorIcon = IconLoader.LoadIcon("Resources/error.png"); + ErrorIcon = IconLoader.LoadIcon("CSharpCodeAnalyst.AnalyzerSdk", "Resources/error.png"); _violation = violation; _codeGraph = codeGraph; _messaging = messaging; diff --git a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/RuleViolationsViewModel.cs b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/RuleViolationsViewModel.cs index 13b716db..a7c94366 100644 --- a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/RuleViolationsViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/RuleViolationsViewModel.cs @@ -1,8 +1,8 @@ using System.Collections.ObjectModel; using System.Windows; using CSharpCodeAnalyst.Analyzers.Resources; -using CSharpCodeAnalyst.Shared.Contracts; -using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; +using CSharpCodeAnalyst.AnalyzerSdk.Contracts; +using CSharpCodeAnalyst.AnalyzerSdk.DynamicDataGrid.Contracts.TabularData; namespace CSharpCodeAnalyst.Analyzers.ArchitecturalRules.Presentation; diff --git a/CSharpCodeAnalyst.Analyzers/CSharpCodeAnalyst.Analyzers.csproj b/CSharpCodeAnalyst.Analyzers/CSharpCodeAnalyst.Analyzers.csproj index 46a088b9..b1f9aa01 100644 --- a/CSharpCodeAnalyst.Analyzers/CSharpCodeAnalyst.Analyzers.csproj +++ b/CSharpCodeAnalyst.Analyzers/CSharpCodeAnalyst.Analyzers.csproj @@ -13,10 +13,6 @@ - - - - MSBuild:Compile diff --git a/CSharpCodeAnalyst.Analyzers/EventRegistration/Analyzer.cs b/CSharpCodeAnalyst.Analyzers/EventRegistration/Analyzer.cs index 35ae3d0c..52083da3 100644 --- a/CSharpCodeAnalyst.Analyzers/EventRegistration/Analyzer.cs +++ b/CSharpCodeAnalyst.Analyzers/EventRegistration/Analyzer.cs @@ -1,9 +1,9 @@ using CSharpCodeAnalyst.Analyzers.EventRegistration.Presentation; using CSharpCodeAnalyst.Analyzers.Resources; +using CSharpCodeAnalyst.AnalyzerSdk.Contracts; +using CSharpCodeAnalyst.AnalyzerSdk.Messages; +using CSharpCodeAnalyst.AnalyzerSdk.Notifications; using CSharpCodeAnalyst.CodeGraph.Graph; -using CSharpCodeAnalyst.Shared.Contracts; -using CSharpCodeAnalyst.Shared.Messages; -using CSharpCodeAnalyst.Shared.Notifications; namespace CSharpCodeAnalyst.Analyzers.EventRegistration; diff --git a/CSharpCodeAnalyst.Analyzers/EventRegistration/Presentation/EventImbalanceViewModel.cs b/CSharpCodeAnalyst.Analyzers/EventRegistration/Presentation/EventImbalanceViewModel.cs index ec5ff363..205d0e48 100644 --- a/CSharpCodeAnalyst.Analyzers/EventRegistration/Presentation/EventImbalanceViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/EventRegistration/Presentation/EventImbalanceViewModel.cs @@ -1,10 +1,10 @@ using System.Collections.ObjectModel; using System.Windows.Input; +using CSharpCodeAnalyst.AnalyzerSdk.Contracts; +using CSharpCodeAnalyst.AnalyzerSdk.DynamicDataGrid.Contracts.TabularData; +using CSharpCodeAnalyst.AnalyzerSdk.Messages; +using CSharpCodeAnalyst.AnalyzerSdk.Wpf; using CSharpCodeAnalyst.CodeGraph.Graph; -using CSharpCodeAnalyst.Shared.Contracts; -using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; -using CSharpCodeAnalyst.Shared.Messages; -using CSharpCodeAnalyst.Shared.Wpf; namespace CSharpCodeAnalyst.Analyzers.EventRegistration.Presentation; diff --git a/CSharpCodeAnalyst.Analyzers/EventRegistration/Presentation/EventImbalancesViewModel.cs b/CSharpCodeAnalyst.Analyzers/EventRegistration/Presentation/EventImbalancesViewModel.cs index 18626a41..64b9c306 100644 --- a/CSharpCodeAnalyst.Analyzers/EventRegistration/Presentation/EventImbalancesViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/EventRegistration/Presentation/EventImbalancesViewModel.cs @@ -1,8 +1,8 @@ using System.Collections.ObjectModel; using System.Windows; using CSharpCodeAnalyst.Analyzers.Resources; -using CSharpCodeAnalyst.Shared.Contracts; -using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; +using CSharpCodeAnalyst.AnalyzerSdk.Contracts; +using CSharpCodeAnalyst.AnalyzerSdk.DynamicDataGrid.Contracts.TabularData; namespace CSharpCodeAnalyst.Analyzers.EventRegistration.Presentation; diff --git a/CSharpCodeAnalyst.Analyzers/MethodComplexity/Analyzer.cs b/CSharpCodeAnalyst.Analyzers/MethodComplexity/Analyzer.cs index 6b81351d..0aa6bf41 100644 --- a/CSharpCodeAnalyst.Analyzers/MethodComplexity/Analyzer.cs +++ b/CSharpCodeAnalyst.Analyzers/MethodComplexity/Analyzer.cs @@ -1,9 +1,9 @@ using CSharpCodeAnalyst.Analyzers.MethodComplexity.Presentation; using CSharpCodeAnalyst.Analyzers.Resources; +using CSharpCodeAnalyst.AnalyzerSdk.Contracts; +using CSharpCodeAnalyst.AnalyzerSdk.Messages; +using CSharpCodeAnalyst.AnalyzerSdk.Notifications; using CSharpCodeAnalyst.CodeGraph.Metrics; -using CSharpCodeAnalyst.Shared.Contracts; -using CSharpCodeAnalyst.Shared.Messages; -using CSharpCodeAnalyst.Shared.Notifications; namespace CSharpCodeAnalyst.Analyzers.MethodComplexity; diff --git a/CSharpCodeAnalyst.Analyzers/MethodComplexity/Presentation/MethodComplexityRowViewModel.cs b/CSharpCodeAnalyst.Analyzers/MethodComplexity/Presentation/MethodComplexityRowViewModel.cs index d93d4288..44ae3f80 100644 --- a/CSharpCodeAnalyst.Analyzers/MethodComplexity/Presentation/MethodComplexityRowViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/MethodComplexity/Presentation/MethodComplexityRowViewModel.cs @@ -1,7 +1,7 @@ using System.Globalization; +using CSharpCodeAnalyst.AnalyzerSdk.DynamicDataGrid.Contracts.TabularData; using CSharpCodeAnalyst.CodeGraph.Graph; using CSharpCodeAnalyst.CodeGraph.Metrics; -using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; namespace CSharpCodeAnalyst.Analyzers.MethodComplexity.Presentation; diff --git a/CSharpCodeAnalyst.Analyzers/MethodComplexity/Presentation/MethodComplexityViewModel.cs b/CSharpCodeAnalyst.Analyzers/MethodComplexity/Presentation/MethodComplexityViewModel.cs index e7f8dfc6..8ed444bc 100644 --- a/CSharpCodeAnalyst.Analyzers/MethodComplexity/Presentation/MethodComplexityViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/MethodComplexity/Presentation/MethodComplexityViewModel.cs @@ -1,11 +1,11 @@ using System.Collections.ObjectModel; using System.Windows; using CSharpCodeAnalyst.Analyzers.Resources; -using CSharpCodeAnalyst.Shared.Contracts; -using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; -using CSharpCodeAnalyst.Shared.Messages; -using CSharpCodeAnalyst.Shared.Search; -using CSharpCodeAnalyst.Shared.Wpf; +using CSharpCodeAnalyst.AnalyzerSdk.Contracts; +using CSharpCodeAnalyst.AnalyzerSdk.DynamicDataGrid.Contracts.TabularData; +using CSharpCodeAnalyst.AnalyzerSdk.Messages; +using CSharpCodeAnalyst.AnalyzerSdk.Search; +using CSharpCodeAnalyst.AnalyzerSdk.Wpf; namespace CSharpCodeAnalyst.Analyzers.MethodComplexity.Presentation; diff --git a/CSharpCodeAnalyst.Analyzers/TypeCohesion/Analyzer.cs b/CSharpCodeAnalyst.Analyzers/TypeCohesion/Analyzer.cs index 18a85fc1..ccf4c3ce 100644 --- a/CSharpCodeAnalyst.Analyzers/TypeCohesion/Analyzer.cs +++ b/CSharpCodeAnalyst.Analyzers/TypeCohesion/Analyzer.cs @@ -1,9 +1,9 @@ using CSharpCodeAnalyst.Analyzers.TypeCohesion.Presentation; using CSharpCodeAnalyst.Analyzers.Resources; +using CSharpCodeAnalyst.AnalyzerSdk.Contracts; +using CSharpCodeAnalyst.AnalyzerSdk.Messages; +using CSharpCodeAnalyst.AnalyzerSdk.Notifications; using CSharpCodeAnalyst.CodeGraph.Algorithms.Partitioning; -using CSharpCodeAnalyst.Shared.Contracts; -using CSharpCodeAnalyst.Shared.Messages; -using CSharpCodeAnalyst.Shared.Notifications; namespace CSharpCodeAnalyst.Analyzers.TypeCohesion; diff --git a/CSharpCodeAnalyst.Analyzers/TypeCohesion/Presentation/TypeCohesionRowViewModel.cs b/CSharpCodeAnalyst.Analyzers/TypeCohesion/Presentation/TypeCohesionRowViewModel.cs index d75de9c5..b33134f6 100644 --- a/CSharpCodeAnalyst.Analyzers/TypeCohesion/Presentation/TypeCohesionRowViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/TypeCohesion/Presentation/TypeCohesionRowViewModel.cs @@ -1,7 +1,7 @@ using System.Globalization; +using CSharpCodeAnalyst.AnalyzerSdk.DynamicDataGrid.Contracts.TabularData; using CSharpCodeAnalyst.CodeGraph.Algorithms.Partitioning; using CSharpCodeAnalyst.CodeGraph.Graph; -using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; namespace CSharpCodeAnalyst.Analyzers.TypeCohesion.Presentation; diff --git a/CSharpCodeAnalyst.Analyzers/TypeCohesion/Presentation/TypeCohesionViewModel.cs b/CSharpCodeAnalyst.Analyzers/TypeCohesion/Presentation/TypeCohesionViewModel.cs index 218e295a..15637991 100644 --- a/CSharpCodeAnalyst.Analyzers/TypeCohesion/Presentation/TypeCohesionViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/TypeCohesion/Presentation/TypeCohesionViewModel.cs @@ -1,12 +1,12 @@ using System.Collections.ObjectModel; using System.Windows; using CSharpCodeAnalyst.Analyzers.Resources; +using CSharpCodeAnalyst.AnalyzerSdk.Contracts; +using CSharpCodeAnalyst.AnalyzerSdk.DynamicDataGrid.Contracts.TabularData; +using CSharpCodeAnalyst.AnalyzerSdk.Messages; +using CSharpCodeAnalyst.AnalyzerSdk.Search; +using CSharpCodeAnalyst.AnalyzerSdk.Wpf; using CSharpCodeAnalyst.CodeGraph.Algorithms.Partitioning; -using CSharpCodeAnalyst.Shared.Contracts; -using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; -using CSharpCodeAnalyst.Shared.Messages; -using CSharpCodeAnalyst.Shared.Search; -using CSharpCodeAnalyst.Shared.Wpf; namespace CSharpCodeAnalyst.Analyzers.TypeCohesion.Presentation; diff --git a/CSharpCodeAnalyst.Analyzers/TypeDependencies/Analyzer.cs b/CSharpCodeAnalyst.Analyzers/TypeDependencies/Analyzer.cs index 8280e049..a9ca6fa5 100644 --- a/CSharpCodeAnalyst.Analyzers/TypeDependencies/Analyzer.cs +++ b/CSharpCodeAnalyst.Analyzers/TypeDependencies/Analyzer.cs @@ -1,9 +1,9 @@ using CSharpCodeAnalyst.Analyzers.TypeDependencies.Presentation; using CSharpCodeAnalyst.Analyzers.Resources; +using CSharpCodeAnalyst.AnalyzerSdk.Contracts; +using CSharpCodeAnalyst.AnalyzerSdk.Messages; +using CSharpCodeAnalyst.AnalyzerSdk.Notifications; using CSharpCodeAnalyst.CodeGraph.Algorithms.Metrics; -using CSharpCodeAnalyst.Shared.Contracts; -using CSharpCodeAnalyst.Shared.Messages; -using CSharpCodeAnalyst.Shared.Notifications; namespace CSharpCodeAnalyst.Analyzers.TypeDependencies; diff --git a/CSharpCodeAnalyst.Analyzers/TypeDependencies/Presentation/TypeDependenciesViewModel.cs b/CSharpCodeAnalyst.Analyzers/TypeDependencies/Presentation/TypeDependenciesViewModel.cs index b6f871e0..a33e4232 100644 --- a/CSharpCodeAnalyst.Analyzers/TypeDependencies/Presentation/TypeDependenciesViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/TypeDependencies/Presentation/TypeDependenciesViewModel.cs @@ -1,12 +1,12 @@ using System.Collections.ObjectModel; using System.Windows; using CSharpCodeAnalyst.Analyzers.Resources; +using CSharpCodeAnalyst.AnalyzerSdk.Contracts; +using CSharpCodeAnalyst.AnalyzerSdk.DynamicDataGrid.Contracts.TabularData; +using CSharpCodeAnalyst.AnalyzerSdk.Messages; +using CSharpCodeAnalyst.AnalyzerSdk.Search; +using CSharpCodeAnalyst.AnalyzerSdk.Wpf; using CSharpCodeAnalyst.CodeGraph.Algorithms.Metrics; -using CSharpCodeAnalyst.Shared.Contracts; -using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; -using CSharpCodeAnalyst.Shared.Messages; -using CSharpCodeAnalyst.Shared.Search; -using CSharpCodeAnalyst.Shared.Wpf; namespace CSharpCodeAnalyst.Analyzers.TypeDependencies.Presentation; diff --git a/CSharpCodeAnalyst.Analyzers/TypeDependencies/Presentation/TypeDependencyViewModel.cs b/CSharpCodeAnalyst.Analyzers/TypeDependencies/Presentation/TypeDependencyViewModel.cs index 576523b3..76219e63 100644 --- a/CSharpCodeAnalyst.Analyzers/TypeDependencies/Presentation/TypeDependencyViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/TypeDependencies/Presentation/TypeDependencyViewModel.cs @@ -1,7 +1,7 @@ using System.Globalization; +using CSharpCodeAnalyst.AnalyzerSdk.DynamicDataGrid.Contracts.TabularData; using CSharpCodeAnalyst.CodeGraph.Algorithms.Metrics; using CSharpCodeAnalyst.CodeGraph.Graph; -using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; namespace CSharpCodeAnalyst.Analyzers.TypeDependencies.Presentation; diff --git a/CSharpCodeAnalyst/App.xaml.cs b/CSharpCodeAnalyst/App.xaml.cs index 7678718c..c3ac446f 100644 --- a/CSharpCodeAnalyst/App.xaml.cs +++ b/CSharpCodeAnalyst/App.xaml.cs @@ -1,5 +1,6 @@ using System.IO; using System.Windows; +using CSharpCodeAnalyst.AnalyzerSdk.Messages; using CSharpCodeAnalyst.CodeGraph.Exploration; using CSharpCodeAnalyst.CodeParser.Parser; using CSharpCodeAnalyst.CommandLine; diff --git a/CSharpCodeAnalyst/CommandLine/ConsoleValidationCommand.cs b/CSharpCodeAnalyst/CommandLine/ConsoleValidationCommand.cs index c9e644e5..a521dcc8 100644 --- a/CSharpCodeAnalyst/CommandLine/ConsoleValidationCommand.cs +++ b/CSharpCodeAnalyst/CommandLine/ConsoleValidationCommand.cs @@ -3,6 +3,7 @@ using System.Text; using CSharpCodeAnalyst.Configuration; using CSharpCodeAnalyst.Analyzers.ArchitecturalRules; +using CSharpCodeAnalyst.AnalyzerSdk.Contracts; using CSharpCodeAnalyst.CodeParser.Parser; using CSharpCodeAnalyst.CodeParser.Parser.Config; using CSharpCodeAnalyst.Resources; diff --git a/CSharpCodeAnalyst/Features/AdvancedSearch/AdvancedSearchControl.xaml b/CSharpCodeAnalyst/Features/AdvancedSearch/AdvancedSearchControl.xaml index 461f8869..75812c30 100644 --- a/CSharpCodeAnalyst/Features/AdvancedSearch/AdvancedSearchControl.xaml +++ b/CSharpCodeAnalyst/Features/AdvancedSearch/AdvancedSearchControl.xaml @@ -14,7 +14,7 @@ - + diff --git a/CSharpCodeAnalyst/Features/AdvancedSearch/AdvancedSearchViewModel.cs b/CSharpCodeAnalyst/Features/AdvancedSearch/AdvancedSearchViewModel.cs index f34cea20..c249c16b 100644 --- a/CSharpCodeAnalyst/Features/AdvancedSearch/AdvancedSearchViewModel.cs +++ b/CSharpCodeAnalyst/Features/AdvancedSearch/AdvancedSearchViewModel.cs @@ -3,10 +3,12 @@ using System.Windows; using System.Windows.Input; using System.Windows.Threading; +using CSharpCodeAnalyst.AnalyzerSdk.Messages; +using CSharpCodeAnalyst.AnalyzerSdk.Search; +using CSharpCodeAnalyst.AnalyzerSdk.Wpf; using CSharpCodeAnalyst.CodeGraph.Graph; using CSharpCodeAnalyst.Features.Refactoring; using CSharpCodeAnalyst.Shared.Messages; -using CSharpCodeAnalyst.Shared.Search; using CSharpCodeAnalyst.Shared.Services; using CSharpCodeAnalyst.Shared.Wpf; diff --git a/CSharpCodeAnalyst/Features/Analyzers/AnalyzerManager.cs b/CSharpCodeAnalyst/Features/Analyzers/AnalyzerManager.cs index c5992ea4..84f3c1d6 100644 --- a/CSharpCodeAnalyst/Features/Analyzers/AnalyzerManager.cs +++ b/CSharpCodeAnalyst/Features/Analyzers/AnalyzerManager.cs @@ -1,4 +1,6 @@ using CSharpCodeAnalyst.Analyzers.EventRegistration; +using CSharpCodeAnalyst.AnalyzerSdk.Contracts; +using CSharpCodeAnalyst.AnalyzerSdk.Notifications; using CSharpCodeAnalyst.CodeGraph.Metrics; using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.Notifications; diff --git a/CSharpCodeAnalyst/Features/CycleGroups/CycleGroupViewModel.cs b/CSharpCodeAnalyst/Features/CycleGroups/CycleGroupViewModel.cs index a71b2f0d..ed6e36b1 100644 --- a/CSharpCodeAnalyst/Features/CycleGroups/CycleGroupViewModel.cs +++ b/CSharpCodeAnalyst/Features/CycleGroups/CycleGroupViewModel.cs @@ -1,8 +1,8 @@ using System.Collections.ObjectModel; +using CSharpCodeAnalyst.AnalyzerSdk.DynamicDataGrid.Contracts.TabularData; using CSharpCodeAnalyst.CodeGraph.Algorithms.Cycles; using CSharpCodeAnalyst.CodeGraph.Graph; using CSharpCodeAnalyst.Resources; -using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; using CSharpCodeAnalyst.Shared.UI; namespace CSharpCodeAnalyst.Features.CycleGroups; diff --git a/CSharpCodeAnalyst/Features/CycleGroups/CycleGroupsViewModel.cs b/CSharpCodeAnalyst/Features/CycleGroups/CycleGroupsViewModel.cs index 2b8844b7..8d4cfc7f 100644 --- a/CSharpCodeAnalyst/Features/CycleGroups/CycleGroupsViewModel.cs +++ b/CSharpCodeAnalyst/Features/CycleGroups/CycleGroupsViewModel.cs @@ -1,8 +1,9 @@ using System.Collections.ObjectModel; using System.Windows; +using CSharpCodeAnalyst.AnalyzerSdk.DynamicDataGrid.Contracts.TabularData; +using CSharpCodeAnalyst.AnalyzerSdk.Wpf; using CSharpCodeAnalyst.CodeGraph.Algorithms.Cycles; using CSharpCodeAnalyst.Resources; -using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; using CSharpCodeAnalyst.Shared.Messages; using CSharpCodeAnalyst.Shared.Wpf; diff --git a/CSharpCodeAnalyst/Features/Export/Exporter.cs b/CSharpCodeAnalyst/Features/Export/Exporter.cs index 964119b8..cc91a254 100644 --- a/CSharpCodeAnalyst/Features/Export/Exporter.cs +++ b/CSharpCodeAnalyst/Features/Export/Exporter.cs @@ -1,6 +1,7 @@ using System.Diagnostics; using System.IO; using System.Windows; +using CSharpCodeAnalyst.AnalyzerSdk.Notifications; using CSharpCodeAnalyst.CodeGraph.Export; using CSharpCodeAnalyst.Resources; using CSharpCodeAnalyst.Shared.Notifications; diff --git a/CSharpCodeAnalyst/Features/Gallery/GalleryEditorViewModel.cs b/CSharpCodeAnalyst/Features/Gallery/GalleryEditorViewModel.cs index 55d97228..df7dccbc 100644 --- a/CSharpCodeAnalyst/Features/Gallery/GalleryEditorViewModel.cs +++ b/CSharpCodeAnalyst/Features/Gallery/GalleryEditorViewModel.cs @@ -1,6 +1,7 @@ using System.Collections.ObjectModel; using System.ComponentModel; using System.Windows.Input; +using CSharpCodeAnalyst.AnalyzerSdk.Wpf; using CSharpCodeAnalyst.Features.Graph; using CSharpCodeAnalyst.Shared.Wpf; diff --git a/CSharpCodeAnalyst/Features/Graph/Filtering/GraphHideDialogViewModel.cs b/CSharpCodeAnalyst/Features/Graph/Filtering/GraphHideDialogViewModel.cs index fb2424dd..25d7186e 100644 --- a/CSharpCodeAnalyst/Features/Graph/Filtering/GraphHideDialogViewModel.cs +++ b/CSharpCodeAnalyst/Features/Graph/Filtering/GraphHideDialogViewModel.cs @@ -2,6 +2,7 @@ using System.ComponentModel; using System.Runtime.CompilerServices; using System.Windows.Input; +using CSharpCodeAnalyst.AnalyzerSdk.Wpf; using CSharpCodeAnalyst.CodeGraph.Graph; using CSharpCodeAnalyst.Shared.Wpf; diff --git a/CSharpCodeAnalyst/Features/Graph/GraphDropHandler.cs b/CSharpCodeAnalyst/Features/Graph/GraphDropHandler.cs index 437214ea..42825d68 100644 --- a/CSharpCodeAnalyst/Features/Graph/GraphDropHandler.cs +++ b/CSharpCodeAnalyst/Features/Graph/GraphDropHandler.cs @@ -1,4 +1,6 @@ using System.Windows; +using CSharpCodeAnalyst.AnalyzerSdk.Contracts; +using CSharpCodeAnalyst.AnalyzerSdk.Messages; using CSharpCodeAnalyst.Features.AdvancedSearch; using CSharpCodeAnalyst.Features.Tree; using CSharpCodeAnalyst.Shared.Contracts; diff --git a/CSharpCodeAnalyst/Features/Graph/GraphSearchViewModel.cs b/CSharpCodeAnalyst/Features/Graph/GraphSearchViewModel.cs index e9a1a270..6feca74e 100644 --- a/CSharpCodeAnalyst/Features/Graph/GraphSearchViewModel.cs +++ b/CSharpCodeAnalyst/Features/Graph/GraphSearchViewModel.cs @@ -1,7 +1,8 @@ using System.ComponentModel; using System.Windows.Input; using System.Windows.Threading; -using CSharpCodeAnalyst.Shared.Search; +using CSharpCodeAnalyst.AnalyzerSdk.Search; +using CSharpCodeAnalyst.AnalyzerSdk.Wpf; using CSharpCodeAnalyst.Shared.Wpf; namespace CSharpCodeAnalyst.Features.Graph; diff --git a/CSharpCodeAnalyst/Features/Graph/GraphToolbarControl.xaml b/CSharpCodeAnalyst/Features/Graph/GraphToolbarControl.xaml index f44eb363..28ed6934 100644 --- a/CSharpCodeAnalyst/Features/Graph/GraphToolbarControl.xaml +++ b/CSharpCodeAnalyst/Features/Graph/GraphToolbarControl.xaml @@ -16,7 +16,7 @@ - + diff --git a/CSharpCodeAnalyst/Features/Graph/GraphViewModel.cs b/CSharpCodeAnalyst/Features/Graph/GraphViewModel.cs index 420c385c..6c3004a2 100644 --- a/CSharpCodeAnalyst/Features/Graph/GraphViewModel.cs +++ b/CSharpCodeAnalyst/Features/Graph/GraphViewModel.cs @@ -2,6 +2,9 @@ using System.ComponentModel; using System.Windows; using System.Windows.Input; +using CSharpCodeAnalyst.AnalyzerSdk.Contracts; +using CSharpCodeAnalyst.AnalyzerSdk.Messages; +using CSharpCodeAnalyst.AnalyzerSdk.Wpf; using CSharpCodeAnalyst.CodeGraph.Contracts; using CSharpCodeAnalyst.CodeGraph.Exploration; using CSharpCodeAnalyst.CodeGraph.Graph; diff --git a/CSharpCodeAnalyst/Features/Import/Importer.cs b/CSharpCodeAnalyst/Features/Import/Importer.cs index d4a33a6a..96160ac6 100644 --- a/CSharpCodeAnalyst/Features/Import/Importer.cs +++ b/CSharpCodeAnalyst/Features/Import/Importer.cs @@ -1,4 +1,5 @@ -using CSharpCodeAnalyst.CodeGraph.Contracts; +using CSharpCodeAnalyst.AnalyzerSdk.Notifications; +using CSharpCodeAnalyst.CodeGraph.Contracts; using CSharpCodeAnalyst.CodeGraph.Export; using CSharpCodeAnalyst.CodeGraph.Metrics; using CSharpCodeAnalyst.CodeParser.Parser; diff --git a/CSharpCodeAnalyst/Features/Info/InfoPanelViewModel.cs b/CSharpCodeAnalyst/Features/Info/InfoPanelViewModel.cs index f9ec2dbe..49691464 100644 --- a/CSharpCodeAnalyst/Features/Info/InfoPanelViewModel.cs +++ b/CSharpCodeAnalyst/Features/Info/InfoPanelViewModel.cs @@ -2,6 +2,7 @@ using System.Runtime.CompilerServices; using System.Windows; using System.Windows.Input; +using CSharpCodeAnalyst.AnalyzerSdk.Wpf; using CSharpCodeAnalyst.CodeGraph.Graph; using CSharpCodeAnalyst.Features.Help; using CSharpCodeAnalyst.Resources; diff --git a/CSharpCodeAnalyst/Features/Partitions/PartitionViewModel.cs b/CSharpCodeAnalyst/Features/Partitions/PartitionViewModel.cs index 6b7ca1d4..24d1f6c3 100644 --- a/CSharpCodeAnalyst/Features/Partitions/PartitionViewModel.cs +++ b/CSharpCodeAnalyst/Features/Partitions/PartitionViewModel.cs @@ -1,6 +1,6 @@ using System.Collections.ObjectModel; +using CSharpCodeAnalyst.AnalyzerSdk.DynamicDataGrid.Contracts.TabularData; using CSharpCodeAnalyst.Resources; -using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; using CSharpCodeAnalyst.Shared.UI; namespace CSharpCodeAnalyst.Features.Partitions; diff --git a/CSharpCodeAnalyst/Features/Partitions/PartitionsViewModel.cs b/CSharpCodeAnalyst/Features/Partitions/PartitionsViewModel.cs index 1619a565..cf967793 100644 --- a/CSharpCodeAnalyst/Features/Partitions/PartitionsViewModel.cs +++ b/CSharpCodeAnalyst/Features/Partitions/PartitionsViewModel.cs @@ -1,7 +1,7 @@ using System.Collections.ObjectModel; using System.Windows; +using CSharpCodeAnalyst.AnalyzerSdk.DynamicDataGrid.Contracts.TabularData; using CSharpCodeAnalyst.Resources; -using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; namespace CSharpCodeAnalyst.Features.Partitions; diff --git a/CSharpCodeAnalyst/Features/Refactoring/RefactoringService.cs b/CSharpCodeAnalyst/Features/Refactoring/RefactoringService.cs index 54c27916..5777c64e 100644 --- a/CSharpCodeAnalyst/Features/Refactoring/RefactoringService.cs +++ b/CSharpCodeAnalyst/Features/Refactoring/RefactoringService.cs @@ -1,4 +1,5 @@ using System.Diagnostics; +using CSharpCodeAnalyst.AnalyzerSdk.Contracts; using CSharpCodeAnalyst.CodeGraph.Graph; using CSharpCodeAnalyst.Resources; using CSharpCodeAnalyst.Shared.Contracts; diff --git a/CSharpCodeAnalyst/Features/Tree/TreeControl.xaml b/CSharpCodeAnalyst/Features/Tree/TreeControl.xaml index 5acb3025..0c5f279e 100644 --- a/CSharpCodeAnalyst/Features/Tree/TreeControl.xaml +++ b/CSharpCodeAnalyst/Features/Tree/TreeControl.xaml @@ -16,7 +16,7 @@ - + diff --git a/CSharpCodeAnalyst/Features/Tree/TreeViewModel.cs b/CSharpCodeAnalyst/Features/Tree/TreeViewModel.cs index dd26dab3..7ebb4fc2 100644 --- a/CSharpCodeAnalyst/Features/Tree/TreeViewModel.cs +++ b/CSharpCodeAnalyst/Features/Tree/TreeViewModel.cs @@ -3,10 +3,12 @@ using System.Diagnostics; using System.Windows; using System.Windows.Input; +using CSharpCodeAnalyst.AnalyzerSdk.Messages; +using CSharpCodeAnalyst.AnalyzerSdk.Search; +using CSharpCodeAnalyst.AnalyzerSdk.Wpf; using CSharpCodeAnalyst.CodeGraph.Graph; using CSharpCodeAnalyst.Features.Refactoring; using CSharpCodeAnalyst.Shared.Messages; -using CSharpCodeAnalyst.Shared.Search; using CSharpCodeAnalyst.Shared.Services; using CSharpCodeAnalyst.Shared.Wpf; diff --git a/CSharpCodeAnalyst/Features/WebGraph/WebGraphControl.xaml.cs b/CSharpCodeAnalyst/Features/WebGraph/WebGraphControl.xaml.cs index e87f5025..071e0949 100644 --- a/CSharpCodeAnalyst/Features/WebGraph/WebGraphControl.xaml.cs +++ b/CSharpCodeAnalyst/Features/WebGraph/WebGraphControl.xaml.cs @@ -7,6 +7,7 @@ using System.Windows.Controls.Primitives; using System.Windows.Media.Imaging; using System.Windows.Threading; +using CSharpCodeAnalyst.AnalyzerSdk.Contracts; using CSharpCodeAnalyst.CodeGraph.Graph; using CSharpCodeAnalyst.Configuration; using CSharpCodeAnalyst.Features.Graph; diff --git a/CSharpCodeAnalyst/MainViewModel.cs b/CSharpCodeAnalyst/MainViewModel.cs index f87da267..8ff7bfd4 100644 --- a/CSharpCodeAnalyst/MainViewModel.cs +++ b/CSharpCodeAnalyst/MainViewModel.cs @@ -6,6 +6,11 @@ using System.Runtime.CompilerServices; using System.Windows; using System.Windows.Input; +using CSharpCodeAnalyst.AnalyzerSdk.Contracts; +using CSharpCodeAnalyst.AnalyzerSdk.DynamicDataGrid.Contracts.TabularData; +using CSharpCodeAnalyst.AnalyzerSdk.Messages; +using CSharpCodeAnalyst.AnalyzerSdk.Notifications; +using CSharpCodeAnalyst.AnalyzerSdk.Wpf; using CSharpCodeAnalyst.CodeGraph.Algorithms.Cycles; using CSharpCodeAnalyst.CodeGraph.Algorithms.Metrics; using CSharpCodeAnalyst.CodeGraph.Algorithms.Partitioning; @@ -33,7 +38,6 @@ using CSharpCodeAnalyst.Resources; using CSharpCodeAnalyst.Shared; using CSharpCodeAnalyst.Shared.Contracts; -using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; using CSharpCodeAnalyst.Shared.Filter; using CSharpCodeAnalyst.Shared.Messages; using CSharpCodeAnalyst.Shared.Notifications; diff --git a/CSharpCodeAnalyst/MainWindow.xaml b/CSharpCodeAnalyst/MainWindow.xaml index 7b0fc3d8..5796b207 100644 --- a/CSharpCodeAnalyst/MainWindow.xaml +++ b/CSharpCodeAnalyst/MainWindow.xaml @@ -25,7 +25,7 @@ - + diff --git a/CSharpCodeAnalyst/MainWindow.xaml.cs b/CSharpCodeAnalyst/MainWindow.xaml.cs index 6405a4c7..ab301292 100644 --- a/CSharpCodeAnalyst/MainWindow.xaml.cs +++ b/CSharpCodeAnalyst/MainWindow.xaml.cs @@ -6,6 +6,7 @@ using System.Windows.Controls.Ribbon; using System.Windows.Input; using System.Windows.Threading; +using CSharpCodeAnalyst.AnalyzerSdk.Contracts; using CSharpCodeAnalyst.Configuration; using CSharpCodeAnalyst.Features.Graph; using CSharpCodeAnalyst.Shared.Contracts; diff --git a/CSharpCodeAnalyst/Persistence/Json/ProjectService.cs b/CSharpCodeAnalyst/Persistence/Json/ProjectService.cs index 2b12a41b..22617dcb 100644 --- a/CSharpCodeAnalyst/Persistence/Json/ProjectService.cs +++ b/CSharpCodeAnalyst/Persistence/Json/ProjectService.cs @@ -1,3 +1,4 @@ +using CSharpCodeAnalyst.AnalyzerSdk.Notifications; using CSharpCodeAnalyst.Configuration; using CSharpCodeAnalyst.Features.Import; using CSharpCodeAnalyst.Persistence.Contracts; diff --git a/CSharpCodeAnalyst/Shared/Contracts/IAnalyzerManager.cs b/CSharpCodeAnalyst/Shared/Contracts/IAnalyzerManager.cs index f60b5478..d44ce3c4 100644 --- a/CSharpCodeAnalyst/Shared/Contracts/IAnalyzerManager.cs +++ b/CSharpCodeAnalyst/Shared/Contracts/IAnalyzerManager.cs @@ -1,4 +1,6 @@ -namespace CSharpCodeAnalyst.Shared.Contracts; +using CSharpCodeAnalyst.AnalyzerSdk.Contracts; + +namespace CSharpCodeAnalyst.Shared.Contracts; public interface IAnalyzerManager { diff --git a/CSharpCodeAnalyst/Shared/DynamicDataGrid/DynamicDataGrid.xaml.cs b/CSharpCodeAnalyst/Shared/DynamicDataGrid/DynamicDataGrid.xaml.cs index 6e81e429..f21ea7a1 100644 --- a/CSharpCodeAnalyst/Shared/DynamicDataGrid/DynamicDataGrid.xaml.cs +++ b/CSharpCodeAnalyst/Shared/DynamicDataGrid/DynamicDataGrid.xaml.cs @@ -10,9 +10,9 @@ using System.Windows.Markup; using System.Windows.Media; using System.Windows.Threading; +using CSharpCodeAnalyst.AnalyzerSdk.DynamicDataGrid.Contracts.TabularData; using CSharpCodeAnalyst.Resources; using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.Attributes; -using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; namespace CSharpCodeAnalyst.Shared.DynamicDataGrid; diff --git a/CSharpCodeAnalyst/Shared/Messages/MessageBus.cs b/CSharpCodeAnalyst/Shared/Messages/MessageBus.cs index 9c2aaeb4..0f0f86f9 100644 --- a/CSharpCodeAnalyst/Shared/Messages/MessageBus.cs +++ b/CSharpCodeAnalyst/Shared/Messages/MessageBus.cs @@ -1,4 +1,5 @@ -using CSharpCodeAnalyst.Shared.Contracts; +using CSharpCodeAnalyst.AnalyzerSdk.Contracts; +using CSharpCodeAnalyst.Shared.Contracts; namespace CSharpCodeAnalyst.Shared.Messages; diff --git a/CSharpCodeAnalyst/Shared/Notifications/ConsoleUserNotification.cs b/CSharpCodeAnalyst/Shared/Notifications/ConsoleUserNotification.cs index 5677b659..aaf2bae2 100644 --- a/CSharpCodeAnalyst/Shared/Notifications/ConsoleUserNotification.cs +++ b/CSharpCodeAnalyst/Shared/Notifications/ConsoleUserNotification.cs @@ -1,4 +1,5 @@ using System.Diagnostics; +using CSharpCodeAnalyst.AnalyzerSdk.Notifications; namespace CSharpCodeAnalyst.Shared.Notifications; diff --git a/CSharpCodeAnalyst/Shared/Notifications/WindowsUserNotification.cs b/CSharpCodeAnalyst/Shared/Notifications/WindowsUserNotification.cs index 3cad1eeb..1c6f5091 100644 --- a/CSharpCodeAnalyst/Shared/Notifications/WindowsUserNotification.cs +++ b/CSharpCodeAnalyst/Shared/Notifications/WindowsUserNotification.cs @@ -1,4 +1,5 @@ using System.Windows; +using CSharpCodeAnalyst.AnalyzerSdk.Notifications; using CSharpCodeAnalyst.Resources; using CSharpCodeAnalyst.Shared.UI; using Microsoft.Win32; diff --git a/CSharpCodeAnalyst/Shared/Tabs/DynamicTabViewModel.cs b/CSharpCodeAnalyst/Shared/Tabs/DynamicTabViewModel.cs index 13536566..720c309e 100644 --- a/CSharpCodeAnalyst/Shared/Tabs/DynamicTabViewModel.cs +++ b/CSharpCodeAnalyst/Shared/Tabs/DynamicTabViewModel.cs @@ -1,7 +1,7 @@ using System.ComponentModel; using System.Runtime.CompilerServices; using System.Windows.Input; -using CSharpCodeAnalyst.Shared.DynamicDataGrid.Contracts.TabularData; +using CSharpCodeAnalyst.AnalyzerSdk.DynamicDataGrid.Contracts.TabularData; namespace CSharpCodeAnalyst.Shared.Tabs; diff --git a/CodeGraph/CSharpCodeAnalyst.CodeGraph.csproj b/CodeGraph/CSharpCodeAnalyst.CodeGraph.csproj index ce6e4cc2..dee8658c 100644 --- a/CodeGraph/CSharpCodeAnalyst.CodeGraph.csproj +++ b/CodeGraph/CSharpCodeAnalyst.CodeGraph.csproj @@ -4,6 +4,7 @@ net10.0.0 enable enable + CSharpCodeAnalyst.CodeGraph diff --git a/Tests/UnitTests/Search/PascalCaseSearchTests.cs b/Tests/UnitTests/Search/PascalCaseSearchTests.cs index a734339d..05859fbf 100644 --- a/Tests/UnitTests/Search/PascalCaseSearchTests.cs +++ b/Tests/UnitTests/Search/PascalCaseSearchTests.cs @@ -1,4 +1,4 @@ -using CSharpCodeAnalyst.Shared.Search; +using CSharpCodeAnalyst.AnalyzerSdk.Search; namespace CodeParserTests.UnitTests.Search; From c197ac28c503ae2eae8c83478663b58dab17d856 Mon Sep 17 00:00:00 2001 From: ATrefzer <36333177+ATrefzer@users.noreply.github.com> Date: Fri, 3 Jul 2026 21:54:31 +0200 Subject: [PATCH 7/9] Update CLAUDE.md --- CLAUDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index 3ddf0a31..aca2456f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -95,4 +95,4 @@ The ~200-element soft limit (`AppSettings.WarningCodeElementLimit`) still applie - `.editorconfig` is authoritative and ReSharper-tuned: braces required on all `if`/`foreach`/`while`, max line length 199, expression-bodied accessors preferred, `internal` first in modifier order. Analyzer severities default to `none` — do not add warning-as-error enforcement without discussion. - Nullable reference types are enabled everywhere; honour the annotations rather than suppressing with `!`. -- Namespaces match folders. `CodeGraph.Graph.CodeGraph` is a class inside the `CodeGraph` assembly — fully-qualify it (`CodeGraph.Graph.CodeGraph`) in places where the namespace/type collision is ambiguous; existing code already does. +- Namespaces match folders, rooted under `CSharpCodeAnalyst.*` for every project (e.g. `CSharpCodeAnalyst.CodeGraph.Graph`, `CSharpCodeAnalyst.CodeParser.Parser`). `CodeGraph` is a class inside `CSharpCodeAnalyst.CodeGraph.Graph` — fully-qualify it (`CSharpCodeAnalyst.CodeGraph.Graph.CodeGraph`) in places where the namespace/type collision is ambiguous; existing code already does. From 8b2594748df53da347908fa6d8d731648ce00126 Mon Sep 17 00:00:00 2001 From: ATrefzer <36333177+ATrefzer@users.noreply.github.com> Date: Fri, 3 Jul 2026 21:59:39 +0200 Subject: [PATCH 8/9] More cleanup --- .../Wpf/IconLoader.cs | 27 +++++-------------- .../Presentation/RuleViolationViewModel.cs | 2 +- 2 files changed, 8 insertions(+), 21 deletions(-) diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Wpf/IconLoader.cs b/CSharpCodeAnalyst.AnalyzerSdk/Wpf/IconLoader.cs index 6dddd127..341cccbf 100644 --- a/CSharpCodeAnalyst.AnalyzerSdk/Wpf/IconLoader.cs +++ b/CSharpCodeAnalyst.AnalyzerSdk/Wpf/IconLoader.cs @@ -15,28 +15,15 @@ public static class IconLoader /// public static ImageSource? LoadIcon(string iconPath) { - try - { - var assemblyName = Assembly.GetCallingAssembly().GetName().Name; - var cacheKey = $"{assemblyName}|{iconPath}"; - - if (IconCache.TryGetValue(cacheKey, out var icon)) - { - return icon; - } - - var bitmap = Load(assemblyName, iconPath); - - IconCache[cacheKey] = bitmap; - return bitmap; - } - catch - { - return null; - } + var assemblyName = Assembly.GetCallingAssembly().GetName().Name; + return LoadIcon(assemblyName, iconPath); } - public static ImageSource? LoadIcon(string assemblyName, string iconPath) + /// + /// Loads an icon embedded as a WPF "Resource" in the given assembly - use this for icons + /// shared across assemblies (e.g. SDK icons referenced by an analyzer plugin). + /// + public static ImageSource? LoadIcon(string? assemblyName, string iconPath) { try { diff --git a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/RuleViolationViewModel.cs b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/RuleViolationViewModel.cs index 661a848b..b9dccf32 100644 --- a/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/RuleViolationViewModel.cs +++ b/CSharpCodeAnalyst.Analyzers/ArchitecturalRules/Presentation/RuleViolationViewModel.cs @@ -17,7 +17,7 @@ public class RuleViolationViewModel : TableRow public RuleViolationViewModel(Violation violation, CodeGraph.Graph.CodeGraph codeGraph, IPublisher messaging) { - ErrorIcon = IconLoader.LoadIcon("CSharpCodeAnalyst.AnalyzerSdk", "Resources/error.png"); + ErrorIcon = IconLoader.LoadIcon(typeof(IconLoader).Assembly.GetName().Name, "Resources/error.png"); _violation = violation; _codeGraph = codeGraph; _messaging = messaging; From 94b63fabc493c4eb01c3ffaf8bfbb890821b24fa Mon Sep 17 00:00:00 2001 From: ATrefzer <36333177+ATrefzer@users.noreply.github.com> Date: Fri, 3 Jul 2026 22:19:52 +0200 Subject: [PATCH 9/9] Cleanup folder structure --- ApprovalTestTool/ApprovalTestTool.csproj | 4 ++-- .../CSharpCodeAnalyst.AnalyzerSdk.csproj | 2 +- .../Messages/AddNodeToGraphRequest.cs | 3 ++- .../CSharpCodeAnalyst.Analyzers.csproj | 2 +- .../Algorithms/Cycles/CodeElementClassifier.cs | 0 .../Algorithms/Cycles/CodeGraphBuilder.cs | 0 .../Algorithms/Cycles/CycleFinder.cs | 0 .../Algorithms/Cycles/CycleGroup.cs | 0 .../Algorithms/Cycles/IncompleteLogicException.cs | 0 .../Algorithms/Cycles/RelationshipClassifier.cs | 0 .../Algorithms/Cycles/SearchGraph.cs | 0 .../Algorithms/Cycles/SearchGraphBuilder.cs | 0 .../Algorithms/Cycles/SearchNode.cs | 0 .../Algorithms/Cycles/SearchNodeComparer.cs | 0 .../Algorithms/Cycles/Tarjan.cs | 0 .../Algorithms/Metrics/DependencyMetrics.cs | 0 .../Algorithms/Metrics/TypeDependencyAnalysis.cs | 0 .../Algorithms/Partitioning/CodeElementPartitioner.cs | 0 .../Algorithms/Partitioning/TypeCohesionAnalysis.cs | 0 .../CSharpCodeAnalyst.CodeGraph.csproj | 0 .../Colors/ColorDefinitions.cs | 0 .../Contracts/ICodeGraphExplorer.cs | 0 .../Contracts/IGraphRepresentation.cs | 0 .../Contracts/IParserDiagnostics.cs | 0 .../Contracts/IProgress.cs | 0 .../Contracts/ParserProgressArg.cs | 0 .../Exploration/CodeGraphExplorer.cs | 0 .../Exploration/Context.cs | 0 .../Export/CodeGraphSerializer.cs | 0 .../Export/DgmlExport.cs | 0 .../Export/DgmlFileBuilder.cs | 0 .../Export/DgmlHierarchyExport.cs | 0 .../Export/DgmlRelationshipExport.cs | 0 .../Export/DsiExport.cs | 0 .../Export/PlantUmlExport.cs | 0 .../Graph/CodeElement.cs | 0 .../Graph/CodeElementType.cs | 0 .../Graph/CodeGraph.cs | 0 .../Graph/CodeGraphExtensions.cs | 0 .../Graph/Relationship.cs | 0 .../Graph/RelationshipAttribute.cs | 0 .../Graph/RelationshipType.cs | 0 .../Graph/RelationshipTypeExtensions.cs | 0 .../Graph/SourceLocation.cs | 0 .../Metrics/MemberMetrics.cs | 0 .../Metrics/MetricStore.cs | 0 .../CSharpCodeAnalyst.CodeParser.csproj | 2 +- .../Parser/Artifacts.cs | 0 .../Parser/CodeGraphPlausibilityChecks.cs | 0 .../Parser/Config/ParserConfig.cs | 0 .../Parser/Config/ProjectExclusionRegExCollection.cs | 0 .../Parser/ExternalCodeElementCache.cs | 0 .../Parser/HierarchyAnalyzer.cs | 0 .../Parser/ISyntaxNodeHandler.cs | 0 .../Parser/Initializer.cs | 0 .../Parser/LambdaBodyWalker.cs | 0 .../Parser/MethodBodyWalker.cs | 0 .../Parser/ParseResult.cs | 0 .../Parser/Parser.cs | 2 +- .../Parser/ParserDiagnostics.cs | 0 .../Parser/Progress.cs | 0 .../Parser/ProjectSelector.cs | 0 .../Parser/PropertyAccessClassifier.cs | 0 .../Parser/RelationshipAnalyzer.cs | 0 .../Parser/SourceMetricsCollector.cs | 0 .../Parser/SymbolExtensions.cs | 0 .../Parser/SyntaxExtensions.cs | 0 .../Parser/SyntaxWalkerBase.cs | 0 CSharpCodeAnalyst.sln | 4 ++-- CSharpCodeAnalyst/CSharpCodeAnalyst.csproj | 4 ++-- CSharpCodeAnalyst/CommandLine/ConsoleValidationCommand.cs | 5 +++-- Tests/Tests.csproj | 4 ++-- 72 files changed, 17 insertions(+), 15 deletions(-) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Algorithms/Cycles/CodeElementClassifier.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Algorithms/Cycles/CodeGraphBuilder.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Algorithms/Cycles/CycleFinder.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Algorithms/Cycles/CycleGroup.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Algorithms/Cycles/IncompleteLogicException.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Algorithms/Cycles/RelationshipClassifier.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Algorithms/Cycles/SearchGraph.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Algorithms/Cycles/SearchGraphBuilder.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Algorithms/Cycles/SearchNode.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Algorithms/Cycles/SearchNodeComparer.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Algorithms/Cycles/Tarjan.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Algorithms/Metrics/DependencyMetrics.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Algorithms/Metrics/TypeDependencyAnalysis.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Algorithms/Partitioning/CodeElementPartitioner.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Algorithms/Partitioning/TypeCohesionAnalysis.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/CSharpCodeAnalyst.CodeGraph.csproj (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Colors/ColorDefinitions.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Contracts/ICodeGraphExplorer.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Contracts/IGraphRepresentation.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Contracts/IParserDiagnostics.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Contracts/IProgress.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Contracts/ParserProgressArg.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Exploration/CodeGraphExplorer.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Exploration/Context.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Export/CodeGraphSerializer.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Export/DgmlExport.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Export/DgmlFileBuilder.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Export/DgmlHierarchyExport.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Export/DgmlRelationshipExport.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Export/DsiExport.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Export/PlantUmlExport.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Graph/CodeElement.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Graph/CodeElementType.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Graph/CodeGraph.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Graph/CodeGraphExtensions.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Graph/Relationship.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Graph/RelationshipAttribute.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Graph/RelationshipType.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Graph/RelationshipTypeExtensions.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Graph/SourceLocation.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Metrics/MemberMetrics.cs (100%) rename {CodeGraph => CSharpCodeAnalyst.CodeGraph}/Metrics/MetricStore.cs (100%) rename {CodeParser => CSharpCodeAnalyst.CodeParser}/CSharpCodeAnalyst.CodeParser.csproj (92%) rename {CodeParser => CSharpCodeAnalyst.CodeParser}/Parser/Artifacts.cs (100%) rename {CodeParser => CSharpCodeAnalyst.CodeParser}/Parser/CodeGraphPlausibilityChecks.cs (100%) rename {CodeParser => CSharpCodeAnalyst.CodeParser}/Parser/Config/ParserConfig.cs (100%) rename {CodeParser => CSharpCodeAnalyst.CodeParser}/Parser/Config/ProjectExclusionRegExCollection.cs (100%) rename {CodeParser => CSharpCodeAnalyst.CodeParser}/Parser/ExternalCodeElementCache.cs (100%) rename {CodeParser => CSharpCodeAnalyst.CodeParser}/Parser/HierarchyAnalyzer.cs (100%) rename {CodeParser => CSharpCodeAnalyst.CodeParser}/Parser/ISyntaxNodeHandler.cs (100%) rename {CodeParser => CSharpCodeAnalyst.CodeParser}/Parser/Initializer.cs (100%) rename {CodeParser => CSharpCodeAnalyst.CodeParser}/Parser/LambdaBodyWalker.cs (100%) rename {CodeParser => CSharpCodeAnalyst.CodeParser}/Parser/MethodBodyWalker.cs (100%) rename {CodeParser => CSharpCodeAnalyst.CodeParser}/Parser/ParseResult.cs (100%) rename {CodeParser => CSharpCodeAnalyst.CodeParser}/Parser/Parser.cs (99%) rename {CodeParser => CSharpCodeAnalyst.CodeParser}/Parser/ParserDiagnostics.cs (100%) rename {CodeParser => CSharpCodeAnalyst.CodeParser}/Parser/Progress.cs (100%) rename {CodeParser => CSharpCodeAnalyst.CodeParser}/Parser/ProjectSelector.cs (100%) rename {CodeParser => CSharpCodeAnalyst.CodeParser}/Parser/PropertyAccessClassifier.cs (100%) rename {CodeParser => CSharpCodeAnalyst.CodeParser}/Parser/RelationshipAnalyzer.cs (100%) rename {CodeParser => CSharpCodeAnalyst.CodeParser}/Parser/SourceMetricsCollector.cs (100%) rename {CodeParser => CSharpCodeAnalyst.CodeParser}/Parser/SymbolExtensions.cs (100%) rename {CodeParser => CSharpCodeAnalyst.CodeParser}/Parser/SyntaxExtensions.cs (100%) rename {CodeParser => CSharpCodeAnalyst.CodeParser}/Parser/SyntaxWalkerBase.cs (100%) diff --git a/ApprovalTestTool/ApprovalTestTool.csproj b/ApprovalTestTool/ApprovalTestTool.csproj index 97d7414e..6832e907 100644 --- a/ApprovalTestTool/ApprovalTestTool.csproj +++ b/ApprovalTestTool/ApprovalTestTool.csproj @@ -12,8 +12,8 @@ - - + + diff --git a/CSharpCodeAnalyst.AnalyzerSdk/CSharpCodeAnalyst.AnalyzerSdk.csproj b/CSharpCodeAnalyst.AnalyzerSdk/CSharpCodeAnalyst.AnalyzerSdk.csproj index cc4d1a63..05d5495f 100644 --- a/CSharpCodeAnalyst.AnalyzerSdk/CSharpCodeAnalyst.AnalyzerSdk.csproj +++ b/CSharpCodeAnalyst.AnalyzerSdk/CSharpCodeAnalyst.AnalyzerSdk.csproj @@ -11,7 +11,7 @@ - + diff --git a/CSharpCodeAnalyst.AnalyzerSdk/Messages/AddNodeToGraphRequest.cs b/CSharpCodeAnalyst.AnalyzerSdk/Messages/AddNodeToGraphRequest.cs index e78448f9..8d91cd63 100644 --- a/CSharpCodeAnalyst.AnalyzerSdk/Messages/AddNodeToGraphRequest.cs +++ b/CSharpCodeAnalyst.AnalyzerSdk/Messages/AddNodeToGraphRequest.cs @@ -1,4 +1,5 @@ -using CSharpCodeAnalyst.CodeGraph.Graph; + +using CSharpCodeAnalyst.CodeGraph.Graph; namespace CSharpCodeAnalyst.AnalyzerSdk.Messages; diff --git a/CSharpCodeAnalyst.Analyzers/CSharpCodeAnalyst.Analyzers.csproj b/CSharpCodeAnalyst.Analyzers/CSharpCodeAnalyst.Analyzers.csproj index b1f9aa01..60b44539 100644 --- a/CSharpCodeAnalyst.Analyzers/CSharpCodeAnalyst.Analyzers.csproj +++ b/CSharpCodeAnalyst.Analyzers/CSharpCodeAnalyst.Analyzers.csproj @@ -9,8 +9,8 @@ - + diff --git a/CodeGraph/Algorithms/Cycles/CodeElementClassifier.cs b/CSharpCodeAnalyst.CodeGraph/Algorithms/Cycles/CodeElementClassifier.cs similarity index 100% rename from CodeGraph/Algorithms/Cycles/CodeElementClassifier.cs rename to CSharpCodeAnalyst.CodeGraph/Algorithms/Cycles/CodeElementClassifier.cs diff --git a/CodeGraph/Algorithms/Cycles/CodeGraphBuilder.cs b/CSharpCodeAnalyst.CodeGraph/Algorithms/Cycles/CodeGraphBuilder.cs similarity index 100% rename from CodeGraph/Algorithms/Cycles/CodeGraphBuilder.cs rename to CSharpCodeAnalyst.CodeGraph/Algorithms/Cycles/CodeGraphBuilder.cs diff --git a/CodeGraph/Algorithms/Cycles/CycleFinder.cs b/CSharpCodeAnalyst.CodeGraph/Algorithms/Cycles/CycleFinder.cs similarity index 100% rename from CodeGraph/Algorithms/Cycles/CycleFinder.cs rename to CSharpCodeAnalyst.CodeGraph/Algorithms/Cycles/CycleFinder.cs diff --git a/CodeGraph/Algorithms/Cycles/CycleGroup.cs b/CSharpCodeAnalyst.CodeGraph/Algorithms/Cycles/CycleGroup.cs similarity index 100% rename from CodeGraph/Algorithms/Cycles/CycleGroup.cs rename to CSharpCodeAnalyst.CodeGraph/Algorithms/Cycles/CycleGroup.cs diff --git a/CodeGraph/Algorithms/Cycles/IncompleteLogicException.cs b/CSharpCodeAnalyst.CodeGraph/Algorithms/Cycles/IncompleteLogicException.cs similarity index 100% rename from CodeGraph/Algorithms/Cycles/IncompleteLogicException.cs rename to CSharpCodeAnalyst.CodeGraph/Algorithms/Cycles/IncompleteLogicException.cs diff --git a/CodeGraph/Algorithms/Cycles/RelationshipClassifier.cs b/CSharpCodeAnalyst.CodeGraph/Algorithms/Cycles/RelationshipClassifier.cs similarity index 100% rename from CodeGraph/Algorithms/Cycles/RelationshipClassifier.cs rename to CSharpCodeAnalyst.CodeGraph/Algorithms/Cycles/RelationshipClassifier.cs diff --git a/CodeGraph/Algorithms/Cycles/SearchGraph.cs b/CSharpCodeAnalyst.CodeGraph/Algorithms/Cycles/SearchGraph.cs similarity index 100% rename from CodeGraph/Algorithms/Cycles/SearchGraph.cs rename to CSharpCodeAnalyst.CodeGraph/Algorithms/Cycles/SearchGraph.cs diff --git a/CodeGraph/Algorithms/Cycles/SearchGraphBuilder.cs b/CSharpCodeAnalyst.CodeGraph/Algorithms/Cycles/SearchGraphBuilder.cs similarity index 100% rename from CodeGraph/Algorithms/Cycles/SearchGraphBuilder.cs rename to CSharpCodeAnalyst.CodeGraph/Algorithms/Cycles/SearchGraphBuilder.cs diff --git a/CodeGraph/Algorithms/Cycles/SearchNode.cs b/CSharpCodeAnalyst.CodeGraph/Algorithms/Cycles/SearchNode.cs similarity index 100% rename from CodeGraph/Algorithms/Cycles/SearchNode.cs rename to CSharpCodeAnalyst.CodeGraph/Algorithms/Cycles/SearchNode.cs diff --git a/CodeGraph/Algorithms/Cycles/SearchNodeComparer.cs b/CSharpCodeAnalyst.CodeGraph/Algorithms/Cycles/SearchNodeComparer.cs similarity index 100% rename from CodeGraph/Algorithms/Cycles/SearchNodeComparer.cs rename to CSharpCodeAnalyst.CodeGraph/Algorithms/Cycles/SearchNodeComparer.cs diff --git a/CodeGraph/Algorithms/Cycles/Tarjan.cs b/CSharpCodeAnalyst.CodeGraph/Algorithms/Cycles/Tarjan.cs similarity index 100% rename from CodeGraph/Algorithms/Cycles/Tarjan.cs rename to CSharpCodeAnalyst.CodeGraph/Algorithms/Cycles/Tarjan.cs diff --git a/CodeGraph/Algorithms/Metrics/DependencyMetrics.cs b/CSharpCodeAnalyst.CodeGraph/Algorithms/Metrics/DependencyMetrics.cs similarity index 100% rename from CodeGraph/Algorithms/Metrics/DependencyMetrics.cs rename to CSharpCodeAnalyst.CodeGraph/Algorithms/Metrics/DependencyMetrics.cs diff --git a/CodeGraph/Algorithms/Metrics/TypeDependencyAnalysis.cs b/CSharpCodeAnalyst.CodeGraph/Algorithms/Metrics/TypeDependencyAnalysis.cs similarity index 100% rename from CodeGraph/Algorithms/Metrics/TypeDependencyAnalysis.cs rename to CSharpCodeAnalyst.CodeGraph/Algorithms/Metrics/TypeDependencyAnalysis.cs diff --git a/CodeGraph/Algorithms/Partitioning/CodeElementPartitioner.cs b/CSharpCodeAnalyst.CodeGraph/Algorithms/Partitioning/CodeElementPartitioner.cs similarity index 100% rename from CodeGraph/Algorithms/Partitioning/CodeElementPartitioner.cs rename to CSharpCodeAnalyst.CodeGraph/Algorithms/Partitioning/CodeElementPartitioner.cs diff --git a/CodeGraph/Algorithms/Partitioning/TypeCohesionAnalysis.cs b/CSharpCodeAnalyst.CodeGraph/Algorithms/Partitioning/TypeCohesionAnalysis.cs similarity index 100% rename from CodeGraph/Algorithms/Partitioning/TypeCohesionAnalysis.cs rename to CSharpCodeAnalyst.CodeGraph/Algorithms/Partitioning/TypeCohesionAnalysis.cs diff --git a/CodeGraph/CSharpCodeAnalyst.CodeGraph.csproj b/CSharpCodeAnalyst.CodeGraph/CSharpCodeAnalyst.CodeGraph.csproj similarity index 100% rename from CodeGraph/CSharpCodeAnalyst.CodeGraph.csproj rename to CSharpCodeAnalyst.CodeGraph/CSharpCodeAnalyst.CodeGraph.csproj diff --git a/CodeGraph/Colors/ColorDefinitions.cs b/CSharpCodeAnalyst.CodeGraph/Colors/ColorDefinitions.cs similarity index 100% rename from CodeGraph/Colors/ColorDefinitions.cs rename to CSharpCodeAnalyst.CodeGraph/Colors/ColorDefinitions.cs diff --git a/CodeGraph/Contracts/ICodeGraphExplorer.cs b/CSharpCodeAnalyst.CodeGraph/Contracts/ICodeGraphExplorer.cs similarity index 100% rename from CodeGraph/Contracts/ICodeGraphExplorer.cs rename to CSharpCodeAnalyst.CodeGraph/Contracts/ICodeGraphExplorer.cs diff --git a/CodeGraph/Contracts/IGraphRepresentation.cs b/CSharpCodeAnalyst.CodeGraph/Contracts/IGraphRepresentation.cs similarity index 100% rename from CodeGraph/Contracts/IGraphRepresentation.cs rename to CSharpCodeAnalyst.CodeGraph/Contracts/IGraphRepresentation.cs diff --git a/CodeGraph/Contracts/IParserDiagnostics.cs b/CSharpCodeAnalyst.CodeGraph/Contracts/IParserDiagnostics.cs similarity index 100% rename from CodeGraph/Contracts/IParserDiagnostics.cs rename to CSharpCodeAnalyst.CodeGraph/Contracts/IParserDiagnostics.cs diff --git a/CodeGraph/Contracts/IProgress.cs b/CSharpCodeAnalyst.CodeGraph/Contracts/IProgress.cs similarity index 100% rename from CodeGraph/Contracts/IProgress.cs rename to CSharpCodeAnalyst.CodeGraph/Contracts/IProgress.cs diff --git a/CodeGraph/Contracts/ParserProgressArg.cs b/CSharpCodeAnalyst.CodeGraph/Contracts/ParserProgressArg.cs similarity index 100% rename from CodeGraph/Contracts/ParserProgressArg.cs rename to CSharpCodeAnalyst.CodeGraph/Contracts/ParserProgressArg.cs diff --git a/CodeGraph/Exploration/CodeGraphExplorer.cs b/CSharpCodeAnalyst.CodeGraph/Exploration/CodeGraphExplorer.cs similarity index 100% rename from CodeGraph/Exploration/CodeGraphExplorer.cs rename to CSharpCodeAnalyst.CodeGraph/Exploration/CodeGraphExplorer.cs diff --git a/CodeGraph/Exploration/Context.cs b/CSharpCodeAnalyst.CodeGraph/Exploration/Context.cs similarity index 100% rename from CodeGraph/Exploration/Context.cs rename to CSharpCodeAnalyst.CodeGraph/Exploration/Context.cs diff --git a/CodeGraph/Export/CodeGraphSerializer.cs b/CSharpCodeAnalyst.CodeGraph/Export/CodeGraphSerializer.cs similarity index 100% rename from CodeGraph/Export/CodeGraphSerializer.cs rename to CSharpCodeAnalyst.CodeGraph/Export/CodeGraphSerializer.cs diff --git a/CodeGraph/Export/DgmlExport.cs b/CSharpCodeAnalyst.CodeGraph/Export/DgmlExport.cs similarity index 100% rename from CodeGraph/Export/DgmlExport.cs rename to CSharpCodeAnalyst.CodeGraph/Export/DgmlExport.cs diff --git a/CodeGraph/Export/DgmlFileBuilder.cs b/CSharpCodeAnalyst.CodeGraph/Export/DgmlFileBuilder.cs similarity index 100% rename from CodeGraph/Export/DgmlFileBuilder.cs rename to CSharpCodeAnalyst.CodeGraph/Export/DgmlFileBuilder.cs diff --git a/CodeGraph/Export/DgmlHierarchyExport.cs b/CSharpCodeAnalyst.CodeGraph/Export/DgmlHierarchyExport.cs similarity index 100% rename from CodeGraph/Export/DgmlHierarchyExport.cs rename to CSharpCodeAnalyst.CodeGraph/Export/DgmlHierarchyExport.cs diff --git a/CodeGraph/Export/DgmlRelationshipExport.cs b/CSharpCodeAnalyst.CodeGraph/Export/DgmlRelationshipExport.cs similarity index 100% rename from CodeGraph/Export/DgmlRelationshipExport.cs rename to CSharpCodeAnalyst.CodeGraph/Export/DgmlRelationshipExport.cs diff --git a/CodeGraph/Export/DsiExport.cs b/CSharpCodeAnalyst.CodeGraph/Export/DsiExport.cs similarity index 100% rename from CodeGraph/Export/DsiExport.cs rename to CSharpCodeAnalyst.CodeGraph/Export/DsiExport.cs diff --git a/CodeGraph/Export/PlantUmlExport.cs b/CSharpCodeAnalyst.CodeGraph/Export/PlantUmlExport.cs similarity index 100% rename from CodeGraph/Export/PlantUmlExport.cs rename to CSharpCodeAnalyst.CodeGraph/Export/PlantUmlExport.cs diff --git a/CodeGraph/Graph/CodeElement.cs b/CSharpCodeAnalyst.CodeGraph/Graph/CodeElement.cs similarity index 100% rename from CodeGraph/Graph/CodeElement.cs rename to CSharpCodeAnalyst.CodeGraph/Graph/CodeElement.cs diff --git a/CodeGraph/Graph/CodeElementType.cs b/CSharpCodeAnalyst.CodeGraph/Graph/CodeElementType.cs similarity index 100% rename from CodeGraph/Graph/CodeElementType.cs rename to CSharpCodeAnalyst.CodeGraph/Graph/CodeElementType.cs diff --git a/CodeGraph/Graph/CodeGraph.cs b/CSharpCodeAnalyst.CodeGraph/Graph/CodeGraph.cs similarity index 100% rename from CodeGraph/Graph/CodeGraph.cs rename to CSharpCodeAnalyst.CodeGraph/Graph/CodeGraph.cs diff --git a/CodeGraph/Graph/CodeGraphExtensions.cs b/CSharpCodeAnalyst.CodeGraph/Graph/CodeGraphExtensions.cs similarity index 100% rename from CodeGraph/Graph/CodeGraphExtensions.cs rename to CSharpCodeAnalyst.CodeGraph/Graph/CodeGraphExtensions.cs diff --git a/CodeGraph/Graph/Relationship.cs b/CSharpCodeAnalyst.CodeGraph/Graph/Relationship.cs similarity index 100% rename from CodeGraph/Graph/Relationship.cs rename to CSharpCodeAnalyst.CodeGraph/Graph/Relationship.cs diff --git a/CodeGraph/Graph/RelationshipAttribute.cs b/CSharpCodeAnalyst.CodeGraph/Graph/RelationshipAttribute.cs similarity index 100% rename from CodeGraph/Graph/RelationshipAttribute.cs rename to CSharpCodeAnalyst.CodeGraph/Graph/RelationshipAttribute.cs diff --git a/CodeGraph/Graph/RelationshipType.cs b/CSharpCodeAnalyst.CodeGraph/Graph/RelationshipType.cs similarity index 100% rename from CodeGraph/Graph/RelationshipType.cs rename to CSharpCodeAnalyst.CodeGraph/Graph/RelationshipType.cs diff --git a/CodeGraph/Graph/RelationshipTypeExtensions.cs b/CSharpCodeAnalyst.CodeGraph/Graph/RelationshipTypeExtensions.cs similarity index 100% rename from CodeGraph/Graph/RelationshipTypeExtensions.cs rename to CSharpCodeAnalyst.CodeGraph/Graph/RelationshipTypeExtensions.cs diff --git a/CodeGraph/Graph/SourceLocation.cs b/CSharpCodeAnalyst.CodeGraph/Graph/SourceLocation.cs similarity index 100% rename from CodeGraph/Graph/SourceLocation.cs rename to CSharpCodeAnalyst.CodeGraph/Graph/SourceLocation.cs diff --git a/CodeGraph/Metrics/MemberMetrics.cs b/CSharpCodeAnalyst.CodeGraph/Metrics/MemberMetrics.cs similarity index 100% rename from CodeGraph/Metrics/MemberMetrics.cs rename to CSharpCodeAnalyst.CodeGraph/Metrics/MemberMetrics.cs diff --git a/CodeGraph/Metrics/MetricStore.cs b/CSharpCodeAnalyst.CodeGraph/Metrics/MetricStore.cs similarity index 100% rename from CodeGraph/Metrics/MetricStore.cs rename to CSharpCodeAnalyst.CodeGraph/Metrics/MetricStore.cs diff --git a/CodeParser/CSharpCodeAnalyst.CodeParser.csproj b/CSharpCodeAnalyst.CodeParser/CSharpCodeAnalyst.CodeParser.csproj similarity index 92% rename from CodeParser/CSharpCodeAnalyst.CodeParser.csproj rename to CSharpCodeAnalyst.CodeParser/CSharpCodeAnalyst.CodeParser.csproj index fd4b065d..bf3b64a7 100644 --- a/CodeParser/CSharpCodeAnalyst.CodeParser.csproj +++ b/CSharpCodeAnalyst.CodeParser/CSharpCodeAnalyst.CodeParser.csproj @@ -20,7 +20,7 @@ - + diff --git a/CodeParser/Parser/Artifacts.cs b/CSharpCodeAnalyst.CodeParser/Parser/Artifacts.cs similarity index 100% rename from CodeParser/Parser/Artifacts.cs rename to CSharpCodeAnalyst.CodeParser/Parser/Artifacts.cs diff --git a/CodeParser/Parser/CodeGraphPlausibilityChecks.cs b/CSharpCodeAnalyst.CodeParser/Parser/CodeGraphPlausibilityChecks.cs similarity index 100% rename from CodeParser/Parser/CodeGraphPlausibilityChecks.cs rename to CSharpCodeAnalyst.CodeParser/Parser/CodeGraphPlausibilityChecks.cs diff --git a/CodeParser/Parser/Config/ParserConfig.cs b/CSharpCodeAnalyst.CodeParser/Parser/Config/ParserConfig.cs similarity index 100% rename from CodeParser/Parser/Config/ParserConfig.cs rename to CSharpCodeAnalyst.CodeParser/Parser/Config/ParserConfig.cs diff --git a/CodeParser/Parser/Config/ProjectExclusionRegExCollection.cs b/CSharpCodeAnalyst.CodeParser/Parser/Config/ProjectExclusionRegExCollection.cs similarity index 100% rename from CodeParser/Parser/Config/ProjectExclusionRegExCollection.cs rename to CSharpCodeAnalyst.CodeParser/Parser/Config/ProjectExclusionRegExCollection.cs diff --git a/CodeParser/Parser/ExternalCodeElementCache.cs b/CSharpCodeAnalyst.CodeParser/Parser/ExternalCodeElementCache.cs similarity index 100% rename from CodeParser/Parser/ExternalCodeElementCache.cs rename to CSharpCodeAnalyst.CodeParser/Parser/ExternalCodeElementCache.cs diff --git a/CodeParser/Parser/HierarchyAnalyzer.cs b/CSharpCodeAnalyst.CodeParser/Parser/HierarchyAnalyzer.cs similarity index 100% rename from CodeParser/Parser/HierarchyAnalyzer.cs rename to CSharpCodeAnalyst.CodeParser/Parser/HierarchyAnalyzer.cs diff --git a/CodeParser/Parser/ISyntaxNodeHandler.cs b/CSharpCodeAnalyst.CodeParser/Parser/ISyntaxNodeHandler.cs similarity index 100% rename from CodeParser/Parser/ISyntaxNodeHandler.cs rename to CSharpCodeAnalyst.CodeParser/Parser/ISyntaxNodeHandler.cs diff --git a/CodeParser/Parser/Initializer.cs b/CSharpCodeAnalyst.CodeParser/Parser/Initializer.cs similarity index 100% rename from CodeParser/Parser/Initializer.cs rename to CSharpCodeAnalyst.CodeParser/Parser/Initializer.cs diff --git a/CodeParser/Parser/LambdaBodyWalker.cs b/CSharpCodeAnalyst.CodeParser/Parser/LambdaBodyWalker.cs similarity index 100% rename from CodeParser/Parser/LambdaBodyWalker.cs rename to CSharpCodeAnalyst.CodeParser/Parser/LambdaBodyWalker.cs diff --git a/CodeParser/Parser/MethodBodyWalker.cs b/CSharpCodeAnalyst.CodeParser/Parser/MethodBodyWalker.cs similarity index 100% rename from CodeParser/Parser/MethodBodyWalker.cs rename to CSharpCodeAnalyst.CodeParser/Parser/MethodBodyWalker.cs diff --git a/CodeParser/Parser/ParseResult.cs b/CSharpCodeAnalyst.CodeParser/Parser/ParseResult.cs similarity index 100% rename from CodeParser/Parser/ParseResult.cs rename to CSharpCodeAnalyst.CodeParser/Parser/ParseResult.cs diff --git a/CodeParser/Parser/Parser.cs b/CSharpCodeAnalyst.CodeParser/Parser/Parser.cs similarity index 99% rename from CodeParser/Parser/Parser.cs rename to CSharpCodeAnalyst.CodeParser/Parser/Parser.cs index 1ba65dfc..7fcecc46 100644 --- a/CodeParser/Parser/Parser.cs +++ b/CSharpCodeAnalyst.CodeParser/Parser/Parser.cs @@ -112,7 +112,7 @@ private async Task ParseSolution(string solutionPath) /// Parses in-memory C# source through the full parser pipeline using a Roslyn /// - no MSBuild, no /// and no disk access. Intended for unit tests and small tooling that want a real - /// from a code snippet. + /// from a code snippet. /// The synthetic project/document file names are pure identifiers; none of them needs to exist on /// disk. The only files read are the framework reference assemblies in the runtime directory. /// diff --git a/CodeParser/Parser/ParserDiagnostics.cs b/CSharpCodeAnalyst.CodeParser/Parser/ParserDiagnostics.cs similarity index 100% rename from CodeParser/Parser/ParserDiagnostics.cs rename to CSharpCodeAnalyst.CodeParser/Parser/ParserDiagnostics.cs diff --git a/CodeParser/Parser/Progress.cs b/CSharpCodeAnalyst.CodeParser/Parser/Progress.cs similarity index 100% rename from CodeParser/Parser/Progress.cs rename to CSharpCodeAnalyst.CodeParser/Parser/Progress.cs diff --git a/CodeParser/Parser/ProjectSelector.cs b/CSharpCodeAnalyst.CodeParser/Parser/ProjectSelector.cs similarity index 100% rename from CodeParser/Parser/ProjectSelector.cs rename to CSharpCodeAnalyst.CodeParser/Parser/ProjectSelector.cs diff --git a/CodeParser/Parser/PropertyAccessClassifier.cs b/CSharpCodeAnalyst.CodeParser/Parser/PropertyAccessClassifier.cs similarity index 100% rename from CodeParser/Parser/PropertyAccessClassifier.cs rename to CSharpCodeAnalyst.CodeParser/Parser/PropertyAccessClassifier.cs diff --git a/CodeParser/Parser/RelationshipAnalyzer.cs b/CSharpCodeAnalyst.CodeParser/Parser/RelationshipAnalyzer.cs similarity index 100% rename from CodeParser/Parser/RelationshipAnalyzer.cs rename to CSharpCodeAnalyst.CodeParser/Parser/RelationshipAnalyzer.cs diff --git a/CodeParser/Parser/SourceMetricsCollector.cs b/CSharpCodeAnalyst.CodeParser/Parser/SourceMetricsCollector.cs similarity index 100% rename from CodeParser/Parser/SourceMetricsCollector.cs rename to CSharpCodeAnalyst.CodeParser/Parser/SourceMetricsCollector.cs diff --git a/CodeParser/Parser/SymbolExtensions.cs b/CSharpCodeAnalyst.CodeParser/Parser/SymbolExtensions.cs similarity index 100% rename from CodeParser/Parser/SymbolExtensions.cs rename to CSharpCodeAnalyst.CodeParser/Parser/SymbolExtensions.cs diff --git a/CodeParser/Parser/SyntaxExtensions.cs b/CSharpCodeAnalyst.CodeParser/Parser/SyntaxExtensions.cs similarity index 100% rename from CodeParser/Parser/SyntaxExtensions.cs rename to CSharpCodeAnalyst.CodeParser/Parser/SyntaxExtensions.cs diff --git a/CodeParser/Parser/SyntaxWalkerBase.cs b/CSharpCodeAnalyst.CodeParser/Parser/SyntaxWalkerBase.cs similarity index 100% rename from CodeParser/Parser/SyntaxWalkerBase.cs rename to CSharpCodeAnalyst.CodeParser/Parser/SyntaxWalkerBase.cs diff --git a/CSharpCodeAnalyst.sln b/CSharpCodeAnalyst.sln index 3242e20b..bf530fca 100644 --- a/CSharpCodeAnalyst.sln +++ b/CSharpCodeAnalyst.sln @@ -8,7 +8,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CSharpCodeAnalyst", "CSharp {7D5EA751-84A3-43F1-BCCE-C9D10536AB1B} = {7D5EA751-84A3-43F1-BCCE-C9D10536AB1B} EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CSharpCodeAnalyst.CodeParser", "CodeParser\CSharpCodeAnalyst.CodeParser.csproj", "{8D89C41C-F2EB-4E54-8297-1A552BEE2396}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CSharpCodeAnalyst.CodeParser", "CSharpCodeAnalyst.CodeParser\CSharpCodeAnalyst.CodeParser.csproj", "{8D89C41C-F2EB-4E54-8297-1A552BEE2396}" ProjectSection(ProjectDependencies) = postProject {7D5EA751-84A3-43F1-BCCE-C9D10536AB1B} = {7D5EA751-84A3-43F1-BCCE-C9D10536AB1B} EndProjectSection @@ -24,7 +24,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution .editorconfig = .editorconfig EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CSharpCodeAnalyst.CodeGraph", "CodeGraph\CSharpCodeAnalyst.CodeGraph.csproj", "{7D5EA751-84A3-43F1-BCCE-C9D10536AB1B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CSharpCodeAnalyst.CodeGraph", "CSharpCodeAnalyst.CodeGraph\CSharpCodeAnalyst.CodeGraph.csproj", "{7D5EA751-84A3-43F1-BCCE-C9D10536AB1B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApprovalTestTool", "ApprovalTestTool\ApprovalTestTool.csproj", "{767539BE-FBE3-4B46-9A5E-21D60E1B278B}" EndProject diff --git a/CSharpCodeAnalyst/CSharpCodeAnalyst.csproj b/CSharpCodeAnalyst/CSharpCodeAnalyst.csproj index ddf2e8c3..85cb4d4c 100644 --- a/CSharpCodeAnalyst/CSharpCodeAnalyst.csproj +++ b/CSharpCodeAnalyst/CSharpCodeAnalyst.csproj @@ -135,10 +135,10 @@ - - + + diff --git a/CSharpCodeAnalyst/CommandLine/ConsoleValidationCommand.cs b/CSharpCodeAnalyst/CommandLine/ConsoleValidationCommand.cs index a521dcc8..7328b74e 100644 --- a/CSharpCodeAnalyst/CommandLine/ConsoleValidationCommand.cs +++ b/CSharpCodeAnalyst/CommandLine/ConsoleValidationCommand.cs @@ -4,13 +4,14 @@ using CSharpCodeAnalyst.Configuration; using CSharpCodeAnalyst.Analyzers.ArchitecturalRules; using CSharpCodeAnalyst.AnalyzerSdk.Contracts; -using CSharpCodeAnalyst.CodeParser.Parser; -using CSharpCodeAnalyst.CodeParser.Parser.Config; using CSharpCodeAnalyst.Resources; using CSharpCodeAnalyst.Shared.Contracts; using CSharpCodeAnalyst.Shared.Messages; using CSharpCodeAnalyst.Shared.Notifications; using Microsoft.Extensions.Configuration; +using CSharpCodeAnalyst.CodeGraph.Graph; +using CSharpCodeAnalyst.CodeParser.Parser; +using CSharpCodeAnalyst.CodeParser.Parser.Config; namespace CSharpCodeAnalyst.CommandLine; diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index 3a959390..fa33901b 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -21,8 +21,8 @@ - - + +