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;
///
///
/// 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
- CleanUpVirtualizedItemEventArgs.cs
- SqlDataSourceQuery.cs
- MissingManifestResourceException.cs
- SmtpFailedRecipientException.cs
- FullTrustAssemblyCollection.cs
- GeneralTransform.cs
- PersonalizationDictionary.cs
- CollectionViewGroupRoot.cs
- WebPartDeleteVerb.cs
- figurelength.cs
- Byte.cs
- QilScopedVisitor.cs
- TransactionFilter.cs
- StorageComplexPropertyMapping.cs
- NumberFunctions.cs
- While.cs
- NotCondition.cs
- KeyPressEvent.cs
- ProcessRequestAsyncResult.cs
- PerformanceCounterTraceRecord.cs
- StreamInfo.cs
- WebEvents.cs
- AppDomainFactory.cs
- ProtocolsConfigurationHandler.cs
- _SSPIWrapper.cs
- smtppermission.cs
- Zone.cs
- DeviceContexts.cs
- IResourceProvider.cs
- XPathNavigator.cs
- OperationValidationEventArgs.cs
- IisTraceListener.cs
- ContentControl.cs
- SrgsRuleRef.cs
- ContentPropertyAttribute.cs
- MemberRelationshipService.cs
- XPathScanner.cs
- TransactionsSectionGroup.cs
- DataSysAttribute.cs
- EntityConnection.cs
- ThemeDictionaryExtension.cs
- ResolveCriteria11.cs
- ACL.cs
- FullTextBreakpoint.cs
- SimpleMailWebEventProvider.cs
- XmlAutoDetectWriter.cs
- DynamicILGenerator.cs
- ServiceNameCollection.cs
- Calendar.cs
- MarkupExtensionSerializer.cs
- StaticExtensionConverter.cs
- DataGridHelper.cs
- QilList.cs
- ContactManager.cs
- WasEndpointConfigContainer.cs
- ButtonChrome.cs
- DropSource.cs
- PrePostDescendentsWalker.cs
- XDeferredAxisSource.cs
- StateMachine.cs
- SoapElementAttribute.cs
- WorkflowEventArgs.cs
- MenuAutomationPeer.cs
- DLinqColumnProvider.cs
- CookieProtection.cs
- ObsoleteAttribute.cs
- safex509handles.cs
- DnsPermission.cs
- FormsAuthenticationConfiguration.cs
- SafeEventLogWriteHandle.cs
- ScrollBar.cs
- EmptyEnumerable.cs
- PeerNodeAddress.cs
- OleDbError.cs
- Converter.cs
- NavigateEvent.cs
- CubicEase.cs
- ItemsControl.cs
- DateTimeStorage.cs
- MarkupCompiler.cs
- PolyQuadraticBezierSegment.cs
- StateMachine.cs
- InkCanvasAutomationPeer.cs
- ConfigurationManager.cs
- DataViewSettingCollection.cs
- ComPlusTypeValidator.cs
- TypeContext.cs
- OleTxTransactionInfo.cs
- CodeTypeOfExpression.cs
- ContractTypeNameCollection.cs
- formatter.cs
- XmlMemberMapping.cs
- Listbox.cs
- HttpClientCertificate.cs
- TypeInitializationException.cs
- AuthenticationSection.cs
- XamlFilter.cs
- ToolTipService.cs
- RequestCachePolicyConverter.cs
- Util.cs