Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Base / System / Windows / Markup / DependsOnAttribute.cs / 1 / DependsOnAttribute.cs
//------------------------------------------------------------------------ // // Microsoft Windows Client Platform // Copyright (C) Microsoft Corporation, 2005 // // File: DependsOnAttribute.cs // // Contents: An attribute that allows declaring that one property // depends on the value of another property. The serialization // system will ensure that the listed property is serialized // prior to the property that this attribute is set on. // Care must be taken to avoid circular dependencies. They // are only detected when writing all the properties in the // cycle. // // Created: 04/28/2005 [....] // //----------------------------------------------------------------------- using System; namespace System.Windows.Markup { ////// DependsOnAttribute allows declaring that one property /// depends on the value of another property. The serialization /// system will ensure that the listed property is serialized /// prior to the property that this attribute is set on. /// Care must be taken to avoid circular dependencies. They /// are only detected when writing all the properties in the /// cycle. /// [AttributeUsage(AttributeTargets.Property | AttributeTargets.Method, AllowMultiple=true)] public sealed class DependsOnAttribute: Attribute { ////// Constructor for DependsOnAttribute /// /// The name of the property that the property depends on public DependsOnAttribute(string name) { _name = name; } ////// Override of Attribute.TypeId /// public override object TypeId { // this allows multiple DependsOn attributes to show up in the // PropertyDescriptor.Attributes collection. (bug 1611449) get { return this; } } ////// The name of the property that is declared to depend on /// public string Name { get { return _name; } } private string _name; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------------------ // // Microsoft Windows Client Platform // Copyright (C) Microsoft Corporation, 2005 // // File: DependsOnAttribute.cs // // Contents: An attribute that allows declaring that one property // depends on the value of another property. The serialization // system will ensure that the listed property is serialized // prior to the property that this attribute is set on. // Care must be taken to avoid circular dependencies. They // are only detected when writing all the properties in the // cycle. // // Created: 04/28/2005 [....] // //----------------------------------------------------------------------- using System; namespace System.Windows.Markup { ////// DependsOnAttribute allows declaring that one property /// depends on the value of another property. The serialization /// system will ensure that the listed property is serialized /// prior to the property that this attribute is set on. /// Care must be taken to avoid circular dependencies. They /// are only detected when writing all the properties in the /// cycle. /// [AttributeUsage(AttributeTargets.Property | AttributeTargets.Method, AllowMultiple=true)] public sealed class DependsOnAttribute: Attribute { ////// Constructor for DependsOnAttribute /// /// The name of the property that the property depends on public DependsOnAttribute(string name) { _name = name; } ////// Override of Attribute.TypeId /// public override object TypeId { // this allows multiple DependsOn attributes to show up in the // PropertyDescriptor.Attributes collection. (bug 1611449) get { return this; } } ////// The name of the property that is declared to depend on /// public string Name { get { return _name; } } private string _name; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- KeyboardEventArgs.cs
- LocatorPart.cs
- PermissionAttributes.cs
- CodeDelegateInvokeExpression.cs
- metadatamappinghashervisitor.cs
- XmlSchemaSimpleContent.cs
- _NestedSingleAsyncResult.cs
- Identity.cs
- DefaultObjectMappingItemCollection.cs
- PropertySet.cs
- ToolStripPanelSelectionGlyph.cs
- ECDiffieHellmanCngPublicKey.cs
- _NegoState.cs
- Executor.cs
- Rss20FeedFormatter.cs
- ObjectMemberMapping.cs
- Oid.cs
- WebPartDisplayMode.cs
- RuleSetDialog.cs
- SafeCancelMibChangeNotify.cs
- XmlRawWriter.cs
- EventManager.cs
- State.cs
- DataBindingHandlerAttribute.cs
- XmlSchemaInfo.cs
- TcpStreams.cs
- Privilege.cs
- HandlerElementCollection.cs
- Double.cs
- WorkflowEventArgs.cs
- CommandLineParser.cs
- ResizeGrip.cs
- ScrollEventArgs.cs
- Cloud.cs
- QilValidationVisitor.cs
- DefaultObjectMappingItemCollection.cs
- RuleSetDialog.cs
- CustomError.cs
- AQNBuilder.cs
- StateDesigner.Layouts.cs
- PersonalizationProviderCollection.cs
- Popup.cs
- SessionConnectionReader.cs
- SafeRightsManagementSessionHandle.cs
- IPAddressCollection.cs
- HtmlWindowCollection.cs
- Run.cs
- NotifyInputEventArgs.cs
- dsa.cs
- StrokeDescriptor.cs
- SpeechDetectedEventArgs.cs
- SystemIPGlobalProperties.cs
- SpinLock.cs
- SiteMapNodeItemEventArgs.cs
- Pair.cs
- CheckBox.cs
- InputLanguage.cs
- OrthographicCamera.cs
- RequestCache.cs
- SecureConversationServiceCredential.cs
- SqlDataAdapter.cs
- RMEnrollmentPage3.cs
- JoinGraph.cs
- BufferedGraphicsManager.cs
- DataSet.cs
- _NetRes.cs
- SqlCachedBuffer.cs
- SupportsEventValidationAttribute.cs
- WebPartMovingEventArgs.cs
- GlyphTypeface.cs
- EventSinkActivityDesigner.cs
- AutomationPattern.cs
- DataGridTableCollection.cs
- JsonQueryStringConverter.cs
- UpdateRecord.cs
- LockedBorderGlyph.cs
- DataGridAutomationPeer.cs
- ResXBuildProvider.cs
- TiffBitmapDecoder.cs
- RefreshPropertiesAttribute.cs
- ColorMatrix.cs
- TriggerAction.cs
- IndexingContentUnit.cs
- SocketException.cs
- QuaternionRotation3D.cs
- Byte.cs
- DodSequenceMerge.cs
- TextEffectResolver.cs
- CachedTypeface.cs
- GPPOINT.cs
- BitmapMetadataBlob.cs
- Char.cs
- RedistVersionInfo.cs
- TiffBitmapDecoder.cs
- TdsParserSessionPool.cs
- TransactionInformation.cs
- XmlAttributeProperties.cs
- AttributeCollection.cs
- XmlSerializer.cs
- ToolStripPanelRow.cs