1 instantiation of ContextGenerationSpec
System.Text.Json.SourceGeneration (1)
JsonSourceGenerator.Parser.cs (1)
180ContextGenerationSpec contextGenSpec = new()
32 references to ContextGenerationSpec
System.Text.Json.SourceGeneration (32)
JsonSourceGenerator.Emitter.cs (24)
100public void Emit(ContextGenerationSpec contextGenerationSpec) 138private static SourceWriter CreateSourceWriterWithContextHeader(ContextGenerationSpec contextSpec, bool isPrimaryContextSourceFile = false, string? interfaceImplementation = null, IReadOnlyCollection<string>? experimentalDiagnosticIds = null) 204private static List<string>? GetContextExperimentalDiagnosticIds(ContextGenerationSpec contextSpec) 243private SourceText? GenerateTypeInfo(ContextGenerationSpec contextSpec, TypeGenerationSpec typeGenerationSpec) 281private static SourceText GenerateForTypeWithBuiltInConverter(ContextGenerationSpec contextSpec, TypeGenerationSpec typeMetadata) 298private static SourceText GenerateForTypeWithCustomConverter(ContextGenerationSpec contextSpec, TypeGenerationSpec typeMetadata) 319private static SourceText GenerateForNullable(ContextGenerationSpec contextSpec, TypeGenerationSpec typeMetadata) 340private static SourceText GenerateForUnsupportedType(ContextGenerationSpec contextSpec, TypeGenerationSpec typeMetadata) 356private static SourceText GenerateForEnum(ContextGenerationSpec contextSpec, TypeGenerationSpec typeMetadata) 372private SourceText GenerateForCollection(ContextGenerationSpec contextSpec, TypeGenerationSpec typeGenerationSpec) 554private SourceText GenerateForObject(ContextGenerationSpec contextSpec, TypeGenerationSpec typeMetadata) 673private static SourceText GenerateForUnion(ContextGenerationSpec contextSpec, TypeGenerationSpec typeMetadata) 829private void GeneratePropMetadataInitFunc(SourceWriter writer, ContextGenerationSpec contextSpec, string propInitMethodName, TypeGenerationSpec typeGenerationSpec) 972private static string GetUnboxExpression(ContextGenerationSpec contextSpec, string declaringTypeFQN) 979ContextGenerationSpec contextSpec, 1029ContextGenerationSpec contextSpec, 1067ContextGenerationSpec contextSpec, 1106private static bool GeneratePropertyAccessors(SourceWriter writer, ContextGenerationSpec contextSpec, TypeGenerationSpec typeGenerationSpec) 1395private static void GenerateConstructorAccessor(SourceWriter writer, ContextGenerationSpec contextSpec, TypeGenerationSpec typeSpec) 1608private void GenerateFastPathFuncForObject(SourceWriter writer, ContextGenerationSpec contextSpec, string serializeMethodName, TypeGenerationSpec typeGenSpec) 1963private static SerializedValueCheckType GetCheckType(ContextGenerationSpec contextSpec, PropertyGenerationSpec propertySpec) 2038private static SourceText GetRootJsonContextImplementation(ContextGenerationSpec contextSpec, bool emitGetConverterForNullablePropertyMethod, bool emitValueTypeSetterDelegate, bool emitByteArrayValueHelper) 2348private static SourceText GetGetTypeInfoImplementation(ContextGenerationSpec contextSpec) 2390private SourceText GetPropertyNameInitialization(ContextGenerationSpec contextSpec)
JsonSourceGenerator.Parser.cs (2)
93public ContextGenerationSpec? ParseContextGenerationSpec(ClassDeclarationSyntax contextClassDeclaration, SemanticModel semanticModel, CancellationToken cancellationToken) 180ContextGenerationSpec contextGenSpec = new()
JsonSourceGenerator.Roslyn4.0.cs (5)
34IncrementalValuesProvider<(ContextGenerationSpec?, ImmutableArray<Diagnostic>)> contextGenerationSpecs = context.SyntaxProvider 55ContextGenerationSpec? contextGenerationSpec = parser.ParseContextGenerationSpec(tuple.Left.ContextClass, tuple.Left.SemanticModel, cancellationToken); 76IncrementalValuesProvider<ContextGenerationSpec?> sourceGenerationSpecs = 93private void EmitSource(SourceProductionContext sourceProductionContext, ContextGenerationSpec? contextGenerationSpec) 131public Action<ImmutableArray<ContextGenerationSpec>>? OnSourceEmitting { get; init; }
Model\PropertyGenerationSpec.cs (1)
201public bool ShouldIncludePropertyForFastPath(ContextGenerationSpec contextSpec)