Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / Design / NotifyParentPropertyAttribute.cs / 1305376 / 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
- BooleanAnimationBase.cs
- TextBreakpoint.cs
- WindowsFormsSynchronizationContext.cs
- TrackingMemoryStreamFactory.cs
- DataSetMappper.cs
- EntityDataSourceQueryBuilder.cs
- mediaeventshelper.cs
- webeventbuffer.cs
- MonthCalendarDesigner.cs
- ImportOptions.cs
- ErrorCodes.cs
- InternalTypeHelper.cs
- SelectorAutomationPeer.cs
- MethodBody.cs
- Int32Storage.cs
- ProtectedConfiguration.cs
- MimeBasePart.cs
- ClockGroup.cs
- RegexFCD.cs
- SapiGrammar.cs
- WebPartCatalogCloseVerb.cs
- PropertyChangedEventManager.cs
- AttachmentCollection.cs
- GlobalizationAssembly.cs
- DataGridViewColumnHeaderCell.cs
- XslTransform.cs
- Pts.cs
- FixedPageProcessor.cs
- ImmutableCollection.cs
- HtmlElementEventArgs.cs
- FormViewPagerRow.cs
- InternalControlCollection.cs
- SqlClientFactory.cs
- Double.cs
- MasterPageParser.cs
- SurrogateSelector.cs
- ViewKeyConstraint.cs
- CodeDOMProvider.cs
- IItemContainerGenerator.cs
- LocalizeDesigner.cs
- SqlRowUpdatedEvent.cs
- DiscoveryOperationContextExtension.cs
- NameTable.cs
- ListBoxItemWrapperAutomationPeer.cs
- RepeatButtonAutomationPeer.cs
- DirtyTextRange.cs
- InstanceKeyCollisionException.cs
- Dictionary.cs
- EventRecordWrittenEventArgs.cs
- WebBrowserNavigatingEventHandler.cs
- InkPresenter.cs
- StorageEntitySetMapping.cs
- Nodes.cs
- WebBrowser.cs
- BooleanKeyFrameCollection.cs
- CollectionDataContract.cs
- TypographyProperties.cs
- HttpRuntimeSection.cs
- AnchoredBlock.cs
- SubqueryRules.cs
- IIS7UserPrincipal.cs
- RepeaterCommandEventArgs.cs
- CachedPathData.cs
- DataBinding.cs
- XmlChildNodes.cs
- UserInitiatedNavigationPermission.cs
- ToolStripSystemRenderer.cs
- NonPrimarySelectionGlyph.cs
- AttributeSetAction.cs
- CollectionBase.cs
- CodeIndexerExpression.cs
- CacheDependency.cs
- OracleInfoMessageEventArgs.cs
- Stack.cs
- RemotingConfiguration.cs
- PropertyValueUIItem.cs
- MimeMapping.cs
- MobileCapabilities.cs
- IChannel.cs
- ConcurrentDictionary.cs
- Decimal.cs
- PropertyMetadata.cs
- SQLString.cs
- XamlToRtfParser.cs
- ToolStripStatusLabel.cs
- AssociationEndMember.cs
- CatalogPartCollection.cs
- HttpContext.cs
- Utility.cs
- XslVisitor.cs
- TransformGroup.cs
- ShutDownListener.cs
- NativeObjectSecurity.cs
- ConstraintConverter.cs
- NominalTypeEliminator.cs
- ContainerControlDesigner.cs
- XmlAttributeCollection.cs
- ElementHostPropertyMap.cs
- DataKeyPropertyAttribute.cs
- DefaultClaimSet.cs