Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a shortcut to make it easier to make nhibernate the default
persistence
- Loading branch information
1 parent
ac0c22f
commit 6b9d1cb
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/nhibernate/NServiceBus.NHibernate/Persistence/NHibernate/NHibernatePersistence.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
namespace NServiceBus.Persistence.NHibernate | ||
{ | ||
using Config; | ||
using Gateway.Persistence; | ||
using Saga; | ||
using Timeout.Core; | ||
using Unicast.Subscriptions; | ||
|
||
public class NHibernatePersistence | ||
{ | ||
public static void UseAsDefault() | ||
{ | ||
InfrastructureServices.SetDefaultFor<ISagaPersister>(() => Configure.Instance.UseNHibernateSagaPersister()); | ||
InfrastructureServices.SetDefaultFor<IPersistTimeouts>(() => Configure.Instance.UseNHibernateTimeoutPersister()); | ||
InfrastructureServices.SetDefaultFor<IPersistMessages>(() => Configure.Instance.UseNHibernateGatewayPersister()); | ||
InfrastructureServices.SetDefaultFor<ISubscriptionStorage>(() => Configure.Instance.UseNHibernateSubscriptionPersister()); | ||
} | ||
} | ||
} |
6b9d1cb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a shortcut for u only @andreasohlund ?
6b9d1cb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.