Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Mapping / StorageEndPropertyMapping.cs / 1305376 / StorageEndPropertyMapping.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Data.Metadata.Edm; namespace System.Data.Mapping { ////// Mapping metadata for End property of an association. /// ////// 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 end property map elements in the /// above example. EndPropertyMaps provide mapping for each end of the association. /// internal class StorageEndPropertyMapping : StoragePropertyMapping { #region Constructors ////// Construct a new End Property mapping object /// /// internal StorageEndPropertyMapping(EdmProperty member) : base(member) { } #endregion #region Fields Listm_properties = new List (); //list of property mappings that make up the End RelationshipEndMember m_endMember = null; #endregion #region Properties /// /// return ReadOnlyCollection of property mappings that are children of this End mapping /// internal ReadOnlyCollectionProperties { get { return this.m_properties.AsReadOnly(); } } /// /// The relation end property Metadata object for which the mapping is represented. /// internal RelationshipEndMember EndMember { get { return this.m_endMember; } set { this.m_endMember = value; } } ////// Returns all store properties that are mapped under this mapping fragment /// internal IEnumerableStoreProperties { get { return m_properties.OfType ().Select((propertyMap => propertyMap.ColumnProperty)).Cast (); } } #endregion #region Methods /// /// Add a property mapping as a child of End property mapping /// /// internal void AddProperty(StoragePropertyMapping prop) { this.m_properties.Add(prop); } ////// 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("EndPropertyMapping"); sb.Append(" "); if (this.EndMember != null) { sb.Append("Name:"); sb.Append(this.EndMember.Name); sb.Append(" "); sb.Append("TypeName:"); sb.Append(this.EndMember.TypeUsage.EdmType.FullName); } sb.Append(" "); Console.WriteLine(sb.ToString()); foreach (StoragePropertyMapping propertyMapping in Properties) { propertyMapping.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.Collections.ObjectModel; using System.Linq; using System.Text; using System.Data.Metadata.Edm; namespace System.Data.Mapping { ////// Mapping metadata for End property of an association. /// ////// 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 end property map elements in the /// above example. EndPropertyMaps provide mapping for each end of the association. /// internal class StorageEndPropertyMapping : StoragePropertyMapping { #region Constructors ////// Construct a new End Property mapping object /// /// internal StorageEndPropertyMapping(EdmProperty member) : base(member) { } #endregion #region Fields Listm_properties = new List (); //list of property mappings that make up the End RelationshipEndMember m_endMember = null; #endregion #region Properties /// /// return ReadOnlyCollection of property mappings that are children of this End mapping /// internal ReadOnlyCollectionProperties { get { return this.m_properties.AsReadOnly(); } } /// /// The relation end property Metadata object for which the mapping is represented. /// internal RelationshipEndMember EndMember { get { return this.m_endMember; } set { this.m_endMember = value; } } ////// Returns all store properties that are mapped under this mapping fragment /// internal IEnumerableStoreProperties { get { return m_properties.OfType ().Select((propertyMap => propertyMap.ColumnProperty)).Cast (); } } #endregion #region Methods /// /// Add a property mapping as a child of End property mapping /// /// internal void AddProperty(StoragePropertyMapping prop) { this.m_properties.Add(prop); } ////// 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("EndPropertyMapping"); sb.Append(" "); if (this.EndMember != null) { sb.Append("Name:"); sb.Append(this.EndMember.Name); sb.Append(" "); sb.Append("TypeName:"); sb.Append(this.EndMember.TypeUsage.EdmType.FullName); } sb.Append(" "); Console.WriteLine(sb.ToString()); foreach (StoragePropertyMapping propertyMapping in Properties) { propertyMapping.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
- SrgsElementFactoryCompiler.cs
- PkcsUtils.cs
- AssemblyNameUtility.cs
- SafeThemeHandle.cs
- DataBoundControlHelper.cs
- TreeView.cs
- VariableDesigner.xaml.cs
- RotationValidation.cs
- RouteUrlExpressionBuilder.cs
- RemotingConfiguration.cs
- WeakReferenceKey.cs
- CodeDOMUtility.cs
- OledbConnectionStringbuilder.cs
- MissingMemberException.cs
- DynamicMetaObject.cs
- WebPartExportVerb.cs
- TextEditorCharacters.cs
- NeutralResourcesLanguageAttribute.cs
- XPathPatternBuilder.cs
- ConnectionStringsExpressionBuilder.cs
- ScaleTransform.cs
- ListChangedEventArgs.cs
- ErrorsHelper.cs
- PropertyDescriptorComparer.cs
- Trace.cs
- ReachPageContentSerializer.cs
- EditorServiceContext.cs
- LassoHelper.cs
- SqlNotificationRequest.cs
- RoleGroup.cs
- Helpers.cs
- XamlPoint3DCollectionSerializer.cs
- FrameworkRichTextComposition.cs
- ListViewHitTestInfo.cs
- FixedFlowMap.cs
- BCLDebug.cs
- EpmContentDeSerializer.cs
- SpeechDetectedEventArgs.cs
- ClientUIRequest.cs
- TraceContextEventArgs.cs
- PlaceHolder.cs
- IPEndPointCollection.cs
- SqlProfileProvider.cs
- ErrorTableItemStyle.cs
- ToolStripGrip.cs
- EditingCommands.cs
- DateTimeFormatInfo.cs
- GetPageNumberCompletedEventArgs.cs
- CalendarItem.cs
- Utility.cs
- ScrollBar.cs
- Atom10FormatterFactory.cs
- DocumentScope.cs
- ContainerFilterService.cs
- PathSegmentCollection.cs
- SchemaDeclBase.cs
- _UncName.cs
- CellParagraph.cs
- ObjectKeyFrameCollection.cs
- DecimalAnimation.cs
- PointConverter.cs
- UnSafeCharBuffer.cs
- GlyphRunDrawing.cs
- HttpChannelBindingToken.cs
- ToolTipService.cs
- ColorDialog.cs
- Behavior.cs
- InputBinding.cs
- AppLevelCompilationSectionCache.cs
- ObjectDataSourceMethodEditor.cs
- WorkerRequest.cs
- ChannelBinding.cs
- ApplicationInterop.cs
- SapiRecognizer.cs
- Application.cs
- DefaultWorkflowSchedulerService.cs
- SendMailErrorEventArgs.cs
- BatchParser.cs
- LabelAutomationPeer.cs
- StreamHelper.cs
- MobileUserControl.cs
- CodeIndexerExpression.cs
- OutputCacheSection.cs
- FileUtil.cs
- DateTimeFormatInfo.cs
- ParseChildrenAsPropertiesAttribute.cs
- formatstringdialog.cs
- ControlBuilder.cs
- Instrumentation.cs
- CompositeScriptReference.cs
- ListBoxItem.cs
- WebPartsSection.cs
- ImageIndexConverter.cs
- AutoResizedEvent.cs
- CatalogPart.cs
- CheckedListBox.cs
- SqlParameterizer.cs
- HttpStreamFormatter.cs
- GcSettings.cs
- CollectionChangeEventArgs.cs