-
Notifications
You must be signed in to change notification settings - Fork 2k
/
StreamPosition.cs
40 lines (37 loc) · 1.28 KB
/
StreamPosition.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System;
namespace Orleans.Streams
{
/// <summary>
/// Stream position uniquely identifies the position of an event in a stream.
/// If acquiring a stream position for a batch of events, the stream position will be of the first event in the batch.
/// </summary>
public class StreamPosition
{
/// <summary>
/// Stream position consists of the stream identity and the sequence token
/// </summary>
/// <param name="streamIdentity"></param>
/// <param name="sequenceToken"></param>
public StreamPosition(IStreamIdentity streamIdentity, StreamSequenceToken sequenceToken)
{
if (streamIdentity == null)
{
throw new ArgumentNullException("streamIdentity");
}
if (sequenceToken == null)
{
throw new ArgumentNullException("sequenceToken");
}
StreamIdentity = streamIdentity;
SequenceToken = sequenceToken;
}
/// <summary>
/// Identity of the stream
/// </summary>
public IStreamIdentity StreamIdentity { get; }
/// <summary>
/// Position in the stream
/// </summary>
public StreamSequenceToken SequenceToken { get; }
}
}