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