BLE.Client.ViewModels.BaseViewModel.GetDescriptorFromBundleAsync C# (CSharp) Method

GetDescriptorFromBundleAsync() protected method

protected GetDescriptorFromBundleAsync ( IMvxBundle parameters ) : Task
parameters IMvxBundle
return Task
        protected async Task<IDescriptor> GetDescriptorFromBundleAsync(IMvxBundle parameters)
        {
            var characteristic = await GetCharacteristicFromBundleAsync(parameters);
            if (characteristic == null || !parameters.Data.ContainsKey(DescriptorIdKey))
            {
                return null;
            }

            var descriptorId = parameters.Data[DescriptorIdKey];
            return await characteristic.GetDescriptorAsync(Guid.Parse(descriptorId));
        }
    }