示例#1
0
 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> >());
         return result;
     }));
 }
示例#2
0
 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> >());
         return(result);
     });
     return(this);
 }