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
- COM2PropertyPageUITypeConverter.cs
- CapabilitiesState.cs
- IndicFontClient.cs
- FilterElement.cs
- Matrix.cs
- TemplateBamlRecordReader.cs
- Context.cs
- XamlTreeBuilder.cs
- MergeFailedEvent.cs
- DynamicFilterExpression.cs
- ToolStripTextBox.cs
- TypeUnloadedException.cs
- MediaElement.cs
- DefaultSettingsSection.cs
- HttpConfigurationSystem.cs
- LayoutEditorPart.cs
- ContentPresenter.cs
- FixedNode.cs
- PropertyMetadata.cs
- ArcSegment.cs
- TrustLevelCollection.cs
- ControlAdapter.cs
- FontNamesConverter.cs
- TraceContextEventArgs.cs
- AttributeData.cs
- AuthorizationSection.cs
- DbMetaDataColumnNames.cs
- NamespaceEmitter.cs
- WebServiceAttribute.cs
- AsymmetricSignatureFormatter.cs
- PropertyGridView.cs
- WindowsIdentity.cs
- LocalizationComments.cs
- PassportAuthenticationEventArgs.cs
- BinaryWriter.cs
- NameTable.cs
- TimelineGroup.cs
- webproxy.cs
- DeviceContext.cs
- TransactionCache.cs
- RequestCacheManager.cs
- WebControl.cs
- SocketException.cs
- util.cs
- ReadOnlyCollection.cs
- ConversionValidationRule.cs
- Matrix3DStack.cs
- DataObjectPastingEventArgs.cs
- CompModHelpers.cs
- Image.cs
- XmlDataDocument.cs
- MetadataCollection.cs
- SurrogateDataContract.cs
- CodeTypeDeclaration.cs
- SerializerDescriptor.cs
- HwndPanningFeedback.cs
- CommandDesigner.cs
- BitmapEffectGeneralTransform.cs
- CacheForPrimitiveTypes.cs
- Compiler.cs
- control.ime.cs
- FreezableDefaultValueFactory.cs
- SystemThemeKey.cs
- XmlAttributeOverrides.cs
- RadioButtonPopupAdapter.cs
- CollectionViewGroup.cs
- ProbeMatchesMessage11.cs
- AnimationException.cs
- WebConfigurationFileMap.cs
- OneOfElement.cs
- PropertyConverter.cs
- SQLGuidStorage.cs
- DesignerWebPartChrome.cs
- XmlEnumAttribute.cs
- ResourceLoader.cs
- SerializableAttribute.cs
- DocumentPage.cs
- PersonalizationDictionary.cs
- UrlRoutingHandler.cs
- versioninfo.cs
- ProfilePropertySettings.cs
- InvokeGenerator.cs
- ShaperBuffers.cs
- CommentGlyph.cs
- DataGridViewRowCollection.cs
- ScriptRegistrationManager.cs
- KeyNotFoundException.cs
- ExpressionEditor.cs
- LabelLiteral.cs
- FilteredDataSetHelper.cs
- ActivityPropertyReference.cs
- SizeConverter.cs
- System.Data_BID.cs
- RoleGroup.cs
- StatusBarDrawItemEvent.cs
- StylusPointCollection.cs
- TextTreeUndoUnit.cs
- ModifierKeysConverter.cs
- CodePageUtils.cs
- GlyphShapingProperties.cs