1 write to IsReadOnly
System.Text.Json (1)
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (1)
347public void MakeReadOnly() => IsReadOnly = true;
16 references to IsReadOnly
System.Text.Json (16)
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (2)
98Debug.Assert(!typeInfo.IsReadOnly); 161Debug.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); 1236Debug.Assert(!IsReadOnly); 1248Debug.Assert(!IsReadOnly); 1276Debug.Assert(!IsReadOnly); 1364public 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");