public Server(string filename) { _servers = new List<ServerMetadata>(); ReadConfigurationFile(filename); action = new ServerAction(this._username); lookup = new ServerLookup(this._username, action, _servers); facade = new ServerFacade(this._username, _port, action, lookup, _servers); }
public Server(string filename) { _servers = new List <ServerMetadata>(); ReadConfigurationFile(filename); action = new ServerAction(this._username); lookup = new ServerLookup(this._username, action, _servers); facade = new ServerFacade(this._username, _port, action, lookup, _servers); }
public Server(string username, int port, string path, string configFile) { _username = username; _port = port; _path = path; _configFile = _path + configFile; _servers = new List<ServerMetadata>(); ReadConfigurationFile(); action = new ServerAction(_username); lookup = new ServerLookup(this._username, action, _servers); facade = new ServerFacade(this._username, _port, action, lookup, _servers); }
public Server(string username, int port, string path, string configFile) { _username = username; _port = port; _path = path; _configFile = _path + configFile; _servers = new List <ServerMetadata>(); ReadConfigurationFile(); action = new ServerAction(_username); lookup = new ServerLookup(this._username, action, _servers); facade = new ServerFacade(this._username, _port, action, lookup, _servers); }
static void Main(string[] args) { ClientFacade clientFacade = new ClientFacade(); ServerFacade serverFacade = new ServerFacade(clientFacade); IServerController serverController = new ServerController(serverFacade); IServer server = new ServerSocket(serverController); serverFacade.Init(serverController); clientFacade.Init(serverController); Task.Run(() => server.Start()); while (Console.ReadLine().ToLower() != "stop") { ; } }