Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / ComponentModel / MergablePropertyAttribute.cs / 1 / MergablePropertyAttribute.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
*/
namespace System.ComponentModel {
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Security.Permissions;
///
/// Specifies that
/// this property can be combined with properties belonging to
/// other objects in a properties window.
///
[AttributeUsage(AttributeTargets.All)]
public sealed class MergablePropertyAttribute : Attribute {
///
///
/// Specifies that a property can be combined with properties belonging to other
/// objects in a properties window. This field is read-only.
///
///
public static readonly MergablePropertyAttribute Yes = new MergablePropertyAttribute(true);
///
///
/// Specifies that a property cannot be combined with properties belonging to
/// other objects in a properties window. This field is
/// read-only.
///
///
public static readonly MergablePropertyAttribute No = new MergablePropertyAttribute(false);
///
///
/// Specifies the default value, which is , that is a property can be combined with
/// properties belonging to other objects in a properties window. This field is read-only.
///
///
public static readonly MergablePropertyAttribute Default = Yes;
private bool allowMerge;
///
///
/// Initializes a new instance of the
/// class.
///
///
public MergablePropertyAttribute(bool allowMerge) {
this.allowMerge = allowMerge;
}
///
///
/// Gets a value indicating whether this
/// property can be combined with properties belonging to other objects in a
/// properties window.
///
///
public bool AllowMerge {
get {
return allowMerge;
}
}
///
///
///
public override bool Equals(object obj) {
if (obj == this) {
return true;
}
MergablePropertyAttribute other = obj as MergablePropertyAttribute;
return other != null && other.AllowMerge == this.allowMerge;
}
///
///
/// Returns the hashcode for this object.
///
///
public override int GetHashCode() {
return base.GetHashCode();
}
///
///
///
public override bool IsDefaultAttribute() {
return (this.Equals(Default));
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- LabelEditEvent.cs
- ValidatorUtils.cs
- ConfigXmlComment.cs
- RightsManagementInformation.cs
- SoapProtocolImporter.cs
- AddInIpcChannel.cs
- TextParagraph.cs
- ScrollChrome.cs
- XmlNamedNodeMap.cs
- TargetParameterCountException.cs
- VerificationAttribute.cs
- CqlWriter.cs
- BinaryParser.cs
- OleDbError.cs
- DeclaredTypeElement.cs
- ConfigXmlReader.cs
- BitmapEffectrendercontext.cs
- TextMarkerSource.cs
- GeometryHitTestParameters.cs
- FloatMinMaxAggregationOperator.cs
- GZipStream.cs
- InternalConfigEventArgs.cs
- XamlFxTrace.cs
- BinaryObjectWriter.cs
- CollaborationHelperFunctions.cs
- SoapProtocolReflector.cs
- PageParser.cs
- FragmentNavigationEventArgs.cs
- XmlBinaryReaderSession.cs
- DataGridViewLinkColumn.cs
- LeafCellTreeNode.cs
- XmlComment.cs
- TableLayoutColumnStyleCollection.cs
- LogReserveAndAppendState.cs
- EntityConnection.cs
- GridViewCellAutomationPeer.cs
- WebPart.cs
- WebPartEditorApplyVerb.cs
- SMSvcHost.cs
- UpdateDelegates.Generated.cs
- PageRequestManager.cs
- DateTimeStorage.cs
- PersonalizationProvider.cs
- TemplateBaseAction.cs
- _LocalDataStoreMgr.cs
- SingleResultAttribute.cs
- XmlnsDictionary.cs
- MsiStyleLogWriter.cs
- UnsafeNativeMethods.cs
- SigningCredentials.cs
- KeyedPriorityQueue.cs
- SendActivityEventArgs.cs
- SslStreamSecurityUpgradeProvider.cs
- RuntimeEnvironment.cs
- ColorTransformHelper.cs
- MsmqTransportSecurityElement.cs
- UserInitiatedNavigationPermission.cs
- AccessedThroughPropertyAttribute.cs
- SafeProcessHandle.cs
- AttachedAnnotation.cs
- XPathNavigatorKeyComparer.cs
- CatalogPartChrome.cs
- OperationResponse.cs
- XmlSchemaValidationException.cs
- StoreAnnotationsMap.cs
- CommonDialog.cs
- MbpInfo.cs
- PerformanceCounterManager.cs
- BitmapDecoder.cs
- EntityTransaction.cs
- Update.cs
- StringStorage.cs
- XPathItem.cs
- WebControlsSection.cs
- RadioButton.cs
- Vector3DKeyFrameCollection.cs
- UInt32Storage.cs
- CfgParser.cs
- GradientBrush.cs
- UriTemplateCompoundPathSegment.cs
- XXXOnTypeBuilderInstantiation.cs
- SerialReceived.cs
- AsyncResult.cs
- RsaKeyIdentifierClause.cs
- StoreAnnotationsMap.cs
- SqlResolver.cs
- RequestCachingSection.cs
- EntityViewGenerationAttribute.cs
- EntityDataSourceConfigureObjectContextPanel.cs
- CancelEventArgs.cs
- AddInBase.cs
- WebConfigurationHost.cs
- BoolExpressionVisitors.cs
- SHA256.cs
- ZipPackage.cs
- OneWayElement.cs
- SapiInterop.cs
- DataSourceView.cs
- SubstitutionList.cs
- sqlnorm.cs