@@ -91,7 +91,7 @@ public AzureClientFactoryBuilder ConfigureDefaults(IConfiguration configuration)
9191
9292 IAzureClientBuilder < TClient , TOptions > IAzureClientFactoryBuilderWithCredential . RegisterClientFactory < TClient , TOptions > ( Func < TOptions , TokenCredential , TClient > clientFactory , bool requiresCredential )
9393 {
94- return RegisterClientFactory < TClient , TOptions > ( ( _ , options , credential ) => clientFactory ( options , credential ) , requiresCredential ) ;
94+ return RegisterClientFactory < TClient , TOptions > ( ( options , credential , _ ) => clientFactory ( options , credential ) , requiresCredential ) ;
9595 }
9696
9797 /// <summary>
@@ -123,7 +123,7 @@ public AzureClientFactoryBuilder UseCredential(Func<IServiceProvider, TokenCrede
123123 /// <returns>The <see cref="IAzureClientBuilder{TClient, TOptions}"/> to allow client configuration.</returns>
124124 public IAzureClientBuilder < TClient , TOptions > AddClient < TClient , TOptions > ( Func < TOptions , TClient > factory ) where TOptions : class
125125 {
126- return RegisterClientFactory < TClient , TOptions > ( ( _ , options , _ ) => factory ( options ) , false ) ;
126+ return RegisterClientFactory < TClient , TOptions > ( ( options , _ , _ ) => factory ( options ) , false ) ;
127127 }
128128
129129 /// <summary>
@@ -132,9 +132,9 @@ public IAzureClientBuilder<TClient, TOptions> AddClient<TClient, TOptions>(Func<
132132 /// <typeparam name="TClient">The type of the client.</typeparam>
133133 /// <typeparam name="TOptions">The type of the client options.</typeparam>
134134 /// <returns>The <see cref="IAzureClientBuilder{TClient, TOptions}"/> to allow client configuration.</returns>
135- public IAzureClientBuilder < TClient , TOptions > AddClient < TClient , TOptions > ( Func < TokenCredential , TOptions , TClient > factory ) where TOptions : class
135+ public IAzureClientBuilder < TClient , TOptions > AddClient < TClient , TOptions > ( Func < TOptions , TokenCredential , TClient > factory ) where TOptions : class
136136 {
137- return RegisterClientFactory < TClient , TOptions > ( ( _ , options , credential ) => factory ( credential , options ) , true ) ;
137+ return RegisterClientFactory < TClient , TOptions > ( ( options , credential , _ ) => factory ( options , credential ) , true ) ;
138138 }
139139
140140 /// <summary>
@@ -144,9 +144,9 @@ public IAzureClientBuilder<TClient, TOptions> AddClient<TClient, TOptions>(Func<
144144 /// <typeparam name="TClient">The type of the client.</typeparam>
145145 /// <typeparam name="TOptions">The type of the client options.</typeparam>
146146 /// <returns>The <see cref="IAzureClientBuilder{TClient, TOptions}"/> to allow client configuration.</returns>
147- public IAzureClientBuilder < TClient , TOptions > AddClient < TClient , TOptions > ( Func < IServiceProvider , TOptions , TClient > factory ) where TOptions : class
147+ public IAzureClientBuilder < TClient , TOptions > AddClient < TClient , TOptions > ( Func < TOptions , IServiceProvider , TClient > factory ) where TOptions : class
148148 {
149- return RegisterClientFactory < TClient , TOptions > ( ( provider , options , _ ) => factory ( provider , options ) , true ) ;
149+ return RegisterClientFactory < TClient , TOptions > ( ( options , _ , provider ) => factory ( options , provider ) , true ) ;
150150 }
151151
152152 /// <summary>
@@ -156,14 +156,14 @@ public IAzureClientBuilder<TClient, TOptions> AddClient<TClient, TOptions>(Func<
156156 /// <typeparam name="TClient">The type of the client.</typeparam>
157157 /// <typeparam name="TOptions">The type of the client options.</typeparam>
158158 /// <returns>The <see cref="IAzureClientBuilder{TClient, TOptions}"/> to allow client configuration.</returns>
159- public IAzureClientBuilder < TClient , TOptions > AddClient < TClient , TOptions > ( Func < IServiceProvider , TokenCredential , TOptions , TClient > factory ) where TOptions : class
159+ public IAzureClientBuilder < TClient , TOptions > AddClient < TClient , TOptions > ( Func < TOptions , TokenCredential , IServiceProvider , TClient > factory ) where TOptions : class
160160 {
161- return RegisterClientFactory < TClient , TOptions > ( ( provider , options , credential ) => factory ( provider , credential , options ) , true ) ;
161+ return RegisterClientFactory < TClient , TOptions > ( ( options , credential , provider ) => factory ( options , credential , provider ) , true ) ;
162162 }
163163
164- private IAzureClientBuilder < TClient , TOptions > RegisterClientFactory < TClient , TOptions > ( Func < IServiceProvider , TOptions , TokenCredential , TClient > clientFactory , bool requiresCredential ) where TOptions : class
164+ private IAzureClientBuilder < TClient , TOptions > RegisterClientFactory < TClient , TOptions > ( Func < TOptions , TokenCredential , IServiceProvider , TClient > clientFactory , bool requiresCredential ) where TOptions : class
165165 {
166- var clientRegistration = new ClientRegistration < TClient > ( DefaultClientName , ( provider , options , credential ) => clientFactory ( provider , ( TOptions ) options , credential ) ) ;
166+ var clientRegistration = new ClientRegistration < TClient > ( DefaultClientName , ( provider , options , credential ) => clientFactory ( ( TOptions ) options , credential , provider ) ) ;
167167 clientRegistration . RequiresTokenCredential = requiresCredential ;
168168
169169 _serviceCollection . AddSingleton ( clientRegistration ) ;
0 commit comments