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;
///
///
/// 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.
//------------------------------------------------------------------------------
//
// 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
- ButtonRenderer.cs
- FormatterConverter.cs
- DecoderNLS.cs
- AdornedElementPlaceholder.cs
- TypeConverterAttribute.cs
- ChameleonKey.cs
- CreateUserErrorEventArgs.cs
- EventHandlersStore.cs
- MapPathBasedVirtualPathProvider.cs
- DataGridViewCell.cs
- XPathDescendantIterator.cs
- QueryFunctions.cs
- TextCharacters.cs
- Pkcs7Signer.cs
- XmlSortKeyAccumulator.cs
- StrongNameHelpers.cs
- AssemblyFilter.cs
- ControlCollection.cs
- PathFigure.cs
- KnowledgeBase.cs
- EventProxy.cs
- TraceProvider.cs
- SharedPersonalizationStateInfo.cs
- ArrangedElement.cs
- DataView.cs
- AbsoluteQuery.cs
- TableLayoutPanelResizeGlyph.cs
- MenuItemAutomationPeer.cs
- TraceSection.cs
- IndividualDeviceConfig.cs
- HwndSourceParameters.cs
- SingleObjectCollection.cs
- BitmapEffectInput.cs
- AsyncResult.cs
- InternalPermissions.cs
- Exceptions.cs
- HttpPostedFileBase.cs
- IImplicitResourceProvider.cs
- Rss20FeedFormatter.cs
- LongValidator.cs
- AsymmetricSignatureFormatter.cs
- HttpValueCollection.cs
- LoginName.cs
- MinimizableAttributeTypeConverter.cs
- UpdateException.cs
- Deflater.cs
- Point3D.cs
- AppSettingsExpressionBuilder.cs
- NameValuePair.cs
- SurrogateDataContract.cs
- TextEditorCopyPaste.cs
- SaveFileDialog.cs
- WrapPanel.cs
- GenericEnumConverter.cs
- GenericWebPart.cs
- HttpProtocolImporter.cs
- SelectedGridItemChangedEvent.cs
- OdbcHandle.cs
- IPGlobalProperties.cs
- MiniMapControl.xaml.cs
- ManagementNamedValueCollection.cs
- FamilyMapCollection.cs
- PagePropertiesChangingEventArgs.cs
- Color.cs
- HostSecurityManager.cs
- SHA512.cs
- HMAC.cs
- ItemDragEvent.cs
- ApplicationServicesHostFactory.cs
- CqlIdentifiers.cs
- TypeCacheManager.cs
- AnnotationDocumentPaginator.cs
- PartitionResolver.cs
- DataGridTablesFactory.cs
- EncryptedKey.cs
- AssemblyResolver.cs
- MsmqIntegrationProcessProtocolHandler.cs
- SignatureGenerator.cs
- PersistenceProvider.cs
- ClosableStream.cs
- JournalEntryListConverter.cs
- SchemaImporter.cs
- XamlWriterExtensions.cs
- DbConvert.cs
- PenCursorManager.cs
- ProfileInfo.cs
- PositiveTimeSpanValidator.cs
- KerberosTicketHashIdentifierClause.cs
- RIPEMD160.cs
- EntityCommandCompilationException.cs
- ExpressionVisitor.cs
- SignatureToken.cs
- RedirectionProxy.cs
- LiteralDesigner.cs
- RowsCopiedEventArgs.cs
- XmlEncoding.cs
- HashUtility.cs
- AppDomainManager.cs
- QueryStatement.cs
- DecimalKeyFrameCollection.cs