Skip to content

Commit

Permalink
NET8
Browse files Browse the repository at this point in the history
  • Loading branch information
LiorBanai committed Nov 16, 2023
1 parent 2bc75d0 commit eecbcf7
Show file tree
Hide file tree
Showing 14 changed files with 302 additions and 164 deletions.
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,8 @@ dotnet_diagnostic.SA1122.severity = suggestion
dotnet_diagnostic.SA1108.severity = silent
dotnet_diagnostic.SA1012.severity = error
dotnet_diagnostic.SA1500.severity = error
dotnet_diagnostic.SA1316.severity = error
dotnet_diagnostic.SA0001.severity = none

[*.{cs,vb}]
dotnet_style_operator_placement_when_wrapping = beginning_of_line
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/dotnet-core-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ jobs:

# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v3.0.3
uses: actions/setup-dotnet@v3.2.0
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.1.3
uses: microsoft/setup-msbuild@v1.3.1

# Restore the application to populate the obj folder with RuntimeIdentifiers
- name: Restore the application
Expand Down
12 changes: 10 additions & 2 deletions Analogy.LogViewer.LoggersTree.sln
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.33423.256
# Visual Studio Version 17
VisualStudioVersion = 17.8.34309.116
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Analogy.LogViewer.LoggersTree", "Analogy.LogViewer.LoggersTree\Analogy.LogViewer.LoggersTree.csproj", "{64D48D17-F26B-4DD7-94B5-72C5A9D47B8D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{778229A3-FA54-4CBF-86AA-8002445FAD0B}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
Directory.Build.props = Directory.Build.props
.github\workflows\dotnet-core-desktop.yml = .github\workflows\dotnet-core-desktop.yml
nuget.config = nuget.config
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down
46 changes: 8 additions & 38 deletions Analogy.LogViewer.LoggersTree/Analogy.LogViewer.LoggersTree.csproj
Original file line number Diff line number Diff line change
@@ -1,35 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">

<PropertyGroup>
<TargetFrameworks>net7.0-windows;net6.0-windows;net48;net471</TargetFrameworks>
<UseWindowsForms>true</UseWindowsForms>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<TargetFrameworks>net8.0-windows;net7.0-windows;net6.0-windows;net48;net471</TargetFrameworks>
<Authors>CAMAG</Authors>
<Company>CAMAG</Company>
<Product>Analogy.LogViewer.LoggersTree</Product>
<PackageId>Analogy.LogViewer.LoggersTree</PackageId>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<Copyright>CAMAG © 2023</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Copyright>CAMAG © 2023-2024</Copyright>
<PackageProjectUrl>https://github.com/Analogy-LogViewer/Analogy.LogViewer.LoggersTree</PackageProjectUrl>
<RepositoryUrl>https://github.com/Analogy-LogViewer/Analogy.LogViewer.LoggersTree</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageIcon>icon.png</PackageIcon>
<PackageIconUrl />
<Description>Loggers tree extension</Description>
<PackageReleaseNotes>Improvements</PackageReleaseNotes>
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<VersionPrefix>2.0.2.0</VersionPrefix>
<VersionPrefix>3.0.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>

Expand Down Expand Up @@ -64,25 +48,11 @@
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net471|AnyCPU'">
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net48' or '$(TargetFramework)' == 'net471' ">
<PackageReference Include="PolySharp" Version="1.13.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Analogy.CommonUtilities" Version="5.0.3" />
<PackageReference Include="Analogy.LogViewer.Interfaces" Version="5.0.3" />
<PackageReference Include="Analogy.LogViewer.Template" Version="5.0.3" />
<PackageReference Include="Microsoft.Build.Tasks.Git" Version="1.1.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.Resources.Extensions" Version="7.0.0" />
<PackageReference Include="Analogy.CommonUtilities" Version="6.0.0" />
<PackageReference Include="Analogy.LogViewer.Interfaces" Version="6.0.0.1" />
<PackageReference Include="Analogy.LogViewer.Template" Version="6.0.0" />
<PackageReference Include="System.Resources.Extensions" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand All @@ -92,7 +62,7 @@
</None>
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0-windows' or '$(TargetFramework)' == 'net7.0-windows' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0-windows' or '$(TargetFramework)' == 'net7.0-windows' or '$(TargetFramework)' == 'net8.0-windows' ">
<Reference Include="DevExpress.Utils.v21.2">
<HintPath>..\DevExpress\.net core\DevExpress.Utils.v21.2.dll</HintPath>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
Expand Down
8 changes: 4 additions & 4 deletions Analogy.LogViewer.LoggersTree/LoggersTree/ExtensionFactory.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using Analogy.Interfaces;
using Analogy.Interfaces;
using Analogy.Interfaces.Factories;
using System;
using System.Collections.Generic;

namespace Analogy.LogViewer.LoggersTree.LoggersTree
{
Expand All @@ -10,6 +10,6 @@ public class ExtensionFactory : IAnalogyExtensionsFactory
{
public Guid FactoryId { get; set; } = PrimaryFactory.Id;
public string Title { get; set; } = "Loggers tree extension";
public IEnumerable<IAnalogyExtension> Extensions { get; } = new List<IAnalogyExtension> { new ExtensionLoggersTreeSerilog(), new ExtensionLoggersTreeLog4jXml()};
public IEnumerable<IAnalogyExtension> Extensions { get; } = new List<IAnalogyExtension> { new ExtensionLoggersTreeSerilog(), new ExtensionLoggersTreeLog4jXml() };
}
}
19 changes: 10 additions & 9 deletions Analogy.LogViewer.LoggersTree/LoggersTree/ExtensionLoggersTree.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System;
using Analogy.Interfaces;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Windows.Forms;
using Analogy.Interfaces;
using Microsoft.Extensions.Logging;

namespace Analogy.LogViewer.LoggersTree.LoggersTree
{
Expand All @@ -16,34 +16,35 @@ public abstract class ExtensionLoggersTree : IAnalogyExtensionUserControl
public string AuthorMail { get; set; } = "[email protected]";
public List<string> AdditionalContributors { get; } = new List<string>(0);
public abstract string Description { get; set; }
private readonly Dictionary<Guid, UserControl> _userControls;
private readonly Dictionary<Guid, UserControl> userControls;

protected ExtensionLoggersTree()
{
_userControls = new Dictionary<Guid, UserControl>();
userControls = new Dictionary<Guid, UserControl>();
}


public UserControl CreateUserControl(Guid logWindowsId, ILogger logger)
{
UcLoggersTree control = new UcLoggersTree();
_userControls.Add(logWindowsId, control);
userControls.Add(logWindowsId, control);
return control;
}

public UserControl GetUserControl(Guid logWindowsId)
{
return _userControls[logWindowsId];
return userControls[logWindowsId];
}

Task IAnalogyExtensionUserControl.InitializeUserControl(Control hostingControl, Guid logWindowsId, ILogger logger)
{
(GetUserControl(logWindowsId) as UcLoggersTree)?.Init();
if (hostingControl is ILogRawSQL logRawSQL)
{
(GetUserControl(logWindowsId) as UcLoggersTree)?.SetLogRawSQL(logRawSQL);
}

return Task.CompletedTask;
}


public virtual void NewMessage(IAnalogyLogMessage message, Guid logWindowsId)
{
Expand Down
4 changes: 2 additions & 2 deletions Analogy.LogViewer.LoggersTree/LoggersTree/Logger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
{
internal class Logger
{
public static char Separator = ':';
public static char Separator => ':';

public string? Source { get; set; }
public string? Machine { get; set; }
public string? ProcessName { get; set; }

public string ProcessKey
{
get { return Machine?.ToLower() + Separator + ProcessName?.ToLower(); }
get { return Machine?.ToLowerInvariant() + Separator + ProcessName?.ToLowerInvariant(); }
}

public string SourceKey
Expand Down
16 changes: 8 additions & 8 deletions Analogy.LogViewer.LoggersTree/LoggersTree/PrimaryFactory.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System;
using Analogy.Interfaces;
using Analogy.LogViewer.LoggersTree.Properties;
using System;
using System.Collections.Generic;
using System.Drawing;
using Analogy.Interfaces;
using Analogy.LogViewer.LoggersTree.Properties;

namespace Analogy.LogViewer.LoggersTree.LoggersTree
{
Expand All @@ -16,12 +16,12 @@ public class PrimaryFactory : global::Analogy.LogViewer.Template.PrimaryFactory
public override Image? LargeImage { get; set; } = Resources.Analogy_image_32x32;

public override IEnumerable<IAnalogyChangeLog> ChangeLog { get; set; } = new List<AnalogyChangeLog>
{
new AnalogyChangeLog("Update Nuget dependencies",AnalogChangeLogType.None, "Lior Banai",new DateTime(2023, 08, 04), ""),
new AnalogyChangeLog("Corrected loggers' name in case of C# generics, corrected SQL generation, prettified displayed SQL",AnalogChangeLogType.Bug, "CAMAG",new DateTime(2023, 04, 04), ""),
new AnalogyChangeLog("Corrected query and added auto resize",AnalogChangeLogType.Bug, "CAMAG",new DateTime(2023, 03, 22), "")
{
new AnalogyChangeLog("Update Nuget dependencies", AnalogChangeLogType.None, "Lior Banai", new DateTime(2023, 08, 04), ""),
new AnalogyChangeLog("Corrected loggers' name in case of C# generics, corrected SQL generation, prettified displayed SQL", AnalogChangeLogType.Bug, "CAMAG", new DateTime(2023, 04, 04), ""),
new AnalogyChangeLog("Corrected query and added auto resize", AnalogChangeLogType.Bug, "CAMAG", new DateTime(2023, 03, 22), ""),
};
public override IEnumerable<string> Contributors { get; set; } = new List<string> { "CAMAG" };
public override string About { get; set; } = "Loggers tree";
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit eecbcf7

Please sign in to comment.