12 references to WithIsReadOnly
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\Analyzers\CSharp\CodeFixes\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableCodeFixProvider.cs (1)
60editor.SetModifiers(fieldDeclaration, fieldDeclarationModifiers.WithIsReadOnly(false));
src\Analyzers\CSharp\CodeFixes\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyCodeFixProvider.cs (1)
102return (TNode)generator.WithModifiers(node, generator.GetModifiers(node).WithIsReadOnly(add));
src\Analyzers\CSharp\CodeFixes\MakeStructReadOnly\CSharpMakeStructReadOnlyCodeFixProvider.cs (1)
46(current, generator) => generator.WithModifiers(current, generator.GetModifiers(current).WithIsReadOnly(true)));
Microsoft.CodeAnalysis.CSharp.Features (4)
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (1)
575declarationModifiers = declarationModifiers.WithIsReadOnly(true);
src\Analyzers\CSharp\CodeFixes\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableCodeFixProvider.cs (1)
60editor.SetModifiers(fieldDeclaration, fieldDeclarationModifiers.WithIsReadOnly(false));
src\Analyzers\CSharp\CodeFixes\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyCodeFixProvider.cs (1)
102return (TNode)generator.WithModifiers(node, generator.GetModifiers(node).WithIsReadOnly(add));
src\Analyzers\CSharp\CodeFixes\MakeStructReadOnly\CSharpMakeStructReadOnlyCodeFixProvider.cs (1)
46(current, generator) => generator.WithModifiers(current, generator.GetModifiers(current).WithIsReadOnly(true)));
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
178modifiers = modifiers.IsConst ? modifiers.WithIsReadOnly(false) : modifiers;
Microsoft.CodeAnalysis.VisualBasic.Features (1)
UseAutoProperty\VisualBasicUseAutoPropertyCodeFixProvider.vb (1)
63statement = DirectCast(generator.WithModifiers(statement, generator.GetModifiers(propertyDeclaration).WithIsReadOnly(canBeReadOnly)), PropertyStatementSyntax)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
CodeGeneration\VisualBasicSyntaxGenerator.vb (2)
678modifiers = If(modifiers.IsConst(), modifiers.WithIsReadOnly(False), modifiers) 881propertyBlock = DirectCast(WithModifiers(propertyBlock, GetModifiers(propertyBlock).WithIsReadOnly(False).WithIsWriteOnly(False)), PropertyBlockSyntax)
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
147result = result.WithIsReadOnly(true);