Inheritance: SqlBaseExpression
 protected override Expression VisitType(SqlTypeExpression expression)
 {
     this.hashCode ^= expression.TypeName?.GetHashCode() ?? 0;
     this.hashCode ^= expression.UserDefinedType ? -1063728409 : 0;
     return base.VisitType(expression);
 }
Exemple #2
0
 protected override Expression VisitType(SqlTypeExpression expression)
 {
     this.hashCode ^= expression.TypeName?.GetHashCode() ?? 0;
     this.hashCode ^= expression.UserDefinedType ? -1063728409 : 0;
     return(base.VisitType(expression));
 }
        protected override Expression VisitType(SqlTypeExpression expression)
        {
            SqlTypeExpression current;
            if (!TryGetCurrent(expression, out current))
            {
                return expression;
            }

            if (!(this.result &= object.Equals(current.TypeName, expression.TypeName)))
            {
                return expression;
            }

            if (!(this.result &= current.UserDefinedType == expression.UserDefinedType))
            {
                return expression;
            }

            if (!(this.result &= current.NodeType == expression.NodeType))
            {
                return expression;
            }

            if (!(this.result &= current.Type == expression.Type))
            {
                return expression;
            }

            this.currentObject = current;
            return expression;
        }
        protected override Expression VisitType(SqlTypeExpression expression)
        {
            if (expression.UserDefinedType)
            {
                this.WriteQuotedIdentifier(expression.TypeName);
            }
            else
            {
                this.Write(expression.TypeName);
            }

            return expression;
        }
		protected virtual Expression VisitType(SqlTypeExpression expression)
		{
			return expression;
		}
        private Expression BuildCreateEnumTypeExpression(EnumTypeDescriptor enumTypeDescriptor)
        {
            var sqlTypeExpression = new SqlTypeExpression(enumTypeDescriptor.Name);
            var asExpression = new SqlEnumDefinitionExpression(enumTypeDescriptor.GetValues());

            return new SqlCreateTypeExpression(sqlTypeExpression, asExpression, true);
        }
 protected virtual Expression VisitType(SqlTypeExpression expression)
 {
     return(expression);
 }