Esempio n. 1
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="DictionaryOutboundRouter{TMessage, TEndpoint}" /> class.
 /// </summary>
 /// <param name="routerFunction">
 ///     The <see cref="RouterFunction" />.
 /// </param>
 /// <param name="endpoints">
 ///     The <see cref="IReadOnlyDictionary{TKey,TValue}" /> containing the endpoints and their key.
 /// </param>
 public DictionaryOutboundRouter(
     RouterFunction routerFunction,
     IReadOnlyDictionary <string, TEndpoint> endpoints)
 {
     _routerFunction = Check.NotNull(routerFunction, nameof(routerFunction));
     _endpoints      = Check.NotNull(endpoints, nameof(endpoints));
 }
Esempio n. 2
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="KafkaOutboundEndpointRouter{TMessage}" /> class.
 /// </summary>
 /// <param name="routerFunction">
 ///     The <see cref="DictionaryOutboundRouter{TMessage,TEndpoint}.RouterFunction" />.
 /// </param>
 /// <param name="endpointBuilderActions">
 ///     The <see cref="IReadOnlyDictionary{TKey,TValue}" /> containing the key of each endpoint and the
 ///     <see cref="Action{T}" /> to be invoked to build them.
 /// </param>
 /// <param name="clientConfig">
 ///     The <see cref="KafkaClientConfig" /> to be used to initialize the
 ///     <see cref="KafkaProducerConfig" />.
 /// </param>
 public KafkaOutboundEndpointRouter(
     RouterFunction routerFunction,
     IReadOnlyDictionary <string, Action <IKafkaProducerEndpointBuilder> > endpointBuilderActions,
     KafkaClientConfig?clientConfig = null)
     : base(routerFunction, BuildEndpointsDictionary(endpointBuilderActions, clientConfig))
 {
 }
Esempio n. 3
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="MqttOutboundEndpointRouter{TMessage}" /> class.
 /// </summary>
 /// <param name="routerFunction">
 ///     The <see cref="DictionaryOutboundRouter{TMessage,TEndpoint}.RouterFunction" />.
 /// </param>
 /// <param name="endpointBuilderActions">
 ///     The <see cref="IReadOnlyDictionary{TKey,TValue}" /> containing the key of each endpoint and the
 ///     <see cref="Action{T}" /> to be invoked to build them.
 /// </param>
 /// <param name="clientConfig">
 ///     The <see cref="MqttClientConfig" />.
 /// </param>
 public MqttOutboundEndpointRouter(
     RouterFunction routerFunction,
     IReadOnlyDictionary <string, Action <IMqttProducerEndpointBuilder> > endpointBuilderActions,
     MqttClientConfig clientConfig)
     : base(routerFunction, BuildEndpointsDictionary(endpointBuilderActions, clientConfig))
 {
 }