コード例 #1
0
 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
ファイル: ConsulModule.cs プロジェクト: wumingbear/surging
 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);
 }