using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Maser.Feanor.Model;
using System.Net;
using Maser.Feanor.Biz;

namespace Maser.Feanor.Server
{
    public static class Servers
    {
        public static Server GetInstanceByChamber(Chamber Chamber)
        {
            Server server;
            // Determine the server
            switch (Chamber.ServerType)
            {
                case ServerType.Yun020208:
                    server = new Yun020208(Chamber);
                    break;
                case ServerType.RaspberryPI:
                    server = new RaspberryPI(Chamber);
                    break;
                case ServerType.RaspberryDELTA:
                    server = new RaspberryDELTA(Chamber);
                    break;
                case ServerType.RaspberryHAMEG:
                    server = new RaspberryHAMEG(Chamber);
                    break;

                default:
                    throw new Exception("ServerType unknown!");
            }
            return server;
        }
    }
}
