7 writes to CreateObject
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
Internal\Json\MessageTypeInfoResolver.cs (1)
34
typeInfo.
CreateObject
= () => Activator.CreateInstance(type)!;
System.Text.Json (6)
System\Text\Json\Serialization\Converters\Collection\ICollectionOfTConverter.cs (1)
46
jsonTypeInfo.
CreateObject
= () => new List<TElement>();
System\Text\Json\Serialization\Converters\Collection\IDictionaryConverter.cs (1)
105
jsonTypeInfo.
CreateObject
= () => new Dictionary<string, object?>();
System\Text\Json\Serialization\Converters\Collection\IDictionaryOfTKeyTValueConverter.cs (1)
48
jsonTypeInfo.
CreateObject
= () => new Dictionary<TKey, TValue>();
System\Text\Json\Serialization\Converters\Collection\IListConverter.cs (1)
85
jsonTypeInfo.
CreateObject
= () => new List<object?>();
System\Text\Json\Serialization\Converters\Collection\IListOfTConverter.cs (1)
46
jsonTypeInfo.
CreateObject
= () => new List<TElement>();
System\Text\Json\Serialization\Converters\Collection\ISetOfTConverter.cs (1)
43
jsonTypeInfo.
CreateObject
= () => new HashSet<TElement>();
26 references to CreateObject
Shared (1)
JsonSchemaExporter\JsonSchemaExporter.ReflectionHelpers.cs (1)
151
typeInfo.
CreateObject
is null && // Ensure that a default constructor isn't being used
System.Text.Json (25)
System\Text\Json\Serialization\Converters\Collection\ICollectionOfTConverter.cs (1)
43
if (jsonTypeInfo.
CreateObject
is null && Type.IsAssignableFrom(typeof(List<TElement>)))
System\Text\Json\Serialization\Converters\Collection\IDictionaryConverter.cs (1)
102
if (jsonTypeInfo.
CreateObject
is null && Type.IsAssignableFrom(typeof(Dictionary<string, object?>)))
System\Text\Json\Serialization\Converters\Collection\IDictionaryOfTKeyTValueConverter.cs (1)
45
if (jsonTypeInfo.
CreateObject
is null && Type.IsAssignableFrom(typeof(Dictionary<TKey, TValue>)))
System\Text\Json\Serialization\Converters\Collection\IListConverter.cs (1)
82
if (jsonTypeInfo.
CreateObject
is null && Type.IsAssignableFrom(typeof(List<object?>)))
System\Text\Json\Serialization\Converters\Collection\IListOfTConverter.cs (1)
43
if (jsonTypeInfo.
CreateObject
is null && Type.IsAssignableFrom(typeof(List<TElement>)))
System\Text\Json\Serialization\Converters\Collection\ISetOfTConverter.cs (1)
40
if (jsonTypeInfo.
CreateObject
is null && Type.IsAssignableFrom(typeof(HashSet<TElement>)))
System\Text\Json\Serialization\Converters\Collection\JsonCollectionConverter.cs (2)
35
if (typeInfo.
CreateObject
is null)
40
state.Current.ReturnValue = typeInfo.
CreateObject
();
System\Text\Json\Serialization\Converters\Collection\JsonDictionaryConverter.cs (2)
50
if (typeInfo.
CreateObject
is null)
55
state.Current.ReturnValue = typeInfo.
CreateObject
();
System\Text\Json\Serialization\Converters\Collection\ListOfTConverter.cs (2)
28
if (state.Current.JsonTypeInfo.
CreateObject
== null)
33
state.Current.ReturnValue = state.Current.JsonTypeInfo.
CreateObject
();
System\Text\Json\Serialization\Converters\Collection\QueueOfTConverter.cs (2)
26
if (state.Current.JsonTypeInfo.
CreateObject
== null)
31
state.Current.ReturnValue = state.Current.JsonTypeInfo.
CreateObject
();
System\Text\Json\Serialization\Converters\Collection\StackOfTConverter.cs (2)
27
if (state.Current.JsonTypeInfo.
CreateObject
== null)
32
state.Current.ReturnValue = state.Current.JsonTypeInfo.
CreateObject
();
System\Text\Json\Serialization\Converters\Collection\StackOrQueueConverter.cs (1)
31
Func<object>? constructorDelegate = typeInfo.
CreateObject
;
System\Text\Json\Serialization\Converters\Object\ObjectDefaultConverter.cs (4)
41
if (jsonTypeInfo.
CreateObject
== null)
46
obj = jsonTypeInfo.
CreateObject
();
117
if (jsonTypeInfo.
CreateObject
== null)
122
obj = jsonTypeInfo.
CreateObject
();
System\Text\Json\Serialization\JsonConverter.cs (1)
60
/// Indicates that the converter can consume the <see cref="JsonTypeInfo.
CreateObject
"/> delegate.
System\Text\Json\Serialization\JsonSerializer.Read.HandlePropertyName.cs (1)
129
Func<object>? createObjectForExtensionDataProp = jsonPropertyInfo.JsonTypeInfo.
CreateObject
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Helpers.cs (1)
44
typeInfo.CreateObjectForExtensionDataProperty = ((JsonTypeInfo)typeInfo).
CreateObject
;
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (1)
886
=> Converter.ConstructorIsParameterized &&
CreateObject
is null;