You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
522 B
27 lines
522 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Bridge
|
|
{
|
|
class Client
|
|
{
|
|
public void HowToUse()
|
|
{
|
|
INetworkAbstraction net = new NetworkAbstraction();
|
|
net.Network = GetNetwork();
|
|
net.SendReceive(Encoding.UTF8.GetBytes("DATA 🔥"));
|
|
}
|
|
|
|
private INetworkImplementor GetNetwork()
|
|
{
|
|
Random rnd = new Random();
|
|
if (rnd.Next() % 2 == 0)
|
|
return new WiFiImplementor();
|
|
else
|
|
return new _4GImplementor();
|
|
}
|
|
}
|
|
}
|
|
|