✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
public class FirewallSocketProxy : ISocket
{
public FirewallSocketProxy(ISocket s,string[] block)=>(_s,_b)=(s,block);
private readonly ISocket _s; private readonly string[] _b;
public void Connect(string host,int port)
{
if(_b.Contains(host)) throw new SecurityException();
_s.Connect(host,port);
}
}
Правильне твердження: