Commit 8cec65e7 authored by Jan Tattermusch's avatar Jan Tattermusch

added support for deprecated fields, reworded some todos

parent 16a3e2b9
...@@ -73,7 +73,7 @@ void ExtensionGenerator::Generate(Writer* writer) { ...@@ -73,7 +73,7 @@ void ExtensionGenerator::Generate(Writer* writer) {
SimpleItoa(descriptor_->number())); SimpleItoa(descriptor_->number()));
if (use_lite_runtime()) { if (use_lite_runtime()) {
// TODO(jtattermusch): check the argument... // TODO(jtattermusch): include the following check
//if (Descriptor.MappedType == MappedType.Message && Descriptor.MessageType.Options.MessageSetWireFormat) //if (Descriptor.MappedType == MappedType.Message && Descriptor.MessageType.Options.MessageSetWireFormat)
//{ //{
// throw new ArgumentException( // throw new ArgumentException(
...@@ -122,7 +122,7 @@ void ExtensionGenerator::GenerateStaticVariableInitializers(Writer* writer) { ...@@ -122,7 +122,7 @@ void ExtensionGenerator::GenerateStaticVariableInitializers(Writer* writer) {
} }
writer->WriteLine("$0$,", default_val); writer->WriteLine("$0$,", default_val);
} }
// TODO(jtattermusch): // TODO(jtattermusch): include following snippet
//writer.WriteLine("{0},", //writer.WriteLine("{0},",
// (Descriptor.MappedType == MappedType.Message) ? type + ".DefaultInstance" : "null"); // (Descriptor.MappedType == MappedType.Message) ? type + ".DefaultInstance" : "null");
//writer.WriteLine("{0},", //writer.WriteLine("{0},",
......
...@@ -61,11 +61,10 @@ FieldGeneratorBase::~FieldGeneratorBase() { ...@@ -61,11 +61,10 @@ FieldGeneratorBase::~FieldGeneratorBase() {
} }
void FieldGeneratorBase::AddDeprecatedFlag(Writer* writer) { void FieldGeneratorBase::AddDeprecatedFlag(Writer* writer) {
// TODO(jtattermusch): if (descriptor_->options().deprecated())
//if (IsObsolete) {
//{ writer->WriteLine("[global::System.ObsoleteAttribute()]");
// writer.WriteLine("[global::System.ObsoleteAttribute()]"); }
//}
} }
void FieldGeneratorBase::AddNullCheck(Writer* writer) { void FieldGeneratorBase::AddNullCheck(Writer* writer) {
......
...@@ -81,7 +81,6 @@ MessageGenerator::~MessageGenerator() { ...@@ -81,7 +81,6 @@ MessageGenerator::~MessageGenerator() {
} }
std::string MessageGenerator::class_name() { std::string MessageGenerator::class_name() {
// TODO: check correctness.
return descriptor_->name(); return descriptor_->name();
} }
......
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