public async Task <IValueProvider> BindAsync(object value, ValueBindingContext context)
        {
            ConversionResult <ServiceBusEntity> conversionResult = await _converter.TryConvertAsync(value, context.CancellationToken).ConfigureAwait(false);

            if (!conversionResult.Succeeded)
            {
                throw new InvalidOperationException("Unable to convert value to ServiceBusEntity.");
            }

            return(await BindAsync(conversionResult.Result, context).ConfigureAwait(false));
        }
        public async Task <IValueProvider> BindAsync(object value, ValueBindingContext context)
        {
            ConversionResult <IStorageBlob> conversionResult =
                await _converter.TryConvertAsync(value, context.CancellationToken);

            if (!conversionResult.Succeeded)
            {
                throw new InvalidOperationException("Unable to convert value to ICloudBlob.");
            }

            return(await BindBlobAsync(conversionResult.Result, context));
        }
        public async Task <ITriggerData> BindAsync(object value, ValueBindingContext context)
        {
            ConversionResult <ICloudBlob> conversionResult = await _converter.TryConvertAsync(value, context.CancellationToken);

            if (!conversionResult.Succeeded)
            {
                throw new InvalidOperationException("Unable to convert trigger to IStorageBlob.");
            }

            IReadOnlyDictionary <string, object> bindingData = CreateBindingData(conversionResult.Result);

            return(new TriggerData(bindingData));
        }
        public async Task <ITriggerData> BindAsync(object value, ValueBindingContext context)
        {
            ConversionResult <BlobBaseClient> conversionResult = await _converter.TryConvertAsync(value, context.CancellationToken).ConfigureAwait(false);

            if (!conversionResult.Succeeded)
            {
                throw new InvalidOperationException("Unable to convert trigger to BlobBaseClient.");
            }

            BlobBaseClient blobClient     = conversionResult.Result;
            BlobProperties blobProperties = await blobClient.FetchPropertiesOrNullIfNotExistAsync(cancellationToken : context.CancellationToken).ConfigureAwait(false);

            IReadOnlyDictionary <string, object> bindingData = CreateBindingData(blobClient, blobProperties);

            return(new TriggerData(bindingData));
        }