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
- InsufficientMemoryException.cs
- WindowPatternIdentifiers.cs
- UnsafeNativeMethods.cs
- Debug.cs
- URLIdentityPermission.cs
- OleCmdHelper.cs
- AuthenticationServiceManager.cs
- ToolStripCustomTypeDescriptor.cs
- MenuEventArgs.cs
- SwitchLevelAttribute.cs
- BinHexDecoder.cs
- ProbeDuplexAsyncResult.cs
- IPEndPointCollection.cs
- activationcontext.cs
- AssemblyNameProxy.cs
- ThicknessAnimationUsingKeyFrames.cs
- WSFederationHttpBindingElement.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- FieldMetadata.cs
- BindUriHelper.cs
- RowType.cs
- SafeBitVector32.cs
- InitializationEventAttribute.cs
- HttpTransportManager.cs
- MdImport.cs
- CompensatableTransactionScopeActivityDesigner.cs
- TextInfo.cs
- TreeViewDataItemAutomationPeer.cs
- Dispatcher.cs
- SecurityIdentifierElementCollection.cs
- SmtpFailedRecipientException.cs
- webproxy.cs
- PixelShader.cs
- FileDialogCustomPlace.cs
- BitmapSourceSafeMILHandle.cs
- DataGridViewLinkColumn.cs
- COAUTHINFO.cs
- Bitmap.cs
- SchemaTypeEmitter.cs
- Automation.cs
- TabletCollection.cs
- RoutedEvent.cs
- DataGridViewColumn.cs
- ListControl.cs
- Int32Rect.cs
- Comparer.cs
- Codec.cs
- TemplateColumn.cs
- ErrorStyle.cs
- UnsafeNativeMethods.cs
- GlobalDataBindingHandler.cs
- ThemeDirectoryCompiler.cs
- TreeViewDataItemAutomationPeer.cs
- TextElementEnumerator.cs
- Marshal.cs
- MaskInputRejectedEventArgs.cs
- AbsoluteQuery.cs
- CodeRegionDirective.cs
- ElementNotAvailableException.cs
- TreeNodeBindingCollection.cs
- PopOutPanel.cs
- StorageAssociationSetMapping.cs
- ExtendedPropertyCollection.cs
- ProfileBuildProvider.cs
- ContainerVisual.cs
- ChannelRequirements.cs
- WorkflowServiceNamespace.cs
- Image.cs
- CookielessHelper.cs
- _SafeNetHandles.cs
- DocumentPageTextView.cs
- AttributeProviderAttribute.cs
- DecoderBestFitFallback.cs
- SqlDataSourceTableQuery.cs
- TimeSpanStorage.cs
- IImplicitResourceProvider.cs
- PropertyEntry.cs
- EntityParameter.cs
- NativeObjectSecurity.cs
- Listbox.cs
- ConfigurationCollectionAttribute.cs
- UnmanagedMemoryStreamWrapper.cs
- PagedDataSource.cs
- Primitive.cs
- DataGridViewCheckBoxCell.cs
- NodeLabelEditEvent.cs
- DataGridAddNewRow.cs
- Margins.cs
- SimpleWorkerRequest.cs
- ObfuscationAttribute.cs
- HttpConfigurationSystem.cs
- Adorner.cs
- SerializationFieldInfo.cs
- ListViewAutomationPeer.cs
- OletxDependentTransaction.cs
- RootDesignerSerializerAttribute.cs
- ExternalFile.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- ListViewUpdatedEventArgs.cs
- HtmlInputCheckBox.cs