public MsmqOutputSessionChannel(MsmqChannelFactory<IOutputSessionChannel> factory, EndpointAddress to, Uri via, bool manualAddressing) : base(factory, to, via, manualAddressing, factory.MessageVersion) { this.factory = factory; this.encoder = this.factory.MessageEncoderFactory.CreateSessionEncoder(); this.buffers = new List<ArraySegment<byte>>(); this.buffers.Add(EncodeSessionPreamble()); if (factory.IsMsmqX509SecurityConfigured) { this.certificateTokenProvider = factory.CreateX509TokenProvider(to, via); } this.session = new OutputSession(); }
public MsmqOutputChannel(MsmqChannelFactory<IOutputChannel> factory, EndpointAddress to, Uri via, bool manualAddressing) : base(factory, to, via, manualAddressing, factory.MessageVersion) { byte[] modeBytes = ClientSingletonSizedEncoder.ModeBytes; EncodedVia via2 = new EncodedVia(this.Via.AbsoluteUri); EncodedContentType contentType = EncodedContentType.Create(factory.MessageEncoderFactory.Encoder.ContentType); this.preamble = DiagnosticUtility.Utility.AllocateByteArray(modeBytes.Length + ClientSingletonSizedEncoder.CalcStartSize(via2, contentType)); Buffer.BlockCopy(modeBytes, 0, this.preamble, 0, modeBytes.Length); ClientSingletonSizedEncoder.EncodeStart(this.preamble, modeBytes.Length, via2, contentType); this.outputMessages = new SynchronizedDisposablePool<MsmqOutputMessage<IOutputChannel>>(factory.MaxPoolSize); if (factory.IsMsmqX509SecurityConfigured) { this.certificateTokenProvider = factory.CreateX509TokenProvider(to, via); } this.factory = factory; }
public MsmqOutputChannel (MsmqChannelFactory<IOutputChannel> factory, EndpointAddress address, Uri via) : base (factory, address, via) { this.source = factory; }