本文整理汇总了C#中System.CodeDom.CodeParameterDeclarationExpression.Reference方法的典型用法代码示例。如果您正苦于以下问题:C# CodeParameterDeclarationExpression.Reference方法的具体用法?C# CodeParameterDeclarationExpression.Reference怎么用?C# CodeParameterDeclarationExpression.Reference使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.CodeDom.CodeParameterDeclarationExpression
的用法示例。
在下文中一共展示了CodeParameterDeclarationExpression.Reference方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Add
/// <summary>
/// Creates an addition expression.
/// </summary>
/// <param name="left">The left operand.</param>
/// <param name="right">The right operand.</param>
/// <returns>An addition expression.</returns>
public static CodeBinaryOperatorExpression Add(this CodeExpression left, CodeParameterDeclarationExpression right)
{
return new CodeBinaryOperatorExpression(left, CodeBinaryOperatorType.Add, right.Reference());
}
示例2: LessThanOrEqual
/// <summary>
/// Creates a less-than-or-equal expression.
/// </summary>
/// <param name="left">The left operand.</param>
/// <param name="right">The right operand.</param>
/// <returns>A less-than-or-equal expression.</returns>
public static CodeBinaryOperatorExpression LessThanOrEqual(this CodeExpression left, CodeParameterDeclarationExpression right)
{
return new CodeBinaryOperatorExpression(left, CodeBinaryOperatorType.LessThanOrEqual, right.Reference());
}
示例3: CreateDelegate
/// <summary>
/// Creates a delegate-create expression.
/// </summary>
/// <param name="type">The type of the delegate.</param>
/// <param name="parameter">The object on which the delegate is created.</param>
/// <param name="method">The method that gets invoked when the delegate is invoked.</param>
/// <returns>A delegate-create expression.</returns>
public static CodeDelegateCreateExpression CreateDelegate(this CodeTypeReference type, CodeParameterDeclarationExpression parameter, CodeMemberMethod method)
{
return type.CreateDelegate(parameter.Reference(), method.Name);
}
示例4: IdentityInequality
/// <summary>
/// Creates an identity-inequality expression.
/// </summary>
/// <param name="left">The left operand.</param>
/// <param name="right">The right operand.</param>
/// <returns>A identity-inequality expression.</returns>
public static CodeBinaryOperatorExpression IdentityInequality(this CodeExpression left, CodeParameterDeclarationExpression right)
{
return new CodeBinaryOperatorExpression(left, CodeBinaryOperatorType.IdentityInequality, right.Reference());
}
示例5: Assign
/// <summary>
/// Creates an assignment statement.
/// </summary>
/// <param name="left">The left operand.</param>
/// <param name="right">The right operand.</param>
/// <returns>An assignment statement.</returns>
public static CodeAssignStatement Assign(this CodeExpression left, CodeParameterDeclarationExpression right)
{
return left.Assign(right.Reference());
}