creating private ctor for builders is now the default (as it used to be for old codegen)

pull/288/head
Jan Tattermusch 10 years ago
parent f61e1791c0
commit d92de1742d
  1. 1
      src/google/protobuf/compiler/csharp/csharp_message.cc

@ -181,6 +181,7 @@ void MessageGenerator::Generate(Writer* writer) {
descriptor_->extension_range_count() > 0 ? "Extendable" : "Generated",
runtime_suffix());
writer->Indent();
writer->WriteLine("private $0$() { }", class_name()); // Private ctor.
// Must call MakeReadOnly() to make sure all lists are made read-only
writer->WriteLine(
"private static readonly $0$ defaultInstance = new $0$().MakeReadOnly();",

Loading…
Cancel
Save