Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- coordinatorscratchpad.cs
- HandlerMappingMemo.cs
- StreamResourceInfo.cs
- CommonDialog.cs
- EventDriven.cs
- Triangle.cs
- Command.cs
- WrappedIUnknown.cs
- DataDocumentXPathNavigator.cs
- HttpCacheParams.cs
- CompilerCollection.cs
- ErrorWrapper.cs
- UserUseLicenseDictionaryLoader.cs
- LookupNode.cs
- PointF.cs
- WindowsTreeView.cs
- NavigatorOutput.cs
- Container.cs
- RadioButtonStandardAdapter.cs
- StreamReader.cs
- ThreadSafeList.cs
- DiscoveryProxy.cs
- ClassicBorderDecorator.cs
- TypeDescriptionProvider.cs
- AppDomainUnloadedException.cs
- FaultImportOptions.cs
- Pair.cs
- ResourceType.cs
- WizardForm.cs
- AttributeEmitter.cs
- ConfigurationManagerInternal.cs
- ValueProviderWrapper.cs
- ObjectStorage.cs
- TaskScheduler.cs
- QueryOperationResponseOfT.cs
- HandlerMappingMemo.cs
- VersionPair.cs
- WebResponse.cs
- TableRowCollection.cs
- CacheDependency.cs
- DataObjectCopyingEventArgs.cs
- XsdValidatingReader.cs
- WebPartDescriptionCollection.cs
- ControlBindingsCollection.cs
- DefaultValueConverter.cs
- Rectangle.cs
- ButtonBaseDesigner.cs
- ButtonColumn.cs
- DefaultValueConverter.cs
- XsltLibrary.cs
- webproxy.cs
- ResourcesGenerator.cs
- Utils.cs
- FacetValueContainer.cs
- HwndSubclass.cs
- Relationship.cs
- Hash.cs
- TabControlAutomationPeer.cs
- DiffuseMaterial.cs
- MessageHeaderInfoTraceRecord.cs
- FolderNameEditor.cs
- HttpRequestWrapper.cs
- ListItemConverter.cs
- TextTreeText.cs
- SimpleWebHandlerParser.cs
- NamespaceCollection.cs
- StylusPointCollection.cs
- ObjectNotFoundException.cs
- XamlPoint3DCollectionSerializer.cs
- CodeSnippetExpression.cs
- AuthorizationContext.cs
- Repeater.cs
- KeyConstraint.cs
- TransformerTypeCollection.cs
- RecordManager.cs
- FixedPosition.cs
- ReadOnlyObservableCollection.cs
- TimeSpanValidator.cs
- sqlpipe.cs
- DesignerCalendarAdapter.cs
- File.cs
- IsolatedStorage.cs
- PackageProperties.cs
- CustomCredentialPolicy.cs
- XmlDownloadManager.cs
- AutomationElementCollection.cs
- ValueTable.cs
- FileDialog_Vista.cs
- HtmlControlPersistable.cs
- ColumnMapVisitor.cs
- SmiMetaDataProperty.cs
- Label.cs
- SpAudioStreamWrapper.cs
- InputLangChangeRequestEvent.cs
- ImageList.cs
- ContextDataSource.cs
- SqlProviderManifest.cs
- ImmutableObjectAttribute.cs
- TypeDescriptor.cs
- DataListItem.cs