/// <summary> /// Copy initializes a new instance of the <see cref="ConstructorDefinitionTranslationUnitFactory"/> class. /// </summary> /// <param name="other"></param> /// <remarks> /// For testability. /// </remarks> public ConstructorDefinitionTranslationUnitFactory(ConstructorDefinitionTranslationUnitFactory other) : base(other) { this.createWhenProtected = other.createWhenProtected; }
/// <summary> /// Copy initializes a new instance of the <see cref="ConstructorDefinitionTranslationUnitFactory"/> class. /// </summary> /// <param name="other"></param> /// <remarks> /// For testability. /// </remarks> public ConstructorDefinitionTranslationUnitFactory(ConstructorDefinitionTranslationUnitFactory other) : base(other) { this.createWhenProtected = other.createWhenProtected; }
/// <summary> /// /// </summary> /// <param name="node"></param> public override void VisitConstructorDeclaration(ConstructorDeclarationSyntax node) { var constructorDefinitionTranslationUnit = new ConstructorDefinitionTranslationUnitFactory(node, this.semanticModel, this.generateTranslationUniOnProtectedMembers).Create(); if (constructorDefinitionTranslationUnit == null) { // When the factory returns null, then the member is not exposed, thus we do not generate it in the translation tree return; } this.classDeclaration.AddConstructorDeclaration(constructorDefinitionTranslationUnit); this.InvokeConstructorDeclarationVisited(this, new WalkerEventArgs()); }