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
- ipaddressinformationcollection.cs
- XpsResourceDictionary.cs
- CoreSwitches.cs
- GeneralTransform3DGroup.cs
- RegexCompilationInfo.cs
- SyndicationItem.cs
- RewritingSimplifier.cs
- DiagnosticsConfigurationHandler.cs
- ButtonBaseAdapter.cs
- NetworkStream.cs
- Debug.cs
- SafeEventLogReadHandle.cs
- Util.cs
- WSSecurityOneDotOneReceiveSecurityHeader.cs
- CodeObject.cs
- XmlSchemaGroupRef.cs
- _TLSstream.cs
- BezierSegment.cs
- ModuleConfigurationInfo.cs
- PrinterSettings.cs
- InkCanvasAutomationPeer.cs
- TemplateField.cs
- CustomErrorCollection.cs
- EraserBehavior.cs
- HexParser.cs
- DbCommandDefinition.cs
- SqlNotificationRequest.cs
- UnsafeNativeMethods.cs
- LinearGradientBrush.cs
- EventsTab.cs
- TdsParameterSetter.cs
- BezierSegment.cs
- EntityStoreSchemaGenerator.cs
- WindowsListViewItem.cs
- ImageBrush.cs
- Context.cs
- CompilerError.cs
- _NetRes.cs
- CodeMethodMap.cs
- ThemeDirectoryCompiler.cs
- TrackingQueryElement.cs
- GenericEnumerator.cs
- ResourceDictionary.cs
- PageStatePersister.cs
- ToolBarButton.cs
- AccessibleObject.cs
- ContextMarshalException.cs
- SignatureDescription.cs
- SoapExtensionTypeElementCollection.cs
- IPPacketInformation.cs
- SafeRightsManagementHandle.cs
- ImageButton.cs
- TemplatedAdorner.cs
- IResourceProvider.cs
- ScrollEventArgs.cs
- PanelStyle.cs
- MouseWheelEventArgs.cs
- ViewGenerator.cs
- MessageLoggingElement.cs
- XmlDataDocument.cs
- ExtensionDataObject.cs
- CryptoProvider.cs
- ImageAttributes.cs
- Popup.cs
- ConfigurationValidatorBase.cs
- XmlNodeWriter.cs
- SymmetricAlgorithm.cs
- SchemaRegistration.cs
- TimeZone.cs
- FlowDocumentReaderAutomationPeer.cs
- ClientTargetSection.cs
- TraversalRequest.cs
- SpeechDetectedEventArgs.cs
- RoleGroup.cs
- TranslateTransform3D.cs
- autovalidator.cs
- HyperLinkDataBindingHandler.cs
- DataColumnCollection.cs
- IsolatedStoragePermission.cs
- ByteFacetDescriptionElement.cs
- PolyLineSegment.cs
- ProxyHwnd.cs
- SchemaContext.cs
- TripleDESCryptoServiceProvider.cs
- AttributeQuery.cs
- entityreference_tresulttype.cs
- StylusPoint.cs
- TextTreeNode.cs
- InputLanguageSource.cs
- DataGridViewImageCell.cs
- GeometryGroup.cs
- ObjectDataSourceFilteringEventArgs.cs
- PrinterSettings.cs
- SafeHandle.cs
- TracedNativeMethods.cs
- ReferencedAssemblyResolver.cs
- BinHexDecoder.cs
- FixedDocumentSequencePaginator.cs
- SecurityUniqueId.cs
- GridPattern.cs