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; ////// [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); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ ///// Gets whether this attribute is ///by default. /// // 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); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007./// Gets whether this attribute is ///by default. ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XPathExpr.cs
- CompilationPass2Task.cs
- AutoGeneratedFieldProperties.cs
- ObjectQuery.cs
- TextServicesCompartmentEventSink.cs
- TableRowsCollectionEditor.cs
- SetUserLanguageRequest.cs
- HelpProvider.cs
- Hex.cs
- TypeInitializationException.cs
- X509RecipientCertificateClientElement.cs
- DetailsViewUpdatedEventArgs.cs
- SQLBinaryStorage.cs
- InitiatorSessionSymmetricTransportSecurityProtocol.cs
- HyperLinkStyle.cs
- CompletedAsyncResult.cs
- DictionaryMarkupSerializer.cs
- Column.cs
- BitmapEffectOutputConnector.cs
- Preprocessor.cs
- Attributes.cs
- EventLogPermissionEntry.cs
- X509UI.cs
- NameValueFileSectionHandler.cs
- IgnoreSectionHandler.cs
- ApplicationFileParser.cs
- ServiceOperationListItem.cs
- SqlBulkCopyColumnMappingCollection.cs
- DataGridLengthConverter.cs
- DataGridColumnCollection.cs
- ContourSegment.cs
- TimeSpanStorage.cs
- Int32AnimationUsingKeyFrames.cs
- WebPartDisplayModeCollection.cs
- Deserializer.cs
- ErrorFormatter.cs
- ValidationErrorCollection.cs
- StringCollection.cs
- keycontainerpermission.cs
- WebPartTransformer.cs
- DataControlImageButton.cs
- ExtensibleClassFactory.cs
- FaultContractInfo.cs
- shaperfactoryquerycacheentry.cs
- MediaPlayerState.cs
- MarginsConverter.cs
- DEREncoding.cs
- EncryptionUtility.cs
- NameValueFileSectionHandler.cs
- MexTcpBindingCollectionElement.cs
- UInt64Converter.cs
- GlyphCache.cs
- HyperLinkStyle.cs
- ViewGenerator.cs
- DeadCharTextComposition.cs
- ServiceModelExtensionCollectionElement.cs
- LoadedOrUnloadedOperation.cs
- ExpressionNode.cs
- CollectionViewGroupRoot.cs
- PerformanceCounters.cs
- SmiRecordBuffer.cs
- typedescriptorpermissionattribute.cs
- KeyTimeConverter.cs
- ChangeNode.cs
- ClusterSafeNativeMethods.cs
- GB18030Encoding.cs
- MatrixValueSerializer.cs
- AutoGeneratedField.cs
- ScriptingWebServicesSectionGroup.cs
- UIServiceHelper.cs
- DesignerActionGlyph.cs
- Int64AnimationUsingKeyFrames.cs
- CallbackTimeoutsElement.cs
- LogEntrySerialization.cs
- MachineKeyConverter.cs
- TextChange.cs
- LeftCellWrapper.cs
- HttpClientProtocol.cs
- SByteConverter.cs
- RichTextBoxAutomationPeer.cs
- SafeLocalAllocation.cs
- FrugalMap.cs
- BamlResourceSerializer.cs
- PenContexts.cs
- Activity.cs
- HtmlInputReset.cs
- ReferencedAssembly.cs
- QuerySafeNavigator.cs
- ClassData.cs
- OrderedDictionaryStateHelper.cs
- CqlWriter.cs
- xml.cs
- AsyncResult.cs
- HandlerFactoryWrapper.cs
- ValueHandle.cs
- HotSpotCollection.cs
- XamlFxTrace.cs
- ScrollItemPatternIdentifiers.cs
- MetabaseSettings.cs
- GlyphManager.cs