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
- InputBuffer.cs
- MeshGeometry3D.cs
- HttpHandlerActionCollection.cs
- ToolboxSnapDragDropEventArgs.cs
- XmlSchemaValidationException.cs
- initElementDictionary.cs
- ListView.cs
- Rectangle.cs
- BinaryObjectWriter.cs
- NetNamedPipeBinding.cs
- SyntaxCheck.cs
- DbProviderServices.cs
- SqlNodeAnnotations.cs
- GatewayIPAddressInformationCollection.cs
- FormatException.cs
- UseAttributeSetsAction.cs
- XslTransform.cs
- ErrorFormatterPage.cs
- DataShape.cs
- ObjectDataSourceMethodEventArgs.cs
- ArrayEditor.cs
- SystemIcmpV4Statistics.cs
- MembershipPasswordException.cs
- MembershipValidatePasswordEventArgs.cs
- LineServices.cs
- RsaSecurityTokenParameters.cs
- LineGeometry.cs
- ContainerActivationHelper.cs
- SQLStringStorage.cs
- AnnotationHelper.cs
- DataErrorValidationRule.cs
- HandleCollector.cs
- HandledEventArgs.cs
- EndpointDesigner.cs
- CompressedStack.cs
- MetadataItem_Static.cs
- XhtmlConformanceSection.cs
- ClientRoleProvider.cs
- DiscoveryInnerClientManaged11.cs
- TrackingDataItemValue.cs
- Blend.cs
- FormViewCommandEventArgs.cs
- IPCCacheManager.cs
- Empty.cs
- __Filters.cs
- FixedSOMSemanticBox.cs
- ProtocolsConfigurationHandler.cs
- Merger.cs
- XmlIlGenerator.cs
- ImageConverter.cs
- Crypto.cs
- XmlSchemaAnnotation.cs
- MexServiceChannelBuilder.cs
- StateWorkerRequest.cs
- XmlAttributeCollection.cs
- GregorianCalendar.cs
- ADMembershipProvider.cs
- BooleanKeyFrameCollection.cs
- SourceFilter.cs
- DesignerDataStoredProcedure.cs
- RecipientIdentity.cs
- XmlParserContext.cs
- TemplateEditingFrame.cs
- TypedMessageConverter.cs
- Point3DCollectionConverter.cs
- OdbcParameterCollection.cs
- safex509handles.cs
- _CommandStream.cs
- ResourcesGenerator.cs
- PhysicalAddress.cs
- RequiredFieldValidator.cs
- BinaryWriter.cs
- StylusPointProperty.cs
- ResourceSetExpression.cs
- CollectionContainer.cs
- SystemIcmpV4Statistics.cs
- CompiledIdentityConstraint.cs
- RecognitionResult.cs
- ParserContext.cs
- MappingItemCollection.cs
- handlecollector.cs
- LongValidatorAttribute.cs
- QuaternionKeyFrameCollection.cs
- PartialCachingControl.cs
- BitmapImage.cs
- SerializableTypeCodeDomSerializer.cs
- ResourceDisplayNameAttribute.cs
- PropertyCollection.cs
- SqlStatistics.cs
- EntityDataSourceViewSchema.cs
- PerspectiveCamera.cs
- WorkflowApplicationException.cs
- HandleRef.cs
- SelectionRange.cs
- MsmqIntegrationAppDomainProtocolHandler.cs
- ReferenceTypeElement.cs
- SQLBinaryStorage.cs
- ExpressionList.cs
- StringInfo.cs
- DataConnectionHelper.cs