Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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)); } } } // 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
- NativeMethods.cs
- InputLanguageCollection.cs
- TimeStampChecker.cs
- DataGridViewColumnStateChangedEventArgs.cs
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs
- EncoderNLS.cs
- RegistryPermission.cs
- AspCompat.cs
- Brushes.cs
- ActivationServices.cs
- ArgumentNullException.cs
- MultidimensionalArrayItemReference.cs
- SettingsSection.cs
- PointLight.cs
- WebPartDeleteVerb.cs
- CaseInsensitiveOrdinalStringComparer.cs
- ConfigurationException.cs
- AppDomainManager.cs
- PackageFilter.cs
- OutOfProcStateClientManager.cs
- MetabaseSettingsIis7.cs
- XmlSignatureManifest.cs
- DXD.cs
- XmlDataLoader.cs
- EntityTemplateFactory.cs
- UnlockCardRequest.cs
- Matrix.cs
- RectangleF.cs
- CatalogPartChrome.cs
- ImageInfo.cs
- PeerCollaborationPermission.cs
- ActivityCodeDomSerializationManager.cs
- MessageBox.cs
- SourceItem.cs
- FontFamilyValueSerializer.cs
- SystemResourceHost.cs
- PointLight.cs
- TextDecoration.cs
- SHA384.cs
- TargetControlTypeAttribute.cs
- PreProcessor.cs
- HwndSourceParameters.cs
- DataAccessException.cs
- Monitor.cs
- MyContact.cs
- StatusBarPanel.cs
- WebResourceAttribute.cs
- ColorContextHelper.cs
- HitTestWithGeometryDrawingContextWalker.cs
- InlineObject.cs
- Parser.cs
- ProfileProvider.cs
- XmlExpressionDumper.cs
- WindowsListViewGroupSubsetLink.cs
- QilNode.cs
- ActionMessageFilter.cs
- CodeLinePragma.cs
- StandardToolWindows.cs
- NetSectionGroup.cs
- HandlerElement.cs
- SrgsOneOf.cs
- PerspectiveCamera.cs
- ExpressionBuilder.cs
- PageParser.cs
- Set.cs
- SamlDelegatingWriter.cs
- XmlDictionaryReader.cs
- URL.cs
- DocumentAutomationPeer.cs
- CodeRegionDirective.cs
- AtomMaterializerLog.cs
- Model3D.cs
- OdbcStatementHandle.cs
- StopRoutingHandler.cs
- BufferModeSettings.cs
- SoapConverter.cs
- SqlBooleanizer.cs
- KeyFrames.cs
- ColumnHeaderCollectionEditor.cs
- HighlightVisual.cs
- WindowsFormsLinkLabel.cs
- SqlXml.cs
- FrameworkTextComposition.cs
- _NativeSSPI.cs
- LabelAutomationPeer.cs
- PasswordTextContainer.cs
- UniformGrid.cs
- GreenMethods.cs
- DataListItemCollection.cs
- NonVisualControlAttribute.cs
- baseaxisquery.cs
- NetworkCredential.cs
- CodeMemberMethod.cs
- ObjectQueryState.cs
- ClientViaElement.cs
- ListControl.cs
- PtsHelper.cs
- MenuAutomationPeer.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- WebCodeGenerator.cs