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
- NullableLongMinMaxAggregationOperator.cs
- RadioButtonPopupAdapter.cs
- EntityViewGenerationAttribute.cs
- SafeFindHandle.cs
- GraphicsState.cs
- TraceLevelStore.cs
- SectionInput.cs
- HttpApplication.cs
- MutexSecurity.cs
- LocalValueEnumerator.cs
- UnknownBitmapDecoder.cs
- SHA512.cs
- Rotation3D.cs
- GenericAuthenticationEventArgs.cs
- XpsFixedDocumentReaderWriter.cs
- xml.cs
- WinInetCache.cs
- CodeSnippetStatement.cs
- WebPartCloseVerb.cs
- ApplyHostConfigurationBehavior.cs
- SystemIPInterfaceProperties.cs
- NavigationEventArgs.cs
- ValidateNames.cs
- UriExt.cs
- AlphaSortedEnumConverter.cs
- AttributeEmitter.cs
- CommandConverter.cs
- AspNetHostingPermission.cs
- DocumentStatusResources.cs
- DiagnosticSection.cs
- CellQuery.cs
- SchemaInfo.cs
- WebPartCollection.cs
- WindowsListBox.cs
- Perspective.cs
- FixedTextPointer.cs
- NotConverter.cs
- DisableDpiAwarenessAttribute.cs
- CheckBoxAutomationPeer.cs
- TransactionInterop.cs
- HttpSessionStateBase.cs
- DataKey.cs
- ServiceKnownTypeAttribute.cs
- ValidateNames.cs
- SQLString.cs
- Ray3DHitTestResult.cs
- DataGridCell.cs
- RIPEMD160Managed.cs
- DataGridViewLayoutData.cs
- ApplicationSecurityManager.cs
- SqlDuplicator.cs
- WorkerRequest.cs
- EmptyQuery.cs
- ProtocolInformationWriter.cs
- CodeDOMUtility.cs
- DataError.cs
- HtmlTableRowCollection.cs
- ToolStripRendererSwitcher.cs
- XmlTextReader.cs
- InitializationEventAttribute.cs
- SemaphoreSecurity.cs
- InvalidCommandTreeException.cs
- WriteStateInfoBase.cs
- JsonUriDataContract.cs
- OracleCommandSet.cs
- CustomPopupPlacement.cs
- OperationContractAttribute.cs
- EventLogPropertySelector.cs
- LayoutUtils.cs
- CodeCatchClause.cs
- GeometryDrawing.cs
- ping.cs
- StoreItemCollection.cs
- PropertyDescriptor.cs
- DictionarySectionHandler.cs
- DLinqAssociationProvider.cs
- EventPropertyMap.cs
- MetadataException.cs
- StartUpEventArgs.cs
- PeerToPeerException.cs
- DeviceContext.cs
- OpenTypeLayoutCache.cs
- SourceElementsCollection.cs
- baseshape.cs
- ContentFilePart.cs
- XmlElement.cs
- ConnectionConsumerAttribute.cs
- ProxyElement.cs
- ValueSerializer.cs
- HScrollProperties.cs
- DbLambda.cs
- DrawingContext.cs
- Faults.cs
- DataControlFieldTypeEditor.cs
- CheckBoxList.cs
- HostProtectionException.cs
- CodeExporter.cs
- XPathDocumentBuilder.cs
- DataBindingExpressionBuilder.cs
- FixedTextBuilder.cs