Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / MergablePropertyAttribute.cs / 1305376 / 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)); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ // // 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)); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- GridViewRowPresenterBase.cs
- DataGridViewCellMouseEventArgs.cs
- Thumb.cs
- SchemaImporter.cs
- typedescriptorpermission.cs
- Delegate.cs
- XmlNamespaceMappingCollection.cs
- HttpCapabilitiesSectionHandler.cs
- ToolBarOverflowPanel.cs
- ResourceDescriptionAttribute.cs
- ControlUtil.cs
- LayoutInformation.cs
- WebScriptEnablingBehavior.cs
- IconConverter.cs
- SevenBitStream.cs
- DataGridViewTextBoxCell.cs
- IProducerConsumerCollection.cs
- MethodCallTranslator.cs
- BaseCollection.cs
- HttpListenerResponse.cs
- Activator.cs
- TextContainer.cs
- PrintPreviewGraphics.cs
- RIPEMD160Managed.cs
- Regex.cs
- ByteStream.cs
- documentsequencetextcontainer.cs
- ImageDrawing.cs
- CodeNamespaceImport.cs
- odbcmetadatacolumnnames.cs
- Function.cs
- SqlRowUpdatingEvent.cs
- ToolStripProgressBar.cs
- CharAnimationUsingKeyFrames.cs
- DispatchWrapper.cs
- SharedPersonalizationStateInfo.cs
- ObjectHandle.cs
- MouseButtonEventArgs.cs
- XPathDocumentIterator.cs
- MatrixValueSerializer.cs
- Internal.cs
- EventRecord.cs
- SystemColors.cs
- TreeViewItemAutomationPeer.cs
- Animatable.cs
- InfoCardSymmetricCrypto.cs
- httpstaticobjectscollection.cs
- SqlMethodAttribute.cs
- SequenceQuery.cs
- EndpointDiscoveryBehavior.cs
- ClassImporter.cs
- DataTemplate.cs
- ChunkedMemoryStream.cs
- RayMeshGeometry3DHitTestResult.cs
- MarginCollapsingState.cs
- SqlDataSource.cs
- MeshGeometry3D.cs
- PerformanceCounterCategory.cs
- CounterSetInstance.cs
- SystemIPInterfaceProperties.cs
- BufferedConnection.cs
- UnsafeNativeMethods.cs
- StyleModeStack.cs
- NotifyParentPropertyAttribute.cs
- DateTimeAutomationPeer.cs
- WindowsListViewScroll.cs
- OrderedDictionary.cs
- SHA1CryptoServiceProvider.cs
- IItemContainerGenerator.cs
- HandlerBase.cs
- WeakRefEnumerator.cs
- PersistChildrenAttribute.cs
- HMACRIPEMD160.cs
- OleDbCommand.cs
- MessagePartSpecification.cs
- FixedPageStructure.cs
- PanelStyle.cs
- ConnectionStringSettingsCollection.cs
- LogLogRecordEnumerator.cs
- UnsafeNativeMethods.cs
- MetaTable.cs
- LicenseProviderAttribute.cs
- UInt16.cs
- MimeTypeMapper.cs
- StateMachineWorkflowInstance.cs
- AnyAllSearchOperator.cs
- streamingZipPartStream.cs
- TypeToken.cs
- DataControlField.cs
- CodeGroup.cs
- SmtpMail.cs
- QueryContext.cs
- ResourceDescriptionAttribute.cs
- HttpClientCertificate.cs
- ObjectStateFormatter.cs
- SharedUtils.cs
- DesignerLoader.cs
- ObjectQueryProvider.cs
- NumberSubstitution.cs
- TargetParameterCountException.cs