src/Misc/EFTools/EntityDesignEntityDesigner/GeneratedCode/Serializer.cs
/// <summary>
/// This method reads the target role player TargetEntityType.
/// </summary>
/// <remarks>
/// The caller will guarantee that the reader is positioned at the open tag of the first child XML element.
/// This method will read only one target role player instance. The method will skip any child XML element it encounters until it reaches:
/// 1) The open tag of the target role player.
/// 2) The end tag of the parent element (dangling relationship).
/// 3) EOF (dangling relationship).
/// After the call, the reader is positioned at:
/// 1) The open tag of the next child element after the target role player.
/// 2) The end tag of the parent element.
/// 3) EOF.
/// </remarks>
/// <param name="serializationContext">Serialization context.</param>
/// <param name="element">In-memory Inheritance instance that will link to the target EntityType instance.</param>
/// <param name="reader">XmlReader to read serialized data from.</param>
This method reads the target role player TargetEntityType.
This method reads the target role player TargetEntityType .
protected virtual void ReadTargetRolePlayer(DslModeling::SerializationContext serializationContext, DslModeling::ModelElement element, global::System.Xml.XmlReader reader)
		{
			#region Check Parameters
			global::System.Diagnostics.Debug.Assert (serializationContext != null);
			if (serializationContext == null)
				throw new global::System.ArgumentNullException ("serializationContext");
			global::System.Diagnostics.Debug.Assert (element != null);
			if (element == null)
				throw new global::System.ArgumentNullException ("element");
			global::System.Diagnostics.Debug.Assert (reader != null);
			if (reader == null)
				throw new global::System.ArgumentNullException ("reader");
			#endregion
			DslModeling::Moniker targetRoleMoniker = null;
			DslModeling::DomainClassXmlSerializer targetRoleSerializer = serializationContext.Directory.GetSerializer(global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityType.DomainClassId);
			global::System.Diagnostics.Debug.Assert(targetRoleSerializer != null, "Cannot find serializer for EntityType!");
			while (!serializationContext.Result.Failed && !reader.EOF && reader.NodeType == global::System.Xml.XmlNodeType.Element)
			{
				targetRoleMoniker = targetRoleSerializer.TryCreateMonikerInstance(serializationContext, reader, ((global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Inheritance)element).SourceEntityType, global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Inheritance.DomainClassId, element.Partition);
				if (targetRoleMoniker != null)
				{
					DslModeling::DomainRoleInfo.SetRolePlayerMoniker (element as DslModeling::ElementLink, global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Inheritance.TargetEntityTypeDomainRoleId, targetRoleMoniker);
					DslModeling::SerializationUtilities.Skip(reader);
					break;
				}
				MicrosoftDataEntityDesignSerializationBehaviorSerializationMessages.UnexpectedXmlElement(serializationContext, reader);
				DslModeling::SerializationUtilities.Skip(reader);
			}
			if (targetRoleMoniker == null)
			{
				MicrosoftDataEntityDesignSerializationBehaviorSerializationMessages.DanglingRelationship(serializationContext, reader, "Inheritance");
			}
		}
protected virtual void ReadTargetRolePlayer ( DslModeling :: SerializationContext serializationContext , DslModeling :: ModelElement element , global :: System . Xml . XmlReader reader ) { region  Check Parameters global :: System . Diagnostics . Debug . Assert ( serializationContext != null ) ; if ( serializationContext == null ) throw new global :: System . ArgumentNullException ( " " ) ; global :: System . Diagnostics . Debug . Assert ( element != null ) ; if ( element == null ) throw new global :: System . ArgumentNullException ( " " ) ; global :: System . Diagnostics . Debug . Assert ( reader != null ) ; if ( reader == null ) throw new global :: System . ArgumentNullException ( " " ) ; endregion DslModeling :: Moniker targetRoleMoniker = null ; DslModeling :: DomainClassXmlSerializer targetRoleSerializer = serializationContext . Directory . GetSerializer ( global :: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . EntityType . DomainClassId ) ; global :: System . Diagnostics . Debug . Assert ( targetRoleSerializer != null , " " ) ; while ( ! serializationContext . Result . Failed && ! reader . EOF && reader . NodeType == global :: System . Xml . XmlNodeType . Element ) { targetRoleMoniker = targetRoleSerializer . TryCreateMonikerInstance ( serializationContext , reader , ( ( global :: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . Inheritance ) element ) . SourceEntityType , global :: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . Inheritance . DomainClassId , element . Partition ) ; if ( targetRoleMoniker != null ) { DslModeling :: DomainRoleInfo . SetRolePlayerMoniker ( element as DslModeling :: ElementLink , global :: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . Inheritance . TargetEntityTypeDomainRoleId , targetRoleMoniker ) ; DslModeling :: SerializationUtilities . Skip ( reader ) ; break ; } MicrosoftDataEntityDesignSerializationBehaviorSerializationMessages . UnexpectedXmlElement ( serializationContext , reader ) ; DslModeling :: SerializationUtilities . Skip ( reader ) ; } if ( targetRoleMoniker == null ) { MicrosoftDataEntityDesignSerializationBehaviorSerializationMessages . DanglingRelationship ( serializationContext , reader , " " ) ; } }
This method reads the target role player TargetEntityType.
This method reads the target role player TargetEntityType .
// Read the monikerized instance of target role-player TargetEntityType // Attach the target role-player moniker. // Moniker tag has no child XML elements in it, so just skip to the next element. // Encountered one unknown XML element, skip it and keep reading.
serializationContext
DslModeling::SerializationContext
None
element
DslModeling::ModelElement
In-memory Inheritance instance that will link to the target EntityType instance.
In - memory Inheritance instance that will link to the target EntityType instance .
reader
global::System.Xml.XmlReader
XmlReader to read serialized data from.
XmlReader to read serialized data from .
remarks
The caller will guarantee that the reader is positioned at the open tag of the first child XML element.
This method will read only one target role player instance. The method will skip any child XML element it encounters until it reaches:
1) The open tag of the target role player.
2) The end tag of the parent element (dangling relationship).
3) EOF (dangling relationship).
After the call, the reader is positioned at:
1) The open tag of the next child element after the target role player.
2) The end tag of the parent element.
The caller will guarantee that the reader is positioned at the open tag of the first child XML element . This method will read only one target role player instance . The method will skip any child XML element it encounters until it reaches : 1 ) The open tag of the target role player . 2 ) The end tag of the parent element ( dangling relationship ) . 3 ) EOF ( dangling relationship ) . After the call the reader is positioned at : 1 ) The open tag of the next child element after the target role player . 2 ) The end tag of the parent element .