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
- DiscoveryClientProtocol.cs
- DataGridViewControlCollection.cs
- JoinElimination.cs
- CalloutQueueItem.cs
- XPathDocumentNavigator.cs
- CollectionDataContractAttribute.cs
- Decimal.cs
- SqlHelper.cs
- InstanceCreationEditor.cs
- XsdDuration.cs
- MSAANativeProvider.cs
- TimeEnumHelper.cs
- ScriptControl.cs
- SqlTrackingService.cs
- ConstantSlot.cs
- TaskFileService.cs
- TabControlAutomationPeer.cs
- WmlSelectionListAdapter.cs
- BaseDataList.cs
- PackagePart.cs
- RouteItem.cs
- CookieHandler.cs
- ServiceThrottlingBehavior.cs
- Propagator.JoinPropagator.cs
- WithStatement.cs
- Hyperlink.cs
- LinkedResourceCollection.cs
- ContentElementAutomationPeer.cs
- SqlParameterCollection.cs
- SplitterEvent.cs
- ListControlConvertEventArgs.cs
- PenLineJoinValidation.cs
- DataGridRelationshipRow.cs
- ListControlConvertEventArgs.cs
- ObjectMemberMapping.cs
- Base64Encoder.cs
- ZipIOLocalFileBlock.cs
- NameValuePermission.cs
- PresentationSource.cs
- MULTI_QI.cs
- PocoPropertyAccessorStrategy.cs
- PropertySegmentSerializationProvider.cs
- XmlCollation.cs
- DataSourceUtil.cs
- dbdatarecord.cs
- PartManifestEntry.cs
- EventProviderWriter.cs
- Quaternion.cs
- PlatformCulture.cs
- WindowsFormsHelpers.cs
- TypeDelegator.cs
- QilLoop.cs
- ConstructorBuilder.cs
- Container.cs
- SystemIPAddressInformation.cs
- SqlUDTStorage.cs
- invalidudtexception.cs
- BrowserPolicyValidator.cs
- BasicExpressionVisitor.cs
- BaseDataBoundControlDesigner.cs
- PhysicalFontFamily.cs
- ContextQuery.cs
- ColumnClickEvent.cs
- AspProxy.cs
- Int16AnimationUsingKeyFrames.cs
- PropertyKey.cs
- AdornerLayer.cs
- TreeViewBindingsEditor.cs
- StatusBarPanel.cs
- EdmError.cs
- ObjectTag.cs
- PanelStyle.cs
- SqlDataSourceFilteringEventArgs.cs
- DataGridTable.cs
- ErrorHandler.cs
- ResourceReferenceKeyNotFoundException.cs
- ThreadWorkerController.cs
- ByteConverter.cs
- TextPointerBase.cs
- HostingEnvironmentSection.cs
- GroupBoxRenderer.cs
- CatalogZone.cs
- PenCursorManager.cs
- PenThread.cs
- TreeView.cs
- MessagePropertyVariants.cs
- ObjectStateFormatter.cs
- EntityFunctions.cs
- AbsoluteQuery.cs
- CacheOutputQuery.cs
- WebPartConnectionsDisconnectVerb.cs
- SqlUnionizer.cs
- HtmlInputFile.cs
- ObjectViewQueryResultData.cs
- FusionWrap.cs
- HttpListenerPrefixCollection.cs
- TableLayoutColumnStyleCollection.cs
- TypeElement.cs
- SimpleWorkerRequest.cs
- SendKeys.cs