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
- ChildrenQuery.cs
- ControlBuilderAttribute.cs
- NodeLabelEditEvent.cs
- PropertyKey.cs
- SendMessageContent.cs
- ConfigurationConverterBase.cs
- RelatedPropertyManager.cs
- CheckBox.cs
- SocketAddress.cs
- CodeObjectCreateExpression.cs
- TextFormattingConverter.cs
- PeerSecurityHelpers.cs
- ButtonPopupAdapter.cs
- ColorContext.cs
- OrderedDictionaryStateHelper.cs
- DecodeHelper.cs
- GridViewColumn.cs
- CodeMethodReturnStatement.cs
- DrawingBrush.cs
- ViewPort3D.cs
- PageOrientation.cs
- SerializerProvider.cs
- Handle.cs
- BamlReader.cs
- XPathBinder.cs
- FlowPosition.cs
- xmlsaver.cs
- ResumeStoryboard.cs
- MemoryMappedView.cs
- XslTransform.cs
- XPathMessageFilterElementComparer.cs
- LicenseManager.cs
- AsymmetricKeyExchangeFormatter.cs
- VersionUtil.cs
- TextTreeObjectNode.cs
- Stream.cs
- BuildDependencySet.cs
- StylesEditorDialog.cs
- GACIdentityPermission.cs
- CodeTypeReference.cs
- DataGridViewRowCollection.cs
- ListControl.cs
- DbReferenceCollection.cs
- ColorAnimation.cs
- QuotedStringWriteStateInfo.cs
- LiteralControl.cs
- IndicCharClassifier.cs
- TaskCanceledException.cs
- StoreItemCollection.cs
- ToolStripControlHost.cs
- FixedSOMPageConstructor.cs
- EndpointInstanceProvider.cs
- OutOfProcStateClientManager.cs
- PlanCompilerUtil.cs
- EventPrivateKey.cs
- ThreadStateException.cs
- SqlConnectionString.cs
- ConnectionConsumerAttribute.cs
- HandleCollector.cs
- PeerTransportListenAddressValidatorAttribute.cs
- XmlEventCache.cs
- FileNotFoundException.cs
- ResourcePart.cs
- ZipIOExtraField.cs
- SequentialWorkflowRootDesigner.cs
- SmiMetaData.cs
- CodeMethodReturnStatement.cs
- RelatedCurrencyManager.cs
- PrimitiveList.cs
- CreateParams.cs
- Keywords.cs
- TemplateBindingExpression.cs
- StringArrayConverter.cs
- DataObjectMethodAttribute.cs
- Binding.cs
- DecoderReplacementFallback.cs
- EventData.cs
- TextEditor.cs
- DBSchemaTable.cs
- BasicCellRelation.cs
- ContentFilePart.cs
- OutputChannelBinder.cs
- PTUtility.cs
- ReadOnlyMetadataCollection.cs
- CompilationUtil.cs
- XmlObjectSerializerReadContextComplex.cs
- PointCollection.cs
- TimerElapsedEvenArgs.cs
- ExtentKey.cs
- Light.cs
- ThemeableAttribute.cs
- BitConverter.cs
- MouseDevice.cs
- ScopedKnownTypes.cs
- UInt64Storage.cs
- GenericsNotImplementedException.cs
- SqlBooleanMismatchVisitor.cs
- ManagementException.cs
- DiscoveryReferences.cs
- Marshal.cs