Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract ReferenceDiscoveryService to DependenSee.Core #29

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -362,3 +362,6 @@ MigrationBackup/
FodyWeavers.xsd

*/Properties/launchSettings.json

#Jetbrains folder
.idea/
17 changes: 17 additions & 0 deletions DependenSee.Core/DependenSee.Core.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>true</IsPackable>
<PackageOutputPath>../bin/nupkg</PackageOutputPath>
<Version>2.2.1</Version>
</PropertyGroup>
<PropertyGroup>
<Authors>Madushan</Authors>
<Description>Dotnet Library to export project and package dependencies.</Description>
<PackageTags>dependency, visualizer, dependensee</PackageTags>
<RepositoryUrl>https://github.com/madushans/DependenSee</RepositoryUrl>
<PackageProjectUrl>https://github.com/madushans/DependenSee</PackageProjectUrl>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion DependenSee/Models.cs → DependenSee.Core/Models.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace DependenSee;
namespace DependenSee.Core;

public class DiscoveryResult
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
namespace DependenSee;
using DependenSee.Core;

namespace DependenSee.Library;

public class ReferenceDiscoveryService
{
public string SourceFolder { get; set; }
public string OutputPath { get; set; }
public bool IncludePackages { get; set; }
public OutputTypes OutputType { get; set; }
public string IncludeProjectNamespaces { get; set; }
public string ExcludeProjectNamespaces { get; set; }
public string IncludePackageNamespaces { get; set; }
Expand Down Expand Up @@ -70,7 +70,7 @@ private void Discover(string folder, DiscoveryResult result)
}
if (info.Attributes.HasFlag(FileAttributes.ReparsePoint) && !FollowReparsePoints)
{
Console.Error.WriteLine($"Skipping scan for reparse point '{folder}'. Set {nameof(PowerArgsProgram.FollowReparsePoints)} flag to follow.\r\n\r\n");
Console.Error.WriteLine($"Skipping scan for reparse point '{folder}'. Set {nameof(FollowReparsePoints)} flag to follow.\r\n\r\n");
return;
}

Expand Down
10 changes: 10 additions & 0 deletions DependenSee.Core/globalusings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
global using System.CodeDom.Compiler;
global using System.IO;
global using System.Collections.Generic;
global using System;
global using System.Net;
global using System.Reflection;
global using System.Xml.Serialization;
global using System.Linq;
global using System.Xml;
global using System.Text.Json;
15 changes: 15 additions & 0 deletions DependenSee.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ VisualStudioVersion = 16.0.30717.126
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DependenSee", "DependenSee\DependenSee.csproj", "{6C4DA9BF-3DEC-4794-8E63-3F066A0C7361}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DependenSee.Core", "DependenSee.Core\DependenSee.Core.csproj", "{C61891FA-4ACB-421C-9D0D-093AAA166731}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionFolder", "SolutionFolder", "{BBE4D3AC-68B2-46EE-9120-DFD93E780100}"
ProjectSection(SolutionItems) = preProject
LICENSE = LICENSE
README.md = README.md
azure-pipelines.yml = azure-pipelines.yml
sample-html-output.html = sample-html-output.html
sample-output.png = sample-output.png
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -15,6 +26,10 @@ Global
{6C4DA9BF-3DEC-4794-8E63-3F066A0C7361}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6C4DA9BF-3DEC-4794-8E63-3F066A0C7361}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6C4DA9BF-3DEC-4794-8E63-3F066A0C7361}.Release|Any CPU.Build.0 = Release|Any CPU
{C61891FA-4ACB-421C-9D0D-093AAA166731}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C61891FA-4ACB-421C-9D0D-093AAA166731}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C61891FA-4ACB-421C-9D0D-093AAA166731}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C61891FA-4ACB-421C-9D0D-093AAA166731}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
8 changes: 6 additions & 2 deletions DependenSee/DependenSee.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

<PackAsTool>true</PackAsTool>
<ToolCommandName>DependenSee</ToolCommandName>
<PackageOutputPath>./bin/nupkg</PackageOutputPath>
<Version>2.2.0</Version>
<PackageOutputPath>../bin/nupkg</PackageOutputPath>
<Version>2.2.1</Version>
</PropertyGroup>

<ItemGroup>
Expand All @@ -32,4 +32,8 @@
<ItemGroup>
<None Include="LICENSE.txt" Pack="true" PackagePath="" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\DependenSee.Core\DependenSee.Core.csproj" />
</ItemGroup>
</Project>
5 changes: 4 additions & 1 deletion DependenSee/GraphVizSerializer.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
namespace DependenSee;
using DependenSee.Core;
using DependenSee.Library;

namespace DependenSee;
public static class GraphvizSerializer
{
const string ProjectBackgroundColor = "#00cc22";
Expand Down
7 changes: 3 additions & 4 deletions DependenSee/PowerArgsProgram.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace DependenSee;
using DependenSee.Library;

namespace DependenSee;

public enum OutputTypes
{
Expand Down Expand Up @@ -93,9 +95,6 @@ public void Main()
ExcludeFolders = ExcludeFolders,
FollowReparsePoints = FollowReparsePoints,

OutputPath = OutputPath,
OutputType = OutputType,

SourceFolder = SourceFolder,

};
Expand Down
5 changes: 4 additions & 1 deletion DependenSee/ResultWriter.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
namespace DependenSee;
using DependenSee.Core;
using DependenSee.Library;

namespace DependenSee;

internal class ResultWriter
{
Expand Down