diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 2b67ed31..bbe27cce 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -9,7 +9,7 @@ on: jobs: build: name: Build job - runs-on: windows-latest + runs-on: ubuntu-latest outputs: Version: ${{ steps.gitversion.outputs.SemVer }} CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }} @@ -33,18 +33,18 @@ jobs: with: dotnet-version: 6.0.x - name: .NET test - run: dotnet test src/DotnetCensus.Tests/DotnetCensus.Tests.csproj -c Release + run: dotnet test src/DotNetCensus.Tests/DotNetCensus.Tests.csproj -c Release - name: .NET publish - run: dotnet publish src/DotnetCensus/DotnetCensus.csproj -c Release -p:Version='${{ steps.gitversion.outputs.SemVer }}' + run: dotnet publish src/DotNetCensus.Core/DotNetCensus.Core.csproj -c Release -p:Version='${{ steps.gitversion.outputs.SemVer }}' - name: Upload package back to GitHub uses: actions/upload-artifact@v3 with: name: drop - path: src/DotnetCensus/bin/Release + path: src/DotNetCensus/bin/Release release: name: Release job - runs-on: windows-latest + runs-on: ubuntu-latest needs: - build if: github.ref == 'refs/heads/main' diff --git a/README.md b/README.md index 35cfa3f8..9e56a5c1 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# DotnetCensus -[![CI/CD](https://github.com/samsmithnz/DotnetCensus/actions/workflows/workflow.yml/badge.svg)](https://github.com/samsmithnz/DotnetCensus/actions/workflows/workflow.yml) +# DotNetCensus +[![CI/CD](https://github.com/samsmithnz/DotNetCensus/actions/workflows/workflow.yml/badge.svg)](https://github.com/samsmithnz/DotNetCensus/actions/workflows/workflow.yml) **A tool to conduct a census, to count different .NET versions, on a folder and/or repo.** @@ -11,3 +11,4 @@ Currently supports: - Unity3d projects - VB6 (!!!) +- Currently only works on folders. In the future will support GitHub repo scanning too. \ No newline at end of file diff --git a/src/DotNetCensus.Core/Census.cs b/src/DotNetCensus.Core/Census.cs new file mode 100644 index 00000000..6e5b0fc2 --- /dev/null +++ b/src/DotNetCensus.Core/Census.cs @@ -0,0 +1,93 @@ +using DotNetCensus.Core.Models; + +namespace DotNetCensus.Core +{ + public static class Census + { + public static List AggregateFrameworks(List projects, bool includeTotal) + { + int total = 0; + List frameworkSummary = new(); + foreach (Project project in projects) + { + project.Family = DotNetProjectScanning.GetFrameworkFamily(project.Framework); + if (string.IsNullOrEmpty(project.Framework) == true) + { + project.Framework = "(Unknown framework)"; + } + + //Process each indvidual framework + FrameworkSummary? framework = frameworkSummary.Find(i => i.Framework == project.Framework); + + //If this framework isn't in the current list, create a new one + if (framework == null) + { + frameworkSummary.Add(new FrameworkSummary + { + Framework = project.Framework, + FrameworkFamily = project.Family, + Count = 1 //it's the first time, start with a count of 1 + }); + } + else + { + //There is an existing entry, increment the count + framework.Count++; + } + total++; + } + + //Sort the result + List sortedFrameworks = frameworkSummary.OrderBy(o => o.Framework).ToList(); + + //Add a total line if we need one + if (includeTotal == true) + { + sortedFrameworks.Add(new FrameworkSummary { Framework = "total frameworks", Count = total }); + } + return sortedFrameworks; + } + + public static List AggregateLanguages(List projects, bool includeTotal) + { + int total = 0; + List languageSummary = new(); + foreach (Project project in projects) + { + if (string.IsNullOrEmpty(project.Language) == true) + { + project.Language = "(Unknown language)"; + } + + //Process each indvidual language + LanguageSummary? language = languageSummary.Find(i => i.Language == project.Language); + + //If this language isn't in the current list, create a new one + if (language == null) + { + languageSummary.Add(new LanguageSummary + { + Language = project.Language, + Count = 1 //it's the first time, start with a count of 1 + }); + } + else + { + //There is an existing entry, increment the count + language.Count++; + } + total++; + } + + //Sort the result + List sortedLanguages = languageSummary.OrderBy(o => o.Language).ToList(); + + //Add a total line if we need one + if (includeTotal == true) + { + sortedLanguages.Add(new LanguageSummary { Language = "total languages", Count = total }); + } + return sortedLanguages; + } + } +} diff --git a/src/DotnetCensus/DotnetCensus.csproj b/src/DotNetCensus.Core/DotNetCensus.Core.csproj similarity index 100% rename from src/DotnetCensus/DotnetCensus.csproj rename to src/DotNetCensus.Core/DotNetCensus.Core.csproj diff --git a/src/DotnetCensus/DotNetProjectScanning.cs b/src/DotNetCensus.Core/DotNetProjectScanning.cs similarity index 86% rename from src/DotnetCensus/DotNetProjectScanning.cs rename to src/DotNetCensus.Core/DotNetProjectScanning.cs index f85a9286..8b27a4ab 100644 --- a/src/DotnetCensus/DotNetProjectScanning.cs +++ b/src/DotNetCensus.Core/DotNetProjectScanning.cs @@ -1,6 +1,6 @@ using DotNetCensus.Core.Models; -namespace DotNetCensus +namespace DotNetCensus.Core { public static class DotNetProjectScanning { @@ -46,8 +46,8 @@ private static List ProcessDotNetProjectFile(string filePath, string la //Setup the project object Project project = new() { - Path = filePath, FileName = new FileInfo(filePath).Name, + Path = filePath, Language = language }; @@ -82,8 +82,8 @@ private static List ProcessDotNetProjectFile(string filePath, string la { Project additionalProject = new() { - Path = filePath, FileName = new FileInfo(filePath).Name, + Path = filePath, Language = language, Framework = frameworkList[i] }; @@ -118,43 +118,43 @@ private static List ProcessDotNetProjectFile(string filePath, string la return projects; } - //private static string? GetFrameworkFamily(string framework) - //{ - // if (framework == null) - // { - // return null; - // } - // else if (framework.StartsWith("netcoreapp")) - // { - // return ".NET Core"; - // } - // else if (framework.StartsWith("netstandard")) - // { - // return ".NET Standard"; - // } - // else if (framework.StartsWith("v1.") || - // framework.StartsWith("v2.") || - // framework.StartsWith("v3.") || - // framework.StartsWith("v4.") || - // framework.StartsWith("net4")) - // { - // return ".NET Framework"; - // } - // else if (framework.StartsWith("net")) //net5.0, net6.0, etc - // { - // return ".NET"; - // } - // else if (framework.StartsWith("vb6")) - // { - // return "Visual Basic 6"; - // } - // else - // { - // return null; - // } - //} - - private static string? GetHistoricalFrameworkVersion(string line) + public static string GetFrameworkFamily(string framework) + { + if (string.IsNullOrEmpty(framework) == true) + { + return ""; + } + else if (framework.StartsWith("netcoreapp")) + { + return ".NET Core"; + } + else if (framework.StartsWith("netstandard")) + { + return ".NET Standard"; + } + else if (framework.StartsWith("v1.") || + framework.StartsWith("v2.") || + framework.StartsWith("v3.") || + framework.StartsWith("v4.") || + framework.StartsWith("net4")) + { + return ".NET Framework"; + } + else if (framework.StartsWith("net")) //net5.0, net6.0, etc + { + return ".NET"; + } + else if (framework.StartsWith("vb6")) + { + return "Visual Basic 6"; + } + else + { + return ""; + } + } + + private static string GetHistoricalFrameworkVersion(string line) { string productVersion = line.Replace("", "").Replace("", "").Replace("ProductVersion = ", "").Replace("\"", "").Trim(); //https://en.wikipedia.org/wiki/Microsoft_Visual_Studio#History @@ -187,18 +187,22 @@ private static List ProcessDotNetProjectFile(string filePath, string la } else { - return null; + return ""; } } - private static string? GetUnityFrameworkVersion(string line) + private static string GetUnityFrameworkVersion(string line) { //An example of what to expect: //m_EditorVersion: 2020.3.12f1 //m_EditorVersionWithRevision: 2020.3.12f1(b3b2c6512326) string fullVersion = line.Replace("m_EditorVersion:", "").Trim(); string[] splitVersion = fullVersion.Split('.'); - string unityVersion = "Unity3d v" + splitVersion[0] + "." + splitVersion[1]; + string unityVersion = ""; + if (splitVersion.Length >= 2) + { + unityVersion = "Unity3d v" + splitVersion[0] + "." + splitVersion[1]; + } return unityVersion; } diff --git a/src/DotNetCensus.Core/Models/FrameworkSummary.cs b/src/DotNetCensus.Core/Models/FrameworkSummary.cs new file mode 100644 index 00000000..6d1079bd --- /dev/null +++ b/src/DotNetCensus.Core/Models/FrameworkSummary.cs @@ -0,0 +1,9 @@ +namespace DotNetCensus.Core.Models +{ + public class FrameworkSummary + { + public string Framework { get; set; } = ""; + public string FrameworkFamily { get; set; } = ""; + public int Count { get; set; } + } +} diff --git a/src/DotNetCensus.Core/Models/LanguageSummary.cs b/src/DotNetCensus.Core/Models/LanguageSummary.cs new file mode 100644 index 00000000..35eb6713 --- /dev/null +++ b/src/DotNetCensus.Core/Models/LanguageSummary.cs @@ -0,0 +1,8 @@ +namespace DotNetCensus.Core.Models +{ + public class LanguageSummary + { + public string Language { get; set; } = ""; + public int Count { get; set; } + } +} diff --git a/src/DotNetCensus.Core/Models/Project.cs b/src/DotNetCensus.Core/Models/Project.cs new file mode 100644 index 00000000..7d408294 --- /dev/null +++ b/src/DotNetCensus.Core/Models/Project.cs @@ -0,0 +1,22 @@ +namespace DotNetCensus.Core.Models +{ + public class Project + { + //public Project(string fileName, string path, string framework) + //{ + // FileName = fileName; + // Path = path; + // Framework = framework; + //} + + public string FileName { get; set; } = ""; + public string Path { get; set; } = ""; + public string Framework { get; set; } = ""; + public string? Language { get; set; } + public string? Family { get; set; } + public string? Color { get; set; } + + //public string? Content { get; set; } + + } +} diff --git a/src/DotnetCensus.Tests/BaseTests.cs b/src/DotNetCensus.Tests/BaseTests.cs similarity index 92% rename from src/DotnetCensus.Tests/BaseTests.cs rename to src/DotNetCensus.Tests/BaseTests.cs index fa8bff6c..91341a19 100644 --- a/src/DotnetCensus.Tests/BaseTests.cs +++ b/src/DotNetCensus.Tests/BaseTests.cs @@ -1,4 +1,5 @@ -global using DotNetCensus.Core.Models; +global using DotNetCensus.Core; +global using DotNetCensus.Core.Models; global using Microsoft.VisualStudio.TestTools.UnitTesting; namespace DotNetCensus.Tests diff --git a/src/DotNetCensus.Tests/CensorUnitTests.cs b/src/DotNetCensus.Tests/CensorUnitTests.cs new file mode 100644 index 00000000..7838e72a --- /dev/null +++ b/src/DotNetCensus.Tests/CensorUnitTests.cs @@ -0,0 +1,112 @@ +namespace DotNetCensus.Tests; + +[TestClass] +public class CensorUnitTests : BaseTests +{ + + [TestMethod] + public void AggregateFrameworksTest() + { + //Arrange + List projects = GenerateSampleData(); + bool includeTotal = true; + + //Act + List results = Census.AggregateFrameworks(projects, includeTotal); + + //Asset + Assert.AreEqual(10, results.Count); + Assert.AreEqual(2, results.Find(i => i.Framework == "netstandard2.0")?.Count); + Assert.AreEqual(2, results.Find(i => i.FrameworkFamily == ".NET Standard")?.Count); + Assert.AreEqual(1, results.Find(i => i.Framework == "netcoreapp3.1")?.Count); + Assert.AreEqual(1, results.Find(i => i.FrameworkFamily == ".NET Core")?.Count); + Assert.AreEqual(1, results.Find(i => i.Framework == "net45")?.Count); + Assert.AreEqual(1, results.Find(i => i.FrameworkFamily == ".NET Framework")?.Count); + Assert.AreEqual(10, results[^1].Count); + } + + [TestMethod] + public void AggregateLanguagesTest() + { + //Arrange + List projects = GenerateSampleData(); + bool includeTotal = true; + + //Act + List results = Census.AggregateLanguages(projects, includeTotal); + + //Asset + Assert.AreEqual(6, results.Count); + Assert.AreEqual(6, results.Find(i => i.Language == "csharp")?.Count); + Assert.AreEqual(1, results.Find(i => i.Language == "vbDotNet")?.Count); + Assert.AreEqual(10, results[^1].Count); + } + + private static List GenerateSampleData() + { + List projects = new() + { + new Project + { + Framework = "netstandard2.0", + Language = "csharp", + Path = @"c:\Project1" + }, + new Project + { + Framework = "netstandard2.0", + Language = "csharp", + Path = @"c:\Project2" + }, + new Project + { + Framework = "netcoreapp3.1", + Language = "csharp", + Path = @"c:\Project3" + }, + new Project + { + Framework = "net6.0", + Language = "csharp", + Path = @"c:\Project3" + }, + new Project + { + Framework = "net45", + Language = "vbDotNet", + Path = @"c:\Project45" + }, + new Project + { + Framework = "vb6", + Language = "vb6", + Path = @"c:\Projectvb6" + }, + new Project + { + Framework = "v2.2", + Language = "csharp", + Path = @"c:\Projectv2" + }, + new Project + { + Framework = "v3.5", + Language = "csharp", + Path = @"c:\Projectv35" + }, + new Project + { + Framework = "", + Language = "", + Path = @"c:\ProjectNull" + }, + new Project + { + Framework = "unknown framework", + Language = "unknown language", + Path = @"c:\ProjectUnknown" + } + }; + return projects; + } +} diff --git a/src/DotnetCensus.Tests/DotnetCensus.Tests.csproj b/src/DotNetCensus.Tests/DotNetCensus.Tests.csproj similarity index 82% rename from src/DotnetCensus.Tests/DotnetCensus.Tests.csproj rename to src/DotNetCensus.Tests/DotNetCensus.Tests.csproj index f2b6529b..72dabb10 100644 --- a/src/DotnetCensus.Tests/DotnetCensus.Tests.csproj +++ b/src/DotNetCensus.Tests/DotNetCensus.Tests.csproj @@ -1,4 +1,4 @@ - + net6.0 @@ -16,7 +16,7 @@ - + diff --git a/src/DotNetCensus.Tests/DotNetProjectScanningTests.cs b/src/DotNetCensus.Tests/DotNetProjectScanningTests.cs new file mode 100644 index 00000000..5b9dd8d8 --- /dev/null +++ b/src/DotNetCensus.Tests/DotNetProjectScanningTests.cs @@ -0,0 +1,130 @@ +namespace DotNetCensus.Tests; + +[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] +[TestClass] +public class DotNetProjectScanningTests : BaseTests +{ + [TestMethod] + public void CountSampleFrameworksTest() + { + //Arrange + List? results = null; + + //Act + if (SamplesPath != null) + { + results = DotNetProjectScanning.SearchDirectory(SamplesPath); + } + + //Asset + Assert.IsNotNull(results); + Assert.AreEqual(14, results.Count); + Project? project1 = results.FirstOrDefault(d => d.Framework == "netcoreapp3.1"); + Assert.IsNotNull(project1); + Assert.AreEqual(project1.Framework, "netcoreapp3.1"); + Assert.AreEqual(project1.Language, "csharp"); + Assert.IsTrue(project1.Path?.Length > 0); + Assert.IsTrue(project1.FileName?.Length > 0); + Assert.IsTrue(project1.Color?.Length > 0); + } + + [TestMethod] + public void AggregateSampleFrameworksWithTotalTest() + { + //Arrange + List? results = null; + bool includeTotal = true; + + //Act + if (SamplesPath != null) + { + List projects = DotNetProjectScanning.SearchDirectory(SamplesPath); + results = Census.AggregateFrameworks(projects, includeTotal); + } + + //Asset + Assert.IsNotNull(results); + Assert.AreEqual(13, results.Count); + Assert.AreEqual(1, results[0].Count); + Assert.AreEqual("(Unknown framework)", results[0].Framework); + Assert.AreEqual(1, results[^2].Count); + Assert.AreEqual("vb6", results[^2].Framework); + Assert.AreEqual(14, results[^1].Count); + Assert.AreEqual("total frameworks", results[^1].Framework); + } + + [TestMethod] + public void AggregateSampleFrameworksNoTotalTest() + { + //Arrange + List? results = null; + bool includeTotal = false; + + //Act + if (SamplesPath != null) + { + List projects = DotNetProjectScanning.SearchDirectory(SamplesPath); + results = Census.AggregateFrameworks(projects, includeTotal); + } + + //Asset + Assert.IsNotNull(results); + Assert.AreEqual(12, results.Count); + Assert.AreEqual(1, results[0].Count); + Assert.AreEqual("(Unknown framework)", results[0].Framework); + Assert.AreEqual(1, results[^1].Count); + Assert.AreEqual("vb6", results[^1].Framework); + } + + [TestMethod] + public void AggregateSampleLanguagesWithTotalTest() + { + //Arrange + List? results = null; + bool includeTotal = true; + + //Act + if (SamplesPath != null) + { + List projects = DotNetProjectScanning.SearchDirectory(SamplesPath); + results = Census.AggregateLanguages(projects, includeTotal); + } + + //Asset + Assert.IsNotNull(results); + Assert.AreEqual(4, results.Count); + Assert.AreEqual(8, results[0].Count); + Assert.AreEqual("csharp", results[0].Language); + Assert.AreEqual(5, results[1].Count); + Assert.AreEqual("vb.net", results[1].Language); + Assert.AreEqual(1, results[2].Count); + Assert.AreEqual("vb6", results[2].Language); + Assert.AreEqual(14, results[3].Count); + Assert.AreEqual("total languages", results[3].Language); + } + + [TestMethod] + public void AggregateSampleLanguagesNoTotalTest() + { + //Arrange + List? results = null; + bool includeTotal = false; + + //Act + if (SamplesPath != null) + { + List projects = DotNetProjectScanning.SearchDirectory(SamplesPath); + results = Census.AggregateLanguages(projects, includeTotal); + } + + //Asset + Assert.IsNotNull(results); + Assert.AreEqual(3, results.Count); + Assert.AreEqual(8, results[0].Count); + Assert.AreEqual("csharp", results[0].Language); + Assert.AreEqual(5, results[1].Count); + Assert.AreEqual("vb.net", results[1].Language); + Assert.AreEqual(1, results[2].Count); + Assert.AreEqual("vb6", results[2].Language); + } +} \ No newline at end of file diff --git a/src/DotnetCensus.Tests/RepoScannerIntegrationTests.cs b/src/DotNetCensus.Tests/RepoScannerIntegrationTests.cs similarity index 99% rename from src/DotnetCensus.Tests/RepoScannerIntegrationTests.cs rename to src/DotNetCensus.Tests/RepoScannerIntegrationTests.cs index 64d02e9e..4e0b4ada 100644 --- a/src/DotnetCensus.Tests/RepoScannerIntegrationTests.cs +++ b/src/DotNetCensus.Tests/RepoScannerIntegrationTests.cs @@ -6,7 +6,7 @@ //using TechDebtID.Core; //using TechDebtID.Core.Models; -//namespace TechDebtID.Tests +//namespace DotNetCensus.Tests; //{ // [TestClass] // public class RepoScannerIntegrationTests diff --git a/src/DotnetCensus.Tests/RepoSyncWithStorageIntegrationTests.cs b/src/DotNetCensus.Tests/RepoSyncWithStorageIntegrationTests.cs similarity index 99% rename from src/DotnetCensus.Tests/RepoSyncWithStorageIntegrationTests.cs rename to src/DotNetCensus.Tests/RepoSyncWithStorageIntegrationTests.cs index 916036ed..9a7d1665 100644 --- a/src/DotnetCensus.Tests/RepoSyncWithStorageIntegrationTests.cs +++ b/src/DotNetCensus.Tests/RepoSyncWithStorageIntegrationTests.cs @@ -5,7 +5,7 @@ //using System.Threading.Tasks; //using TechDebtID.Core; -//namespace TechDebtID.Tests +//namespace DotNetCensus.Tests; //{ // [TestClass] // public class RepoSyncWithStorageIntegrationTests diff --git a/src/DotnetCensus.Tests/DotNetProjectScanningTests.cs b/src/DotnetCensus.Tests/DotNetProjectScanningTests.cs deleted file mode 100644 index 2daebead..00000000 --- a/src/DotnetCensus.Tests/DotNetProjectScanningTests.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace DotNetCensus.Tests; - -[TestClass] -public class DotNetProjectScanningTests : BaseTests -{ - [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - [TestMethod] - public void CountSampleFrameworksTest() - { - //Arrange - List? results = null; - - //Act - if (SamplesPath != null) - { - results = DotNetProjectScanning.SearchDirectory(SamplesPath); - } - - //Asset - Assert.IsNotNull(results); - Assert.AreEqual(14, results.Count); - Project project1 = results[0]; - Assert.IsNotNull(project1); - Assert.AreEqual(project1.Framework, "netcoreapp3.1"); - Assert.AreEqual(project1.Language, "csharp"); - Assert.IsTrue(project1.Path?.Length > 0); - Assert.IsTrue(project1.FileName?.Length > 0); - Assert.IsTrue(project1.Color?.Length > 0); - } -} \ No newline at end of file diff --git a/src/DotnetCensus.Tests/RepoScannerUnitTests.cs b/src/DotnetCensus.Tests/RepoScannerUnitTests.cs deleted file mode 100644 index dde2a3fe..00000000 --- a/src/DotnetCensus.Tests/RepoScannerUnitTests.cs +++ /dev/null @@ -1,120 +0,0 @@ -//using Microsoft.VisualStudio.TestTools.UnitTesting; -//using System.Collections.Generic; -//using TechDebtID.Core; -//using TechDebtID.Core.Models; - -//namespace TechDebtID.Tests -//{ -// [TestClass] -// public class RepoScannerUnitTests -// { - -// [TestMethod] -// public void AggregateFrameworksTest() -// { -// //Arrange -// RepoScanner repoScanner = new(); -// List projects = GenerateSampleData(); -// bool includeTotal = true; - -// //Act -// List results = repoScanner.AggregateFrameworks(projects, includeTotal); - -// //Asset -// Assert.AreEqual(10, results.Count); -// Assert.AreEqual(2, results.Find(i => i.Framework == "netstandard2.0").Count); -// Assert.AreEqual(2, results.Find(i => i.FrameworkFamily == ".NET Standard").Count); -// Assert.AreEqual(1, results.Find(i => i.Framework == "netcoreapp3.1").Count); -// Assert.AreEqual(1, results.Find(i => i.FrameworkFamily == ".NET Core").Count); -// Assert.AreEqual(1, results.Find(i => i.Framework == "net45").Count); -// Assert.AreEqual(1, results.Find(i => i.FrameworkFamily == ".NET Framework").Count); -// Assert.AreEqual(10, results[^1].Count); -// } - -// [TestMethod] -// public void AggregateLanguagesTest() -// { -// //Arrange -// RepoScanner repoScanner = new(); -// List projects = GenerateSampleData(); -// bool includeTotal = true; - -// //Act -// List results = repoScanner.AggregateLanguages(projects, includeTotal); - -// //Asset -// Assert.AreEqual(6, results.Count); -// Assert.AreEqual(6, results.Find(i => i.Language == "csharp").Count); -// Assert.AreEqual(1, results.Find(i => i.Language == "vbdotnet").Count); -// Assert.AreEqual(10, results[^1].Count); -// } - -// private static List GenerateSampleData() -// { -// List projects = new() -// { -// new Project -// { -// Framework = "netstandard2.0", -// Language = "csharp", -// Path = @"c:\Project1" -// }, -// new Project -// { -// Framework = "netstandard2.0", -// Language = "csharp", -// Path = @"c:\Project2" -// }, -// new Project -// { -// Framework = "netcoreapp3.1", -// Language = "csharp", -// Path = @"c:\Project3" -// }, -// new Project -// { -// Framework = "net6.0", -// Language = "csharp", -// Path = @"c:\Project3" -// }, -// new Project -// { -// Framework = "net45", -// Language = "vbdotnet", -// Path = @"c:\Project45" -// }, -// new Project -// { -// Framework = "vb6", -// Language = "vb6", -// Path = @"c:\Projectvb6" -// }, -// new Project -// { -// Framework = "v2.2", -// Language = "csharp", -// Path = @"c:\Projectv2" -// }, -// new Project -// { -// Framework = "v3.5", -// Language = "csharp", -// Path = @"c:\Projectv35" -// }, -// new Project -// { -// Framework = null, -// Language = null, -// Path = @"c:\ProjectNull" -// }, -// new Project -// { -// Framework = "unknown framework", -// Language = "unknown language", -// Path = @"c:\ProjectUnknown" -// } -// }; -// return projects; -// } -// } -//} diff --git a/src/DotnetCensus.Tests/Usings.cs b/src/DotnetCensus.Tests/Usings.cs deleted file mode 100644 index e69de29b..00000000 diff --git a/src/DotnetCensus.sln b/src/DotnetCensus.sln index e1e46b6e..5b8e9265 100644 --- a/src/DotnetCensus.sln +++ b/src/DotnetCensus.sln @@ -5,8 +5,6 @@ VisualStudioVersion = 17.2.32616.157 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNetCensus.Tests", "DotnetCensus.Tests\DotNetCensus.Tests.csproj", "{5FCE8F48-9845-4B36-B59D-74C1D544B593}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNetCensus", "DotnetCensus\DotNetCensus.csproj", "{FA149391-83BD-4D96-9CE9-7FC405371ACF}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{42B38FF9-1AEB-47DC-921F-E06A3737D7DD}" ProjectSection(SolutionItems) = preProject ..\.github\dependabot.yml = ..\.github\dependabot.yml @@ -15,6 +13,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution ..\.github\workflows\workflow.yml = ..\.github\workflows\workflow.yml EndProjectSection EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNetCensus.Core", "DotnetCensus.Core\DotNetCensus.Core.csproj", "{9CAC3EA6-31AC-4C37-A97A-DA259B58E575}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -25,10 +25,10 @@ Global {5FCE8F48-9845-4B36-B59D-74C1D544B593}.Debug|Any CPU.Build.0 = Debug|Any CPU {5FCE8F48-9845-4B36-B59D-74C1D544B593}.Release|Any CPU.ActiveCfg = Release|Any CPU {5FCE8F48-9845-4B36-B59D-74C1D544B593}.Release|Any CPU.Build.0 = Release|Any CPU - {FA149391-83BD-4D96-9CE9-7FC405371ACF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FA149391-83BD-4D96-9CE9-7FC405371ACF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FA149391-83BD-4D96-9CE9-7FC405371ACF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FA149391-83BD-4D96-9CE9-7FC405371ACF}.Release|Any CPU.Build.0 = Release|Any CPU + {9CAC3EA6-31AC-4C37-A97A-DA259B58E575}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9CAC3EA6-31AC-4C37-A97A-DA259B58E575}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9CAC3EA6-31AC-4C37-A97A-DA259B58E575}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9CAC3EA6-31AC-4C37-A97A-DA259B58E575}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/DotnetCensus/Models/Project.cs b/src/DotnetCensus/Models/Project.cs deleted file mode 100644 index e60c5417..00000000 --- a/src/DotnetCensus/Models/Project.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace DotNetCensus.Core.Models -{ - public class Project - { - //public Project (string fileName, string path) - //{ - // FileName = fileName; - // Path = path; - //} - - public string? FileName { get; set; } - public string? Path { get; set; } - //public string? Content { get; set; } - //public string? Family { get; set; } - public string? Framework { get; set; } - public string? Language { get; set; } - public string? Color { get; set; } - - } -}