Пример #1
0
        /// <summary>
        /// Reads single network tree.
        /// </summary>
        /// <param name="uuid"></param>
        /// <returns></returns>
        public async Task <(NetworkTree Data, DataStatus Status)> DataReadNetworkTreeAsync(Guid uuid)
        {
            var(tree, status) = await ReadNetworkTreeAsync(uuid);

            if (status.IsGood)
            {
                Data.UpdateNetworkTrees(tree);
            }
            else
            {
                _logger?.LogError($"Error code {status.Code} in reading network tree: {status.Explanation}.");
            }

            Data.Status = status;
            return(tree, Data.Status);
        }