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
- FileDialog_Vista_Interop.cs
- HttpException.cs
- sitestring.cs
- PermissionToken.cs
- Line.cs
- PriorityBindingExpression.cs
- ToolStripContainer.cs
- InvokePatternIdentifiers.cs
- SqlDependency.cs
- WindowInteractionStateTracker.cs
- TransformDescriptor.cs
- OleDbRowUpdatingEvent.cs
- SharedUtils.cs
- UTF7Encoding.cs
- XmlNamespaceManager.cs
- PrinterResolution.cs
- NotifyInputEventArgs.cs
- DesignerTransactionCloseEvent.cs
- TextTabProperties.cs
- EdmItemCollection.OcAssemblyCache.cs
- TrackingDataItem.cs
- control.ime.cs
- ItemsControlAutomationPeer.cs
- FileEnumerator.cs
- WebPartVerbsEventArgs.cs
- FontEditor.cs
- DataIdProcessor.cs
- WindowsTab.cs
- HandleRef.cs
- AttributeAction.cs
- XmlLanguageConverter.cs
- sqlinternaltransaction.cs
- EventRouteFactory.cs
- SchemaTableOptionalColumn.cs
- Int64.cs
- DbParameterCollection.cs
- DataProviderNameConverter.cs
- ProxyGenerator.cs
- WebPartZoneBase.cs
- ContentPropertyAttribute.cs
- FigureHelper.cs
- TextEditorContextMenu.cs
- RetrieveVirtualItemEventArgs.cs
- XmlSchema.cs
- Interlocked.cs
- Durable.cs
- ComponentSerializationService.cs
- ToolboxItem.cs
- MessageBuffer.cs
- AttributeEmitter.cs
- PropertyGeneratedEventArgs.cs
- RoleGroupCollection.cs
- XmlSchemaExternal.cs
- VerificationAttribute.cs
- ContextMenuService.cs
- __TransparentProxy.cs
- safemediahandle.cs
- ISO2022Encoding.cs
- Type.cs
- OnOperation.cs
- OutputCacheProfile.cs
- Publisher.cs
- Native.cs
- AsnEncodedData.cs
- ServerTooBusyException.cs
- DragCompletedEventArgs.cs
- NonClientArea.cs
- StoreItemCollection.cs
- LocatorPartList.cs
- DesignerMetadata.cs
- InheritanceRules.cs
- WbemException.cs
- SqlHelper.cs
- ReliableMessagingHelpers.cs
- PreservationFileWriter.cs
- FormsAuthenticationTicket.cs
- UrlAuthFailedErrorFormatter.cs
- Rotation3DAnimationBase.cs
- TrackingRecord.cs
- WebRequest.cs
- MappedMetaModel.cs
- NetworkStream.cs
- Condition.cs
- DbMetaDataColumnNames.cs
- CodeTypeOfExpression.cs
- MimeObjectFactory.cs
- PropertyTab.cs
- HiddenFieldPageStatePersister.cs
- ResourcesGenerator.cs
- DbConnectionPoolGroupProviderInfo.cs
- LinkedResourceCollection.cs
- SQLDouble.cs
- CodeDirectionExpression.cs
- SemaphoreFullException.cs
- CustomValidator.cs
- __Filters.cs
- WebControlAdapter.cs
- JsonDeserializer.cs
- Serializer.cs
- EdmScalarPropertyAttribute.cs