public static IServiceBuilder UseConsulServiceSubscribeManager(this IServiceBuilder builder, ConfigInfo configInfo)
 {
     return(builder.UseSubscribeManager(provider =>
     {
         var result = new ConsulServiceSubscribeManager(
             GetConfigInfo(configInfo),
             provider.GetRequiredService <ISerializer <byte[]> >(),
             provider.GetRequiredService <ISerializer <string> >(),
             provider.GetRequiredService <IClientWatchManager>(),
             provider.GetRequiredService <IServiceSubscriberFactory>(),
             provider.GetRequiredService <ILogger <ConsulServiceSubscribeManager> >());
         return result;
     }));
 }
예제 #2
0
 public ConsulModule UseConsulServiceSubscribeManager(ContainerBuilderWrapper builder, ConfigInfo configInfo)
 {
     UseSubscribeManager(builder, provider =>
     {
         var result = new ConsulServiceSubscribeManager(
             GetConfigInfo(configInfo),
             provider.GetRequiredService <ISerializer <byte[]> >(),
             provider.GetRequiredService <ISerializer <string> >(),
             provider.GetRequiredService <IClientWatchManager>(),
             provider.GetRequiredService <IServiceSubscriberFactory>(),
             provider.GetRequiredService <ILogger <ConsulServiceSubscribeManager> >());
         return(result);
     });
     return(this);
 }