<commit_before>using System;
using WalletWasabi.Helpers;
using WalletWasabi.Tor.Socks5.Models.Bases;
using WalletWasabi.Tor.Socks5.Models.Fields.ByteArrayFields;
using WalletWasabi.Tor.Socks5.Models.Fields.OctetFields;

namespace WalletWasabi.Tor.Socks5.Models.Messages
{
	public class TorSocks5Request : ByteArraySerializableBase
	{
		public TorSocks5Request(byte[] bytes)
		{
			Guard.NotNullOrEmpty(nameof(bytes), bytes);
			Guard.MinimumAndNotNull($"{nameof(bytes)}.{nameof(bytes.Length)}", bytes.Length, 6);

			Ver = new VerField(bytes[0]);
			Cmd = new CmdField(bytes[1]);
			Rsv = new RsvField(bytes[2]);
			Atyp = new AtypField(bytes[3]);
			DstAddr = new AddrField(bytes[4..^2]);
			DstPort = new PortField(bytes[^2..]);
		}

		public TorSocks5Request(CmdField cmd, AddrField dstAddr, PortField dstPort)
		{
			Cmd = Guard.NotNull(nameof(cmd), cmd);
			DstAddr = Guard.NotNull(nameof(dstAddr), dstAddr);
			DstPort = Guard.NotNull(nameof(dstPort), dstPort);
			Ver = VerField.Socks5;
			Rsv = RsvField.X00;
			Atyp = dstAddr.Atyp;
		}

		#region PropertiesAndMembers

		public VerField Ver { get; }

		public CmdField Cmd { get; }

		public RsvField Rsv { get; }

		public AtypField Atyp { get; }

		public AddrField DstAddr { get; }

		public PortField DstPort { get; }

		#endregion PropertiesAndMembers

		#region Serialization

		public override byte[] ToBytes() => ByteHelpers.Combine(new byte[] { Ver.ToByte(), Cmd.ToByte(), Rsv.ToByte(), Atyp.ToByte() }, DstAddr.ToBytes(), DstPort.ToBytes());

		#endregion Serialization
	}
}
<commit_msg>Remove unused constructor from TorSocks5Request.<commit_after>using System;
using WalletWasabi.Helpers;
using WalletWasabi.Tor.Socks5.Models.Bases;
using WalletWasabi.Tor.Socks5.Models.Fields.ByteArrayFields;
using WalletWasabi.Tor.Socks5.Models.Fields.OctetFields;

namespace WalletWasabi.Tor.Socks5.Models.Messages
{
	public class TorSocks5Request : ByteArraySerializableBase
	{
		public TorSocks5Request(CmdField cmd, AddrField dstAddr, PortField dstPort)
		{
			Cmd = Guard.NotNull(nameof(cmd), cmd);
			DstAddr = Guard.NotNull(nameof(dstAddr), dstAddr);
			DstPort = Guard.NotNull(nameof(dstPort), dstPort);
			Ver = VerField.Socks5;
			Rsv = RsvField.X00;
			Atyp = dstAddr.Atyp;
		}

		public VerField Ver { get; }

		public CmdField Cmd { get; }

		public RsvField Rsv { get; }

		public AtypField Atyp { get; }

		public AddrField DstAddr { get; }

		public PortField DstPort { get; }

		public override byte[] ToBytes() => ByteHelpers.Combine(new byte[] { Ver.ToByte(), Cmd.ToByte(), Rsv.ToByte(), Atyp.ToByte() }, DstAddr.ToBytes(), DstPort.ToBytes());
	}
}

{'fraction_non_alphanumeric': 0.12647619047619046, 'fraction_numerical': 0.010666666666666666, 'mean_word_length': 4.623126338329764, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '414809', 'n_tokens_mistral': 1016, 'n_tokens_neox': 929, 'n_words': 186}