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
- GroupBoxRenderer.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- XhtmlBasicControlAdapter.cs
- CursorConverter.cs
- HostProtectionException.cs
- UserPreferenceChangingEventArgs.cs
- PointF.cs
- SQLBinaryStorage.cs
- PingOptions.cs
- Assembly.cs
- WebPartConnectionsDisconnectVerb.cs
- SchemaCollectionCompiler.cs
- MainMenu.cs
- ClientFormsAuthenticationCredentials.cs
- Debug.cs
- RowParagraph.cs
- Path.cs
- QueryCacheManager.cs
- TextRangeProviderWrapper.cs
- Rect3D.cs
- StatusBar.cs
- DesignerGenericWebPart.cs
- TreeViewCancelEvent.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- Registration.cs
- MobileControlsSectionHelper.cs
- TerminateSequenceResponse.cs
- ScriptDescriptor.cs
- ObsoleteAttribute.cs
- SettingsBindableAttribute.cs
- DefaultValidator.cs
- Transform3DCollection.cs
- CaseInsensitiveOrdinalStringComparer.cs
- CultureSpecificStringDictionary.cs
- SkinBuilder.cs
- HttpInputStream.cs
- Label.cs
- Range.cs
- UIPermission.cs
- DefinitionBase.cs
- ProgressBarHighlightConverter.cs
- XNameTypeConverter.cs
- BufferBuilder.cs
- CommandID.cs
- DrawingCollection.cs
- Compress.cs
- ExpressionBuilder.cs
- DataServiceQueryProvider.cs
- PassportAuthentication.cs
- SrgsDocument.cs
- WebPartMenuStyle.cs
- StatusBar.cs
- ImmutableObjectAttribute.cs
- CompositeFontFamily.cs
- HostedImpersonationContext.cs
- FileDialog_Vista.cs
- VerificationException.cs
- DataStreamFromComStream.cs
- EncodingNLS.cs
- AbsoluteQuery.cs
- WindowClosedEventArgs.cs
- BaseConfigurationRecord.cs
- VersionedStreamOwner.cs
- BidOverLoads.cs
- DataTableReaderListener.cs
- SqlDataSourceCache.cs
- _NegoState.cs
- RSAPKCS1KeyExchangeFormatter.cs
- TypeBuilderInstantiation.cs
- ExpandoObject.cs
- ElementNotEnabledException.cs
- SurrogateDataContract.cs
- MdImport.cs
- HwndHost.cs
- ConnectionPoint.cs
- GridViewRowEventArgs.cs
- TagElement.cs
- RawStylusInputCustomDataList.cs
- CheckBox.cs
- RangeValuePattern.cs
- EdgeProfileValidation.cs
- DotExpr.cs
- DocumentCollection.cs
- TabControlCancelEvent.cs
- DefinitionUpdate.cs
- PixelShader.cs
- HttpListener.cs
- Vector3DCollectionValueSerializer.cs
- DependencySource.cs
- BuildResult.cs
- WindowExtensionMethods.cs
- QueueNameHelper.cs
- XmlSchemaAttributeGroupRef.cs
- PersistNameAttribute.cs
- _ServiceNameStore.cs
- SoapServerProtocol.cs
- codemethodreferenceexpression.cs
- EventDescriptor.cs
- NameTable.cs
- PeerNodeTraceRecord.cs