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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- LogicalChannel.cs
- DispatcherHookEventArgs.cs
- ConsumerConnectionPointCollection.cs
- OciEnlistContext.cs
- ServiceBehaviorElement.cs
- WebProxyScriptElement.cs
- DirectoryNotFoundException.cs
- BuildProvider.cs
- AppSettingsReader.cs
- GridPatternIdentifiers.cs
- ProtocolViolationException.cs
- PrinterUnitConvert.cs
- TextDecoration.cs
- DependencyPropertyKind.cs
- SqlGenerator.cs
- MissingManifestResourceException.cs
- EventProviderClassic.cs
- DropSource.cs
- AccessibleObject.cs
- ValidationException.cs
- JsonDataContract.cs
- DataSourceSelectArguments.cs
- PreviewPageInfo.cs
- MapPathBasedVirtualPathProvider.cs
- HtmlInputCheckBox.cs
- DateTimeOffsetAdapter.cs
- MergePropertyDescriptor.cs
- ManipulationStartingEventArgs.cs
- EntityClassGenerator.cs
- UpdateRecord.cs
- OperationExecutionFault.cs
- UserControlDesigner.cs
- BmpBitmapDecoder.cs
- ForeignKeyConstraint.cs
- SchemaManager.cs
- ValueType.cs
- PeerInputChannelListener.cs
- WebPartDescriptionCollection.cs
- FilterQuery.cs
- DownloadProgressEventArgs.cs
- DataControlFieldsEditor.cs
- _AutoWebProxyScriptEngine.cs
- ClientTargetSection.cs
- XpsResource.cs
- EntityDataSourceWrapperPropertyDescriptor.cs
- Classification.cs
- CheckoutException.cs
- InkSerializer.cs
- UnionExpr.cs
- IisTraceWebEventProvider.cs
- LayoutInformation.cs
- FixedSOMImage.cs
- ToolStripHighContrastRenderer.cs
- ProtocolsConfigurationEntry.cs
- Line.cs
- PersonalizationDictionary.cs
- EncoderNLS.cs
- RelationshipManager.cs
- StorageEndPropertyMapping.cs
- AspNetCompatibilityRequirementsMode.cs
- regiisutil.cs
- AuthenticationModuleElement.cs
- SqlProviderManifest.cs
- BooleanKeyFrameCollection.cs
- IgnoreSectionHandler.cs
- XmlnsCache.cs
- Matrix3DStack.cs
- BindingExpressionBase.cs
- DataChangedEventManager.cs
- ObjectViewEntityCollectionData.cs
- XmlDictionaryString.cs
- Annotation.cs
- CurrencyWrapper.cs
- Boolean.cs
- UriScheme.cs
- EntityDataSourceDesignerHelper.cs
- SingleAnimationUsingKeyFrames.cs
- AnimationTimeline.cs
- TypeReference.cs
- DataFormats.cs
- CustomAttributeBuilder.cs
- ComplexBindingPropertiesAttribute.cs
- ThreadStaticAttribute.cs
- TextRunCache.cs
- QuinticEase.cs
- PagerSettings.cs
- XmlAnyElementAttribute.cs
- safePerfProviderHandle.cs
- EmptyStringExpandableObjectConverter.cs
- CodeTypeDeclaration.cs
- ViewCellRelation.cs
- Thickness.cs
- Point3DAnimationUsingKeyFrames.cs
- DataGridViewHitTestInfo.cs
- FlowDocumentScrollViewer.cs
- CacheSection.cs
- GifBitmapEncoder.cs
- HttpBufferlessInputStream.cs
- DbConnectionPoolGroupProviderInfo.cs
- ProgressBar.cs