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
- SynchronizationLockException.cs
- SessionStateUtil.cs
- DateTimeOffset.cs
- CharConverter.cs
- DictionaryGlobals.cs
- HttpGetProtocolImporter.cs
- ModulesEntry.cs
- InputLanguage.cs
- RC2CryptoServiceProvider.cs
- WebPartMinimizeVerb.cs
- MessagePropertyVariants.cs
- GraphicsContext.cs
- Blend.cs
- IISUnsafeMethods.cs
- Debugger.cs
- ExpressionBindings.cs
- SqlCacheDependencyDatabase.cs
- SectionInput.cs
- NestPullup.cs
- NativeMethodsCLR.cs
- VersionedStreamOwner.cs
- GeneralTransform3DTo2DTo3D.cs
- AddressHeader.cs
- XPathParser.cs
- ValidationUtility.cs
- SvcFileManager.cs
- ListBase.cs
- CompilationUtil.cs
- HtmlLiteralTextAdapter.cs
- MouseActionConverter.cs
- HtmlTextViewAdapter.cs
- TypeUtil.cs
- SqlDataSourceStatusEventArgs.cs
- WeakEventManager.cs
- HttpCookieCollection.cs
- XmlNamespaceDeclarationsAttribute.cs
- METAHEADER.cs
- SettingsAttributeDictionary.cs
- ListItemsPage.cs
- CommandBindingCollection.cs
- SmiGettersStream.cs
- BrowserDefinitionCollection.cs
- DefaultHttpHandler.cs
- BuildProviderCollection.cs
- InternalsVisibleToAttribute.cs
- MetadataResolver.cs
- HttpRequestCacheValidator.cs
- OperationAbortedException.cs
- DesignerContextDescriptor.cs
- FormViewInsertEventArgs.cs
- DataGridViewCellCollection.cs
- TextDataBindingHandler.cs
- BaseParaClient.cs
- ProfilePropertySettingsCollection.cs
- DescriptionAttribute.cs
- ChangePassword.cs
- FilterUserControlBase.cs
- CodeNamespaceImportCollection.cs
- arabicshape.cs
- CompiledIdentityConstraint.cs
- StyleBamlTreeBuilder.cs
- ServiceNotStartedException.cs
- BinHexDecoder.cs
- ToolCreatedEventArgs.cs
- WorkflowRuntime.cs
- InstanceCompleteException.cs
- PreservationFileWriter.cs
- Command.cs
- RegexInterpreter.cs
- XmlSerializerObjectSerializer.cs
- AutomationPropertyInfo.cs
- Vector.cs
- UniqueSet.cs
- DeviceContexts.cs
- TextMarkerSource.cs
- DesignerHierarchicalDataSourceView.cs
- Literal.cs
- TripleDESCryptoServiceProvider.cs
- ProviderCollection.cs
- EdmProperty.cs
- TraceHandler.cs
- ServiceHost.cs
- MessageFilter.cs
- LinkedResourceCollection.cs
- SrgsRulesCollection.cs
- IdentityHolder.cs
- OleDbRowUpdatingEvent.cs
- SqlSelectStatement.cs
- ContainsRowNumberChecker.cs
- ServiceObjectContainer.cs
- ContainerCodeDomSerializer.cs
- Wildcard.cs
- XmlCodeExporter.cs
- BinHexEncoder.cs
- ItemsControlAutomationPeer.cs
- DesignerTransactionCloseEvent.cs
- SerialPort.cs
- DataStreamFromComStream.cs
- ModuleBuilderData.cs
- XmlElementElementCollection.cs