BsonWriterState.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 BsonWriter.
  19. /// </summary>
  20. public enum BsonWriterState
  21. {
  22. /// <summary>
  23. /// The initial state.
  24. /// </summary>
  25. Initial,
  26. /// <summary>
  27. /// The writer is positioned to write a name.
  28. /// </summary>
  29. Name,
  30. /// <summary>
  31. /// The writer is positioned to write a value.
  32. /// </summary>
  33. Value,
  34. /// <summary>
  35. /// The writer is positioned to write a scope document (call WriteStartDocument to start writing the scope document).
  36. /// </summary>
  37. ScopeDocument,
  38. /// <summary>
  39. /// The writer is done.
  40. /// </summary>
  41. Done,
  42. /// <summary>
  43. /// The writer is closed.
  44. /// </summary>
  45. Closed
  46. }
  47. }