public WurmServer Create(WurmServerInfo wurmServerInfo) { if (createdServers.Contains(wurmServerInfo.Name)) { throw new InvalidOperationException("this factory has already created Server for name " + wurmServerInfo.Name); } var server = new WurmServer(wurmServerInfo, jobRunner); createdServers.Add(wurmServerInfo.Name); return server; }
public WurmServer Create(WurmServerInfo wurmServerInfo) { if (createdServers.Contains(wurmServerInfo.ServerName)) { throw new InvalidOperationException("this factory has already created Server for name " + wurmServerInfo.ServerName); } var server = new WurmServer(wurmServerInfo, jobRunner); createdServers.Add(wurmServerInfo.ServerName); return(server); }