Permalink
Browse files

RegisterListener should allow a fluent interface, and RegisterListene…

…r do not exists on IDocumentStore
  • Loading branch information...
1 parent 894cdd1 commit 32fcd17a37ff8c98dd49f31a40daaa97fc6ce37b @ayende ayende committed Jun 22, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 Raven.Client.Lightweight/Document/DocumentStore.cs
@@ -362,7 +362,7 @@ public IDocumentSession OpenSession(string database, ICredentials credentialsFor
/// </summary>
/// <param name="documentStoreListener">The document store listener.</param>
/// <returns></returns>
- public IDocumentStore RegisterListener(IDocumentStoreListener documentStoreListener)
+ public DocumentStore RegisterListener(IDocumentStoreListener documentStoreListener)
{
listeners.StoreListeners = listeners.StoreListeners.Concat(new[] { documentStoreListener }).ToArray();
return this;
@@ -486,7 +486,7 @@ protected virtual void InitializeInternal()
/// </summary>
/// <param name="deleteListener">The delete listener.</param>
/// <returns></returns>
- public IDocumentStore RegisterListener(IDocumentDeleteListener deleteListener)
+ public DocumentStore RegisterListener(IDocumentDeleteListener deleteListener)
{
listeners.DeleteListeners = listeners.DeleteListeners.Concat(new[] { deleteListener }).ToArray();
return this;
@@ -495,15 +495,15 @@ public IDocumentStore RegisterListener(IDocumentDeleteListener deleteListener)
/// <summary>
/// Registers the query listener.
/// </summary>
- public IDocumentStore RegisterListener(IDocumentQueryListener queryListener)
+ public DocumentStore RegisterListener(IDocumentQueryListener queryListener)
{
listeners.QueryListeners = listeners.QueryListeners.Concat(new[] { queryListener }).ToArray();
return this;
}
/// <summary>
/// Registers the convertion listener.
/// </summary>
- public IDocumentStore RegisterListener(IDocumentConversionListener conversionListener)
+ public DocumentStore RegisterListener(IDocumentConversionListener conversionListener)
{
listeners.ConversionListeners = listeners.ConversionListeners.Concat(new[] { conversionListener, }).ToArray();
return this;

0 comments on commit 32fcd17

Please sign in to comment.