Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / DataEntity / System / Data / Mapping / StorageEndPropertyMapping.cs / 2 / StorageEndPropertyMapping.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....],[....] //--------------------------------------------------------------------- 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 Dictionarym_properties = new Dictionary (StringComparer.Ordinal); //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 new List (this.m_properties.Values).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.Values.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.EdmProperty.Name, 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 [....],[....] //--------------------------------------------------------------------- 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 Dictionarym_properties = new Dictionary (StringComparer.Ordinal); //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 new List (this.m_properties.Values).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.Values.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.EdmProperty.Name, 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
- WindowsNonControl.cs
- PriorityQueue.cs
- PersonalizationStateQuery.cs
- AppSettings.cs
- AdjustableArrowCap.cs
- SqlCommandBuilder.cs
- ListViewUpdateEventArgs.cs
- CompoundFileIOPermission.cs
- QueueProcessor.cs
- SecurityDocument.cs
- WorkflowInstanceExtensionCollection.cs
- ProxyFragment.cs
- FixedSOMTable.cs
- AddressingVersion.cs
- ScaleTransform3D.cs
- SessionParameter.cs
- MSHTMLHost.cs
- DispatcherHooks.cs
- BamlBinaryReader.cs
- AspNetHostingPermission.cs
- SystemWebCachingSectionGroup.cs
- ALinqExpressionVisitor.cs
- HttpCacheParams.cs
- BinaryExpression.cs
- WbemProvider.cs
- MinMaxParagraphWidth.cs
- CapabilitiesState.cs
- AdornerLayer.cs
- Descriptor.cs
- ContentIterators.cs
- TemplatedWizardStep.cs
- IsolatedStorage.cs
- SortedList.cs
- XmlSerializerNamespaces.cs
- Hyperlink.cs
- WpfGeneratedKnownTypes.cs
- ComponentDispatcher.cs
- SessionState.cs
- ParentControlDesigner.cs
- SkipStoryboardToFill.cs
- VisualBrush.cs
- ProtocolsConfigurationHandler.cs
- ProfileProvider.cs
- ErrorView.xaml.cs
- NativeMethodsCLR.cs
- AttributeEmitter.cs
- RowParagraph.cs
- QilScopedVisitor.cs
- XmlArrayItemAttributes.cs
- XmlQueryOutput.cs
- HttpHandlerAction.cs
- DbParameterHelper.cs
- InstanceDescriptor.cs
- ContourSegment.cs
- TypeCollectionPropertyEditor.cs
- TextPatternIdentifiers.cs
- InertiaTranslationBehavior.cs
- MutexSecurity.cs
- MapPathBasedVirtualPathProvider.cs
- ScriptingProfileServiceSection.cs
- MultipartIdentifier.cs
- FrameworkContextData.cs
- StatusBarDesigner.cs
- CompressedStack.cs
- DataControlField.cs
- NegationPusher.cs
- AddingNewEventArgs.cs
- QueryOperationResponseOfT.cs
- AbstractExpressions.cs
- BaseCodeDomTreeGenerator.cs
- CharEntityEncoderFallback.cs
- IgnoreSectionHandler.cs
- input.cs
- ErrorEventArgs.cs
- AtomEntry.cs
- MimeXmlReflector.cs
- Win32PrintDialog.cs
- TrackingStringDictionary.cs
- ReadOnlyObservableCollection.cs
- SplitterCancelEvent.cs
- MetadataArtifactLoaderFile.cs
- ObjectStateEntryDbDataRecord.cs
- EntityTransaction.cs
- CallId.cs
- DefaultAssemblyResolver.cs
- ControlIdConverter.cs
- WorkflowRuntimeSection.cs
- Figure.cs
- OutOfMemoryException.cs
- Rect.cs
- BinarySecretKeyIdentifierClause.cs
- SchemaImporterExtension.cs
- InheritedPropertyChangedEventArgs.cs
- CultureMapper.cs
- SettingsPropertyValue.cs
- ServiceOperationParameter.cs
- GlyphRunDrawing.cs
- TextEditorDragDrop.cs
- KeyFrames.cs
- EntityDataSourceContextCreatingEventArgs.cs