Beispiel #1
0
        public override void VisitDelegateDeclaration(DelegateDeclaration delegateDeclaration)
        {
            ForceSpacesBefore(delegateDeclaration.LParToken, policy.SpaceBeforeDelegateDeclarationParentheses);
            if (delegateDeclaration.Parameters.Any())
            {
                ForceSpacesAfter(delegateDeclaration.LParToken, policy.SpaceWithinDelegateDeclarationParentheses);
                ForceSpacesBefore(delegateDeclaration.RParToken, policy.SpaceWithinDelegateDeclarationParentheses);
            }
            else
            {
                ForceSpacesAfter(delegateDeclaration.LParToken, policy.SpaceBetweenEmptyDelegateDeclarationParentheses);
                ForceSpacesBefore(delegateDeclaration.RParToken, policy.SpaceBetweenEmptyDelegateDeclarationParentheses);
            }
            FormatCommas(delegateDeclaration, policy.SpaceBeforeDelegateDeclarationParameterComma, policy.SpaceAfterDelegateDeclarationParameterComma);

            base.VisitDelegateDeclaration(delegateDeclaration);
        }
Beispiel #2
0
 void IAstVisitor.VisitDelegateDeclaration(DelegateDeclaration delegateDeclaration)
 {
     Visit(EnterDelegateDeclaration, LeaveDelegateDeclaration, delegateDeclaration);
 }