System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (16)
378ThrowHelper.ThrowInvalidOperationException_NoMetadataForTypeProperties(Options.TypeInfoResolver, Type);
516internal JsonNumberHandling EffectiveNumberHandling => _numberHandling ?? Options.NumberHandling;
707Options.MakeReadOnly();
712lock (Options.CacheContext)
743Debug.Assert(Monitor.IsEntered(Options.CacheContext), "Configure called directly, use EnsureConfigured which synchronizes access to this method");
744Debug.Assert(Options.IsReadOnly);
753PolymorphicTypeResolver = new PolymorphicTypeResolver(Options, PolymorphismOptions, Type, Converter.CanHaveMetadata);
768_elementTypeInfo ??= Options.GetTypeInfoInternal(ElementType);
774_keyTypeInfo ??= Options.GetTypeInfoInternal(KeyType);
868if (Options.CanUseFastPathSerializationLogic)
874return OriginatingResolver.IsCompatibleWithOptions(Options);
1009if (Options.TryGetTypeInfoCached(propertyType, out JsonTypeInfo? jsonTypeInfo))
1014jsonPropertyInfo = jsonTypeInfo.CreateJsonPropertyInfo(declaringTypeInfo: this, declaringType, Options);
1023parameters: new object[] { declaringType ?? Type, this, Options })!;
1073StringComparer comparer = Options.PropertyNameCaseInsensitive ? StringComparer.OrdinalIgnoreCase : StringComparer.Ordinal;
1141? Options.UnmappedMemberHandling
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.cs (1)
143Options)
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.WriteHelpers.cs (13)
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);
268Utf8JsonWriter writer = Utf8JsonWriterCache.RentWriterAndBuffer(Options, out PooledByteBufferWriter bufferWriter);
290Options.TryGetPolymorphicTypeInfoForRootType(rootValue, out JsonTypeInfo? polymorphicTypeInfo))
304Utf8JsonWriter writer = Utf8JsonWriterCache.RentWriterAndBuffer(Options, out PooledByteBufferWriter bufferWriter);
314isFinalBlock = EffectiveConverter.WriteCore(writer, rootValue, Options, ref state);
374if ((ulong)serializationSize > (ulong)(Options.DefaultBufferSize / 2))