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
- ErrorItem.cs
- XmlSchemaSimpleContentRestriction.cs
- securestring.cs
- SapiGrammar.cs
- NonVisualControlAttribute.cs
- DropShadowBitmapEffect.cs
- GC.cs
- Internal.cs
- UserUseLicenseDictionaryLoader.cs
- XmlRootAttribute.cs
- ConnectionManagementElementCollection.cs
- DropDownButton.cs
- UndoEngine.cs
- UnicastIPAddressInformationCollection.cs
- DefaultEventAttribute.cs
- BStrWrapper.cs
- BCLDebug.cs
- SqlTransaction.cs
- NaturalLanguageHyphenator.cs
- HttpDictionary.cs
- WebDisplayNameAttribute.cs
- RelationshipEndCollection.cs
- AssemblyAttributes.cs
- ExtensionElementCollection.cs
- Column.cs
- CreateRefExpr.cs
- DetailsViewCommandEventArgs.cs
- ErrorWebPart.cs
- DatasetMethodGenerator.cs
- FastEncoder.cs
- SymbolPair.cs
- SafeBitVector32.cs
- PlainXmlSerializer.cs
- Pkcs9Attribute.cs
- TextServicesCompartmentEventSink.cs
- RegistryKey.cs
- XmlSyndicationContent.cs
- LowerCaseStringConverter.cs
- GradientBrush.cs
- ProcessThreadDesigner.cs
- XmlSchemaCompilationSettings.cs
- WebRequestModulesSection.cs
- EventLogPermissionAttribute.cs
- ProcessRequestAsyncResult.cs
- ControlAdapter.cs
- Vector.cs
- XamlVector3DCollectionSerializer.cs
- DecoderFallbackWithFailureFlag.cs
- SafeCoTaskMem.cs
- ConnectionPointCookie.cs
- DataColumnMappingCollection.cs
- MultipartIdentifier.cs
- GeneratedContractType.cs
- RadioButtonBaseAdapter.cs
- UInt16Storage.cs
- ProviderConnectionPointCollection.cs
- panel.cs
- SafeLocalAllocation.cs
- RoamingStoreFileUtility.cs
- Automation.cs
- ZoneLinkButton.cs
- WebBrowserHelper.cs
- NameTable.cs
- SqlDataSourceView.cs
- ImageListStreamer.cs
- _SSPISessionCache.cs
- ParseNumbers.cs
- ContainerVisual.cs
- IFlowDocumentViewer.cs
- ComPlusTypeLoader.cs
- ConstructorBuilder.cs
- TextRangeEditLists.cs
- CommandConverter.cs
- CodeDOMProvider.cs
- FixUp.cs
- Rect3D.cs
- XmlDocumentSerializer.cs
- Cursor.cs
- SimpleLine.cs
- Metadata.cs
- ReachBasicContext.cs
- HotCommands.cs
- ReflectionHelper.cs
- TraceContextEventArgs.cs
- ControlFilterExpression.cs
- LineSegment.cs
- XsltArgumentList.cs
- AccessText.cs
- StringUtil.cs
- TableRowGroupCollection.cs
- JsonWriter.cs
- DataViewSetting.cs
- XmlSchemaProviderAttribute.cs
- WebScriptMetadataMessage.cs
- WSSecurityOneDotZeroReceiveSecurityHeader.cs
- ParameterCollection.cs
- XPathCompileException.cs
- DataGridViewRowsRemovedEventArgs.cs
- ControlSerializer.cs
- ChangePassword.cs