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


C# ExpressionList类代码示例

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


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

示例1: VisitExpressionList

 public virtual ExpressionList VisitExpressionList(ExpressionList list)
 {
     if (list == null) return null;
     for (int i = 0, n = list.Count; i < n; i++)
         list[i] = (Expression)this.Visit(list[i]);
     return list;
 }
开发者ID:julianhaslinger,项目名称:SHFB,代码行数:7,代码来源:StandardVisitor.cs

示例2: VisitCall

        /// <summary>
        /// Visits the call.
        /// </summary>
        /// <param name="destination">The destination.</param>
        /// <param name="receiver">The receiver.</param>
        /// <param name="callee">The callee.</param>
        /// <param name="arguments">The arguments.</param>
        /// <param name="isVirtualCall">if set to <c>true</c> [is virtual call].</param>
        /// <param name="programContext">The program context.</param>
        /// <param name="stateBeforeInstruction">The state before instruction.</param>
        /// <param name="stateAfterInstruction">The state after instruction.</param>
        public override void VisitCall(
            Variable destination, 
            Variable receiver, 
            Method callee, 
            ExpressionList arguments, 
            bool isVirtualCall, 
            Microsoft.Fugue.IProgramContext programContext, 
            Microsoft.Fugue.IExecutionState stateBeforeInstruction, 
            Microsoft.Fugue.IExecutionState stateAfterInstruction)
        {
            if ((callee.DeclaringType.GetRuntimeType() == typeof(X509ServiceCertificateAuthentication) ||
                 callee.DeclaringType.GetRuntimeType() == typeof(X509ClientCertificateAuthentication)) &&
                 (callee.Name.Name.Equals("set_CertificateValidationMode", StringComparison.InvariantCultureIgnoreCase)))
            {
                IAbstractValue value = stateBeforeInstruction.Lookup((Variable)arguments[0]);
                IIntValue intValue = value.IntValue(stateBeforeInstruction);

                if (intValue != null)
                {
                    X509CertificateValidationMode mode = (X509CertificateValidationMode)intValue.Value;
                    if (mode != X509CertificateValidationMode.ChainTrust)
                    {
                        Resolution resolution = base.GetResolution(mode.ToString(), 
                            X509CertificateValidationMode.ChainTrust.ToString());
                        Problem problem = new Problem(resolution, programContext);
                        base.Problems.Add(problem);
                    }
                }
            }

            base.VisitCall(destination, receiver, callee, arguments, isVirtualCall, programContext, stateBeforeInstruction, stateAfterInstruction);
        }
开发者ID:Phidiax,项目名称:open-wssf-2015,代码行数:43,代码来源:CertificateValidationMode.cs

示例3: LiteralElement

 public LiteralElement()
   : base((NodeType)SpecSharpNodeType.None){
   this.AttributeNames = new IdentifierList();
   this.AttributeValues = new ExpressionList();
   this.Contents = new ExpressionList();
   this.ContentsType = new Int32List();
 }
开发者ID:hesam,项目名称:SketchSharp,代码行数:7,代码来源:Nodes.cs

示例4: InterProcMapping

 InterProcMapping(PTGraph caller, PTGraph callee, Variable thisRef, ExpressionList arguments)
 {
   this.calleePTG = callee;
   this.callerPTG = caller;
   this.callerThisRef = thisRef;
   this.arguments = arguments;
 }
开发者ID:hesam,项目名称:SketchSharp,代码行数:7,代码来源:PointsToAnalysis.cs

示例5: AddTest

 public void AddTest()
 {
     var list = new ExpressionList<ConstantTypes.Integer>();
     var one = new ConstantTypes.Integer(1);
     list.Add(one);
     Assert.IsTrue(list.Contains(one));
 }
开发者ID:jgshort,项目名称:SqlDom,代码行数:7,代码来源:ExpressionListTest.cs

示例6: Clone

 private static ExpressionList Clone(ExpressionList expression)
 {
     var parameters = new Expression[expression.Count];
     for (int i = 0; i < expression.Count; ++i)
         parameters[i] = Clone(expression[i]);
     return new ExpressionList(parameters);
 }
开发者ID:Powerino73,项目名称:paradox,代码行数:7,代码来源:ParadoxAssignmentCloner.cs

示例7: GroupByClause

 public GroupByClause(ExpressionList exprList)
 {
     foreach (Expression e in exprList) {
         e.Parent = this;
         _exprs.Add(e);
     }
     this.ExpressionType = ExpressionType.QL_SELECT_GROUP_BY;
 }
开发者ID:sekcheong,项目名称:parser,代码行数:8,代码来源:GroupByClause.cs

示例8: SearchedCase

 public SearchedCase(params KeyValuePair<Predicate, Expression>[] cases)
 {
     SearchCases = new ExpressionList<SearchedCaseExpression>();
     foreach (var kvp in cases)
     {
         SearchCases.Add(new SearchedCaseExpression(kvp.Key, kvp.Value));
     }
 }
开发者ID:jgshort,项目名称:SqlDom,代码行数:8,代码来源:SearchedCase.cs

示例9: WhereClause

 public WhereClause(ExpressionList exprList)
 {
     foreach (Expression e in exprList) {
         e.Parent = this;
         _exprs.Add(e);
     }
     this.ExpressionType = ExpressionType.QL_SELECT_WHERE_CLAUSE;
 }
开发者ID:sekcheong,项目名称:parser,代码行数:8,代码来源:WhereClause.cs

示例10: ClearTest

 public void ClearTest()
 {
     var list = new ExpressionList<ConstantTypes.Integer>();
     var one = new ConstantTypes.Integer(1);
     list.Add(one);
     Assert.IsTrue(list.Count == 1);
     list.Clear();
     Assert.IsTrue(list.Count == 0);
 }
开发者ID:jgshort,项目名称:SqlDom,代码行数:9,代码来源:ExpressionListTest.cs

示例11: VisitRefTypeExpression

 public override Expression VisitRefTypeExpression(RefTypeExpression reftypexp) {
   if (reftypexp == null) return null;
   Expression result = base.VisitRefTypeExpression (reftypexp);
   if (result != reftypexp) return result;
   UnaryExpression refanytype = new UnaryExpression(reftypexp.Operand, NodeType.Refanytype, SystemTypes.RuntimeTypeHandle, reftypexp.SourceContext);
   ExpressionList arguments = new ExpressionList(1);
   arguments.Add(refanytype);
   MemberBinding mb = new MemberBinding(null, Runtime.GetTypeFromHandle);
   return new MethodCall(mb, arguments, NodeType.Call, SystemTypes.Type);
 }
开发者ID:dbremner,项目名称:specsharp,代码行数:10,代码来源:Normalizer.cs

示例12: ParenthesizedExpression

 /// <summary>
 /// Initializes a new instance of the <see cref="ParenthesizedExpression"/> class.
 /// </summary>
 /// <param name="content">The content.</param>
 public ParenthesizedExpression(params Expression[] content)
 {
     if (content != null)
     {
         if (content.Length == 1)
             Content = content[0];
         else
             Content = new ExpressionList(content);
     }
 }
开发者ID:h78hy78yhoi8j,项目名称:xenko,代码行数:14,代码来源:ParenthesizedExpression.cs

示例13: VisitExpressionList

    public override ExpressionList VisitExpressionList(ExpressionList expressions)
    {
      if (expressions == null) return null;

      for(int i = expressions.Count-1; i >= 0; i--) 
      {
        Expression elem = this.VisitExpression(expressions[i]);
        System.Diagnostics.Debug.Assert(elem != null, "VisitExpression must return non null if passed non null");
        expressions[i] = elem;
      }
      return expressions;
    }
开发者ID:tapicer,项目名称:resource-contracts-.net,代码行数:12,代码来源:EmptyVisitor.cs

示例14: AbbreviationDuplicator

        public AbbreviationDuplicator(Method sourceMethod, Method targetMethod, ContractNodes contractNodes,
            Method abbreviation, Expression targetObject, ExpressionList actuals)
            : base(targetMethod.DeclaringType.DeclaringModule, sourceMethod, targetMethod, contractNodes, false)
        {
            this.targetObject = targetObject;
            this.abbreviation = abbreviation;
            this.actuals = actuals;

            this.localsInActuals = new TrivialHashtable();

            PopulateLocalsInActuals();
        }
开发者ID:asvishnyakov,项目名称:CodeContracts,代码行数:12,代码来源:AbbreviationDuplicator.cs

示例15: CopyToTest

 public void CopyToTest()
 {
     ExpressionList<ConstantTypes.Integer> list = new ExpressionList<ConstantTypes.Integer>();
     var zero = new ConstantTypes.Integer(0);
     var one = new ConstantTypes.Integer(1);
     list.Add(zero);
     list.Add(one);
     ConstantTypes.Integer[] array = new ConstantTypes.Integer[2];
     list.CopyTo(array, 0);
     Assert.IsTrue(array.Length == 2);
     Assert.IsTrue(array[0] == zero);
     Assert.IsTrue(array[1] == one);
 }
开发者ID:jgshort,项目名称:SqlDom,代码行数:13,代码来源:ExpressionListTest.cs


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