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 ReadOnlyCollection TypeMappings
{
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
- HttpFileCollection.cs
- _ListenerResponseStream.cs
- CorrelationManager.cs
- SrgsGrammarCompiler.cs
- ParserHooks.cs
- RotationValidation.cs
- CheckBoxStandardAdapter.cs
- DataGridViewCheckBoxColumn.cs
- FormatVersion.cs
- WsdlBuildProvider.cs
- HttpVersion.cs
- ISessionStateStore.cs
- MonitoringDescriptionAttribute.cs
- ContractsBCL.cs
- CodeGen.cs
- OSFeature.cs
- FatalException.cs
- DataControlFieldCollection.cs
- UnaryNode.cs
- OleDbWrapper.cs
- GeneralTransform3DCollection.cs
- ConnectionInterfaceCollection.cs
- SoapReflectionImporter.cs
- SoapObjectWriter.cs
- ConfigXmlElement.cs
- HtmlMobileTextWriter.cs
- SqlCacheDependencyDatabaseCollection.cs
- PtsPage.cs
- DesignTimeParseData.cs
- ObjectDataSourceStatusEventArgs.cs
- IndexedWhereQueryOperator.cs
- DynamicContractTypeBuilder.cs
- UdpUtility.cs
- XamlStyleSerializer.cs
- WebPartEditorOkVerb.cs
- ToolStripDesignerUtils.cs
- TextInfo.cs
- BitmapEffect.cs
- SimpleFileLog.cs
- KeyboardInputProviderAcquireFocusEventArgs.cs
- MessageSecurityProtocol.cs
- PagedDataSource.cs
- SortDescription.cs
- SmtpTransport.cs
- Underline.cs
- OAVariantLib.cs
- QilStrConcat.cs
- InputMethodStateChangeEventArgs.cs
- DbConnectionPoolGroupProviderInfo.cs
- AnimationException.cs
- DbCommandDefinition.cs
- EntityKeyElement.cs
- TextBoxDesigner.cs
- ZipIOModeEnforcingStream.cs
- ConfigXmlDocument.cs
- KnownBoxes.cs
- OdbcParameterCollection.cs
- CallbackValidatorAttribute.cs
- ItemContainerPattern.cs
- XXXInfos.cs
- BridgeDataReader.cs
- HandlerBase.cs
- ZipArchive.cs
- SerializerWriterEventHandlers.cs
- Ops.cs
- FontFamily.cs
- DataBoundControl.cs
- ActiveXContainer.cs
- WebRequestModuleElement.cs
- DescendentsWalker.cs
- ColumnResizeUndoUnit.cs
- MembershipValidatePasswordEventArgs.cs
- SqlConnectionFactory.cs
- WorkflowMarkupSerializationManager.cs
- RegistrationServices.cs
- Package.cs
- EpmContentDeSerializer.cs
- OleDbException.cs
- TransactionProtocolConverter.cs
- FlowDocumentView.cs
- TemplateXamlTreeBuilder.cs
- NativeActivity.cs
- BindUriHelper.cs
- ExceptionValidationRule.cs
- ContentPosition.cs
- ListViewItem.cs
- LocalizationComments.cs
- remotingproxy.cs
- DataPointer.cs
- ToolStripItemRenderEventArgs.cs
- BookmarkScopeHandle.cs
- TemplateControlCodeDomTreeGenerator.cs
- QuestionEventArgs.cs
- SerializationHelper.cs
- _Rfc2616CacheValidators.cs
- TemplateModeChangedEventArgs.cs
- Walker.cs
- WSDualHttpSecurityMode.cs
- PropertyPathWorker.cs
- StandardCommands.cs