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
- WindowsEditBoxRange.cs
- TransformCollection.cs
- backend.cs
- DataBindingExpressionBuilder.cs
- ISAPIApplicationHost.cs
- PropertyEntry.cs
- TextSpanModifier.cs
- OleDbConnection.cs
- CommandLibraryHelper.cs
- Int32Animation.cs
- InstanceHandle.cs
- BooleanAnimationUsingKeyFrames.cs
- MexNamedPipeBindingElement.cs
- TemplateControlBuildProvider.cs
- AssemblyCollection.cs
- BCLDebug.cs
- ExtendedPropertyDescriptor.cs
- SqlFunctionAttribute.cs
- _AuthenticationState.cs
- ToolStripRendererSwitcher.cs
- KeyInterop.cs
- GridErrorDlg.cs
- AliasedExpr.cs
- Connector.cs
- ListViewItem.cs
- ContextMenuAutomationPeer.cs
- StorageEntitySetMapping.cs
- ToolStripSeparatorRenderEventArgs.cs
- TransactionScope.cs
- FileRecordSequenceHelper.cs
- ErrorWrapper.cs
- OracleCommandBuilder.cs
- Models.cs
- XmlValidatingReader.cs
- RawUIStateInputReport.cs
- NativeDirectoryServicesQueryAPIs.cs
- HtmlInputPassword.cs
- BasicKeyConstraint.cs
- ListControl.cs
- _SSPISessionCache.cs
- TableTextElementCollectionInternal.cs
- TerminatorSinks.cs
- SiteMapDataSourceView.cs
- LocalizedNameDescriptionPair.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- EventLogEntryCollection.cs
- SortAction.cs
- ColumnHeader.cs
- Expander.cs
- ParameterExpression.cs
- WrapPanel.cs
- RtfToXamlReader.cs
- ThumbAutomationPeer.cs
- OutputCacheModule.cs
- controlskin.cs
- SqlCachedBuffer.cs
- ListViewInsertEventArgs.cs
- SqlUdtInfo.cs
- DesignUtil.cs
- CapabilitiesAssignment.cs
- WindowsScrollBarBits.cs
- XmlResolver.cs
- SafeMILHandleMemoryPressure.cs
- basemetadatamappingvisitor.cs
- AbsoluteQuery.cs
- ListArgumentProvider.cs
- FacetDescription.cs
- SectionInput.cs
- RoleGroupCollection.cs
- AppSettingsExpressionBuilder.cs
- HtmlInputFile.cs
- XmlException.cs
- RawStylusActions.cs
- TiffBitmapDecoder.cs
- WindowsIdentity.cs
- DefaultPropertyAttribute.cs
- SessionStateItemCollection.cs
- ThicknessAnimationBase.cs
- DictionaryEntry.cs
- TypedLocationWrapper.cs
- Decimal.cs
- ListBindingConverter.cs
- CodeGenHelper.cs
- HtmlImage.cs
- QilCloneVisitor.cs
- TextTreeFixupNode.cs
- DoubleCollectionValueSerializer.cs
- BitmapEffectInputConnector.cs
- XmlComplianceUtil.cs
- UnhandledExceptionEventArgs.cs
- AlphabeticalEnumConverter.cs
- LineServices.cs
- SecurityPolicySection.cs
- WebEvents.cs
- DoubleUtil.cs
- ActivityCodeGenerator.cs
- ConnectionPointConverter.cs
- ObjectParameter.cs
- SingleAnimationBase.cs
- ReaderWriterLock.cs