예제 #1
0
        /// <summary>
        /// Create a Client over Named Papes.
        /// </summary>
        /// <param name="pipeName">Pipe Name</param>
        /// <returns>Instance of the Client</returns>
        public static ISimulationClient CreateNamedPipe(string[] extensionPaths, string pipeName)
        {
            WcfSimulationCallback callback = new WcfSimulationCallback();
            WcfSimulationClient   client   = new WcfSimulationClient(extensionPaths, callback);

            var factory =
                new DuplexChannelFactory <ISimulationService>(
                    callback,
                    new NetNamedPipeBinding(),
                    new EndpointAddress("net.pipe://localhost/" + pipeName));

            var channel = factory.CreateChannel();

            client.Create(factory, channel);
            return(client);
        }
예제 #2
0
        /// <summary>
        /// Create a Client over Named Papes.
        /// </summary>
        /// <param name="pipeName">Pipe Name</param>
        /// <returns>Instance of the Client</returns>
        public static ISimulationClient CreateNamedPipe(string[] extensionPaths, string pipeName)
        {
            WcfSimulationCallback callback = new WcfSimulationCallback();
            WcfSimulationClient client = new WcfSimulationClient(extensionPaths, callback);

            var factory =
                new DuplexChannelFactory<ISimulationService>(
                    callback,
                    new NetNamedPipeBinding(),
                    new EndpointAddress("net.pipe://localhost/" + pipeName));

            var channel = factory.CreateChannel();

            client.Create(factory, channel);
            return client;
        }
예제 #3
0
        /// <summary>
        /// Create a Client over TCP.
        /// </summary>
        /// <param name="address">Target IP</param>
        /// <param name="port">Port</param>
        /// <returns>Instance of the Client</returns>
        public static ISimulationClient CreateTcp(string[] extensionPaths, IPAddress address, int port)
        {
            WcfSimulationCallback callback = new WcfSimulationCallback();
            WcfSimulationClient   client   = new WcfSimulationClient(extensionPaths, callback);

            throw new NotImplementedException();

            // TODO:
            var factory =
                new DuplexChannelFactory <ISimulationService>(
                    callback,
                    new NetTcpBinding(),
                    new EndpointAddress(""));

            var channel = factory.CreateChannel();

            client.Create(factory, channel);
            return(client);
        }
예제 #4
0
        /// <summary>
        /// Create a Client over TCP.
        /// </summary>
        /// <param name="address">Target IP</param>
        /// <param name="port">Port</param>
        /// <returns>Instance of the Client</returns>
        public static ISimulationClient CreateTcp(string[] extensionPaths, IPAddress address, int port)
        {
            WcfSimulationCallback callback = new WcfSimulationCallback();
            WcfSimulationClient client = new WcfSimulationClient(extensionPaths, callback);

            throw new NotImplementedException();

            // TODO:
            var factory =
                new DuplexChannelFactory<ISimulationService>(
                    callback,
                    new NetTcpBinding(),
                    new EndpointAddress(""));

            var channel = factory.CreateChannel();

            client.Create(factory, channel);
            return client;
        }