/// <summary>
        /// This method uses similar logic as populating resource descriptors.
        /// Refers to <seealso cref="PopulateResourceTypes"/>.
        /// </summary>
        private async Task PopulateLogIds()
        {
            if (ResourceTypeSelector.SelectedMenuItem == null)
            {
                Debug.WriteLine("Code bug, _selectedMenuItem should not be null.");
                return;
            }

            var            item = ResourceTypeSelector.SelectedMenuItem as ResourceValueItemViewModel;
            var            keys = item == null ? null : new List <string>(new string[] { item.ResourceValue });
            IList <string> logIdRequestResult = await _dataSource.Value.ListProjectLogNamesAsync(ResourceTypeSelector.SelectedTypeNmae, keys);

            LogIdList = new LogIdsList(logIdRequestResult);
            LogIdList.PropertyChanged += OnPropertyChanged;
            await ReloadAsync();
        }
Beispiel #2
0
        /// <summary>
        /// This method uses similar logic as populating resource descriptors.
        /// Refers to <seealso cref="PopulateResourceTypesAsync"/>.
        /// </summary>
        private async Task PopulateLogIdsAsync()
        {
            if (ResourceTypeSelector.SelectedMenuItem == null)
            {
                Debug.WriteLine("Code bug, _selectedMenuItem should not be null.");
                return;
            }

            CancellationTokenSource = null;
            var           item = ResourceTypeSelector.SelectedMenuItem as ResourceValueItemViewModel;
            List <string> keys = item == null ? null : new List <string> {
                item.ResourceValue
            };
            IList <string> logIdRequestResult =
                await DataSource.ListProjectLogNamesAsync(ResourceTypeSelector.SelectedTypeNmae, keys);

            LogIdList = new LogIdsList(logIdRequestResult);
            LogIdList.PropertyChanged += (sender, args) => AsyncAction = new AsyncProperty(ReloadAsync());
        }