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
- DATA_BLOB.cs
- MetadataSection.cs
- SizeF.cs
- ContextBase.cs
- ThreadNeutralSemaphore.cs
- PersistenceException.cs
- ConfigsHelper.cs
- PassportAuthenticationEventArgs.cs
- FigureHelper.cs
- DocumentSchemaValidator.cs
- XmlNamespaceMapping.cs
- EllipticalNodeOperations.cs
- RegistryConfigurationProvider.cs
- ViewgenGatekeeper.cs
- CFGGrammar.cs
- BitmapSource.cs
- ImageKeyConverter.cs
- EntityDataSourceDataSelection.cs
- XmlSchemaChoice.cs
- ScrollBarRenderer.cs
- GridViewColumn.cs
- IsolatedStoragePermission.cs
- TransactedReceiveData.cs
- PriorityBindingExpression.cs
- ClientTargetSection.cs
- StringFreezingAttribute.cs
- ListViewDesigner.cs
- CatalogPartCollection.cs
- SelectionEditor.cs
- SelectedDatesCollection.cs
- Model3D.cs
- TreeWalkHelper.cs
- LinqDataSourceInsertEventArgs.cs
- X509Certificate2.cs
- ISCIIEncoding.cs
- RadioButtonFlatAdapter.cs
- TypedServiceChannelBuilder.cs
- CacheOutputQuery.cs
- SafeNativeMethodsMilCoreApi.cs
- ConditionalAttribute.cs
- LayoutExceptionEventArgs.cs
- DependencyPropertyAttribute.cs
- CopyNodeSetAction.cs
- ExpressionBuilder.cs
- Attributes.cs
- TcpClientSocketManager.cs
- CompositeDesignerAccessibleObject.cs
- RealProxy.cs
- SchemaCollectionCompiler.cs
- DBSqlParserColumn.cs
- SamlSubjectStatement.cs
- Maps.cs
- LockedAssemblyCache.cs
- ToolStripOverflow.cs
- Delegate.cs
- XmlSortKeyAccumulator.cs
- DescendantOverDescendantQuery.cs
- ProjectedSlot.cs
- Sequence.cs
- DynamicField.cs
- RoleBoolean.cs
- CharacterMetrics.cs
- PreservationFileWriter.cs
- Int64Animation.cs
- ExpressionBinding.cs
- ManipulationDevice.cs
- FlowThrottle.cs
- XmlNamespaceDeclarationsAttribute.cs
- DATA_BLOB.cs
- PageAdapter.cs
- DoubleLinkListEnumerator.cs
- DataReaderContainer.cs
- OptimizedTemplateContent.cs
- SerialErrors.cs
- SafeCryptoHandles.cs
- BufferedWebEventProvider.cs
- SqlError.cs
- StylusButtonCollection.cs
- SpellerError.cs
- RuntimeResourceSet.cs
- CompressionTransform.cs
- ImageAttributes.cs
- InvokeGenerator.cs
- WebServiceEndpoint.cs
- GroupItemAutomationPeer.cs
- CompensatableTransactionScopeActivity.cs
- BindingBase.cs
- EventPrivateKey.cs
- XmlHierarchyData.cs
- WindowsListViewGroup.cs
- FrameworkElementFactoryMarkupObject.cs
- ObjectViewQueryResultData.cs
- XdrBuilder.cs
- WorkflowServiceNamespace.cs
- InternalTransaction.cs
- oledbmetadatacolumnnames.cs
- DataContext.cs
- XmlCharacterData.cs
- XmlJsonWriter.cs
- FontInfo.cs