Code:
/ 4.0 / 4.0 / untmp / 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;
///
/// Provides a value indicating whether the name of the associated property is parenthesized in the
/// properties window.
///
[AttributeUsage(AttributeTargets.All)]
public sealed class ParenthesizePropertyNameAttribute : Attribute {
///
///
/// Sets the System.ComponentModel.Design.ParenthesizePropertyName
/// attribute by default to
/// .
///
///
public static readonly ParenthesizePropertyNameAttribute Default = new ParenthesizePropertyNameAttribute();
private bool needParenthesis;
///
/// [To be supplied.]
///
public ParenthesizePropertyNameAttribute() : this(false) {
}
///
/// 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 ParenthesizePropertyNameAttribute(bool needParenthesis) {
this.needParenthesis = needParenthesis;
}
///
///
/// Gets a value indicating
/// whether the
/// attribute is placed in parentheses when listed in
/// the properties window.
///
///
public bool NeedParenthesis {
get {
return needParenthesis;
}
}
///
/// Compares the specified object
/// to this object and tests for equality.
///
public override bool Equals(object o) {
if (o is ParenthesizePropertyNameAttribute) {
return ((ParenthesizePropertyNameAttribute)o).NeedParenthesis == needParenthesis;
}
return false;
}
///
///
/// Returns the hashcode for this object.
///
///
public override int GetHashCode() {
return base.GetHashCode();
}
///
/// Gets a value indicating whether this attribute is set to by default.
///
public override bool IsDefaultAttribute() {
return this.Equals(Default);
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SelectionItemProviderWrapper.cs
- IdentityHolder.cs
- CodeAttributeArgument.cs
- MgmtConfigurationRecord.cs
- SingleAnimation.cs
- OperationAbortedException.cs
- StorageInfo.cs
- GlyphRun.cs
- TypeElement.cs
- ParserOptions.cs
- DiscoveryDocument.cs
- HandleExceptionArgs.cs
- SafeArchiveContext.cs
- ShaderRenderModeValidation.cs
- PointConverter.cs
- DbConnectionInternal.cs
- GatewayIPAddressInformationCollection.cs
- EditorZone.cs
- CacheModeConverter.cs
- TcpChannelHelper.cs
- COM2ComponentEditor.cs
- XmlSerializerVersionAttribute.cs
- XmlNullResolver.cs
- TypeInfo.cs
- SchemaCollectionCompiler.cs
- DbConnectionHelper.cs
- CancellationToken.cs
- ADConnectionHelper.cs
- compensatingcollection.cs
- ToolStripContentPanelRenderEventArgs.cs
- FindResponse.cs
- BlobPersonalizationState.cs
- NetworkAddressChange.cs
- XmlKeywords.cs
- MessagingDescriptionAttribute.cs
- GroupedContextMenuStrip.cs
- MessageLogger.cs
- DataObjectFieldAttribute.cs
- ValidationResult.cs
- LambdaCompiler.Statements.cs
- SmtpTransport.cs
- ArgumentOutOfRangeException.cs
- DurableInstanceContextProvider.cs
- Underline.cs
- SrgsElementFactory.cs
- DataControlLinkButton.cs
- PathGeometry.cs
- UIElementCollection.cs
- XmlQueryOutput.cs
- AuthorizationSection.cs
- TypeNameConverter.cs
- Emitter.cs
- invalidudtexception.cs
- CompiledWorkflowDefinitionContext.cs
- LinkClickEvent.cs
- HMACRIPEMD160.cs
- ErrorProvider.cs
- HashStream.cs
- FunctionDetailsReader.cs
- BCryptNative.cs
- TransactedBatchingBehavior.cs
- StylusPointPropertyInfoDefaults.cs
- ConfigurationLoader.cs
- Int32AnimationBase.cs
- DetailsViewAutoFormat.cs
- PeerObject.cs
- RandomNumberGenerator.cs
- SqlProviderManifest.cs
- StringValidatorAttribute.cs
- HttpRuntime.cs
- SafeFileMappingHandle.cs
- StylusButtonEventArgs.cs
- DataPagerFieldCollection.cs
- EdmScalarPropertyAttribute.cs
- entitydatasourceentitysetnameconverter.cs
- ViewGenResults.cs
- AutomationIdentifierGuids.cs
- SqlHelper.cs
- CryptoKeySecurity.cs
- ConnectionInterfaceCollection.cs
- UpdateCommand.cs
- CharConverter.cs
- FormsAuthenticationModule.cs
- TcpChannelListener.cs
- DES.cs
- Container.cs
- IriParsingElement.cs
- JoinElimination.cs
- WebPartsPersonalization.cs
- RotateTransform.cs
- _NestedSingleAsyncResult.cs
- ServiceSecurityAuditElement.cs
- SafeNativeMethods.cs
- SQLSingle.cs
- NotSupportedException.cs
- MaskedTextBox.cs
- XPathAncestorQuery.cs
- GridViewRowPresenterBase.cs
- XsltArgumentList.cs
- messageonlyhwndwrapper.cs