Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade AsyncGenerator to 0.18.1 #2319

Merged
merged 1 commit into from
Mar 1, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Upgrade AsyncGenerator to 0.18.1
maca88 committed Feb 29, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 20142bb06743e369ead6dec138be11ebb600b6cb
2 changes: 1 addition & 1 deletion Tools/packages.csproj
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CSharpAsyncGenerator.CommandLine" Version="0.17.1" />
<PackageReference Include="CSharpAsyncGenerator.CommandLine" Version="0.18.1" />
<PackageReference Include="vswhere" Version="2.1.4" />
<PackageReference Include="NUnit.Console" Version="3.10.0" />
<PackageReference Include="GitReleaseManager" Version="0.7.0" />
15 changes: 2 additions & 13 deletions src/NHibernate/Async/Collection/Generic/PersistentGenericBag.cs
Original file line number Diff line number Diff line change
@@ -77,17 +77,7 @@ public override Task<IEnumerable> GetDeletesAsync(ICollectionPersister persister
}

//Since 5.3
/// <summary>
/// Get all "orphaned" elements
/// </summary>
/// <param name="snapshot">The snapshot of the collection.</param>
/// <param name="entityName">The persistent class whose objects
/// the collection is expected to contain.</param>
/// <param name="cancellationToken">A cancellation token that can be used to cancel the work</param>
/// <returns>
/// An <see cref="ICollection"/> that contains all of the elements
/// that have been orphaned.
/// </returns>
/// <inheritdoc />
[Obsolete("This method has no more usages and will be removed in a future version")]
public override Task<ICollection> GetOrphansAsync(object snapshot, string entityName, CancellationToken cancellationToken)
{
@@ -97,8 +87,7 @@ public override Task<ICollection> GetOrphansAsync(object snapshot, string entity
}
try
{
var sn = (ICollection) snapshot;
return Task.FromResult<ICollection>(GetOrphans(sn, (ICollection) _gbag, entityName, Session));
return Task.FromResult<ICollection>(GetOrphans(snapshot, entityName));
}
catch (Exception ex)
{
Original file line number Diff line number Diff line change
@@ -157,17 +157,7 @@ public override async Task<object> ReadFromAsync(DbDataReader reader, ICollectio
}

//Since 5.3
/// <summary>
/// Get all "orphaned" elements
/// </summary>
/// <param name="snapshot">The snapshot of the collection.</param>
/// <param name="entityName">The persistent class whose objects
/// the collection is expected to contain.</param>
/// <param name="cancellationToken">A cancellation token that can be used to cancel the work</param>
/// <returns>
/// An <see cref="ICollection"/> that contains all of the elements
/// that have been orphaned.
/// </returns>
/// <inheritdoc />
[Obsolete("This method has no more usages and will be removed in a future version")]
public override Task<ICollection> GetOrphansAsync(object snapshot, string entityName, CancellationToken cancellationToken)
{
@@ -177,8 +167,7 @@ public override Task<ICollection> GetOrphansAsync(object snapshot, string entity
}
try
{
var sn = (ISet<SnapshotElement>)GetSnapshot();
return Task.FromResult<ICollection>(GetOrphans(sn.ToArray(x => x.Value), (ICollection) _values, entityName, Session));
return Task.FromResult<ICollection>(GetOrphans(snapshot, entityName));
}
catch (Exception ex)
{
15 changes: 2 additions & 13 deletions src/NHibernate/Async/Collection/Generic/PersistentGenericList.cs
Original file line number Diff line number Diff line change
@@ -31,17 +31,7 @@ public partial class PersistentGenericList<T> : AbstractPersistentCollection, IL
{

//Since 5.3
/// <summary>
/// Get all "orphaned" elements
/// </summary>
/// <param name="snapshot">The snapshot of the collection.</param>
/// <param name="entityName">The persistent class whose objects
/// the collection is expected to contain.</param>
/// <param name="cancellationToken">A cancellation token that can be used to cancel the work</param>
/// <returns>
/// An <see cref="ICollection"/> that contains all of the elements
/// that have been orphaned.
/// </returns>
/// <inheritdoc />
[Obsolete("This method has no more usages and will be removed in a future version")]
public override Task<ICollection> GetOrphansAsync(object snapshot, string entityName, CancellationToken cancellationToken)
{
@@ -51,8 +41,7 @@ public override Task<ICollection> GetOrphansAsync(object snapshot, string entity
}
try
{
var sn = (IList<T>)snapshot;
return Task.FromResult<ICollection>(GetOrphans((ICollection)sn, (ICollection) WrappedList, entityName, Session));
return Task.FromResult<ICollection>(GetOrphans(snapshot, entityName));
}
catch (Exception ex)
{
15 changes: 2 additions & 13 deletions src/NHibernate/Async/Collection/Generic/PersistentGenericMap.cs
Original file line number Diff line number Diff line change
@@ -31,17 +31,7 @@ public partial class PersistentGenericMap<TKey, TValue> : AbstractPersistentColl
{

//Since 5.3
/// <summary>
/// Get all "orphaned" elements
/// </summary>
/// <param name="snapshot">The snapshot of the collection.</param>
/// <param name="entityName">The persistent class whose objects
/// the collection is expected to contain.</param>
/// <param name="cancellationToken">A cancellation token that can be used to cancel the work</param>
/// <returns>
/// An <see cref="ICollection"/> that contains all of the elements
/// that have been orphaned.
/// </returns>
/// <inheritdoc />
[Obsolete("This method has no more usages and will be removed in a future version")]
public override Task<ICollection> GetOrphansAsync(object snapshot, string entityName, CancellationToken cancellationToken)
{
@@ -51,8 +41,7 @@ public override Task<ICollection> GetOrphansAsync(object snapshot, string entity
}
try
{
var sn = (IDictionary<TKey, TValue>) snapshot;
return Task.FromResult<ICollection>(GetOrphans((ICollection)sn.Values, (ICollection)WrappedMap.Values, entityName, Session));
return Task.FromResult<ICollection>(GetOrphans(snapshot, entityName));
}
catch (Exception ex)
{
19 changes: 2 additions & 17 deletions src/NHibernate/Async/Collection/Generic/PersistentGenericSet.cs
Original file line number Diff line number Diff line change
@@ -32,17 +32,7 @@ public partial class PersistentGenericSet<T> : AbstractPersistentCollection, ISe
{

//Since 5.3
/// <summary>
/// Get all "orphaned" elements
/// </summary>
/// <param name="snapshot">The snapshot of the collection.</param>
/// <param name="entityName">The persistent class whose objects
/// the collection is expected to contain.</param>
/// <param name="cancellationToken">A cancellation token that can be used to cancel the work</param>
/// <returns>
/// An <see cref="ICollection"/> that contains all of the elements
/// that have been orphaned.
/// </returns>
/// <inheritdoc />
[Obsolete("This method has no more usages and will be removed in a future version")]
public override Task<ICollection> GetOrphansAsync(object snapshot, string entityName, CancellationToken cancellationToken)
{
@@ -52,12 +42,7 @@ public override Task<ICollection> GetOrphansAsync(object snapshot, string entity
}
try
{
var sn = new SetSnapShot<T>((IEnumerable<T>)snapshot);

// TODO: Avoid duplicating shortcuts and array copy, by making base class GetOrphans() more flexible
if (WrappedSet.Count == 0) return Task.FromResult<ICollection>(sn);
if (((ICollection)sn).Count == 0) return Task.FromResult<ICollection>(sn);
return Task.FromResult<ICollection>(GetOrphans(sn, WrappedSet.ToArray(), entityName, Session));
return Task.FromResult<ICollection>(GetOrphans(snapshot, entityName));
}
catch (Exception ex)
{
14 changes: 2 additions & 12 deletions src/NHibernate/Async/Collection/PersistentArrayHolder.cs
Original file line number Diff line number Diff line change
@@ -28,17 +28,7 @@ public partial class PersistentArrayHolder : AbstractPersistentCollection, IColl
{

//Since 5.3
/// <summary>
/// Get all "orphaned" elements
/// </summary>
/// <param name="snapshot">The snapshot of the collection.</param>
/// <param name="entityName">The persistent class whose objects
/// the collection is expected to contain.</param>
/// <param name="cancellationToken">A cancellation token that can be used to cancel the work</param>
/// <returns>
/// An <see cref="ICollection"/> that contains all of the elements
/// that have been orphaned.
/// </returns>
/// <inheritdoc />
[Obsolete("This method has no more usages and will be removed in a future version")]
public override Task<ICollection> GetOrphansAsync(object snapshot, string entityName, CancellationToken cancellationToken)
{
@@ -48,7 +38,7 @@ public override Task<ICollection> GetOrphansAsync(object snapshot, string entity
}
try
{
return Task.FromResult<ICollection>(GetOrphans((object[]) snapshot, (object[]) array, entityName, Session));
return Task.FromResult<ICollection>(GetOrphans(snapshot, entityName));
}
catch (Exception ex)
{
1 change: 1 addition & 0 deletions src/NHibernate/Async/Impl/AbstractQueryImpl2.cs
Original file line number Diff line number Diff line change
@@ -119,6 +119,7 @@ public abstract partial class AbstractQueryImpl2 : AbstractQueryImpl
}

// Since v5.2
/// <inheritdoc />
[Obsolete("This method has no usages and will be removed in a future version")]
protected internal override Task<IEnumerable<ITranslator>> GetTranslatorsAsync(ISessionImplementor sessionImplementor, QueryParameters queryParameters, CancellationToken cancellationToken)
{
1 change: 1 addition & 0 deletions src/NHibernate/Async/Impl/CollectionFilterImpl.cs
Original file line number Diff line number Diff line change
@@ -61,6 +61,7 @@ public partial class CollectionFilterImpl : QueryImpl
}

// Since v5.2
/// <inheritdoc />
[Obsolete("This method has no usages and will be removed in a future version")]
protected internal override Task<IEnumerable<ITranslator>> GetTranslatorsAsync(ISessionImplementor session, QueryParameters queryParameters, CancellationToken cancellationToken)
{
1 change: 1 addition & 0 deletions src/NHibernate/Async/Impl/ExpressionQueryImpl.cs
Original file line number Diff line number Diff line change
@@ -81,6 +81,7 @@ internal partial class ExpressionFilterImpl : ExpressionQueryImpl
}

// Since v5.2
/// <inheritdoc />
[Obsolete("This method has no usages and will be removed in a future version")]
protected internal override Task<IEnumerable<ITranslator>> GetTranslatorsAsync(ISessionImplementor session, QueryParameters queryParameters, CancellationToken cancellationToken)
{
1 change: 1 addition & 0 deletions src/NHibernate/Async/Impl/SqlQueryImpl.cs
Original file line number Diff line number Diff line change
@@ -107,6 +107,7 @@ public partial class SqlQueryImpl : AbstractQueryImpl, ISQLQuery, ISynchronizabl
}

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