Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / MergablePropertyAttribute.cs / 1305376 / 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
- DataGridViewCellStateChangedEventArgs.cs
- EventListenerClientSide.cs
- SqlMethodTransformer.cs
- QuadraticBezierSegment.cs
- DesignerImageAdapter.cs
- DataGridViewCellValueEventArgs.cs
- InfoCardTraceRecord.cs
- DateTimeFormatInfoScanner.cs
- AliasedSlot.cs
- SQLByte.cs
- ScrollEvent.cs
- ComPlusContractBehavior.cs
- StorageBasedPackageProperties.cs
- ProtocolsConfigurationHandler.cs
- ListMarkerSourceInfo.cs
- EntityTypeBase.cs
- WorkflowClientDeliverMessageWrapper.cs
- CharacterMetrics.cs
- TransformerConfigurationWizardBase.cs
- HtmlSelect.cs
- ProjectionCamera.cs
- RecordManager.cs
- UriTemplateDispatchFormatter.cs
- ResizeGrip.cs
- TemplatedAdorner.cs
- PersonalizationProvider.cs
- WindowsFormsLinkLabel.cs
- ToolboxItemFilterAttribute.cs
- SQLSingleStorage.cs
- InlinedAggregationOperator.cs
- OperatingSystem.cs
- DescendantBaseQuery.cs
- RotateTransform3D.cs
- cookiecontainer.cs
- HitTestParameters3D.cs
- HttpCapabilitiesBase.cs
- ParameterInfo.cs
- wmiprovider.cs
- XmlWriterSettings.cs
- InputReport.cs
- CompilerErrorCollection.cs
- ValidatedControlConverter.cs
- FreezableDefaultValueFactory.cs
- DoubleLink.cs
- ParameterSubsegment.cs
- XmlSchemaException.cs
- SqlGatherConsumedAliases.cs
- SqlFlattener.cs
- PropertyToken.cs
- SqlRowUpdatingEvent.cs
- MetadataArtifactLoaderCompositeFile.cs
- XmlQueryCardinality.cs
- ImportCatalogPart.cs
- SqlDataSourceSelectingEventArgs.cs
- QilReplaceVisitor.cs
- DynamicMetaObjectBinder.cs
- WebResourceAttribute.cs
- DrawToolTipEventArgs.cs
- DateTimeFormatInfoScanner.cs
- TextEffect.cs
- ExtensibleClassFactory.cs
- ListViewCommandEventArgs.cs
- DataServiceCollectionOfT.cs
- FormsAuthentication.cs
- CheckPair.cs
- PriorityRange.cs
- StylusButtonCollection.cs
- WebPartConnectionCollection.cs
- FontWeightConverter.cs
- VScrollProperties.cs
- MarkupCompiler.cs
- PriorityChain.cs
- CriticalExceptions.cs
- RelativeSource.cs
- ParameterEditorUserControl.cs
- UserInitiatedRoutedEventPermission.cs
- SemaphoreSlim.cs
- Font.cs
- XmlWrappingReader.cs
- ScrollProperties.cs
- Matrix.cs
- AnnotationResourceChangedEventArgs.cs
- BufferedGraphics.cs
- DataGridRowEventArgs.cs
- TypefaceMap.cs
- ListenerHandler.cs
- Vector3DAnimation.cs
- ForceCopyBuildProvider.cs
- precedingquery.cs
- SafeCryptHandles.cs
- MaterializeFromAtom.cs
- DataGridViewCellConverter.cs
- Material.cs
- SQLInt64Storage.cs
- TreeNodeCollectionEditorDialog.cs
- KoreanCalendar.cs
- DispatcherExceptionEventArgs.cs
- OletxTransactionFormatter.cs
- TextRangeEditTables.cs
- AnonymousIdentificationSection.cs