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
- ValueUtilsSmi.cs
- ItemsControl.cs
- Boolean.cs
- FixedSOMLineRanges.cs
- SecurityPermission.cs
- RecognitionEventArgs.cs
- SystemInfo.cs
- XPathException.cs
- Fonts.cs
- NamedElement.cs
- WindowsGrip.cs
- FilterableAttribute.cs
- AssociationSet.cs
- PingOptions.cs
- FieldInfo.cs
- ValidationSummary.cs
- ControlBindingsConverter.cs
- Compiler.cs
- WebPartDeleteVerb.cs
- Triangle.cs
- XmlSubtreeReader.cs
- DbParameterHelper.cs
- BuilderPropertyEntry.cs
- updatecommandorderer.cs
- BulletedListEventArgs.cs
- ExpressionConverter.cs
- SchemaLookupTable.cs
- AbstractSvcMapFileLoader.cs
- UnSafeCharBuffer.cs
- AlignmentYValidation.cs
- AdCreatedEventArgs.cs
- TypeConverterHelper.cs
- StatusBarItemAutomationPeer.cs
- HtmlControlPersistable.cs
- DictionaryContent.cs
- SynchronizationScope.cs
- ConstructorBuilder.cs
- MulticastNotSupportedException.cs
- SortQuery.cs
- ImageFormat.cs
- SecureUICommand.cs
- CodeArgumentReferenceExpression.cs
- Visual.cs
- DataRecordObjectView.cs
- MatrixAnimationBase.cs
- Range.cs
- TextReader.cs
- DataColumnMapping.cs
- ColumnMap.cs
- Button.cs
- StreamedFramingRequestChannel.cs
- SweepDirectionValidation.cs
- SessionIDManager.cs
- RemotingAttributes.cs
- XmlSchemaInfo.cs
- RadioButtonAutomationPeer.cs
- InvokePattern.cs
- PrimitiveCodeDomSerializer.cs
- TextPattern.cs
- PrintController.cs
- Unit.cs
- XPathNavigatorKeyComparer.cs
- VisualBrush.cs
- HtmlTernaryTree.cs
- InstancePersistenceException.cs
- COMException.cs
- DocumentEventArgs.cs
- EUCJPEncoding.cs
- XmlFormatReaderGenerator.cs
- Triplet.cs
- RichTextBoxContextMenu.cs
- JsonEncodingStreamWrapper.cs
- CodeArrayIndexerExpression.cs
- SystemNetHelpers.cs
- Parallel.cs
- ContextStack.cs
- TargetConverter.cs
- ControlsConfig.cs
- Stack.cs
- ColorContext.cs
- Tuple.cs
- PtsHost.cs
- CompatibleIComparer.cs
- ConfigXmlCDataSection.cs
- RowCache.cs
- ItemChangedEventArgs.cs
- CompiledQuery.cs
- SvcFileManager.cs
- PopupRoot.cs
- GlobalizationSection.cs
- SoapExtensionStream.cs
- RenderContext.cs
- OneOfTypeConst.cs
- VirtualPathUtility.cs
- CompilerErrorCollection.cs
- TextRange.cs
- SspiHelper.cs
- CultureInfo.cs
- StyleSheetDesigner.cs
- _SslState.cs