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
- DbParameterCollection.cs
- StagingAreaInputItem.cs
- InvalidPropValue.cs
- BamlLocalizer.cs
- TreeNodeBindingCollection.cs
- IsolatedStorageFile.cs
- DragDeltaEventArgs.cs
- SQLInt32Storage.cs
- ImageIndexConverter.cs
- FactoryMaker.cs
- UInt32Converter.cs
- ConnectionsZoneDesigner.cs
- CorrelationManager.cs
- BuildProviderAppliesToAttribute.cs
- ImageAnimator.cs
- SystemNetHelpers.cs
- DiscoveryOperationContextExtension.cs
- ToolStripArrowRenderEventArgs.cs
- AssemblySettingAttributes.cs
- BitmapEffectInputData.cs
- PropertyEmitterBase.cs
- ViewBox.cs
- ReferenceConverter.cs
- NGCSerializationManagerAsync.cs
- BufferedWebEventProvider.cs
- FilteredReadOnlyMetadataCollection.cs
- BamlWriter.cs
- XmlWrappingReader.cs
- DragStartedEventArgs.cs
- WhitespaceRule.cs
- ClientSession.cs
- DynamicRenderer.cs
- FragmentQueryKB.cs
- MsmqProcessProtocolHandler.cs
- ListViewInsertEventArgs.cs
- CodeDomSerializerException.cs
- LineSegment.cs
- TextServicesPropertyRanges.cs
- PeerNodeAddress.cs
- LabelEditEvent.cs
- X509ThumbprintKeyIdentifierClause.cs
- DataBindingHandlerAttribute.cs
- Table.cs
- DisableDpiAwarenessAttribute.cs
- ClientScriptManagerWrapper.cs
- AsymmetricKeyExchangeFormatter.cs
- CustomValidator.cs
- ApplicationId.cs
- OperationContractAttribute.cs
- AjaxFrameworkAssemblyAttribute.cs
- ObjectDataSourceEventArgs.cs
- EventSetter.cs
- UndoManager.cs
- Point3DIndependentAnimationStorage.cs
- RichTextBox.cs
- SignatureHelper.cs
- StreamHelper.cs
- Part.cs
- HandleExceptionArgs.cs
- JournalNavigationScope.cs
- DocumentSchemaValidator.cs
- PropertyGrid.cs
- IntegerCollectionEditor.cs
- LinearGradientBrush.cs
- SmiGettersStream.cs
- FileDialogCustomPlacesCollection.cs
- CustomValidator.cs
- Frame.cs
- DefaultParameterValueAttribute.cs
- ComboBox.cs
- WebPartEditorOkVerb.cs
- InvalidWMPVersionException.cs
- BrowsableAttribute.cs
- AlphabeticalEnumConverter.cs
- QueryCursorEventArgs.cs
- CodeBinaryOperatorExpression.cs
- XPathAncestorQuery.cs
- EnumMember.cs
- FamilyTypeface.cs
- GridViewDeleteEventArgs.cs
- HitTestParameters3D.cs
- EditorPart.cs
- Parser.cs
- HtmlWindow.cs
- HealthMonitoringSectionHelper.cs
- ContextItem.cs
- DataObjectSettingDataEventArgs.cs
- WindowsContainer.cs
- LineGeometry.cs
- RecognizerBase.cs
- WindowsPen.cs
- PolicyConversionContext.cs
- ActionItem.cs
- SafeReversePInvokeHandle.cs
- FontEmbeddingManager.cs
- ObjectStateManagerMetadata.cs
- SchemaTableColumn.cs
- ModifyActivitiesPropertyDescriptor.cs
- SoapSchemaExporter.cs
- GridEntry.cs