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

Updated dependencies to latest #221

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions ESCPOS_NET.ConsoleTest/ESCPOS_NET.ConsoleTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions ESCPOS_NET.UnitTest/ESCPOS_NET.UnitTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.2">
<PackageReference Include="coverlet.collector" Version="3.2.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
12 changes: 6 additions & 6 deletions ESCPOS_NET/ESCPOS_NET.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>netstandard2.1</TargetFramework>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Company>animalistic.io</Company>
Expand Down Expand Up @@ -30,12 +30,12 @@
<LangVersion>latestmajor</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" />
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.3" />
<PackageReference Include="SuperSimpleTcp" Version="2.4.0" />
<PackageReference Include="System.IO.Ports" Version="6.0.0" />
<PackageReference Include="System.Text.Json" Version="6.0.4" />
<PackageReference Include="SuperSimpleTcp" Version="3.0.7" />
<PackageReference Include="System.IO.Ports" Version="7.0.0" />
<PackageReference Include="System.Text.Json" Version="7.0.1" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion ESCPOS_NET/Printers/ImmediateNetworkPrinter.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Microsoft.Extensions.Logging;
using SimpleTcp;
using SuperSimpleTcp;
using System;
using System.IO;
using System.Threading.Tasks;
Expand Down
6 changes: 3 additions & 3 deletions ESCPOS_NET/Printers/NetworkPrinter.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Microsoft.Extensions.Logging;
using SimpleTcp;
using SuperSimpleTcp;
using System;
using System.IO;
using System.Threading.Tasks;
Expand Down Expand Up @@ -40,13 +40,13 @@ public NetworkPrinter(NetworkPrinterSettings settings) : base(settings.PrinterNa
Connect();
}

private void ConnectedEvent(object sender, ClientConnectedEventArgs e)
private void ConnectedEvent(object sender, SuperSimpleTcp.ConnectionEventArgs e)
{
Logging.Logger?.LogInformation("[{Function}]:[{PrinterName}] Connected successfully to network printer! Connection String: {ConnectionString}", $"{this}.{MethodBase.GetCurrentMethod().Name}", PrinterName, _settings.ConnectionString);
IsConnected = true;
InvokeConnect();
}
private void DisconnectedEvent(object sender, ClientDisconnectedEventArgs e)
private void DisconnectedEvent(object sender, SuperSimpleTcp.ConnectionEventArgs e)
{
IsConnected = false;
InvokeDisconnect();
Expand Down
14 changes: 8 additions & 6 deletions ESCPOS_NET/Utils/TCPConnection.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using ESCPOS_NET.Utils;
using SimpleTcp;
using SuperSimpleTcp;
using System;
using System.IO;

Expand All @@ -9,8 +9,8 @@ public class TCPConnection
{
public Stream ReadStream { get; private set; } = new EchoStream();
public Stream WriteStream { get; private set; }
public event EventHandler<ClientConnectedEventArgs> Connected;
public event EventHandler<ClientDisconnectedEventArgs> Disconnected;
public event EventHandler<SuperSimpleTcp.ConnectionEventArgs> Connected;
public event EventHandler<SuperSimpleTcp.ConnectionEventArgs> Disconnected;
public bool IsConnected => _client?.IsConnected ?? false;
private SimpleTcpClient _client;
//public event EventHandler<DataReceivedEventArgs> DataReceived;
Expand All @@ -24,17 +24,19 @@ public TCPConnection(string destination)
ReadStream.ReadTimeout = 1500;
WriteStream = new InterceptableWriteMemoryStream(bytes => _client.Send(bytes));
}
private void ConnectedEventHandler(object sender, ClientConnectedEventArgs e)


private void ConnectedEventHandler(object sender, SuperSimpleTcp.ConnectionEventArgs e)
{
Connected?.Invoke(sender, e);
}
private void DisconnectedEventHandler(object sender, ClientDisconnectedEventArgs e)
private void DisconnectedEventHandler(object sender, SuperSimpleTcp.ConnectionEventArgs e)
{
Disconnected?.Invoke(sender, e);
}
private void DataReceivedEventHandler(object sender, DataReceivedEventArgs e)
{
ReadStream.Write(e.Data, 0, e.Data.Length);
ReadStream.Write(e.Data.Array, 0, e.Data.Count);
}
public void ConnectWithRetries(int timeoutMs)
{
Expand Down