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
- Dispatcher.cs
- LineMetrics.cs
- EntityClassGenerator.cs
- TreePrinter.cs
- ChannelManager.cs
- figurelengthconverter.cs
- TlsnegoTokenAuthenticator.cs
- DeferredElementTreeState.cs
- MaskedTextProvider.cs
- EmptyStringExpandableObjectConverter.cs
- ConfigXmlDocument.cs
- UnknownWrapper.cs
- ChangePasswordAutoFormat.cs
- BaseAppDomainProtocolHandler.cs
- HtmlControl.cs
- ClientType.cs
- DtcInterfaces.cs
- PropertyGeneratedEventArgs.cs
- TransformerTypeCollection.cs
- X509ChainElement.cs
- ProtocolsSection.cs
- AnimationClock.cs
- FixedBufferAttribute.cs
- VideoDrawing.cs
- VoiceChangeEventArgs.cs
- DataRelation.cs
- DataGridViewImageCell.cs
- Int16.cs
- ColorAnimationUsingKeyFrames.cs
- DbConnectionPoolIdentity.cs
- ObjectPersistData.cs
- Transform3DGroup.cs
- ItemMap.cs
- Operator.cs
- SecurityElement.cs
- PriorityRange.cs
- EntityDataSourceWizardForm.cs
- ReaderWriterLock.cs
- BitmapPalettes.cs
- ConfigurationValue.cs
- StyleBamlTreeBuilder.cs
- FullTrustAssembliesSection.cs
- Model3D.cs
- RelationshipEndMember.cs
- GridViewCommandEventArgs.cs
- QueueTransferProtocol.cs
- DataBoundControl.cs
- TimeZoneInfo.cs
- VisualBasicSettingsHandler.cs
- XmlNavigatorFilter.cs
- GeneralTransform.cs
- UpDownBaseDesigner.cs
- SqlDataSourceDesigner.cs
- ReadOnlyCollection.cs
- DecimalConstantAttribute.cs
- Button.cs
- OwnerDrawPropertyBag.cs
- FilteredXmlReader.cs
- BindingSource.cs
- InsufficientMemoryException.cs
- TimeZoneNotFoundException.cs
- MethodExpr.cs
- CookieProtection.cs
- KeyGestureValueSerializer.cs
- RecognizerStateChangedEventArgs.cs
- ImageDrawing.cs
- CqlQuery.cs
- InteropBitmapSource.cs
- BufferedWebEventProvider.cs
- CompoundFileStorageReference.cs
- SizeFConverter.cs
- ByteStreamGeometryContext.cs
- WebResourceAttribute.cs
- CornerRadiusConverter.cs
- NetDataContractSerializer.cs
- SingleBodyParameterMessageFormatter.cs
- ManipulationStartingEventArgs.cs
- XmlCharType.cs
- mediaeventargs.cs
- HtmlEncodedRawTextWriter.cs
- SerializationInfo.cs
- initElementDictionary.cs
- Vector3DCollection.cs
- EventWaitHandleSecurity.cs
- Point4D.cs
- ProtocolsConfigurationHandler.cs
- DoubleConverter.cs
- commandenforcer.cs
- UIElementCollection.cs
- InstanceDescriptor.cs
- NamespaceTable.cs
- MimePart.cs
- CustomAssemblyResolver.cs
- MonitoringDescriptionAttribute.cs
- ProcessModelSection.cs
- TransformCryptoHandle.cs
- MetadataUtil.cs
- VirtualPathExtension.cs
- MetadataItem_Static.cs
- Point.cs