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
- RowToParametersTransformer.cs
- SQLConvert.cs
- StrictAndMessageFilter.cs
- SafePEFileHandle.cs
- SemaphoreSlim.cs
- FlowDocumentView.cs
- CodeParameterDeclarationExpression.cs
- TCPClient.cs
- odbcmetadatacolumnnames.cs
- WebPartEditorCancelVerb.cs
- AssemblyHash.cs
- PageEventArgs.cs
- NavigationFailedEventArgs.cs
- BamlCollectionHolder.cs
- EnumMember.cs
- SqlEnums.cs
- WeakReferenceList.cs
- PassportAuthenticationModule.cs
- Comparer.cs
- EventLogPermission.cs
- PolicyValidationException.cs
- ReadOnlyTernaryTree.cs
- TableRowCollection.cs
- LicFileLicenseProvider.cs
- PropertyItem.cs
- Zone.cs
- DefaultBinder.cs
- CodeGenerator.cs
- PartitionResolver.cs
- Style.cs
- DomNameTable.cs
- XamlVector3DCollectionSerializer.cs
- WebPartsPersonalization.cs
- DataGridViewDesigner.cs
- WindowsGrip.cs
- MemoryResponseElement.cs
- EntityDataSourceDataSelectionPanel.cs
- WindowsStreamSecurityElement.cs
- GenericRootAutomationPeer.cs
- DataControlFieldHeaderCell.cs
- FamilyMap.cs
- GridLengthConverter.cs
- ReadOnlyAttribute.cs
- CustomServiceCredentials.cs
- SafeNativeMethods.cs
- Size3D.cs
- ErrorFormatterPage.cs
- LinkConverter.cs
- MatrixAnimationUsingKeyFrames.cs
- HttpSysSettings.cs
- XmlAtomicValue.cs
- XPathExpr.cs
- NetworkInformationPermission.cs
- EventLogInternal.cs
- ADMembershipProvider.cs
- ActiveXSite.cs
- SafeNativeMemoryHandle.cs
- CodeDOMUtility.cs
- ErrorHandlerModule.cs
- SyndicationLink.cs
- CodeIndexerExpression.cs
- FontSizeConverter.cs
- DataGridViewCheckBoxCell.cs
- OracleEncoding.cs
- CaseInsensitiveComparer.cs
- TrustLevel.cs
- LicenseProviderAttribute.cs
- SqlConnectionPoolGroupProviderInfo.cs
- XmlReflectionImporter.cs
- CaretElement.cs
- CompositeFontInfo.cs
- WriteableBitmap.cs
- ObjectDataSourceFilteringEventArgs.cs
- InfoCardTrace.cs
- HttpCookiesSection.cs
- CollectionViewSource.cs
- PaintValueEventArgs.cs
- VsPropertyGrid.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- DesignTimeXamlWriter.cs
- processwaithandle.cs
- ExpressionVisitor.cs
- PermissionSetEnumerator.cs
- ExtentJoinTreeNode.cs
- WebServiceEnumData.cs
- Trace.cs
- DialogBaseForm.cs
- HtmlString.cs
- AstTree.cs
- DynamicDataResources.Designer.cs
- FixedSOMLineRanges.cs
- GradientStop.cs
- precedingquery.cs
- Renderer.cs
- ItemsControl.cs
- QuadraticEase.cs
- BaseTransportHeaders.cs
- ComplexPropertyEntry.cs
- HuffCodec.cs
- Model3D.cs