1 write to IsReadOnly
System.Text.Json (1)
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (1)
347public void MakeReadOnly() => IsReadOnly = true;
18 references to IsReadOnly
Microsoft.Extensions.AI.Abstractions (1)
src\Shared\JsonSchemaExporter\JsonSchemaExporter.cs (1)
104Debug.Assert(typeInfo.IsReadOnly, "The specified contract must have been made read-only.");
Shared (1)
JsonSchemaExporter\JsonSchemaExporter.cs (1)
104Debug.Assert(typeInfo.IsReadOnly, "The specified contract must have been made read-only.");
System.Text.Json (16)
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (2)
98Debug.Assert(!typeInfo.IsReadOnly); 147Debug.Assert(!typeInfo.IsReadOnly);
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Helpers.cs (1)
119Debug.Assert(!typeInfo.IsReadOnly);
System\Text\Json\Serialization\Metadata\JsonPolymorphismOptions.cs (1)
97public override bool IsReadOnly => _parent.DeclaringTypeInfo?.IsReadOnly == true;
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (11)
280Debug.Assert(!IsReadOnly); 402Debug.Assert(!IsReadOnly); 428Debug.Assert(!IsReadOnly); 660Debug.Assert(!IsReadOnly); 674if (IsReadOnly) 745Debug.Assert(IsReadOnly); 820Debug.Assert(IsReadOnly); 1240Debug.Assert(!IsReadOnly); 1252Debug.Assert(!IsReadOnly); 1280Debug.Assert(!IsReadOnly); 1366public override bool IsReadOnly => _jsonTypeInfo._properties == this && _jsonTypeInfo.IsReadOnly || _jsonTypeInfo.Kind != JsonTypeInfoKind.Object;
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.cs (1)
132Debug.Assert(!IsReadOnly, "We should not mutate read-only JsonTypeInfo");