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
- XslTransform.cs
- XslNumber.cs
- Regex.cs
- SqlBuilder.cs
- EventSchemaTraceListener.cs
- CaseInsensitiveOrdinalStringComparer.cs
- MdiWindowListItemConverter.cs
- CorrelationValidator.cs
- BinaryReader.cs
- IPHostEntry.cs
- InvalidTimeZoneException.cs
- LingerOption.cs
- FontInfo.cs
- EpmContentSerializer.cs
- MethodBuilderInstantiation.cs
- WindowsFont.cs
- HatchBrush.cs
- NetworkStream.cs
- UIntPtr.cs
- ShutDownListener.cs
- StylusPointCollection.cs
- PrintPreviewDialog.cs
- AnnotationAuthorChangedEventArgs.cs
- SqlCommandSet.cs
- ModelItemDictionary.cs
- FlowDocumentPageViewerAutomationPeer.cs
- StackBuilderSink.cs
- DynamicValueConverter.cs
- HttpCapabilitiesSectionHandler.cs
- RequestSecurityTokenForRemoteTokenFactory.cs
- PrimaryKeyTypeConverter.cs
- SByte.cs
- MinMaxParagraphWidth.cs
- DrawingImage.cs
- GenericsInstances.cs
- UnauthorizedWebPart.cs
- BufferModeSettings.cs
- COM2ExtendedUITypeEditor.cs
- _UriTypeConverter.cs
- PropertyBuilder.cs
- DataGridViewColumnCollection.cs
- IntSecurity.cs
- MultiView.cs
- Latin1Encoding.cs
- ConfigurationManagerInternal.cs
- DeclarativeExpressionConditionDeclaration.cs
- FillErrorEventArgs.cs
- XmlMapping.cs
- TheQuery.cs
- ExecutionContext.cs
- DeploymentSection.cs
- OdbcConnectionFactory.cs
- DataTableReaderListener.cs
- BinHexDecoder.cs
- OleDbInfoMessageEvent.cs
- WebConvert.cs
- NameTable.cs
- RawUIStateInputReport.cs
- SafeEventLogReadHandle.cs
- SafeRightsManagementQueryHandle.cs
- Int32RectConverter.cs
- OperationCanceledException.cs
- UIElementParaClient.cs
- WorkflowValidationFailedException.cs
- ModuleConfigurationInfo.cs
- DateTimeFormatInfo.cs
- UnsafeNativeMethods.cs
- MimeTypeAttribute.cs
- CustomTrackingRecord.cs
- TableParagraph.cs
- ResXResourceReader.cs
- ToolStrip.cs
- Annotation.cs
- EdmRelationshipNavigationPropertyAttribute.cs
- BaseComponentEditor.cs
- EncryptedData.cs
- XPathAncestorQuery.cs
- VisualStyleElement.cs
- HttpHandlerActionCollection.cs
- InputMethod.cs
- UpdatePanelTrigger.cs
- OracleTimeSpan.cs
- DockPattern.cs
- KnownAssembliesSet.cs
- Nullable.cs
- COAUTHINFO.cs
- SqlHelper.cs
- XmlHierarchicalEnumerable.cs
- SqlParameterCollection.cs
- QueryStoreStatusRequest.cs
- RelatedImageListAttribute.cs
- MimeParameters.cs
- TrustManager.cs
- ECDiffieHellmanCng.cs
- CryptoApi.cs
- TcpClientSocketManager.cs
- TypeBrowser.xaml.cs
- XPathAncestorQuery.cs
- TemplatePartAttribute.cs
- FormViewInsertedEventArgs.cs