Esempio n. 1
0
        private static SyntaxTokenList UpdateDeclarationAccessibility(SyntaxTokenList modifiersList, Accessibility newAccessibility, CodeGenerationOptions options)
        {
            var newModifierTokens = new List <SyntaxToken>();

            CSharpCodeGenerationHelpers.AddAccessibilityModifiers(newAccessibility, newModifierTokens, options, Accessibility.NotApplicable);
            if (newModifierTokens.Count == 0)
            {
                return(modifiersList);
            }

            return(GetUpdatedDeclarationAccessibilityModifiers(newModifierTokens, modifiersList, (SyntaxToken modifier) => SyntaxFacts.IsAccessibilityModifier(modifier.Kind()))
                   .ToSyntaxTokenList());
        }
Esempio n. 2
0
 public override CodeGenerationDestination GetDestination(SyntaxNode node)
 {
     return(CSharpCodeGenerationHelpers.GetDestination(node));
 }