From e704fd7a916ce75da0f9ea4bab8bce61dfb861ee Mon Sep 17 00:00:00 2001 From: Patrick Grote Date: Mon, 27 May 2024 02:35:53 +0200 Subject: [PATCH] Remove old Files --- RDMSharp/RDM/IPv4Address.cs | 125 -------------------- RDMSharp/RDM/MACAddress.cs | 141 ----------------------- RDMSharp/RDM/RDMUID.cs | 189 ------------------------------- RDMSharpTests/RDM/RDMUID_Test.cs | 172 ---------------------------- 4 files changed, 627 deletions(-) delete mode 100644 RDMSharp/RDM/IPv4Address.cs delete mode 100644 RDMSharp/RDM/MACAddress.cs delete mode 100644 RDMSharp/RDM/RDMUID.cs delete mode 100644 RDMSharpTests/RDM/RDMUID_Test.cs diff --git a/RDMSharp/RDM/IPv4Address.cs b/RDMSharp/RDM/IPv4Address.cs deleted file mode 100644 index dca256f..0000000 --- a/RDMSharp/RDM/IPv4Address.cs +++ /dev/null @@ -1,125 +0,0 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using System.Net; -//using System.Text.RegularExpressions; - -//namespace RDMSharp -//{ -// public readonly struct IPv4Address : IEquatable -// { -// public readonly byte B1; -// public readonly byte B2; -// public readonly byte B3; -// public readonly byte B4; - -// public static IPv4Address LocalHost { get => new IPv4Address(127, 0, 0, 1); } - -// public IPv4Address(in byte block1, in byte block2, in byte block3, in byte block4) -// { -// B1 = block1; -// B2 = block2; -// B3 = block3; -// B4 = block4; -// } -// public IPv4Address(in string ipAddress) : this() -// { -// Regex regex = new Regex(@"^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$"); -// var match = regex.Match(ipAddress); -// if (!match.Success) -// throw new FormatException("The given string is not a IPv4Address"); -// B1 = byte.Parse(match.Groups[1].Value); -// B2 = byte.Parse(match.Groups[2].Value); -// B3 = byte.Parse(match.Groups[3].Value); -// B4 = byte.Parse(match.Groups[4].Value); -// } - -// public IPv4Address(byte[] bytes) : this() -// { -// if (bytes.Length != 4) -// throw new ArgumentOutOfRangeException("bytes should be an array with a length of 4"); - -// B1 = bytes[0]; -// B2 = bytes[1]; -// B3 = bytes[2]; -// B4 = bytes[3]; -// } - -// public IPv4Address(IEnumerable enumerable) : this() -// { -// if (enumerable.Count() != 4) -// throw new ArgumentOutOfRangeException("bytes should be an array with a length of 4"); - -// B1 = enumerable.ElementAt(0); -// B2 = enumerable.ElementAt(1); -// B3 = enumerable.ElementAt(2); -// B4 = enumerable.ElementAt(3); -// } - -// public static implicit operator IPAddress(IPv4Address address) -// { -// return new IPAddress(new byte[4] { address.B1, address.B2, address.B3, address.B4 }); -// } -// public static implicit operator IPv4Address(IPAddress ip) -// { -// if (ip.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork) -// return new IPv4Address(ip.GetAddressBytes()); -// throw new ArgumentException($"{ip} is not a Valid IPv4 and cant be converted"); -// } -// public static implicit operator byte[](IPv4Address address) -// { -// return new byte[4] { address.B1, address.B2, address.B3, address.B4 }; -// } -// public static implicit operator IPv4Address(byte[] bytes) -// { -// return new IPv4Address(bytes); -// } -// public override string ToString() -// { -// return $"{B1}.{B2}.{B3}.{B4}"; -// } - -// public static bool operator ==(IPv4Address a, IPv4Address b) -// { -// return a.Equals(b); -// } - -// public static bool operator !=(IPv4Address a, IPv4Address b) -// { -// return !a.Equals(b); -// } - -// public bool Equals(IPv4Address other) -// { -// if (this.B1 != other.B1) -// return false; -// if (this.B2 != other.B2) -// return false; -// if (this.B3 != other.B3) -// return false; -// if (this.B4 != other.B4) -// return false; - -// return true; -// } - -// public override bool Equals(object obj) -// { -// return obj is IPv4Address other && -// B1 == other.B1 && -// B2 == other.B2 && -// B3 == other.B3 && -// B4 == other.B4; -// } - -// public override int GetHashCode() -// { -// int hashCode = 1916557166; -// hashCode = hashCode * -1521134295 + B1.GetHashCode(); -// hashCode = hashCode * -1521134295 + B2.GetHashCode(); -// hashCode = hashCode * -1521134295 + B3.GetHashCode(); -// hashCode = hashCode * -1521134295 + B4.GetHashCode(); -// return hashCode; -// } -// } -//} \ No newline at end of file diff --git a/RDMSharp/RDM/MACAddress.cs b/RDMSharp/RDM/MACAddress.cs deleted file mode 100644 index 131e3da..0000000 --- a/RDMSharp/RDM/MACAddress.cs +++ /dev/null @@ -1,141 +0,0 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using System.Text.RegularExpressions; - -//namespace RDMSharp -//{ -// public readonly struct MACAddress : IEquatable -// { -// public static readonly MACAddress Empty = new MACAddress(0, 0, 0, 0, 0, 0); - -// public readonly byte B1; -// public readonly byte B2; -// public readonly byte B3; -// public readonly byte B4; -// public readonly byte B5; -// public readonly byte B6; - -// public MACAddress(in byte b1, in byte b2, in byte b3, in byte b4, in byte b5, in byte b6) -// { -// this.B1 = b1; -// this.B2 = b2; -// this.B3 = b3; -// this.B4 = b4; -// this.B5 = b5; -// this.B6 = b6; -// } -// public MACAddress(params byte[] bytes) -// { -// if (bytes.Length != 6) -// throw new ArgumentOutOfRangeException(); - -// this.B1 = bytes[0]; -// this.B2 = bytes[1]; -// this.B3 = bytes[2]; -// this.B4 = bytes[3]; -// this.B5 = bytes[4]; -// this.B6 = bytes[5]; -// } -// public MACAddress(in string macAddress) : this() -// { -// Regex regex6g = new Regex(@"^([A-Fa-f0-9]{1,2})[\:\-\s]([A-Fa-f0-9]{1,2})[\:\-\s]([A-Fa-f0-9]{1,2})[\:\-\s]([A-Fa-f0-9]{1,2})[\:\-\s]([A-Fa-f0-9]{1,2})[\:\-\s]([A-Fa-f0-9]{1,2})$"); -// var match = regex6g.Match(macAddress); -// if (!match.Success) -// { -// Regex regex3g = new Regex(@"^([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})\.([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})\.([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})$"); -// match = regex3g.Match(macAddress); -// } -// if (!match.Success) -// { -// Regex regex0g = new Regex(@"^([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})$"); -// match = regex0g.Match(macAddress); -// } -// if (match.Success) -// { -// B1 = byte.Parse(match.Groups[1].Value, System.Globalization.NumberStyles.HexNumber); -// B2 = byte.Parse(match.Groups[2].Value, System.Globalization.NumberStyles.HexNumber); -// B3 = byte.Parse(match.Groups[3].Value, System.Globalization.NumberStyles.HexNumber); -// B4 = byte.Parse(match.Groups[4].Value, System.Globalization.NumberStyles.HexNumber); -// B5 = byte.Parse(match.Groups[5].Value, System.Globalization.NumberStyles.HexNumber); -// B6 = byte.Parse(match.Groups[6].Value, System.Globalization.NumberStyles.HexNumber); -// } -// else -// throw new FormatException($"The given string\"{macAddress}\" is not matchable to any known MAC-Address format"); -// } - -// public MACAddress(IEnumerable enumerable) -// { -// if (enumerable.Count() != 6) -// { -// throw new ArgumentOutOfRangeException("bytes should be an array with a length of 6"); -// } - -// B1 = enumerable.ElementAt(0); -// B2 = enumerable.ElementAt(1); -// B3 = enumerable.ElementAt(2); -// B4 = enumerable.ElementAt(3); -// B5 = enumerable.ElementAt(4); -// B6 = enumerable.ElementAt(5); -// } - - -// public override string ToString() -// { -// return $"{B1:X2}:{B2:X2}:{B3:X2}:{B4:X2}:{B5:X2}:{B6:X2}"; -// } -// public static implicit operator byte[](MACAddress mac) -// { -// return new byte[6] { mac.B1, mac.B2, mac.B3, mac.B4, mac.B5, mac.B6 }; -// } -// public static implicit operator MACAddress(byte[] bytes) -// { -// return new MACAddress(bytes); -// } - -// public static bool operator ==(MACAddress a, MACAddress b) -// { -// return a.Equals(b); -// } - -// public static bool operator !=(MACAddress a, MACAddress b) -// { -// return !a.Equals(b); -// } - -// public bool Equals(MACAddress other) -// { -// if (this.B1 != other.B1) -// return false; -// if (this.B2 != other.B2) -// return false; -// if (this.B3 != other.B3) -// return false; -// if (this.B4 != other.B4) -// return false; -// if (this.B5 != other.B5) -// return false; -// if (this.B6 != other.B6) -// return false; - -// return true; -// } - -// public override bool Equals(object obj) -// { -// return obj is MACAddress && Equals((MACAddress)obj); -// } - -// public override int GetHashCode() -// { -// int hashCode = -1756596593; -// hashCode = hashCode * -1521134295 + B1.GetHashCode(); -// hashCode = hashCode * -1521134295 + B2.GetHashCode(); -// hashCode = hashCode * -1521134295 + B3.GetHashCode(); -// hashCode = hashCode * -1521134295 + B4.GetHashCode(); -// hashCode = hashCode * -1521134295 + B5.GetHashCode(); -// hashCode = hashCode * -1521134295 + B6.GetHashCode(); -// return hashCode; -// } -// } -//} \ No newline at end of file diff --git a/RDMSharp/RDM/RDMUID.cs b/RDMSharp/RDM/RDMUID.cs deleted file mode 100644 index 63e5f8c..0000000 --- a/RDMSharp/RDM/RDMUID.cs +++ /dev/null @@ -1,189 +0,0 @@ -//using RDMSharp.ParameterWrapper; -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using System.Text.RegularExpressions; - -//namespace RDMSharp -//{ -// public readonly struct UID : IEquatable, IComparer, IComparable -// { -// public static readonly UID Empty = new UID((ushort)0, 0); -// public static readonly UID Broadcast = CreateManufacturerBroadcast(0xFFFF); - -// [System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "SYSLIB1045")] -// private static readonly Regex regex6g = new Regex(@"^([A-Fa-f0-9]{1,4})[\:\.\-\s]([A-Fa-f0-9]{1,8})$"); -// [System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "SYSLIB1045")] -// private static readonly Regex regex0g = new Regex(@"^([0-9A-Fa-f]{4})([0-9A-Fa-f]{8})$"); - -// public readonly ushort ManufacturerID; -// public EManufacturer Manufacturer => (EManufacturer)ManufacturerID; -// public readonly uint DeviceID; -// public RDMUID(in string uid) -// { -// var match = regex6g.Match(uid); -// if (!match.Success) -// match = regex0g.Match(uid); - -// if (match.Success) -// { -// ManufacturerID = Convert.ToUInt16(match.Groups[1].Value, 16); -// DeviceID = Convert.ToUInt32(match.Groups[2].Value, 16); -// } -// else -// throw new FormatException($"The given string\"{uid}\" is not matchable to any known RDM-UID format"); -// } -// public RDMUID(in EManufacturer manufacturer, in uint deviceId) : this((ushort)manufacturer, deviceId) -// { -// } -// public RDMUID(in ulong uid) : this((ushort)(uid >> 32), (uint)uid) -// { -// } -// public RDMUID(in ushort manId, in uint deviceId) -// { -// ManufacturerID = manId; -// DeviceID = deviceId; -// } - -// public static UID CreateManufacturerBroadcast(in ushort manId) -// { -// return new UID(manId, 0xFFFFFFFF); -// } - -// public IEnumerable ToBytes() -// { -// yield return (byte)(ManufacturerID >> 8); -// yield return (byte)(ManufacturerID); -// yield return (byte)(DeviceID >> 24); -// yield return (byte)(DeviceID >> 16); -// yield return (byte)(DeviceID >> 8); -// yield return (byte)(DeviceID); -// } - -// public override string ToString() -// { -// return String.Format("{0:X4}:{1:X8}", ManufacturerID, DeviceID); -// } - -// public static bool operator ==(in UID a, in UID b) -// { -// return a.Equals(b); -// } - -// public static bool operator !=(in UID a, in UID b) -// { -// return !a.Equals(b); -// } - -// public static bool operator >(in UID a, in UID b) -// { -// return a.ManufacturerID > b.ManufacturerID -// || (a.ManufacturerID == b.ManufacturerID -// && a.DeviceID > b.DeviceID); -// } - -// public static bool operator <(in UID a, in UID b) -// { -// return a.ManufacturerID < b.ManufacturerID -// || (a.ManufacturerID == b.ManufacturerID -// && a.DeviceID < b.DeviceID); -// } - -// public static bool operator >=(in UID a, in UID b) -// { -// return a > b -// || a == b; -// } - -// public static bool operator <=(in UID a, in UID b) -// { -// return a < b -// || a == b; -// } -// public static UID operator *(UID left, double right) -// { -// return new UID((ulong)(((ulong)left) * right)); -// } -// public static UID operator /(UID left, double right) -// { -// return new UID((ulong)(((ulong)left) / right)); -// } -// public static UID operator +(UID left, int right) -// { -// return new UID((ulong)left + (ulong)right); -// } -// public static UID operator -(UID left, int right) -// { -// return new UID((ulong)left - (ulong)right); -// } -// public static UID operator +(UID left, UID right) -// { -// return new UID((ulong)left + (ulong)right); -// } -// public static UID operator -(UID left, UID right) -// { -// return new UID((ulong)left - (ulong)right); -// } - -// public static explicit operator ulong(in UID a) -// { -// return ((ulong)a.ManufacturerID) << 32 -// | a.DeviceID; -// } -// public static explicit operator byte[](in UID a) -// { -// return a.ToBytes().ToArray(); -// } - -// public bool Equals(UID other) -// { -// return ManufacturerID == other.ManufacturerID -// && DeviceID == other.DeviceID; -// } - -// public override bool Equals(object obj) -// { -// return obj is UID uid -// && Equals(uid); -// } - -// public override int GetHashCode() -// { -// return ManufacturerID.GetHashCode() + 17 * DeviceID.GetHashCode(); -// } - - -// public int CompareTo(UID other) -// { -// return Compare(this, other); -// } -// public int Compare(UID x, UID y) -// { -// return ((ulong)x).CompareTo((ulong)y); -// } - -// public bool IsBroadcast -// { -// get -// { -// return DeviceID == 0xFFFFFFFF; -// } -// } -// public bool IsValidDeviceUID -// { -// get -// { -// if (this.Equals(Empty)) -// return false; - -// if (this.ManufacturerID == 0) -// return false; - -// if (this.IsBroadcast) -// return false; - -// return true; -// } -// } -// } -//} \ No newline at end of file diff --git a/RDMSharpTests/RDM/RDMUID_Test.cs b/RDMSharpTests/RDM/RDMUID_Test.cs deleted file mode 100644 index 0502259..0000000 --- a/RDMSharpTests/RDM/RDMUID_Test.cs +++ /dev/null @@ -1,172 +0,0 @@ -//using RDMSharp.ParameterWrapper; - -//namespace RDMSharpTests.RDM -//{ -// public class RDMUID_Test -// { -// [Test] -// public void RDMUID_ToString() -// { -// Assert.Multiple(() => -// { -// Assert.That(new UID(0xFFFF, 0xABCDEF98).ToString(), Is.EqualTo("FFFF:ABCDEF98")); -// Assert.That(new UID(0xA053, 0x00335612).ToString(), Is.EqualTo("A053:00335612")); -// Assert.That(new UID(0x0001, 0x12345678).ToString(), Is.EqualTo("0001:12345678")); -// Assert.That(new UID(1, 2).ToString(), Is.EqualTo("0001:00000002")); -// Assert.That(UID.Empty.ToString(), Is.EqualTo("0000:00000000")); -// }); -// } - -// [Test] -// public void RDMUID_FromString() -// { -// var uid = new UID(0x0123456789ab); -// Assert.Multiple(() => -// { -// Assert.That(new UID("0123:456789ab"), Is.EqualTo(uid)); -// Assert.That(new UID("0123.456789ab"), Is.EqualTo(uid)); -// Assert.That(new UID("0123-456789ab"), Is.EqualTo(uid)); -// Assert.That(new UID("0123456789ab"), Is.EqualTo(uid)); -// }); - -// Assert.Multiple(() => -// { -// Assert.Throws(typeof(FormatException), () => new UID("0123+456789ab")); -// Assert.Throws(typeof(FormatException), () => new UID("0123456789a")); -// Assert.Throws(typeof(FormatException), () => new UID("0123456789ag")); -// }); -// } - -// [Test] -// public void RDMUID_FromULong() -// { -// Assert.Multiple(() => -// { -// Assert.That(new UID(0xFFFF, 0xABCDEF98), Is.EqualTo(new UID(0xFFFFABCDEF98))); -// Assert.That(new UID(0xFF1F, 0xABCD0F98), Is.EqualTo(new UID(0xFF1FABCD0F98))); - -// Assert.That(new UID(EManufacturer.ESTA, 1), Is.EqualTo(new UID(0x0001))); -// }); -// } - -// [Test] -// public void RDMUID_CastToULong() -// { -// Assert.Multiple(() => -// { -// Assert.That((ulong)new UID(0xFFFF, 0xABCDEF98), Is.EqualTo(0xFFFFABCDEF98u)); -// Assert.That((ulong)new UID(0xFF1F, 0xABCD0F98), Is.EqualTo(0xFF1FABCD0F98u)); - -// Assert.That((ulong)new UID(EManufacturer.ESTA, 1), Is.EqualTo(0x0001u)); -// }); -// } - -// [Test] -// [System.Diagnostics.CodeAnalysis.SuppressMessage("Assertion", "NUnit2043:Use ComparisonConstraint for better assertion messages in case of failure", Justification = "")] -// [System.Diagnostics.CodeAnalysis.SuppressMessage("Assertion", "NUnit2010:Use EqualConstraint for better assertion messages in case of failure", Justification = "")] -// public void RDMUID_Equals() -// { -// Assert.Multiple(() => -// { -// Assert.That(new UID(), Is.EqualTo(UID.Empty)); -// Assert.That(new UID(EManufacturer.ESTA, 0), Is.EqualTo(UID.Empty)); -// Assert.That(new UID(EManufacturer.ESTA, 0), Is.Not.EqualTo(null)); -// Assert.That(new UID(EManufacturer.ESTA, 0), Is.Not.EqualTo(new UID(0xFFFF, 0xABCDEF98))); -// Assert.That(new UID(ushort.MaxValue, uint.MaxValue), Is.EqualTo(UID.Broadcast)); -// }); - -// var uid = new UID(0xFFFF, 0xABCDEF98); -// Assert.Multiple(() => -// { -// Assert.That((object)uid, Is.EqualTo((object)new UID(0xFFFF, 0xABCDEF98))); -// Assert.That(uid, Is.EqualTo((object)new UID(0xFFFF, 0xABCDEF98))); -// Assert.That(uid, Is.Not.EqualTo((object)new UID(0xFFEE, 0xABCDEF98))); -// Assert.That((object)uid, Is.Not.EqualTo((object)new UID(0xFFEE, 0xABCDEF98))); -// Assert.That(object.Equals(uid, new UID(0xFFFF, 0xABCDEF98)), Is.True); -// Assert.That(object.Equals(uid, new UID(0xFFFF, 0xABCDEF48)), Is.False); -// Assert.That(object.Equals(uid, null), Is.False); -// Assert.That(object.Equals(null, uid), Is.False); -// Assert.That(object.Equals(uid, 0xABCDEF98), Is.False); -// Assert.That((object)uid, Is.Not.EqualTo(new UID(0xF4FF, 0xABCD3F98))); -// Assert.That(uid, Is.Not.EqualTo((object)new UID(0xF4FF, 0xABCD3F98))); -// Assert.That((object)uid, Is.Not.EqualTo(null)); -// Assert.That(uid, Is.Not.EqualTo(null)); -// }); - -// Assert.Multiple(() => -// { -// Assert.That(uid == new UID(0xFFFF, 0xABCDEF98), Is.True); -// Assert.That(uid != new UID(0xFFFF, 0x4BCD3F98), Is.True); -// Assert.That(new UID(0xFFFF, 0x4BCD3F98) < new UID(0xFFFF, 0xABCD3F98), Is.True); -// Assert.That(new UID(0xFFFF, 0x4BCD3F98) > new UID(0xFFFF, 0xABCD3F98), Is.False); -// Assert.That(new UID(0xFFFF, 0x4BCD3F98) <= new UID(0xFFFF, 0xABCD3F98), Is.True); -// Assert.That(new UID(0xFFFF, 0x4BCD3F98) >= new UID(0xFFFF, 0xABCD3F98), Is.False); -// Assert.That(new UID(0xFFFF, 0xFBCD3F98) > new UID(0xFFFF, 0xABCD3F98), Is.True); -// Assert.That(new UID(0xFFFF, 0xFBCD3F98) < new UID(0xFFFF, 0xABCD3F98), Is.False); -// Assert.That(new UID(0xFFFF, 0xFBCD3F98) >= new UID(0xFFFF, 0xABCD3F98), Is.True); -// Assert.That(new UID(0xFFFF, 0xFBCD3F98) <= new UID(0xFFFF, 0xABCD3F98), Is.False); -// }); -// Assert.Multiple(() => -// { -// Assert.That(new UID(0x1FFF, 0x4BCD3F98) < new UID(0x2FFF, 0x4BCD3F98), Is.True); -// Assert.That(new UID(0x1FFF, 0x4BCD3F98) > new UID(0x2FFF, 0x4BCD3F98), Is.False); -// Assert.That(new UID(0x1FFF, 0x4BCD3F98) <= new UID(0x2FFF, 0x4BCD3F98), Is.True); -// Assert.That(new UID(0x1FFF, 0x4BCD3F98) >= new UID(0x2FFF, 0x4BCD3F98), Is.False); -// Assert.That(new UID(0x2FFF, 0x4BCD3F98) > new UID(0x1FFF, 0x4BCD3F98), Is.True); -// Assert.That(new UID(0x2FFF, 0x4BCD3F98) < new UID(0x1FFF, 0x4BCD3F98), Is.False); -// Assert.That(new UID(0x2FFF, 0x4BCD3F98) >= new UID(0x1FFF, 0x4BCD3F98), Is.True); -// Assert.That(new UID(0x2FFF, 0x4BCD3F98) <= new UID(0x1FFF, 0x4BCD3F98), Is.False); -// }); -// } -// [Test] -// public void RDMUID_Remaining() -// { -// Assert.Multiple(() => -// { -// Assert.That(UID.Empty.Manufacturer, Is.EqualTo(EManufacturer.ESTA)); -// Assert.That(new UID(EManufacturer.DMXControlProjects_eV, 1234567).Manufacturer, Is.EqualTo(EManufacturer.DMXControlProjects_eV)); - - -// Assert.That(UID.Empty.IsValidDeviceUID, Is.False); -// Assert.That(new UID(EManufacturer.ESTA, 122334).IsValidDeviceUID, Is.False); -// Assert.That(UID.Broadcast.IsValidDeviceUID, Is.False); -// Assert.That(new UID("0123:456789ab").IsValidDeviceUID, Is.True); - -// }); - -// Assert.That((byte[])new UID(EManufacturer.ESTA, 0x12345678), Is.EqualTo(new byte[] { 0x00, 0x00, 0x12, 0x34, 0x56, 0x78 })); - - -// List list = new List(); -// list.Add(new UID(0x1FFF, 0x00000031)); -// list.Add(new UID(0x2FFF, 0x00000022)); -// list.Add(new UID(0x3FFF, 0x00000013)); -// list.Add(new UID(0x4FFF, 0x00000001)); -// list.Add(new UID(0x4FFF, 0x00000002)); -// list.Add(new UID(0x4FFF, 0x00000003)); -// list.Add(new UID(0x0FFF, 0x00000001)); -// list.Add(new UID(0x0FFF, 0x00000002)); -// list.Add(new UID(0x0FFF, 0x00000003)); - -// var orderd = list.OrderBy(uid => uid).ToArray(); - -// Assert.Multiple(() => -// { -// Assert.That(orderd[0], Is.EqualTo(new UID(0x0FFF, 0x00000001))); -// Assert.That(orderd[1], Is.EqualTo(new UID(0x0FFF, 0x00000002))); -// Assert.That(orderd[2], Is.EqualTo(new UID(0x0FFF, 0x00000003))); -// Assert.That(orderd[3], Is.EqualTo(new UID(0x1FFF, 0x00000031))); -// Assert.That(orderd[4], Is.EqualTo(new UID(0x2FFF, 0x00000022))); -// Assert.That(orderd[5], Is.EqualTo(new UID(0x3FFF, 0x00000013))); -// Assert.That(orderd[6], Is.EqualTo(new UID(0x4FFF, 0x00000001))); -// Assert.That(orderd[7], Is.EqualTo(new UID(0x4FFF, 0x00000002))); -// Assert.That(orderd[8], Is.EqualTo(new UID(0x4FFF, 0x00000003))); - - -// Assert.That(new UID(10, 1) * 2, Is.EqualTo(new UID(20, 2))); -// Assert.That(new UID(10, 1) * 3, Is.EqualTo(new UID(30, 3))); -// Assert.That(new UID(10, 1) * 4, Is.EqualTo(new UID(40, 4))); -// }); -// } -// } -//}