IsDefined() public method

public IsDefined ( string id ) : DefineState
id string
return DefineState
示例#1
0
        private IfDefDirectiveTriviaSyntax ParseIfDefDirective(SyntaxToken hash, SyntaxToken keyword, bool isActive)
        {
            var name = Match(SyntaxKind.IdentifierToken);
            var eod  = ParseEndOfDirective(false);

            var isTrue      = _directiveStack.IsDefined(name.Text) == DefineState.Defined;
            var branchTaken = isActive && isTrue;

            return(new IfDefDirectiveTriviaSyntax(
                       hash, keyword, name, eod,
                       isActive, branchTaken, isTrue));
        }