Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- SiteMapNodeItemEventArgs.cs
- SerializationException.cs
- PictureBox.cs
- CounterSampleCalculator.cs
- CheckBoxPopupAdapter.cs
- PageTheme.cs
- BStrWrapper.cs
- XmlChildEnumerator.cs
- DatatypeImplementation.cs
- ContentElement.cs
- ValidationResult.cs
- XpsImage.cs
- ConnectionPointGlyph.cs
- ListBindableAttribute.cs
- Model3DGroup.cs
- DesignerMetadata.cs
- ThreadPool.cs
- ViewGenResults.cs
- OutputCacheSection.cs
- GeometryGroup.cs
- UnsafeNativeMethods.cs
- FatalException.cs
- ThreadPool.cs
- SqlIdentifier.cs
- DispatcherFrame.cs
- ExceptionUtil.cs
- XmlSchemaSimpleType.cs
- SystemInfo.cs
- WindowsSolidBrush.cs
- XmlSchemaSequence.cs
- ProcessThreadCollection.cs
- SerializationException.cs
- HandledMouseEvent.cs
- DataStreams.cs
- ClonableStack.cs
- AssertHelper.cs
- CodeThrowExceptionStatement.cs
- RawTextInputReport.cs
- ParallelTimeline.cs
- HostDesigntimeLicenseContext.cs
- GridItemPatternIdentifiers.cs
- SafeNativeMethods.cs
- TraceSection.cs
- QueryCursorEventArgs.cs
- TransactedReceiveData.cs
- Transform.cs
- DiagnosticTraceSource.cs
- ZipIOModeEnforcingStream.cs
- XmlEntityReference.cs
- ObjectListField.cs
- EndpointReference.cs
- WebException.cs
- DoubleAnimationBase.cs
- WindowsRegion.cs
- CopyOfAction.cs
- XmlSchemaNotation.cs
- EntitySetDataBindingList.cs
- dataprotectionpermission.cs
- StyleTypedPropertyAttribute.cs
- FrameworkTemplate.cs
- ProfilePropertyMetadata.cs
- RegistrationServices.cs
- TextDecorations.cs
- WebResourceAttribute.cs
- CodeNamespaceCollection.cs
- BindableAttribute.cs
- PrintDialog.cs
- RepeaterItem.cs
- SafeRightsManagementQueryHandle.cs
- PcmConverter.cs
- WizardPanel.cs
- XmlnsCompatibleWithAttribute.cs
- TemplateControlParser.cs
- PreviewControlDesigner.cs
- TextSpanModifier.cs
- Compiler.cs
- RoutedUICommand.cs
- XmlWrappingReader.cs
- StorageBasedPackageProperties.cs
- AuthorizationRuleCollection.cs
- ButtonBase.cs
- CompressionTransform.cs
- DataControlButton.cs
- XsdValidatingReader.cs
- FontCollection.cs
- Soap12ProtocolReflector.cs
- SqlStream.cs
- ServiceThrottlingElement.cs
- DependencyPropertyChangedEventArgs.cs
- WebScriptServiceHost.cs
- KeyConverter.cs
- ExtractorMetadata.cs
- FastEncoder.cs
- Setter.cs
- CompilerResults.cs
- SweepDirectionValidation.cs
- XmlCountingReader.cs
- httpapplicationstate.cs
- DeploymentSection.cs
- Pair.cs