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
- StylusPointPropertyInfoDefaults.cs
- LogLogRecord.cs
- ListenerConnectionModeReader.cs
- Nullable.cs
- DisplayMemberTemplateSelector.cs
- XamlBrushSerializer.cs
- ExceptionUtil.cs
- FreezableCollection.cs
- lengthconverter.cs
- UIElement3D.cs
- ObjectConverter.cs
- SafeRsaProviderHandle.cs
- loginstatus.cs
- SafeThreadHandle.cs
- ProfileServiceManager.cs
- UserPersonalizationStateInfo.cs
- PrintDocument.cs
- ItemCheckEvent.cs
- XmlProcessingInstruction.cs
- Point3DCollection.cs
- Cell.cs
- DataGridViewColumnCollection.cs
- SettingsPropertyIsReadOnlyException.cs
- GlyphElement.cs
- BezierSegment.cs
- CodeMemberMethod.cs
- FreezableCollection.cs
- ReaderOutput.cs
- Icon.cs
- xsdvalidator.cs
- DataColumnMappingCollection.cs
- SelectionBorderGlyph.cs
- LookupNode.cs
- DataServiceConfiguration.cs
- mactripleDES.cs
- WorkflowView.cs
- EventDescriptorCollection.cs
- ButtonBase.cs
- SignatureToken.cs
- SevenBitStream.cs
- XsltQilFactory.cs
- DetailsViewUpdateEventArgs.cs
- TypeInitializationException.cs
- SrgsGrammarCompiler.cs
- ItemChangedEventArgs.cs
- SecurityElement.cs
- CancellationTokenSource.cs
- XmlArrayAttribute.cs
- WinFormsSpinner.cs
- DelegateOutArgument.cs
- MinimizableAttributeTypeConverter.cs
- ColumnWidthChangingEvent.cs
- StreamFormatter.cs
- CaseStatementProjectedSlot.cs
- SqlClientPermission.cs
- SafeNativeMethods.cs
- PolicyValidationException.cs
- RewritingProcessor.cs
- SQLUtility.cs
- TrayIconDesigner.cs
- WebPartMenuStyle.cs
- ExpandableObjectConverter.cs
- EdmRelationshipNavigationPropertyAttribute.cs
- StringToken.cs
- SessionSwitchEventArgs.cs
- XmlSchemaSimpleTypeRestriction.cs
- StructuredCompositeActivityDesigner.cs
- ConsumerConnectionPoint.cs
- TraceEventCache.cs
- WindowsGraphics.cs
- DataViewSettingCollection.cs
- HttpPostedFile.cs
- UpdateRecord.cs
- BinaryObjectReader.cs
- BindingCompleteEventArgs.cs
- BooleanFacetDescriptionElement.cs
- UnmanagedMarshal.cs
- TypefaceCollection.cs
- ResourceDictionary.cs
- DrawingVisual.cs
- ProtocolsConfigurationHandler.cs
- TableHeaderCell.cs
- Menu.cs
- DiagnosticStrings.cs
- AnonymousIdentificationModule.cs
- CalendarAutoFormat.cs
- RijndaelManagedTransform.cs
- AutomationPropertyInfo.cs
- ChooseAction.cs
- ChtmlCalendarAdapter.cs
- StickyNote.cs
- HMACMD5.cs
- DataTableReaderListener.cs
- DataGridViewCellConverter.cs
- SqlDataSourceSelectingEventArgs.cs
- Brush.cs
- ColumnPropertiesGroup.cs
- ToolstripProfessionalRenderer.cs
- IteratorFilter.cs
- SimpleWebHandlerParser.cs