Skip to content

NH-3905 - upgrade async generator and regen #692

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

Merged
merged 3 commits into from
Sep 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion Tools/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
<package id="NUnit.Extension.NUnitV2ResultWriter" version="3.6.0" targetFramework="net461" />
<package id="NUnit.Extension.TeamCityEventListener" version="1.0.2" targetFramework="net461" />
<package id="NUnit.Extension.VSProjectLoader" version="3.6.0" targetFramework="net461" />
<package id="CSharpAsyncGenerator.CommandLine" version="0.4.4" targetFramework="net461" />
<package id="CSharpAsyncGenerator.CommandLine" version="0.5.0" targetFramework="net461" />
<package id="vswhere" version="2.1.4" targetFramework="net461" />
</packages>
6 changes: 6 additions & 0 deletions doc/reference/modules/quickstart.xml
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,12 @@ finally
cases.
</para>

<para>
Since NHibernate 5.0, the session and its queries IO bound methods have async counterparts.
Each call to an async method must be awaited before further interacting with the session or
its queries.
</para>

</sect1>

<sect1 id="quickstart-summary">
Expand Down
5 changes: 5 additions & 0 deletions doc/reference/modules/transactions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@
Never access the same <literal>ISession</literal> in two concurrent threads.
An <literal>ISession</literal> is usually only a single unit-of-work!
</para>
<para>
Since NHibernate 5.0, the session and its queries IO bound methods have async counterparts.
Each call to an async method must be awaited before further interacting with the session or
its queries.
</para>
</listitem>
</itemizedlist>
</sect1>
Expand Down
6 changes: 4 additions & 2 deletions src/AsyncGenerator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,6 @@
- hasAttributeName: TestAttribute
- hasAttributeName: TheoryAttribute
typeConversion:
- conversion: Ignore
name: NorthwindDbCreator
- conversion: Ignore
name: ObjectAssert
- conversion: Ignore
Expand All @@ -200,9 +198,13 @@
rule: IsTestCase
- conversion: Ignore
anyBaseTypeRule: IsTestCase
ignoreSearchForMethodReferences:
- hasAttributeName: TheoryAttribute
- hasAttributeName: TestAttribute
ignoreDocuments:
- filePathEndsWith: Linq\MathTests.cs
- filePathEndsWith: Linq\ExpressionSessionLeakTest.cs
- filePathEndsWith: Linq\NorthwindDbCreator.cs
cancellationTokens:
withoutCancellationToken:
- hasAttributeName: TestAttribute
Expand Down
3 changes: 0 additions & 3 deletions src/NHibernate.DomainModel/Async/CustomPersister.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ namespace NHibernate.DomainModel
{
using System.Threading.Tasks;
using System.Threading;
/// <content>
/// Contains generated async methods
/// </content>
public partial class CustomPersister : IEntityPersister
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ namespace NHibernate.Test.ConnectionStringTest
using System.Threading.Tasks;
using System.Threading;

/// <content>
/// Contains generated async methods
/// </content>
public partial class MockConnectionProvider : ConnectionProvider
{

Expand Down
3 changes: 0 additions & 3 deletions src/NHibernate.Test/Async/DebugConnectionProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ namespace NHibernate.Test
{
using System.Threading.Tasks;
using System.Threading;
/// <content>
/// Contains generated async methods
/// </content>
public partial class DebugConnectionProvider : DriverConnectionProvider
{

Expand Down
3 changes: 0 additions & 3 deletions src/NHibernate.Test/Async/DebugSessionFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ namespace NHibernate.Test
{
using System.Threading.Tasks;
using System.Threading;
/// <content>
/// Contains generated async methods
/// </content>
public partial class DebugSessionFactory : ISessionFactoryImplementor
{

Expand Down
5 changes: 0 additions & 5 deletions src/NHibernate.Test/Async/DynamicProxyTests/PeVerifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@
namespace NHibernate.Test.DynamicProxyTests
{
using System.Threading.Tasks;

/// <content>
/// Contains generated async methods
/// </content>

public partial class PeVerifier
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@

namespace NHibernate.Test.Events.Collections
{
/// <content>
/// Contains generated async methods
/// </content>
public partial class CollectionListeners
{

Expand All @@ -32,9 +29,6 @@ public partial class CollectionListeners

#region Nested type: InitializeCollectionListener

/// <content>
/// Contains generated async methods
/// </content>
public partial class InitializeCollectionListener : DefaultInitializeCollectionEventListener, IListener
{

Expand All @@ -53,9 +47,6 @@ public override async Task OnInitializeCollectionAsync(InitializeCollectionEvent

#region Nested type: PostCollectionRecreateListener

/// <content>
/// Contains generated async methods
/// </content>
public partial class PostCollectionRecreateListener : AbstractListener, IPostCollectionRecreateEventListener
{

Expand All @@ -81,9 +72,6 @@ public Task OnPostRecreateCollectionAsync(PostCollectionRecreateEvent @event, Ca

#region Nested type: PostCollectionRemoveListener

/// <content>
/// Contains generated async methods
/// </content>
public partial class PostCollectionRemoveListener : AbstractListener, IPostCollectionRemoveEventListener
{

Expand All @@ -109,9 +97,6 @@ public Task OnPostRemoveCollectionAsync(PostCollectionRemoveEvent @event, Cancel

#region Nested type: PostCollectionUpdateListener

/// <content>
/// Contains generated async methods
/// </content>
public partial class PostCollectionUpdateListener : AbstractListener, IPostCollectionUpdateEventListener
{

Expand All @@ -137,9 +122,6 @@ public Task OnPostUpdateCollectionAsync(PostCollectionUpdateEvent @event, Cancel

#region Nested type: PreCollectionRecreateListener

/// <content>
/// Contains generated async methods
/// </content>
public partial class PreCollectionRecreateListener : AbstractListener, IPreCollectionRecreateEventListener
{

Expand All @@ -165,9 +147,6 @@ public Task OnPreRecreateCollectionAsync(PreCollectionRecreateEvent @event, Canc

#region Nested type: PreCollectionRemoveListener

/// <content>
/// Contains generated async methods
/// </content>
public partial class PreCollectionRemoveListener : AbstractListener, IPreCollectionRemoveEventListener
{

Expand All @@ -193,9 +172,6 @@ public Task OnPreRemoveCollectionAsync(PreCollectionRemoveEvent @event, Cancella

#region Nested type: PreCollectionUpdateListener

/// <content>
/// Contains generated async methods
/// </content>
public partial class PreCollectionUpdateListener : AbstractListener, IPreCollectionUpdateEventListener
{

Expand Down
3 changes: 0 additions & 3 deletions src/NHibernate.Test/Async/Events/DisposableListenersTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ namespace NHibernate.Test.Events
{
using System.Threading.Tasks;
using System.Threading;
/// <content>
/// Contains generated async methods
/// </content>
public partial class MyDisposableListener : IPostUpdateEventListener, IDisposable
{
public Task OnPostUpdateAsync(PostUpdateEvent @event, CancellationToken cancellationToken)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ namespace NHibernate.Test.Events.PostEvents
using System.Threading.Tasks;
using System.Threading;

/// <content>
/// Contains generated async methods
/// </content>
public partial class AssertOldStatePostListener : IPostUpdateEventListener
{

Expand Down
3 changes: 0 additions & 3 deletions src/NHibernate.Test/Async/IdGen/Enhanced/SourceMock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ namespace NHibernate.Test.IdGen.Enhanced
{
using System.Threading.Tasks;
using System.Threading;
/// <content>
/// Contains generated async methods
/// </content>
public partial class SourceMock : IAccessCallback
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -677,9 +677,6 @@ public IBatcher CreateBatcher(ConnectionManager connectionManager, IInterceptor

#endregion
}
/// <content>
/// Contains generated async methods
/// </content>
public partial class InsertOrderingFixture : TestCase
{

Expand All @@ -695,9 +692,6 @@ public partial class InsertOrderingFixture : TestCase



/// <content>
/// Contains generated async methods
/// </content>
public partial class StatsBatcher : SqlClientBatchingBatcher
{

Expand Down
3 changes: 0 additions & 3 deletions src/NHibernate.Test/Async/Linq/ObjectDumper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
namespace NHibernate.Test.Linq
{
using System.Threading.Tasks;
/// <content>
/// Contains generated async methods
/// </content>
public partial class ObjectDumper
{

Expand Down
6 changes: 0 additions & 6 deletions src/NHibernate.Test/Async/Linq/QueryTimeoutTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,10 @@ public IBatcher CreateBatcher(ConnectionManager connectionManager, IInterceptor
}
}
}
/// <content>
/// Contains generated async methods
/// </content>
public partial class QueryTimeoutTests : LinqTestCase
{


/// <content>
/// Contains generated async methods
/// </content>
public partial class TimeoutCatchingNonBatchingBatcher : NonBatchingBatcher
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ namespace NHibernate.Test.NHSpecificTest.NH1054
{
using System.Threading.Tasks;
using System.Threading;
/// <content>
/// Contains generated async methods
/// </content>
public partial class DummyTransactionFactory : ITransactionFactory
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ namespace NHibernate.Test.NHSpecificTest.NH1230
{
using System.Threading.Tasks;
using System.Threading;
/// <content>
/// Contains generated async methods
/// </content>
public partial class PreSaveDoVeto : IPreInsertEventListener
{

Expand Down
1 change: 0 additions & 1 deletion src/NHibernate.Test/Async/NHSpecificTest/NH1270/Fixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
namespace NHibernate.Test.NHSpecificTest.NH1270
{
using System.Threading.Tasks;
using System.Threading;
[TestFixture]
public class FixtureAsync
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
namespace NHibernate.Test.NHSpecificTest.NH1274ExportExclude
{
using System.Threading.Tasks;
using System.Threading;
[TestFixture]
public class NH1274ExportExcludeFixtureAsync
{
Expand Down
6 changes: 0 additions & 6 deletions src/NHibernate.Test/Async/NHSpecificTest/NH1332/Fixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,9 @@ public void OnPostDelete(PostDeleteEvent @event)
}
}
}
/// <content>
/// Contains generated async methods
/// </content>
public partial class Fixture : BugTestCase
{

/// <content>
/// Contains generated async methods
/// </content>
public partial class PostCommitDelete : IPostDeleteEventListener
{
public Task OnPostDeleteAsync(PostDeleteEvent @event, CancellationToken cancellationToken)
Expand Down
1 change: 0 additions & 1 deletion src/NHibernate.Test/Async/NHSpecificTest/NH1487/Fixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
namespace NHibernate.Test.NHSpecificTest.NH1487
{
using System.Threading.Tasks;
using System.Threading;

/// <summary>
/// Summary description for TestTestCase.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ public async Task DbCommandsFromEventListenerShouldBeEnlistedInRunningTransactio
}
}

/// <content>
/// Contains generated async methods
/// </content>
public partial class MyCustomEventListener : IPreInsertEventListener
{
public async Task<bool> OnPreInsertAsync(PreInsertEvent e, CancellationToken cancellationToken)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ namespace NHibernate.Test.NHSpecificTest.NH1789
{
using System.Threading.Tasks;
using System.Threading;
/// <content>
/// Contains generated async methods
/// </content>
public abstract partial class DomainObject : IDomainObject
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,9 @@ public async Task TestInitializationDuringFlushAsync()
Assert.That(listener.FoundAny, Is.True);
}
}
/// <content>
/// Contains generated async methods
/// </content>
public partial class TestCollectionInitializingDuringFlush : TestCaseMappingByCode
{

/// <content>
/// Contains generated async methods
/// </content>
public partial class InitializingPreUpdateEventListener : IPreUpdateEventListener
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ namespace NHibernate.Test.NHSpecificTest.NH2322
{
using System.Threading.Tasks;
using System.Threading;
/// <content>
/// Contains generated async methods
/// </content>
public partial class PostUpdateEventListener : IPostUpdateEventListener
{
Task IPostUpdateEventListener.OnPostUpdateAsync(PostUpdateEvent @event, CancellationToken cancellationToken)
Expand Down
6 changes: 0 additions & 6 deletions src/NHibernate.Test/Async/NHSpecificTest/NH2583/Domain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ namespace NHibernate.Test.NHSpecificTest.NH2583
{
using System.Threading.Tasks;
using System.Threading;
/// <content>
/// Contains generated async methods
/// </content>
public partial class MyRef1
{

Expand All @@ -41,9 +38,6 @@ public partial class MyRef1
}
}

/// <content>
/// Contains generated async methods
/// </content>
public partial class MyBO
{

Expand Down
Loading