public GsBus(GsBusConfig busConfig, IServiceCollection serviceCollection = null) { ConfigureServices(serviceCollection ?? new ServiceCollection()); _busConfig = busConfig; _serializer = _serviceProvider.GetService <IGsSerializer>(); }
private IGsSerializer GetSerializer() { if (_serializer == null) { _serializer = GetServiceProvider().GetService <IGsSerializer>(); } return(_serializer); }