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
- HttpModuleCollection.cs
- Color.cs
- DataGridColumnHeadersPresenterAutomationPeer.cs
- DataSourceDesigner.cs
- WindowsTooltip.cs
- TemplateXamlParser.cs
- DataObjectEventArgs.cs
- AdornerPresentationContext.cs
- ReadOnlyDataSourceView.cs
- SemanticResolver.cs
- PackageRelationshipSelector.cs
- AliasGenerator.cs
- HttpModulesSection.cs
- Duration.cs
- XmlSchemaDocumentation.cs
- CuspData.cs
- UIPropertyMetadata.cs
- HttpValueCollection.cs
- CmsUtils.cs
- SymmetricKeyWrap.cs
- CLRBindingWorker.cs
- NativeMethodsCLR.cs
- SubMenuStyleCollection.cs
- MethodToken.cs
- Mouse.cs
- PeerToPeerException.cs
- PreviewPageInfo.cs
- TreeNodeConverter.cs
- SrgsGrammarCompiler.cs
- DragAssistanceManager.cs
- PresentationSource.cs
- CompositeControl.cs
- GrammarBuilder.cs
- ElementUtil.cs
- IDQuery.cs
- Point3DCollectionConverter.cs
- ActivityInstanceMap.cs
- RolePrincipal.cs
- _Rfc2616CacheValidators.cs
- UnsafeNativeMethods.cs
- COM2ColorConverter.cs
- _AutoWebProxyScriptHelper.cs
- KoreanLunisolarCalendar.cs
- InstalledFontCollection.cs
- Peer.cs
- PersianCalendar.cs
- FormsIdentity.cs
- TreeViewEvent.cs
- SqlInternalConnectionSmi.cs
- Monitor.cs
- NegatedConstant.cs
- WebServiceParameterData.cs
- JavaScriptObjectDeserializer.cs
- WindowHideOrCloseTracker.cs
- UrlMappingsSection.cs
- PointValueSerializer.cs
- ConvertEvent.cs
- ToolStripDropDownClosingEventArgs.cs
- OperationResponse.cs
- ContentDesigner.cs
- AlphaSortedEnumConverter.cs
- CollectionTypeElement.cs
- MappedMetaModel.cs
- ReflectPropertyDescriptor.cs
- _NTAuthentication.cs
- SqlDataReaderSmi.cs
- Clipboard.cs
- GenericEnumerator.cs
- GridViewColumnCollection.cs
- BulletedList.cs
- ListBase.cs
- StaticFileHandler.cs
- LocalizationParserHooks.cs
- PrintingPermission.cs
- SqlUtils.cs
- Border.cs
- GridViewSelectEventArgs.cs
- PreviewPrintController.cs
- DefaultValueConverter.cs
- Point3DConverter.cs
- RoutedCommand.cs
- TextBoxAutomationPeer.cs
- PointHitTestParameters.cs
- CustomAttributeBuilder.cs
- WebAdminConfigurationHelper.cs
- DesignerLoader.cs
- NameTable.cs
- CornerRadius.cs
- MaskInputRejectedEventArgs.cs
- DesignTimeTemplateParser.cs
- MaskedTextBoxTextEditorDropDown.cs
- PreloadedPackages.cs
- TextServicesContext.cs
- QueryCacheEntry.cs
- PlainXmlDeserializer.cs
- StructuredType.cs
- InvalidDataContractException.cs
- Int32AnimationBase.cs
- NamespaceQuery.cs
- WindowsFormsSynchronizationContext.cs