3#include <system/type_info.h>
4#include <system/span.h>
5#include <system/object_ext.h>
6#include <system/func.h>
7#include <system/diagnostics/debug.h>
8#include <system/details/pointer_collection_helpers.h>
9#include <system/details/patterns.h>
10#include <system/constraints.h>
11#include <system/collections/ienumerator.h>
12#include <system/array.h>
15#include "system/text/json/serialization/converters/object/object_with_parameterized_constructor_converter.h"
16#include "system/text/json/serialization/read_stack.h"
17#include "system/text/json/reader/utf8_json_reader.h"
18#include "system/text/json/serialization/json_converter.h"
19#include "system/text/json/serialization/json_serializer_options.h"
20#include "system/text/json/throw_helper.h"
21#include "system/text/json/serialization/read_stack_frame.h"
22#include "system/text/json/serialization/argument_state.h"
40 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
41 RTTI_INFO_TEMPLATE_CLASS(
ThisType, ThisTypeBaseTypesInfo);
63 bool success = jsonParameterInfo->get_EffectiveConverter()->TryReadAsObject(
System::Ref(reader), jsonParameterInfo->get_ParameterType(), jsonParameterInfo->get_Options(),
System::Ref(state), arg);
65 if (success && !(arg ==
nullptr && jsonParameterInfo->get_IgnoreNullTokensOnRead()))
67 (System::ExplicitCast<System::Array<System::SharedPtr<System::Object>>>(state.
Current.
CtorArgumentState->Arguments))[jsonParameterInfo->get_Position()] = arg;
88 ASPOSE_UNUSED(options);
93 auto parameterInfo_enumerator = (typeInfo->get_ParameterCache()).GetEnumerator();
94 while (parameterInfo_enumerator.MoveNext())
96 auto&& parameterInfo = parameterInfo_enumerator.get_Current();
98 arguments[parameterInfo->get_Position()] = parameterInfo->get_EffectiveDefaultValue();
Provides a thread-safe pool for reusing managed array instances (ArrayPtr<T>).
Definition: array_pool.h:21
void Return(const ArrayPtr< T > &array, bool clearArray=false)
Returns a previously rented buffer back to the pool.
Definition: array_pool.h:104
ArrayPtr< T > Rent(int32_t minimumLength)
Obtains a buffer that is at least minimumLength long.
Definition: array_pool.h:68
Function delegate. This type should be allocated on stack and passed to functions by value or by refe...
Definition: func.h:82
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
Definition: read_stack_frame.h:42
System::SharedPtr< ArgumentState > CtorArgumentState
Definition: read_stack_frame.h:72
System::SharedPtr< System::Text::Json::Serialization::Metadata::JsonTypeInfoBase > JsonTypeInfo
Definition: read_stack_frame.h:60
Definition: read_stack.h:35
ReadStackFrame Current
Definition: read_stack.h:44
Definition: object_with_parameterized_constructor_converter_large.h:36
bool ReadAndCacheConstructorArgument(ReadStack &state, Utf8JsonReader &reader, System::SharedPtr< Metadata::JsonParameterInfoBase > jsonParameterInfo) override
Definition: object_with_parameterized_constructor_converter_large.h:60
System::SharedPtr< Object > CreateObject(ReadStackFrame &frame) override
Definition: object_with_parameterized_constructor_converter_large.h:73
void SetTemplateWeakPtr(uint32_t argument) override
Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containe...
Definition: object_with_parameterized_constructor_converter_large.h:47
void InitializeConstructorArgumentCaches(ReadStack &state, System::SharedPtr< JsonSerializerOptions > options) override
Definition: object_with_parameterized_constructor_converter_large.h:86
Definition: object_with_parameterized_constructor_converter.h:64
void SetTemplateWeakPtr(uint32_t argument) override
Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containe...
Definition: object_with_parameterized_constructor_converter.h:293
Definition: json_object_converter.h:19
Definition: json_resumable_converter_of_t.h:42
Definition: utf8_json_reader.h:78
@ Text
Defines color adjustment information for text.
Definition: db_command.h:9
decltype(Ref(std::declval< T & >())) Ref(const std::reference_wrapper< T > &wrapper)
Wrapper to make sure Ref(std::ref(DynamicWeakPtr)) works.
Definition: dynamic_weak_ptr.h:207