BsonReaderState.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* Copyright 2010-2014 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. namespace MongoDB.Bson.IO
  16. {
  17. /// <summary>
  18. /// Represents the state of a reader.
  19. /// </summary>
  20. public enum BsonReaderState
  21. {
  22. /// <summary>
  23. /// The initial state.
  24. /// </summary>
  25. Initial,
  26. /// <summary>
  27. /// The reader is positioned at the type of an element or value.
  28. /// </summary>
  29. Type,
  30. /// <summary>
  31. /// The reader is positioned at the name of an element.
  32. /// </summary>
  33. Name,
  34. /// <summary>
  35. /// The reader is positioned at a value.
  36. /// </summary>
  37. Value,
  38. /// <summary>
  39. /// The reader is positioned at a scope document.
  40. /// </summary>
  41. ScopeDocument,
  42. /// <summary>
  43. /// The reader is positioned at the end of a document.
  44. /// </summary>
  45. EndOfDocument,
  46. /// <summary>
  47. /// The reader is positioned at the end of an array.
  48. /// </summary>
  49. EndOfArray,
  50. /// <summary>
  51. /// The reader has finished reading a document.
  52. /// </summary>
  53. Done,
  54. /// <summary>
  55. /// The reader is closed.
  56. /// </summary>
  57. Closed
  58. }
  59. }