Skip to content

Commit 873feec

Browse files
maca88fredericDelaporte
authored andcommitted
Upgrade AsyncGenerator to 0.18.1
1 parent 638db27 commit 873feec

11 files changed

+17
-82
lines changed

Tools/packages.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</ItemGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="CSharpAsyncGenerator.CommandLine" Version="0.17.1" />
14+
<PackageReference Include="CSharpAsyncGenerator.CommandLine" Version="0.18.1" />
1515
<PackageReference Include="vswhere" Version="2.1.4" />
1616
<PackageReference Include="NUnit.Console" Version="3.10.0" />
1717
<PackageReference Include="GitReleaseManager" Version="0.7.0" />

src/NHibernate/Async/Collection/Generic/PersistentGenericBag.cs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,7 @@ public override Task<IEnumerable> GetDeletesAsync(ICollectionPersister persister
7777
}
7878

7979
//Since 5.3
80-
/// <summary>
81-
/// Get all "orphaned" elements
82-
/// </summary>
83-
/// <param name="snapshot">The snapshot of the collection.</param>
84-
/// <param name="entityName">The persistent class whose objects
85-
/// the collection is expected to contain.</param>
86-
/// <param name="cancellationToken">A cancellation token that can be used to cancel the work</param>
87-
/// <returns>
88-
/// An <see cref="ICollection"/> that contains all of the elements
89-
/// that have been orphaned.
90-
/// </returns>
80+
/// <inheritdoc />
9181
[Obsolete("This method has no more usages and will be removed in a future version")]
9282
public override Task<ICollection> GetOrphansAsync(object snapshot, string entityName, CancellationToken cancellationToken)
9383
{
@@ -97,8 +87,7 @@ public override Task<ICollection> GetOrphansAsync(object snapshot, string entity
9787
}
9888
try
9989
{
100-
var sn = (ICollection) snapshot;
101-
return Task.FromResult<ICollection>(GetOrphans(sn, (ICollection) _gbag, entityName, Session));
90+
return Task.FromResult<ICollection>(GetOrphans(snapshot, entityName));
10291
}
10392
catch (Exception ex)
10493
{

src/NHibernate/Async/Collection/Generic/PersistentGenericIdentifierBag.cs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -157,17 +157,7 @@ public override async Task<object> ReadFromAsync(DbDataReader reader, ICollectio
157157
}
158158

159159
//Since 5.3
160-
/// <summary>
161-
/// Get all "orphaned" elements
162-
/// </summary>
163-
/// <param name="snapshot">The snapshot of the collection.</param>
164-
/// <param name="entityName">The persistent class whose objects
165-
/// the collection is expected to contain.</param>
166-
/// <param name="cancellationToken">A cancellation token that can be used to cancel the work</param>
167-
/// <returns>
168-
/// An <see cref="ICollection"/> that contains all of the elements
169-
/// that have been orphaned.
170-
/// </returns>
160+
/// <inheritdoc />
171161
[Obsolete("This method has no more usages and will be removed in a future version")]
172162
public override Task<ICollection> GetOrphansAsync(object snapshot, string entityName, CancellationToken cancellationToken)
173163
{
@@ -177,8 +167,7 @@ public override Task<ICollection> GetOrphansAsync(object snapshot, string entity
177167
}
178168
try
179169
{
180-
var sn = (ISet<SnapshotElement>)GetSnapshot();
181-
return Task.FromResult<ICollection>(GetOrphans(sn.ToArray(x => x.Value), (ICollection) _values, entityName, Session));
170+
return Task.FromResult<ICollection>(GetOrphans(snapshot, entityName));
182171
}
183172
catch (Exception ex)
184173
{

src/NHibernate/Async/Collection/Generic/PersistentGenericList.cs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,7 @@ public partial class PersistentGenericList<T> : AbstractPersistentCollection, IL
3131
{
3232

3333
//Since 5.3
34-
/// <summary>
35-
/// Get all "orphaned" elements
36-
/// </summary>
37-
/// <param name="snapshot">The snapshot of the collection.</param>
38-
/// <param name="entityName">The persistent class whose objects
39-
/// the collection is expected to contain.</param>
40-
/// <param name="cancellationToken">A cancellation token that can be used to cancel the work</param>
41-
/// <returns>
42-
/// An <see cref="ICollection"/> that contains all of the elements
43-
/// that have been orphaned.
44-
/// </returns>
34+
/// <inheritdoc />
4535
[Obsolete("This method has no more usages and will be removed in a future version")]
4636
public override Task<ICollection> GetOrphansAsync(object snapshot, string entityName, CancellationToken cancellationToken)
4737
{
@@ -51,8 +41,7 @@ public override Task<ICollection> GetOrphansAsync(object snapshot, string entity
5141
}
5242
try
5343
{
54-
var sn = (IList<T>)snapshot;
55-
return Task.FromResult<ICollection>(GetOrphans((ICollection)sn, (ICollection) WrappedList, entityName, Session));
44+
return Task.FromResult<ICollection>(GetOrphans(snapshot, entityName));
5645
}
5746
catch (Exception ex)
5847
{

src/NHibernate/Async/Collection/Generic/PersistentGenericMap.cs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,7 @@ public partial class PersistentGenericMap<TKey, TValue> : AbstractPersistentColl
3131
{
3232

3333
//Since 5.3
34-
/// <summary>
35-
/// Get all "orphaned" elements
36-
/// </summary>
37-
/// <param name="snapshot">The snapshot of the collection.</param>
38-
/// <param name="entityName">The persistent class whose objects
39-
/// the collection is expected to contain.</param>
40-
/// <param name="cancellationToken">A cancellation token that can be used to cancel the work</param>
41-
/// <returns>
42-
/// An <see cref="ICollection"/> that contains all of the elements
43-
/// that have been orphaned.
44-
/// </returns>
34+
/// <inheritdoc />
4535
[Obsolete("This method has no more usages and will be removed in a future version")]
4636
public override Task<ICollection> GetOrphansAsync(object snapshot, string entityName, CancellationToken cancellationToken)
4737
{
@@ -51,8 +41,7 @@ public override Task<ICollection> GetOrphansAsync(object snapshot, string entity
5141
}
5242
try
5343
{
54-
var sn = (IDictionary<TKey, TValue>) snapshot;
55-
return Task.FromResult<ICollection>(GetOrphans((ICollection)sn.Values, (ICollection)WrappedMap.Values, entityName, Session));
44+
return Task.FromResult<ICollection>(GetOrphans(snapshot, entityName));
5645
}
5746
catch (Exception ex)
5847
{

src/NHibernate/Async/Collection/Generic/PersistentGenericSet.cs

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,7 @@ public partial class PersistentGenericSet<T> : AbstractPersistentCollection, ISe
3232
{
3333

3434
//Since 5.3
35-
/// <summary>
36-
/// Get all "orphaned" elements
37-
/// </summary>
38-
/// <param name="snapshot">The snapshot of the collection.</param>
39-
/// <param name="entityName">The persistent class whose objects
40-
/// the collection is expected to contain.</param>
41-
/// <param name="cancellationToken">A cancellation token that can be used to cancel the work</param>
42-
/// <returns>
43-
/// An <see cref="ICollection"/> that contains all of the elements
44-
/// that have been orphaned.
45-
/// </returns>
35+
/// <inheritdoc />
4636
[Obsolete("This method has no more usages and will be removed in a future version")]
4737
public override Task<ICollection> GetOrphansAsync(object snapshot, string entityName, CancellationToken cancellationToken)
4838
{
@@ -52,12 +42,7 @@ public override Task<ICollection> GetOrphansAsync(object snapshot, string entity
5242
}
5343
try
5444
{
55-
var sn = new SetSnapShot<T>((IEnumerable<T>)snapshot);
56-
57-
// TODO: Avoid duplicating shortcuts and array copy, by making base class GetOrphans() more flexible
58-
if (WrappedSet.Count == 0) return Task.FromResult<ICollection>(sn);
59-
if (((ICollection)sn).Count == 0) return Task.FromResult<ICollection>(sn);
60-
return Task.FromResult<ICollection>(GetOrphans(sn, WrappedSet.ToArray(), entityName, Session));
45+
return Task.FromResult<ICollection>(GetOrphans(snapshot, entityName));
6146
}
6247
catch (Exception ex)
6348
{

src/NHibernate/Async/Collection/PersistentArrayHolder.cs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,7 @@ public partial class PersistentArrayHolder : AbstractPersistentCollection, IColl
2828
{
2929

3030
//Since 5.3
31-
/// <summary>
32-
/// Get all "orphaned" elements
33-
/// </summary>
34-
/// <param name="snapshot">The snapshot of the collection.</param>
35-
/// <param name="entityName">The persistent class whose objects
36-
/// the collection is expected to contain.</param>
37-
/// <param name="cancellationToken">A cancellation token that can be used to cancel the work</param>
38-
/// <returns>
39-
/// An <see cref="ICollection"/> that contains all of the elements
40-
/// that have been orphaned.
41-
/// </returns>
31+
/// <inheritdoc />
4232
[Obsolete("This method has no more usages and will be removed in a future version")]
4333
public override Task<ICollection> GetOrphansAsync(object snapshot, string entityName, CancellationToken cancellationToken)
4434
{
@@ -48,7 +38,7 @@ public override Task<ICollection> GetOrphansAsync(object snapshot, string entity
4838
}
4939
try
5040
{
51-
return Task.FromResult<ICollection>(GetOrphans((object[]) snapshot, (object[]) array, entityName, Session));
41+
return Task.FromResult<ICollection>(GetOrphans(snapshot, entityName));
5242
}
5343
catch (Exception ex)
5444
{

src/NHibernate/Async/Impl/AbstractQueryImpl2.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ public abstract partial class AbstractQueryImpl2 : AbstractQueryImpl
119119
}
120120

121121
// Since v5.2
122+
/// <inheritdoc />
122123
[Obsolete("This method has no usages and will be removed in a future version")]
123124
protected internal override Task<IEnumerable<ITranslator>> GetTranslatorsAsync(ISessionImplementor sessionImplementor, QueryParameters queryParameters, CancellationToken cancellationToken)
124125
{

src/NHibernate/Async/Impl/CollectionFilterImpl.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public partial class CollectionFilterImpl : QueryImpl
6161
}
6262

6363
// Since v5.2
64+
/// <inheritdoc />
6465
[Obsolete("This method has no usages and will be removed in a future version")]
6566
protected internal override Task<IEnumerable<ITranslator>> GetTranslatorsAsync(ISessionImplementor session, QueryParameters queryParameters, CancellationToken cancellationToken)
6667
{

src/NHibernate/Async/Impl/ExpressionQueryImpl.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ internal partial class ExpressionFilterImpl : ExpressionQueryImpl
8181
}
8282

8383
// Since v5.2
84+
/// <inheritdoc />
8485
[Obsolete("This method has no usages and will be removed in a future version")]
8586
protected internal override Task<IEnumerable<ITranslator>> GetTranslatorsAsync(ISessionImplementor session, QueryParameters queryParameters, CancellationToken cancellationToken)
8687
{

src/NHibernate/Async/Impl/SqlQueryImpl.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ public partial class SqlQueryImpl : AbstractQueryImpl, ISQLQuery, ISynchronizabl
107107
}
108108

109109
// Since v5.2
110+
/// <inheritdoc />
110111
[Obsolete("This method has no usages and will be removed in a future version")]
111112
protected internal override Task<IEnumerable<ITranslator>> GetTranslatorsAsync(ISessionImplementor sessionImplementor, QueryParameters queryParameters, CancellationToken cancellationToken)
112113
{

0 commit comments

Comments
 (0)