Skip to content

Commit feea450

Browse files
committed
split nuget
1 parent 0bb9f1f commit feea450

26 files changed

+264
-54
lines changed

.github/workflows/dotnet-core-desktop.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,7 @@ jobs:
5757
uses: actions/[email protected]
5858
with:
5959
name: artifactory_${{ matrix.configuration }}
60-
path: |
61-
./Analogy.LogViewer.Serilog/bin/${{ matrix.configuration }}
62-
./Analogy.LogViewer.Serilog.Sinks/bin/${{ matrix.configuration }}
63-
60+
path: ./
6461
push-nuget:
6562
name: 'Push NuGet Packages'
6663
needs: build
@@ -75,10 +72,8 @@ jobs:
7572
name: artifactory_Release
7673
- name: 'Dotnet NuGet Push'
7774
run: |
78-
Get-ChildItem .\Analogy.LogViewer.Serilog\bin\Release -Filter *.nupkg |
75+
Get-ChildItem ./ -Recurse -Filter *.nupkg |
7976
ForEach-Object { dotnet nuget push $_ --source https://api.nuget.org/v3/index.json --skip-duplicate --api-key ${{secrets.NUGET_API_KEY}} }
80-
Get-ChildItem .\Analogy.LogViewer.Serilog.Sinks\bin\Release -Filter *.nupkg |
81-
ForEach-Object { dotnet nuget push $_ --source https://api.nuget.org/v3/index.json --skip-duplicate --api-key ${{secrets.NUGET_SINKS_API_KEY}} }
8277
shell: pwsh
8378
concurrency:
8479
group: ${{ github.ref }}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Library</OutputType>
5+
<TargetFrameworks>net10.0-windows;net9.0-windows;net8.0-windows;net48</TargetFrameworks>
6+
<VersionPrefix>9.0.0</VersionPrefix>
7+
<VersionSuffix>rc2</VersionSuffix>
8+
<UseWindowsForms>true</UseWindowsForms>
9+
<Authors>Lior Banai</Authors>
10+
<Description>Analogy Serilog Parser for Compact Formatting</Description>
11+
<Copyright>Lior Banai 2020-2026</Copyright>
12+
<PackageProjectUrl>https://github.com/Analogy-LogViewer/Analogy.LogViewer.Serilog</PackageProjectUrl>
13+
<RepositoryUrl>https://github.com/Analogy-LogViewer/Analogy.LogViewer.Serilog</RepositoryUrl>
14+
<PackageReleaseNotes>Analogy Serilog Parsers</PackageReleaseNotes>
15+
<PackageIcon>AnalogySerilog.png</PackageIcon>
16+
<AssemblyName>Analogy.LogViewer.Serilog.WinForms</AssemblyName>
17+
<RootNamespace>Analogy.LogViewer.Serilog.WinForms</RootNamespace>
18+
<PackageId>Analogy.LogViewer.Serilog.WinForms</PackageId>
19+
<Company>Analogy.LogViewer</Company>
20+
<PackageReadmeFile>README.md</PackageReadmeFile>
21+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
22+
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
23+
</PropertyGroup>
24+
25+
<ItemGroup>
26+
<PackageReference Include="Analogy.CommonUtilities" Version="9.0.2" />
27+
<PackageReference Include="Analogy.LogViewer.Interfaces" Version="9.0.1" />
28+
<PackageReference Include="Analogy.LogViewer.Interfaces.Winforms" Version="9.0.1" />
29+
<PackageReference Include="Analogy.LogViewer.Template" Version="9.0.2" />
30+
<PackageReference Include="Analogy.LogViewer.Template.WinForms" Version="9.0.2" />
31+
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
32+
<PackageReference Include="Serilog" Version="4.3.0" />
33+
<PackageReference Include="System.Resources.Extensions" Version="10.0.0" />
34+
</ItemGroup>
35+
<ItemGroup>
36+
<Compile Update="Properties\Resources.Designer.cs">
37+
<DesignTime>True</DesignTime>
38+
<AutoGen>True</AutoGen>
39+
<DependentUpon>Resources.resx</DependentUpon>
40+
</Compile>
41+
</ItemGroup>
42+
43+
<ItemGroup>
44+
<EmbeddedResource Update="Properties\Resources.resx">
45+
<Generator>ResXFileCodeGenerator</Generator>
46+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
47+
</EmbeddedResource>
48+
</ItemGroup>
49+
50+
<ItemGroup>
51+
<None Include="Resources\AnalogySerilog.png">
52+
<Pack>True</Pack>
53+
<PackagePath></PackagePath>
54+
</None>
55+
<None Include="..\Nuget\README.md" Pack="true" PackagePath="\" />
56+
</ItemGroup>
57+
58+
<ItemGroup>
59+
<ProjectReference Include="..\Analogy.LogViewer.Serilog\Analogy.LogViewer.Serilog.csproj" />
60+
</ItemGroup>
61+
</Project>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using Analogy.Interfaces;
2+
using Analogy.Interfaces.DataTypes;
3+
using System;
4+
using System.Collections.Generic;
5+
6+
namespace Analogy.LogViewer.Serilog
7+
{
8+
public static class ChangeLogList
9+
{
10+
public static IEnumerable<AnalogyChangeLog> GetChangeLog() =>
11+
new List<AnalogyChangeLog>
12+
{
13+
#pragma warning disable MA0132
14+
new("[V6.0.0] - NET8", AnalogChangeLogType.Improvement, "Lior Banai", new DateTime(2023, 11, 16), "6.0.0"),
15+
new("[V2.6.0] - [UI] Add parsing counter #374", AnalogChangeLogType.Improvement, "Lior Banai", new DateTime(2022, 04, 04), ""),
16+
new("[V2.5.0] - Add NET6 compilation target #330", AnalogChangeLogType.Improvement, "Lior Banai", new DateTime(2021, 11, 09), ""),
17+
new("[V2.3.0] - fill the new Analogy Interface fields #231", AnalogChangeLogType.Improvement, "Lior Banai", new DateTime(2021, 02, 11), ""),
18+
new("[V2.3.0] - Add portable option. #225", AnalogChangeLogType.Improvement, "Lior Banai", new DateTime(2021, 01, 30), ""),
19+
new("[V2.2.0] - Bump Serilog from 2.9.0 to 2.10.0 #151", AnalogChangeLogType.Improvement, "Lior Banai", new DateTime(2020, 12, 01), ""),
20+
new("[V2.1.4] - File format detection fails if file is already in use. #166", AnalogChangeLogType.Bug, "Lior Banai", new DateTime(2020, 10, 26), ""),
21+
new("[V2.1.3] - Add Update mechanism #164", AnalogChangeLogType.Improvement, "Lior Banai", new DateTime(2020, 10, 25), ""),
22+
new("[V2.1.1] - When application is not running in admin UnauthorizedAccessException can be thrown #150", AnalogChangeLogType.Improvement, "Lior Banai", new DateTime(2020, 10, 21), ""),
23+
new("[V2.1.0] - Serilog Trace Log Level are skipped in the parsers since debug is default level #148", AnalogChangeLogType.Bug, "Darko Vujičić", new DateTime(2020, 10, 18), ""),
24+
new("[V2.1.0] - [Implementation] Simplified code by using Analogy.LogViewer.Template as base implementation #121", AnalogChangeLogType.Improvement, "Lior Banai", new DateTime(2020, 10, 06), ""),
25+
new("[V2.0.0] - Add Raw message data property and Json Viewer when relevant #109", AnalogChangeLogType.Improvement, "Lior Banai", new DateTime(2020, 09, 26), ""),
26+
new("[V2.0.0] - Remove Regex parser from Serilog parser #112", AnalogChangeLogType.Improvement, "Lior Banai", new DateTime(2020, 09, 26), ""),
27+
new("[V2.0.0] - Add Auto detect formatter used in log file so user won't need to define the formatter in the user settings #61", AnalogChangeLogType.Improvement, "Lior Banai", new DateTime(2020, 09, 26), ""),
28+
new("[V2.0.0] - Add Additional Text Formatters (CompactJsonFormatter,JsonFormatter ) #6", AnalogChangeLogType.Improvement, "Lior Banai", new DateTime(2020, 09, 26), ""),
29+
new("Support for reading compressed files. #45", AnalogChangeLogType.Improvement, "Lior Banai", new DateTime(2020, 07, 22), ""),
30+
new("Duplicated/Extra columns with the dynamic columns feature. #44", AnalogChangeLogType.Improvement, "Lior Banai", new DateTime(2020, 07, 10), ""),
31+
new("Add dynamic columns per file properties. #43", AnalogChangeLogType.Improvement, "Lior Banai", new DateTime(2020, 07, 03), ""),
32+
new("Initial version", AnalogChangeLogType.None, "Lior Banai", new DateTime(2019, 12, 14), ""),
33+
#pragma warning restore MA0132
34+
};
35+
}
36+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using Analogy.Interfaces.WinForms;
2+
using Analogy.Interfaces.WinForms.Factories;
3+
using Analogy.LogViewer.Serilog.IAnalogy;
4+
using System;
5+
using System.Collections.Generic;
6+
7+
namespace Analogy.LogViewer.Serilog.WinForms
8+
{
9+
public class SerilogDataProvidersFactoryWinForms : SerilogDataProvidersFactory, IAnalogyDataProvidersFactoryWinForms
10+
{
11+
public override Guid FactoryId { get; set; } = SerilogPrimaryFactory.Id;
12+
public override string Title { get; set; } = "Serilog Parser";
13+
14+
public new IEnumerable<IAnalogyDataProviderWinForms> DataProviders { get; set; } = new List<IAnalogyDataProviderWinForms> { new SerilogOfflineDataProviderWinForms() };
15+
}
16+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
using Analogy.LogViewer.Serilog.IAnalogy;
2+
using System;
3+
using System.Diagnostics;
4+
using System.Reflection;
5+
using System.Runtime.Versioning;
6+
7+
namespace Analogy.LogViewer.Serilog.WinForms
8+
{
9+
public class SerilogDownloadInformationWinforms : Analogy.LogViewer.Template.AnalogyDownloadInformation
10+
{
11+
protected override string RepositoryURL { get; set; } = "https://api.github.com/repos/Analogy-LogViewer/Analogy.LogViewer.Serilog";
12+
public override TargetFrameworkAttribute CurrentFrameworkAttribute { get; set; } = (TargetFrameworkAttribute)Assembly.GetExecutingAssembly().GetCustomAttribute(typeof(TargetFrameworkAttribute));
13+
14+
public override Guid FactoryId { get; set; } = SerilogPrimaryFactory.Id;
15+
public override string Name { get; set; } = "Serilog Data Provider";
16+
17+
private string? _installedVersionNumber;
18+
public override string InstalledVersionNumber
19+
{
20+
get
21+
{
22+
if (_installedVersionNumber != null)
23+
{
24+
return _installedVersionNumber;
25+
}
26+
Assembly assembly = Assembly.GetExecutingAssembly();
27+
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(assembly.Location);
28+
_installedVersionNumber = fvi.FileVersion;
29+
return _installedVersionNumber;
30+
}
31+
}
32+
}
33+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
using Analogy.Interfaces;
2+
using Analogy.Interfaces.DataTypes;
3+
using Analogy.Interfaces.WinForms;
4+
using Analogy.Interfaces.WinForms.DataTypes;
5+
using Analogy.LogViewer.Serilog.DataTypes;
6+
using Analogy.LogViewer.Serilog.IAnalogy;
7+
using Analogy.LogViewer.Serilog.Managers;
8+
using Analogy.LogViewer.Template.WinForms;
9+
using Analogy.LogViewer.Template.WinForms.Properties;
10+
using Microsoft.Extensions.Logging;
11+
using Newtonsoft.Json;
12+
using System;
13+
using System.Collections.Generic;
14+
using System.Drawing;
15+
using System.IO;
16+
using System.IO.Compression;
17+
using System.Linq;
18+
using System.Text;
19+
using System.Threading;
20+
using System.Threading.Tasks;
21+
22+
namespace Analogy.LogViewer.Serilog.WinForms
23+
{
24+
public class SerilogOfflineDataProviderWinForms : SerilogOfflineDataProvider, IAnalogyOfflineDataProviderWinForms
25+
{
26+
public Image LargeImage { get; set; } = Resources.Analogy32x32;
27+
public Image SmallImage { get; set; } = Resources.Analogy32x32;
28+
29+
public AnalogyToolTipWinForms? ToolTip { get; set; }
30+
}
31+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using Analogy.Interfaces;
2+
using Analogy.Interfaces.WinForms.Factories;
3+
using Analogy.LogViewer.Serilog.IAnalogy;
4+
using Analogy.LogViewer.Serilog.Properties;
5+
using System;
6+
using System.Collections.Generic;
7+
using System.Drawing;
8+
9+
namespace Analogy.LogViewer.Serilog.WinForms
10+
{
11+
public class SerilogPrimaryFactoryWinForms : SerilogPrimaryFactory, IAnalogyFactoryWinForms
12+
{
13+
public override Guid FactoryId { get; set; } = Id;
14+
public override string Title { get; set; } = "Serilog Parser";
15+
public override IEnumerable<IAnalogyChangeLog> ChangeLog { get; set; } = ChangeLogList.GetChangeLog();
16+
public override IEnumerable<string> Contributors { get; set; } = new List<string> { "Lior Banai" };
17+
public override string About { get; set; } = "Serilog Parser for Analogy Log Viewer";
18+
public Image SmallImage { get; set; } = Resources.AnalogySerilog16x16;
19+
public Image LargeImage { get; set; } = Resources.AnalogySerilog32x32;
20+
}
21+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
using Analogy.LogViewer.Serilog.IAnalogy;
2+
using Analogy.LogViewer.Serilog.Properties;
3+
using Analogy.LogViewer.Template.WinForms;
4+
using Microsoft.Extensions.Logging;
5+
using System;
6+
using System.Drawing;
7+
using System.Threading.Tasks;
8+
using System.Windows.Forms;
9+
10+
namespace Analogy.LogViewer.Serilog.WinForms
11+
{
12+
public class SerilogUserSettingsFactoryWinForms : TemplateUserSettingsFactoryWinForms
13+
{
14+
public override UserControl DataProviderSettings { get; set; }
15+
public override Image SmallImage { get; set; } = Resources.AnalogySerilog16x16;
16+
public override Image LargeImage { get; set; } = Resources.AnalogySerilog32x32;
17+
public override Guid FactoryId { get; set; } = SerilogPrimaryFactory.Id;
18+
public override Guid Id { get; set; } = new Guid("26FF0D4D-8FA8-46C6-A021-079E669E7EC6");
19+
20+
public override void CreateUserControl(ILogger logger)
21+
{
22+
DataProviderSettings = new SerilogUCSettings();
23+
}
24+
25+
public override Task SaveSettingsAsync()
26+
{
27+
((SerilogUCSettings)DataProviderSettings)?.SaveSettings();
28+
return Task.CompletedTask;
29+
}
30+
}
31+
}

Analogy.LogViewer.Serilog/Properties/Resources.Designer.cs renamed to Analogy.LogViewer.Serilog.WinForms/Properties/Resources.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)