Ejemplo n.º 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()));
        }
Ejemplo n.º 2
0
        public static SyntaxTokenList ProtectedStaticKeyword(bool withLeadingLineFeed = false, bool withTrailingSpace = true)
        {
            if (withLeadingLineFeed)
            {
                return(SyntaxFactory.TokenList(
                           SyntaxTokenFactory.CarriageReturnLineFeed(),
                           SyntaxTokenFactory.ProtectedKeyword(),
                           SyntaxTokenFactory.StaticKeyword(withTrailingSpace)));
            }

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