Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- SafeWaitHandle.cs
- Sql8ConformanceChecker.cs
- FontCacheLogic.cs
- MsmqMessageSerializationFormat.cs
- WebPartConnectionsConfigureVerb.cs
- SimplePropertyEntry.cs
- NavigateUrlConverter.cs
- CatalogZone.cs
- C14NUtil.cs
- SqlParameterCollection.cs
- GradientStopCollection.cs
- unsafenativemethodsother.cs
- EditorZoneBase.cs
- FactoryId.cs
- ByteConverter.cs
- HtmlEncodedRawTextWriter.cs
- FrameworkElementFactoryMarkupObject.cs
- Table.cs
- ReachPageContentCollectionSerializerAsync.cs
- Compiler.cs
- TypedElement.cs
- SafeLibraryHandle.cs
- BinaryReader.cs
- EntityTypeBase.cs
- ViewValidator.cs
- ItemDragEvent.cs
- SequenceFullException.cs
- StreamWriter.cs
- ResourceLoader.cs
- PageContentAsyncResult.cs
- Trigger.cs
- ClientRuntimeConfig.cs
- MaskedTextProvider.cs
- QueryOutputWriter.cs
- ControlType.cs
- BinHexEncoder.cs
- TypeInitializationException.cs
- ObjectSecurity.cs
- StreamSecurityUpgradeAcceptorBase.cs
- TableParagraph.cs
- UseAttributeSetsAction.cs
- MetabaseSettingsIis7.cs
- HwndSourceParameters.cs
- Pen.cs
- PasswordTextNavigator.cs
- CodeGotoStatement.cs
- SqlClientPermission.cs
- LogLogRecordEnumerator.cs
- CharStorage.cs
- SqlBulkCopyColumnMappingCollection.cs
- RSAOAEPKeyExchangeDeformatter.cs
- MaterialGroup.cs
- ModuleElement.cs
- InterleavedZipPartStream.cs
- DataSourceHelper.cs
- ExceptionRoutedEventArgs.cs
- RectValueSerializer.cs
- Registry.cs
- CommonRemoteMemoryBlock.cs
- XmlRootAttribute.cs
- codemethodreferenceexpression.cs
- FormatterServicesNoSerializableCheck.cs
- TreeNodeStyle.cs
- WebPartPersonalization.cs
- DataViewManager.cs
- MsmqActivation.cs
- XmlCountingReader.cs
- Command.cs
- CodeArrayCreateExpression.cs
- URL.cs
- DrawingDrawingContext.cs
- TypeConverterAttribute.cs
- safemediahandle.cs
- DelayedRegex.cs
- FormViewDeletedEventArgs.cs
- LayoutEngine.cs
- xsdvalidator.cs
- EventRoute.cs
- ParentQuery.cs
- CriticalExceptions.cs
- UnitySerializationHolder.cs
- Serializer.cs
- DispatcherFrame.cs
- ToolTip.cs
- ZipIOExtraFieldZip64Element.cs
- WindowsListViewGroupSubsetLink.cs
- XmlEntityReference.cs
- DataGridTable.cs
- SimpleHandlerBuildProvider.cs
- WebConvert.cs
- WebPartManagerDesigner.cs
- EventSinkHelperWriter.cs
- ListViewAutomationPeer.cs
- NeedSkipTokenVisitor.cs
- SecureUICommand.cs
- SqlErrorCollection.cs
- DesignTimeType.cs
- RepeatBehaviorConverter.cs
- Point4DValueSerializer.cs
- WebPartRestoreVerb.cs