public LoginPresenter(ILoginView view, IServerCommunicator serverCommunicator, IMobileConfigurationReader mobileConfigurationReader, INavigationManager navigationManager, IFileSystem fileSystem, IVaultRepositoryFactory vaultRepositoryFactory, ISynchronizer synchronizer, IAlertDisplayer alertDisplayer, ISecureStringConverter secureStringConverter, IApplicationContext applicationContext) { this.View = view; this.MobileConfigurationReader = mobileConfigurationReader; this.NavigationManager = navigationManager; this.FileSystem = fileSystem; this.Synchronizer = synchronizer; this.VaultRepositoryFactory = vaultRepositoryFactory; this.AlertDisplayer = alertDisplayer; this.SecureStringConverter = secureStringConverter; this.ApplicationContext = applicationContext; var config = MobileConfigurationReader.GetConfiguration(); this.View.SyncButtonVisible = config.ApplicationMode == ApplicationMode.Client; var repository = VaultRepositoryFactory.CreateInstance(); var vaults = repository.GetAllVaultNames(); this.View.VaultNames = vaults; this.View.SelectedVaultName = vaults.FirstOrDefault(); this.View.Login += OnLogin; this.View.NavigateToConfiguration += OnNavigateToConfiguration; this.View.Sync += OnSync; this.Synchronizer.StatusUpdate += (message) => this.View.ActivityIndicatorText = message; this.View.Initialize += OnInitialize; }
public NewHostViewModel(IMemoryManager memoryManager = null) { host = new Host(); dataHandler = new ServerDataHandler(); Com = new ServerCommunicator(dataHandler); SuccesTxt = ""; _memoryManager = memoryManager ?? MemoryManager.GetInstance(); }
public Synchronizer(IServerCommunicator serverCommunicator, IVaultRepositoryFactory vaultRepositoryFactory, IFileSystem fileSystem, ISyncContext syncContext) { this.ServerCommunicator = serverCommunicator; this.VaultRepositoryFactory = vaultRepositoryFactory; this.FileSystem = fileSystem; this.SyncContext = syncContext; }
public EventSeeImagesViewModel(EventModel loadEvent) { com = new ServerCommunicator(); Items = new ObservableCollection <TestImage>(); Images = new List <string>(); _memoryManager = MemoryManager.GetInstance(); _event = loadEvent; ReloadData(); }
public void Setup() { mockClient = Substitute.For <HttpClient>(); mockClientHandler = Substitute.For <HttpClientHandler>(); mockCookieContainer = Substitute.For <CookieContainer>(); mockErrorcodeHandler = Substitute.For <IServerErrorcodeHandler>(); mockDataHandler = Substitute.For <IServerDataHandler>(); uut = new ServerCommunicator(mockClient, mockClientHandler, mockCookieContainer, mockDataHandler, mockErrorcodeHandler ); }
public FrontEndServer(IServerCommunicator communicator, ILogger logger, int sleepTimer, IServerDOManager dOManager) { this.communicator = communicator; this.logger = logger; this.sleepTimer = sleepTimer; this.dOManager = dOManager; // Create root DObject // TODO - DObject should have OnGetEvent property. DObject newObject = new DObject(dOManager); newObject.OnGetEvent += RootDObjectHandler; rootDObject = newObject; dOManager.RegisterObject(newObject); }
/// <summary> /// Initializes a new instance of the <see cref="ZeusOperations"/> class. /// </summary> /// <param name="communicator"> /// The communicator. /// </param> public ZeusOperations(IServerCommunicator communicator) { this.Communicator = communicator; }
public ServerActor(DObject dObject, ILogger logger, IServerCommunicator communicator) { this.dObject = dObject; this.logger = logger; this.communicator = communicator; handlers = new EventHandlersOnServerActor(); this.dObject.OnGetEvent += OnGetEvent; handlers.ChangeColorRequest += Handler_OnChangeColorRequest; }