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; ////// [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); } } }/// Gets whether this attribute is ///by default. ///
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Empty.cs
- ExpressionBuilder.cs
- HashAlgorithm.cs
- HttpProtocolImporter.cs
- BuildProvidersCompiler.cs
- SchemaTypeEmitter.cs
- MiniParameterInfo.cs
- GridView.cs
- CollectionsUtil.cs
- JsonStringDataContract.cs
- KnownBoxes.cs
- CodeAccessSecurityEngine.cs
- XPathParser.cs
- Point3DCollection.cs
- FormViewDeletedEventArgs.cs
- SamlAuthenticationClaimResource.cs
- ToolStripScrollButton.cs
- AssociationSetEnd.cs
- ScrollBarAutomationPeer.cs
- ExceptionHandler.cs
- SortedDictionary.cs
- MenuItemBindingCollection.cs
- BitmapEffectrendercontext.cs
- XsdDataContractExporter.cs
- AspNetSynchronizationContext.cs
- CryptoStream.cs
- PrePrepareMethodAttribute.cs
- ToggleButton.cs
- DrawingState.cs
- TargetControlTypeAttribute.cs
- DataGridRowHeaderAutomationPeer.cs
- DataSourceCache.cs
- MenuItemCollection.cs
- DataSourceControl.cs
- InvalidOleVariantTypeException.cs
- XPathDocumentIterator.cs
- StickyNote.cs
- JulianCalendar.cs
- XhtmlBasicPhoneCallAdapter.cs
- AssemblyResourceLoader.cs
- RoleManagerModule.cs
- AdvancedBindingPropertyDescriptor.cs
- BrowserCapabilitiesCompiler.cs
- DependencyPropertyDescriptor.cs
- PngBitmapEncoder.cs
- CSharpCodeProvider.cs
- ConnectionInterfaceCollection.cs
- SortQueryOperator.cs
- TrueReadOnlyCollection.cs
- TextPatternIdentifiers.cs
- InsufficientMemoryException.cs
- MissingMemberException.cs
- ReadOnlyHierarchicalDataSource.cs
- InputScope.cs
- UrlPath.cs
- KoreanCalendar.cs
- PairComparer.cs
- SecurityCriticalDataForSet.cs
- XmlValueConverter.cs
- DBPropSet.cs
- CodeRemoveEventStatement.cs
- CollectionChangeEventArgs.cs
- MetaModel.cs
- COM2FontConverter.cs
- glyphs.cs
- GridLength.cs
- SafeNativeMethodsMilCoreApi.cs
- BackgroundFormatInfo.cs
- IdentitySection.cs
- UserControlBuildProvider.cs
- RSAOAEPKeyExchangeFormatter.cs
- XDeferredAxisSource.cs
- TextWriterTraceListener.cs
- ColumnCollection.cs
- BindingGroup.cs
- TextBoxView.cs
- BufferedOutputStream.cs
- Debug.cs
- PersistenceTypeAttribute.cs
- EmbeddedMailObject.cs
- ControlParameter.cs
- FixedSOMPageConstructor.cs
- FontStyleConverter.cs
- HandleCollector.cs
- PropertyGroupDescription.cs
- VectorValueSerializer.cs
- TemplatePropertyEntry.cs
- DoubleConverter.cs
- CodePropertyReferenceExpression.cs
- StandardOleMarshalObject.cs
- XmlDataSource.cs
- FilterableAttribute.cs
- wpf-etw.cs
- ReflectionHelper.cs
- StandardTransformFactory.cs
- WmiEventSink.cs
- SafeRightsManagementPubHandle.cs
- CredentialCache.cs
- LocalBuilder.cs
- UnsafeNativeMethods.cs