Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Base / System / Windows / Markup / Primitives / MarkupObject.cs / 1305600 / MarkupObject.cs
//------------------------------------------------------------------------ // // Microsoft Windows Client Platform // Copyright (C) Microsoft Corporation, 2005 // // File: MarkupObject.cs // // Contents: API for iterating a tree of objects for serialization // // Created: 04/28/2005 [....] // //----------------------------------------------------------------------- using System; using System.ComponentModel; using System.Collections.Generic; using System.Reflection; using System.Text; using System.Windows.Markup; using MS.Internal.WindowsBase; namespace System.Windows.Markup.Primitives { ////// An enumeration class used by serialization to walk the a tree of objects. Markupobject's represent objects /// and using XML based serialization they would be written as elements. /// public abstract class MarkupObject { ////// Prevent external specialization /// [FriendAccessAllowed] // Used by ElementMarkupObject and others in Framework internal MarkupObject() { } ////// The CLR type for the object. For example, an item representing a Button would return the equivilient of /// typeof(System.Windows.Button). /// public abstract Type ObjectType { get; } ////// The instance of the object represented by the this MarkupObject. The type of the object might not be /// ObjectType if the instance represents a factory creating instances of type ObjectType. /// public abstract object Instance { get; } ////// An enumeration the items properties. Only properties that have significant (serializable) properties are /// returned. Properties that have their default value, or are otherwise not visible to serialization, are not /// returned. /// /// The first 0 to N properties returned by the Properties enumeration might have the IsConstructorArgument /// set. These properties should be used as the parameters to the ItemType's constructor with N parameters. If /// the first property doesn't have the IsConstructorArgument set, the default constructor of the ItemType /// should be used. /// /// If the MarkupItem is in a dictionary, one of the properties of the item will have an IsKey set to true. /// This is the value for the dictionary key. /// public virtual IEnumerableProperties { get { return GetProperties(true /*mapToConstructorArgs*/); } } internal abstract IEnumerable GetProperties(bool mapToConstructorArgs); /// /// Assigns a root context to use for ValueSerializer's that are used to return, for example, the string value /// of a property or key. All value serializaers will be looked up via this context if present. /// /// /// The context that will be passed to ValueSerializer's and TypeConverter's when converting text to a string /// public abstract void AssignRootContext(IValueSerializerContext context); ////// The attributes associated with the markup item. /// public abstract AttributeCollection Attributes { get; } } } // 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: MarkupObject.cs // // Contents: API for iterating a tree of objects for serialization // // Created: 04/28/2005 [....] // //----------------------------------------------------------------------- using System; using System.ComponentModel; using System.Collections.Generic; using System.Reflection; using System.Text; using System.Windows.Markup; using MS.Internal.WindowsBase; namespace System.Windows.Markup.Primitives { ////// An enumeration class used by serialization to walk the a tree of objects. Markupobject's represent objects /// and using XML based serialization they would be written as elements. /// public abstract class MarkupObject { ////// Prevent external specialization /// [FriendAccessAllowed] // Used by ElementMarkupObject and others in Framework internal MarkupObject() { } ////// The CLR type for the object. For example, an item representing a Button would return the equivilient of /// typeof(System.Windows.Button). /// public abstract Type ObjectType { get; } ////// The instance of the object represented by the this MarkupObject. The type of the object might not be /// ObjectType if the instance represents a factory creating instances of type ObjectType. /// public abstract object Instance { get; } ////// An enumeration the items properties. Only properties that have significant (serializable) properties are /// returned. Properties that have their default value, or are otherwise not visible to serialization, are not /// returned. /// /// The first 0 to N properties returned by the Properties enumeration might have the IsConstructorArgument /// set. These properties should be used as the parameters to the ItemType's constructor with N parameters. If /// the first property doesn't have the IsConstructorArgument set, the default constructor of the ItemType /// should be used. /// /// If the MarkupItem is in a dictionary, one of the properties of the item will have an IsKey set to true. /// This is the value for the dictionary key. /// public virtual IEnumerableProperties { get { return GetProperties(true /*mapToConstructorArgs*/); } } internal abstract IEnumerable GetProperties(bool mapToConstructorArgs); /// /// Assigns a root context to use for ValueSerializer's that are used to return, for example, the string value /// of a property or key. All value serializaers will be looked up via this context if present. /// /// /// The context that will be passed to ValueSerializer's and TypeConverter's when converting text to a string /// public abstract void AssignRootContext(IValueSerializerContext context); ////// The attributes associated with the markup item. /// public abstract AttributeCollection Attributes { get; } } } // 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
- RemotingServices.cs
- RegisteredArrayDeclaration.cs
- WorkflowQueue.cs
- EventLogEntry.cs
- HttpPostClientProtocol.cs
- MonthCalendar.cs
- ConnectionManagementElementCollection.cs
- QueryOperatorEnumerator.cs
- PathFigure.cs
- ContentControl.cs
- InkCollectionBehavior.cs
- CodeGroup.cs
- StringOutput.cs
- SqlDataSourceCommandEventArgs.cs
- CFStream.cs
- wgx_render.cs
- IssuedTokenClientBehaviorsElementCollection.cs
- Scene3D.cs
- RtfToken.cs
- IconBitmapDecoder.cs
- MergeFailedEvent.cs
- DataGridViewCellEventArgs.cs
- Condition.cs
- DataTableReaderListener.cs
- DesignerSerializerAttribute.cs
- CharEntityEncoderFallback.cs
- ZipIOLocalFileHeader.cs
- ZoneLinkButton.cs
- TextOnlyOutput.cs
- ProbeMatchesMessageCD1.cs
- DispatcherProcessingDisabled.cs
- EpmTargetPathSegment.cs
- RotateTransform.cs
- ColorAnimationUsingKeyFrames.cs
- SpeechRecognitionEngine.cs
- MessageQueuePermissionAttribute.cs
- BitmapEffectState.cs
- PackageRelationship.cs
- StructuralCache.cs
- ModelItemExtensions.cs
- IItemProperties.cs
- SubMenuStyleCollection.cs
- ColorDialog.cs
- ExpressionBuilder.cs
- NativeMethods.cs
- DBConnection.cs
- MethodImplAttribute.cs
- ListViewGroupItemCollection.cs
- DataError.cs
- SchemaType.cs
- _ConnectionGroup.cs
- SAPICategories.cs
- ToggleButton.cs
- SchemaCollectionCompiler.cs
- FixedSOMTextRun.cs
- Pair.cs
- DbgUtil.cs
- ExpressionVisitorHelpers.cs
- CacheOutputQuery.cs
- StrongNameUtility.cs
- BitmapEncoder.cs
- TextLineResult.cs
- Point.cs
- SortQueryOperator.cs
- ArrayTypeMismatchException.cs
- XmlComplianceUtil.cs
- ObjectDataSourceSelectingEventArgs.cs
- BookmarkScope.cs
- OleDbPropertySetGuid.cs
- DisableDpiAwarenessAttribute.cs
- TransactionBehavior.cs
- Optimizer.cs
- RectAnimationUsingKeyFrames.cs
- WebControlParameterProxy.cs
- PipeException.cs
- MergeFailedEvent.cs
- AnnotationResourceCollection.cs
- PageContentCollection.cs
- CompilerWrapper.cs
- DecoderBestFitFallback.cs
- CalendarItem.cs
- ListCollectionView.cs
- PtsPage.cs
- Expression.cs
- ToolBarButtonDesigner.cs
- SharedUtils.cs
- ResXResourceReader.cs
- SrgsDocumentParser.cs
- UnionExpr.cs
- TextSpan.cs
- GridViewCancelEditEventArgs.cs
- SiteOfOriginContainer.cs
- LocalsItemDescription.cs
- ThumbButtonInfoCollection.cs
- Table.cs
- TextTreeTextElementNode.cs
- OpenTypeCommon.cs
- PreloadedPackages.cs
- Freezable.cs
- XsltContext.cs