Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- XMLSyntaxException.cs
- DataTemplate.cs
- DynamicRenderer.cs
- ElementAction.cs
- TextEndOfLine.cs
- GridItemCollection.cs
- CustomErrorsSection.cs
- WorkItem.cs
- TripleDESCryptoServiceProvider.cs
- LinqDataSourceEditData.cs
- NumberFunctions.cs
- AppDomainAttributes.cs
- DelegatingTypeDescriptionProvider.cs
- StylusPoint.cs
- PointKeyFrameCollection.cs
- ArraySet.cs
- ChtmlTextWriter.cs
- RegistryKey.cs
- WindowsListViewItem.cs
- RuleInfoComparer.cs
- UriSectionData.cs
- SiteMapHierarchicalDataSourceView.cs
- ParseHttpDate.cs
- Base64Stream.cs
- SendingRequestEventArgs.cs
- OperationContractGenerationContext.cs
- QueryStringConverter.cs
- listitem.cs
- ImageAnimator.cs
- QueryPageSettingsEventArgs.cs
- LightweightCodeGenerator.cs
- SchemaImporter.cs
- ByteViewer.cs
- HttpRuntimeSection.cs
- TypedElement.cs
- WebPartMenu.cs
- TextAutomationPeer.cs
- Peer.cs
- Model3DCollection.cs
- TextProviderWrapper.cs
- uribuilder.cs
- TextEditorTables.cs
- WindowsGraphicsCacheManager.cs
- CriticalExceptions.cs
- Pen.cs
- TableDetailsRow.cs
- StringPropertyBuilder.cs
- TriggerCollection.cs
- PeerConnector.cs
- AsyncOperation.cs
- x509store.cs
- XmlSchemaInclude.cs
- CacheEntry.cs
- BitmapEffectDrawingContextWalker.cs
- InputScopeConverter.cs
- TreeNode.cs
- ChildDocumentBlock.cs
- AnchorEditor.cs
- ObjectQueryProvider.cs
- WebPartMinimizeVerb.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- BamlTreeNode.cs
- BinHexEncoder.cs
- OrderByQueryOptionExpression.cs
- DataServiceHostFactory.cs
- FormView.cs
- RoleService.cs
- SendMessageChannelCache.cs
- UInt32Converter.cs
- GeneralTransformGroup.cs
- DefaultDiscoveryService.cs
- WorkflowControlEndpoint.cs
- EncoderParameter.cs
- ExtensionWindow.cs
- PolicyException.cs
- XslVisitor.cs
- OSEnvironmentHelper.cs
- SizeKeyFrameCollection.cs
- LogManagementAsyncResult.cs
- MailBnfHelper.cs
- Pkcs7Recipient.cs
- TraceHandlerErrorFormatter.cs
- XPathNavigator.cs
- DynamicDiscoveryDocument.cs
- BevelBitmapEffect.cs
- documentation.cs
- UniqueConstraint.cs
- MethodBody.cs
- NativeBuffer.cs
- base64Transforms.cs
- DoubleConverter.cs
- AsyncOperation.cs
- LineProperties.cs
- Timeline.cs
- QilInvoke.cs
- QfeChecker.cs
- GB18030Encoding.cs
- SafeMILHandle.cs
- EdmComplexTypeAttribute.cs
- Utility.cs