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