Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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); } } }/// Gets whether this attribute is ///by default. ///
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MasterPage.cs
- FileLevelControlBuilderAttribute.cs
- ExtensionQuery.cs
- AnnotationObservableCollection.cs
- TextViewBase.cs
- TagMapCollection.cs
- CurrencyWrapper.cs
- UserControlDesigner.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- SequenceRangeCollection.cs
- ImageEditor.cs
- RadioButton.cs
- ToggleProviderWrapper.cs
- GestureRecognizer.cs
- StrokeNodeOperations2.cs
- ConfigXmlElement.cs
- Vector3D.cs
- MatrixTransform.cs
- ServicePointManagerElement.cs
- BuilderPropertyEntry.cs
- DbSource.cs
- MailSettingsSection.cs
- CheckBox.cs
- ConnectionPoint.cs
- EventLogHandle.cs
- ScrollItemPatternIdentifiers.cs
- CredentialCache.cs
- MediaEntryAttribute.cs
- WebPartsPersonalization.cs
- Site.cs
- Odbc32.cs
- InputBinder.cs
- Pen.cs
- ToolStripDesigner.cs
- WorkflowRuntimeElement.cs
- NavigateEvent.cs
- MaterializeFromAtom.cs
- OracleDateTime.cs
- DataSourceDesigner.cs
- CommandCollectionEditor.cs
- DockAndAnchorLayout.cs
- CustomLineCap.cs
- RuntimeConfig.cs
- InteropEnvironment.cs
- JournalEntry.cs
- DataServiceOperationContext.cs
- DataControlField.cs
- VerificationException.cs
- SqlCacheDependencySection.cs
- XmlAttributeCollection.cs
- Int32KeyFrameCollection.cs
- UncommonField.cs
- TableColumn.cs
- ProfileGroupSettingsCollection.cs
- Hyperlink.cs
- CodeDomSerializerBase.cs
- PersonalizationProviderHelper.cs
- WbmpConverter.cs
- HtmlSelect.cs
- ReadWriteSpinLock.cs
- ExtendedProtectionPolicyTypeConverter.cs
- DispatcherFrame.cs
- FieldDescriptor.cs
- DispatcherExceptionEventArgs.cs
- RadioButton.cs
- SystemParameters.cs
- ComboBoxAutomationPeer.cs
- Constants.cs
- ListViewSortEventArgs.cs
- CacheOutputQuery.cs
- ParamArrayAttribute.cs
- ConfigurationElement.cs
- BaseCAMarshaler.cs
- RsaSecurityTokenAuthenticator.cs
- SourceExpressionException.cs
- GetPageCompletedEventArgs.cs
- XmlNode.cs
- MetadataCache.cs
- ExtensionSimplifierMarkupObject.cs
- SystemSounds.cs
- BufferModesCollection.cs
- IListConverters.cs
- ConfigurationSectionHelper.cs
- ChangePassword.cs
- DataMember.cs
- Binding.cs
- Fonts.cs
- FixedElement.cs
- _HeaderInfo.cs
- NetworkInformationPermission.cs
- ToolStripOverflowButton.cs
- TypeConverter.cs
- OpenFileDialog.cs
- PanelDesigner.cs
- DrawingGroupDrawingContext.cs
- DownloadProgressEventArgs.cs
- TableLayoutStyleCollection.cs
- FixedElement.cs
- ProtectedUri.cs
- GPRECT.cs