예제 #1
0
        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;
        }
예제 #2
0
        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);
        }