public static IJT808ClientBuilder AddClient(this IJT808Builder jT808Builder) { JT808ClientBuilderDefault jT808ClientBuilderDefault = new JT808ClientBuilderDefault(jT808Builder); jT808ClientBuilderDefault.JT808Builder.Services.AddSingleton <JT808SendAtomicCounterService>(); jT808ClientBuilderDefault.JT808Builder.Services.AddSingleton <JT808ReceiveAtomicCounterService>(); jT808ClientBuilderDefault.JT808Builder.Services.AddSingleton <IJT808TcpClientFactory, JT808TcpClientFactory>(); return(jT808ClientBuilderDefault); }
public static IJT808ClientBuilder AddClient(this IJT808Builder jT808Builder) { JT808ClientBuilderDefault jT808ClientBuilderDefault = new JT808ClientBuilderDefault(jT808Builder); jT808ClientBuilderDefault.JT808Builder.Services.AddSingleton <JT808RetryBlockingCollection>(); jT808ClientBuilderDefault.JT808Builder.Services.AddSingleton <JT808SendAtomicCounterService>(); jT808ClientBuilderDefault.JT808Builder.Services.AddSingleton <JT808ReceiveAtomicCounterService>(); jT808ClientBuilderDefault.JT808Builder.Services.AddSingleton <IJT808TcpClientFactory, JT808TcpClientFactory>(); jT808ClientBuilderDefault.JT808Builder.Services.AddSingleton <IJT808MessageProducer, JT808MessageProducerEmpty>(); jT808ClientBuilderDefault.JT808Builder.Services.AddHostedService <JT808RetryClientHostedService>(); return(jT808ClientBuilderDefault); }