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
- DataGridTextBox.cs
- BinaryExpression.cs
- Int32EqualityComparer.cs
- EditorBrowsableAttribute.cs
- AccessText.cs
- Roles.cs
- CodeComment.cs
- HyperLink.cs
- HttpCookie.cs
- EventProvider.cs
- DataRecordInternal.cs
- StructuredTypeEmitter.cs
- TransformPattern.cs
- DataGridViewAutoSizeModeEventArgs.cs
- ScriptHandlerFactory.cs
- ReadOnlyDictionary.cs
- DataGridViewColumnEventArgs.cs
- TemplateLookupAction.cs
- DataContract.cs
- Mutex.cs
- ReadOnlyCollectionBase.cs
- WindowsIPAddress.cs
- DashStyles.cs
- PointUtil.cs
- CodeStatementCollection.cs
- ConnectAlgorithms.cs
- CapabilitiesPattern.cs
- OleDbFactory.cs
- DataGridViewLinkColumn.cs
- ScrollChrome.cs
- InProcStateClientManager.cs
- ExpressionBuilder.cs
- WebException.cs
- UriParserTemplates.cs
- ContextBase.cs
- DescendantBaseQuery.cs
- HMACSHA384.cs
- TdsParserStaticMethods.cs
- ToolboxItemWrapper.cs
- Int32Converter.cs
- StringHandle.cs
- MultiBinding.cs
- InvalidEnumArgumentException.cs
- ISessionStateStore.cs
- EventDescriptor.cs
- StackBuilderSink.cs
- CultureTable.cs
- ListenerElementsCollection.cs
- ClientSession.cs
- SubMenuStyle.cs
- CodeObject.cs
- BindingWorker.cs
- NotCondition.cs
- ThumbAutomationPeer.cs
- Vector3DIndependentAnimationStorage.cs
- IntPtr.cs
- DesignBindingValueUIHandler.cs
- ColorAnimationUsingKeyFrames.cs
- TextSegment.cs
- DoubleCollection.cs
- ResXResourceReader.cs
- Codec.cs
- XmlSchema.cs
- ExpandSegment.cs
- ResXResourceWriter.cs
- CommaDelimitedStringAttributeCollectionConverter.cs
- XmlSchemaIdentityConstraint.cs
- FloatAverageAggregationOperator.cs
- XPathSelectionIterator.cs
- SqlDataSourceCustomCommandEditor.cs
- SafeLibraryHandle.cs
- ResourceSetExpression.cs
- InstalledFontCollection.cs
- TextRenderer.cs
- KeyValuePair.cs
- TagPrefixAttribute.cs
- complextypematerializer.cs
- SafeRegistryHandle.cs
- CompilerScopeManager.cs
- SplitterCancelEvent.cs
- PersonalizationDictionary.cs
- DeferrableContent.cs
- QueryPageSettingsEventArgs.cs
- ClientConvert.cs
- BrushValueSerializer.cs
- SynchronizedInputAdaptor.cs
- RadioButtonAutomationPeer.cs
- SrgsDocumentParser.cs
- TargetConverter.cs
- CacheEntry.cs
- DatatypeImplementation.cs
- PageThemeCodeDomTreeGenerator.cs
- HotSpotCollection.cs
- GridItemPatternIdentifiers.cs
- Constant.cs
- HijriCalendar.cs
- BindingGroup.cs
- CancellationTokenSource.cs
- Assert.cs
- Mapping.cs