Remove ugly bootstrapping - we don't need it now.

pull/288/head
Jon Skeet 16 years ago
parent 3f22511100
commit b8b7d4fca3
  1. 14
      src/ProtocolBuffers/DescriptorProtos/PartialClasses.cs
  2. 4
      src/ProtocolBuffers/UnknownFieldSet.cs

@ -35,20 +35,6 @@
// IDescriptorProto
namespace Google.ProtocolBuffers.DescriptorProtos {
// TODO(jonskeet): Find a better way of fixing this. It's needed in order to
// cope with unknown fields during initialization.
public partial class DescriptorProtoFile {
private static readonly bool initialized = false;
internal static bool Bootstrapping {
get { return !initialized; }
}
static DescriptorProtoFile() {
initialized = true;
}
}
public partial class DescriptorProto : IDescriptorProto<MessageOptions> { }
public partial class EnumDescriptorProto : IDescriptorProto<EnumOptions> { }
public partial class EnumValueDescriptorProto : IDescriptorProto<EnumValueOptions> { }

@ -472,10 +472,6 @@ namespace Google.ProtocolBuffers {
internal bool MergeFieldFrom(CodedInputStream input,
ExtensionRegistry extensionRegistry, IBuilder builder, uint tag) {
if (DescriptorProtoFile.Bootstrapping) {
return MergeFieldFrom(tag, input);
}
MessageDescriptor type = builder.DescriptorForType;
if (type.Options.MessageSetWireFormat && tag == WireFormat.MessageSetTag.ItemStart) {
MergeMessageSetExtensionFromCodedStream(input, extensionRegistry, builder);

Loading…
Cancel
Save