Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Mapping / StorageComplexPropertyMapping.cs / 1305376 / StorageComplexPropertyMapping.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Text; using System.Data.Metadata.Edm; namespace System.Data.Mapping { ////// Mapping metadata for Complex properties. /// ////// For Example if conceptually you could represent the CS MSL file as following /// --Mapping /// --EntityContainerMapping ( CNorthwind-->SNorthwind ) /// --EntitySetMapping /// --EntityTypeMapping /// --TableMappingFragment /// --EntityKey /// --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) /// --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) /// --EntityTypeMapping /// --TableMappingFragment /// --EntityKey /// --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) /// --ComplexPropertyMap /// --ComplexTypeMapping /// --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) /// --ScalarProperyMap ( CMemberMetadata-->SMemberMetadata ) /// --DiscriminatorProperyMap ( constant value-->SMemberMetadata ) /// --ComplexTypeMapping /// --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) /// --ScalarProperyMap ( CMemberMetadata-->SMemberMetadata ) /// --DiscriminatorProperyMap ( constant value-->SMemberMetadata ) /// --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) /// --AssociationSetMapping /// --AssociationTypeMapping /// --TableMappingFragment /// --EndPropertyMap /// --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) /// --ScalarProperyMap ( CMemberMetadata-->SMemberMetadata ) /// --EndPropertyMap /// --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) /// --EntityContainerMapping ( CMyDatabase-->SMyDatabase ) /// --CompositionSetMapping /// --CompositionTypeMapping /// --TableMappingFragment /// --ParentEntityKey /// --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) /// --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) /// --EntityKey /// --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) /// --ScalarPropertyMap ( CMemberMetadata-->Constant value ) /// --ComplexPropertyMap /// --ComplexTypeMapping /// --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) /// --ScalarProperyMap ( CMemberMetadata-->SMemberMetadata ) /// --ScalarPropertyMap ( CMemberMetadata-->Constant value ) /// This class represents the metadata for all the complex property map elements in the /// above example. ComplexPropertyMaps contain ComplexTypeMaps which define mapping based /// on the type of the ComplexProperty in case of inheritance. /// internal class StorageComplexPropertyMapping : StoragePropertyMapping { #region Constructors ////// Construct a new Complex Property mapping object /// /// The MemberMetadata object that represents this Complex member internal StorageComplexPropertyMapping(EdmProperty cdmMember) : base(cdmMember) { this.m_typeMappings = new List(); } #endregion #region Fields private List m_typeMappings; //Set of type mappings that make up the EdmProperty mapping #endregion #region Properties ///// ///// The property Metadata object for which the mapping is represented. ///// //internal EdmProperty ComplexProperty { // get { // return this.EdmProperty; // } //} ////// TypeMappings that make up this property. /// internal ReadOnlyCollectionTypeMappings { get { return this.m_typeMappings.AsReadOnly(); } } #endregion #region Methods /// /// Add type mapping as a child under this Property Mapping /// /// internal void AddTypeMapping(StorageComplexTypeMapping typeMapping) { this.m_typeMappings.Add(typeMapping); } ////// This method is primarily for debugging purposes. /// Will be removed shortly. /// /// internal override void Print(int index) { StorageEntityContainerMapping.GetPrettyPrintString(ref index); StringBuilder sb = new StringBuilder(); sb.Append("ComplexPropertyMapping"); sb.Append(" "); if (this.EdmProperty != null) { sb.Append("Name:"); sb.Append(this.EdmProperty.Name); sb.Append(" "); } Console.WriteLine(sb.ToString()); foreach (StorageComplexTypeMapping typeMapping in TypeMappings) { typeMapping.Print(index + 5); } } #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RouteData.cs
- OracleMonthSpan.cs
- WaitHandleCannotBeOpenedException.cs
- _FtpDataStream.cs
- FileDialogPermission.cs
- ListMarkerLine.cs
- PrintController.cs
- WebDisplayNameAttribute.cs
- CaretElement.cs
- QilPatternFactory.cs
- GradientBrush.cs
- WebPartDisplayModeCancelEventArgs.cs
- Component.cs
- MulticastDelegate.cs
- Int32RectValueSerializer.cs
- RelationshipSet.cs
- CallbackValidatorAttribute.cs
- SessionEndingCancelEventArgs.cs
- WmfPlaceableFileHeader.cs
- ContainerUtilities.cs
- NegatedCellConstant.cs
- MsmqHostedTransportConfiguration.cs
- WmlTextViewAdapter.cs
- SimpleRecyclingCache.cs
- PrimitiveXmlSerializers.cs
- GridViewRowCollection.cs
- Transform3DGroup.cs
- ClassHandlersStore.cs
- StrokeNodeOperations.cs
- HebrewNumber.cs
- VersionValidator.cs
- ContentValidator.cs
- XmlReaderSettings.cs
- ActivityInterfaces.cs
- EditorAttributeInfo.cs
- PersistChildrenAttribute.cs
- ServiceDescriptions.cs
- EntryIndex.cs
- FontCacheUtil.cs
- StorageComplexTypeMapping.cs
- OleDbMetaDataFactory.cs
- DocumentXPathNavigator.cs
- _AutoWebProxyScriptHelper.cs
- DataObject.cs
- ObjectRef.cs
- LogicalExpr.cs
- JsonXmlDataContract.cs
- SimpleType.cs
- XmlElementElementCollection.cs
- UIElementHelper.cs
- DataViewManager.cs
- Configuration.cs
- FieldBuilder.cs
- InstancePersistenceContext.cs
- WinFormsSecurity.cs
- DynamicQueryStringParameter.cs
- HeaderedContentControl.cs
- ThrowHelper.cs
- Parser.cs
- SequenceDesignerAccessibleObject.cs
- StringInfo.cs
- Soap11ServerProtocol.cs
- DoWorkEventArgs.cs
- HtmlTextArea.cs
- PostBackOptions.cs
- BindingContext.cs
- ScrollChrome.cs
- FontStretches.cs
- WebBrowserPermission.cs
- DataGridrowEditEndingEventArgs.cs
- WebPartManagerInternals.cs
- X509CertificateCollection.cs
- DefaultPropertyAttribute.cs
- ToolStripPanel.cs
- Schema.cs
- ComponentChangingEvent.cs
- SystemUnicastIPAddressInformation.cs
- SoapElementAttribute.cs
- ClientSponsor.cs
- SelectionPatternIdentifiers.cs
- FontUnit.cs
- ForeignKeyFactory.cs
- NotificationContext.cs
- EdmFunction.cs
- InputBinder.cs
- MarkupWriter.cs
- TitleStyle.cs
- ObfuscateAssemblyAttribute.cs
- DynamicControl.cs
- ResourceManagerWrapper.cs
- RayHitTestParameters.cs
- ToolBarButtonDesigner.cs
- XmlAttributeCache.cs
- TrackingStringDictionary.cs
- NegationPusher.cs
- EntityDataSourceColumn.cs
- ComponentSerializationService.cs
- ApplicationDirectoryMembershipCondition.cs
- FileDialog_Vista_Interop.cs
- PerformanceCountersElement.cs