本文整理汇总了C#中IExpressionTransformer类的典型用法代码示例。如果您正苦于以下问题:C# IExpressionTransformer类的具体用法?C# IExpressionTransformer怎么用?C# IExpressionTransformer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IExpressionTransformer类属于命名空间,在下文中一共展示了IExpressionTransformer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Transform
/// <summary>
/// Transforms the Expression using the given Transformer
/// </summary>
/// <param name="transformer">Expression Transformer</param>
/// <returns></returns>
public override ISparqlExpression Transform(IExpressionTransformer transformer)
{
if (this._arg != null)
{
return new NormalizeUnicodeFunction(transformer.Transform(this._expr), transformer.Transform(this._arg));
}
else
{
return new NormalizeUnicodeFunction(transformer.Transform(this._expr));
}
}
示例2: ApplyTransformations
private static Expression ApplyTransformations(Expression expression)
{
var chain = new IExpressionTransformer[]
{
new PartialEvaluationTransformer(),
new VbStringCompareTransformer(),
new VbConvertInvocationTransformer(),
};
Expression result = expression;
foreach (var transformer in chain)
{
expression = transformer.Transform(expression);
}
return expression;
}
示例3: Transform
/// <summary>
/// Transforms the Expression using the given Transformer
/// </summary>
/// <param name="transformer">Expression Transformer</param>
/// <returns></returns>
public override ISparqlExpression Transform(IExpressionTransformer transformer)
{
return new NotEqualsExpression(transformer.Transform(this._leftExpr), transformer.Transform(this._rightExpr));
}
示例4: Transform
/// <summary>
/// Transforms the Expression using the given Transformer
/// </summary>
/// <param name="transformer">Expression Transformer</param>
/// <returns></returns>
public override ISparqlExpression Transform(IExpressionTransformer transformer)
{
return new MultiplicationExpression(transformer.Transform(this._leftExpr), transformer.Transform(this._rightExpr));
}
示例5: Transform
/// <summary>
/// Transforms the Expression using the given Transformer
/// </summary>
/// <param name="transformer">Expression Transformer</param>
/// <returns></returns>
public ISparqlExpression Transform(IExpressionTransformer transformer)
{
if (this._optionExpr != null)
{
return new RegexFunction(transformer.Transform(this._textExpr), transformer.Transform(this._patternExpr), transformer.Transform(this._optionExpr));
}
else
{
return new RegexFunction(transformer.Transform(this._textExpr), transformer.Transform(this._patternExpr));
}
}
示例6: Transform
/// <summary>
/// Transforms the Expression using the given Transformer
/// </summary>
/// <param name="transformer">Expression Transformer</param>
/// <returns></returns>
public override ISparqlExpression Transform(IExpressionTransformer transformer)
{
return new InFunction(transformer.Transform(this._expr), this._expressions.Select(e => transformer.Transform(e)));
}
示例7: Transform
/// <summary>
/// Transforms the Expression using the given Transformer
/// </summary>
/// <param name="transformer">Expression Transformer</param>
/// <returns></returns>
public override ISparqlExpression Transform(IExpressionTransformer transformer)
{
return new StartsWithFunction(transformer.Transform(this._expr), transformer.Transform(this._arg));
}
示例8: Transform
/// <summary>
/// Transforms the Expression using the given Transformer
/// </summary>
/// <param name="transformer">Expression Transformer</param>
/// <returns></returns>
public ISparqlExpression Transform(IExpressionTransformer transformer)
{
return new ConcatFunction(this._exprs.Select(e => transformer.Transform(e)));
}
示例9: Transform
/// <summary>
/// Transforms the Expression using the given Transformer
/// </summary>
/// <param name="transformer">Expression Transformer</param>
/// <returns></returns>
public override ISparqlExpression Transform(IExpressionTransformer transformer)
{
return new XPathStringCast(transformer.Transform(this._expr));
}
示例10: Transform
/// <summary>
/// Transforms the Expression using the given Transformer
/// </summary>
/// <param name="transformer">Expression Transformer</param>
/// <returns></returns>
public ISparqlExpression Transform(IExpressionTransformer transformer)
{
return new StringJoinFunction(transformer.Transform(this._sep), this._exprs.Select(e => transformer.Transform(e)));
}
示例11: Transform
public ISparqlExpression Transform(IExpressionTransformer transformer)
{
return new UnknownFunction(this._funcUri, this._args.Select(e => transformer.Transform(e)));
}
示例12: Transform
public ISparqlExpression Transform(IExpressionTransformer transformer)
{
return new IfElseFunction(transformer.Transform(_condition), transformer.Transform(_ifBranch),
transformer.Transform(_elseBranch));
}
示例13: Transform
/// <summary>
/// Transforms the Expression using the given Transformer
/// </summary>
/// <param name="transformer">Expression Transformer</param>
/// <returns></returns>
public override ISparqlExpression Transform(IExpressionTransformer transformer)
{
return new LeviathanCosecantFunction(transformer.Transform(this._expr), this._inverse);
}
示例14: Transform
/// <summary>
/// Transforms the Expression using the given Transformer
/// </summary>
/// <param name="transformer">Expression Transformer</param>
/// <returns></returns>
public ISparqlExpression Transform(IExpressionTransformer transformer)
{
ISparqlExpression temp = transformer.Transform(new GraphPatternTerm(this._pattern));
if (temp is GraphPatternTerm)
{
return new ExistsFunction(((GraphPatternTerm)temp).Pattern, this._mustExist);
}
else
{
throw new RdfQueryException("Unable to transform an EXISTS/NOT EXISTS function since the expression transformer in use failed to transform the inner Graph Pattern Expression to another Graph Pattern Expression");
}
}
示例15: Transform
/// <summary>
/// Transforms the Expression using the given Transformer
/// </summary>
/// <param name="transformer">Expression Transformer</param>
/// <returns></returns>
public ISparqlExpression Transform(IExpressionTransformer transformer)
{
if (this._3d)
{
return new CartesianFunction(transformer.Transform(this._x1), transformer.Transform(this._y1), transformer.Transform(this._z1), transformer.Transform(this._x2), transformer.Transform(this._y2), transformer.Transform(this._z2));
}
else
{
return new CartesianFunction(transformer.Transform(this._x1), transformer.Transform(this._y1), transformer.Transform(this._x2), transformer.Transform(this._y2));
}
}