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
- Axis.cs
- Icon.cs
- StreamResourceInfo.cs
- ElapsedEventArgs.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- EndOfStreamException.cs
- QuotedPrintableStream.cs
- RestHandler.cs
- StringDictionaryCodeDomSerializer.cs
- BaseTemplateParser.cs
- ScalarConstant.cs
- RunClient.cs
- ClientApiGenerator.cs
- SplineKeyFrames.cs
- X509Logo.cs
- _LazyAsyncResult.cs
- ProxyFragment.cs
- CustomDictionarySources.cs
- MdImport.cs
- GZipStream.cs
- TypedRowHandler.cs
- SerializationException.cs
- SqlInternalConnectionSmi.cs
- TraceHwndHost.cs
- ResXResourceReader.cs
- ObjectPersistData.cs
- LiteralDesigner.cs
- ListItemConverter.cs
- ServiceContractGenerationContext.cs
- ScrollChrome.cs
- HttpDebugHandler.cs
- TogglePattern.cs
- ArrayListCollectionBase.cs
- XmlSchemaProviderAttribute.cs
- DockProviderWrapper.cs
- DbModificationCommandTree.cs
- PropertyOverridesTypeEditor.cs
- SplitterEvent.cs
- ObjectTag.cs
- AssemblyNameProxy.cs
- SliderAutomationPeer.cs
- DrawListViewSubItemEventArgs.cs
- InputManager.cs
- RuleInfoComparer.cs
- Transactions.cs
- StateMachineDesignerPaint.cs
- NoneExcludedImageIndexConverter.cs
- FixedBufferAttribute.cs
- MetabaseServerConfig.cs
- MemoryMappedFileSecurity.cs
- VariableReference.cs
- Boolean.cs
- MulticastIPAddressInformationCollection.cs
- ExceptionUtil.cs
- StringResourceManager.cs
- X509ThumbprintKeyIdentifierClause.cs
- _BaseOverlappedAsyncResult.cs
- SignatureDescription.cs
- CalendarButtonAutomationPeer.cs
- ApplicationServiceHelper.cs
- BaseParser.cs
- InstanceDataCollection.cs
- DetailsViewDeletedEventArgs.cs
- SocketAddress.cs
- documentation.cs
- InheritanceContextChangedEventManager.cs
- LambdaExpression.cs
- BlurBitmapEffect.cs
- templategroup.cs
- UserControlCodeDomTreeGenerator.cs
- PageCache.cs
- InstalledFontCollection.cs
- DataGridRowEventArgs.cs
- TextBox.cs
- ShaderEffect.cs
- SessionStateItemCollection.cs
- ComplexBindingPropertiesAttribute.cs
- ILGenerator.cs
- LocatorPartList.cs
- BasePattern.cs
- FontWeight.cs
- SingleSelectRootGridEntry.cs
- DBConnectionString.cs
- NetCodeGroup.cs
- PolyBezierSegment.cs
- ExpressionVisitor.cs
- DataSourceConverter.cs
- CodeIterationStatement.cs
- wmiprovider.cs
- XmlSchemaObjectTable.cs
- TreeView.cs
- TypeTypeConverter.cs
- ToolStripPanelRenderEventArgs.cs
- BulletChrome.cs
- MeshGeometry3D.cs
- CryptographicAttribute.cs
- XmlBinaryReader.cs
- DriveInfo.cs
- AuthenticationSection.cs
- DesignerTextWriter.cs