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
- SqlXmlStorage.cs
- WebPartTracker.cs
- XmlChoiceIdentifierAttribute.cs
- SiteMembershipCondition.cs
- SqlAliaser.cs
- SettingsPropertyValueCollection.cs
- HtmlTitle.cs
- ListViewItemMouseHoverEvent.cs
- UnaryNode.cs
- ExpressionTable.cs
- InheritablePropertyChangeInfo.cs
- KnownAssembliesSet.cs
- DeviceContext.cs
- MetabaseServerConfig.cs
- XdrBuilder.cs
- HttpProfileBase.cs
- WeakReadOnlyCollection.cs
- AnimationStorage.cs
- ProjectionCamera.cs
- ControlCollection.cs
- ExtensionDataReader.cs
- TreeBuilderXamlTranslator.cs
- CompiledRegexRunnerFactory.cs
- Pair.cs
- reliableinputsessionchannel.cs
- Touch.cs
- PageVisual.cs
- ParserContext.cs
- FormViewActionList.cs
- AsymmetricKeyExchangeFormatter.cs
- XmlConvert.cs
- FontDialog.cs
- PointIndependentAnimationStorage.cs
- EncoderReplacementFallback.cs
- ProfileBuildProvider.cs
- OleDbEnumerator.cs
- DatatypeImplementation.cs
- TablePattern.cs
- PageTheme.cs
- SqlTrackingQuery.cs
- SchemaAttDef.cs
- HttpVersion.cs
- ContourSegment.cs
- ClrPerspective.cs
- CfgParser.cs
- StreamGeometry.cs
- TypeInitializationException.cs
- SoapAttributes.cs
- StylusButtonCollection.cs
- AccessDataSource.cs
- Polyline.cs
- AsyncPostBackErrorEventArgs.cs
- AccessDataSourceDesigner.cs
- SafeProcessHandle.cs
- Selection.cs
- OracleBFile.cs
- HttpHandler.cs
- StylusPointProperty.cs
- FormViewCommandEventArgs.cs
- _ListenerAsyncResult.cs
- Propagator.ExtentPlaceholderCreator.cs
- SByteStorage.cs
- XmlLangPropertyAttribute.cs
- XamlWriter.cs
- StoreItemCollection.Loader.cs
- CharKeyFrameCollection.cs
- SqlGatherConsumedAliases.cs
- ResourcesBuildProvider.cs
- AsnEncodedData.cs
- TransportElement.cs
- Attributes.cs
- Emitter.cs
- FaultDescriptionCollection.cs
- EncoderReplacementFallback.cs
- LocalServiceSecuritySettings.cs
- DataGridCommandEventArgs.cs
- CompleteWizardStep.cs
- TreeNodeStyleCollection.cs
- TextFormatterHost.cs
- RequestCachePolicyConverter.cs
- SafeRegistryKey.cs
- NamespaceCollection.cs
- ParsedAttributeCollection.cs
- UpdateRecord.cs
- InputLanguageProfileNotifySink.cs
- StateRuntime.cs
- PropertiesTab.cs
- ValidationError.cs
- SecurityListenerSettingsLifetimeManager.cs
- SchemaImporterExtensionsSection.cs
- BitmapFrameEncode.cs
- FormViewModeEventArgs.cs
- ToolTipAutomationPeer.cs
- followingquery.cs
- XmlReaderSettings.cs
- CodeGenerator.cs
- ContentPosition.cs
- NativeWindow.cs
- WebPartDescriptionCollection.cs
- Selector.cs