From f3504cf3b1d456a843e8242fdee9ba0bf2991dc1 Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Tue, 28 Apr 2015 14:49:49 +0100 Subject: First part of making the C# runtime work with the new codegen. 1) Remove CSharpOptions 2) A new version of DescriptorProtoFile (with manual changes from codegen - it would otherwise be Descriptor.cs) 3) Turn off CLS compliance (which we'll remove from the codebase entirely; I don't think it's actually relevant these days) 4) Add "public imports" to FileDescriptor, with code broadly copied from the Java codebase. Lots more changes to commit before it will build and tests run, but one step at a time... --- .../ProtocolBuffers/Descriptors/MessageDescriptor.cs | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'csharp/src/ProtocolBuffers/Descriptors/MessageDescriptor.cs') diff --git a/csharp/src/ProtocolBuffers/Descriptors/MessageDescriptor.cs b/csharp/src/ProtocolBuffers/Descriptors/MessageDescriptor.cs index d438c0ff..5b29849c 100644 --- a/csharp/src/ProtocolBuffers/Descriptors/MessageDescriptor.cs +++ b/csharp/src/ProtocolBuffers/Descriptors/MessageDescriptor.cs @@ -158,25 +158,6 @@ namespace Google.ProtocolBuffers.Descriptors return File.DescriptorPool.FindFieldByNumber(this, number); } - /// - /// Finds a field by its property name, as it would be generated by protogen. - /// - /// The property name within this message type. - /// The field's descriptor, or null if not found. - public FieldDescriptor FindFieldByPropertyName(string propertyName) - { - // For reasonably short messages, this will be more efficient than a dictionary - // lookup. It also means we don't need to do things lazily with locks etc. - foreach (FieldDescriptor field in Fields) - { - if (field.CSharpOptions.PropertyName == propertyName) - { - return field; - } - } - return null; - } - /// /// Finds a nested descriptor by name. The is valid for fields, nested /// message types and enums. -- cgit v1.2.3