private void AddToConfigured <TOptions>(string type, Action <TOptions> action) where TOptions : class { if (!Configured.Contains(type)) { Configured.Add(type); ServiceCollection.Configure(action); } }
public DIHelper Configure <TOptions>(string name, Action <TOptions> configureOptions) where TOptions : class { var serviceName = $"{typeof(TOptions)}{name}"; if (!Configured.Contains(serviceName)) { Configured.Add(serviceName); ServiceCollection.Configure(name, configureOptions); } return(this); }