Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / 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. //------------------------------------------------------------------------------ // // 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- _TimerThread.cs
- EntityDataSourceWizardForm.cs
- AnnotationAdorner.cs
- ObjectHandle.cs
- SafeArrayTypeMismatchException.cs
- WriteableBitmap.cs
- ProxyHelper.cs
- XmlRawWriterWrapper.cs
- TypeSystem.cs
- RunClient.cs
- NavigationPropertySingletonExpression.cs
- SkewTransform.cs
- mediaeventargs.cs
- WebPartConnectionsCancelVerb.cs
- VirtualizedItemProviderWrapper.cs
- Action.cs
- TextParagraphCache.cs
- StickyNoteContentControl.cs
- AddingNewEventArgs.cs
- CodeSnippetCompileUnit.cs
- WorkflowIdleElement.cs
- WpfPayload.cs
- BatchParser.cs
- GPPOINT.cs
- DuplicateContext.cs
- DataGridCellAutomationPeer.cs
- SqlCommand.cs
- AssemblyHash.cs
- unsafenativemethodstextservices.cs
- TrackingProfileDeserializationException.cs
- _AcceptOverlappedAsyncResult.cs
- ResourceCategoryAttribute.cs
- IfAction.cs
- ProgressBar.cs
- HttpRequestCacheValidator.cs
- BaseConfigurationRecord.cs
- TraceProvider.cs
- NamespaceEmitter.cs
- ConfigurationSchemaErrors.cs
- EventLogPermissionEntry.cs
- control.ime.cs
- Tool.cs
- RSAOAEPKeyExchangeFormatter.cs
- ProfilePropertySettingsCollection.cs
- LocalValueEnumerator.cs
- LockCookie.cs
- ClientRequest.cs
- ConfigurationFileMap.cs
- EditorBrowsableAttribute.cs
- UnsafeCollabNativeMethods.cs
- DCSafeHandle.cs
- DbExpressionBuilder.cs
- EventQueueState.cs
- DataRelation.cs
- SessionState.cs
- DragAssistanceManager.cs
- MessageAction.cs
- DefaultAssemblyResolver.cs
- ThemeConfigurationDialog.cs
- SmtpMail.cs
- RefreshEventArgs.cs
- StructuralObject.cs
- SmiContextFactory.cs
- WindowsComboBox.cs
- AsyncOperation.cs
- HMACMD5.cs
- TextElement.cs
- GeometryModel3D.cs
- HtmlTableCellCollection.cs
- TypeResolver.cs
- DbProviderConfigurationHandler.cs
- BamlLocalizableResourceKey.cs
- PointAnimationClockResource.cs
- MetadataArtifactLoaderCompositeResource.cs
- Executor.cs
- ValueOfAction.cs
- PagesSection.cs
- ComponentDispatcherThread.cs
- CodeDomLoader.cs
- XmlSchemaSimpleTypeList.cs
- UIElement3D.cs
- PinProtectionHelper.cs
- ProtocolsConfiguration.cs
- ToolStripTextBox.cs
- DocumentViewerAutomationPeer.cs
- ChannelManager.cs
- Attributes.cs
- FullTextState.cs
- WebBrowserUriTypeConverter.cs
- WebPartCollection.cs
- CustomSignedXml.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- BasePropertyDescriptor.cs
- ByteFacetDescriptionElement.cs
- SchemaLookupTable.cs
- DbConnectionClosed.cs
- RightsManagementEncryptedStream.cs
- ButtonRenderer.cs
- BamlTreeNode.cs
- EventProviderWriter.cs