private void LoadConfiguration(Configuration configuration)
        {
            _connectTimeout = configuration.ConnectTimeout;

            _serverPipeConfiguration  = configuration.Pipes.Single(p => p.IsServer);
            _clientPipesConfiguration = configuration.Pipes.Where(p => !p.IsServer).ToArray();

            if (_serverPipeConfiguration.ServerName != ".")
            {
                throw new InvalidOperationException("Server pipe can't be located on the remote machine");
            }
        }
Beispiel #2
0
        private void LoadConfiguration()
        {
            var configurationSection = (NamedPipeMessageBusConfigurationSection)
                                       ConfigurationManager.GetSection("namedPipeMessageBus");

            if (configurationSection == null)
            {
                throw new InvalidOperationException("namedPipeMessageBus configuration sections can't be found");
            }

            _connectTimeout = configurationSection.ConnectTimeout;

            var pipes = configurationSection.Pipes.Cast <NamedPipeElement>();

            _serverPipeConfiguration  = pipes.Single(p => p.IsServer);
            _clientPipesConfiguration = pipes.ToArray();

            if (_serverPipeConfiguration.ServerName != ".")
            {
                throw new InvalidOperationException("Server pipe can't be located on the remote machine");
            }
        }
        private void LoadConfiguration(Configuration configuration)
        {
            _connectTimeout = configuration.ConnectTimeout;

            _serverPipeConfiguration = configuration.Pipes.Single(p => p.IsServer);
            _clientPipesConfiguration = configuration.Pipes.Where(p => !p.IsServer).ToArray();

            if (_serverPipeConfiguration.ServerName != ".")
                throw new InvalidOperationException("Server pipe can't be located on the remote machine");
        }
        private void LoadConfiguration()
        {
            var configurationSection = (NamedPipeMessageBusConfigurationSection)
                ConfigurationManager.GetSection("namedPipeMessageBus");

            if (configurationSection == null)
                throw new InvalidOperationException("namedPipeMessageBus configuration sections can't be found");

            _connectTimeout = configurationSection.ConnectTimeout;

            var pipes = configurationSection.Pipes.Cast<NamedPipeElement>();
            _serverPipeConfiguration = pipes.Single(p => p.IsServer);
            _clientPipesConfiguration = pipes.ToArray();

            if (_serverPipeConfiguration.ServerName != ".")
                throw new InvalidOperationException("Server pipe can't be located on the remote machine");
        }