Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- MessageHeaderAttribute.cs
- ContentHostHelper.cs
- XmlQueryRuntime.cs
- SQLByte.cs
- XmlIlTypeHelper.cs
- Scene3D.cs
- FormViewDeletedEventArgs.cs
- VerticalAlignConverter.cs
- BmpBitmapEncoder.cs
- FormsAuthentication.cs
- MenuItemCollection.cs
- AddingNewEventArgs.cs
- DrawingGroup.cs
- IERequestCache.cs
- PresentationSource.cs
- Exceptions.cs
- ModulesEntry.cs
- PerformanceCounterPermissionEntry.cs
- ObjectStorage.cs
- Context.cs
- DebugView.cs
- NumericExpr.cs
- TemplatePropertyEntry.cs
- WebSysDisplayNameAttribute.cs
- ConfigXmlElement.cs
- TreeNodeStyleCollection.cs
- NaturalLanguageHyphenator.cs
- CommandConverter.cs
- CollectionEditorDialog.cs
- StylusPointDescription.cs
- cookiecontainer.cs
- ObjectDataSourceFilteringEventArgs.cs
- clipboard.cs
- TypeCollectionDesigner.xaml.cs
- ProfileParameter.cs
- CommandBindingCollection.cs
- EditorAttribute.cs
- WebPartVerbsEventArgs.cs
- WebPartConnectionCollection.cs
- IItemProperties.cs
- TableDetailsCollection.cs
- entitydatasourceentitysetnameconverter.cs
- ScriptResourceInfo.cs
- DbTransaction.cs
- _SSPIWrapper.cs
- NavigationExpr.cs
- ConfigurationElementCollection.cs
- CharacterString.cs
- ObjectDisposedException.cs
- RegionInfo.cs
- DetailsView.cs
- TransformGroup.cs
- SerialErrors.cs
- AttributeUsageAttribute.cs
- ReferentialConstraint.cs
- ContainerSelectorGlyph.cs
- TextShapeableCharacters.cs
- ColorConvertedBitmap.cs
- EmbeddedObject.cs
- SortQuery.cs
- ImpersonationContext.cs
- Variable.cs
- RichTextBoxAutomationPeer.cs
- xmlfixedPageInfo.cs
- ImageFormatConverter.cs
- OdbcDataAdapter.cs
- Assert.cs
- PositiveTimeSpanValidatorAttribute.cs
- SQLMoneyStorage.cs
- PrtTicket_Base.cs
- CTreeGenerator.cs
- InternalTypeHelper.cs
- TemplateBindingExtensionConverter.cs
- TripleDESCryptoServiceProvider.cs
- InternalBufferOverflowException.cs
- AudioException.cs
- MarkupCompilePass2.cs
- Binding.cs
- TreeNodeCollection.cs
- NavigationExpr.cs
- HostedHttpRequestAsyncResult.cs
- Font.cs
- X509ChainElement.cs
- Utils.cs
- PackWebResponse.cs
- StringInfo.cs
- AuthStoreRoleProvider.cs
- BitmapCodecInfo.cs
- SerializationException.cs
- BuildProviderCollection.cs
- DataControlFieldHeaderCell.cs
- ColorTransformHelper.cs
- ToolStripItemTextRenderEventArgs.cs
- CustomCategoryAttribute.cs
- Size3D.cs
- DataFieldConverter.cs
- WFItemsToSpacerVisibility.cs
- Select.cs
- SQLBytesStorage.cs
- DoubleAnimation.cs