| Index: third_party/protobuf/csharp/src/Google.Protobuf/Reflection/OriginalNameAttribute.cs
|
| diff --git a/third_party/protobuf/csharp/src/Google.Protobuf/Reflection/IDescriptor.cs b/third_party/protobuf/csharp/src/Google.Protobuf/Reflection/OriginalNameAttribute.cs
|
| similarity index 73%
|
| copy from third_party/protobuf/csharp/src/Google.Protobuf/Reflection/IDescriptor.cs
|
| copy to third_party/protobuf/csharp/src/Google.Protobuf/Reflection/OriginalNameAttribute.cs
|
| index 318d58c968a58a35a3ccd45ee1c7b1f0df275546..27f9ab98c324707cddadaea2130e23fdcb023fed 100644
|
| --- a/third_party/protobuf/csharp/src/Google.Protobuf/Reflection/IDescriptor.cs
|
| +++ b/third_party/protobuf/csharp/src/Google.Protobuf/Reflection/OriginalNameAttribute.cs
|
| @@ -1,4 +1,4 @@
|
| -#region Copyright notice and license
|
| +#region Copyright notice and license
|
| // Protocol Buffers - Google's data interchange format
|
| // Copyright 2008 Google Inc. All rights reserved.
|
| // https://developers.google.com/protocol-buffers/
|
| @@ -30,26 +30,29 @@
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| #endregion
|
|
|
| +using System;
|
| +
|
| namespace Google.Protobuf.Reflection
|
| {
|
| /// <summary>
|
| - /// Interface implemented by all descriptor types.
|
| + /// Specifies the original name (in the .proto file) of a named element,
|
| + /// such as an enum value.
|
| /// </summary>
|
| - public interface IDescriptor
|
| + [AttributeUsage(AttributeTargets.Field)]
|
| + public class OriginalNameAttribute : Attribute
|
| {
|
| /// <summary>
|
| - /// Returns the name of the entity (message, field etc) being described.
|
| - /// </summary>
|
| - string Name { get; }
|
| -
|
| - /// <summary>
|
| - /// Returns the fully-qualified name of the entity being described.
|
| + /// The name of the element in the .proto file.
|
| /// </summary>
|
| - string FullName { get; }
|
| + public string Name { get; set; }
|
|
|
| /// <summary>
|
| - /// Returns the descriptor for the .proto file that this entity is part of.
|
| + /// Constructs a new attribute instance for the given name.
|
| /// </summary>
|
| - FileDescriptor File { get; }
|
| - }
|
| + /// <param name="name">The name of the element in the .proto file.</param>
|
| + public OriginalNameAttribute(string name)
|
| + {
|
| + Name = ProtoPreconditions.CheckNotNull(name, nameof(name));
|
| + }
|
| + }
|
| }
|
|
|