Commit 9134a21f authored by Jon Skeet's avatar Jon Skeet

Tweaks

parent cabd06d1
......@@ -38,3 +38,5 @@ o Nested types always end up under a "Types" static class which
is merely present to avoid name clashes.
o FileDescriptor.FindByName has been made generic to allow simple
type-safe searching for any nested type.
o No enum.valueOf for enums (due to them being simple C# enums)
o Public Builder constructors to aid C# object/collection initializers
......@@ -26,6 +26,12 @@ package protobuf_unittest;
option java_multiple_files = true;
option java_outer_classname = "MultipleFilesTestProto";
option csharp_namespace = "Google.ProtocolBuffers.TestProtos";
option csharp_file_classname = "MultiFileProto";
option csharp_multiple_files = true;
option csharp_nest_classes = false;
option csharp_public_classes = true;
message MessageWithNoOuter {
message NestedMessage {
optional int32 i = 1;
......
......@@ -215,9 +215,6 @@ void MessageGenerator::Generate(io::Printer* printer) {
}
printer->Indent();
printer->Print(
"// Use $classname$.CreateBuilder() to construct.\r\n"
"private $classname$() {}\r\n"
"\r\n"
"private static readonly $classname$ defaultInstance = new $classname$();\r\n"
"public static $classname$ DefaultInstance {\r\n"
" get { return defaultInstance; }\r\n"
......@@ -383,7 +380,7 @@ GenerateParseFromMethods(io::Printer* printer) {
"public static $classname$ ParseFrom(byte[] data) {\r\n"
" return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();\r\n"
"}\r\n"
"public static $classname$ parseFrom(byte[] data,\r\n"
"public static $classname$ ParseFrom(byte[] data,\r\n"
" pb::ExtensionRegistry extensionRegistry) {\r\n"
" return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))\r\n"
" .BuildParsed();\r\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment