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
- AbsoluteQuery.cs
- ExpressionBindingsDialog.cs
- SendingRequestEventArgs.cs
- VisualBrush.cs
- ExceptionUtil.cs
- SchemaMapping.cs
- RegisteredHiddenField.cs
- TextDecoration.cs
- MSAANativeProvider.cs
- ListViewPagedDataSource.cs
- RichTextBox.cs
- DrawingGroup.cs
- IISUnsafeMethods.cs
- CompressStream.cs
- Style.cs
- ScriptingAuthenticationServiceSection.cs
- RoutedEventArgs.cs
- ViewLoader.cs
- PreloadedPackages.cs
- SimpleWorkerRequest.cs
- XmlSchemaAttributeGroupRef.cs
- MetafileEditor.cs
- SetStoryboardSpeedRatio.cs
- BitmapEffectGeneralTransform.cs
- Size3D.cs
- CommandExpr.cs
- ClientCredentials.cs
- SspiSafeHandles.cs
- RegionInfo.cs
- SystemColors.cs
- _emptywebproxy.cs
- EditorPartChrome.cs
- PolyLineSegmentFigureLogic.cs
- Scheduler.cs
- CapabilitiesUse.cs
- New.cs
- ControlValuePropertyAttribute.cs
- ContainerControl.cs
- DrawToolTipEventArgs.cs
- WebPartsPersonalization.cs
- CalendarButton.cs
- EventLogPermissionEntry.cs
- DSACryptoServiceProvider.cs
- AuthenticatedStream.cs
- SecurityHelper.cs
- XmlImplementation.cs
- SrgsRulesCollection.cs
- ProcessHostConfigUtils.cs
- ToolStripContainer.cs
- CodeThrowExceptionStatement.cs
- BulletChrome.cs
- ProgressChangedEventArgs.cs
- HostUtils.cs
- XmlReader.cs
- DigestTraceRecordHelper.cs
- TextTreeText.cs
- TdsParameterSetter.cs
- Win32KeyboardDevice.cs
- IgnorePropertiesAttribute.cs
- DataPagerFieldCommandEventArgs.cs
- MdImport.cs
- InvokePattern.cs
- WebPartConnectionsCloseVerb.cs
- CqlBlock.cs
- SqlUdtInfo.cs
- QueryOutputWriter.cs
- FontUnit.cs
- PlatformNotSupportedException.cs
- PathBox.cs
- DesignerImageAdapter.cs
- PaintEvent.cs
- Attributes.cs
- ClosableStream.cs
- ScrollBarRenderer.cs
- FastPropertyAccessor.cs
- XsltQilFactory.cs
- MatrixAnimationUsingKeyFrames.cs
- SharedConnectionWorkflowTransactionService.cs
- XmlDomTextWriter.cs
- GeneralTransform.cs
- SearchForVirtualItemEventArgs.cs
- EntityCollectionChangedParams.cs
- SafeNativeMethodsOther.cs
- WebReferencesBuildProvider.cs
- StylusCaptureWithinProperty.cs
- Root.cs
- StubHelpers.cs
- RelationshipWrapper.cs
- LayeredChannelFactory.cs
- WebFormDesignerActionService.cs
- ImageMapEventArgs.cs
- UIPropertyMetadata.cs
- BookmarkScopeManager.cs
- BitmapSourceSafeMILHandle.cs
- ActivityExecutionFilter.cs
- XmlSchemaGroup.cs
- COM2FontConverter.cs
- SHA256.cs
- TextParagraph.cs
- InternalConfigSettingsFactory.cs