GuidRepresentation.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* Copyright 2010-present 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. namespace MongoDB.Bson
  17. {
  18. /// <summary>
  19. /// Represents the representation to use when converting a Guid to a BSON binary value.
  20. /// </summary>
  21. [Serializable]
  22. public enum GuidRepresentation
  23. {
  24. /// <summary>
  25. /// The representation for Guids is unspecified, so conversion between Guids and Bson binary data is not possible.
  26. /// </summary>
  27. Unspecified = 0,
  28. /// <summary>
  29. /// Use the new standard representation for Guids (binary subtype 4 with bytes in network byte order).
  30. /// </summary>
  31. Standard,
  32. /// <summary>
  33. /// Use the representation used by older versions of the C# driver (including most community provided C# drivers).
  34. /// </summary>
  35. CSharpLegacy,
  36. /// <summary>
  37. /// Use the representation used by older versions of the Java driver.
  38. /// </summary>
  39. JavaLegacy,
  40. /// <summary>
  41. /// Use the representation used by older versions of the Python driver.
  42. /// </summary>
  43. PythonLegacy
  44. }
  45. }