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
- SystemNetHelpers.cs
- EastAsianLunisolarCalendar.cs
- RichTextBox.cs
- IdentityReference.cs
- MenuItemBindingCollection.cs
- LogLogRecord.cs
- ActivityAction.cs
- AutomationEventArgs.cs
- _ProxyChain.cs
- StaticDataManager.cs
- DispatcherObject.cs
- RemotingHelper.cs
- SqlServer2KCompatibilityAnnotation.cs
- XmlHelper.cs
- SharedUtils.cs
- SettingsContext.cs
- XPathConvert.cs
- DesignerTransactionCloseEvent.cs
- HtmlTableRowCollection.cs
- OleDbParameterCollection.cs
- AxisAngleRotation3D.cs
- ApplicationSecurityInfo.cs
- AccessControlEntry.cs
- SessionParameter.cs
- SoapReflectionImporter.cs
- WebProxyScriptElement.cs
- PerformanceCounterManager.cs
- SynchronizedDispatch.cs
- CngKey.cs
- TransformValueSerializer.cs
- NumericPagerField.cs
- DataColumnCollection.cs
- ExceptionUtil.cs
- SecurityManager.cs
- StructuredType.cs
- ControlUtil.cs
- WebBrowserDocumentCompletedEventHandler.cs
- TrackingStringDictionary.cs
- StackBuilderSink.cs
- AtomPub10CategoriesDocumentFormatter.cs
- SoapConverter.cs
- SqlCrossApplyToCrossJoin.cs
- BCLDebug.cs
- SqlHelper.cs
- ExecutionContext.cs
- CryptoStream.cs
- Scheduling.cs
- FullTrustAssemblyCollection.cs
- Win32.cs
- MetadataPropertyAttribute.cs
- AssertFilter.cs
- CreateCardRequest.cs
- WebPartZoneAutoFormat.cs
- WindowsClaimSet.cs
- PropertyReferenceSerializer.cs
- CodeDOMProvider.cs
- SignatureHelper.cs
- RichTextBoxConstants.cs
- EntityContainerRelationshipSet.cs
- Utils.cs
- DictionarySectionHandler.cs
- GatewayDefinition.cs
- WpfGeneratedKnownTypes.cs
- XmlSchemaAnnotation.cs
- FormViewCommandEventArgs.cs
- InternalConfigRoot.cs
- x509store.cs
- RightNameExpirationInfoPair.cs
- SqlStream.cs
- SqlExpander.cs
- InternalSafeNativeMethods.cs
- ClientTarget.cs
- SqlExpressionNullability.cs
- BaseParser.cs
- LinqDataSourceEditData.cs
- TransformProviderWrapper.cs
- LogWriteRestartAreaState.cs
- ExpressionParser.cs
- WindowsBrush.cs
- EntityDataSourceChangedEventArgs.cs
- RuntimeEnvironment.cs
- GetWinFXPath.cs
- WinEventHandler.cs
- SiteMapSection.cs
- EditingCoordinator.cs
- OrderByBuilder.cs
- RealProxy.cs
- JournalNavigationScope.cs
- ReferenceEqualityComparer.cs
- ExpandCollapsePattern.cs
- SymbolType.cs
- UriTemplateTable.cs
- SQLDouble.cs
- DataGridViewEditingControlShowingEventArgs.cs
- SafeLibraryHandle.cs
- PropertyGridView.cs
- MappingModelBuildProvider.cs
- XamlPoint3DCollectionSerializer.cs
- TreeBuilder.cs
- StoragePropertyMapping.cs