You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Npgsql/NpgsqlDataSourceBuilder.cs
+24Lines changed: 24 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -232,6 +232,30 @@ public NpgsqlDataSourceBuilder UsePeriodicPasswordProvider(
232
232
returnthis;
233
233
}
234
234
235
+
/// <summary>
236
+
/// Configures a password provider, which is called by the data source when opening connections.
237
+
/// </summary>
238
+
/// <param name="passwordProvider">
239
+
/// A callback that may be invoked during <see cref="NpgsqlConnection.Open()" /> which returns the password to be sent to PostgreSQL.
240
+
/// </param>
241
+
/// <param name="passwordProviderAsync">
242
+
/// A callback that may be invoked during <see cref="NpgsqlConnection.OpenAsync(CancellationToken)" /> which returns the password to be sent to PostgreSQL.
243
+
/// </param>
244
+
/// <returns>The same builder instance so that multiple calls can be chained.</returns>
245
+
/// <remarks>
246
+
/// <para>
247
+
/// The provided callback is invoked when opening connections. Therefore its important the callback internally depends on cached
248
+
/// data or returns quickly otherwise. Any unnecessary delay will affect connection opening time.
/// A connection string builder that can be used to configured the connection string on the builder.
@@ -239,6 +242,34 @@ public NpgsqlSlimDataSourceBuilder UsePeriodicPasswordProvider(
239
242
returnthis;
240
243
}
241
244
245
+
/// <summary>
246
+
/// Configures a password provider, which is called by the data source when opening connections.
247
+
/// </summary>
248
+
/// <param name="passwordProvider">
249
+
/// A callback that may be invoked during <see cref="NpgsqlConnection.Open()" /> which returns the password to be sent to PostgreSQL.
250
+
/// </param>
251
+
/// <param name="passwordProviderAsync">
252
+
/// A callback that may be invoked during <see cref="NpgsqlConnection.OpenAsync(CancellationToken)" /> which returns the password to be sent to PostgreSQL.
253
+
/// </param>
254
+
/// <returns>The same builder instance so that multiple calls can be chained.</returns>
255
+
/// <remarks>
256
+
/// <para>
257
+
/// The provided callback is invoked when opening connections. Therefore its important the callback internally depends on cached
258
+
/// data or returns quickly otherwise. Any unnecessary delay will affect connection opening time.
0 commit comments