public Master(Dictionary <int, string> slaves, UserStorageService service) { if (ReferenceEquals(service, null)) { service = new UserStorageService(); } this.service = service; this.slaves = slaves; }
public Slave(int port, string ip, UserStorageService service) { if (ReferenceEquals(service, null)) { service = new UserStorageService(); } this.service = service; this.IPAddr = ip; this.Port = port; count++; Task.Run(() => this.CreateServer()); }