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);
 }
Esempio n. 2
0
 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()));
     });
 }