Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- RuntimeArgumentHandle.cs
- unsafenativemethodsother.cs
- GridViewAutomationPeer.cs
- BuildManagerHost.cs
- XmlWriterDelegator.cs
- FontInfo.cs
- TabItem.cs
- XmlSerializableReader.cs
- Command.cs
- SQLGuidStorage.cs
- EventlogProvider.cs
- ToolStripRendererSwitcher.cs
- WindowsTab.cs
- AsymmetricAlgorithm.cs
- AppDomainFactory.cs
- PageRanges.cs
- NamedPipeConnectionPoolSettings.cs
- KnowledgeBase.cs
- DataPager.cs
- cryptoapiTransform.cs
- Helpers.cs
- MeasurementDCInfo.cs
- PersistChildrenAttribute.cs
- EventLog.cs
- CoTaskMemHandle.cs
- assertwrapper.cs
- TcpClientSocketManager.cs
- ContainerParaClient.cs
- QuaternionValueSerializer.cs
- StylusSystemGestureEventArgs.cs
- TimeSpanValidator.cs
- SQLInt64.cs
- ImpersonateTokenRef.cs
- DataBindingsDialog.cs
- ConfigurationManager.cs
- FacetValueContainer.cs
- XmlSchemaIdentityConstraint.cs
- HostUtils.cs
- PresentationTraceSources.cs
- LinearGradientBrush.cs
- ResetableIterator.cs
- GridViewAutomationPeer.cs
- NonVisualControlAttribute.cs
- DataGridParentRows.cs
- ExplicitDiscriminatorMap.cs
- LocalBuilder.cs
- NamedObject.cs
- Lookup.cs
- EventListenerClientSide.cs
- SecurityAlgorithmSuiteConverter.cs
- EventlogProvider.cs
- DataServiceRequestOfT.cs
- Tag.cs
- OleAutBinder.cs
- PropertyChangingEventArgs.cs
- Int16AnimationBase.cs
- LogicalCallContext.cs
- ZipIOExtraFieldPaddingElement.cs
- AuthenticationManager.cs
- BinaryReader.cs
- PropertyValueChangedEvent.cs
- EditorBrowsableAttribute.cs
- DispatcherSynchronizationContext.cs
- DBDataPermission.cs
- Workspace.cs
- XmlReturnWriter.cs
- Bidi.cs
- PropertyCollection.cs
- WebControlsSection.cs
- ListViewInsertedEventArgs.cs
- IsolatedStorageSecurityState.cs
- SingleQueryOperator.cs
- URL.cs
- HostingEnvironment.cs
- InteropBitmapSource.cs
- VisualBasicImportReference.cs
- ListChangedEventArgs.cs
- DataGridViewLayoutData.cs
- OdbcTransaction.cs
- ParserContext.cs
- SchemaObjectWriter.cs
- TableLayoutPanel.cs
- ProfileGroupSettings.cs
- EnumerationRangeValidationUtil.cs
- WebPartCatalogCloseVerb.cs
- ContractHandle.cs
- FunctionNode.cs
- CodeAttributeArgumentCollection.cs
- RequestBringIntoViewEventArgs.cs
- _WinHttpWebProxyDataBuilder.cs
- Helpers.cs
- __Filters.cs
- DependencyObjectType.cs
- DBSqlParserColumn.cs
- AdornerLayer.cs
- ImageButton.cs
- OperationDescription.cs
- SafeWaitHandle.cs
- SerialPort.cs
- WCFBuildProvider.cs