Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vs-editor-api.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/Core/Def/BaseUtility/DisplayNameAttribute.cs')
-rw-r--r--src/Core/Def/BaseUtility/DisplayNameAttribute.cs18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/Core/Def/BaseUtility/DisplayNameAttribute.cs b/src/Core/Def/BaseUtility/DisplayNameAttribute.cs
index 5099fa8..f5a0644 100644
--- a/src/Core/Def/BaseUtility/DisplayNameAttribute.cs
+++ b/src/Core/Def/BaseUtility/DisplayNameAttribute.cs
@@ -12,9 +12,9 @@ namespace Microsoft.VisualStudio.Utilities
/// <remarks>
/// This attribute should be localized wherever it is used.
/// </remarks>
+ [Obsolete("Use " + nameof(LocalizedNameAttribute) + " instead.")]
public sealed class DisplayNameAttribute : SingletonBaseMetadataAttribute
{
- private string displayName;
/// <summary>
/// Initializes a new instance of <see cref="DisplayNameAttribute"/>.
@@ -22,22 +22,12 @@ namespace Microsoft.VisualStudio.Utilities
/// <param name="displayName">The display name of an editor component part.</param>
public DisplayNameAttribute(string displayName)
{
- if (displayName == null)
- {
- throw new ArgumentNullException("displayName");
- }
- this.displayName = displayName;
+ this.DisplayName = displayName ?? throw new ArgumentNullException(nameof(displayName));
}
/// <summary>
/// Gets the display name of an editor component part.
/// </summary>
- public string DisplayName
- {
- get
- {
- return this.displayName;
- }
- }
+ public string DisplayName { get; }
}
-} \ No newline at end of file
+}