Code:
/ 4.0 / 4.0 / untmp / 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;
///
///
/// Indicates whether the parent property is notified
/// if a child namespace property is modified.
///
///
[AttributeUsage(AttributeTargets.Property)]
public sealed class NotifyParentPropertyAttribute : Attribute {
///
///
/// Specifies that the parent property should be notified on changes to the child class property. This field is read-only.
///
///
public static readonly NotifyParentPropertyAttribute Yes = new NotifyParentPropertyAttribute(true);
///
/// 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 No = new NotifyParentPropertyAttribute(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 static readonly NotifyParentPropertyAttribute Default = No;
private bool notifyParent = false;
///
/// 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 NotifyParentPropertyAttribute(bool notifyParent) {
this.notifyParent = notifyParent;
}
///
///
/// Gets or sets whether the parent property should be notified
/// on changes to a child namespace property.
///
///
public bool NotifyParent {
get {
return notifyParent;
}
}
///
///
/// Tests whether the specified object is the same as the current object.
///
///
public override bool Equals(object obj) {
if (obj == this) {
return true;
}
if ((obj != null) && (obj is NotifyParentPropertyAttribute)) {
return ((NotifyParentPropertyAttribute)obj).NotifyParent == notifyParent;
}
return false;
}
///
///
/// Returns the hashcode for this object.
///
///
public override int GetHashCode() {
return base.GetHashCode();
}
///
///
/// Gets whether this attribute is by default.
///
///
public override bool IsDefaultAttribute() {
return this.Equals(Default);
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MissingSatelliteAssemblyException.cs
- CodeTypeMemberCollection.cs
- XmlAnyElementAttributes.cs
- ObjectHandle.cs
- FixedSOMElement.cs
- XmlSiteMapProvider.cs
- EventListenerClientSide.cs
- DefaultTraceListener.cs
- ZoneMembershipCondition.cs
- GlyphRunDrawing.cs
- NativeMethods.cs
- ConditionalExpression.cs
- XmlQualifiedName.cs
- validation.cs
- HierarchicalDataSourceControl.cs
- MimeMapping.cs
- RenderCapability.cs
- SqlWriter.cs
- HtmlTableCellCollection.cs
- FontWeights.cs
- DocumentReference.cs
- WsdlContractConversionContext.cs
- Bidi.cs
- HtmlTernaryTree.cs
- ControlIdConverter.cs
- XmlTextReaderImpl.cs
- SoapMessage.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- BufferModesCollection.cs
- xamlnodes.cs
- ToolboxComponentsCreatedEventArgs.cs
- Exception.cs
- CheckBoxBaseAdapter.cs
- BaseCollection.cs
- DataGridViewIntLinkedList.cs
- Subtree.cs
- ValueSerializer.cs
- FlowLayout.cs
- HwndSourceKeyboardInputSite.cs
- DataGridBoolColumn.cs
- HtmlInputCheckBox.cs
- FormatPage.cs
- XmlILConstructAnalyzer.cs
- PolyLineSegmentFigureLogic.cs
- ReadOnlyHierarchicalDataSourceView.cs
- ChannelBinding.cs
- And.cs
- ByteAnimationUsingKeyFrames.cs
- MetadataException.cs
- ReflectionPermission.cs
- SqlParameter.cs
- WebZone.cs
- InvalidPrinterException.cs
- WorkerRequest.cs
- SmtpCommands.cs
- ExpressionTextBoxAutomationPeer.cs
- DrawingContextDrawingContextWalker.cs
- SplineKeyFrames.cs
- FilterQuery.cs
- NextPreviousPagerField.cs
- ResourceDisplayNameAttribute.cs
- BufferedWebEventProvider.cs
- EntityTransaction.cs
- XmlBoundElement.cs
- DecimalStorage.cs
- Solver.cs
- TypeConverterValueSerializer.cs
- DiscreteKeyFrames.cs
- PointConverter.cs
- AnnotationResourceChangedEventArgs.cs
- XmlStreamStore.cs
- RuntimeWrappedException.cs
- Resources.Designer.cs
- DataGridViewCell.cs
- XPathAncestorIterator.cs
- XmlSchemaNotation.cs
- RequestDescription.cs
- EventEntry.cs
- KoreanCalendar.cs
- TypeResolvingOptionsAttribute.cs
- StorageRoot.cs
- DesignerView.Commands.cs
- DrawListViewColumnHeaderEventArgs.cs
- HtmlShim.cs
- XmlObjectSerializerWriteContextComplex.cs
- EventHandlingScope.cs
- WmlPhoneCallAdapter.cs
- PersonalizableAttribute.cs
- XhtmlBasicFormAdapter.cs
- RC2CryptoServiceProvider.cs
- CustomPopupPlacement.cs
- Transform.cs
- StaticExtension.cs
- BindableTemplateBuilder.cs
- WebScriptMetadataFormatter.cs
- VersionPair.cs
- RoutedEvent.cs
- HtmlInputRadioButton.cs
- DebugView.cs
- GcHandle.cs