@@ -33,10 +33,16 @@ private static ConcurrentDictionary<PublicClientAppKey, IPublicClientApplication
3333 private readonly string _applicationClientId = ActiveDirectoryAuthentication . AdoClientId ;
3434
3535 /// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/ActiveDirectoryAuthenticationProvider.xml' path='docs/members[@name="ActiveDirectoryAuthenticationProvider"]/ctor/*'/>
36- public ActiveDirectoryAuthenticationProvider ( ) => new ActiveDirectoryAuthenticationProvider ( DefaultDeviceFlowCallback ) ;
36+ public ActiveDirectoryAuthenticationProvider ( )
37+ : this ( DefaultDeviceFlowCallback )
38+ {
39+ }
3740
3841 /// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/ActiveDirectoryAuthenticationProvider.xml' path='docs/members[@name="ActiveDirectoryAuthenticationProvider"]/ctor2/*'/>
39- public ActiveDirectoryAuthenticationProvider ( string applicationClientId ) => new ActiveDirectoryAuthenticationProvider ( DefaultDeviceFlowCallback , applicationClientId ) ;
42+ public ActiveDirectoryAuthenticationProvider ( string applicationClientId )
43+ : this ( DefaultDeviceFlowCallback , applicationClientId )
44+ {
45+ }
4046
4147 /// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/ActiveDirectoryAuthenticationProvider.xml' path='docs/members[@name="ActiveDirectoryAuthenticationProvider"]/ctor3/*'/>
4248 public ActiveDirectoryAuthenticationProvider ( Func < DeviceCodeResult , Task > deviceCodeFlowCallbackMethod , string applicationClientId = null )
@@ -215,7 +221,7 @@ public override async Task<SqlAuthenticationToken> AcquireTokenAsync(SqlAuthenti
215221 {
216222 // Fetch available accounts from 'app' instance
217223 System . Collections . Generic . IEnumerator < IAccount > accounts = ( await app . GetAccountsAsync ( ) ) . GetEnumerator ( ) ;
218-
224+
219225 IAccount account = default ;
220226 if ( accounts . MoveNext ( ) )
221227 {
@@ -343,7 +349,7 @@ private async Task<AuthenticationResult> AcquireTokenInteractiveDeviceFlowAsync(
343349 }
344350 }
345351
346- private Task DefaultDeviceFlowCallback ( DeviceCodeResult result )
352+ private static Task DefaultDeviceFlowCallback ( DeviceCodeResult result )
347353 {
348354 // This will print the message on the console which tells the user where to go sign-in using
349355 // a separate browser and the code to enter once they sign in.
0 commit comments