//------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // //------------------------------------------------------------------------------ /* */ namespace System.Web { using System; using System.ComponentModel; /// /// DisplayNameAttribute marks a property, event, or extender with a /// DisplayName. Visual designers can display this DisplayName when referencing /// the member. /// [AttributeUsage(AttributeTargets.Property | AttributeTargets.Event | AttributeTargets.Class)] internal sealed class WebSysDisplayNameAttribute : DisplayNameAttribute { private bool replaced; /// /// Constructs a new sys DisplayName. /// internal WebSysDisplayNameAttribute(string DisplayName) : base(DisplayName) { } /// /// Retrieves the DisplayName text. /// public override string DisplayName { get { if (!replaced) { replaced = true; DisplayNameValue = SR.GetString(base.DisplayName); } return base.DisplayName; } } public override object TypeId { get { return typeof(DisplayNameAttribute); } } } }