Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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);
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SqlProcedureAttribute.cs
- Int64AnimationBase.cs
- StringStorage.cs
- Command.cs
- RequestNavigateEventArgs.cs
- DynamicMethod.cs
- XmlNullResolver.cs
- HScrollProperties.cs
- XsdBuildProvider.cs
- GridViewColumnCollectionChangedEventArgs.cs
- ToolZoneDesigner.cs
- WebScriptClientGenerator.cs
- TimelineGroup.cs
- ResourceProviderFactory.cs
- ReferenceEqualityComparer.cs
- RoutingUtilities.cs
- ConfigurationPermission.cs
- NativeMethodsCLR.cs
- JpegBitmapDecoder.cs
- TraceLevelStore.cs
- CompModSwitches.cs
- PrimitiveCodeDomSerializer.cs
- IChannel.cs
- ScriptDescriptor.cs
- WebConfigManager.cs
- _ListenerRequestStream.cs
- HttpPostClientProtocol.cs
- SyndicationCategory.cs
- DataReceivedEventArgs.cs
- DataSourceConverter.cs
- MessagePartProtectionMode.cs
- ClientBuildManager.cs
- PerfService.cs
- XsltContext.cs
- TableColumn.cs
- Error.cs
- PartialCachingAttribute.cs
- XmlILConstructAnalyzer.cs
- SerializationStore.cs
- XmlAnyElementAttributes.cs
- ReachFixedPageSerializerAsync.cs
- FilteredDataSetHelper.cs
- InvalidEnumArgumentException.cs
- BlurEffect.cs
- RequestQueue.cs
- basevalidator.cs
- WebServiceEnumData.cs
- ServerValidateEventArgs.cs
- CheckBoxFlatAdapter.cs
- TreeViewCancelEvent.cs
- LocalizabilityAttribute.cs
- OptimalBreakSession.cs
- StorageMappingItemCollection.cs
- EntityDataSourceDesigner.cs
- XsltQilFactory.cs
- GlyphRunDrawing.cs
- SHA512Cng.cs
- BinHexDecoder.cs
- StorageTypeMapping.cs
- QueryPageSettingsEventArgs.cs
- EntityDesignerUtils.cs
- XmlSchemaType.cs
- TextServicesLoader.cs
- ServiceBuildProvider.cs
- PlatformCulture.cs
- ListItemConverter.cs
- NamespaceInfo.cs
- InheritablePropertyChangeInfo.cs
- CommonObjectSecurity.cs
- XmlSchemaSet.cs
- InfoCardArgumentException.cs
- UncommonField.cs
- SqlDataSourceAdvancedOptionsForm.cs
- ObjectItemConventionAssemblyLoader.cs
- _ProxyChain.cs
- SqlClientWrapperSmiStreamChars.cs
- CultureMapper.cs
- XPathExpr.cs
- UTF8Encoding.cs
- EraserBehavior.cs
- GuidelineCollection.cs
- ModuleElement.cs
- PersistenceProviderFactory.cs
- DataIdProcessor.cs
- EdmMember.cs
- WebRequestModulesSection.cs
- EmptyStringExpandableObjectConverter.cs
- FormViewRow.cs
- Command.cs
- DllHostInitializer.cs
- AddInProcess.cs
- SessionPageStateSection.cs
- QueryComponents.cs
- BrowsableAttribute.cs
- TabControlCancelEvent.cs
- SqlTopReducer.cs
- DispatcherFrame.cs
- Color.cs
- XmlNullResolver.cs
- FileChangesMonitor.cs