src/Misc/EFTools/EntityDesignEntityDesigner/GeneratedCode/Serializer.cs
/// <summary>
/// Calculates a Moniker, given a reference to a EntityType
/// </summary>
/// <param name="serializationContext">Serialization context.</param>
/// <param name="sourceElement">Instance of EntityType that contains the given serialized reference</param>
/// <param name="domainClassId">DomainClassId of the model element that the given moniker string will be resolved to.</param>
/// <param name="monikerString">Serialized string reference to an instance of EntityType</param>
/// <param name="store">Store where the Moniker will be created</param>
/// <returns>A Moniker encapsulating the serialized string reference of EntityType instance</returns>
Calculates a Moniker, given a reference to a EntityType
Calculates a Moniker given a reference to a EntityType
public override DslModeling::Moniker MonikerizeReference(DslModeling::SerializationContext serializationContext, DslModeling::ModelElement sourceElement, global::System.Guid domainClassId, string monikerString, DslModeling::Store store)
		{
			#region Check Parameters
			global::System.Diagnostics.Debug.Assert(serializationContext != null);
			if (serializationContext == null)
				throw new global::System.ArgumentNullException("serializationContext");
			global::System.Diagnostics.Debug.Assert(sourceElement != null);
			if (sourceElement == null)
				throw new global::System.ArgumentNullException ("sourceElement");
			global::System.Diagnostics.Debug.Assert (sourceElement is global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityType, "Expecting an instance of EntityType!");
			global::System.Diagnostics.Debug.Assert (!string.IsNullOrEmpty (monikerString));
			if (string.IsNullOrEmpty (monikerString))
				throw new global::System.ArgumentNullException ("monikerString");
			global::System.Diagnostics.Debug.Assert(store != null);
			if (store == null)
				throw new global::System.ArgumentNullException ("store");
			#endregion
			DslModeling::MonikerKey key = null;
			if (DslModeling::SimpleMonikerResolver.IsFullyQualified(monikerString))
			{
				key = new DslModeling::MonikerKey(monikerString, global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Association.DomainClassId, domainClassId, store);
			}
			else
			{
				DslModeling::DomainClassXmlSerializer sourceSerializer = serializationContext.Directory.GetSerializer(sourceElement.GetDomainClass().Id);
				global::System.Diagnostics.Debug.Assert(sourceSerializer != null, "Cannot find serializer for " + sourceElement.GetDomainClass().Name + "!");
				string sourceQualifier = sourceSerializer.GetMonikerQualifier(serializationContext.Directory, sourceElement);
				key = new DslModeling::MonikerKey(string.Format(global::System.Globalization.CultureInfo.CurrentCulture, "{0}/{1}", sourceQualifier, monikerString), global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Association.DomainClassId, domainClassId, store);
			}
			return new DslModeling::Moniker(key, store);
		}
public override DslModeling :: Moniker MonikerizeReference ( DslModeling :: SerializationContext serializationContext , DslModeling :: ModelElement sourceElement , global :: System . Guid domainClassId , string monikerString , DslModeling :: Store store ) { region  Check Parameters global :: System . Diagnostics . Debug . Assert ( serializationContext != null ) ; if ( serializationContext == null ) throw new global :: System . ArgumentNullException ( " " ) ; global :: System . Diagnostics . Debug . Assert ( sourceElement != null ) ; if ( sourceElement == null ) throw new global :: System . ArgumentNullException ( " " ) ; global :: System . Diagnostics . Debug . Assert ( sourceElement is global :: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . EntityType , " " ) ; global :: System . Diagnostics . Debug . Assert ( ! string . IsNullOrEmpty ( monikerString ) ) ; if ( string . IsNullOrEmpty ( monikerString ) ) throw new global :: System . ArgumentNullException ( " " ) ; global :: System . Diagnostics . Debug . Assert ( store != null ) ; if ( store == null ) throw new global :: System . ArgumentNullException ( " " ) ; endregion DslModeling :: MonikerKey key = null ; if ( DslModeling :: SimpleMonikerResolver . IsFullyQualified ( monikerString ) ) { key = new DslModeling :: MonikerKey ( monikerString , global :: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . Association . DomainClassId , domainClassId , store ) ; } else { DslModeling :: DomainClassXmlSerializer sourceSerializer = serializationContext . Directory . GetSerializer ( sourceElement . GetDomainClass ( ) . Id ) ; global :: System . Diagnostics . Debug . Assert ( sourceSerializer != null , " " + sourceElement . GetDomainClass ( ) . Name + " " ) ; string sourceQualifier = sourceSerializer . GetMonikerQualifier ( serializationContext . Directory , sourceElement ) ; key = new DslModeling :: MonikerKey ( string . Format ( global :: System . Globalization . CultureInfo . CurrentCulture , " " , sourceQualifier , monikerString ) , global :: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . Association . DomainClassId , domainClassId , store ) ; } return new DslModeling :: Moniker ( key , store ) ; }
Calculates a Moniker, given a reference to a EntityType
Calculates a Moniker given a reference to a EntityType
A Moniker encapsulating the serialized string reference of EntityType instance
A Moniker encapsulating the serialized string reference of EntityType instance
serializationContext
DslModeling::SerializationContext
None
sourceElement
DslModeling::ModelElement
Instance of EntityType that contains the given serialized reference
Instance of EntityType that contains the given serialized reference
domainClassId
global::System.Guid
DomainClassId of the model element that the given moniker string will be resolved to.
DomainClassId of the model element that the given moniker string will be resolved to .
monikerString
string
Serialized string reference to an instance of EntityType
Serialized string reference to an instance of EntityType
store
DslModeling::Store
Store where the Moniker will be created
Store where the Moniker will be created