public Task <IValueProvider> BindAsync(ServiceBusEntity value, ValueBindingContext context)
            {
                IAsyncCollector <TItem> collector = new MessageSenderAsyncCollector <TItem>(value, _converter,
                                                                                            context.FunctionInstanceId);
                IValueProvider provider = new CollectorValueProvider(value, collector, typeof(IAsyncCollector <TItem>));

                return(Task.FromResult(provider));
            }
Ejemplo n.º 2
0
            public Task <IValueProvider> BindAsync(ServiceBusEntity value, ValueBindingContext context)
            {
                if (context == null)
                {
                    throw new ArgumentNullException(nameof(context));
                }

                ICollector <TItem> collector = new MessageSenderCollector <TItem>(value, _converter,
                                                                                  context.FunctionInstanceId);
                IValueProvider provider = new CollectorValueProvider(value, collector, typeof(ICollector <TItem>));

                return(Task.FromResult(provider));
            }