Exemple #1
0
 public ClientManager(IServer server, ICommandQueueService commandQueueService, ICommandSerializer commandSerializer, IStreamIOService streamIoService)
 {
     _server = server;
     _commandQueueService = commandQueueService;
     _commandSerializer = commandSerializer;
     _streamIoService = streamIoService;
 }
Exemple #2
0
        public virtual void Prepare()
        {
            ServerInformation  = new ServerInformation( "OSTBLOCK COMMAND SERVER", "OSTBLOCK COMMAND SERVER", new Version(0,1,0,0))
                                     {ServerState = EServerState.Prepareing};

            _commandSerializer = new CommandSerializer();
            CommandFactory = new ServerCommandFactory();
            _streamIOService = new StreamIOService();
            CommandQueueService = new CommandQueueService();
            ServerCommandHandler = new ServerCommandHandler(this);

            ClientManager = new ClientManager(this,CommandQueueService, _commandSerializer, _streamIOService);

            CommandQueueService.OnCommandPending += CommandQueueService_OnCommandPending;

            ServerInformation.ServerState = EServerState.Prepared;
            if(OnPrepared != null)
                OnPrepared.Invoke(this,new EventArgs());
        }