WebSysDisplayNameAttribute.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / xsp / System / Web / WebSysDisplayNameAttribute.cs / 1 / WebSysDisplayNameAttribute.cs

                            //------------------------------------------------------------------------------ 
// 
//     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);
            } 
        }
    } 
} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------ 
// 
//     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);
            } 
        }
    } 
} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK