1 write to Context
Microsoft.CodeAnalysis.Workspaces (1)
CodeGenerationContextInfo.cs (1)
18Context = context;
46 references to Context
Microsoft.CodeAnalysis.CSharp.Workspaces (21)
AttributeGenerator.cs (2)
25if (info.Context.MergeAttributes) 67if (!info.Context.MergeAttributes)
ConstructorGenerator.cs (1)
53var hasNoBody = !info.Context.GenerateMethodBodies;
ConversionGenerator.cs (1)
47var hasNoBody = !info.Context.GenerateMethodBodies || method.IsExtern;
CSharpCodeGenerationContextInfo.cs (1)
35=> (Context == value) ? this : new(value, Options, Service, LanguageVersion);
CSharpCodeGenerationHelpers.cs (3)
39if (!info.Context.GenerateDefaultAccessibility && accessibility == defaultAccessibility) 250if (!info.Context.GenerateDocumentationComments || node.GetLeadingTrivia().Any(t => t.IsDocComment())) 270if (info.Context.ReuseSyntax && symbol.DeclaringSyntaxReferences.Length == 1)
CSharpCodeGenerationService.cs (3)
504else if (destinationMember is CompilationUnitSyntax compilationUnit && info.Context.BestLocation is null) 535var location = info.Context.BestLocation; 549if (info.Context.BeforeThisLocation != null)
DestructorGenerator.cs (1)
47var hasNoBody = !info.Context.GenerateMethodBodies;
EventGenerator.cs (2)
104var declaration = !info.Context.GenerateMethodBodies || @event.IsAbstract || @event.AddMethod == null || @event.RemoveMethod == null 157var hasBody = info.Context.GenerateMethodBodies && HasAccessorBodies(@event, destination, accessor);
MethodGenerator.cs (1)
116var hasNoBody = !info.Context.GenerateMethodBodies || method.IsAbstract;
NamedTypeGenerator.cs (3)
89info = info.WithContext(info.Context.With(autoInsertionLocation: false, sortMembers: false)); 91if (info.Context.GenerateMembers && namedType.TypeKind != TypeKind.Delegate) 105if (!info.Context.GenerateMembers)
NamespaceGenerator.cs (1)
77declaration = info.Context.GenerateMembers
OperatorGenerator.cs (1)
76var hasNoBody = !info.Context.GenerateMethodBodies || method.IsExtern || method.IsAbstract;
PropertyGenerator.cs (1)
279var hasBody = info.Context.GenerateMethodBodies && HasAccessorBodies(property, destination, accessor);
Microsoft.CodeAnalysis.VisualBasic.Workspaces (13)
CodeGeneration\ConstructorGenerator.vb (1)
44Dim hasNoBody = Not options.Context.GenerateMethodBodies
CodeGeneration\ConversionGenerator.vb (1)
57Dim hasNoBody = Not options.Context.GenerateMethodBodies OrElse
CodeGeneration\EventGenerator.vb (1)
79If options.Context.GenerateMethodBodies AndAlso
CodeGeneration\MethodGenerator.vb (1)
87Dim hasNoBody = Not options.Context.GenerateMethodBodies OrElse
CodeGeneration\NamedTypeGenerator.vb (1)
53declaration = If(options.Context.GenerateMembers AndAlso namedType.TypeKind <> TypeKind.Delegate,
CodeGeneration\NamespaceGenerator.vb (1)
51declaration = If(options.Context.GenerateMembers,
CodeGeneration\OperatorGenerator.vb (1)
52Dim hasNoBody = Not options.Context.GenerateMethodBodies OrElse
CodeGeneration\PropertyGenerator.vb (1)
85Not options.Context.GenerateMethodBodies OrElse
CodeGeneration\VisualBasicCodeGenerationHelpers.vb (3)
21If Not options.Context.GenerateDefaultAccessibility Then 182If Not options.Context.GenerateDocumentationComments OrElse node.GetLeadingTrivia().Any(Function(t) t.IsKind(SyntaxKind.DocumentationCommentTrivia)) Then 201If options.Context.ReuseSyntax AndAlso symbol.DeclaringSyntaxReferences.Length = 1 Then
CodeGeneration\VisualBasicCodeGenerationService.vb (2)
498Dim location = options.Context.BestLocation 511If options.Context.BeforeThisLocation IsNot Nothing Then
Microsoft.CodeAnalysis.Workspaces (12)
AbstractCodeGenerationService.cs (4)
72return info.Context.AddImports 288return info.Context.AutoInsertionLocation 316if (!GeneratingEnum(members) && info.Context.SortMembers) 389return (TCodeGenerationContextInfo)info.WithContext(info.Context.With(afterThisLocation: null, beforeThisLocation: null));
CodeGenerationHelpers.cs (8)
55if (info.Context.GenerateMembers && info.Context.MergeNestedNamespaces && @namespace.Name != string.Empty) 184return info.Context.ReuseSyntax && attribute.ApplicationSyntaxReference != null 203if (info.Context.AfterThisLocation?.SourceTree is { } afterSourceTree && 206var afterMember = declarationList.LastOrDefault(m => m.SpanStart <= info.Context.AfterThisLocation.SourceSpan.Start); 219if (info.Context.BeforeThisLocation?.SourceTree is { } beforeSourceTree && 222var beforeMember = declarationList.FirstOrDefault(m => m.Span.End >= info.Context.BeforeThisLocation.SourceSpan.End); 234if (info.Context.AutoInsertionLocation)