1 write to Context
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
CodeGenerationContextInfo.cs (1)
18Context = context;
33 references to Context
Microsoft.CodeAnalysis.CodeStyle.Fixes (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)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (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);