Exemplo n.º 1
0
        public void VisitConversionOperatorDeclaration(ConversionOperatorDeclarationSyntax node)
        {
            if (node == null)
                throw new ArgumentNullException("node");

            node.Validate();

            WriteLeadingTrivia(node);

            _writer.WriteIndent();

            WriteAttributes(
                node,
                _writer.Configuration.LineBreaksAndWrapping.Other.PlaceMethodAttributeOnSameLine
            );

            WriteMemberModifiers(node.Modifiers);

            _writer.WriteKeyword(node.Kind == ImplicitOrExplicit.Explicit ? PrinterKeyword.Explicit : PrinterKeyword.Implicit);
            _writer.WriteSpace();
            _writer.WriteKeyword(PrinterKeyword.Operator);
            _writer.WriteSpace();
            node.Type.Accept(this);
            node.ParameterList.Accept(this);

            node.Body.Accept(this);

            WriteTrailingTrivia(node);
        }