Skip to content

MicrosoftDependencyResolver.UpdateContainer(IServiceCollection) method

Defined in

Type: MicrosoftDependencyResolver Namespace: Splat.Microsoft.Extensions.DependencyInjection Assembly: Splat.Microsoft.Extensions.DependencyInjection.dll

Applies to

net11.0, net10.0, netstandard2.0, net471, net47, net472, net48, net481

Overloads

  1. public void UpdateContainer(IServiceCollection services)

  2. public void UpdateContainer(IServiceProvider serviceProvider)

1. Overload

public void UpdateContainer(IServiceCollection services)

View source (opens in a new tab)

Summary: Updates this instance with a collection of configured services.

Parameters

NameTypeDescription
servicesIServiceCollection (opens in a new tab)An instance of IServiceCollection (opens in a new tab).

Exceptions

TypeCondition
System.InvalidOperationException (opens in a new tab)Thrown when _isImmutable.

2. Overload

public void UpdateContainer(IServiceProvider serviceProvider)

View source (opens in a new tab)

Summary: Updates this instance with a configured service Provider.

Parameters

NameTypeDescription
serviceProviderIServiceProvider (opens in a new tab)A ready to use service provider.