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; })); }
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); }