System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (14)
376ThrowHelper.ThrowInvalidOperationException_NoMetadataForTypeProperties(Options.TypeInfoResolver, Type);
514internal JsonNumberHandling EffectiveNumberHandling => _numberHandling ?? Options.NumberHandling;
705Options.MakeReadOnly();
710lock (Options.CacheContext)
741Debug.Assert(Monitor.IsEntered(Options.CacheContext), "Configure called directly, use EnsureConfigured which synchronizes access to this method");
742Debug.Assert(Options.IsReadOnly);
751PolymorphicTypeResolver = new PolymorphicTypeResolver(Options, PolymorphismOptions, Type, Converter.CanHaveMetadata);
766_elementTypeInfo ??= Options.GetTypeInfoInternal(ElementType);
772_keyTypeInfo ??= Options.GetTypeInfoInternal(KeyType);
866if (Options.CanUseFastPathSerializationLogic)
872return OriginatingResolver.IsCompatibleWithOptions(Options);
1024if (Options.TryGetTypeInfoCached(propertyType, out JsonTypeInfo? jsonTypeInfo))
1029jsonPropertyInfo = jsonTypeInfo.CreateJsonPropertyInfo(declaringTypeInfo: this, declaringType, Options);
1038parameters: new object[] { declaringType ?? Type, this, Options })!;
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.cs (1)
143Options)
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.WriteHelpers.cs (14)
45Options.TryGetPolymorphicTypeInfoForRootType(rootValue, out JsonTypeInfo? derivedTypeInfo))
56bool success = EffectiveConverter.WriteCore(writer, rootValue, Options, ref state);
69int flushThreshold = (int)(Options.DefaultBufferSize * JsonSerializer.FlushThreshold);
70return SerializeAsync(new PooledByteBufferWriter(Options.DefaultBufferSize, utf8Json), rootValue, flushThreshold, cancellationToken, rootValueBoxed);
102Utf8JsonWriter writer = Utf8JsonWriterCache.RentWriter(Options, pipeWriter);
140Options.TryGetPolymorphicTypeInfoForRootType(rootValue, out JsonTypeInfo? derivedTypeInfo))
161var writer = new Utf8JsonWriter(pipeWriter, Options.GetWriterOptions());
171isFinalBlock = EffectiveConverter.WriteCore(writer, rootValue, Options, ref state);
265Utf8JsonWriter writer = Utf8JsonWriterCache.RentWriterAndBuffer(Options, out PooledByteBufferWriter bufferWriter);
287Options.TryGetPolymorphicTypeInfoForRootType(rootValue, out JsonTypeInfo? polymorphicTypeInfo))
301using var bufferWriter = new PooledByteBufferWriter(Options.DefaultBufferSize);
302using var writer = new Utf8JsonWriter(bufferWriter, Options.GetWriterOptions());
311isFinalBlock = EffectiveConverter.WriteCore(writer, rootValue, Options, ref state);
366if ((ulong)serializationSize > (ulong)(Options.DefaultBufferSize / 2))