src/Misc/EFTools/EntityDesignEntityDesigner/GeneratedCode/Serializer.cs
/// <summary>
/// Construct the mapping from Moniker Xml tag name to DomainClassInfo that derives from NameableItem.
/// </summary>
/// <param name="serializationContext">Serialization context.</param>
/// <param name="domainDataDirectory">DomainDataDirectory to be used to discover all derived classes.</param>
Construct the mapping from Moniker Xml tag name to DomainClassInfo that derives from NameableItem.
Construct the mapping from Moniker Xml tag name to DomainClassInfo that derives from NameableItem .
private void ConstructDerivedClassMonikersLookupTable(DslModeling::SerializationContext serializationContext, DslModeling::DomainDataDirectory domainDataDirectory)
		{
			global::System.Diagnostics.Debug.Assert(this.derivedClassMonikers == null); 
			this.derivedClassMonikers = new global::System.Collections.Generic.Dictionary<string, DslModeling::DomainClassInfo> (global::System.StringComparer.CurrentCulture);
			DslModeling::DomainClassInfo thisClass = domainDataDirectory.GetDomainClass(global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.NameableItem.DomainClassId);
			global::System.Diagnostics.Debug.Assert(thisClass != null, "Cannot find DomainClassInfo for ModelRoot!");
			global::System.Collections.ObjectModel.ReadOnlyCollection<DslModeling::DomainClassInfo> descendents = thisClass.AllDescendants;
			if (descendents != null)
			{
				foreach (DslModeling::DomainClassInfo descendent in descendents)
				{
					DslModeling::DomainClassXmlSerializer descendentSerializer = serializationContext.Directory.GetSerializer(descendent.Id);
					if (descendentSerializer != null)
					{
						string descendentMonikerTagName = descendentSerializer.MonikerTagName;
						if (!string.IsNullOrEmpty (descendentMonikerTagName))
						{
							global::System.Diagnostics.Debug.Assert(!this.derivedClassMonikers.ContainsKey (descendentMonikerTagName));
							this.derivedClassMonikers.Add (descendentMonikerTagName, descendent);
						}
					}
				}
			}
		}
private void ConstructDerivedClassMonikersLookupTable ( DslModeling :: SerializationContext serializationContext , DslModeling :: DomainDataDirectory domainDataDirectory ) { global :: System . Diagnostics . Debug . Assert ( this . derivedClassMonikers == null ) ; this . derivedClassMonikers = new global :: System . Collections . Generic . Dictionary < string , DslModeling :: DomainClassInfo > ( global :: System . StringComparer . CurrentCulture ) ; DslModeling :: DomainClassInfo thisClass = domainDataDirectory . GetDomainClass ( global :: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . NameableItem . DomainClassId ) ; global :: System . Diagnostics . Debug . Assert ( thisClass != null , " " ) ; global :: System . Collections . ObjectModel . ReadOnlyCollection < DslModeling :: DomainClassInfo > descendents = thisClass . AllDescendants ; if ( descendents != null ) { foreach ( DslModeling :: DomainClassInfo descendent in descendents ) { DslModeling :: DomainClassXmlSerializer descendentSerializer = serializationContext . Directory . GetSerializer ( descendent . Id ) ; if ( descendentSerializer != null ) { string descendentMonikerTagName = descendentSerializer . MonikerTagName ; if ( ! string . IsNullOrEmpty ( descendentMonikerTagName ) ) { global :: System . Diagnostics . Debug . Assert ( ! this . derivedClassMonikers . ContainsKey ( descendentMonikerTagName ) ) ; this . derivedClassMonikers . Add ( descendentMonikerTagName , descendent ) ; } } } } }
Construct the mapping from Moniker Xml tag name to DomainClassInfo that derives from NameableItem.
Construct the mapping from Moniker Xml tag name to DomainClassInfo that derives from NameableItem .
// Shouldn't construct the table more than once.
serializationContext
DslModeling::SerializationContext
None
domainDataDirectory
DslModeling::DomainDataDirectory
DomainDataDirectory to be used to discover all derived classes.
DomainDataDirectory to be used to discover all derived classes .