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
- SafeFindHandle.cs
- ControlCachePolicy.cs
- ThreadAbortException.cs
- TerminatingOperationBehavior.cs
- PriorityChain.cs
- DataGridComponentEditor.cs
- MsmqReceiveParameters.cs
- HttpGetProtocolImporter.cs
- BindingWorker.cs
- ObjectSecurity.cs
- HttpModuleAction.cs
- UIPermission.cs
- SerializationAttributes.cs
- SolidBrush.cs
- BitmapFrameDecode.cs
- HotSpot.cs
- TimeStampChecker.cs
- Vector3DCollectionValueSerializer.cs
- MailHeaderInfo.cs
- DrawingServices.cs
- TableItemPatternIdentifiers.cs
- coordinatorfactory.cs
- SHA256Cng.cs
- TTSVoice.cs
- CacheOutputQuery.cs
- FixedNode.cs
- GZipDecoder.cs
- XmlSchemaAll.cs
- DocumentAutomationPeer.cs
- Inflater.cs
- WeakEventManager.cs
- InvalidCastException.cs
- TransactionFlowProperty.cs
- TextRangeEditTables.cs
- WindowsStatusBar.cs
- Calendar.cs
- Menu.cs
- SqlDataSourceCommandEventArgs.cs
- EventData.cs
- MaskInputRejectedEventArgs.cs
- ConfigXmlDocument.cs
- PointAnimationClockResource.cs
- Guid.cs
- EntitySetDataBindingList.cs
- XmlWriterDelegator.cs
- DbReferenceCollection.cs
- RepeatInfo.cs
- NativeMethods.cs
- AxHost.cs
- DbConnectionPoolGroup.cs
- ValidatorCollection.cs
- EpmSyndicationContentSerializer.cs
- SafeNativeMemoryHandle.cs
- CngUIPolicy.cs
- SecurityTokenProvider.cs
- JapaneseLunisolarCalendar.cs
- Publisher.cs
- XmlText.cs
- AbstractSvcMapFileLoader.cs
- PanelDesigner.cs
- XMLSyntaxException.cs
- FunctionDescription.cs
- FunctionUpdateCommand.cs
- CodeCompileUnit.cs
- WorkflowWebService.cs
- SynchronizationLockException.cs
- FilteredXmlReader.cs
- PerformanceCounterLib.cs
- peernodestatemanager.cs
- DeflateStream.cs
- SwitchExpression.cs
- EditorPart.cs
- PrintPageEvent.cs
- BatchParser.cs
- ObjectSecurity.cs
- SqlWebEventProvider.cs
- FormsAuthenticationModule.cs
- Permission.cs
- ComponentConverter.cs
- Sequence.cs
- GridViewColumnHeader.cs
- KeyProperty.cs
- UniqueID.cs
- DataTablePropertyDescriptor.cs
- ToolStripItemTextRenderEventArgs.cs
- ParameterCollection.cs
- EmulateRecognizeCompletedEventArgs.cs
- ListDictionaryInternal.cs
- EntityViewGenerator.cs
- DbProviderServices.cs
- TemplateControlParser.cs
- FreeFormDesigner.cs
- HandleRef.cs
- ToolStripProgressBar.cs
- ImagingCache.cs
- ToolStripItemRenderEventArgs.cs
- DataGridViewCellParsingEventArgs.cs
- HttpApplication.cs
- Clause.cs
- RawMouseInputReport.cs