Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- CheckedListBox.cs
- QueryLifecycle.cs
- FontFamilyIdentifier.cs
- XsltLibrary.cs
- ListViewInsertEventArgs.cs
- DoubleAnimationUsingKeyFrames.cs
- Selector.cs
- UxThemeWrapper.cs
- LocalBuilder.cs
- MessageDispatch.cs
- Cursor.cs
- ArgumentNullException.cs
- BitmapEffectInputConnector.cs
- SequenceRangeCollection.cs
- SignedXml.cs
- IUnknownConstantAttribute.cs
- DeferredBinaryDeserializerExtension.cs
- ThaiBuddhistCalendar.cs
- ListViewDeletedEventArgs.cs
- ListViewHitTestInfo.cs
- ServiceHttpHandlerFactory.cs
- PathGradientBrush.cs
- HttpValueCollection.cs
- DictionaryMarkupSerializer.cs
- ReliableDuplexSessionChannel.cs
- AutomationPropertyInfo.cs
- ToolStripRendererSwitcher.cs
- SecurityDocument.cs
- ExceptionUtil.cs
- InlineUIContainer.cs
- Stack.cs
- MDIWindowDialog.cs
- RotateTransform.cs
- SystemEvents.cs
- ImageAttributes.cs
- XmlEntity.cs
- WebServiceParameterData.cs
- RequestCachePolicy.cs
- Empty.cs
- UpDownEvent.cs
- Guid.cs
- BackStopAuthenticationModule.cs
- CacheSection.cs
- ActivationArguments.cs
- ProtocolElementCollection.cs
- BaseTemplateBuildProvider.cs
- StringWriter.cs
- RuleRefElement.cs
- LineVisual.cs
- TextBoxAutomationPeer.cs
- HttpResponseBase.cs
- DesignTimeTemplateParser.cs
- StrokeCollection2.cs
- IndexOutOfRangeException.cs
- Page.cs
- SafeThemeHandle.cs
- XhtmlTextWriter.cs
- MailAddressCollection.cs
- ContextMenuStrip.cs
- SmtpException.cs
- StorageBasedPackageProperties.cs
- ListViewItemSelectionChangedEvent.cs
- IconBitmapDecoder.cs
- EFTableProvider.cs
- BCryptHashAlgorithm.cs
- DocumentViewerHelper.cs
- MeasureItemEvent.cs
- SQLInt64.cs
- StaticDataManager.cs
- _AutoWebProxyScriptHelper.cs
- ViewEvent.cs
- CollectionEditorDialog.cs
- TransformValueSerializer.cs
- DataGridViewIntLinkedList.cs
- FilterEventArgs.cs
- SqlTypesSchemaImporter.cs
- LoginName.cs
- UInt16.cs
- NativeMethodsCLR.cs
- PrivateFontCollection.cs
- ImageMap.cs
- TreeWalker.cs
- ActivationServices.cs
- AuthenticationServiceManager.cs
- SQLInt16Storage.cs
- QueryableFilterRepeater.cs
- HierarchicalDataSourceControl.cs
- RtType.cs
- FixedBufferAttribute.cs
- XpsDocument.cs
- SyndicationSerializer.cs
- RawUIStateInputReport.cs
- SizeIndependentAnimationStorage.cs
- _NestedMultipleAsyncResult.cs
- XmlAttributeAttribute.cs
- XmlSchemaExporter.cs
- DataKeyArray.cs
- ImportStoreException.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- LassoHelper.cs