Наследование: SqlBaseExpression
 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;
        }
Пример #3
0
		protected virtual Expression VisitType(SqlTypeExpression expression)
		{
			return expression;
		}
Пример #4
0
        protected override Expression VisitType(SqlTypeExpression expression)
        {
            if (expression.UserDefinedType)
            {
                this.WriteQuotedIdentifier(expression.TypeName);
            }
            else
            {
                this.Write(expression.TypeName);
            }

            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);
        }