diff options
author | Jon Skeet <jonskeet@google.com> | 2015-04-28 14:49:49 +0100 |
---|---|---|
committer | Jon Skeet <jonskeet@google.com> | 2015-04-28 14:53:24 +0100 |
commit | f3504cf3b1d456a843e8242fdee9ba0bf2991dc1 (patch) | |
tree | 019441e4649f66f6273a13bcff5dbafbd12fc9b6 /csharp/src/ProtocolBuffers/Descriptors/MessageDescriptor.cs | |
parent | b977c3ed63146525064463c33ddfaa96152989ed (diff) | |
download | protobuf-f3504cf3b1d456a843e8242fdee9ba0bf2991dc1.tar.gz protobuf-f3504cf3b1d456a843e8242fdee9ba0bf2991dc1.tar.bz2 protobuf-f3504cf3b1d456a843e8242fdee9ba0bf2991dc1.zip |
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...
Diffstat (limited to 'csharp/src/ProtocolBuffers/Descriptors/MessageDescriptor.cs')
-rw-r--r-- | csharp/src/ProtocolBuffers/Descriptors/MessageDescriptor.cs | 19 |
1 files changed, 0 insertions, 19 deletions
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 @@ -159,25 +159,6 @@ namespace Google.ProtocolBuffers.Descriptors }
/// <summary>
- /// Finds a field by its property name, as it would be generated by protogen.
- /// </summary>
- /// <param name="propertyName">The property name within this message type.</param>
- /// <returns>The field's descriptor, or null if not found.</returns>
- 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;
- }
-
- /// <summary>
/// Finds a nested descriptor by name. The is valid for fields, nested
/// message types and enums.
/// </summary>
|