Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / Design / ParenthesizePropertyNameAttribute.cs / 1305376 / ParenthesizePropertyNameAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.ComponentModel { using System; using System.Security.Permissions; ////// [AttributeUsage(AttributeTargets.All)] public sealed class ParenthesizePropertyNameAttribute : Attribute { ///Provides a value indicating whether the name of the associated property is parenthesized in the /// properties window. ////// public static readonly ParenthesizePropertyNameAttribute Default = new ParenthesizePropertyNameAttribute(); private bool needParenthesis; ////// Sets the System.ComponentModel.Design.ParenthesizePropertyName /// attribute by default to /// ///. /// /// public ParenthesizePropertyNameAttribute() : this(false) { } ///[To be supplied.] ////// public ParenthesizePropertyNameAttribute(bool needParenthesis) { this.needParenthesis = needParenthesis; } ///Initializes a new instance of the System.ComponentModel.Design.ParenthesizePropertyNameAttribute /// class, using the specified value to indicate whether the attribute is /// marked for display with parentheses. ////// public bool NeedParenthesis { get { return needParenthesis; } } ////// Gets a value indicating /// whether the /// attribute is placed in parentheses when listed in /// the properties window. /// ////// public override bool Equals(object o) { if (o is ParenthesizePropertyNameAttribute) { return ((ParenthesizePropertyNameAttribute)o).NeedParenthesis == needParenthesis; } return false; } ///Compares the specified object /// to this object and tests for equality. ////// public override int GetHashCode() { return base.GetHashCode(); } ////// Returns the hashcode for this object. /// ////// public override bool IsDefaultAttribute() { return this.Equals(Default); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //Gets a value indicating whether this attribute is set to ///by default. // Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.ComponentModel { using System; using System.Security.Permissions; ////// [AttributeUsage(AttributeTargets.All)] public sealed class ParenthesizePropertyNameAttribute : Attribute { ///Provides a value indicating whether the name of the associated property is parenthesized in the /// properties window. ////// public static readonly ParenthesizePropertyNameAttribute Default = new ParenthesizePropertyNameAttribute(); private bool needParenthesis; ////// Sets the System.ComponentModel.Design.ParenthesizePropertyName /// attribute by default to /// ///. /// /// public ParenthesizePropertyNameAttribute() : this(false) { } ///[To be supplied.] ////// public ParenthesizePropertyNameAttribute(bool needParenthesis) { this.needParenthesis = needParenthesis; } ///Initializes a new instance of the System.ComponentModel.Design.ParenthesizePropertyNameAttribute /// class, using the specified value to indicate whether the attribute is /// marked for display with parentheses. ////// public bool NeedParenthesis { get { return needParenthesis; } } ////// Gets a value indicating /// whether the /// attribute is placed in parentheses when listed in /// the properties window. /// ////// public override bool Equals(object o) { if (o is ParenthesizePropertyNameAttribute) { return ((ParenthesizePropertyNameAttribute)o).NeedParenthesis == needParenthesis; } return false; } ///Compares the specified object /// to this object and tests for equality. ////// public override int GetHashCode() { return base.GetHashCode(); } ////// Returns the hashcode for this object. /// ////// public override bool IsDefaultAttribute() { return this.Equals(Default); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.Gets a value indicating whether this attribute is set to ///by default.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- _AutoWebProxyScriptHelper.cs
- ContentFilePart.cs
- EntityDataReader.cs
- BindUriHelper.cs
- RunClient.cs
- DocumentViewerBase.cs
- PointUtil.cs
- AesManaged.cs
- IgnoreFlushAndCloseStream.cs
- FixedSOMImage.cs
- DbModificationClause.cs
- CompositionAdorner.cs
- DependencyPropertyKey.cs
- TableLayoutSettings.cs
- WindowsTokenRoleProvider.cs
- CompModSwitches.cs
- DrawListViewColumnHeaderEventArgs.cs
- ListenerBinder.cs
- CorePropertiesFilter.cs
- PropertyHelper.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- BoolLiteral.cs
- XPathDocumentBuilder.cs
- MaskedTextProvider.cs
- ToolStripPanelDesigner.cs
- RegexCompiler.cs
- GraphicsContainer.cs
- DataGridViewRowsAddedEventArgs.cs
- CatalogZone.cs
- SplineKeyFrames.cs
- SmtpReplyReader.cs
- ValueExpressions.cs
- TraceSource.cs
- InstalledFontCollection.cs
- NavigationHelper.cs
- DataRelationPropertyDescriptor.cs
- Bitmap.cs
- HealthMonitoringSectionHelper.cs
- TreeNodeBindingCollection.cs
- XamlParser.cs
- StreamHelper.cs
- LinqDataSourceSelectEventArgs.cs
- LocalizationParserHooks.cs
- Pkcs9Attribute.cs
- EmbeddedMailObject.cs
- FactoryGenerator.cs
- PointAnimationUsingKeyFrames.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- TrustManagerMoreInformation.cs
- DesignerActionHeaderItem.cs
- RouteParser.cs
- XmlCharType.cs
- TextUtf8RawTextWriter.cs
- ConnectionPoolManager.cs
- MatcherBuilder.cs
- DataPagerFieldItem.cs
- MULTI_QI.cs
- Font.cs
- DataGridViewAdvancedBorderStyle.cs
- CommonDialog.cs
- EventLogPermissionEntry.cs
- ReachBasicContext.cs
- TypeForwardedToAttribute.cs
- RequestQueue.cs
- LayoutEngine.cs
- SqlRemoveConstantOrderBy.cs
- HtmlHistory.cs
- AutoResetEvent.cs
- RTLAwareMessageBox.cs
- QueryResponse.cs
- XmlSerializerAssemblyAttribute.cs
- BrowserCapabilitiesCompiler.cs
- HtmlInputText.cs
- ControlIdConverter.cs
- SoapEnumAttribute.cs
- MessageSecurityOverMsmqElement.cs
- FtpRequestCacheValidator.cs
- WinEventQueueItem.cs
- GridViewColumn.cs
- diagnosticsswitches.cs
- SelectingProviderEventArgs.cs
- SimpleHandlerFactory.cs
- DefaultSettingsSection.cs
- DependencyPropertyKind.cs
- SrgsText.cs
- HttpHeaderCollection.cs
- BlockCollection.cs
- ADMembershipProvider.cs
- TemplateContent.cs
- CharacterBufferReference.cs
- COM2Properties.cs
- DataSvcMapFileSerializer.cs
- BindingOperations.cs
- XPathSingletonIterator.cs
- Validator.cs
- AccessibilityHelperForXpWin2k3.cs
- WebPartDisplayModeCollection.cs
- SmtpSection.cs
- COM2FontConverter.cs
- GACMembershipCondition.cs