internal MsmqIntegrationChannelListener(MsmqBindingElementBase bindingElement, BindingContext context, MsmqReceiveParameters receiveParameters) : base(bindingElement, context, receiveParameters, null) { base.SetSecurityTokenAuthenticator(MsmqUri.FormatNameAddressTranslator.Scheme, context); MsmqIntegrationReceiveParameters parameters = receiveParameters as MsmqIntegrationReceiveParameters; this.xmlSerializerList = XmlSerializer.FromTypes(parameters.TargetSerializationTypes); }
public override IChannelListener <TChannel> BuildChannelListener <TChannel>(BindingContext context) where TChannel : class, IChannel { if (context == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("context"); } if (typeof(TChannel) != typeof(IInputChannel)) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("TChannel", System.ServiceModel.SR.GetString("ChannelTypeNotSupported", new object[] { typeof(TChannel) })); } MsmqIntegrationReceiveParameters receiveParameters = new MsmqIntegrationReceiveParameters(this); MsmqIntegrationChannelListener listener = new MsmqIntegrationChannelListener(this, context, receiveParameters); MsmqVerifier.VerifyReceiver(receiveParameters, listener.Uri); return((IChannelListener <TChannel>)listener); }