Skip to content

Commit 1ce3938

Browse files
committed
Convert DLL to net standard Version. Fix #2
1 parent 98e7de6 commit 1ce3938

File tree

6 files changed

+41
-115
lines changed

6 files changed

+41
-115
lines changed

Analogy.LogViewer.Example.nuspec

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
11
<?xml version="1.0"?>
22
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
3-
<metadata>
4-
<id>Analogy.LogViewer.Example</id>
5-
<version>1.0.7.0</version>
6-
<title>Analogy Log Viewer - Example</title>
7-
<authors>Lior Banai</authors>
8-
<owners>Lior Banai</owners>
9-
<license type="expression">MIT</license>
10-
<projectUrl>https://github.com/Analogy-LogViewer/Analogy.LogViewer.Example</projectUrl>
3+
<metadata>
4+
<id>Analogy.LogViewer.Example</id>
5+
<version>1.0.8.0</version>
6+
<title>Analogy Log Viewer - Example</title>
7+
<authors>Lior Banai</authors>
8+
<owners>Lior Banai</owners>
9+
<license type="expression">MIT</license>
10+
<projectUrl>https://github.com/Analogy-LogViewer/Analogy.LogViewer.Example</projectUrl>
1111
<repository type="git" url="https://github.com/Analogy-LogViewer/Analogy.LogViewer.Example" />
12-
<icon>icon.png</icon>
13-
<requireLicenseAcceptance>false</requireLicenseAcceptance>
14-
<description>Analogy Log Viewer (Example)</description>
15-
<releaseNotes>Example package. See github page</releaseNotes>
16-
<copyright>Copyright 2019 Lior Banai</copyright>
17-
<tags></tags>
18-
<dependencies>
19-
<group targetFramework="net472">
20-
<dependency id="Analogy.LogViewer.Interfaces" version="2.1.6.1" />
21-
</group>
22-
</dependencies>
23-
</metadata>
24-
<files>
25-
<file src="Analogy.LogViewer.Example\bin\Release\Analogy.LogViewer.Example.dll" target="lib\net472\Analogy.LogViewer.Example.dll" />
12+
<icon>icon.png</icon>
13+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
14+
<description>Analogy Log Viewer (Example)</description>
15+
<releaseNotes>Example package. See github page</releaseNotes>
16+
<copyright>Copyright 2019 Lior Banai</copyright>
17+
<tags></tags>
18+
<dependencies>
19+
<group targetFramework="netstandard2.0">
20+
<dependency id="Analogy.LogViewer.Interfaces" version="2.1.7" />
21+
</group>
22+
</dependencies>
23+
</metadata>
24+
<files>
25+
<file src="Analogy.LogViewer.Example\bin\Release\netstandard2.0\Analogy.LogViewer.Example.dll" target="lib\netstandard2.0\Analogy.LogViewer.Example.dll" />
26+
<file src="Analogy.LogViewer.Example\bin\Release\netstandard2.0\Analogy.LogViewer.Example.deps.json" target="lib\netstandard2.0\Analogy.LogViewer.Example.deps.json" />
2627
<file src="icon.png" target="" />
27-
</files>
28+
</files>
2829
</package>
Lines changed: 11 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,15 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
43
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{69EF9461-D518-457B-A354-B8A4407F80FF}</ProjectGuid>
8-
<OutputType>Library</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>Analogy.LogViewer.Example</RootNamespace>
11-
<AssemblyName>Analogy.LogViewer.Example</AssemblyName>
12-
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
14-
<Deterministic>true</Deterministic>
15-
<TargetFrameworkProfile />
4+
<TargetFramework>netstandard2.0</TargetFramework>
5+
<Version>1.0.8</Version>
6+
<Authors>Lior Banai</Authors>
7+
<Company>Lior Banai</Company>
8+
<Product>Analogy.LogViewer.Example</Product>
9+
<PackageId>Analogy.LogViewer.Example</PackageId>
1610
</PropertyGroup>
17-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
18-
<DebugSymbols>true</DebugSymbols>
19-
<DebugType>full</DebugType>
20-
<Optimize>false</Optimize>
21-
<OutputPath>bin\Debug\</OutputPath>
22-
<DefineConstants>DEBUG;TRACE</DefineConstants>
23-
<ErrorReport>prompt</ErrorReport>
24-
<WarningLevel>4</WarningLevel>
25-
</PropertyGroup>
26-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27-
<DebugType>pdbonly</DebugType>
28-
<Optimize>true</Optimize>
29-
<OutputPath>bin\Release\</OutputPath>
30-
<DefineConstants>TRACE</DefineConstants>
31-
<ErrorReport>prompt</ErrorReport>
32-
<WarningLevel>4</WarningLevel>
33-
</PropertyGroup>
34-
<ItemGroup>
35-
<Reference Include="System" />
36-
<Reference Include="System.Core" />
37-
<Reference Include="System.Drawing" />
38-
<Reference Include="System.Xml.Linq" />
39-
<Reference Include="System.Data.DataSetExtensions" />
40-
<Reference Include="Microsoft.CSharp" />
41-
<Reference Include="System.Data" />
42-
<Reference Include="System.Net.Http" />
43-
<Reference Include="System.Xml" />
44-
</ItemGroup>
45-
<ItemGroup>
46-
<Compile Include="ExampleDataProviderFactory.cs" />
47-
<Compile Include="ExampleFactory.cs" />
48-
<Compile Include="OnlineExampleDataProvider.cs" />
49-
<Compile Include="OfflineExampleDataProvider.cs" />
50-
<Compile Include="Properties\AssemblyInfo.cs" />
51-
</ItemGroup>
11+
5212
<ItemGroup>
53-
<PackageReference Include="Analogy.LogViewer.Interfaces">
54-
<Version>2.1.6.1</Version>
55-
</PackageReference>
13+
<PackageReference Include="Analogy.LogViewer.Interfaces" Version="2.1.7" />
5614
</ItemGroup>
57-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
58-
</Project>
15+
</Project>

Analogy.LogViewer.Example/ExampleFactory.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public class ExampleFactory : IAnalogyFactory
1717

1818
public IEnumerable<IAnalogyChangeLog> ChangeLog { get; } = new List<AnalogyChangeLog>
1919
{
20+
new AnalogyChangeLog("Update Analogy.Interface version to 2.1.7",AnalogChangeLogType.None, "Lior Banai",new DateTime(2019, 09, 14)),
2021
new AnalogyChangeLog("Create example implementation",AnalogChangeLogType.None, "Lior Banai",new DateTime(2019, 08, 15)),
2122
new AnalogyChangeLog("Add Thread ID",AnalogChangeLogType.None, "Lior Banai",new DateTime(2019, 08, 20)),
2223
new AnalogyChangeLog("Add File handler for online data source (aligned with new interface)",AnalogChangeLogType.None, "Lior Banai",new DateTime(2019, 09, 09)),

Analogy.LogViewer.Example/OfflineExampleDataProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public OfflineExampleDataProvider(string prefix, Guid guid)
2727
OptionalTitle = $"Analogy Example: Offline Data Provider ({prefix})";
2828
}
2929

30-
public Task InitializeDataProviderAsync()
30+
public Task InitializeDataProviderAsync(IAnalogyLogger logger)
3131
{
3232
return Task.CompletedTask;
3333
}

Analogy.LogViewer.Example/OnlineExampleDataProvider.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,16 @@ class OnlineExampleDataProvider : IAnalogyRealTimeDataProvider
2828
readonly Array values = Enum.GetValues(typeof(AnalogyLogLevel));
2929
private readonly List<string> processes = Process.GetProcesses().Select(p => p.ProcessName).ToList();
3030
private readonly string prefixMessage;
31+
private IAnalogyLogger Logger { get; set; }
3132
public OnlineExampleDataProvider(string prefix,Guid guid)
3233
{
3334
prefixMessage = prefix;
3435
ID = guid;
3536
OptionalTitle = $"Analogy Example: Real time Data Provider {prefix}";
3637
}
37-
public Task InitializeDataProviderAsync()
38+
public Task InitializeDataProviderAsync(IAnalogyLogger logger)
3839
{
40+
Logger = logger;
3941
SimulateOnlineMessages = new Timer(100);
4042

4143
SimulateOnlineMessages.Elapsed += (s, e) =>
@@ -69,7 +71,7 @@ public void MessageOpened(AnalogyLogMessage message)
6971

7072
public void StartReceiving()
7173
{
72-
InitializeDataProviderAsync();
74+
InitializeDataProviderAsync(Logger);
7375
SimulateOnlineMessages?.Start();
7476
}
7577

Analogy.LogViewer.Example/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)