Inheritance: ManagerBase
Beispiel #1
0
        public ApplicationManager(
            ITransportResource transportResource,
            IDtoSerializer dtoSerializer,
            IStorage storage,
            IDeviceInfo deviceInfo)
        {
            //we don't have autofac so let's build the tree
            var commandParser     = new CommandParser();
            var connectionManager = new ConnectionManager(transportResource, new CommandBuffer(commandParser), commandParser, new RequestsHandler(), dtoSerializer);

            AccountManager = new AccountManager(storage, deviceInfo, connectionManager,
                                                new ProfileServiceProxy(connectionManager),
                                                new RegistrationServiceProxy(connectionManager),
                                                new AuthenticationServiceProxy(connectionManager));
            ChatManager       = new ChatManager(connectionManager, new ChatServiceProxy(connectionManager), AccountManager);
            FriendsManager    = new FriendsManager(connectionManager, new FriendsServiceProxy(connectionManager));
            SearchManager     = new SearchManager(connectionManager, new UsersSearchServiceProxy(connectionManager));
            ConnectionManager = connectionManager;
        }
 public ApplicationManager(
     ITransportResource transportResource,
     IDtoSerializer dtoSerializer,
     IStorage storage,
     IDeviceInfo deviceInfo)
 {
     //we don't have autofac so let's build the tree 
     var commandParser = new CommandParser();
     var connectionManager = new ConnectionManager(transportResource, new CommandBuffer(commandParser), commandParser, new RequestsHandler(), dtoSerializer);
     
     AccountManager = new AccountManager(storage, deviceInfo, connectionManager, 
         new ProfileServiceProxy(connectionManager), 
         new RegistrationServiceProxy(connectionManager), 
         new AuthenticationServiceProxy(connectionManager));
     ChatManager = new ChatManager(connectionManager, new ChatServiceProxy(connectionManager), AccountManager);
     FriendsManager = new FriendsManager(connectionManager, new FriendsServiceProxy(connectionManager));
     SearchManager = new SearchManager(connectionManager, new UsersSearchServiceProxy(connectionManager));
     ConnectionManager = connectionManager;
 }