public ServiceContainer(SynchronizationContext synchronizationContext) { var tokenStore = new TokenStore(); var uri = new RestServiceUriFactory(); var loginPersiter = new TokenPersister(); AuthenticationService = new AuthenticationService(tokenStore, uri, loginPersiter, synchronizationContext); RoomService = new RoomService(tokenStore, uri); GlobalRoomService = new GlobalRoomsService(tokenStore, uri, synchronizationContext); UserStateService = new UserStateService(tokenStore, uri, new AgentTypeProvider(TimeWarpAgent.WindowsTrayClient)); UserMessageService = new UserMessageService(tokenStore, uri, synchronizationContext); }
public App() { this.Startup += this.Application_Startup; this.Exit += this.Application_Exit; this.UnhandledException += this.Application_UnhandledException; _tokenStore = new TokenStore(); _restServiceUriFactory = new RestServiceUriFactory(); _authenticationService = new AuthenticationService(_tokenStore, _restServiceUriFactory, new NullTokenPersiter(), SynchronizationContext.Current); _roomService = new RoomService(_tokenStore, _restServiceUriFactory); _userMessageService = new UserMessageService(_tokenStore, _restServiceUriFactory, SynchronizationContext.Current); _authenticationService.LoginCompleted += _authenticationService_LoginCompleted; InitializeComponent(); }