Microsoft.CSharp.RuntimeBinder.Semantics.ExprFactory.CreateQuestionMark C# (CSharp) Method

CreateQuestionMark() public method

public CreateQuestionMark ( EXPR pTestExpression, Microsoft.CSharp.RuntimeBinder.Semantics.EXPRBINOP pConsequence ) : Microsoft.CSharp.RuntimeBinder.Semantics.EXPRQUESTIONMARK
pTestExpression EXPR
pConsequence Microsoft.CSharp.RuntimeBinder.Semantics.EXPRBINOP
return Microsoft.CSharp.RuntimeBinder.Semantics.EXPRQUESTIONMARK
        public EXPRQUESTIONMARK CreateQuestionMark(EXPR pTestExpression, EXPRBINOP pConsequence)
        {
            Debug.Assert(pTestExpression != null);
            Debug.Assert(pConsequence != null);

            CType pType = pConsequence.type;
            if (pType == null)
            {
                Debug.Assert(pConsequence.GetOptionalLeftChild() != null);
                pType = pConsequence.GetOptionalLeftChild().type;
                Debug.Assert(pType != null);
            }
            EXPRQUESTIONMARK pResult = new EXPRQUESTIONMARK();
            pResult.kind = ExpressionKind.EK_QUESTIONMARK;
            pResult.type = pType;
            pResult.flags = 0;
            pResult.SetTestExpression(pTestExpression);
            pResult.SetConsequence(pConsequence);
            Debug.Assert(pResult != null);
            return pResult;
        }