Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / CompMod / System / ComponentModel / Design / NotifyParentPropertyAttribute.cs / 1 / NotifyParentPropertyAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using System; using System.Security.Permissions; ////// [AttributeUsage(AttributeTargets.Property)] public sealed class NotifyParentPropertyAttribute : Attribute { ////// Indicates whether the parent property is notified /// if a child namespace property is modified. /// ////// public static readonly NotifyParentPropertyAttribute Yes = new NotifyParentPropertyAttribute(true); ////// Specifies that the parent property should be notified on changes to the child class property. This field is read-only. /// ////// public static readonly NotifyParentPropertyAttribute No = new NotifyParentPropertyAttribute(false); ///Specifies that the parent property should not be notified of changes to the child class property. This field is read-only. ////// public static readonly NotifyParentPropertyAttribute Default = No; private bool notifyParent = false; ///Specifies the default attribute state, that the parent property should not be notified of changes to the child class property. /// This field is read-only. ////// public NotifyParentPropertyAttribute(bool notifyParent) { this.notifyParent = notifyParent; } ///Initiailzes a new instance of the NotifyPropertyAttribute class /// that uses the specified value /// to indicate whether the parent property should be notified when a child namespace property is modified. ////// public bool NotifyParent { get { return notifyParent; } } ////// Gets or sets whether the parent property should be notified /// on changes to a child namespace property. /// ////// public override bool Equals(object obj) { if (obj == this) { return true; } if ((obj != null) && (obj is NotifyParentPropertyAttribute)) { return ((NotifyParentPropertyAttribute)obj).NotifyParent == notifyParent; } return false; } ////// Tests whether the specified object is the same as the current object. /// ////// 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. //------------------------------------------------------------------------------ ///// Gets whether this attribute is ///by default. /// // Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using System; using System.Security.Permissions; ////// [AttributeUsage(AttributeTargets.Property)] public sealed class NotifyParentPropertyAttribute : Attribute { ////// Indicates whether the parent property is notified /// if a child namespace property is modified. /// ////// public static readonly NotifyParentPropertyAttribute Yes = new NotifyParentPropertyAttribute(true); ////// Specifies that the parent property should be notified on changes to the child class property. This field is read-only. /// ////// public static readonly NotifyParentPropertyAttribute No = new NotifyParentPropertyAttribute(false); ///Specifies that the parent property should not be notified of changes to the child class property. This field is read-only. ////// public static readonly NotifyParentPropertyAttribute Default = No; private bool notifyParent = false; ///Specifies the default attribute state, that the parent property should not be notified of changes to the child class property. /// This field is read-only. ////// public NotifyParentPropertyAttribute(bool notifyParent) { this.notifyParent = notifyParent; } ///Initiailzes a new instance of the NotifyPropertyAttribute class /// that uses the specified value /// to indicate whether the parent property should be notified when a child namespace property is modified. ////// public bool NotifyParent { get { return notifyParent; } } ////// Gets or sets whether the parent property should be notified /// on changes to a child namespace property. /// ////// public override bool Equals(object obj) { if (obj == this) { return true; } if ((obj != null) && (obj is NotifyParentPropertyAttribute)) { return ((NotifyParentPropertyAttribute)obj).NotifyParent == notifyParent; } return false; } ////// Tests whether the specified object is the same as the current object. /// ////// 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./// Gets whether this attribute is ///by default. ///
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ComponentRenameEvent.cs
- OleStrCAMarshaler.cs
- XmlQualifiedName.cs
- DoubleAnimationUsingKeyFrames.cs
- ApplicationException.cs
- EmbeddedMailObject.cs
- EmbossBitmapEffect.cs
- OrCondition.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- ImageAutomationPeer.cs
- InertiaTranslationBehavior.cs
- DebugView.cs
- UIElement3D.cs
- MenuItemCollection.cs
- GeneralTransform3DTo2DTo3D.cs
- RepeaterCommandEventArgs.cs
- CompensatableTransactionScopeActivityDesigner.cs
- ThreadPool.cs
- FacetValueContainer.cs
- MarkupCompiler.cs
- EventlogProvider.cs
- ConfigurationFileMap.cs
- StreamInfo.cs
- Thread.cs
- PointAnimationClockResource.cs
- UIElementParagraph.cs
- parserscommon.cs
- ISO2022Encoding.cs
- OutgoingWebRequestContext.cs
- DummyDataSource.cs
- DragDeltaEventArgs.cs
- WebBrowserUriTypeConverter.cs
- Rule.cs
- MessageQueuePermission.cs
- ConfigurationLockCollection.cs
- CodeExpressionCollection.cs
- ConfigXmlText.cs
- Material.cs
- AnimationStorage.cs
- Exception.cs
- CryptoStream.cs
- TimerElapsedEvenArgs.cs
- FixedHyperLink.cs
- RemotingSurrogateSelector.cs
- ILGenerator.cs
- Int16.cs
- GuidelineSet.cs
- PolicyManager.cs
- BulletedListEventArgs.cs
- CheckBoxList.cs
- PropertySourceInfo.cs
- AppModelKnownContentFactory.cs
- ConfigurationStrings.cs
- DataBindingCollection.cs
- SortDescription.cs
- FormsIdentity.cs
- ProfilePropertyMetadata.cs
- ModelPropertyImpl.cs
- ReadWriteSpinLock.cs
- ConnectionProviderAttribute.cs
- Vector3DCollectionConverter.cs
- SqlBulkCopy.cs
- ModelUIElement3D.cs
- StaticSiteMapProvider.cs
- ExpressionLexer.cs
- ActiveXHelper.cs
- ActionFrame.cs
- GradientStopCollection.cs
- SynchronousChannelMergeEnumerator.cs
- IRCollection.cs
- ReflectionServiceProvider.cs
- SettingsSavedEventArgs.cs
- DictionaryBase.cs
- Root.cs
- OleDbInfoMessageEvent.cs
- DefaultSection.cs
- DBDataPermission.cs
- DbTransaction.cs
- LayoutUtils.cs
- DataGridViewDataErrorEventArgs.cs
- WebPartPersonalization.cs
- WebPartDescriptionCollection.cs
- PropertyDescriptorCollection.cs
- ClientData.cs
- WebControlAdapter.cs
- XmlAtomicValue.cs
- CacheOutputQuery.cs
- XhtmlBasicControlAdapter.cs
- LocalizationParserHooks.cs
- XmlComplianceUtil.cs
- View.cs
- RowParagraph.cs
- Scene3D.cs
- FSWPathEditor.cs
- HttpSessionStateBase.cs
- IItemProperties.cs
- ViewGenResults.cs
- WindowsSpinner.cs
- UnsafeNativeMethods.cs
- ElementHostAutomationPeer.cs