当前位置: 首页>>代码示例>>C#>>正文


C# ExpressionType类代码示例

本文整理汇总了C#中ExpressionType的典型用法代码示例。如果您正苦于以下问题:C# ExpressionType类的具体用法?C# ExpressionType怎么用?C# ExpressionType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ExpressionType类属于命名空间,在下文中一共展示了ExpressionType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的ExpressionType类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。