コード例 #1
0
        /// <summary>
        ///   Normalizes the <paramref name="declaration" />.
        /// </summary>
        public override SyntaxNode VisitConstructorDeclaration(ConstructorDeclarationSyntax declaration)
        {
            var methodSymbol = declaration.GetMethodSymbol(SemanticModel);

            if (!methodSymbol.ContainingType.IsFaultEffect(SemanticModel))
            {
                return(declaration);
            }

            try
            {
                _inConstructor = true;
                return(base.VisitConstructorDeclaration(declaration));
            }
            finally
            {
                _inConstructor = false;
            }
        }