ImplicitFields.cs 1.2 KB

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