6 references to DisplayFormatWithoutNullability
Microsoft.AspNetCore.Http.RequestDelegateGenerator (6)
StaticRouteHandlerModel\Emitters\EndpointJsonPreparationEmitter.cs (2)
18
var typeName = responseType.ToDisplayString(EmitterConstants.
DisplayFormatWithoutNullability
);
41
codeWriter.WriteLine($"var {parameter.SymbolName}_JsonTypeInfo = (JsonTypeInfo<{typeName}>)jsonSerializerOptions.GetTypeInfo(typeof({parameter.Type.ToDisplayString(EmitterConstants.
DisplayFormatWithoutNullability
)}));");
StaticRouteHandlerModel\Emitters\EndpointParameterEmitter.cs (1)
319
codeWriter.WriteLine($"var {endpointParameter.SymbolName}_JsonTypeInfo = (JsonTypeInfo<{endpointParameter.Type.ToDisplayString(EmitterConstants.DisplayFormat)}>)jsonOptions.SerializerOptions.GetTypeInfo(typeof({endpointParameter.Type.ToDisplayString(EmitterConstants.
DisplayFormatWithoutNullability
)}));");
StaticRouteHandlerModel\StaticRouteHandlerModel.Emitter.cs (3)
224
codeWriter.WriteLine($$"""options.EndpointBuilder.Metadata.Add(new ProducesResponseTypeMetadata(statusCode: StatusCodes.Status200OK, type: typeof({{responseType.ToDisplayString(EmitterConstants.
DisplayFormatWithoutNullability
)}}), contentTypes: GeneratedMetadataConstants.JsonContentType));""");
320
codeWriter.WriteLine($$"""options.EndpointBuilder.Metadata.Add(new AcceptsMetadata(type: typeof({{explicitBodyParameter.Type.ToDisplayString(EmitterConstants.
DisplayFormatWithoutNullability
)}}), isOptional: {{(explicitBodyParameter.IsOptional ? "true" : "false")}}, contentTypes: GeneratedMetadataConstants.JsonContentType));""");
332
codeWriter.WriteLine($$"""({{(parameter.IsOptional ? "true" : "false")}}, typeof({{parameter.Type.ToDisplayString(EmitterConstants.
DisplayFormatWithoutNullability
)}})),""");