예제 #1
0
        /// <summary>
        /// Main method for instantiating the factories and starting the server
        /// </summary>
        static async Task Main(string[] args)
        {
            RepositoriesFactory     repoFactory   = new RepositoriesFactory();
            SocketControllerFactory socketFactory = new SocketControllerFactory(repoFactory);
            ServerSocket            serverSocket  = new ServerSocket(socketFactory);

            //await SeedDb();
            serverSocket.Start();
        }
예제 #2
0
 /// <summary>
 /// One-argument constructor which initializes the sockets controllers factory, with instances responsible for handling client requests
 /// </summary>
 /// <param name="socketFactory">the sockets controller factory</param>
 public ServerSocket(SocketControllerFactory socketFactory)
 {
     this.socketFactory = socketFactory;
 }