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
- XmlJsonReader.cs
- UpdateDelegates.Generated.cs
- RoutingExtensionElement.cs
- TypeDependencyAttribute.cs
- InputEventArgs.cs
- ItemCollectionEditor.cs
- PopupEventArgs.cs
- FormViewInsertEventArgs.cs
- ViewGenerator.cs
- QuaternionRotation3D.cs
- XmlSerializerVersionAttribute.cs
- CachedTypeface.cs
- ThreadInterruptedException.cs
- ListenerAdaptersInstallComponent.cs
- Condition.cs
- WebPartConnectionCollection.cs
- DoubleStorage.cs
- PeerNameResolver.cs
- ConfigUtil.cs
- Claim.cs
- Assembly.cs
- DataBoundControlParameterTarget.cs
- ViewManager.cs
- TrustManagerMoreInformation.cs
- LabelLiteral.cs
- DesignerTransaction.cs
- XmlBindingWorker.cs
- LogFlushAsyncResult.cs
- WhitespaceRuleReader.cs
- TimeSpanValidatorAttribute.cs
- Match.cs
- EntityDataSourceContextCreatedEventArgs.cs
- DataGridParentRows.cs
- FactoryMaker.cs
- XmlNavigatorStack.cs
- EdmComplexPropertyAttribute.cs
- FontConverter.cs
- GPPOINTF.cs
- MouseButtonEventArgs.cs
- SqlNotificationEventArgs.cs
- CustomWebEventKey.cs
- SQLDecimalStorage.cs
- ZipIOFileItemStream.cs
- BindingsSection.cs
- coordinatorscratchpad.cs
- JoinSymbol.cs
- TimeoutConverter.cs
- OracleConnectionString.cs
- ConsumerConnectionPointCollection.cs
- TextElementEditingBehaviorAttribute.cs
- DynamicDocumentPaginator.cs
- DynamicContractTypeBuilder.cs
- HwndStylusInputProvider.cs
- Compiler.cs
- InputMethodStateChangeEventArgs.cs
- Polyline.cs
- JsonClassDataContract.cs
- Rotation3DAnimationBase.cs
- PtsHelper.cs
- RotationValidation.cs
- UpWmlMobileTextWriter.cs
- _ProxyChain.cs
- CorrelationTokenInvalidatedHandler.cs
- IApplicationTrustManager.cs
- TextEndOfParagraph.cs
- PositiveTimeSpanValidatorAttribute.cs
- XamlPoint3DCollectionSerializer.cs
- BuildProvider.cs
- EventLogInternal.cs
- ActivityExecutorDelegateInfo.cs
- Function.cs
- DataServiceHost.cs
- AlgoModule.cs
- UrlMapping.cs
- Thumb.cs
- TableLayoutCellPaintEventArgs.cs
- SinglePageViewer.cs
- BinaryMessageEncodingElement.cs
- EdgeProfileValidation.cs
- BrushValueSerializer.cs
- ChtmlMobileTextWriter.cs
- DataGridViewCellMouseEventArgs.cs
- ServiceHostFactory.cs
- SupportsPreviewControlAttribute.cs
- DesignColumnCollection.cs
- ClipboardProcessor.cs
- JoinTreeNode.cs
- TrackingAnnotationCollection.cs
- SelectionRangeConverter.cs
- DateTimeOffset.cs
- SqlTypesSchemaImporter.cs
- NullableBoolConverter.cs
- OdbcTransaction.cs
- MenuItemAutomationPeer.cs
- TailCallAnalyzer.cs
- TypeLibConverter.cs
- ToolStripDropDown.cs
- ConfigurationSectionGroupCollection.cs
- TimeEnumHelper.cs
- TextContainerChangeEventArgs.cs