CreateNewConstructor() public method

public CreateNewConstructor ( string className ) : Microsoft.CodeAnalysis.CSharp.Syntax.ConstructorDeclarationSyntax
className string
return Microsoft.CodeAnalysis.CSharp.Syntax.ConstructorDeclarationSyntax
        public override SyntaxNode VisitClassDeclaration(ClassDeclarationSyntax node)
        {
            // needed to evaluate whether type names can be reduced (depends on the using statements in the file)
            var positionOfClassInSourceFile = node.GetLocation().SourceSpan.Start;
            // strategy to implement constructor injection
            _injectMixinIntoConstructor = new InjectConstructorImplementationStrategy(
                _mixin, _semantic, positionOfClassInSourceFile);

            // base handling will call other visitors
            var classDeclaration = (ClassDeclarationSyntax)base.VisitClassDeclaration(node);

            // create a new constructor and add it to the class declaration
            if (!_SourceClassHasConstructor)
                classDeclaration = classDeclaration.AddMembers(
                    _injectMixinIntoConstructor.CreateNewConstructor(classDeclaration.Identifier.Text));

            return classDeclaration;
        }