Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- WindowsAuthenticationEventArgs.cs
- LightweightCodeGenerator.cs
- QueryCacheManager.cs
- TypeConverter.cs
- DrawingContextDrawingContextWalker.cs
- CustomDictionarySources.cs
- StateInitializationDesigner.cs
- Rect3D.cs
- FixedSOMLineCollection.cs
- ObjectReaderCompiler.cs
- AdPostCacheSubstitution.cs
- AggregateException.cs
- ObjectPersistData.cs
- RemotingHelper.cs
- DataGridViewColumnEventArgs.cs
- ImageUrlEditor.cs
- CheckBoxList.cs
- LinkLabel.cs
- SessionParameter.cs
- MarshalDirectiveException.cs
- TimerElapsedEvenArgs.cs
- SecurityKeyIdentifier.cs
- SiteMapPath.cs
- ZipFileInfo.cs
- AccessText.cs
- WorkflowInstanceQuery.cs
- TextTreeRootNode.cs
- Win32PrintDialog.cs
- DoubleStorage.cs
- SoapReflector.cs
- FormCollection.cs
- XMLUtil.cs
- Geometry3D.cs
- SerializationEventsCache.cs
- WorkflowInvoker.cs
- StatusCommandUI.cs
- PointLight.cs
- SchemaImporterExtensionsSection.cs
- EntityDataSourceWrapper.cs
- TextServicesCompartmentContext.cs
- DynamicDataManager.cs
- StreamGeometryContext.cs
- IdentityModelStringsVersion1.cs
- ViewSimplifier.cs
- MultiSelectRootGridEntry.cs
- RegexReplacement.cs
- SecurityUtils.cs
- RouteData.cs
- NTAccount.cs
- PrimaryKeyTypeConverter.cs
- IndentedWriter.cs
- ManagementObjectCollection.cs
- PresentationAppDomainManager.cs
- TabRenderer.cs
- TrackBarRenderer.cs
- HttpRequestCacheValidator.cs
- NavigationPropertyEmitter.cs
- DescendantQuery.cs
- TerminateWorkflow.cs
- PageEventArgs.cs
- FormsAuthenticationUser.cs
- CopyOnWriteList.cs
- LayoutUtils.cs
- GenericsInstances.cs
- ParameterModifier.cs
- Action.cs
- UInt32.cs
- BlurBitmapEffect.cs
- baseaxisquery.cs
- XmlSchemaAttribute.cs
- IdentifierService.cs
- SQLInt64.cs
- MdImport.cs
- ExpanderAutomationPeer.cs
- LoginView.cs
- TimeoutValidationAttribute.cs
- WebScriptMetadataInstanceContextProvider.cs
- Logging.cs
- SiteMapNodeItem.cs
- OleDbSchemaGuid.cs
- FlowPosition.cs
- ExceptionUtility.cs
- HandleTable.cs
- ValidatedControlConverter.cs
- BuildProviderCollection.cs
- GridViewSortEventArgs.cs
- UnmanagedHandle.cs
- ExpressionBuilderCollection.cs
- SqlGatherConsumedAliases.cs
- Common.cs
- Rotation3DAnimationBase.cs
- TriggerBase.cs
- DataSourceProvider.cs
- BinaryReader.cs
- Composition.cs
- CacheHelper.cs
- ServerIdentity.cs
- RemoteWebConfigurationHost.cs
- File.cs
- OutputCacheEntry.cs