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

Side by Side 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, 6 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 unified diff | Download patch
OLDNEW
1 #region Copyright notice and license 1 #region Copyright notice and license
2 // Protocol Buffers - Google's data interchange format 2 // Protocol Buffers - Google's data interchange format
3 // Copyright 2008 Google Inc. All rights reserved. 3 // Copyright 2008 Google Inc. All rights reserved.
4 // https://developers.google.com/protocol-buffers/ 4 // https://developers.google.com/protocol-buffers/
5 // 5 //
6 // Redistribution and use in source and binary forms, with or without 6 // Redistribution and use in source and binary forms, with or without
7 // modification, are permitted provided that the following conditions are 7 // modification, are permitted provided that the following conditions are
8 // met: 8 // met:
9 // 9 //
10 // * Redistributions of source code must retain the above copyright 10 // * Redistributions of source code must retain the above copyright
11 // notice, this list of conditions and the following disclaimer. 11 // notice, this list of conditions and the following disclaimer.
(...skipping 11 matching lines...) Expand all
23 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 #endregion 31 #endregion
32 32
33 using System;
34
33 namespace Google.Protobuf.Reflection 35 namespace Google.Protobuf.Reflection
34 { 36 {
35 /// <summary> 37 /// <summary>
36 /// Interface implemented by all descriptor types. 38 /// Specifies the original name (in the .proto file) of a named element,
39 /// such as an enum value.
37 /// </summary> 40 /// </summary>
38 public interface IDescriptor 41 [AttributeUsage(AttributeTargets.Field)]
42 public class OriginalNameAttribute : Attribute
39 { 43 {
40 /// <summary> 44 /// <summary>
41 /// Returns the name of the entity (message, field etc) being described. 45 /// The name of the element in the .proto file.
42 /// </summary> 46 /// </summary>
43 string Name { get; } 47 public string Name { get; set; }
44 48
45 /// <summary> 49 /// <summary>
46 /// Returns the fully-qualified name of the entity being described. 50 /// Constructs a new attribute instance for the given name.
47 /// </summary> 51 /// </summary>
48 string FullName { get; } 52 /// <param name="name">The name of the element in the .proto file.</para m>
49 53 public OriginalNameAttribute(string name)
50 /// <summary> 54 {
51 /// Returns the descriptor for the .proto file that this entity is part of. 55 Name = ProtoPreconditions.CheckNotNull(name, nameof(name));
52 /// </summary> 56 }
53 FileDescriptor File { get; } 57 }
54 }
55 } 58 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698