コード例 #1
0
 private IAuthenticator CreateAuthenticator(ConnectionDescription description)
 {
     if (SupportedFeatures.IsScramSha1AuthenticationSupported(description.ServerVersion))
     {
         return(new ScramSha1Authenticator(_credential, _randomStringGenerator));
     }
     else
     {
         return(new MongoDBCRAuthenticator(_credential));
     }
 }