protected override async Task LoadDataAsync()
        {
            try
            {
                var authorizationSession = AccountService.CurrentAuthorizationSession;

                if (authorizationSession != null)
                {
                    var dataAccess = ServiceAdapter.Create <Contracts.Persistence.Configuration.IIdentitySetting>(authorizationSession.Token);
                    var items      = await dataAccess.QueryAllAsync(CreatePredicate(AccountService)).ConfigureAwait(false);

                    storedEntries = new Dictionary <string, string>();
                    foreach (var item in items)
                    {
                        storedEntries.Add(item.Key, item.Value);
                        if (UnstoredEntries.ContainsKey(item.Key))
                        {
                            UnstoredEntries.Remove(item.Key);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine($"Error in {MethodBase.GetCurrentMethod().Name}: {ex.Message}");
            }
        }
        partial void BeforeFirstRender(ref bool handled)
        {
            handled = true;

            var adapterAccess = ServiceAdapter.Create <TContract>();

            DataGridHandler          = new SettingDataGridHandler(this, new SettingAdapterAccess(adapterAccess, Settings));
            DataGridHandler.PageSize = Settings.GetValueTyped <int>($"{ComponentName}.{nameof(DataGridHandler.PageSize)}", DataGridHandler.PageSize);
        }
Пример #3
0
 public void RemoveService(Service service)
 {
     _client.removeService(ServiceAdapter.Create(service));
 }
Пример #4
0
 public void AddService(Service service)
 {
     _client.addService(ServiceAdapter.Create(service));
 }