GuidRepresentation.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. #if NET452
  22. [Serializable]
  23. #endif
  24. public enum GuidRepresentation
  25. {
  26. /// <summary>
  27. /// The representation for Guids is unspecified, so conversion between Guids and Bson binary data is not possible.
  28. /// </summary>
  29. Unspecified = 0,
  30. /// <summary>
  31. /// Use the new standard representation for Guids (binary subtype 4 with bytes in network byte order).
  32. /// </summary>
  33. Standard,
  34. /// <summary>
  35. /// Use the representation used by older versions of the C# driver (including most community provided C# drivers).
  36. /// </summary>
  37. CSharpLegacy,
  38. /// <summary>
  39. /// Use the representation used by older versions of the Java driver.
  40. /// </summary>
  41. JavaLegacy,
  42. /// <summary>
  43. /// Use the representation used by older versions of the Python driver.
  44. /// </summary>
  45. PythonLegacy
  46. }
  47. }