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
- ProcessHostMapPath.cs
- ClientTargetCollection.cs
- MobileListItemCollection.cs
- BlurEffect.cs
- XPathEmptyIterator.cs
- InputMethod.cs
- NCryptNative.cs
- ChangeConflicts.cs
- TypeInformation.cs
- MessageQueuePermission.cs
- BasicKeyConstraint.cs
- propertytag.cs
- DynamicScriptObject.cs
- TrustDriver.cs
- UpdatePanelControlTrigger.cs
- CodeTypeParameterCollection.cs
- SqlNotificationEventArgs.cs
- HtmlWindowCollection.cs
- EncoderBestFitFallback.cs
- InputLanguageSource.cs
- FormClosingEvent.cs
- TargetControlTypeCache.cs
- GenericEnumerator.cs
- MailBnfHelper.cs
- ScaleTransform.cs
- CaseCqlBlock.cs
- HiddenField.cs
- PropertyPath.cs
- SwitchElementsCollection.cs
- CodeAttributeDeclarationCollection.cs
- TemplatedMailWebEventProvider.cs
- RemotingSurrogateSelector.cs
- HttpCapabilitiesBase.cs
- DesignRelationCollection.cs
- DigitShape.cs
- BitmapDecoder.cs
- OneOfElement.cs
- TextEditorSelection.cs
- NumericUpDownAccelerationCollection.cs
- ObjectListFieldsPage.cs
- RowToFieldTransformer.cs
- HMACMD5.cs
- AppSettingsExpressionBuilder.cs
- DomNameTable.cs
- ToolStripTextBox.cs
- BooleanConverter.cs
- PropertyToken.cs
- DataGridViewRowHeaderCell.cs
- ChannelServices.cs
- Directory.cs
- ConfigurationManagerInternal.cs
- WindowProviderWrapper.cs
- XmlDocumentSchema.cs
- Grammar.cs
- DesignerEditorPartChrome.cs
- _DynamicWinsockMethods.cs
- VisualTreeHelper.cs
- PersonalizablePropertyEntry.cs
- UpdateTranslator.cs
- FontWeights.cs
- XmlSchemaInfo.cs
- SecureUICommand.cs
- CSharpCodeProvider.cs
- EntityWrapper.cs
- KernelTypeValidation.cs
- NameValueCollection.cs
- UnauthorizedAccessException.cs
- ControlHelper.cs
- RoutedEventConverter.cs
- WizardPanel.cs
- FontCollection.cs
- CallbackCorrelationInitializer.cs
- GroupBoxRenderer.cs
- HtmlInputImage.cs
- ByteStreamGeometryContext.cs
- ObjectSpanRewriter.cs
- ACE.cs
- AssemblyCollection.cs
- QilLiteral.cs
- Tablet.cs
- MenuItemCollection.cs
- NamedPipeWorkerProcess.cs
- ZipIOExtraFieldZip64Element.cs
- BadImageFormatException.cs
- RepeaterCommandEventArgs.cs
- IsolatedStorageFilePermission.cs
- CqlBlock.cs
- PerformanceCounterManager.cs
- Listbox.cs
- GlyphTypeface.cs
- DataReceivedEventArgs.cs
- DocumentProperties.cs
- PrintSystemException.cs
- GPStream.cs
- TreeNodeConverter.cs
- MetadataArtifactLoaderResource.cs
- DataControlField.cs
- EmptyEnumerator.cs
- WebReference.cs
- SafeLocalMemHandle.cs