Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Unified Diff: third_party/protobuf/csharp/src/Google.Protobuf/Reflection/OriginalNameAttribute.cs

Issue 1983203003: Update third_party/protobuf to protobuf-v3.0.0-beta-3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: owners Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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));
+ }
+ }
}

Powered by Google App Engine
This is Rietveld 408576698