diff options
author | Jon Skeet <jonskeet@google.com> | 2015-07-14 10:24:52 +0100 |
---|---|---|
committer | Jon Skeet <jonskeet@google.com> | 2015-07-14 10:24:52 +0100 |
commit | 9f37de960fec523c42b47d982f3fdab5b2d4d4d9 (patch) | |
tree | 63b35102573a757990bb8af5c4a5fde9fe737572 /src | |
parent | 24f8626cc918b5aa58d6d3377d295a95f7049776 (diff) |
Changing reflection namespace (part 1)
- Move types into Google.Protobuf.Reflection
- Change codegen to reflect that in generated types
Generated code changes coming in part 2
Diffstat (limited to 'src')
-rw-r--r-- | src/google/protobuf/compiler/csharp/csharp_message.cc | 8 | ||||
-rw-r--r-- | src/google/protobuf/compiler/csharp/csharp_umbrella_class.cc | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/google/protobuf/compiler/csharp/csharp_message.cc b/src/google/protobuf/compiler/csharp/csharp_message.cc index 3fbec2b5..7cbba911 100644 --- a/src/google/protobuf/compiler/csharp/csharp_message.cc +++ b/src/google/protobuf/compiler/csharp/csharp_message.cc @@ -116,7 +116,7 @@ void MessageGenerator::GenerateStaticVariables(io::Printer* printer) { // The descriptor for this type. printer->Print( - "internal static pb::FieldAccess.FieldAccessorTable internal__$identifier$__FieldAccessorTable;\n", + "internal static pbr::FieldAccessorTable internal__$identifier$__FieldAccessorTable;\n", "identifier", GetUniqueFileScopeIdentifier(descriptor_), "full_class_name", full_class_name()); @@ -145,7 +145,7 @@ void MessageGenerator::GenerateStaticVariableInitializers(io::Printer* printer) printer->Print( vars, "internal__$identifier$__FieldAccessorTable = \n" - " new pb::FieldAccess.FieldAccessorTable(typeof($full_class_name$), $descriptor_chain$,\n"); + " new pbr::FieldAccessorTable(typeof($full_class_name$), $descriptor_chain$,\n"); printer->Print(" new string[] { "); for (int i = 0; i < descriptor_->field_count(); i++) { printer->Print("\"$property_name$\", ", @@ -211,11 +211,11 @@ void MessageGenerator::Generate(io::Printer* printer) { printer->Print( vars, - "public static pbd::MessageDescriptor Descriptor {\n" + "public static pbr::MessageDescriptor Descriptor {\n" " get { return $descriptor_accessor$; }\n" "}\n" "\n" - "public pb::FieldAccess.FieldAccessorTable Fields {\n" + "public pbr::FieldAccessorTable Fields {\n" " get { return $umbrella_class_name$.internal__$identifier$__FieldAccessorTable; }\n" "}\n" "\n" diff --git a/src/google/protobuf/compiler/csharp/csharp_umbrella_class.cc b/src/google/protobuf/compiler/csharp/csharp_umbrella_class.cc index 8fbd3e9a..b75c68a1 100644 --- a/src/google/protobuf/compiler/csharp/csharp_umbrella_class.cc +++ b/src/google/protobuf/compiler/csharp/csharp_umbrella_class.cc @@ -119,7 +119,7 @@ void UmbrellaClassGenerator::WriteIntroduction(io::Printer* printer) { "\n" "using pb = global::Google.Protobuf;\n" "using pbc = global::Google.Protobuf.Collections;\n" - "using pbd = global::Google.Protobuf.Descriptors;\n" + "using pbr = global::Google.Protobuf.Reflection;\n" "using scg = global::System.Collections.Generic;\n", "file_name", file_->name()); @@ -151,10 +151,10 @@ void UmbrellaClassGenerator::WriteIntroduction(io::Printer* printer) { void UmbrellaClassGenerator::WriteDescriptor(io::Printer* printer) { printer->Print( "#region Descriptor\n" - "public static pbd::FileDescriptor Descriptor {\n" + "public static pbr::FileDescriptor Descriptor {\n" " get { return descriptor; }\n" "}\n" - "private static pbd::FileDescriptor descriptor;\n" + "private static pbr::FileDescriptor descriptor;\n" "\n" "static $umbrella_class_name$() {\n", "umbrella_class_name", umbrellaClassname_); @@ -180,8 +180,8 @@ void UmbrellaClassGenerator::WriteDescriptor(io::Printer* printer) { // ----------------------------------------------------------------- // Invoke InternalBuildGeneratedFileFrom() to build the file. printer->Print( - "descriptor = pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,\n"); - printer->Print(" new pbd::FileDescriptor[] {\n"); + "descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,\n"); + printer->Print(" new pbr::FileDescriptor[] {\n"); for (int i = 0; i < file_->dependency_count(); i++) { printer->Print( " $full_umbrella_class_name$.Descriptor, \n", |