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
- ServerTooBusyException.cs
- DbConnectionClosed.cs
- CompoundFileReference.cs
- GreenMethods.cs
- WinFormsSecurity.cs
- HashHelper.cs
- CodeAssignStatement.cs
- XpsSerializationException.cs
- PolyBezierSegment.cs
- ReachDocumentSequenceSerializer.cs
- GenericWebPart.cs
- UserControl.cs
- KeyGestureConverter.cs
- SharedUtils.cs
- FontWeight.cs
- StorageInfo.cs
- Screen.cs
- UserPreferenceChangingEventArgs.cs
- Dictionary.cs
- SecurityRuntime.cs
- DependencyObjectType.cs
- PasswordPropertyTextAttribute.cs
- IteratorFilter.cs
- WCFBuildProvider.cs
- PasswordPropertyTextAttribute.cs
- SatelliteContractVersionAttribute.cs
- BitmapSource.cs
- WebPartEditorCancelVerb.cs
- HtmlInputFile.cs
- SqlUnionizer.cs
- Subtree.cs
- ContractCodeDomInfo.cs
- PropertyChangingEventArgs.cs
- ToolBarButtonDesigner.cs
- ChangeTracker.cs
- ExpressionBuilderContext.cs
- DataListItemCollection.cs
- DataGridViewTextBoxColumn.cs
- EmptyEnumerator.cs
- FullTextLine.cs
- DmlSqlGenerator.cs
- GroupItemAutomationPeer.cs
- _Win32.cs
- ShapeTypeface.cs
- FunctionMappingTranslator.cs
- XMLSyntaxException.cs
- EnumerableWrapperWeakToStrong.cs
- XmlReflectionMember.cs
- Padding.cs
- CodeGeneratorAttribute.cs
- GridViewColumn.cs
- _IPv6Address.cs
- uribuilder.cs
- PropertyRecord.cs
- DbMetaDataColumnNames.cs
- ConstraintCollection.cs
- XmlDeclaration.cs
- WindowsTitleBar.cs
- CodeMemberProperty.cs
- XsdDateTime.cs
- Literal.cs
- LinkedList.cs
- ByteFacetDescriptionElement.cs
- ComponentChangedEvent.cs
- ListViewTableRow.cs
- HttpCacheVaryByContentEncodings.cs
- LOSFormatter.cs
- Vector3DCollectionConverter.cs
- XmlBoundElement.cs
- fixedPageContentExtractor.cs
- PrintPreviewControl.cs
- EqualityComparer.cs
- DataGridViewCellCollection.cs
- filewebrequest.cs
- State.cs
- PartialCachingAttribute.cs
- UniqueIdentifierService.cs
- SiteMapSection.cs
- TargetPerspective.cs
- EntityAdapter.cs
- TemplateManager.cs
- PreDigestedSignedInfo.cs
- ThicknessAnimationUsingKeyFrames.cs
- EncoderNLS.cs
- SqlConnectionHelper.cs
- InternalPermissions.cs
- TreeViewDesigner.cs
- RoleProviderPrincipal.cs
- TemplateControl.cs
- WindowsListView.cs
- X509Logo.cs
- DefinitionUpdate.cs
- DbInsertCommandTree.cs
- ContainerUIElement3D.cs
- ProcessHost.cs
- HostExecutionContextManager.cs
- LocalIdKeyIdentifierClause.cs
- COM2FontConverter.cs
- StoreItemCollection.cs
- XMLSyntaxException.cs