src/Misc/EFTools/EntityDesignEntityDesigner/GeneratedCode/Serializer.cs
/// <summary>
/// This method creates a Moniker of EntityType based on the tag currently pointed by the reader.
/// </summary>
/// <remarks>
/// The caller will guarantee that the reader is positioned at open XML tag of the next element being read. This method should
/// not move the reader; the reader should remain at the same position when this method returns.
/// </remarks>		
/// <param name="serializationContext">Serialization context.</param>
/// <param name="reader">XmlReader to read serialized data from.</param>
/// <param name="sourceRolePlayer">The source role-player instance from which the moniker being created is referenced.</param>
/// <param name="relDomainClassId">The DomainClass Id of the relationship that connects the sourceRolePlayer to the moniker being created.</param>
/// <param name="partition">The new Moniker should be created in the Store associated with this partition.</param>			
/// <returns>Created ModelRoot instance, or null if the reader is not pointing to a correct monikerized instance.</returns>
This method creates a Moniker of EntityType based on the tag currently pointed by the reader.
This method creates a Moniker of EntityType based on the tag currently pointed by the reader .
protected override DslModeling::Moniker CreateMonikerInstance (DslModeling::SerializationContext serializationContext, global::System.Xml.XmlReader reader, DslModeling::ModelElement sourceRolePlayer, global::System.Guid relDomainClassId, DslModeling::Partition partition)
		{
			string monikerString = MicrosoftDataEntityDesignSerializationHelper.Instance.ReadAttribute(serializationContext, sourceRolePlayer, reader, this.MonikerAttributeName);
			if (string.IsNullOrEmpty(monikerString))
			{	
				MicrosoftDataEntityDesignSerializationBehaviorSerializationMessages.MissingMoniker(serializationContext, reader, this.MonikerAttributeName);
				return null;
			}
			try
			{	
				global::System.Guid id = new global::System.Guid(monikerString);
				monikerString = id.ToString("D", global::System.Globalization.CultureInfo.CurrentCulture);
				DslModeling::Moniker result = new DslModeling::Moniker(new DslModeling::MonikerKey(monikerString, relDomainClassId, global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityType.DomainClassId, partition.Store), partition.Store);
				result.Location = serializationContext.Location;
				global::System.Xml.IXmlLineInfo xmlLineInfo = reader as global::System.Xml.IXmlLineInfo;
				if (xmlLineInfo != null)
				{
					result.Line = xmlLineInfo.LineNumber;
					result.Column = xmlLineInfo.LinePosition;
				}
				return result;
			}
			catch (global::System.FormatException )
			{
				MicrosoftDataEntityDesignSerializationBehaviorSerializationMessages.InvalidPropertyValue(serializationContext, reader, this.MonikerAttributeName, typeof(global::System.Guid), monikerString);
				return null;
			}
			catch (global::System.OverflowException )
			{	
				MicrosoftDataEntityDesignSerializationBehaviorSerializationMessages.InvalidPropertyValue(serializationContext, reader, this.MonikerAttributeName, typeof(global::System.Guid), monikerString);
				return null;
			}
		}
protected override DslModeling :: Moniker CreateMonikerInstance ( DslModeling :: SerializationContext serializationContext , global :: System . Xml . XmlReader reader , DslModeling :: ModelElement sourceRolePlayer , global :: System . Guid relDomainClassId , DslModeling :: Partition partition ) { string monikerString = MicrosoftDataEntityDesignSerializationHelper . Instance . ReadAttribute ( serializationContext , sourceRolePlayer , reader , this . MonikerAttributeName ) ; if ( string . IsNullOrEmpty ( monikerString ) ) { MicrosoftDataEntityDesignSerializationBehaviorSerializationMessages . MissingMoniker ( serializationContext , reader , this . MonikerAttributeName ) ; return null ; } try { global :: System . Guid id = new global :: System . Guid ( monikerString ) ; monikerString = id . ToString ( " " , global :: System . Globalization . CultureInfo . CurrentCulture ) ; DslModeling :: Moniker result = new DslModeling :: Moniker ( new DslModeling :: MonikerKey ( monikerString , relDomainClassId , global :: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . EntityType . DomainClassId , partition . Store ) , partition . Store ) ; result . Location = serializationContext . Location ; global :: System . Xml . IXmlLineInfo xmlLineInfo = reader as global :: System . Xml . IXmlLineInfo ; if ( xmlLineInfo != null ) { result . Line = xmlLineInfo . LineNumber ; result . Column = xmlLineInfo . LinePosition ; } return result ; } catch ( global :: System . FormatException ) { MicrosoftDataEntityDesignSerializationBehaviorSerializationMessages . InvalidPropertyValue ( serializationContext , reader , this . MonikerAttributeName , typeof ( global :: System . Guid ) , monikerString ) ; return null ; } catch ( global :: System . OverflowException ) { MicrosoftDataEntityDesignSerializationBehaviorSerializationMessages . InvalidPropertyValue ( serializationContext , reader , this . MonikerAttributeName , typeof ( global :: System . Guid ) , monikerString ) ; return null ; } }
This method creates a Moniker of EntityType based on the tag currently pointed by the reader.
This method creates a Moniker of EntityType based on the tag currently pointed by the reader .
// Normalize the Id. // Set location info if possible. /* fEx */ /* oEx */
Created ModelRoot instance, or null if the reader is not pointing to a correct monikerized instance.
Created ModelRoot instance or null if the reader is not pointing to a correct monikerized instance .
serializationContext
DslModeling::SerializationContext
None
reader
global::System.Xml.XmlReader
XmlReader to read serialized data from.
XmlReader to read serialized data from .
sourceRolePlayer
DslModeling::ModelElement
The source role-player instance from which the moniker being created is referenced.
The source role - player instance from which the moniker being created is referenced .
relDomainClassId
global::System.Guid
The DomainClass Id of the relationship that connects the sourceRolePlayer to the moniker being created.
The DomainClass Id of the relationship that connects the sourceRolePlayer to the moniker being created .
partition
DslModeling::Partition
The new Moniker should be created in the Store associated with this partition.
The new Moniker should be created in the Store associated with this partition .
remarks
The caller will guarantee that the reader is positioned at open XML tag of the next element being read. This method should
not move the reader; the reader should remain at the same position when this method returns.
The caller will guarantee that the reader is positioned at open XML tag of the next element being read . This method should not move the reader ; the reader should remain at the same position when this method returns .