本文整理汇总了C#中ExpressionType类的典型用法代码示例。如果您正苦于以下问题:C# ExpressionType类的具体用法?C# ExpressionType怎么用?C# ExpressionType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ExpressionType类属于命名空间,在下文中一共展示了ExpressionType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: UnaryExpression
internal UnaryExpression(ExpressionType nodeType, Expression expression, Type type, MethodInfo method)
{
_operand = expression;
_method = method;
_nodeType = nodeType;
_type = type;
}
开发者ID:mesheets,项目名称:Theraot-CF,代码行数:7,代码来源:UnaryExpression.net30.cs
示例2: Calculate
private Expression Calculate(Expression expression, ExpressionType binaryType, bool constant)
{
if (binaryType == ExpressionType.NotEqual)
constant = !constant;
return constant ? expression : Expression.Not(expression);
}
开发者ID:ashmind,项目名称:expressive,代码行数:7,代码来源:BooleanEqualityImprovementVisitor.cs
示例3: UnaryOperationOnMemberBinder
/// <summary>
/// Constructor of the OperationOnIndexBinder object, representing "a.b (op)= c" operation.
/// </summary>
/// <param name="operation">Binary operation to be performed.</param>
/// <param name="name">Name of the member for the operation.</param>
/// <param name="ignoreCase">Ignore case of the member.</param>
protected UnaryOperationOnMemberBinder(ExpressionType operation, string name, bool ignoreCase) {
ContractUtils.RequiresNotNull(name, "name");
ContractUtils.Requires(UnaryOperationBinder.OperationIsValid(operation), "operation");
_operation = operation;
_name = name;
_ignoreCase = ignoreCase;
}
开发者ID:mscottford,项目名称:ironruby,代码行数:13,代码来源:UnaryOperationOnMemberBinder.cs
示例4: MethodExpression
protected MethodExpression(ExpressionType type, Expression objectReference, MethodSymbol method, Collection<Expression> parameters) :
base(type, (method.AssociatedType.Type == SymbolType.GenericParameter ? objectReference.EvaluatedType : method.AssociatedType),
SymbolFilter.Public | SymbolFilter.InstanceMembers) {
_method = method;
_objectReference = objectReference;
_parameters = (parameters == null) ? new Collection<Expression>() : parameters;
}
开发者ID:fugaku,项目名称:scriptsharp,代码行数:7,代码来源:MethodExpression.cs
示例5: ExtensionExpression
/// <summary>
/// Initializes a new instance of the <see cref="ExtensionExpression"/> class with a custom <see cref="ExpressionType"/> value.
/// </summary>
/// <param name="type">The type of the value represented by the <see cref="ExtensionExpression"/>.</param>
/// <param name="nodeType">The <see cref="ExpressionType"/> value to use as this expression's <see cref="Expression.NodeType"/> value.
/// LINQ providers should use values starting from 150001 and above.</param>
protected ExtensionExpression (Type type, ExpressionType nodeType)
{
ArgumentUtility.CheckNotNull ("type", type);
_type = type;
_nodeType = nodeType;
}
开发者ID:hong1990,项目名称:Relinq,代码行数:13,代码来源:ExtensionExpression.cs
示例6:
/// <summary>
/// 获取常量转换处理函数
/// </summary>
/// <param name="type">数据类型</param>
/// <returns>失败返回null</returns>
public action<converter, Expression> this[ExpressionType type]
{
get
{
return converters[(int)type];
}
}
开发者ID:khaliyo,项目名称:fastCSharp,代码行数:12,代码来源:expressionConverter.cs
示例7: UnaryExpression
//public bool IsLiftedToNull {
// get { return is_lifted && this.Type.IsNullable (); }
//}
UnaryExpression (ExpressionType nodeType, Expression operand, Type type, MethodInfo method, bool isLifted)
: base(nodeType, type)
{
Operand = operand;
Method = method;
IsLifted = isLifted;
}
开发者ID:hallvar,项目名称:Joddes.CS,代码行数:11,代码来源:UnaryExpression.cs
示例8: UnaryExpression
internal UnaryExpression(ExpressionType nodeType, Expression expression, Type type, MethodInfo method)
{
this._operand = expression;
this._method = method;
this._nodeType = nodeType;
this._type = type;
}
开发者ID:joemoorhouse,项目名称:vector-accelerator,代码行数:7,代码来源:UnaryExpression.cs
示例9: AddBinary
protected OperatorImplementation AddBinary(ExpressionType op, Type commonType,
BinaryOperatorMethod binaryMethod, UnaryOperatorMethod resultConverter) {
var key = new OperatorDispatchKey(op, commonType, commonType);
var impl = new OperatorImplementation(key, commonType, binaryMethod, null, null, resultConverter);
OperatorImplementations[key] = impl;
return impl;
}
开发者ID:Rezura,项目名称:LiveSplit,代码行数:7,代码来源:LanguageRuntime_OpDispatch_Init.cs
示例10: GetSymbolName
private static String GetSymbolName(ExpressionType operation)
{
switch (operation)
{
case ExpressionType.Negate:
return "-";
case ExpressionType.UnaryPlus:
return "+";
case ExpressionType.NegateChecked:
return "-";
case ExpressionType.Not:
return "!";
case ExpressionType.Quote:
return "quote";
case ExpressionType.Decrement:
return "--";
case ExpressionType.Increment:
return "++";
case ExpressionType.PreIncrementAssign:
return "++=";
case ExpressionType.PreDecrementAssign:
return "--=";
case ExpressionType.PostIncrementAssign:
return "=++";
case ExpressionType.PostDecrementAssign:
return "=--";
case ExpressionType.OnesComplement:
return "~";
}
throw new NotSupportedException("YacqUnaryOperationBinder does not supports " + operation);
}
开发者ID:takeshik,项目名称:yacq,代码行数:31,代码来源:YacqUnaryOperationBinder.cs
示例11: BinaryExpression
public BinaryExpression(Expression left, Expression right, ExpressionType nodeType,
bool liftToNull, MethodInfo method) : base(nodeType)
{
Left = left;
Right = right;
Method = method;
}
开发者ID:x335,项目名称:WootzJs,代码行数:7,代码来源:BinaryExpression.cs
示例12: ConvertBinaryTypeToSql
public static string ConvertBinaryTypeToSql(ExpressionType type)
{
switch (type)
{
case ExpressionType.GreaterThan:
return " > ";
case ExpressionType.GreaterThanOrEqual:
return " >= ";
case ExpressionType.LessThan:
return " < ";
case ExpressionType.LessThanOrEqual:
return " <= ";
case ExpressionType.And:
case ExpressionType.AndAlso:
return " AND ";
case ExpressionType.Or:
case ExpressionType.OrElse:
return " OR ";
case ExpressionType.Equal:
return " = ";
case ExpressionType.NotEqual:
return " <> ";
}
throw new NotImplementedException("The expression type: " + type);
}
开发者ID:Kayomani,项目名称:FAP,代码行数:26,代码来源:WmiQueryUtility.cs
示例13: Expression
string _UniqueName; // unique name of expression; not always created
internal Expression(ReportDefn r, ReportLink p, XmlNode xNode, ExpressionType et) : base(r, p)
{
_Source=xNode.InnerText;
_Type = TypeCode.Empty;
_ExpectedType = et;
_Expr = null;
}
开发者ID:romeroyonatan,项目名称:opendental,代码行数:9,代码来源:Expression.cs
示例14: UnaryExpression
public UnaryExpression(ExpressionType nodeType, Expression operand, MethodInfo method, Type type) : base(nodeType)
{
Operand = operand;
Method = method;
this.type = type;
}
开发者ID:x335,项目名称:WootzJs,代码行数:7,代码来源:UnaryExpression.cs
示例15: ExpressionTypeToOperator
public static Operators ExpressionTypeToOperator(ExpressionType et) {
switch (et) {
case ExpressionType.Add: return Operators.Add;
case ExpressionType.And: return Operators.BitwiseAnd;
case ExpressionType.Divide: return Operators.Divide;
case ExpressionType.ExclusiveOr: return Operators.ExclusiveOr;
case ExpressionType.Modulo: return Operators.Mod;
case ExpressionType.Multiply: return Operators.Multiply;
case ExpressionType.Or: return Operators.BitwiseOr;
case ExpressionType.Power: return Operators.Power;
case ExpressionType.RightShift: return Operators.RightShift;
case ExpressionType.LeftShift: return Operators.LeftShift;
case ExpressionType.Subtract: return Operators.Subtract;
case ExpressionType.AddAssign: return Operators.InPlaceAdd;
case ExpressionType.AndAssign: return Operators.InPlaceBitwiseAnd;
case ExpressionType.DivideAssign: return Operators.InPlaceDivide;
case ExpressionType.ExclusiveOrAssign: return Operators.InPlaceExclusiveOr;
case ExpressionType.ModuloAssign: return Operators.InPlaceMod;
case ExpressionType.MultiplyAssign: return Operators.InPlaceMultiply;
case ExpressionType.OrAssign: return Operators.InPlaceBitwiseOr;
case ExpressionType.PowerAssign: return Operators.InPlacePower;
case ExpressionType.RightShiftAssign: return Operators.InPlaceRightShift;
case ExpressionType.LeftShiftAssign: return Operators.InPlaceLeftShift;
case ExpressionType.SubtractAssign: return Operators.InPlaceSubtract;
case ExpressionType.Equal: return Operators.Equals;
case ExpressionType.GreaterThan: return Operators.GreaterThan;
case ExpressionType.GreaterThanOrEqual: return Operators.GreaterThanOrEqual;
case ExpressionType.LessThan: return Operators.LessThan;
case ExpressionType.LessThanOrEqual: return Operators.LessThanOrEqual;
case ExpressionType.NotEqual: return Operators.NotEquals;
}
return Operators.None;
}
开发者ID:techarch,项目名称:ironruby,代码行数:35,代码来源:OperatorInfo.cs
示例16: OperandsMutableExpression
protected OperandsMutableExpression(ExpressionType expressionType, Type type, IList<Expression> operands)
: base(expressionType, type)
{
if(operands==null)
operands = new Expression[0];
this.operands = new ReadOnlyCollection<Expression>(operands);
}
开发者ID:nlhepler,项目名称:mono,代码行数:7,代码来源:OperandsMutableExpression.cs
示例17: Update
public Expression Update(Expression target, Type type, ExpressionType @operator) {
if (Type.Equals(type) && ReferenceEquals(Target, target) && Operator == @operator) {
return this;
}
return AstExpression.Event(Target, _eventInfo, Operator, ParentScope, Visitor);
}
开发者ID:sagifogel,项目名称:NJection.LambdaConverter,代码行数:7,代码来源:Event.cs
示例18: BinaryOpNode
public BinaryOpNode(Node left, Node right, ExpressionType op)
: base(NodeType.BinaryOp)
{
Left = left;
Right = right;
Op = op;
}
开发者ID:dtdimi,项目名称:IronJS,代码行数:7,代码来源:BinaryOpNode.cs
示例19: AppendBinaryOperator
internal void AppendBinaryOperator(ExpressionType type)
{
switch (type)
{
case ExpressionType.And:
case ExpressionType.AndAlso:
this.LambdaExpression.Append(" && ");
break;
case ExpressionType.Or:
case ExpressionType.OrElse:
this.LambdaExpression.Append(" || ");
break;
case ExpressionType.Equal:
this.LambdaExpression.Append(" == ");
break;
case ExpressionType.NotEqual:
this.LambdaExpression.Append(" <> ");
break;
case ExpressionType.LessThan:
this.LambdaExpression.Append(" < ");
break;
case ExpressionType.LessThanOrEqual:
this.LambdaExpression.Append(" <= ");
break;
case ExpressionType.GreaterThan:
this.LambdaExpression.Append(" > ");
break;
case ExpressionType.GreaterThanOrEqual:
this.LambdaExpression.Append(" >= ");
break;
default:
throw new NotSupportedException($"The binary operator '{type}' is not supported");
}
}
开发者ID:yakonstantine,项目名称:CrossQuery-Framework,代码行数:34,代码来源:Query.cs
示例20: Expression
internal Expression(ReportDefn r, ReportLink p, String xNode, ExpressionType et) : base(r, p)
{
_Source = xNode;
_Type = TypeCode.Empty;
_ExpectedType = et;
_Expr = null;
}
开发者ID:myersBR,项目名称:My-FyiReporting,代码行数:7,代码来源:Expression.cs
注:本文中的ExpressionType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论