Skip to content

Commit 6c8ddde

Browse files
committed
Renamed IServiceCollection arg to services
1 parent cd7a981 commit 6c8ddde

File tree

1 file changed

+8
-8
lines changed
  • Microsoft.Toolkit.Mvvm/DependencyInjection

1 file changed

+8
-8
lines changed

Microsoft.Toolkit.Mvvm/DependencyInjection/Ioc.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ namespace Microsoft.Toolkit.Mvvm.DependencyInjection
3030
/// Then the services configuration should then be done at startup, by calling one of
3131
/// the available <see cref="ConfigureServices(IServiceCollection)"/> overloads, like so:
3232
/// <code>
33-
/// Ioc.Default.ConfigureServices(collection =>
33+
/// Ioc.Default.ConfigureServices(services =>
3434
/// {
35-
/// collection.AddSingleton&lt;ILogger, Logger&gt;();
35+
/// services.AddSingleton&lt;ILogger, Logger&gt;();
3636
/// });
3737
/// </code>
3838
/// Finally, you can use the <see cref="Ioc"/> instance (which implements <see cref="IServiceProvider"/>)
@@ -103,20 +103,20 @@ public void ConfigureServices(Action<IServiceCollection> setup, ServiceProviderO
103103
/// <summary>
104104
/// Initializes the shared <see cref="IServiceProvider"/> instance.
105105
/// </summary>
106-
/// <param name="collection">The input <see cref="IServiceCollection"/> instance to use.</param>
107-
public void ConfigureServices(IServiceCollection collection)
106+
/// <param name="services">The input <see cref="IServiceCollection"/> instance to use.</param>
107+
public void ConfigureServices(IServiceCollection services)
108108
{
109-
ConfigureServices(collection, new ServiceProviderOptions());
109+
ConfigureServices(services, new ServiceProviderOptions());
110110
}
111111

112112
/// <summary>
113113
/// Initializes the shared <see cref="IServiceProvider"/> instance.
114114
/// </summary>
115-
/// <param name="collection">The input <see cref="IServiceCollection"/> instance to use.</param>
115+
/// <param name="services">The input <see cref="IServiceCollection"/> instance to use.</param>
116116
/// <param name="options">The <see cref="ServiceProviderOptions"/> instance to configure the service provider behaviors.</param>
117-
public void ConfigureServices(IServiceCollection collection, ServiceProviderOptions options)
117+
public void ConfigureServices(IServiceCollection services, ServiceProviderOptions options)
118118
{
119-
ServiceProvider newServices = collection.BuildServiceProvider(options);
119+
ServiceProvider newServices = services.BuildServiceProvider(options);
120120

121121
ServiceProvider? oldServices = Interlocked.CompareExchange(ref this.serviceProvider, newServices, null);
122122

0 commit comments

Comments
 (0)