src/Misc/EFTools/EntityDesignEntityDesigner/GeneratedCode/DomainModel.cs
/// <summary>
/// Creates an element link of specified type.
/// </summary>
/// <param name="partition">Partition where element is to be created.</param>
/// <param name="elementLinkType">Element link type which belongs to this domain model.</param>
/// <param name="roleAssignments">List of relationship role assignments for the new link.</param>
/// <param name="propertyAssignments">New element property assignments.</param>
/// <returns>Created element link.</returns>
Creates an element link of specified type.
Creates an element link of specified type .
public sealed override DslModeling::ElementLink CreateElementLink(DslModeling::Partition partition, global::System.Type elementLinkType, DslModeling::RoleAssignment[] roleAssignments, DslModeling::PropertyAssignment[] propertyAssignments)
		{
			if (elementLinkType == null) throw new global::System.ArgumentNullException("elementLinkType");
			if (roleAssignments == null) throw new global::System.ArgumentNullException("roleAssignments");
			if (createElementLinkMap == null)
			{
				createElementLinkMap = new global::System.Collections.Generic.Dictionary<global::System.Type, int>(5);
				createElementLinkMap.Add(typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityTypeHasProperties), 0);
				createElementLinkMap.Add(typeof(EntityDesignerViewModelHasEntityTypes), 1);
				createElementLinkMap.Add(typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Association), 2);
				createElementLinkMap.Add(typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityTypeHasNavigationProperties), 3);
				createElementLinkMap.Add(typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Inheritance), 4);
			}
			int index;
			if (!createElementLinkMap.TryGetValue(elementLinkType, out index))
			{
				string exceptionError = string.Format(
								global::System.Globalization.CultureInfo.CurrentCulture,
								global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel.SingletonResourceManager.GetString("UnrecognizedElementLinkType"),
								elementLinkType.Name);
				throw new global::System.ArgumentException(exceptionError, "elementLinkType");
			}
			switch (index)
			{
				case 0: return new global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityTypeHasProperties(partition, roleAssignments, propertyAssignments);
				case 1: return new EntityDesignerViewModelHasEntityTypes(partition, roleAssignments, propertyAssignments);
				case 2: return new global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Association(partition, roleAssignments, propertyAssignments);
				case 3: return new global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityTypeHasNavigationProperties(partition, roleAssignments, propertyAssignments);
				case 4: return new global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Inheritance(partition, roleAssignments, propertyAssignments);
				default: return null;
			}
		}
public sealed override DslModeling :: ElementLink CreateElementLink ( DslModeling :: Partition partition , global :: System . Type elementLinkType , DslModeling :: RoleAssignment [ ] roleAssignments , DslModeling :: PropertyAssignment [ ] propertyAssignments ) { if ( elementLinkType == null ) throw new global :: System . ArgumentNullException ( " " ) ; if ( roleAssignments == null ) throw new global :: System . ArgumentNullException ( " " ) ; if ( createElementLinkMap == null ) { createElementLinkMap = new global :: System . Collections . Generic . Dictionary < global :: System . Type , int > ( 5 ) ; createElementLinkMap . Add ( typeof ( global :: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . EntityTypeHasProperties ) , 0 ) ; createElementLinkMap . Add ( typeof ( EntityDesignerViewModelHasEntityTypes ) , 1 ) ; createElementLinkMap . Add ( typeof ( global :: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . Association ) , 2 ) ; createElementLinkMap . Add ( typeof ( global :: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . EntityTypeHasNavigationProperties ) , 3 ) ; createElementLinkMap . Add ( typeof ( global :: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . Inheritance ) , 4 ) ; } int index ; if ( ! createElementLinkMap . TryGetValue ( elementLinkType , out index ) ) { string exceptionError = string . Format ( global :: System . Globalization . CultureInfo . CurrentCulture , global :: Microsoft . Data . Entity . Design . EntityDesigner . MicrosoftDataEntityDesignDomainModel . SingletonResourceManager . GetString ( " " ) , elementLinkType . Name ) ; throw new global :: System . ArgumentException ( exceptionError , " " ) ; } switch ( index ) { case 0 : return new global :: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . EntityTypeHasProperties ( partition , roleAssignments , propertyAssignments ) ; case 1 : return new EntityDesignerViewModelHasEntityTypes ( partition , roleAssignments , propertyAssignments ) ; case 2 : return new global :: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . Association ( partition , roleAssignments , propertyAssignments ) ; case 3 : return new global :: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . EntityTypeHasNavigationProperties ( partition , roleAssignments , propertyAssignments ) ; case 4 : return new global :: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . Inheritance ( partition , roleAssignments , propertyAssignments ) ; default : return null ; } }
Creates an element link of specified type.
Creates an element link of specified type .
// construct exception error message
Created element link.
Created element link .
partition
DslModeling::Partition
Partition where element is to be created.
Partition where element is to be created .
elementLinkType
global::System.Type
Element link type which belongs to this domain model.
Element link type which belongs to this domain model .
roleAssignments
DslModeling::RoleAssignment[]
List of relationship role assignments for the new link.
List of relationship role assignments for the new link .
propertyAssignments
DslModeling::PropertyAssignment[]
New element property assignments.
New element property assignments .