[smuxi] [Engine] Added Flush() to IMessageBuffer



commit 8feb126178d452e72ce95531266dc759e691088e
Author: Mirco Bauer <meebey meebey net>
Date:   Sun Feb 26 11:46:40 2012 +0100

    [Engine] Added Flush() to IMessageBuffer

 src/Engine/MessageBuffers/Db4oMessageBuffer.cs |    2 +-
 src/Engine/MessageBuffers/GitMessageBuffer.cs  |    2 +-
 src/Engine/MessageBuffers/IMessageBuffer.cs    |    1 +
 src/Engine/MessageBuffers/ListMessageBuffer.cs |    5 +++++
 src/Engine/MessageBuffers/MessageBufferBase.cs |    2 +-
 5 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/Engine/MessageBuffers/Db4oMessageBuffer.cs b/src/Engine/MessageBuffers/Db4oMessageBuffer.cs
index 5ad9201..b94b22a 100644
--- a/src/Engine/MessageBuffers/Db4oMessageBuffer.cs
+++ b/src/Engine/MessageBuffers/Db4oMessageBuffer.cs
@@ -621,7 +621,7 @@ namespace Smuxi.Engine
 #endif
         }
 
-        void Flush()
+        public override void Flush()
         {
             var counter = FlushCounter;
             if (counter == 0) {
diff --git a/src/Engine/MessageBuffers/GitMessageBuffer.cs b/src/Engine/MessageBuffers/GitMessageBuffer.cs
index 7debc76..75f2aa0 100644
--- a/src/Engine/MessageBuffers/GitMessageBuffer.cs
+++ b/src/Engine/MessageBuffers/GitMessageBuffer.cs
@@ -209,7 +209,7 @@ namespace Smuxi.Engine
         }
         #endregion
 
-        void Flush()
+        public override void Flush()
         {
             Trace.Call();
 
diff --git a/src/Engine/MessageBuffers/IMessageBuffer.cs b/src/Engine/MessageBuffers/IMessageBuffer.cs
index 65d8961..fcd1cc9 100644
--- a/src/Engine/MessageBuffers/IMessageBuffer.cs
+++ b/src/Engine/MessageBuffers/IMessageBuffer.cs
@@ -26,6 +26,7 @@ namespace Smuxi.Engine
     public interface IMessageBuffer : IList<MessageModel>, IDisposable
     {
         IList<MessageModel> GetRange(int offset, int limit);
+        void                Flush();
         int                 MaxCapacity { get; set; }
     }
 }
diff --git a/src/Engine/MessageBuffers/ListMessageBuffer.cs b/src/Engine/MessageBuffers/ListMessageBuffer.cs
index 03a1206..d6ef362 100644
--- a/src/Engine/MessageBuffers/ListMessageBuffer.cs
+++ b/src/Engine/MessageBuffers/ListMessageBuffer.cs
@@ -58,6 +58,11 @@ namespace Smuxi.Engine
             return base.GetRange(offset, limit);
         }
 
+        public void Flush()
+        {
+            // NOOP
+        }
+
         public void Dispose()
         {
             // NOOP
diff --git a/src/Engine/MessageBuffers/MessageBufferBase.cs b/src/Engine/MessageBuffers/MessageBufferBase.cs
index 144effb..823ab43 100644
--- a/src/Engine/MessageBuffers/MessageBufferBase.cs
+++ b/src/Engine/MessageBuffers/MessageBufferBase.cs
@@ -100,7 +100,7 @@ namespace Smuxi.Engine
         public abstract int IndexOf(MessageModel item);
         public abstract void Insert(int index, MessageModel item);
         public abstract void RemoveAt(int index);
-        public abstract IList<MessageModel> GetRange(int offset, int limit);
+        public abstract void Flush();
         public abstract void Dispose();
     }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]