Exemple #1
0
        /// <summary>
        /// Called to update the detail via the event
        /// </summary>
        public async Task RefreshDetail(string name)
        {
            await Task.Run(async() =>
            {
                var result = string.Empty;

                try
                {
                    result = await client.GetVariableValueAsync(name);

                    RefreshDetailTextView?.Invoke(result);
                }
                catch (Exception)
                {
                    throw;
                }
            });
        }
Exemple #2
0
        /// <summary>
        /// Called to update the detail via the event
        /// </summary>
        public async Task RefreshDetail(NameContainer data)
        {
            await Task.Run(() =>
            {
                var result = string.Empty;

                try
                {
                    using (var service = GetService())
                    {
                        result = service.GetVariableValue(data.Name);
                    }

                    RefreshDetailTextView?.Invoke(result);
                }
                catch (Exception)
                {
                    throw;
                }
            });
        }