Skip to content

Commit

Permalink
refactoring code
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatandrei committed Oct 21, 2024
1 parent 6285a96 commit 431be21
Show file tree
Hide file tree
Showing 17 changed files with 27 additions and 51 deletions.
4 changes: 1 addition & 3 deletions src/NetPackageAnalyzer/NPA.HtmlData/ExtractImages.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Microsoft.Playwright;

namespace NPA.HtmlData;
namespace NPA.HtmlData;

public class ExtractImages
{
Expand Down
7 changes: 1 addition & 6 deletions src/NetPackageAnalyzer/NPA.HtmlData/globals.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
global using Microsoft.Playwright;

namespace NPA.HtmlData;
5 changes: 1 addition & 4 deletions src/NetPackageAnalyzer/NetPackageAnalyzerConsole/Program.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using NPA.GitInfo;
using System.Runtime;

try
try
{
//Console.WriteLine($"Name:{TheAssemblyInfo.GeneratedName}");
Console.WriteLine($"{TheAssemblyInfo.GeneratedNameNice}");
Expand Down
3 changes: 0 additions & 3 deletions src/NetPackageAnalyzer/NetPackageAnalyzerConsole/RealMain.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@

using NetPackageAnalyzerExportHTML;
using NPA.GitInfo;
using System.Runtime.InteropServices;

namespace NetPackageAnalyzerConsole;
internal class RealMainExecuting
Expand Down
7 changes: 5 additions & 2 deletions src/NetPackageAnalyzer/NetPackageAnalyzerConsole/globals.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
global using NetPackageAnalyzerConsole;
global using System.Diagnostics;
global using System.Text.Json;
//global using NS_;
global using static System.Console;
global using System.CommandLine;
Expand All @@ -10,4 +9,8 @@
//global using WhatIAmDoingData;
global using NetPackageAnalyzerShowInConsole;
global using RSCG_InterceptMethodCommon;
global using Generated.NetPackageAnalyzerConsole;
global using Generated.NetPackageAnalyzerConsole;
global using NPA.GitInfo;
global using NetPackageAnalyzerExportHTML;
global using System.Runtime.InteropServices;

Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using NetPackageAnalyzerObjects;
using NPA.HtmlData;

namespace NetPackageAnalyzerExportHTML;
namespace NetPackageAnalyzerExportHTML;

public class GenerateHTML : GenerateFiles
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
global using NetPackageAnalyzerExportHTML.Templates;
global using NetPackageAnalyzerMetricsMSFT;
global using NPA.Resources;
global using Statistical;
global using Statistical;
global using NPA.HtmlData;
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.ComponentModel.DataAnnotations;
using System.Xml;
//https://learn.microsoft.com/en-us/visualstudio/code-quality/code-metrics-cyclomatic-complexity?view=vs-2022
//https://learn.microsoft.com/en-us/visualstudio/code-quality/code-metrics-cyclomatic-complexity?view=vs-2022

namespace NetPackageAnalyzerMetricsMSFT;
public enum eMSFTMetrics
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.ComponentModel.DataAnnotations;

namespace NetPackageAnalyzerMetricsMSFT;
namespace NetPackageAnalyzerMetricsMSFT;

public record Metric(eMSFTMetrics Name): IValidatableObject
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
global using System.ComponentModel.DataAnnotations;
global using System.Xml;
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@


using NetPackageAnalyzerDiagram;
using NetPackageAnalyzerMetricsMSFT;
using System.Diagnostics;

namespace NetPackageAnalyzerObjects;
namespace NetPackageAnalyzerObjects;
public class GenerateData
{
public GenerateData(IFileSystem system)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Diagnostics;


namespace NetPackageAnalyzerObjects;
public class ProcessOutput
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using NetPackageAnalyzeHistory;
using System.ComponentModel;

namespace NetPackageAnalyzerObjects;
namespace NetPackageAnalyzerObjects;

public partial record ProjectData(string PathProject, string folderSolution)
{
Expand Down
5 changes: 4 additions & 1 deletion src/NetPackageAnalyzer/NetPackageAnalyzerObjects/globals.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
global using NuGetInfo;
global using NetPackageAnalyzeHistory;
global using Statistical;
using NPA.GitInfo;
global using NPA.GitInfo;
global using NetPackageAnalyzerDiagram;
global using System.Diagnostics;
global using System.ComponentModel;

public static class GlobalsForGenerating
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using Spectre.Console;
using Spectre.Console.Rendering;

namespace NetPackageAnalyzerShowInConsole;
namespace NetPackageAnalyzerShowInConsole;

public class WriteToConsole(GenerateData generatorData)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
global using NetPackageAnalyzerObjects;
global using NetPackageAnalyzerObjects;
global using Spectre.Console;
global using Spectre.Console.Rendering;
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using NetPackageAnalyzerObjects;

namespace NetPackageAnalyzerDocusaurus;
namespace NetPackageAnalyzerDocusaurus;



Expand Down

0 comments on commit 431be21

Please sign in to comment.