1. 12 Sep, 2017 1 commit
  2. 02 Aug, 2017 1 commit
  3. 13 Jul, 2017 1 commit
  4. 24 May, 2017 2 commits
    • Jon Skeet's avatar
      0b07d7eb
    • Jon Skeet's avatar
      Convert C# projects to MSBuild (csproj) format · f26e8c2a
      Jon Skeet authored
      This has one important packaging change: the netstandard version now
      depends (implicitly) on netstandard1.6.1 rather than on individual
      packages. This is the preferred style of dependency, and shouldn't
      affect any users - see http://stackoverflow.com/questions/42946951
      for details.
      
      The tests are still NUnit, but NUnit doesn't support "dotnet test"
      yet; the test project is now an executable using NUnitLite. (When
      NUnit supports dotnet test, we can adapt to it.)
      
      Note that the project will now only work in Visual Studio 2017 (and
      Visual Studio Code, and from the command line with the .NET Core
      1.0.0 SDK); Visual Studio 2015 does *not* support this project file
      format.
      f26e8c2a
  5. 14 Jul, 2016 2 commits
  6. 20 Apr, 2016 1 commit
    • Jon Skeet's avatar
      Add C# codegen changes to enum value names (mostly C++) · 75626ed7
      Jon Skeet authored
      Overview of changes:
      - A new C#-specific command-line option, legacy_enum_values to revert to the old behavior
      - When legacy_enum_values isn't specified, we strip the enum name as a prefix, and PascalCase the value name
      - A new attribute within the C# code so that we can always tell the original in-proto name
      
      Regenerating the C# code with legacy_enum_values leads to code which still compiles and works - but
      there's more still to do.
      75626ed7
  7. 09 Feb, 2016 1 commit
  8. 04 Feb, 2016 2 commits
  9. 20 Jan, 2016 1 commit
    • Jon Skeet's avatar
      Ensure that FieldMask, Timestamp and Duration ToString() calls don't throw · dd43dcca
      Jon Skeet authored
      The usage of ICustomDiagnosticMessage here is non-essential - ToDiagnosticString
      doesn't actually get called by ToString() in this case, due to JsonFormatter code. It was
      intended to make it clearer that it *did* have a custom format... but then arguably I should
      do the same for Value, Struct, Any etc.
      
      Moving some of the code out of JsonFormatter and into Duration/Timestamp/FieldMask likewise
      feels somewhat nice, somewhat nasty... basically there are JSON-specific bits of formatting, but
      also domain-specific bits of computation. <sigh>
      
      Thoughts welcome.
      dd43dcca
  10. 13 Jan, 2016 1 commit
  11. 17 Dec, 2015 1 commit
  12. 21 Nov, 2015 1 commit
  13. 09 Nov, 2015 1 commit
  14. 05 Nov, 2015 1 commit
    • Jon Skeet's avatar
      Created a new exception for JSON failures. · 0fb39c4a
      Jon Skeet authored
      This is only thrown directly by JsonTokenizer, but surfaces from JsonParser as well. I've added doc comments to hopefully make everything clear.
      
      The exception is actually thrown by the reader within JsonTokenizer, in anticipation of keeping track of the location within the document, but that change is not within this PR.
      0fb39c4a
  15. 03 Nov, 2015 1 commit
    • Jon Skeet's avatar
      Implement JSON parsing in C#. · fb248822
      Jon Skeet authored
      This includes all the well-known types except Any.
      Some aspects are likely to require further work when the details of the JSON parsing expectations are hammered out in more detail. Some of these have "ignored" tests already.
      
      Note that the choice *not* to use Json.NET was made for two reasons:
      - Going from 0 dependencies to 1 dependency is a big hit, and there's not much benefit here
      - Json.NET parses more leniently than we'd want; accommodating that would be nearly as much work as writing the tokenizer
      This only really affects the JsonTokenizer, which could be replaced by Json.NET. The JsonParser code would be about the same length with Json.NET... but I wouldn't be as confident in it.
      fb248822
  16. 04 Sep, 2015 1 commit
    • Jon Skeet's avatar
      Pack/Unpack implementation for Any. · e50461d8
      Jon Skeet authored
      We still need the JSON representation, which relies on something like a DescriptorPool to fetch message types from based on the type URL. That will come a bit later.
      (The DescriptorPool comment in this commit is just a note which will prove useful if we use DescriptorPool itself.)
      e50461d8
  17. 10 Aug, 2015 1 commit
    • Jon Skeet's avatar
      More TODOs done. · f2732c7a
      Jon Skeet authored
      - Removed a TODO without change in DescriptorPool.LookupSymbol - the TODOs were around performance, and this is only used during descriptor initialization
      - Make the CodedInputStream limits read-only, adding a static factory method for the rare cases when this is useful
      - Extracted IDeepCloneable into its own file.
      f2732c7a
  18. 04 Aug, 2015 1 commit
  19. 02 Aug, 2015 2 commits
  20. 31 Jul, 2015 1 commit
  21. 30 Jul, 2015 2 commits
  22. 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
  23. 22 Jul, 2015 1 commit
  24. 21 Jul, 2015 1 commit
    • Jon Skeet's avatar
      Revamp to reflection. · 53c399a1
      Jon Skeet authored
      Changes in brief:
      1. Descriptor is now the entry point for all reflection.
      2. IReflectedMessage has gone; there's now a Descriptor property in IMessage, which is explicitly implemented (due to the static property).
      3. FieldAccessorTable has gone away
      4. IFieldAccessor and OneofFieldAccessor still exist; we *could* put the functionality straight into FieldDescriptor and OneofDescriptor... I'm unsure about that.
      5. There's a temporary property MessageDescriptor.FieldAccessorsByFieldNumber to make the test changes small - we probably want this to go away
      6. Discovery for delegates is now via attributes applied to properties and the Clear method of a oneof
      
      I'm happy with 1-3.
      4 I'm unsure about - feedback welcome.
      5 will go away
      6 I'm unsure about, both in design and implementation. Should we have a ProtobufMessageAttribute too? Should we find all the relevant attributes in MessageDescriptor and pass them down, to avoid an O(N^2) scenario?
      
      Generated code changes coming in the next commit.
      53c399a1
  25. 17 Jul, 2015 1 commit
  26. 16 Jul, 2015 1 commit
  27. 14 Jul, 2015 3 commits
    • Jon Skeet's avatar
      Generate the well-known types in C# · 739d13d5
      Jon Skeet authored
      This involves:
      - Specifying a namespace in each proto (including ones we'd previously missed)
      - Updating the generation script
      - Changing codegen to implement IReflectedMessage.Fields explicitly (a good thing anyway)
      - Changing reflection tests to take account of the explicit interface implementation
      
      Non-generated code in this commit; generated code to follow
      739d13d5
    • Jon Skeet's avatar
      Changing reflection namespace (part 3) · 9c888fa3
      Jon Skeet authored
      Change the C# namespace in descriptor.proto to Google.Protobuf.Reflection.
      This then means changing where the generated code lives, which means updating the project file...
      
      It also involves regenerating the C++ - which has updated the well-known types as well,
      for no terribly obvious reason...
      9c888fa3
    • Jon Skeet's avatar
      Changing reflection namespace (part 1) · 9f37de96
      Jon Skeet authored
      - Move types into Google.Protobuf.Reflection
      - Change codegen to reflect that in generated types
      
      Generated code changes coming in part 2
      9f37de96
  28. 10 Jul, 2015 2 commits
  29. 09 Jul, 2015 2 commits
    • Jon Skeet's avatar
      Fix descriptor reflection in various ways · af259b77
      Jon Skeet authored
      - The protos are no longer publicly exposed at all
      - Oneof detection now works (as we default to -1, not 0)
      - OneofDescriptor exposes the fields in the oneof
      - Removed unnecessary code for replacing protos - remnant of extensions
      - There's now just the non-generic form of IDescriptor
      af259b77
    • 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
  30. 26 Jun, 2015 1 commit
  31. 25 Jun, 2015 1 commit