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
- AutomationPattern.cs
- MostlySingletonList.cs
- ZipIOExtraField.cs
- CqlIdentifiers.cs
- UpdateManifestForBrowserApplication.cs
- DBAsyncResult.cs
- MD5CryptoServiceProvider.cs
- EnumMemberAttribute.cs
- FileNotFoundException.cs
- WaitHandle.cs
- IndexedGlyphRun.cs
- CssClassPropertyAttribute.cs
- AssemblySettingAttributes.cs
- SystemFonts.cs
- InputScopeManager.cs
- Container.cs
- ToolboxItemCollection.cs
- LifetimeMonitor.cs
- DataSvcMapFile.cs
- BitmapCodecInfoInternal.cs
- XComponentModel.cs
- ToolStripDropDownItem.cs
- DuplicateWaitObjectException.cs
- ToolStripButton.cs
- AdPostCacheSubstitution.cs
- DrawingCollection.cs
- messageonlyhwndwrapper.cs
- ApplicationServiceManager.cs
- RoutedPropertyChangedEventArgs.cs
- UrlPropertyAttribute.cs
- NeedSkipTokenVisitor.cs
- ProcessModule.cs
- StyleHelper.cs
- RegexStringValidatorAttribute.cs
- WebControlsSection.cs
- NotFiniteNumberException.cs
- AccessibilityApplicationManager.cs
- CodeMemberField.cs
- ReceiveSecurityHeaderEntry.cs
- AutoGeneratedFieldProperties.cs
- XmlConverter.cs
- TextEffect.cs
- ConstrainedDataObject.cs
- DynamicActivityTypeDescriptor.cs
- BaseResourcesBuildProvider.cs
- URLAttribute.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- ContextQuery.cs
- CorePropertiesFilter.cs
- Table.cs
- PasswordBoxAutomationPeer.cs
- ConnectionManager.cs
- ToolStripGripRenderEventArgs.cs
- SqlNamer.cs
- GraphicsPath.cs
- CipherData.cs
- XsltCompileContext.cs
- Grid.cs
- LinkConverter.cs
- NonVisualControlAttribute.cs
- CodeLinePragma.cs
- DataBindEngine.cs
- UIElementParagraph.cs
- assemblycache.cs
- InternalException.cs
- EventlogProvider.cs
- DeferredSelectedIndexReference.cs
- Merger.cs
- DateTimeConstantAttribute.cs
- QueryExecutionOption.cs
- PEFileReader.cs
- ThreadStaticAttribute.cs
- SoapIgnoreAttribute.cs
- MemoryResponseElement.cs
- ToolStripItemEventArgs.cs
- XmlSerializerSection.cs
- PerspectiveCamera.cs
- SerializationFieldInfo.cs
- Matrix.cs
- XmlSignatureManifest.cs
- SimpleTypeResolver.cs
- ParamArrayAttribute.cs
- ServiceModelEnumValidator.cs
- UiaCoreTypesApi.cs
- ValidationRuleCollection.cs
- PersistenceException.cs
- CollectionViewGroupRoot.cs
- FaultPropagationRecord.cs
- returneventsaver.cs
- DbProviderFactory.cs
- DescriptionAttribute.cs
- WinEventWrap.cs
- RangeValueProviderWrapper.cs
- DataServiceProcessingPipeline.cs
- BooleanAnimationBase.cs
- HybridObjectCache.cs
- MetadataItem_Static.cs
- MediaElement.cs
- _AutoWebProxyScriptHelper.cs
- OleDbError.cs