Ejemplo n.º 1
0
        internal static ApplicationInterfaceClient CreateSession(IApplicationInterfaceCallback callback)
        {
            Uri                 serviceAddress   = new Uri("net.pipe://localhost/Multitouch.Service/ApplicationInterface");
            EndpointAddress     remoteAddress    = new EndpointAddress(serviceAddress);
            NetNamedPipeBinding namedPipeBinding = new NetNamedPipeBinding(NetNamedPipeSecurityMode.None);

            namedPipeBinding.MaxReceivedMessageSize      = int.MaxValue;
            namedPipeBinding.MaxBufferSize               = int.MaxValue;
            namedPipeBinding.ReaderQuotas.MaxArrayLength = int.MaxValue;

            ApplicationInterfaceClient session = new ApplicationInterfaceClient(new InstanceContext(callback), namedPipeBinding, remoteAddress);

            session.CreateSession();
            return(session);
        }
		internal static ApplicationInterfaceClient CreateSession(IApplicationInterfaceCallback callback)
		{
			Uri serviceAddress = new Uri("net.pipe://localhost/Multitouch.Service/ApplicationInterface");
			EndpointAddress remoteAddress = new EndpointAddress(serviceAddress);
			NetNamedPipeBinding namedPipeBinding = new NetNamedPipeBinding(NetNamedPipeSecurityMode.None);
			namedPipeBinding.MaxReceivedMessageSize = int.MaxValue;
			namedPipeBinding.MaxBufferSize = int.MaxValue;
			namedPipeBinding.ReaderQuotas.MaxArrayLength = int.MaxValue;

			ApplicationInterfaceClient session = new ApplicationInterfaceClient(new InstanceContext(callback), namedPipeBinding, remoteAddress);
			session.CreateSession();
			return session;
		}