public Task <IValueProvider> BindAsync(IStorageQueue value, ValueBindingContext context)
            {
                IConverter <TItem, IStorageQueueMessage> converter = _converterFactory.Create(value,
                                                                                              context.FunctionInstanceId);
                IAsyncCollector <TItem> collector = new QueueAsyncCollector <TItem>(value, converter);
                IValueProvider          provider  = new CollectorValueProvider(value, collector, typeof(IAsyncCollector <TItem>));

                return(Task.FromResult(provider));
            }
示例#2
0
            public Task <IValueProvider> BindAsync(IStorageQueue value, ValueBindingContext context)
            {
                if (context == null)
                {
                    throw new ArgumentNullException("context");
                }

                IConverter <TItem, IStorageQueueMessage> converter = _converterFactory.Create(value,
                                                                                              context.FunctionInstanceId);
                ICollector <TItem> collector = new QueueCollector <TItem>(value, converter);
                IValueProvider     provider  = new CollectorValueProvider(value, collector, typeof(ICollector <TItem>));

                return(Task.FromResult(provider));
            }