Castle.Facilities.WcfIntegration.Tests.WcfClientFixture.CanProxyChannelFactoriesForAsyncSupport C# (CSharp) Method

CanProxyChannelFactoriesForAsyncSupport() private method

private CanProxyChannelFactoriesForAsyncSupport ( ) : void
return void
		public void CanProxyChannelFactoriesForAsyncSupport()
		{
			var model = new DefaultClientModel()
				{
					Endpoint = WcfEndpoint
						.BoundTo(new NetTcpBinding { PortSharingEnabled = true })
						.At("net.tcp://localhost/Operations")
				};
			var asyncBuilder = new AsynChannelFactoryBuilder<DefaultClientModel>(new ProxyGenerator());
			var channelFactory = asyncBuilder.CreateChannelFactory<ChannelFactory<IOperations>>(
				model, new NetTcpBinding(), "net.tcp://localhost/Operations");

			var client = channelFactory.CreateChannel();
			Assert.AreEqual(42, client.GetValueFromConstructor());
			((ICommunicationObject)client).Close();
		}
WcfClientFixture