Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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)); } } } // 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; 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)); } } } // 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
- ConvertEvent.cs
- OdbcEnvironment.cs
- CanonicalFontFamilyReference.cs
- basenumberconverter.cs
- ImmutablePropertyDescriptorGridEntry.cs
- SessionEndingEventArgs.cs
- SpeechSynthesizer.cs
- IBuiltInEvidence.cs
- Activity.cs
- Select.cs
- FileAuthorizationModule.cs
- DefaultValueConverter.cs
- WindowsFont.cs
- Win32.cs
- CheckBoxPopupAdapter.cs
- OAVariantLib.cs
- SplitterPanel.cs
- HtmlElement.cs
- PcmConverter.cs
- ToolZoneDesigner.cs
- DetailsView.cs
- QueryAccessibilityHelpEvent.cs
- StrongTypingException.cs
- ScrollViewer.cs
- WebControlAdapter.cs
- GridViewRow.cs
- _OverlappedAsyncResult.cs
- Accessible.cs
- UnsafeNativeMethods.cs
- ZipIOFileItemStream.cs
- PaperSource.cs
- FormsAuthenticationEventArgs.cs
- ConditionalDesigner.cs
- DbProviderSpecificTypePropertyAttribute.cs
- ThreadPoolTaskScheduler.cs
- AppSettings.cs
- OLEDB_Enum.cs
- HttpProcessUtility.cs
- XmlBinaryReaderSession.cs
- MethodBuilder.cs
- MultiTrigger.cs
- DataGridHelper.cs
- CharUnicodeInfo.cs
- translator.cs
- PropertyGridView.cs
- ListViewDeleteEventArgs.cs
- SoundPlayer.cs
- RequestSecurityToken.cs
- CompilerErrorCollection.cs
- TextPointerBase.cs
- ErrorStyle.cs
- ExchangeUtilities.cs
- DocumentXmlWriter.cs
- UTF8Encoding.cs
- CharacterMetricsDictionary.cs
- CollectionViewGroupInternal.cs
- DocumentPageHost.cs
- WindowsStartMenu.cs
- ConstraintEnumerator.cs
- HostedHttpRequestAsyncResult.cs
- ListCommandEventArgs.cs
- PeerNearMe.cs
- sqlcontext.cs
- SchemaMerger.cs
- TabItem.cs
- ColumnReorderedEventArgs.cs
- XmlSchemaAttributeGroupRef.cs
- LocalBuilder.cs
- Pkcs7Signer.cs
- ExpressionNormalizer.cs
- SqlDataSourceSummaryPanel.cs
- SelectionChangedEventArgs.cs
- Ipv6Element.cs
- ContentFilePart.cs
- BuildProvider.cs
- SessionStateModule.cs
- Style.cs
- ScrollPattern.cs
- Evidence.cs
- NativeMethods.cs
- TraceHandler.cs
- EventBuilder.cs
- Trace.cs
- EntityParameter.cs
- FileEnumerator.cs
- Simplifier.cs
- MasterPageCodeDomTreeGenerator.cs
- KeySpline.cs
- SelectionGlyph.cs
- BackgroundWorker.cs
- XmlTextReader.cs
- XmlSchemaObject.cs
- AutomationPattern.cs
- DataGridDesigner.cs
- DataServiceRequest.cs
- MessageBox.cs
- SafeBitVector32.cs
- TextBoxLine.cs
- PaginationProgressEventArgs.cs
- DecryptRequest.cs