aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/Google.Protobuf/Reflection/OriginalNameAttribute.cs
diff options
context:
space:
mode:
Diffstat (limited to 'csharp/src/Google.Protobuf/Reflection/OriginalNameAttribute.cs')
-rw-r--r--csharp/src/Google.Protobuf/Reflection/OriginalNameAttribute.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/csharp/src/Google.Protobuf/Reflection/OriginalNameAttribute.cs b/csharp/src/Google.Protobuf/Reflection/OriginalNameAttribute.cs
index 27f9ab98..07d0fd99 100644
--- a/csharp/src/Google.Protobuf/Reflection/OriginalNameAttribute.cs
+++ b/csharp/src/Google.Protobuf/Reflection/OriginalNameAttribute.cs
@@ -47,12 +47,19 @@ namespace Google.Protobuf.Reflection
public string Name { get; set; }
/// <summary>
+ /// If the name is preferred in the .proto file.
+ /// </summary>
+ public bool PreferredAlias { get; set; }
+
+ /// <summary>
/// Constructs a new attribute instance for the given name.
/// </summary>
/// <param name="name">The name of the element in the .proto file.</param>
public OriginalNameAttribute(string name)
{
Name = ProtoPreconditions.CheckNotNull(name, nameof(name));
+ PreferredAlias = true;
}
+
}
-} \ No newline at end of file
+}