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


C# Expressions.Expression类代码示例

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


Expression类属于Refly.CodeDom.Expressions命名空间,在下文中一共展示了Expression类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddRange

		/// <summary>
		/// Adds the elements of an array to the end of this ExpressionCollection.
		/// </summary>
		/// <param name="items">
		/// The array whose elements are to be added to the end of this ExpressionCollection.
		/// </param>
		public virtual void AddRange(Expression[] items)
		{
			foreach (Expression item in items)
			{
				this.List.Add(item);
			}
		}
开发者ID:uQr,项目名称:NHibernate.Mapping.Attributes,代码行数:13,代码来源:ExpressionCollection.cs

示例2: IndexerExpression

 public IndexerExpression(Expression targetObject, params Expression[] indices)
 {
     if (targetObject==null)
         throw new ArgumentNullException("targetObject");
     this.targetObject = targetObject;
     this.indices.AddRange(indices);
 }
开发者ID:hazzik,项目名称:nh-contrib-everything,代码行数:7,代码来源:IndexerExpression.cs

示例3: Assign

 /// <summary>
 /// Creates an assign statement: <c>left = right</c>
 /// </summary>
 /// <param name="left">
 /// Left <see cref="Expression"/> instance</param>
 /// <param name="right">
 /// Right <see cref="Expression"/> instance
 /// </param>
 /// <returns>
 /// A <see cref="AssignStatement"/> instance.
 /// </returns>
 /// <exception cref="ArgumentNullException">
 /// <paramref name="left"/> or <paramref name="right"/>
 /// is a null reference (Nothing in Visual Basic)
 /// </exception>
 public static AssignStatement Assign(Expression left, Expression right)
 {
     if (left==null)
         throw new ArgumentNullException("left");
     if (right==null)
         throw new ArgumentNullException("right");
     return new AssignStatement(left,right);
 }
开发者ID:hazzik,项目名称:nh-contrib-everything,代码行数:23,代码来源:Stm.cs

示例4: ConditionStatement

        public ConditionStatement(Expression condition, params Statement[] trueStatements)
        {
            if (condition==null)
                throw new ArgumentNullException("condition");

            this.condition = condition;
            this.trueStatements.AddRange(trueStatements);
        }
开发者ID:hazzik,项目名称:nh-contrib-everything,代码行数:8,代码来源:ConditionStatement.cs

示例5: IterationStatement

        public IterationStatement(Statement initStatement, Expression testExpression, Statement incrementStatement)
        {
            if (testExpression==null)
                throw new ArgumentNullException("testExpression");

            this.initStatement = initStatement;
            this.testExpression = testExpression;
            this.incrementStatement = incrementStatement;
        }
开发者ID:hazzik,项目名称:nh-contrib-everything,代码行数:9,代码来源:IterationStatement.cs

示例6: AttributeArgument

 internal AttributeArgument(string name, Expression value)
 {
     if (name==null)
         throw new ArgumentNullException("name");
     if (value==null)
         throw new ArgumentNullException("value");
     this.name=name;
     this.value=value;
 }
开发者ID:spib,项目名称:nhcontrib,代码行数:9,代码来源:AttributeArgument.cs

示例7: AssignStatement

 public AssignStatement(Expression left, Expression right)
 {
     if (left==null)
         throw new ArgumentNullException("left");
     if (right==null)
         throw new ArgumentNullException("righ");
     this.left = left;
     this.right = right;
 }
开发者ID:hazzik,项目名称:nh-contrib-everything,代码行数:9,代码来源:AssignStatement.cs

示例8: EventReferenceExpression

        public EventReferenceExpression(Expression target,EventDeclaration _event)
        {
            if (target==null)
                throw new ArgumentNullException("target");
            if (_event==null)
                throw new ArgumentNullException("_event");

            this.target = target;
            this.declaringEvent = _event;
        }
开发者ID:hazzik,项目名称:nh-contrib-everything,代码行数:10,代码来源:EventReferenceExpression.cs

示例9: FieldReferenceExpression

        public FieldReferenceExpression(Expression target,FieldDeclaration field)
        {
            if (target==null)
                throw new ArgumentNullException("target");
            if (field==null)
                throw new ArgumentNullException("field");

            this.target = target;
            this.declaringField = field;
        }
开发者ID:spib,项目名称:nhcontrib,代码行数:10,代码来源:FieldReferenceExpression.cs

示例10: MethodReferenceExpression

        public MethodReferenceExpression(Expression target,MethodDeclaration method)
        {
            if (target==null)
                throw new ArgumentNullException("target");
            if (method==null)
                throw new ArgumentNullException("method");

            this.target = target;
            this.declaringMethod = method;
        }
开发者ID:spib,项目名称:nhcontrib,代码行数:10,代码来源:MethodReferenceExpression.cs

示例11: PropertyReferenceExpression

        public PropertyReferenceExpression(Expression target,PropertyDeclaration property)
        {
            if (target==null)
                throw new ArgumentNullException("target");
            if (property==null)
                throw new ArgumentNullException("property");

            this.target = target;
            this.property = property;
        }
开发者ID:spib,项目名称:nhcontrib,代码行数:10,代码来源:PropertyReferenceExpression.cs

示例12: NativeMethodReferenceExpression

        public NativeMethodReferenceExpression(Expression target,string name)
        {
            if (target==null)
                throw new ArgumentNullException("target");
            if (name==null)
                throw new ArgumentNullException("name");

            this.target = target;
            this.name = name;
        }
开发者ID:hazzik,项目名称:nh-contrib-everything,代码行数:10,代码来源:NativeMethodReferenceExpression.cs

示例13: AttachRemoveEventStatement

 public AttachRemoveEventStatement(EventReferenceExpression eventRef, Expression listener,bool attach)
 {
     if (eventRef==null)
         throw new ArgumentNullException("eventRef");
     if (listener==null)
         throw new ArgumentNullException("listener");
     this.eventRef = eventRef;
     this.listener = listener;
     this.attach=attach;
 }
开发者ID:spib,项目名称:nhcontrib,代码行数:10,代码来源:AttachRemoveEventStatement.cs

示例14: CastExpression

        public CastExpression(ITypeDeclaration targetType, Expression expression)
        {
            if (targetType==null)
                throw new ArgumentNullException("targetType");
            if (expression == null)
                throw new ArgumentNullException("expression");

            this.targetType = targetType;
            this.expression = expression;
        }
开发者ID:hazzik,项目名称:nh-contrib-everything,代码行数:10,代码来源:CastExpression.cs

示例15: ArrayCreationWithSizeExpression

        public ArrayCreationWithSizeExpression(
            ITypeDeclaration type,
            Expression sizeExpression)
        {
            if (type == null)
                throw new ArgumentNullException("type");
            if (sizeExpression == null)
                throw new ArgumentNullException("sizeExpression");

            this.type = type;
            this.sizeExpression = sizeExpression;
        }
开发者ID:spib,项目名称:nhcontrib,代码行数:12,代码来源:ArrayCreationWithSizeExpression.cs


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