Esempio n. 1
0
        /// <summary>
        /// Create a member statement with the supplied identifier
        /// </summary>
        /// <param name="identifier">The identifier</param>
        /// <returns>A statement with the identifier</returns>
        public MemberStatement CreateMemberStatement(String identifier)
        {
            IList <TokenBase> input = new List <TokenBase>();

            input.Add(TokenCreator.Create <PrivateModifierToken>());
            input.Add(TokenCreator.Create <SpaceToken>());
            input.Add(TokenCreator.Create <IdentifierToken>("String"));
            input.Add(TokenCreator.Create <SpaceToken>());
            input.Add(TokenCreator.Create <IdentifierToken>(identifier));
            input.Add(TokenCreator.Create <SemiColonToken>());

            return(new MemberStatement(input, Context));
        }
Esempio n. 2
0
        public MethodStatement CreateMethodStatement()
        {
            IList <TokenBase> input = new List <TokenBase>();

            input.Add(TokenCreator.Create <PrivateModifierToken>());
            input.Add(TokenCreator.Create <SpaceToken>());
            input.Add(TokenCreator.Create <IdentifierToken>("test"));
            input.Add(TokenCreator.Create <SpaceToken>());
            input.Add(TokenCreator.Create <IdentifierToken>("MyMethod"));
            input.Add(TokenCreator.Create <OpenRoundBracketToken>());
            input.Add(TokenCreator.Create <CloseRoundBracketToken>());
            return(new MethodStatement(input, Context));
        }