public virtual string GetSql(ILiteral literal) { if (literal == null) { throw new ArgumentNullException("literal"); } Type type = literal.GetType(); if (type == typeof(StringLiteral)) { return(GetLiteralSql(literal as StringLiteral)); } else if (type == typeof(NumericLiteral)) { return(GetLiteralSql(literal as NumericLiteral)); } else if (type == typeof(BooleanLiteral)) { return(GetLiteralSql(literal as BooleanLiteral)); } else if (type == typeof(NullLiteral)) { return(GetLiteralSql(literal as NullLiteral)); } else if (type == typeof(TrueLiteral)) { return(GetLiteralSql(literal as TrueLiteral)); } else if (type == typeof(FalseLiteral)) { return(GetLiteralSql(literal as FalseLiteral)); } else if (type == typeof(HexLiteral)) { return(GetLiteralSql(literal as HexLiteral)); } else if (type == typeof(BitLiteral)) { return(GetLiteralSql(literal as BitLiteral)); } else { throw new NotImplementedException(type.FullName); } }
public virtual string GetSql (ILiteral literal) { if (literal == null) throw new ArgumentNullException ("literal"); Type type = literal.GetType (); if (type == typeof (StringLiteral)) return GetLiteralSql (literal as StringLiteral); else if (type == typeof (NumericLiteral)) return GetLiteralSql (literal as NumericLiteral); else if (type == typeof (BooleanLiteral)) return GetLiteralSql (literal as BooleanLiteral); else if (type == typeof (NullLiteral)) return GetLiteralSql (literal as NullLiteral); else if (type == typeof (TrueLiteral)) return GetLiteralSql (literal as TrueLiteral); else if (type == typeof (FalseLiteral)) return GetLiteralSql (literal as FalseLiteral); else if (type == typeof (HexLiteral)) return GetLiteralSql (literal as HexLiteral); else if (type == typeof (BitLiteral)) return GetLiteralSql (literal as BitLiteral); else throw new NotImplementedException (type.FullName); }