public void Visit(ISqlStringVisitor visitor) { foreach (object part in this) { var partString = part as string; if (partString != null) { visitor.String(partString); continue; } var partSqlString = part as SqlString; if (partSqlString != null) { visitor.String(partSqlString); continue; } var partParameter = part as Parameter; if (partParameter != null) { visitor.Parameter(partParameter); } } }
public void Visit(ISqlStringVisitor visitor) { foreach (object part in sqlParts) { string partString = part as string; SqlString partSqlString = part as SqlString; if (partString != null) { visitor.String(partString); } else if (partSqlString != null && !SqlString.Parameter.Equals(partSqlString)) { visitor.String(partSqlString); } else { visitor.Parameter((Parameter)part); } } }
public void Visit(ISqlStringVisitor visitor) { foreach (object part in sqlParts) { var partString = part as string; if (partString != null) { visitor.String(partString); continue; } var partSqlString = part as SqlString; if (partSqlString != null) { visitor.String(partSqlString); continue; } var partParameter = part as Parameter; if(partParameter != null) { visitor.Parameter(partParameter); } } }
public void Visit(ISqlStringVisitor visitor) { foreach (object part in sqlParts) { string partString = part as string; if (partString != null) { visitor.String(partString); } else { visitor.Parameter(); } } }