File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
MongoDB.Driver/Operations Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 15
15
16
16
using System ;
17
17
using System . Collections . Generic ;
18
+ using System . Linq ;
18
19
namespace MongoDB . Driver
19
20
{
20
21
/// <summary>
@@ -28,7 +29,7 @@ public class BulkWriteArgs
28
29
private bool ? _isOrdered ;
29
30
private int ? _maxBatchCount ;
30
31
private int ? _maxBatchLength ;
31
- private IEnumerable < WriteRequest > _requests = new List < WriteRequest > ( ) ;
32
+ private IEnumerable < WriteRequest > _requests = Enumerable . Empty < WriteRequest > ( ) ;
32
33
private WriteConcern _writeConcern ;
33
34
34
35
// public properties
@@ -95,7 +96,7 @@ public int? MaxBatchLength
95
96
public IEnumerable < WriteRequest > Requests
96
97
{
97
98
get { return _requests ; }
98
- set { _requests = value ?? new List < WriteRequest > ( ) ; }
99
+ set { _requests = value ?? Enumerable . Empty < WriteRequest > ( ) ; }
99
100
}
100
101
101
102
/// <summary>
You can’t perform that action at this time.
0 commit comments