Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- NotImplementedException.cs
- EntityDataSourceChangingEventArgs.cs
- SeekableReadStream.cs
- XDRSchema.cs
- DataGridViewSelectedRowCollection.cs
- XmlCollation.cs
- XslException.cs
- MultipleViewPatternIdentifiers.cs
- NamedObject.cs
- SslStream.cs
- ControlParameter.cs
- DiscoveryDocumentReference.cs
- MonthChangedEventArgs.cs
- WrappedIUnknown.cs
- DefaultPrintController.cs
- TableHeaderCell.cs
- ClientData.cs
- ValidationRuleCollection.cs
- diagnosticsswitches.cs
- StringConcat.cs
- xdrvalidator.cs
- CodeVariableReferenceExpression.cs
- CompilerLocalReference.cs
- TemplateLookupAction.cs
- AlphaSortedEnumConverter.cs
- ListItemConverter.cs
- SystemSounds.cs
- DPCustomTypeDescriptor.cs
- ContentElementAutomationPeer.cs
- DialogWindow.cs
- MinimizableAttributeTypeConverter.cs
- SecurityTokenSpecification.cs
- DataGridColumnStyleMappingNameEditor.cs
- CustomTypeDescriptor.cs
- EventSourceCreationData.cs
- ColumnResizeAdorner.cs
- BindingList.cs
- OdbcFactory.cs
- HtmlInputPassword.cs
- InvalidPrinterException.cs
- ComponentDispatcher.cs
- ComponentChangingEvent.cs
- DesignerCapabilities.cs
- LOSFormatter.cs
- FileChangesMonitor.cs
- FamilyTypeface.cs
- CheckBoxStandardAdapter.cs
- DayRenderEvent.cs
- DataGridViewRowsRemovedEventArgs.cs
- WebPartConnectVerb.cs
- ControllableStoryboardAction.cs
- FillRuleValidation.cs
- RenderingBiasValidation.cs
- PackageProperties.cs
- TemplatePropertyEntry.cs
- GeneralTransform2DTo3DTo2D.cs
- DataReceivedEventArgs.cs
- ProcessProtocolHandler.cs
- MasterPage.cs
- TextModifier.cs
- NavigationProgressEventArgs.cs
- InstanceDataCollection.cs
- ObjectSpanRewriter.cs
- MouseEvent.cs
- InternalBase.cs
- RegexRunner.cs
- Emitter.cs
- XPathException.cs
- LinkedResourceCollection.cs
- ParallelForEach.cs
- XmlUtil.cs
- BindingOperations.cs
- HttpServerVarsCollection.cs
- HttpDictionary.cs
- DataKeyArray.cs
- ValidationPropertyAttribute.cs
- MouseOverProperty.cs
- ToolBarTray.cs
- QueryContinueDragEvent.cs
- CapabilitiesAssignment.cs
- RegionIterator.cs
- ApplicationId.cs
- WebControlAdapter.cs
- TemplateComponentConnector.cs
- WS2007FederationHttpBindingCollectionElement.cs
- SqlRowUpdatedEvent.cs
- Evaluator.cs
- WriteTimeStream.cs
- SqlSelectStatement.cs
- XmlValidatingReader.cs
- Inline.cs
- Menu.cs
- _SecureChannel.cs
- LineProperties.cs
- MethodAccessException.cs
- SeparatorAutomationPeer.cs
- ping.cs
- SortDescription.cs
- ReflectPropertyDescriptor.cs
- SmtpException.cs