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
- PassportIdentity.cs
- ProfileManager.cs
- ProfileInfo.cs
- BitmapEffectGeneralTransform.cs
- CatalogZoneBase.cs
- Profiler.cs
- DateTimeConverter.cs
- CommentAction.cs
- MailAddress.cs
- KeyTimeConverter.cs
- DetailsViewInsertedEventArgs.cs
- ReferenceEqualityComparer.cs
- ImageMap.cs
- InstancePersistenceCommandException.cs
- _HTTPDateParse.cs
- AssemblyResourceLoader.cs
- DataGridLinkButton.cs
- ReadWriteSpinLock.cs
- InfiniteTimeSpanConverter.cs
- BookmarkCallbackWrapper.cs
- HttpWebRequest.cs
- NavigationPropertyEmitter.cs
- RichTextBoxConstants.cs
- ReferenceTypeElement.cs
- TimeZone.cs
- XmlSerializerFactory.cs
- ParamArrayAttribute.cs
- CalculatedColumn.cs
- ResourceKey.cs
- PaperSize.cs
- NativeMethods.cs
- CorrelationRequestContext.cs
- EnumerableCollectionView.cs
- UserPersonalizationStateInfo.cs
- SectionUpdates.cs
- GridLength.cs
- ConnectivityStatus.cs
- Collection.cs
- RenderContext.cs
- OleAutBinder.cs
- PersistChildrenAttribute.cs
- PathSegmentCollection.cs
- NotCondition.cs
- MatrixTransform3D.cs
- DragEventArgs.cs
- ByteKeyFrameCollection.cs
- UniqueID.cs
- ItemCheckEvent.cs
- Cursors.cs
- Size.cs
- DocumentApplication.cs
- DynamicActivityTypeDescriptor.cs
- DataGridHeaderBorder.cs
- XmlAttributeProperties.cs
- ThreadAttributes.cs
- BindValidationContext.cs
- CommandDevice.cs
- _DigestClient.cs
- EntitySetBaseCollection.cs
- RenderDataDrawingContext.cs
- WebBrowserDocumentCompletedEventHandler.cs
- MenuCommand.cs
- ScrollChrome.cs
- Timeline.cs
- TdsParserStaticMethods.cs
- DoubleLink.cs
- IncrementalCompileAnalyzer.cs
- Package.cs
- NativeMethods.cs
- AppSecurityManager.cs
- FileDetails.cs
- HideDisabledControlAdapter.cs
- DocumentOrderComparer.cs
- AutoGeneratedField.cs
- PickBranchDesigner.xaml.cs
- CodePageEncoding.cs
- Animatable.cs
- ContextDataSourceContextData.cs
- DataControlPagerLinkButton.cs
- HttpRuntime.cs
- SpeechSynthesizer.cs
- XPathDocumentBuilder.cs
- Ticks.cs
- LicenseProviderAttribute.cs
- BinaryNode.cs
- ProfilePropertyNameValidator.cs
- WebConfigurationManager.cs
- HyperLinkColumn.cs
- SocketElement.cs
- ServiceCredentialsSecurityTokenManager.cs
- EncoderExceptionFallback.cs
- TemplateXamlTreeBuilder.cs
- BoundColumn.cs
- IsolationInterop.cs
- SafeMemoryMappedViewHandle.cs
- SmtpNegotiateAuthenticationModule.cs
- TextContainer.cs
- File.cs
- Pen.cs
- SessionSymmetricTransportSecurityProtocolFactory.cs