Skip to content

Commit a75f54c

Browse files
committed
Async regen
1 parent cfa7a0e commit a75f54c

File tree

3 files changed

+26
-5
lines changed

3 files changed

+26
-5
lines changed

src/NHibernate/Async/ISession.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ public static partial class SessionExtensions
3434
/// if there is no such persistent instance. (If the instance, or a proxy for the instance, is
3535
/// already associated with the session, return that instance or proxy.)
3636
/// </summary>
37+
/// <param name="session">The session.</param>
38+
/// <param name="entityName">The entity name.</param>
39+
/// <param name="id">The entity identifier.</param>
40+
/// <param name="lockMode">The lock mode to use for getting the entity.</param>
41+
/// <param name="cancellationToken">A cancellation token that can be used to cancel the work</param>
42+
/// <returns>A persistent instance, or <see langword="null" />.</returns>
3743
public static Task<object> GetAsync(this ISession session, string entityName, object id, LockMode lockMode, CancellationToken cancellationToken = default(CancellationToken))
3844
{
3945
if (cancellationToken.IsCancellationRequested)
@@ -59,6 +65,13 @@ public static partial class SessionExtensions
5965
/// if there is no such persistent instance. (If the instance, or a proxy for the instance, is
6066
/// already associated with the session, return that instance or proxy.)
6167
/// </summary>
68+
/// <typeparam name="T">The entity class.</typeparam>
69+
/// <param name="session">The session.</param>
70+
/// <param name="entityName">The entity name.</param>
71+
/// <param name="id">The entity identifier.</param>
72+
/// <param name="lockMode">The lock mode to use for getting the entity.</param>
73+
/// <param name="cancellationToken">A cancellation token that can be used to cancel the work</param>
74+
/// <returns>A persistent instance, or <see langword="null" />.</returns>
6275
public static async Task<T> GetAsync<T>(this ISession session, string entityName, object id, LockMode lockMode = null, CancellationToken cancellationToken = default(CancellationToken))
6376
{
6477
cancellationToken.ThrowIfCancellationRequested();

src/NHibernate/Async/IStatelessSession.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@ public static partial class StatelessSessionExtensions
2626
{
2727

2828
//NOTE: Keep it as extension
29+
/// <summary>
30+
/// Return the persistent instance of the given entity name with the given identifier, or null
31+
/// if there is no such persistent instance. (If the instance, or a proxy for the instance, is
32+
/// already associated with the session, return that instance or proxy.)
33+
/// </summary>
34+
/// <typeparam name="T">The entity class.</typeparam>
35+
/// <param name="session">The session.</param>
36+
/// <param name="entityName">The entity name.</param>
37+
/// <param name="id">The entity identifier.</param>
38+
/// <param name="lockMode">The lock mode to use for getting the entity.</param>
39+
/// <param name="cancellationToken">A cancellation token that can be used to cancel the work</param>
40+
/// <returns>A persistent instance, or <see langword="null" />.</returns>
2941
public static async Task<T> GetAsync<T>(this IStatelessSession session, string entityName, object id, LockMode lockMode = null, CancellationToken cancellationToken = default(CancellationToken))
3042
{
3143
cancellationToken.ThrowIfCancellationRequested();

src/NHibernate/Async/Impl/SessionImpl.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -848,11 +848,7 @@ public override async Task<bool> AutoFlushIfRequiredAsync(ISet<string> querySpac
848848
return GetAsync(clazz.FullName, id, lockMode, cancellationToken);
849849
}
850850

851-
/// <summary>
852-
/// Return the persistent instance of the given entity name with the given identifier, or null
853-
/// if there is no such persistent instance. (If the instance, or a proxy for the instance, is
854-
/// already associated with the session, return that instance or proxy.)
855-
/// </summary>
851+
/// <inheritdoc />
856852
public async Task<object> GetAsync(string entityName, object id, LockMode lockMode, CancellationToken cancellationToken)
857853
{
858854
cancellationToken.ThrowIfCancellationRequested();

0 commit comments

Comments
 (0)