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
- UserMapPath.cs
- HiddenField.cs
- BuildResultCache.cs
- Animatable.cs
- MailFileEditor.cs
- XmlSchemaCompilationSettings.cs
- GotoExpression.cs
- MouseWheelEventArgs.cs
- WaveHeader.cs
- TemplateParser.cs
- PackageDigitalSignatureManager.cs
- SignerInfo.cs
- HtmlSelect.cs
- QilXmlWriter.cs
- EventLogWatcher.cs
- Screen.cs
- SizeChangedEventArgs.cs
- DesignSurfaceManager.cs
- UIElement3DAutomationPeer.cs
- BuildProvidersCompiler.cs
- DataGridViewMethods.cs
- BrowserTree.cs
- SectionUpdates.cs
- XPathParser.cs
- ConstructorBuilder.cs
- ContentPosition.cs
- DtdParser.cs
- StrokeNodeOperations.cs
- HScrollProperties.cs
- AddToCollection.cs
- BoundField.cs
- DuplicateWaitObjectException.cs
- SqlRecordBuffer.cs
- SmtpNegotiateAuthenticationModule.cs
- CompilerGeneratedAttribute.cs
- LocalizationComments.cs
- SecurityUtils.cs
- InstanceNormalEvent.cs
- TypeDefinition.cs
- HandlerBase.cs
- XmlTextAttribute.cs
- ToolStripContentPanel.cs
- TransactionFilter.cs
- InternalControlCollection.cs
- TreeNodeCollection.cs
- Delay.cs
- SystemPens.cs
- TokenCreationParameter.cs
- MsmqElementBase.cs
- KeyboardInputProviderAcquireFocusEventArgs.cs
- UpdatePanel.cs
- SecurityCredentialsManager.cs
- MultiBinding.cs
- TransformPatternIdentifiers.cs
- AsymmetricAlgorithm.cs
- HebrewNumber.cs
- VirtualizingPanel.cs
- SqlMetaData.cs
- CodeTypeReferenceSerializer.cs
- TypeAccessException.cs
- AutomationProperty.cs
- PerspectiveCamera.cs
- UiaCoreProviderApi.cs
- DomainLiteralReader.cs
- EnumerationRangeValidationUtil.cs
- SqlNode.cs
- IMembershipProvider.cs
- safelinkcollection.cs
- XmlDictionaryReaderQuotas.cs
- SqlCommandSet.cs
- COM2Enum.cs
- AssociationType.cs
- JavaScriptObjectDeserializer.cs
- HelpProvider.cs
- ProgressBar.cs
- HtmlLiteralTextAdapter.cs
- InvalidCastException.cs
- XmlChoiceIdentifierAttribute.cs
- SystemIPInterfaceProperties.cs
- AuditLevel.cs
- CommandPlan.cs
- HandleRef.cs
- UrlMapping.cs
- PrintPreviewDialog.cs
- XslCompiledTransform.cs
- AsyncStreamReader.cs
- Int32.cs
- WindowsPrincipal.cs
- BamlLocalizableResourceKey.cs
- ManifestResourceInfo.cs
- DataListItemCollection.cs
- DataGridViewCellParsingEventArgs.cs
- SqlCacheDependencyDatabase.cs
- XmlSerializerFaultFormatter.cs
- XmlCountingReader.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- updatecommandorderer.cs
- Math.cs
- DeviceSpecificChoiceCollection.cs
- ObjectDataSourceEventArgs.cs