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
- ReliableRequestSessionChannel.cs
- ContractHandle.cs
- CodeExpressionStatement.cs
- BitmapFrameDecode.cs
- SafeHandle.cs
- PeerPresenceInfo.cs
- _LazyAsyncResult.cs
- ListViewDataItem.cs
- ComplexPropertyEntry.cs
- SafeArrayTypeMismatchException.cs
- HtmlForm.cs
- SafeUserTokenHandle.cs
- SkipStoryboardToFill.cs
- HttpModuleActionCollection.cs
- SecurityHelper.cs
- VisualTreeUtils.cs
- ServicePointManagerElement.cs
- AutoCompleteStringCollection.cs
- _RequestLifetimeSetter.cs
- TraceSection.cs
- ServiceOperationDetailViewControl.cs
- EndPoint.cs
- MethodExpr.cs
- SizeAnimationClockResource.cs
- TraceLog.cs
- WebPartZoneCollection.cs
- TransformerInfo.cs
- XmlSerializationReader.cs
- SeparatorAutomationPeer.cs
- SecurityDescriptor.cs
- GlyphInfoList.cs
- _NegoStream.cs
- HtmlControlPersistable.cs
- InternalTypeHelper.cs
- NullableFloatSumAggregationOperator.cs
- _ConnectionGroup.cs
- XmlName.cs
- Peer.cs
- RangeValidator.cs
- RelationshipDetailsRow.cs
- SamlSecurityTokenAuthenticator.cs
- KnownColorTable.cs
- D3DImage.cs
- MenuTracker.cs
- DebugView.cs
- UnsafeNativeMethods.cs
- SoapHeaderAttribute.cs
- LineBreak.cs
- Control.cs
- NativeCompoundFileAPIs.cs
- ValidatedControlConverter.cs
- BaseCodeDomTreeGenerator.cs
- SystemMulticastIPAddressInformation.cs
- TabControl.cs
- TablePattern.cs
- DataGridViewRow.cs
- DataListItemEventArgs.cs
- AmbientProperties.cs
- ObjectListCommandEventArgs.cs
- HtmlInputButton.cs
- SectionRecord.cs
- ILGenerator.cs
- CultureInfoConverter.cs
- FillRuleValidation.cs
- XmlUTF8TextReader.cs
- Cursor.cs
- Merger.cs
- RoleGroupCollection.cs
- Label.cs
- Configuration.cs
- MultipleCopiesCollection.cs
- HandleCollector.cs
- TargetParameterCountException.cs
- XmlReaderSettings.cs
- Matrix3D.cs
- sqlpipe.cs
- __Error.cs
- AnimationClockResource.cs
- ManagementObjectSearcher.cs
- Container.cs
- MetadataUtilsSmi.cs
- StatusBar.cs
- XPathSelectionIterator.cs
- MsmqPoisonMessageException.cs
- HtmlEncodedRawTextWriter.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- HttpClientChannel.cs
- webbrowsersite.cs
- ScriptModule.cs
- PresentationSource.cs
- BinHexEncoder.cs
- ConfigurationElement.cs
- DataViewManager.cs
- ObjectListCommand.cs
- ListDictionary.cs
- EntityDataSourceView.cs
- HtmlToClrEventProxy.cs
- ErasingStroke.cs
- DataBindingCollectionEditor.cs
- GridViewSortEventArgs.cs