diff --git a/Elatec.NET.Tests/ProtocolTests.cs b/Elatec.NET.Tests/ProtocolTests.cs index 2483888..6728273 100644 --- a/Elatec.NET.Tests/ProtocolTests.cs +++ b/Elatec.NET.Tests/ProtocolTests.cs @@ -53,7 +53,7 @@ public async Task GetVersionStringAsync_SetsLegicFlagBasedOnVersion(string versi private static string EncodeAsciiResponse(string value) { - var bytes = System.Text.Encoding.ASCII.GetBytes(value); + var bytes = global::System.Text.Encoding.ASCII.GetBytes(value); var response = new byte[bytes.Length + 2]; response[0] = 0x00; // ResponseError.None response[1] = (byte)bytes.Length; @@ -63,7 +63,7 @@ private static string EncodeAsciiResponse(string value) private static string BytesToHex(byte[] bytes) { - var hex = new System.Text.StringBuilder(); + var hex = new global::System.Text.StringBuilder(); foreach (var value in bytes) { hex.Append(value.ToString("X2")); diff --git a/Elatec.NET.cs b/Elatec.NET.cs index 1089ad1..3a0b4f4 100644 --- a/Elatec.NET.cs +++ b/Elatec.NET.cs @@ -10,6 +10,7 @@ using System.IO; using Elatec.NET.Cards; using Elatec.NET.Cards.Mifare; +using Elatec.NET.System; /* * Elatec.NET is a C# library to easily Talk to Elatec's TWN4 Devices @@ -68,7 +69,7 @@ public static List Instance public TWN4ReaderDevice(string portName, Func transportFactory = null) { PortName = portName; - _transportFactory = transportFactory ?? (name => new SerialPortTransport(name)); + _transportFactory = transportFactory ?? new Func(name => new SerialPortTransport(name)); } /// diff --git a/Helpers/ByteArray.cs b/Helpers/ByteArray.cs index 0650787..0e8d8b0 100644 --- a/Helpers/ByteArray.cs +++ b/Helpers/ByteArray.cs @@ -368,7 +368,7 @@ private static byte HexToByte(string hex) { if (!(hex.Length > 2 || hex.Length <= 0)) { - newByte = byte.Parse(hex, System.Globalization.NumberStyles.HexNumber); + newByte = byte.Parse(hex, global::System.Globalization.NumberStyles.HexNumber); } } catch