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(); } } }