Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / CompMod / System / ComponentModel / Design / ParenthesizePropertyNameAttribute.cs / 1 / 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
- RelatedView.cs
- XPathAncestorIterator.cs
- WmlPanelAdapter.cs
- UnsafeNativeMethodsMilCoreApi.cs
- TypeConverterHelper.cs
- ChildrenQuery.cs
- ResourceProviderFactory.cs
- TimeSpanMinutesConverter.cs
- ContentPlaceHolder.cs
- EventData.cs
- CustomAttribute.cs
- BitmapSource.cs
- XmlDataDocument.cs
- HandlerBase.cs
- VisualBrush.cs
- SourceFileBuildProvider.cs
- TraceUtility.cs
- DataSet.cs
- WebPartVerb.cs
- SiteIdentityPermission.cs
- QueryExpr.cs
- DataGridViewControlCollection.cs
- AppDomainProtocolHandler.cs
- CapabilitiesState.cs
- XmlSchemaSimpleTypeRestriction.cs
- clipboard.cs
- DataGridDetailsPresenter.cs
- CanonicalFontFamilyReference.cs
- ExceptionUtil.cs
- ProtocolsInstallComponent.cs
- LayoutTableCell.cs
- DocumentAutomationPeer.cs
- EventEntry.cs
- DataObjectAttribute.cs
- SqlGenerator.cs
- NamedPermissionSet.cs
- ResourceExpressionBuilder.cs
- SafeRightsManagementQueryHandle.cs
- configsystem.cs
- ControlValuePropertyAttribute.cs
- XmlAggregates.cs
- CFStream.cs
- _LoggingObject.cs
- AbstractExpressions.cs
- HtmlMobileTextWriter.cs
- WebPartZone.cs
- DataRowExtensions.cs
- BitArray.cs
- SessionParameter.cs
- StreamSecurityUpgradeInitiatorBase.cs
- MaterialGroup.cs
- XslTransformFileEditor.cs
- PointLightBase.cs
- CollectionType.cs
- CfgParser.cs
- TreeViewAutomationPeer.cs
- RoleGroup.cs
- WindowsSlider.cs
- XmlSchemaInfo.cs
- SymbolType.cs
- CodeArrayIndexerExpression.cs
- ConfigUtil.cs
- SQlBooleanStorage.cs
- FtpCachePolicyElement.cs
- DrawListViewSubItemEventArgs.cs
- LayoutEditorPart.cs
- HealthMonitoringSectionHelper.cs
- HttpHandler.cs
- NotificationContext.cs
- Regex.cs
- PersonalizationStateInfoCollection.cs
- ResourceManager.cs
- ResizeGrip.cs
- FileLogRecordHeader.cs
- TreeNodeCollection.cs
- MobileFormsAuthentication.cs
- DocumentXmlWriter.cs
- VisualBrush.cs
- ControlEvent.cs
- FlagsAttribute.cs
- SslStreamSecurityUpgradeProvider.cs
- XsltContext.cs
- ReferencedType.cs
- ProcessingInstructionAction.cs
- CommittableTransaction.cs
- PasswordPropertyTextAttribute.cs
- SafeRightsManagementPubHandle.cs
- FormsAuthenticationConfiguration.cs
- TransactionFlowProperty.cs
- EntityCommand.cs
- GridProviderWrapper.cs
- MonitorWrapper.cs
- HelpProvider.cs
- SimpleModelProvider.cs
- ClientSponsor.cs
- EventEntry.cs
- Boolean.cs
- Sentence.cs
- Stylus.cs
- CacheMode.cs