3#include <system/object_ext.h>
4#include <system/details/pointer_collection_helpers.h>
5#include <system/constraints.h>
6#include <system/collections/ienumerator_ng.h>
7#include <system/collections/ienumerator.h>
8#include <system/collections/ienumerable.h>
11#include "system/text/json/serialization/converters/collection/json_collection_converter.h"
12#include "system/text/json/writer/utf8_json_writer.h"
13#include "system/text/json/serialization/json_serializer_options.h"
14#include "system/text/json/serialization/write_stack.h"
15#include "system/text/json/serialization/write_stack_frame.h"
16#include "system/text/json/serialization/json_converter.h"
28template<
typename TCollection,
typename TElement>
37 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
38 RTTI_INFO_TEMPLATE_CLASS(
ThisType, ThisTypeBaseTypesInfo);
72 enumerator =
value->GetEnumerator();
74 if (!enumerator->MoveNext())
76 enumerator->Dispose();
94 TElement element = enumerator->get_Current();
95 if (!converter->TryWrite(writer, element, options,
System::Ref(state)))
101 }
while (enumerator->MoveNext());
103 enumerator->Dispose();
Interface of object providing enumerator on contained elements.
Definition: ienumerable.h:26
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
Definition: i_enumerable_default_converter.h:30
void SetTemplateWeakPtr(uint32_t argument) override
Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containe...
Definition: i_enumerable_default_converter.h:49
bool OnWriteResume(System::SharedPtr< Utf8JsonWriter > writer, TCollection value, System::SharedPtr< JsonSerializerOptions > options, WriteStack &state) override
Definition: i_enumerable_default_converter.h:66
bool get_CanHaveMetadata() override
Definition: i_enumerable_default_converter.h:44
Definition: json_collection_converter.h:43
static System::SharedPtr< JsonConverter< TElement > > GetElementConverter(System::SharedPtr< Metadata::JsonTypeInfoBase > elementTypeInfo)
Definition: json_collection_converter.h:358
void SetTemplateWeakPtr(uint32_t argument) override
Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containe...
Definition: json_collection_converter.h:316
static bool ShouldFlush(WriteStack &state, System::SharedPtr< Utf8JsonWriter > writer)
System::SharedPtr< Object > CollectionEnumerator
Definition: write_stack_frame.h:53
void EndCollectionElement()
Definition: write_stack.h:34
WriteStackFrame Current
Definition: write_stack.h:45
@ 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