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
- Image.cs
- QilDataSource.cs
- StandardToolWindows.cs
- FormatterServices.cs
- BindingNavigator.cs
- Convert.cs
- WebResponse.cs
- MessageSecurityTokenVersion.cs
- Message.cs
- EntitySqlQueryBuilder.cs
- ComponentConverter.cs
- Selection.cs
- HostProtectionPermission.cs
- ListViewDataItem.cs
- TemplatePropertyEntry.cs
- EventData.cs
- RemotingSurrogateSelector.cs
- CharEnumerator.cs
- XmlQuerySequence.cs
- OdbcCommand.cs
- Label.cs
- DeflateStream.cs
- ValidationHelper.cs
- RoleManagerSection.cs
- Rect.cs
- CaseInsensitiveHashCodeProvider.cs
- RoleGroupCollection.cs
- XmlSchemaInferenceException.cs
- SecurityPolicyVersion.cs
- ObjectTypeMapping.cs
- InternalControlCollection.cs
- PixelShader.cs
- SimplePropertyEntry.cs
- XmlQueryType.cs
- Pair.cs
- TextProperties.cs
- PtsPage.cs
- Point3DCollection.cs
- EntityDataSourceWizardForm.cs
- InvokeBinder.cs
- EventData.cs
- XmlObjectSerializer.cs
- TreeNodeMouseHoverEvent.cs
- BitmapEffectInput.cs
- ProvideValueServiceProvider.cs
- BindingMAnagerBase.cs
- ProviderCommandInfoUtils.cs
- ExtensibleClassFactory.cs
- MimeTypeMapper.cs
- XmlBinaryReader.cs
- DockAndAnchorLayout.cs
- Color.cs
- DependencyObjectPropertyDescriptor.cs
- ContextMenuStripGroupCollection.cs
- HttpStreamXmlDictionaryReader.cs
- IChannel.cs
- OleDbReferenceCollection.cs
- BindingExpressionUncommonField.cs
- InputLanguageSource.cs
- StickyNoteContentControl.cs
- AuthStoreRoleProvider.cs
- MobileControlsSection.cs
- FileUtil.cs
- HashHelper.cs
- BamlResourceSerializer.cs
- GenericParameterDataContract.cs
- UIElement3D.cs
- UnaryNode.cs
- MimeTypePropertyAttribute.cs
- ScriptManagerProxy.cs
- SystemEvents.cs
- ObjectQuery_EntitySqlExtensions.cs
- CheckBoxPopupAdapter.cs
- Color.cs
- VirtualizingStackPanel.cs
- SeverityFilter.cs
- CodeParameterDeclarationExpression.cs
- CodeExporter.cs
- MediaElementAutomationPeer.cs
- NonBatchDirectoryCompiler.cs
- XamlFilter.cs
- XmlNamedNodeMap.cs
- ClockController.cs
- ClientProtocol.cs
- DataGridLengthConverter.cs
- XamlInt32CollectionSerializer.cs
- NamedPipeChannelListener.cs
- handlecollector.cs
- SetIterators.cs
- HtmlAnchor.cs
- GPPOINTF.cs
- ImmutableCollection.cs
- XPathChildIterator.cs
- QueryContinueDragEvent.cs
- ResolveCriteria.cs
- ByteStream.cs
- XmlMtomWriter.cs
- InputScopeNameConverter.cs
- ControlBuilderAttribute.cs
- ViewStateModeByIdAttribute.cs