コード例 #1
0
        public static ClassDeclarationSyntax CreateAsInternalStatic(string classTypeName)
        {
            if (classTypeName == null)
            {
                throw new ArgumentNullException(nameof(classTypeName));
            }

            return(SyntaxFactory.ClassDeclaration(classTypeName)
                   .AddModifiers(SyntaxTokenFactory.InternalKeyword(), SyntaxTokenFactory.StaticKeyword()));
        }
コード例 #2
0
        public static SyntaxTokenList InternalStaticKeyword(bool withLeadingLineFeed = false, bool withTrailingSpace = true)
        {
            if (withLeadingLineFeed)
            {
                return(SyntaxFactory.TokenList(
                           SyntaxTokenFactory.CarriageReturnLineFeed(),
                           SyntaxTokenFactory.InternalKeyword(),
                           SyntaxTokenFactory.StaticKeyword(withTrailingSpace)));
            }

            return(SyntaxFactory.TokenList(
                       SyntaxTokenFactory.InternalKeyword(),
                       SyntaxTokenFactory.StaticKeyword(withTrailingSpace)));
        }