本文整理汇总了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);
}
}
示例2: IndexerExpression
public IndexerExpression(Expression targetObject, params Expression[] indices)
{
if (targetObject==null)
throw new ArgumentNullException("targetObject");
this.targetObject = targetObject;
this.indices.AddRange(indices);
}
示例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);
}
示例4: ConditionStatement
public ConditionStatement(Expression condition, params Statement[] trueStatements)
{
if (condition==null)
throw new ArgumentNullException("condition");
this.condition = condition;
this.trueStatements.AddRange(trueStatements);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}