public async Task Reload() { var error = ""; var handler = HandlersFactory.GetProfilerHandler(SettingService, LoggerService); handler.Start(LOG_TAG, "Reload", GetActorProperties()); try { // Given the actor id (which is the event id), re-load the event stats TicketEventStats stats = await DataStoreService.GetEventStats(this.Id.GetStringId()); var state = new EventActorState(stats); // Make sure the state is saved await SetEntityStateAsync(state); } catch (Exception ex) { error = ex.Message; } finally { handler.Stop(error); if (!string.IsNullOrEmpty(error)) { this.HealthReporterService.SendReportForService(HealthState.Error, GetHealthErrorMessage("GetStats", error)); } } }
public Engine( IStrategy strategy, DataStoreService dataStoreService) { _dataStoreService = dataStoreService; _strategy = strategy; Console.WriteLine(_strategy.GetType().Name); }
public AccountServiceShould(ITestOutputHelper output) { // Helper service objects _ds = new DataStoreService(); _as = new AccountService(_ds); // Helper objects _output = output; _output.WriteLine("Creating account service..."); }
public PaymentServiceShould(ITestOutputHelper output) { // Helper service objects _ds = new DataStoreService(); _as = new AccountService(_ds); _ps = new PaymentService(_as); // Helper objects _req = new MakePaymentRequest(); _output = output; _output.WriteLine("Creating payment service..."); }
public override async void OnNavigatedTo(INavigationParameters parameters) { base.OnNavigatedTo(parameters); IsBusy = true; try { var port = await DataStoreService.GetPortAsync(); TokenHandlerModel.Port = port; } catch { await NavigationService.NavigateAsync("../"); await PageDialogService.DisplayAlertAsync("Hiba", "Hálózati hiba", "OK"); } IsBusy = false; }
private async Task ExecuteLogout() { IsBusy = true; try { var result = await DataStoreService.LogoutAsync(); if (result) { await NavigationService.NavigateAsync("../"); } } catch (NetworkException e) { await PageDialogService.DisplayAlertAsync("Hiba", e.Message.ToString(), "OK"); } catch { await PageDialogService.DisplayAlertAsync("Hiba", "Hálózati hiba", "OK"); } IsBusy = false; }
public void PerformSearchRealtime(string newTextValue) { SearchResults = DataStoreService.GetSearchResults(newTextValue); }
public void init_servers() { string portString = Utilities.getPortFromUrl(url); string hostName = Utilities.getHostNameFromUrl(url); int port; int.TryParse(portString, out port); Server server = new Server { Services = { ServerCommunicationService.BindService(new ServerCommunicationLogic(this)), DataStoreService.BindService(new DataStoreServiceImpl(this)) }, Ports = { new ServerPort(hostName, port, ServerCredentials.Insecure) } }; server.Start(); }
private async Task LoadWordsCommandExecute() { await DataStoreService.ReadWords(); }
public void Setup() { _dataStoreService = new DataStoreService(); }
void Handle_Clicked(object sender, System.EventArgs e) { using (var ds = new DataStoreService()){ itemList.ItemsSource = ds.GetProducts(); } }
public DataStoreServiceShould() { _ds = new DataStoreService(); }
public ExhibitVisitedController(EventStoreService eventStore, InMemoryCache cache, DataStoreService dataStoreService, CacheDatabaseManager db) : base(eventStore, cache) { _index = cache.Index <ExhibitsVisitedIndex>(); _dataStoreService = dataStoreService; _db = db; }