Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / Design / NotifyParentPropertyAttribute.cs / 1305376 / 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
- ObjectDataSourceSelectingEventArgs.cs
- FixedSOMTableCell.cs
- HelpKeywordAttribute.cs
- TrustManager.cs
- GridViewUpdateEventArgs.cs
- StaticExtensionConverter.cs
- RecordsAffectedEventArgs.cs
- ApplicationDirectory.cs
- Byte.cs
- FillErrorEventArgs.cs
- WebSysDefaultValueAttribute.cs
- DTCTransactionManager.cs
- StickyNoteContentControl.cs
- __TransparentProxy.cs
- ParameterModifier.cs
- TokenFactoryFactory.cs
- DispatcherExceptionFilterEventArgs.cs
- Opcode.cs
- EntityContainerEntitySet.cs
- SafeProcessHandle.cs
- WorkflowInstanceTerminatedRecord.cs
- InstancePersistenceEvent.cs
- SystemSounds.cs
- ReferentialConstraint.cs
- ConnectionOrientedTransportChannelListener.cs
- Privilege.cs
- Trigger.cs
- FormViewModeEventArgs.cs
- HttpWrapper.cs
- HttpSessionStateWrapper.cs
- SqlOuterApplyReducer.cs
- TableCellCollection.cs
- RightsManagementEncryptedStream.cs
- CallbackValidator.cs
- __FastResourceComparer.cs
- DynamicMethod.cs
- XmlSchemaAnnotation.cs
- PersistenceMetadataNamespace.cs
- IdentityManager.cs
- TreeViewHitTestInfo.cs
- WebPartManager.cs
- XmlNamedNodeMap.cs
- ButtonPopupAdapter.cs
- AdministrationHelpers.cs
- DataBoundControlAdapter.cs
- XmlCharType.cs
- FactoryRecord.cs
- ArgIterator.cs
- RbTree.cs
- ConstructorExpr.cs
- CopyCodeAction.cs
- HwndHostAutomationPeer.cs
- WorkflowApplicationAbortedException.cs
- PropertyManager.cs
- DecimalFormatter.cs
- DiscoveryClientProtocol.cs
- SignedXml.cs
- TargetConverter.cs
- MimeParameter.cs
- CmsInterop.cs
- ProxyWebPartManager.cs
- SymbolEqualComparer.cs
- UserControl.cs
- CollectionBase.cs
- GenericIdentity.cs
- EncryptedKeyIdentifierClause.cs
- BooleanAnimationBase.cs
- CompileLiteralTextParser.cs
- EditCommandColumn.cs
- TargetConverter.cs
- MemberDescriptor.cs
- HtmlShimManager.cs
- OuterGlowBitmapEffect.cs
- Stylus.cs
- CodeTypeReference.cs
- InstallerTypeAttribute.cs
- CodeDirectiveCollection.cs
- LiteralTextContainerControlBuilder.cs
- Win32KeyboardDevice.cs
- TypeUnloadedException.cs
- MasterPageCodeDomTreeGenerator.cs
- HyperLink.cs
- ConnectionConsumerAttribute.cs
- SiteMapNodeItem.cs
- GetRecipientListRequest.cs
- DataGridViewRowPrePaintEventArgs.cs
- BitmapMetadataEnumerator.cs
- Token.cs
- CellLabel.cs
- COM2EnumConverter.cs
- IntPtr.cs
- CompiledIdentityConstraint.cs
- EntityDataSource.cs
- DataTableMappingCollection.cs
- autovalidator.cs
- DragEvent.cs
- HideDisabledControlAdapter.cs
- EmptyQuery.cs
- ExtensionQuery.cs
- CookielessHelper.cs