1. 07 Mar, 2016 1 commit
  2. 15 Jan, 2016 1 commit
  3. 01 Oct, 2015 1 commit
    • Jon Skeet's avatar
      Support ToString in RepeatedField and MapField. · 9ed6d4da
      Jon Skeet authored
      This changes how we approach JSON formatting in general - instead of looking  at the field a value came from, we just look at the type of the value. It's possible this *could* be slightly inefficient, but if we start caring about JSON performance deeply, we'll probably want to rewrite all of this anyway. It's definitely simpler this way.
      
      When we support dynamic messages, we'll need to modify JsonFormatter to handle enum values, as they won't come be "real" .NET enums at that point. It shouldn't be hard to do though.
      9ed6d4da
  4. 08 Aug, 2015 1 commit
  5. 04 Aug, 2015 1 commit
  6. 30 Jul, 2015 3 commits
  7. 27 Jul, 2015 1 commit
    • Jon Skeet's avatar
      First attempt at using profile 259 for Google.Protobuf. · 0dbd5ec8
      Jon Skeet authored
      This requires .NET 4.5, and there are a few compatibility changes required around reflection.
      Creating a PR from this to see how our CI systems handle it. Will want to add more documentation,
      validation and probably tests before merging.
      
      This is in aid of issue #590.
      0dbd5ec8
  8. 17 Jul, 2015 1 commit
  9. 16 Jul, 2015 3 commits
    • Jon Skeet's avatar
      First pass at wrapper types. · 8a0312b2
      Jon Skeet authored
      - We do still generate the message types, as otherwise reflection breaks, even though it doesn't actually use those types.
      - JSON handling hasn't been implemented yet
      8a0312b2
    • Jon Skeet's avatar
      Remove the struct-based iterator for RepeatedField. · 78b452b7
      Jon Skeet authored
      We don't use it in the runtime or generated code anywhere now, so the extra small performance boost isn't as critical, and it has some undesirable consequences.
      
      The tests have needed to change as iterator block enumerators don't throw when we might expect them to.
      78b452b7
    • Jan Tattermusch's avatar
      C# cleanup - assorted nits · ab5fffcc
      Jan Tattermusch authored
      ab5fffcc
  10. 09 Jul, 2015 2 commits
    • Jon Skeet's avatar
      Lots more tests for FieldCodec, MapField, RepeatedField · 14f2222a
      Jon Skeet authored
      ... and some implementation changes to go with them.
      14f2222a
    • Jon Skeet's avatar
      Implement reflection properly for fields. · 78ea98f5
      Jon Skeet authored
      - FieldAccessorTable is now non-generic
      - We don't have a static field per message type in the umbrella class. (Message descriptors are accessed via the file descriptor.)
      - Removed the "descriptor assigner" complication from the descriptor fixup; without extensions, we don't need it
      - MapField implements IDictionary (more tests would be good...)
      - RepeatedField implements IList (more tests would be good)
      - Use expression trees to build accessors. (Will need to test this on various platforms... probably need a fallback strategy just using reflection directly.)
      - Added FieldDescriptor.IsMap
      - Added tests for reflection with generated messages
      
      Changes to generated code coming in next commit.
      78ea98f5
  11. 30 Jun, 2015 3 commits
  12. 26 Jun, 2015 2 commits
    • Jon Skeet's avatar
      aa510414
    • Jon Skeet's avatar
      Tweaks and more tests for maps · c1283310
      Jon Skeet authored
      - Change the default message hash code to 1 to be consistent with other code
      - Change the empty list/map hash code to 0 as "empty map" is equivalent to "no map"
      - Removed map fields from unittest_proto3.proto
      - Created map_unittest_proto3.proto which is like map_unittest.proto but proto3-only
      - Fixed factory methods in FieldCodec highlighted by using all field types :)
      - Added tests for map serialization:
        - Extra fields within entries
        - Entries with value then key
        - Non-contiguous entries for the same map
        - Multiple entries for the same key
      
      Changes to generated code coming in next commit
      c1283310
  13. 24 Jun, 2015 1 commit
  14. 23 Jun, 2015 1 commit
  15. 19 Jun, 2015 1 commit
  16. 12 Jun, 2015 1 commit
    • Jon Skeet's avatar
      Reimplement RepeatedField<T> using an array as the backing store. · 7532f025
      Jon Skeet authored
      This is effectively reimplementing List<T>, but with a few advantages:
      - We know that an empty repeated field is common, so don't allocate an array until we need to
      - With direct access to the array, we can easily convert enum values to int without boxing
      - We can relax the restrictions over what happens if the repeated field is modified while iterating, avoiding so much checking
      
      This is somewhat risky, in that reimplementing a building block like this is *always* risky, but hey...
      (The performance benefits are significant...)
      7532f025
  17. 09 Jun, 2015 1 commit