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; ////// [AttributeUsage(AttributeTargets.All)] public sealed class MergablePropertyAttribute : Attribute { ///Specifies that /// this property can be combined with properties belonging to /// other objects in a properties window. ////// public static readonly MergablePropertyAttribute Yes = new MergablePropertyAttribute(true); ////// 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 No = new MergablePropertyAttribute(false); ////// 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 Default = Yes; private bool allowMerge; ////// 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 MergablePropertyAttribute(bool allowMerge) { this.allowMerge = allowMerge; } ////// Initializes a new instance of the ////// class. /// /// public bool AllowMerge { get { return allowMerge; } } ////// Gets a value indicating whether this /// property can be combined with properties belonging to other objects in a /// properties window. /// ////// /// public override bool Equals(object obj) { if (obj == this) { return true; } MergablePropertyAttribute other = obj as MergablePropertyAttribute; return other != null && other.AllowMerge == this.allowMerge; } ////// public override int GetHashCode() { return base.GetHashCode(); } ////// Returns the hashcode for this object. /// ////// ///public override bool IsDefaultAttribute() { return (this.Equals(Default)); } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Function.cs
- formatter.cs
- AnnouncementClient.cs
- TreeNodeBinding.cs
- InteropAutomationProvider.cs
- CultureInfo.cs
- XmlSchemaSimpleTypeList.cs
- ResourceDisplayNameAttribute.cs
- WebPartAddingEventArgs.cs
- FlowDocumentFormatter.cs
- DataGridColumnReorderingEventArgs.cs
- WebBaseEventKeyComparer.cs
- IIS7UserPrincipal.cs
- MetadataException.cs
- SwitchLevelAttribute.cs
- NonClientArea.cs
- storagemappingitemcollection.viewdictionary.cs
- XmlDeclaration.cs
- EntityTemplateUserControl.cs
- FileLogRecordEnumerator.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- SchemaUtility.cs
- PrivilegeNotHeldException.cs
- QilReference.cs
- ObjectListItemCollection.cs
- GridViewPageEventArgs.cs
- MediaTimeline.cs
- DataSourceControl.cs
- TextCompositionManager.cs
- FunctionCommandText.cs
- OdbcEnvironment.cs
- AutomationEvent.cs
- Int32RectValueSerializer.cs
- UrlMappingsSection.cs
- ToolStripDropDownClosedEventArgs.cs
- RelationshipType.cs
- Stroke.cs
- Decorator.cs
- AnimationTimeline.cs
- HtmlInputImage.cs
- ConnectionPoolManager.cs
- PropertyConverter.cs
- AsyncSerializedWorker.cs
- BigInt.cs
- BufferCache.cs
- MultilineStringConverter.cs
- ToolboxItem.cs
- WindowsPrincipal.cs
- RtfNavigator.cs
- GroupBox.cs
- XmlDataLoader.cs
- XmlComplianceUtil.cs
- WSMessageEncoding.cs
- ConfigXmlElement.cs
- AsymmetricAlgorithm.cs
- DataGridViewCheckBoxColumn.cs
- SR.cs
- XomlCompiler.cs
- OrCondition.cs
- XsdDataContractImporter.cs
- Asn1IntegerConverter.cs
- XhtmlBasicPhoneCallAdapter.cs
- Schedule.cs
- DefaultTraceListener.cs
- AnonymousIdentificationModule.cs
- BrowserDefinitionCollection.cs
- TextContainer.cs
- CodeBlockBuilder.cs
- GradientBrush.cs
- GraphicsPath.cs
- ConfigurationStrings.cs
- ToolBar.cs
- FileController.cs
- Substitution.cs
- ModelItemExtensions.cs
- ListViewEditEventArgs.cs
- VersionedStreamOwner.cs
- SerialStream.cs
- EntitySqlQueryState.cs
- DesignerForm.cs
- CharacterMetricsDictionary.cs
- PropertyChangingEventArgs.cs
- KeysConverter.cs
- DataGridColumn.cs
- EdmFunction.cs
- MultipartIdentifier.cs
- dataobject.cs
- Screen.cs
- ValidationRule.cs
- XmlTextEncoder.cs
- TextParentUndoUnit.cs
- WebService.cs
- SqlDependencyUtils.cs
- PieceDirectory.cs
- DependencyPropertyKind.cs
- Main.cs
- Thread.cs
- ListManagerBindingsCollection.cs
- safelink.cs
- TranslateTransform.cs