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; ////// [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
- CellTreeNode.cs
- ModelPropertyImpl.cs
- ConfigurationProperty.cs
- TextBox.cs
- Misc.cs
- CookieProtection.cs
- ToolStripSplitStackLayout.cs
- Stacktrace.cs
- Delegate.cs
- Input.cs
- Blend.cs
- ProgressBarRenderer.cs
- ConnectionConsumerAttribute.cs
- DuplicateWaitObjectException.cs
- AccessViolationException.cs
- ReferencedAssembly.cs
- DbConnectionClosed.cs
- contentDescriptor.cs
- RenderContext.cs
- SecurityContextCookieSerializer.cs
- EmptyReadOnlyDictionaryInternal.cs
- SecurityContextTokenValidationException.cs
- UICuesEvent.cs
- ErrorWebPart.cs
- SimpleApplicationHost.cs
- PropertyRef.cs
- TracingConnectionListener.cs
- ThemeDirectoryCompiler.cs
- DecodeHelper.cs
- ObjectDataSource.cs
- TextModifierScope.cs
- SQLDecimal.cs
- MetadataSource.cs
- XmlEncodedRawTextWriter.cs
- ScrollViewer.cs
- PeerIPHelper.cs
- Sequence.cs
- ClosureBinding.cs
- IDReferencePropertyAttribute.cs
- XmlDataSourceDesigner.cs
- ReturnValue.cs
- ListSurrogate.cs
- Line.cs
- SQLInt16Storage.cs
- InternalConfirm.cs
- DashStyle.cs
- _SingleItemRequestCache.cs
- WmlCommandAdapter.cs
- Item.cs
- TagElement.cs
- AnnotationResource.cs
- ClaimTypeRequirement.cs
- StringUtil.cs
- AppDomainManager.cs
- PluralizationService.cs
- Rfc2898DeriveBytes.cs
- SqlRowUpdatedEvent.cs
- PipeSecurity.cs
- WindowsTooltip.cs
- CompensateDesigner.cs
- SplitterCancelEvent.cs
- XPathScanner.cs
- PeerCollaborationPermission.cs
- EventArgs.cs
- FixedSOMContainer.cs
- PageThemeBuildProvider.cs
- HttpServerVarsCollection.cs
- DataGridAutomationPeer.cs
- ApplicationFileParser.cs
- UrlUtility.cs
- GridEntry.cs
- AdapterSwitches.cs
- TextElement.cs
- TerminatorSinks.cs
- DictionaryBase.cs
- BindStream.cs
- OuterGlowBitmapEffect.cs
- ServiceParser.cs
- TextTrailingCharacterEllipsis.cs
- OdbcConnectionString.cs
- mil_sdk_version.cs
- RenderContext.cs
- NullableConverter.cs
- FunctionImportMapping.ReturnTypeRenameMapping.cs
- TimeEnumHelper.cs
- ObjectParameterCollection.cs
- WebReferenceCollection.cs
- SqlDeflator.cs
- TableSectionStyle.cs
- WebPartMenuStyle.cs
- BeginStoryboard.cs
- ToolStripSeparatorRenderEventArgs.cs
- Int32Converter.cs
- Thread.cs
- AnnotationDocumentPaginator.cs
- Point3DCollection.cs
- StreamGeometry.cs
- DetailsViewInsertEventArgs.cs
- VectorCollectionConverter.cs
- FontStyleConverter.cs