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

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CodeIdentifier.cs
- FormViewPagerRow.cs
- ConnectionManagementSection.cs
- IndependentlyAnimatedPropertyMetadata.cs
- CodeIdentifier.cs
- ThemeDirectoryCompiler.cs
- WebResourceAttribute.cs
- UInt64Storage.cs
- _BaseOverlappedAsyncResult.cs
- DictionaryEntry.cs
- ConnectionPoint.cs
- MethodBuilderInstantiation.cs
- JsonServiceDocumentSerializer.cs
- Style.cs
- TrackingRecord.cs
- Events.cs
- BitConverter.cs
- MessageQueuePermissionEntryCollection.cs
- TextOutput.cs
- ExtentKey.cs
- VariableQuery.cs
- SqlTypeConverter.cs
- ScalarType.cs
- StringSource.cs
- XhtmlBasicImageAdapter.cs
- KeyboardDevice.cs
- DataGridViewRow.cs
- XmlWrappingReader.cs
- FixedPageProcessor.cs
- DataGridViewImageColumn.cs
- ProcessStartInfo.cs
- OrderPreservingPipeliningSpoolingTask.cs
- XmlC14NWriter.cs
- AppDomainFactory.cs
- Parameter.cs
- WindowsFormsHelpers.cs
- XmlName.cs
- ReadOnlyCollectionBase.cs
- MetadataArtifactLoaderCompositeFile.cs
- XmlStringTable.cs
- WebConfigurationFileMap.cs
- TypeExtensionSerializer.cs
- selecteditemcollection.cs
- PropertyGeneratedEventArgs.cs
- Converter.cs
- ProgressBar.cs
- System.Data_BID.cs
- TextBoxLine.cs
- XslAstAnalyzer.cs
- PixelShader.cs
- TreeViewHitTestInfo.cs
- ScriptingJsonSerializationSection.cs
- FixedSOMImage.cs
- QilGeneratorEnv.cs
- ComponentCommands.cs
- AssemblyHash.cs
- NotSupportedException.cs
- TabItem.cs
- HttpServerChannel.cs
- FormsAuthenticationUser.cs
- BinaryFormatter.cs
- EpmContentDeSerializer.cs
- StaticExtension.cs
- MailWebEventProvider.cs
- BuiltInExpr.cs
- XmlBindingWorker.cs
- StateWorkerRequest.cs
- IntegerFacetDescriptionElement.cs
- ToolboxItemFilterAttribute.cs
- GreenMethods.cs
- TCEAdapterGenerator.cs
- SingleAnimationUsingKeyFrames.cs
- MenuAutoFormat.cs
- AliasedExpr.cs
- DefaultPrintController.cs
- NativeMethodsOther.cs
- MetafileHeader.cs
- SizeAnimationClockResource.cs
- IgnoreSectionHandler.cs
- DomNameTable.cs
- ErrorStyle.cs
- DataServiceContext.cs
- DynamicQueryableWrapper.cs
- WindowHideOrCloseTracker.cs
- UInt32Converter.cs
- _Events.cs
- SQLMoneyStorage.cs
- BaseParser.cs
- Transform3DGroup.cs
- GeometryHitTestParameters.cs
- KerberosReceiverSecurityToken.cs
- HttpServerChannel.cs
- ClientFormsAuthenticationMembershipProvider.cs
- XamlTemplateSerializer.cs
- WindowsStatic.cs
- Walker.cs
- SelectionItemPattern.cs
- CommonGetThemePartSize.cs
- HttpModuleActionCollection.cs
- RowTypePropertyElement.cs