Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / UI / WebParts / WebDisplayNameAttribute.cs / 1 / WebDisplayNameAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; using System.Security.Permissions; [AttributeUsage(AttributeTargets.Property)] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] 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)); } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ExpandCollapsePattern.cs
- HttpStreamMessage.cs
- SqlWebEventProvider.cs
- DecoderReplacementFallback.cs
- XmlEnumAttribute.cs
- AccessDataSource.cs
- _SslState.cs
- OutputChannelBinder.cs
- Regex.cs
- PermissionSetEnumerator.cs
- BufferedReadStream.cs
- wgx_render.cs
- OrderByQueryOptionExpression.cs
- ConnectionProviderAttribute.cs
- ProfilePropertyNameValidator.cs
- CorrelationToken.cs
- XslAstAnalyzer.cs
- AspCompat.cs
- ClientOptions.cs
- DesignerTextViewAdapter.cs
- FreeFormDesigner.cs
- SqlNodeAnnotation.cs
- CompilerLocalReference.cs
- Exceptions.cs
- SchemaType.cs
- TypeSemantics.cs
- SqlProviderUtilities.cs
- StandardCommands.cs
- ComponentResourceKeyConverter.cs
- DictionaryBase.cs
- UIElement.cs
- DecimalStorage.cs
- DefaultBindingPropertyAttribute.cs
- ListItemsCollectionEditor.cs
- TrustManagerPromptUI.cs
- BrowserInteropHelper.cs
- FixedPosition.cs
- _LazyAsyncResult.cs
- TimeSpanValidator.cs
- Property.cs
- AncestorChangedEventArgs.cs
- ChameleonKey.cs
- BamlLocalizationDictionary.cs
- OleDbSchemaGuid.cs
- IndentedWriter.cs
- BezierSegment.cs
- Stack.cs
- TemplateNameScope.cs
- ClientConfigurationSystem.cs
- ManagementClass.cs
- DisposableCollectionWrapper.cs
- SqlCachedBuffer.cs
- XmlQualifiedNameTest.cs
- RoleBoolean.cs
- DrawingAttributesDefaultValueFactory.cs
- HighContrastHelper.cs
- BamlRecordHelper.cs
- WhitespaceReader.cs
- MainMenu.cs
- OracleBinary.cs
- OracleRowUpdatedEventArgs.cs
- ReversePositionQuery.cs
- RenderCapability.cs
- RemoteHelper.cs
- DiagnosticTraceSource.cs
- FormViewUpdateEventArgs.cs
- SqlFunctions.cs
- TreeViewCancelEvent.cs
- OutputCacheModule.cs
- BufferedGraphicsContext.cs
- BamlWriter.cs
- StyleHelper.cs
- Clock.cs
- TextSchema.cs
- PlatformNotSupportedException.cs
- _SslState.cs
- QueryStatement.cs
- MessageQueueException.cs
- AuthenticationModuleElement.cs
- TableAutomationPeer.cs
- AllMembershipCondition.cs
- FixedMaxHeap.cs
- ListItemCollection.cs
- GridViewAutoFormat.cs
- BindingsCollection.cs
- DispatchWrapper.cs
- PreProcessor.cs
- DispatcherObject.cs
- InstanceDataCollectionCollection.cs
- RemotingSurrogateSelector.cs
- Wildcard.cs
- EmptyEnumerable.cs
- WebServiceMethodData.cs
- BoundField.cs
- NullableBoolConverter.cs
- DataTemplateSelector.cs
- WebConfigurationHostFileChange.cs
- TypeConverterHelper.cs
- EnumerableCollectionView.cs
- HtmlElement.cs