Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Mapping / StorageAssociationSetMapping.cs / 1305376 / StorageAssociationSetMapping.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Text; using System.Linq; using System.Data.Metadata.Edm; namespace System.Data.Mapping { ////// Represents the Mapping metadata for an AssociationSet in CS space. /// ////// For Example if conceptually you could represent the CS MSL file as following /// --Mapping /// --EntityContainerMapping ( CNorthwind-->SNorthwind ) /// --EntitySetMapping /// --EntityTypeMapping /// --TableMappingFragment /// --EntityTypeMapping /// --TableMappingFragment /// --AssociationSetMapping /// --AssociationTypeMapping /// --TableMappingFragment /// --EntityContainerMapping ( CMyDatabase-->SMyDatabase ) /// --CompositionSetMapping /// --CompositionTypeMapping /// This class represents the metadata for the AssociationSetMapping elements in the /// above example. And it is possible to access the AssociationTypeMap underneath it. /// There will be only one TypeMap under AssociationSetMap. /// internal class StorageAssociationSetMapping : StorageSetMapping { #region Constructors ////// Construct a new AssociationSetMapping object /// /// Represents the Association Set Metadata object. Will /// change this to Extent instead of MemberMetadata. /// The entityContainerMapping mapping that contains this Set mapping internal StorageAssociationSetMapping(AssociationSet extent, StorageEntityContainerMapping entityContainerMapping) : base(extent, entityContainerMapping) { } #endregion #region Fields private StorageAssociationSetFunctionMapping m_functionMapping; #endregion #region Properties ////////// The RealtionshipSet Metadata object for which the mapping is represented. ///// //internal AssociationSet AssociationSet { // get { // return this.Set as AssociationSet; // } //} ////// Gets or sets function mapping information for this association set. May be null. /// internal StorageAssociationSetFunctionMapping FunctionMapping { get { return m_functionMapping; } set { m_functionMapping = value; } } internal EntitySetBase StoreEntitySet { get { if ((this.TypeMappings.Count != 0) && (this.TypeMappings.First().MappingFragments.Count != 0)) { return this.TypeMappings.First().MappingFragments.First().TableSet; } return null; } } #endregion #region Methods ////// 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("AssociationSetMapping"); sb.Append(" "); sb.Append("Name:"); sb.Append(this.Set.Name); if (this.QueryView != null) { sb.Append(" "); sb.Append("Query View:"); sb.Append(this.QueryView); } Console.WriteLine(sb.ToString()); foreach (StorageTypeMapping typeMapping in TypeMappings) { typeMapping.Print(index + 5); } if(m_functionMapping != null) { m_functionMapping.Print(index + 5); } } #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Text; using System.Linq; using System.Data.Metadata.Edm; namespace System.Data.Mapping { ////// Represents the Mapping metadata for an AssociationSet in CS space. /// ////// For Example if conceptually you could represent the CS MSL file as following /// --Mapping /// --EntityContainerMapping ( CNorthwind-->SNorthwind ) /// --EntitySetMapping /// --EntityTypeMapping /// --TableMappingFragment /// --EntityTypeMapping /// --TableMappingFragment /// --AssociationSetMapping /// --AssociationTypeMapping /// --TableMappingFragment /// --EntityContainerMapping ( CMyDatabase-->SMyDatabase ) /// --CompositionSetMapping /// --CompositionTypeMapping /// This class represents the metadata for the AssociationSetMapping elements in the /// above example. And it is possible to access the AssociationTypeMap underneath it. /// There will be only one TypeMap under AssociationSetMap. /// internal class StorageAssociationSetMapping : StorageSetMapping { #region Constructors ////// Construct a new AssociationSetMapping object /// /// Represents the Association Set Metadata object. Will /// change this to Extent instead of MemberMetadata. /// The entityContainerMapping mapping that contains this Set mapping internal StorageAssociationSetMapping(AssociationSet extent, StorageEntityContainerMapping entityContainerMapping) : base(extent, entityContainerMapping) { } #endregion #region Fields private StorageAssociationSetFunctionMapping m_functionMapping; #endregion #region Properties ////////// The RealtionshipSet Metadata object for which the mapping is represented. ///// //internal AssociationSet AssociationSet { // get { // return this.Set as AssociationSet; // } //} ////// Gets or sets function mapping information for this association set. May be null. /// internal StorageAssociationSetFunctionMapping FunctionMapping { get { return m_functionMapping; } set { m_functionMapping = value; } } internal EntitySetBase StoreEntitySet { get { if ((this.TypeMappings.Count != 0) && (this.TypeMappings.First().MappingFragments.Count != 0)) { return this.TypeMappings.First().MappingFragments.First().TableSet; } return null; } } #endregion #region Methods ////// 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("AssociationSetMapping"); sb.Append(" "); sb.Append("Name:"); sb.Append(this.Set.Name); if (this.QueryView != null) { sb.Append(" "); sb.Append("Query View:"); sb.Append(this.QueryView); } Console.WriteLine(sb.ToString()); foreach (StorageTypeMapping typeMapping in TypeMappings) { typeMapping.Print(index + 5); } if(m_functionMapping != null) { m_functionMapping.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
- AlphabeticalEnumConverter.cs
- SingleConverter.cs
- exports.cs
- Point3DValueSerializer.cs
- DataGridCell.cs
- ViewSimplifier.cs
- TextBoxLine.cs
- OdbcConnectionString.cs
- SqlCacheDependencyDatabase.cs
- TableAutomationPeer.cs
- DataListItemCollection.cs
- WebPartHeaderCloseVerb.cs
- DesignTimeTemplateParser.cs
- XsltSettings.cs
- FieldNameLookup.cs
- FunctionImportMapping.cs
- StorageInfo.cs
- SqlCrossApplyToCrossJoin.cs
- ForeignKeyFactory.cs
- GPPOINTF.cs
- SqlDataReaderSmi.cs
- CodePageUtils.cs
- NonceToken.cs
- StringPropertyBuilder.cs
- BindableTemplateBuilder.cs
- OutputCacheSettings.cs
- RestClientProxyHandler.cs
- DirectoryInfo.cs
- QilIterator.cs
- BevelBitmapEffect.cs
- ChangeProcessor.cs
- BinaryFormatter.cs
- HttpVersion.cs
- DesignerOptions.cs
- MaterializeFromAtom.cs
- SupportsEventValidationAttribute.cs
- GrammarBuilderPhrase.cs
- StringKeyFrameCollection.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- MemoryPressure.cs
- ErrorHandler.cs
- XamlTreeBuilderBamlRecordWriter.cs
- BamlRecordHelper.cs
- CompositeScriptReference.cs
- CreatingCookieEventArgs.cs
- SkinBuilder.cs
- CodeMethodInvokeExpression.cs
- FileDialog.cs
- ThrowHelper.cs
- CommonRemoteMemoryBlock.cs
- NamedPipeChannelListener.cs
- MultiSelector.cs
- SchemaComplexType.cs
- XmlSchemaAny.cs
- CodeVariableReferenceExpression.cs
- HttpBindingExtension.cs
- DirectoryGroupQuery.cs
- XmlDictionaryReaderQuotas.cs
- FactoryId.cs
- XmlImplementation.cs
- MenuCommands.cs
- MultiPropertyDescriptorGridEntry.cs
- DataService.cs
- ProgressBar.cs
- Serializer.cs
- SafeViewOfFileHandle.cs
- MatrixTransform3D.cs
- TypedDataSourceCodeGenerator.cs
- StorageMappingItemCollection.cs
- Accessible.cs
- OpacityConverter.cs
- PassportAuthenticationEventArgs.cs
- DescendentsWalkerBase.cs
- RemoteWebConfigurationHostServer.cs
- AssociationSet.cs
- PlanCompilerUtil.cs
- KnowledgeBase.cs
- QilXmlReader.cs
- CompareInfo.cs
- TransformerConfigurationWizardBase.cs
- NextPreviousPagerField.cs
- StreamInfo.cs
- WebHttpBinding.cs
- InvalidOperationException.cs
- WorkerRequest.cs
- WebPartCatalogAddVerb.cs
- OleStrCAMarshaler.cs
- FormViewInsertEventArgs.cs
- CounterCreationData.cs
- OracleDateTime.cs
- AuthenticationException.cs
- RolePrincipal.cs
- Span.cs
- AttributeProviderAttribute.cs
- MonthCalendarDesigner.cs
- Matrix3D.cs
- SamlAudienceRestrictionCondition.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- assemblycache.cs
- CacheManager.cs