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

GetCharacteristicFromBundleAsync() protected method

protected GetCharacteristicFromBundleAsync ( IMvxBundle parameters ) : Task
parameters IMvxBundle
return Task
        protected async Task<ICharacteristic> GetCharacteristicFromBundleAsync(IMvxBundle parameters)
        {
            var service = await GetServiceFromBundleAsync(parameters);
            if (service == null || !parameters.Data.ContainsKey(CharacteristicIdKey))
            {
                return null;
            }

            var characteristicId = parameters.Data[CharacteristicIdKey];
            return await service.GetCharacteristicAsync(Guid.Parse(characteristicId));
        }