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
- MessageQueueCriteria.cs
- DefaultTraceListener.cs
- TimersDescriptionAttribute.cs
- WebDisplayNameAttribute.cs
- ResourceDictionaryCollection.cs
- JournalEntry.cs
- TransactionChannelListener.cs
- ContextInformation.cs
- _LocalDataStoreMgr.cs
- ToolboxComponentsCreatingEventArgs.cs
- CodeAttributeDeclarationCollection.cs
- RemotingConfigParser.cs
- MutexSecurity.cs
- TextEditorSpelling.cs
- VirtualDirectoryMapping.cs
- UInt32.cs
- TemplateComponentConnector.cs
- AdapterDictionary.cs
- ConcurrentQueue.cs
- CellTreeNode.cs
- CodeAttributeArgument.cs
- TypeConstant.cs
- Variable.cs
- CodeGotoStatement.cs
- Animatable.cs
- Exception.cs
- XamlPoint3DCollectionSerializer.cs
- PathFigureCollection.cs
- ArithmeticException.cs
- ModelItemCollection.cs
- ControlCachePolicy.cs
- ContentFileHelper.cs
- InternalDuplexBindingElement.cs
- ClientCultureInfo.cs
- DoubleLinkListEnumerator.cs
- XPathExpr.cs
- FontClient.cs
- DependencyPropertyHelper.cs
- StrokeNodeEnumerator.cs
- SessionStateSection.cs
- DrawingVisual.cs
- Int16Storage.cs
- ListSortDescriptionCollection.cs
- EventHandlerList.cs
- ValueExpressions.cs
- RemoveStoryboard.cs
- DesignColumn.cs
- CalendarModeChangedEventArgs.cs
- XmlnsDefinitionAttribute.cs
- MarkupProperty.cs
- DesignerProperties.cs
- OptimizerPatterns.cs
- NoPersistScope.cs
- LocalIdKeyIdentifierClause.cs
- ArrayMergeHelper.cs
- XmlQueryTypeFactory.cs
- XmlDataCollection.cs
- ClipboardProcessor.cs
- RemoteWebConfigurationHostStream.cs
- VideoDrawing.cs
- BaseValidator.cs
- RectAnimationBase.cs
- SqlUnionizer.cs
- SelectionProcessor.cs
- ToolStripItemCollection.cs
- DocumentProperties.cs
- TemplateComponentConnector.cs
- Label.cs
- GridViewColumnHeaderAutomationPeer.cs
- WindowShowOrOpenTracker.cs
- AutomationProperties.cs
- CurrentChangingEventManager.cs
- OracleConnectionFactory.cs
- PasswordRecovery.cs
- ScrollBarRenderer.cs
- ColumnResizeUndoUnit.cs
- CodeCommentStatementCollection.cs
- CompiledIdentityConstraint.cs
- SafeEventLogReadHandle.cs
- IDQuery.cs
- DataGridViewHeaderCell.cs
- ScrollBar.cs
- DependencyObjectType.cs
- OrthographicCamera.cs
- DSASignatureDeformatter.cs
- RegistryDataKey.cs
- ConditionalAttribute.cs
- AlternateView.cs
- ObjectTypeMapping.cs
- BinaryCommonClasses.cs
- DispatcherExceptionFilterEventArgs.cs
- GeneralTransform.cs
- DateTimeFormat.cs
- Process.cs
- _SSPISessionCache.cs
- SyndicationItemFormatter.cs
- safex509handles.cs
- ListChangedEventArgs.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- ChangeBlockUndoRecord.cs