Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebParts / WebDisplayNameAttribute.cs / 1305376 / WebDisplayNameAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; [AttributeUsage(AttributeTargets.Property)] public class WebDisplayNameAttribute : Attribute { public static readonly WebDisplayNameAttribute Default = new WebDisplayNameAttribute(); private string _displayName; public WebDisplayNameAttribute() : this(String.Empty) { } public WebDisplayNameAttribute(string displayName) { _displayName = displayName; } public virtual string DisplayName { get { return DisplayNameValue; } } protected string DisplayNameValue { get { return _displayName; } set { _displayName = value; } } public override bool Equals(object obj) { if (obj == this) { return true; } WebDisplayNameAttribute other = obj as WebDisplayNameAttribute; return (other != null) && other.DisplayName == DisplayName; } public override int GetHashCode() { return DisplayName.GetHashCode(); } ///public override bool IsDefaultAttribute() { return (this.Equals(Default)); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; [AttributeUsage(AttributeTargets.Property)] public class WebDisplayNameAttribute : Attribute { public static readonly WebDisplayNameAttribute Default = new WebDisplayNameAttribute(); private string _displayName; public WebDisplayNameAttribute() : this(String.Empty) { } public WebDisplayNameAttribute(string displayName) { _displayName = displayName; } public virtual string DisplayName { get { return DisplayNameValue; } } protected string DisplayNameValue { get { return _displayName; } set { _displayName = value; } } public override bool Equals(object obj) { if (obj == this) { return true; } WebDisplayNameAttribute other = obj as WebDisplayNameAttribute; return (other != null) && other.DisplayName == DisplayName; } public override int GetHashCode() { return DisplayName.GetHashCode(); } ///public override bool IsDefaultAttribute() { return (this.Equals(Default)); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- IsolatedStoragePermission.cs
- BCLDebug.cs
- GridViewSelectEventArgs.cs
- ComboBoxRenderer.cs
- CustomTypeDescriptor.cs
- SqlTypeSystemProvider.cs
- PrintPageEvent.cs
- ViewStateException.cs
- MetadataItemEmitter.cs
- SqlException.cs
- ArraySegment.cs
- Nodes.cs
- XDRSchema.cs
- TogglePattern.cs
- BrowserCapabilitiesFactory.cs
- UIElementCollection.cs
- BridgeDataReader.cs
- tooltip.cs
- SamlDoNotCacheCondition.cs
- DiagnosticTrace.cs
- TimeIntervalCollection.cs
- FormViewPagerRow.cs
- KnownAssembliesSet.cs
- PropertyItem.cs
- KeyTime.cs
- FixedHighlight.cs
- Switch.cs
- OlePropertyStructs.cs
- bidPrivateBase.cs
- COM2ColorConverter.cs
- NavigationEventArgs.cs
- FontCacheUtil.cs
- EnumConverter.cs
- InvalidProgramException.cs
- ReaderWriterLockWrapper.cs
- GZipStream.cs
- ViewStateAttachedPropertyFeature.cs
- DataBoundControl.cs
- ResourceAssociationTypeEnd.cs
- RuntimeCompatibilityAttribute.cs
- MULTI_QI.cs
- updateconfighost.cs
- MiniAssembly.cs
- IsolatedStorageFileStream.cs
- EmptyEnumerable.cs
- BuildResult.cs
- TreeViewAutomationPeer.cs
- DataGridViewImageColumn.cs
- IconHelper.cs
- DrawingState.cs
- SqlStatistics.cs
- SHA1.cs
- Atom10ItemFormatter.cs
- TypographyProperties.cs
- WinEventQueueItem.cs
- NameHandler.cs
- OleDbWrapper.cs
- Marshal.cs
- Page.cs
- PageTheme.cs
- QuotedPairReader.cs
- Context.cs
- MruCache.cs
- SerializationSectionGroup.cs
- VarRemapper.cs
- PrivateFontCollection.cs
- DesignerAdRotatorAdapter.cs
- AuthenticateEventArgs.cs
- ListViewDeleteEventArgs.cs
- DataFormat.cs
- ButtonColumn.cs
- WorkflowTransactionOptions.cs
- SmiMetaData.cs
- SchemaTypeEmitter.cs
- DrawingBrush.cs
- PageSettings.cs
- OuterGlowBitmapEffect.cs
- GridItem.cs
- TextParagraph.cs
- LayoutInformation.cs
- OleServicesContext.cs
- SafeNativeMethods.cs
- RegexReplacement.cs
- DTCTransactionManager.cs
- MsmqIntegrationProcessProtocolHandler.cs
- UpDownEvent.cs
- Dispatcher.cs
- ListViewAutomationPeer.cs
- XamlSerializerUtil.cs
- SqlBulkCopy.cs
- StandardRuntimeEnumValidator.cs
- CommentEmitter.cs
- TemplateXamlParser.cs
- diagnosticsswitches.cs
- PointConverter.cs
- ScriptHandlerFactory.cs
- HashHelper.cs
- BidPrivateBase.cs
- DetailsViewPageEventArgs.cs
- PolyQuadraticBezierSegment.cs