aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJon Skeet <jonskeet@google.com>2015-07-14 14:26:31 +0100
committerJon Skeet <jonskeet@google.com>2015-07-14 14:26:31 +0100
commit739d13d5d1f93e8bf8770081d1500372758fffa1 (patch)
tree2555c21a1eb6b78575aa3e16195a597addeda05b /src
parent1660c5631e798883139996ea10cba5e602779578 (diff)
downloadprotobuf-739d13d5d1f93e8bf8770081d1500372758fffa1.tar.gz
protobuf-739d13d5d1f93e8bf8770081d1500372758fffa1.tar.bz2
protobuf-739d13d5d1f93e8bf8770081d1500372758fffa1.zip
Generate the well-known types in C#
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
Diffstat (limited to 'src')
-rw-r--r--src/google/protobuf/any.proto2
-rw-r--r--src/google/protobuf/api.proto1
-rw-r--r--src/google/protobuf/compiler/csharp/csharp_message.cc2
-rw-r--r--src/google/protobuf/duration.proto2
-rw-r--r--src/google/protobuf/empty.proto1
-rw-r--r--src/google/protobuf/field_mask.proto2
-rw-r--r--src/google/protobuf/source_context.proto1
-rw-r--r--src/google/protobuf/struct.proto2
-rw-r--r--src/google/protobuf/timestamp.proto2
-rw-r--r--src/google/protobuf/type.proto1
-rw-r--r--src/google/protobuf/wrappers.proto2
11 files changed, 11 insertions, 7 deletions
diff --git a/src/google/protobuf/any.proto b/src/google/protobuf/any.proto
index 458dfff2..d3ad3acc 100644
--- a/src/google/protobuf/any.proto
+++ b/src/google/protobuf/any.proto
@@ -35,7 +35,7 @@ option java_generate_equals_and_hash = true;
option java_multiple_files = true;
option java_outer_classname = "AnyProto";
option java_package = "com.google.protobuf";
-option csharp_namespace = "Google.Protobuf";
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
option objc_class_prefix = "GPB";
diff --git a/src/google/protobuf/api.proto b/src/google/protobuf/api.proto
index f368c24d..d6c2a8b3 100644
--- a/src/google/protobuf/api.proto
+++ b/src/google/protobuf/api.proto
@@ -37,6 +37,7 @@ import "google/protobuf/type.proto";
option java_multiple_files = true;
option java_outer_classname = "ApiProto";
option java_package = "com.google.protobuf";
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
option objc_class_prefix = "GPB";
diff --git a/src/google/protobuf/compiler/csharp/csharp_message.cc b/src/google/protobuf/compiler/csharp/csharp_message.cc
index 7cbba911..4acc899b 100644
--- a/src/google/protobuf/compiler/csharp/csharp_message.cc
+++ b/src/google/protobuf/compiler/csharp/csharp_message.cc
@@ -215,7 +215,7 @@ void MessageGenerator::Generate(io::Printer* printer) {
" get { return $descriptor_accessor$; }\n"
"}\n"
"\n"
- "public pbr::FieldAccessorTable Fields {\n"
+ "pbr::FieldAccessorTable pb::IReflectedMessage.Fields {\n"
" get { return $umbrella_class_name$.internal__$identifier$__FieldAccessorTable; }\n"
"}\n"
"\n"
diff --git a/src/google/protobuf/duration.proto b/src/google/protobuf/duration.proto
index dc6b575f..0762c3c2 100644
--- a/src/google/protobuf/duration.proto
+++ b/src/google/protobuf/duration.proto
@@ -35,7 +35,7 @@ option java_generate_equals_and_hash = true;
option java_multiple_files = true;
option java_outer_classname = "DurationProto";
option java_package = "com.google.protobuf";
-option csharp_namespace = "Google.Protobuf";
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
option objc_class_prefix = "GPB";
// A Duration represents a signed, fixed-length span of time represented
diff --git a/src/google/protobuf/empty.proto b/src/google/protobuf/empty.proto
index 94df0397..363ec175 100644
--- a/src/google/protobuf/empty.proto
+++ b/src/google/protobuf/empty.proto
@@ -34,6 +34,7 @@ package google.protobuf;
option java_multiple_files = true;
option java_outer_classname = "EmptyProto";
option java_package = "com.google.protobuf";
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
option objc_class_prefix = "GPB";
diff --git a/src/google/protobuf/field_mask.proto b/src/google/protobuf/field_mask.proto
index ad7a1dfa..c19f4410 100644
--- a/src/google/protobuf/field_mask.proto
+++ b/src/google/protobuf/field_mask.proto
@@ -34,7 +34,7 @@ package google.protobuf;
option java_multiple_files = true;
option java_outer_classname = "FieldMaskProto";
option java_package = "com.google.protobuf";
-option csharp_namespace = "Google.Protobuf";
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
option objc_class_prefix = "GPB";
diff --git a/src/google/protobuf/source_context.proto b/src/google/protobuf/source_context.proto
index 2c8a17a8..98d4920a 100644
--- a/src/google/protobuf/source_context.proto
+++ b/src/google/protobuf/source_context.proto
@@ -34,6 +34,7 @@ package google.protobuf;
option java_multiple_files = true;
option java_outer_classname = "SourceContextProto";
option java_package = "com.google.protobuf";
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
option objc_class_prefix = "GPB";
diff --git a/src/google/protobuf/struct.proto b/src/google/protobuf/struct.proto
index a0ec961d..4ff10cd0 100644
--- a/src/google/protobuf/struct.proto
+++ b/src/google/protobuf/struct.proto
@@ -35,7 +35,7 @@ option java_generate_equals_and_hash = true;
option java_multiple_files = true;
option java_outer_classname = "StructProto";
option java_package = "com.google.protobuf";
-option csharp_namespace = "Google.Protobuf";
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
option objc_class_prefix = "GPB";
diff --git a/src/google/protobuf/timestamp.proto b/src/google/protobuf/timestamp.proto
index d49bd766..11f258da 100644
--- a/src/google/protobuf/timestamp.proto
+++ b/src/google/protobuf/timestamp.proto
@@ -35,7 +35,7 @@ option java_generate_equals_and_hash = true;
option java_multiple_files = true;
option java_outer_classname = "TimestampProto";
option java_package = "com.google.protobuf";
-option csharp_namespace = "Google.Protobuf";
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
option objc_class_prefix = "GPB";
diff --git a/src/google/protobuf/type.proto b/src/google/protobuf/type.proto
index ace5d995..ce22d33d 100644
--- a/src/google/protobuf/type.proto
+++ b/src/google/protobuf/type.proto
@@ -37,6 +37,7 @@ import "google/protobuf/source_context.proto";
option java_multiple_files = true;
option java_outer_classname = "TypeProto";
option java_package = "com.google.protobuf";
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
option objc_class_prefix = "GPB";
diff --git a/src/google/protobuf/wrappers.proto b/src/google/protobuf/wrappers.proto
index 14725524..6d3181bf 100644
--- a/src/google/protobuf/wrappers.proto
+++ b/src/google/protobuf/wrappers.proto
@@ -40,7 +40,7 @@ package google.protobuf;
option java_multiple_files = true;
option java_outer_classname = "WrappersProto";
option java_package = "com.google.protobuf";
-option csharp_namespace = "Google.Protobuf";
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
option objc_class_prefix = "GPB";