Code:
/ FX-1434 / FX-1434 / 1.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
- HtmlTableRowCollection.cs
- SQLBinaryStorage.cs
- ConfigurationValues.cs
- ManagementObjectCollection.cs
- GenerateScriptTypeAttribute.cs
- TrackingProfileSerializer.cs
- LockCookie.cs
- SafeEventLogReadHandle.cs
- ComIntegrationManifestGenerator.cs
- XmlIlTypeHelper.cs
- XmlSchemaAttributeGroup.cs
- DependencyObject.cs
- SystemResources.cs
- SerializationAttributes.cs
- BufferModeSettings.cs
- IndexedSelectQueryOperator.cs
- SoapServerMessage.cs
- GroupBox.cs
- TypeCacheManager.cs
- HttpSocketManager.cs
- MetafileHeaderWmf.cs
- ObjectConverter.cs
- TemplatedAdorner.cs
- ToReply.cs
- HelpInfo.cs
- CollaborationHelperFunctions.cs
- NativeMethods.cs
- LessThan.cs
- WebScriptMetadataMessageEncodingBindingElement.cs
- ServiceReference.cs
- ManipulationBoundaryFeedbackEventArgs.cs
- ListenerElementsCollection.cs
- ZoneLinkButton.cs
- CodeTypeMemberCollection.cs
- WindowsIPAddress.cs
- StringTraceRecord.cs
- SortableBindingList.cs
- QualifiedCellIdBoolean.cs
- SByteConverter.cs
- DataView.cs
- ParameterDataSourceExpression.cs
- BeginEvent.cs
- InplaceBitmapMetadataWriter.cs
- ValidateNames.cs
- NavigationProgressEventArgs.cs
- ProcessHost.cs
- XamlSerializationHelper.cs
- MouseGesture.cs
- DataGridViewAdvancedBorderStyle.cs
- StyleXamlTreeBuilder.cs
- ThicknessAnimation.cs
- RawContentTypeMapper.cs
- DelegatingTypeDescriptionProvider.cs
- AssemblyAssociatedContentFileAttribute.cs
- ResourceContainerWrapper.cs
- FileSecurity.cs
- AsnEncodedData.cs
- SafeNativeMethods.cs
- metadatamappinghashervisitor.hashsourcebuilder.cs
- FaultDescription.cs
- HuffCodec.cs
- GenericsInstances.cs
- Point.cs
- HtmlElement.cs
- CustomErrorsSection.cs
- RawStylusInput.cs
- XmlWrappingReader.cs
- HMACMD5.cs
- DynamicScriptObject.cs
- DataTableMappingCollection.cs
- TextServicesProperty.cs
- MsmqMessage.cs
- BitmapFrameEncode.cs
- SequentialOutput.cs
- TextEditorMouse.cs
- Wizard.cs
- QuaternionConverter.cs
- PageStatePersister.cs
- ParallelTimeline.cs
- HtmlMeta.cs
- ZeroOpNode.cs
- GridEntryCollection.cs
- OleDbStruct.cs
- WsdlInspector.cs
- Decoder.cs
- CursorConverter.cs
- DataGridAddNewRow.cs
- MetadataUtil.cs
- FormsIdentity.cs
- LiteralControl.cs
- XhtmlConformanceSection.cs
- NavigatorInvalidBodyAccessException.cs
- ByeOperationCD1AsyncResult.cs
- ApplicationException.cs
- EnvironmentPermission.cs
- PageMediaType.cs
- DataGridItemEventArgs.cs
- StylusLogic.cs
- CqlLexerHelpers.cs
- GeneralEndpointIdentity.cs