ImplicitFields.cs 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. namespace ProtoBuf
  3. {
  4. /// <summary>
  5. /// Specifies the method used to infer field tags for members of the type
  6. /// under consideration. Tags are deduced using the invariant alphabetic
  7. /// sequence of the members' names; this makes implicit field tags very brittle,
  8. /// and susceptible to changes such as field names (normally an isolated
  9. /// change).
  10. /// </summary>
  11. public enum ImplicitFields
  12. {
  13. /// <summary>
  14. /// No members are serialized implicitly; all members require a suitable
  15. /// attribute such as [ProtoMember]. This is the recmomended mode for
  16. /// most scenarios.
  17. /// </summary>
  18. None = 0,
  19. /// <summary>
  20. /// Public properties and fields are eligible for implicit serialization;
  21. /// this treats the public API as a contract. Ordering beings from ImplicitFirstTag.
  22. /// </summary>
  23. AllPublic= 1,
  24. /// <summary>
  25. /// Public and non-public fields are eligible for implicit serialization;
  26. /// this acts as a state/implementation serializer. Ordering beings from ImplicitFirstTag.
  27. /// </summary>
  28. AllFields = 2
  29. }
  30. }