public IEnumerable<Connection> Create(ConnectionElements connectionElements) { return ( from ConnectionElement connectionElement in connectionElements select new Connection( name: new ConnectionName(connectionElement.ConnectionName), channel: channelFactory.Create(connectionElement.ChannelName), dataType: GetType(connectionElement.DataType), noOfPerformers: connectionElement.NoOfPerformers, timeoutInMilliseconds: connectionElement.TimeoutInMiliseconds) ).ToList(); }
public IEnumerable <Connection> Create(ConnectionElements connectionElements) { var connections = ( from ConnectionElement connectionElement in connectionElements select new Connection( name: new ConnectionName(connectionElement.ConnectionName), channel: channelFactory.CreateInputChannel(connectionElement.ChannelName, connectionElement.RoutingKey), dataType: GetType(connectionElement.DataType), noOfPerformers: connectionElement.NoOfPerformers, timeoutInMilliseconds: connectionElement.TimeoutInMiliseconds) ).ToList(); return(connections); }