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
- WebPart.cs
- ClientApiGenerator.cs
- CreateUserErrorEventArgs.cs
- PersonalizationProviderCollection.cs
- SoapEnumAttribute.cs
- ReadOnlyNameValueCollection.cs
- GreenMethods.cs
- RenderDataDrawingContext.cs
- DecoderNLS.cs
- TimeStampChecker.cs
- WindowsFormsEditorServiceHelper.cs
- InitializationEventAttribute.cs
- webclient.cs
- loginstatus.cs
- ArrangedElementCollection.cs
- EdmSchemaAttribute.cs
- ProfileServiceManager.cs
- EmptyReadOnlyDictionaryInternal.cs
- InternalMappingException.cs
- WebPartCatalogCloseVerb.cs
- CodeCastExpression.cs
- TTSEvent.cs
- TextEditorContextMenu.cs
- ColorConverter.cs
- SevenBitStream.cs
- MissingMemberException.cs
- CoreSwitches.cs
- MediaTimeline.cs
- SqlMethods.cs
- FontStretch.cs
- SoapUnknownHeader.cs
- BamlStream.cs
- Soap12ServerProtocol.cs
- SortedList.cs
- WeakRefEnumerator.cs
- Processor.cs
- Stylesheet.cs
- XsdValidatingReader.cs
- IPipelineRuntime.cs
- UrlMappingsSection.cs
- BitmapInitialize.cs
- SafePEFileHandle.cs
- _NegoState.cs
- ChangeConflicts.cs
- SapiInterop.cs
- DataGridViewCellCancelEventArgs.cs
- ObjectDataSource.cs
- CapabilitiesSection.cs
- SafeNativeMethodsMilCoreApi.cs
- WsdlBuildProvider.cs
- ResourceWriter.cs
- DataGridPagerStyle.cs
- StrokeNode.cs
- PrtTicket_Base.cs
- AccessibleObject.cs
- ScopeElement.cs
- NullableIntSumAggregationOperator.cs
- DescendantQuery.cs
- OleDbReferenceCollection.cs
- WorkItem.cs
- LedgerEntryCollection.cs
- ByteStreamGeometryContext.cs
- CodeExpressionStatement.cs
- ShaderRenderModeValidation.cs
- WindowsFormsHostPropertyMap.cs
- EntitySqlQueryCacheKey.cs
- SQLDateTimeStorage.cs
- GridEntry.cs
- WorkflowOperationContext.cs
- CultureMapper.cs
- CompilerCollection.cs
- CodeSnippetStatement.cs
- RequestReplyCorrelator.cs
- NamespaceMapping.cs
- MenuEventArgs.cs
- BasicHttpBindingCollectionElement.cs
- GeometryModel3D.cs
- MethodExpr.cs
- infer.cs
- WebPartMovingEventArgs.cs
- RegistrySecurity.cs
- ItemCollection.cs
- WebPartTracker.cs
- DataGridCellItemAutomationPeer.cs
- SqlRowUpdatingEvent.cs
- ResourceReferenceExpressionConverter.cs
- FormViewUpdateEventArgs.cs
- RelatedCurrencyManager.cs
- _BufferOffsetSize.cs
- ProtocolsSection.cs
- Assembly.cs
- ApplicationException.cs
- WSSecurityPolicy.cs
- HttpApplicationFactory.cs
- TailCallAnalyzer.cs
- SspiHelper.cs
- DateTimeValueSerializerContext.cs
- FormDocumentDesigner.cs
- SelectionBorderGlyph.cs
- PagedDataSource.cs