Ejemplo n.º 1
0
 /// <summary>
 /// Uses the zoo keeper MQTT route manager.
 /// </summary>
 /// <param name="builder">The builder.</param>
 /// <param name="configInfo">The configuration information.</param>
 /// <returns>IServiceBuilder.</returns>
 public static IServiceBuilder UseZooKeeperMqttRouteManager(this IServiceBuilder builder, ConfigInfo configInfo)
 {
     return(builder.UseMqttRouteManager(provider =>
     {
         var result = new ZooKeeperMqttServiceRouteManager(
             GetConfigInfo(configInfo),
             provider.GetRequiredService <ISerializer <byte[]> >(),
             provider.GetRequiredService <ISerializer <string> >(),
             provider.GetRequiredService <IMqttServiceFactory>(),
             provider.GetRequiredService <ILogger <ZooKeeperMqttServiceRouteManager> >(),
             provider.GetRequiredService <IZookeeperClientProvider>());
         return result;
     }));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Uses the zoo keeper MQTT route manager.
 /// </summary>
 /// <param name="builder">The builder.</param>
 /// <param name="configInfo">The configuration information.</param>
 /// <returns>ZookeeperModule.</returns>
 public ZookeeperModule UseZooKeeperMqttRouteManager(ContainerBuilderWrapper builder, ConfigInfo configInfo)
 {
     UseMqttRouteManager(builder, provider =>
     {
         var result = new ZooKeeperMqttServiceRouteManager(
             GetConfigInfo(configInfo),
             provider.GetRequiredService <ISerializer <byte[]> >(),
             provider.GetRequiredService <ISerializer <string> >(),
             provider.GetRequiredService <IMqttServiceFactory>(),
             provider.GetRequiredService <ILogger <ZooKeeperMqttServiceRouteManager> >(),
             provider.GetRequiredService <IZookeeperClientProvider>());
         return(result);
     });
     return(this);
 }