-
Notifications
You must be signed in to change notification settings - Fork 1
/
MongoCursor.cs
56 lines (43 loc) · 1.31 KB
/
MongoCursor.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CSMongo.Requests;
namespace CSMongo {
/// <summary>
/// Contains information about a cursor for Mongo
/// </summary>
public class MongoCursor {
#region Constructors
/// <summary>
/// Creates a new MongoCursor
/// </summary>
public MongoCursor(QueryRequest query, long cursor, int count) {
this.Cursor = cursor;
this.Query = query;
this.ReturnCount = count;
}
#endregion
#region Properties
/// <summary>
/// The actual cursor value for this
/// </summary>
public long Cursor { get; private set; }
/// <summary>
/// The previous query request incase there is no
/// cursor information available
/// </summary>
public QueryRequest Query { get; private set; }
/// <summary>
/// The total number of records that were returned previously
/// </summary>
public int ReturnCount { get; private set; }
/// <summary>
/// Make certain there is a real cursor to use
/// </summary>
public bool HasCursor {
get { return this.Cursor > 0; }
}
#endregion
}
}