Beispiel #1
0
        public IServerType GetServerType(int serverType)
        {
            IServerType server = null;

            switch (serverType)
            {
            case 1:
                server = LoginServer;
                break;

            case 2:
                server = ChatServer;
                break;

            case 3:
                server = GameServer;
                break;

            case 0:
            default:
                server = ProxyServer;
                break;
            }

            return(server);
        }
Beispiel #2
0
        public UploadService(IOptions <ServerConfig> config, IAmazonS3 s3Client)
        {
            _config     = config.Value;
            _serverType = new ServerTypeFactory().Create(_config);

            // Can't adding IAmazonS3 by factory pattern,
            // created special function and refrences the Dependency Injection
            if (_config.ServerType == ServerConfig.AWS)
            {
                (_serverType as AWSBucketServer).Register(s3Client);
            }
        }
 public HandleServerRegistration(ILogger log, IServerType serverType, ServerConfiguration serverConfiguration)
 {
     Log                  = log;
     _serverType          = serverType;
     _serverConfiguration = serverConfiguration;
 }
Beispiel #4
0
 public HandleServerRegistration(ILogger log, IServerType serverType)
 {
     Log         = log;
     _serverType = serverType;
 }