public TableRequestChannelFactory(BindingContext context, TableTransportBindingElement element) : base(context.Binding) { this.encoderFactory = context.BindingParameters.Remove <MessageEncodingBindingElement>().CreateMessageEncoderFactory(); this.bufferManager = BufferManager.CreateBufferManager(element.MaxBufferPoolSize, int.MaxValue); this.targetPartitionKey = element.TargetPartitionKey; this.storageAccount = CloudStorageAccount.Parse(element.ConnectionString); }
public TableReplyChannelListener(BindingContext context, TableTransportBindingElement element) : base(context.Binding) { this.encoderFactory = context.BindingParameters.Remove <MessageEncodingBindingElement>().CreateMessageEncoderFactory(); this.bufferManager = BufferManager.CreateBufferManager(element.MaxBufferPoolSize, int.MaxValue); this.targetPartitionKey = element.TargetPartitionKey; this.storageAccount = CloudStorageAccount.Parse(element.ConnectionString); this.Uri = new Uri(context.ListenUriBaseAddress, context.ListenUriRelativeAddress); this.replyChannel = new Lazy <TableReplyChannel>( () => { var address = new EndpointAddress(this.Uri); return(new TableReplyChannel( this, this.storageAccount.CreateCloudTableClient(), this.TableName, this.targetPartitionKey, this.bufferManager, address, this.encoderFactory.CreateSessionEncoder())); }); }