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
- InfocardClientCredentials.cs
- SimpleWorkerRequest.cs
- ServiceOperationParameter.cs
- RectKeyFrameCollection.cs
- GatewayDefinition.cs
- ISCIIEncoding.cs
- FunctionUpdateCommand.cs
- TrustLevel.cs
- CodeCompiler.cs
- CommonDialog.cs
- ResourceReferenceExpressionConverter.cs
- UnauthorizedWebPart.cs
- Set.cs
- SystemMulticastIPAddressInformation.cs
- ValueTypeIndexerReference.cs
- SubqueryRules.cs
- SqlUserDefinedTypeAttribute.cs
- AssemblyAssociatedContentFileAttribute.cs
- Point3DAnimation.cs
- Baml2006ReaderFrame.cs
- SafeNativeMethods.cs
- WinCategoryAttribute.cs
- AjaxFrameworkAssemblyAttribute.cs
- PointUtil.cs
- StateDesigner.LayoutSelectionGlyph.cs
- Vector3DConverter.cs
- PartialCachingAttribute.cs
- _TransmitFileOverlappedAsyncResult.cs
- HighlightComponent.cs
- CompressEmulationStream.cs
- ReverseInheritProperty.cs
- FixedHighlight.cs
- ToolboxComponentsCreatedEventArgs.cs
- UserInitiatedNavigationPermission.cs
- WinEventQueueItem.cs
- DataGridToolTip.cs
- WorkflowFormatterBehavior.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- BitmapPalette.cs
- RectIndependentAnimationStorage.cs
- RepeaterItemCollection.cs
- AccessText.cs
- WebUtility.cs
- WindowsListViewGroup.cs
- EFColumnProvider.cs
- PanelDesigner.cs
- OleDbException.cs
- XappLauncher.cs
- GraphicsPathIterator.cs
- IntegrationExceptionEventArgs.cs
- SafeNativeMethods.cs
- Constraint.cs
- OrderByLifter.cs
- InstanceValue.cs
- PropertyRecord.cs
- SecurityRuntime.cs
- SystemIdentity.cs
- DataGridViewCellStyle.cs
- XmlComplianceUtil.cs
- TemplateXamlParser.cs
- IISUnsafeMethods.cs
- SecurityKeyIdentifierClause.cs
- PageCodeDomTreeGenerator.cs
- GridEntry.cs
- JsonReaderDelegator.cs
- PrintDocument.cs
- Command.cs
- DrawingImage.cs
- ThemeableAttribute.cs
- RowUpdatingEventArgs.cs
- TextTreeTextElementNode.cs
- ImportContext.cs
- ManagementObject.cs
- CodeChecksumPragma.cs
- ReturnEventArgs.cs
- BezierSegment.cs
- StyleTypedPropertyAttribute.cs
- WebPartDisplayMode.cs
- UnknownWrapper.cs
- SynchronousChannelMergeEnumerator.cs
- sqlnorm.cs
- PolyLineSegment.cs
- FlowDocument.cs
- StateDesigner.LayoutSelectionGlyph.cs
- AppDomainManager.cs
- HTTPNotFoundHandler.cs
- ScriptRegistrationManager.cs
- PrivilegeNotHeldException.cs
- HtmlControl.cs
- TagMapCollection.cs
- Message.cs
- TextRangeAdaptor.cs
- MulticastIPAddressInformationCollection.cs
- PersonalizationEntry.cs
- IDQuery.cs
- TypedTableHandler.cs
- IsolatedStorageException.cs
- Base64Decoder.cs
- QueueProcessor.cs
- listitem.cs