private TupleInternal <IEdmAssociationEnd, IEdmAssociationEnd> ComputeEnds()
        {
            IEdmAssociationEnd csdlSemanticsAssociationEnd;
            IEdmAssociationEnd edmAssociationEnd;

            if (this.association.End1 != null)
            {
                csdlSemanticsAssociationEnd = new CsdlSemanticsAssociationEnd(this.context, this, this.association.End1);
            }
            else
            {
                EdmError[] edmError = new EdmError[1];
                edmError[0] = new EdmError(base.Location, EdmErrorCode.InvalidAssociation, Strings.CsdlParser_InvalidAssociationIncorrectNumberOfEnds(string.Concat(this.Namespace, ".", this.Name)));
                IEdmAssociationEnd badAssociationEnd = new BadAssociationEnd(this, "End1", edmError);
                csdlSemanticsAssociationEnd = badAssociationEnd;
            }
            if (this.association.End2 != null)
            {
                edmAssociationEnd = new CsdlSemanticsAssociationEnd(this.context, this, this.association.End2);
            }
            else
            {
                EdmError[] edmErrorArray = new EdmError[1];
                edmErrorArray[0] = new EdmError(base.Location, EdmErrorCode.InvalidAssociation, Strings.CsdlParser_InvalidAssociationIncorrectNumberOfEnds(string.Concat(this.Namespace, ".", this.Name)));
                IEdmAssociationEnd badAssociationEnd1 = new BadAssociationEnd(this, "End2", edmErrorArray);
                edmAssociationEnd = badAssociationEnd1;
            }
            return(TupleInternal.Create <IEdmAssociationEnd, IEdmAssociationEnd>(csdlSemanticsAssociationEnd, edmAssociationEnd));
        }
        private IEdmAssociationEnd ComputePrincipal()
        {
            IEdmAssociationEnd returnedEnd = this.context.End1;

            if (returnedEnd.Name != this.constraint.Principal.Role)
            {
                returnedEnd = this.context.End2;
            }

            if (returnedEnd.Name != this.constraint.Principal.Role)
            {
                returnedEnd = new BadAssociationEnd(this.context, this.constraint.Principal.Role, new EdmError[] { new EdmError(this.Location, EdmErrorCode.BadNonComputableAssociationEnd, Edm.Strings.Bad_UncomputableAssociationEnd(this.constraint.Principal.Role)) });
            }

            return(returnedEnd);
        }
        private IEdmAssociationEnd ComputePrincipal()
        {
            IEdmAssociationEnd end1 = this.context.End1;

            if (end1.Name != this.constraint.Principal.Role)
            {
                end1 = this.context.End2;
            }
            if (end1.Name != this.constraint.Principal.Role)
            {
                EdmError[] edmError = new EdmError[1];
                edmError[0] = new EdmError(base.Location, EdmErrorCode.BadNonComputableAssociationEnd, Strings.Bad_UncomputableAssociationEnd(this.constraint.Principal.Role));
                end1        = new BadAssociationEnd(this.context, this.constraint.Principal.Role, edmError);
            }
            return(end1);
        }
        private IEdmAssociationEnd ComputePrincipal()
        {
            IEdmAssociationEnd returnedEnd = this.context.End1;
            if (returnedEnd.Name != this.constraint.Principal.Role)
            {
                returnedEnd = this.context.End2;
            }

            if (returnedEnd.Name != this.constraint.Principal.Role)
            {
                returnedEnd = new BadAssociationEnd(this.context, this.constraint.Principal.Role, new EdmError[] { new EdmError(this.Location, EdmErrorCode.BadNonComputableAssociationEnd, Edm.Strings.Bad_UncomputableAssociationEnd(this.constraint.Principal.Role)) });
            }

            return returnedEnd;
        }
		private IEdmAssociationEnd ComputePrincipal()
		{
			IEdmAssociationEnd end1 = this.context.End1;
			if (end1.Name != this.constraint.Principal.Role)
			{
				end1 = this.context.End2;
			}
			if (end1.Name != this.constraint.Principal.Role)
			{
				EdmError[] edmError = new EdmError[1];
				edmError[0] = new EdmError(base.Location, EdmErrorCode.BadNonComputableAssociationEnd, Strings.Bad_UncomputableAssociationEnd(this.constraint.Principal.Role));
				end1 = new BadAssociationEnd(this.context, this.constraint.Principal.Role, edmError);
			}
			return end1;
		}
		private TupleInternal<IEdmAssociationEnd, IEdmAssociationEnd> ComputeEnds()
		{
			IEdmAssociationEnd csdlSemanticsAssociationEnd;
			IEdmAssociationEnd edmAssociationEnd;
			if (this.association.End1 != null)
			{
				csdlSemanticsAssociationEnd = new CsdlSemanticsAssociationEnd(this.context, this, this.association.End1);
			}
			else
			{
				EdmError[] edmError = new EdmError[1];
				edmError[0] = new EdmError(base.Location, EdmErrorCode.InvalidAssociation, Strings.CsdlParser_InvalidAssociationIncorrectNumberOfEnds(string.Concat(this.Namespace, ".", this.Name)));
				IEdmAssociationEnd badAssociationEnd = new BadAssociationEnd(this, "End1", edmError);
				csdlSemanticsAssociationEnd = badAssociationEnd;
			}
			if (this.association.End2 != null)
			{
				edmAssociationEnd = new CsdlSemanticsAssociationEnd(this.context, this, this.association.End2);
			}
			else
			{
				EdmError[] edmErrorArray = new EdmError[1];
				edmErrorArray[0] = new EdmError(base.Location, EdmErrorCode.InvalidAssociation, Strings.CsdlParser_InvalidAssociationIncorrectNumberOfEnds(string.Concat(this.Namespace, ".", this.Name)));
				IEdmAssociationEnd badAssociationEnd1 = new BadAssociationEnd(this, "End2", edmErrorArray);
				edmAssociationEnd = badAssociationEnd1;
			}
			return TupleInternal.Create<IEdmAssociationEnd, IEdmAssociationEnd>(csdlSemanticsAssociationEnd, edmAssociationEnd);
		}