CountOptions.cs 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /* Copyright 2010-2016 MongoDB Inc.
  2. *
  3. * Licensed under the Apache License, Version 2.0 (the "License");
  4. * you may not use this file except in compliance with the License.
  5. * You may obtain a copy of the License at
  6. *
  7. * http://www.apache.org/licenses/LICENSE-2.0
  8. *
  9. * Unless required by applicable law or agreed to in writing, software
  10. * distributed under the License is distributed on an "AS IS" BASIS,
  11. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. * See the License for the specific language governing permissions and
  13. * limitations under the License.
  14. */
  15. using System;
  16. using MongoDB.Bson;
  17. namespace MongoDB.Driver
  18. {
  19. /// <summary>
  20. /// Options for a count operation.
  21. /// </summary>
  22. public sealed class CountOptions
  23. {
  24. // fields
  25. private Collation _collation;
  26. private BsonValue _hint;
  27. private long? _limit;
  28. private TimeSpan? _maxTime;
  29. private long? _skip;
  30. // properties
  31. /// <summary>
  32. /// Gets or sets the collation.
  33. /// </summary>
  34. public Collation Collation
  35. {
  36. get { return _collation; }
  37. set { _collation = value; }
  38. }
  39. /// <summary>
  40. /// Gets or sets the hint.
  41. /// </summary>
  42. public BsonValue Hint
  43. {
  44. get { return _hint; }
  45. set { _hint = value; }
  46. }
  47. /// <summary>
  48. /// Gets or sets the limit.
  49. /// </summary>
  50. public long? Limit
  51. {
  52. get { return _limit; }
  53. set { _limit = value; }
  54. }
  55. /// <summary>
  56. /// Gets or sets the maximum time.
  57. /// </summary>
  58. public TimeSpan? MaxTime
  59. {
  60. get { return _maxTime; }
  61. set { _maxTime = value; }
  62. }
  63. /// <summary>
  64. /// Gets or sets the skip.
  65. /// </summary>
  66. public long? Skip
  67. {
  68. get { return _skip; }
  69. set { _skip = value; }
  70. }
  71. }
  72. }