Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixing naming of event store call chain

  • Loading branch information...
commit d0c73ee4e369e890a968ef6791972a26b965094b 1 parent 5067c85
@abdullin abdullin authored
View
8 Cqrs.Azure/AppendOnly/BlobAppendOnlyStore.cs
@@ -84,14 +84,14 @@ public void Append(string streamName, byte[] data, long expectedStreamVersion =
}
}
- public IEnumerable<DataWithVersion> ReadRecords(string streamName, long afterVersion, int maxCount)
+ public IEnumerable<DataWithVersion> ReadRecords(string streamName, long startingFrom, int maxCount)
{
- return _cache.ReadRecords(streamName, afterVersion, maxCount);
+ return _cache.ReadRecords(streamName, startingFrom, maxCount);
}
- public IEnumerable<DataWithKey> ReadRecords(long afterVersion, int maxCount)
+ public IEnumerable<DataWithKey> ReadRecords(long startingFrom, int maxCount)
{
- return _cache.ReadRecords(afterVersion, maxCount);
+ return _cache.ReadRecords(startingFrom, maxCount);
}
View
2  Cqrs.Portable/MessageStorePublisher.cs
@@ -51,7 +51,7 @@ PublishResult PublishEventsIfAnyNew(long initialPosition, int count)
var publishedCount = 0;
foreach (var e in records)
{
- if (e.StoreVersion <= currentPosition)
+ if (e.StoreVersion < currentPosition)
{
throw new InvalidOperationException("Retrieved record with wrong position");
}
View
8 Cqrs.Portable/TapeStorage/FileAppendOnlyStore.cs
@@ -133,14 +133,14 @@ void EnsureWriterExists(long storeVersion)
_currentWriter = File.OpenWrite(Path.Combine(_info.FullName, fileName));
}
- public IEnumerable<DataWithVersion> ReadRecords(string streamName, long afterVersion, int maxCount)
+ public IEnumerable<DataWithVersion> ReadRecords(string streamName, long startingFrom, int maxCount)
{
- return _cache.ReadRecords(streamName, afterVersion, maxCount);
+ return _cache.ReadRecords(streamName, startingFrom, maxCount);
}
- public IEnumerable<DataWithKey> ReadRecords(long afterVersion, int maxCount)
+ public IEnumerable<DataWithKey> ReadRecords(long startingFrom, int maxCount)
{
- return _cache.ReadRecords(afterVersion, maxCount);
+ return _cache.ReadRecords(startingFrom, maxCount);
}
View
8 Cqrs.Portable/TapeStorage/IAppendOnlyStore.cs
@@ -23,17 +23,17 @@ public interface IAppendOnlyStore : IDisposable
/// Reads the records by stream name.
/// </summary>
/// <param name="streamName">The key.</param>
- /// <param name="afterVersion">The after version.</param>
+ /// <param name="startingFrom">The after version.</param>
/// <param name="maxCount">The max count.</param>
/// <returns></returns>
- IEnumerable<DataWithVersion> ReadRecords(string streamName, long afterVersion, int maxCount);
+ IEnumerable<DataWithVersion> ReadRecords(string streamName, long startingFrom, int maxCount);
/// <summary>
/// Reads the records across all streams.
/// </summary>
- /// <param name="afterVersion">The after version.</param>
+ /// <param name="startingFrom">The after version.</param>
/// <param name="maxCount">The max count.</param>
/// <returns></returns>
- IEnumerable<DataWithKey> ReadRecords(long afterVersion, int maxCount);
+ IEnumerable<DataWithKey> ReadRecords(long startingFrom, int maxCount);
void Close();
void ResetStore();
View
12 Cqrs.Portable/TapeStorage/MemoryTape.cs
@@ -49,10 +49,10 @@ public void Append(string streamName, byte[] data, long expectedStreamVersion =
_all = new List<DataWithKey>(_all) { new DataWithKey(streamName, data, result.Count, _all.Count+1)};
}
- public IEnumerable<DataWithVersion> ReadRecords(string streamName, long afterVersion, int maxCount)
+ public IEnumerable<DataWithVersion> ReadRecords(string streamName, long startingFrom, int maxCount)
{
- if (afterVersion < 0)
- throw new ArgumentOutOfRangeException("afterVersion", "Must be zero or greater.");
+ if (startingFrom < 0)
+ throw new ArgumentOutOfRangeException("startingFrom", "Must be zero or greater.");
if (maxCount <= 0)
throw new ArgumentOutOfRangeException("maxCount", "Must be more than zero.");
@@ -60,16 +60,16 @@ public IEnumerable<DataWithVersion> ReadRecords(string streamName, long afterVer
IList<DataWithVersion> bytes;
if (_dict.TryGetValue(streamName, out bytes))
{
- foreach (var bytese in bytes.Skip((int)afterVersion).Take(maxCount))
+ foreach (var bytese in bytes.Skip((int)startingFrom).Take(maxCount))
{
yield return bytese;
}
}
}
- public IEnumerable<DataWithKey> ReadRecords(long afterVersion, int maxCount)
+ public IEnumerable<DataWithKey> ReadRecords(long startingFrom, int maxCount)
{
- return _all.Skip((int) afterVersion).Take(maxCount);
+ return _all.Skip((int) startingFrom).Take(maxCount);
}
public void Close()
Please sign in to comment.
Something went wrong with that request. Please try again.