public void AddColumn(string label, SqlType type, Expression expr) { OutputExpression outExpr = new OutputExpression(); outExpr.label = label; outExpr.type = type; outExpr.expression = expr; // If the expression is a 'FETCHVAR' type then we pass it through the // blob accessor methods in hopes of not having to materialize large // objects. if (expr is FetchVariableExpression) outExpr.var = ((FetchVariableExpression)expr).Variable; outputExps.Add(outExpr); }
// returns empty string if cannot convert. public string Convert(string line) { //Regex expression = new Regex(OutputIdentifier); if (OutputExpression.IsMatch(line)) { string filename = OutputExpression.Replace(line, FilenameIdentifier); // GetFullPath may throw an exception. try { string fullPath = Path.GetFullPath(filename); string remainder = OutputExpression.Replace(line, RemainderIdentifier); string newLine = fullPath + remainder; return(newLine); } catch { } } return(string.Empty); }