Code:
/ DotNET / DotNET / 8.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
- AccessDataSource.cs
- StorageEntityTypeMapping.cs
- DesignerAttribute.cs
- WindowsFormsHostAutomationPeer.cs
- Tile.cs
- HttpGetProtocolReflector.cs
- VirtualizedItemPattern.cs
- ScriptReferenceBase.cs
- ContainerParaClient.cs
- PixelShader.cs
- ConfigurationSectionGroup.cs
- ParameterCollectionEditorForm.cs
- WinEventHandler.cs
- SqlCharStream.cs
- RepeatButton.cs
- SymmetricKey.cs
- SpoolingTask.cs
- Dynamic.cs
- SchemaAttDef.cs
- XamlRtfConverter.cs
- PropertyDescriptorComparer.cs
- IndexedSelectQueryOperator.cs
- MachineSettingsSection.cs
- TypeConverter.cs
- FlowNode.cs
- TraceRecord.cs
- FileSecurity.cs
- UnknownBitmapEncoder.cs
- XamlFigureLengthSerializer.cs
- XmlUTF8TextWriter.cs
- StreamInfo.cs
- ReflectionHelper.cs
- EventWaitHandle.cs
- PreviewPrintController.cs
- ThicknessAnimationUsingKeyFrames.cs
- CodeTypeDeclaration.cs
- HwndSourceParameters.cs
- UnsignedPublishLicense.cs
- IntegerValidator.cs
- MetaModel.cs
- EntityConnectionStringBuilder.cs
- MultiBinding.cs
- DataGridColumnCollectionEditor.cs
- PerfCounters.cs
- ProcessModelSection.cs
- NameTable.cs
- PrtCap_Builder.cs
- WindowsRegion.cs
- ContextStack.cs
- AutoCompleteStringCollection.cs
- BehaviorEditorPart.cs
- TraceContext.cs
- NativeMethods.cs
- URLMembershipCondition.cs
- LogLogRecordHeader.cs
- ObservableCollection.cs
- XmlCharCheckingWriter.cs
- ServiceDescription.cs
- MetafileHeaderEmf.cs
- EventDescriptor.cs
- ParallelTimeline.cs
- AlternateViewCollection.cs
- _UncName.cs
- BitmapEffectGroup.cs
- ConstNode.cs
- InvalidCastException.cs
- DbExpressionVisitor_TResultType.cs
- PageAsyncTaskManager.cs
- WmiInstallComponent.cs
- DeflateStream.cs
- OutKeywords.cs
- PreservationFileReader.cs
- BinaryConverter.cs
- XmlQueryRuntime.cs
- LinkLabel.cs
- HtmlElement.cs
- RadialGradientBrush.cs
- InitializerFacet.cs
- HitTestParameters3D.cs
- TrackingCondition.cs
- ModelTreeEnumerator.cs
- XmlDocumentFragment.cs
- SaveWorkflowCommand.cs
- SqlCommandBuilder.cs
- wgx_sdk_version.cs
- AbandonedMutexException.cs
- SafeNativeMethods.cs
- WindowsStatusBar.cs
- GeometryGroup.cs
- ListBase.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- XmlSchemaAll.cs
- ComplexType.cs
- Renderer.cs
- UnsafeNativeMethodsCLR.cs
- OleDbException.cs
- odbcmetadatafactory.cs
- PathGradientBrush.cs
- Italic.cs
- PropertyCondition.cs