src/Misc/EFTools/EntityDesignEntityDesigner/GeneratedCode/ConnectionBuilders.cs
/// <summary>
/// Make a connection between the given pair of source and target elements
/// </summary>
/// <param name="source">The model element to use as the source of the connection</param>
/// <param name="target">The model element to use as the target of the connection</param>
/// <returns>A link representing the created connection</returns>
Make a connection between the given pair of source and target elements
Make a connection between the given pair of source and target elements
[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity", Justification = "Generated code.")]
		public static DslModeling::ElementLink Connect(DslModeling::ModelElement source, DslModeling::ModelElement target)
		{
			if (source == null)
			{
				throw new global::System.ArgumentNullException("source");
			}
			if (target == null)
			{
				throw new global::System.ArgumentNullException("target");
			}
			if (CanAcceptSourceAndTarget(source, target))
			{
				if (source is global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityType)
				{
					if (target is global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityType)
					{
						global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityType sourceAccepted = (global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityType)source;
						global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityType targetAccepted = (global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityType)target;
						DslModeling::ElementLink result = new global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Inheritance(sourceAccepted, targetAccepted);
						if (DslModeling::DomainClassInfo.HasNameProperty(result))
						{
							DslModeling::DomainClassInfo.SetUniqueName(result);
						}
						return result;
					}
				}
			}
			global::System.Diagnostics.Debug.Fail("Having agreed that the connection can be accepted we should never fail to make one.");
			throw new global::System.InvalidOperationException();
		}
[ global :: System . Diagnostics . CodeAnalysis . SuppressMessage ( " " , " " ) ] [ global :: System . Diagnostics . CodeAnalysis . SuppressMessage ( " " , " " , Justification = " " ) ] public static DslModeling :: ElementLink Connect ( DslModeling :: ModelElement source , DslModeling :: ModelElement target ) { if ( source == null ) { throw new global :: System . ArgumentNullException ( " " ) ; } if ( target == null ) { throw new global :: System . ArgumentNullException ( " " ) ; } if ( CanAcceptSourceAndTarget ( source , target ) ) { if ( source is global :: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . EntityType ) { if ( target is global :: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . EntityType ) { global :: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . EntityType sourceAccepted = ( global :: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . EntityType ) source ; global :: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . EntityType targetAccepted = ( global :: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . EntityType ) target ; DslModeling :: ElementLink result = new global :: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . Inheritance ( sourceAccepted , targetAccepted ) ; if ( DslModeling :: DomainClassInfo . HasNameProperty ( result ) ) { DslModeling :: DomainClassInfo . SetUniqueName ( result ) ; } return result ; } } } global :: System . Diagnostics . Debug . Fail ( " " ) ; throw new global :: System . InvalidOperationException ( ) ; }
Make a connection between the given pair of source and target elements
Make a connection between the given pair of source and target elements
A link representing the created connection
A link representing the created connection
source
DslModeling::ModelElement
The model element to use as the source of the connection
The model element to use as the source of the connection
target
DslModeling::ModelElement
The model element to use as the target of the connection
The model element to use as the target of the connection