3#include <system/object_ext.h>
4#include <system/details/pointer_collection_helpers.h>
5#include <system/constraints.h>
6#include <system/collections/keyvalue_pair.h>
7#include <system/collections/ienumerator_ng.h>
8#include <system/collections/ienumerator.h>
9#include <system/collections/ienumerable.h>
12#include "system/text/json/serialization/converters/collection/json_dictionary_converter.h"
13#include "system/text/json/writer/utf8_json_writer.h"
14#include "system/text/json/serialization/json_serializer_options.h"
15#include "system/text/json/serialization/write_stack.h"
16#include "system/text/json/serialization/write_stack_frame.h"
17#include "system/text/json/serialization/json_converter.h"
18#include "system/text/json/serialization/stack_frame_property_state.h"
30template<
typename TDictionary,
typename TKey,
typename TValue>
39 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
40 RTTI_INFO_TEMPLATE_CLASS(
ThisType, ThisTypeBaseTypesInfo);
56 enumerator =
value->GetEnumerator();
58 if (!enumerator->MoveNext())
60 enumerator->Dispose();
66 enumerator = System::ExplicitCast<System::Collections::Generic::IEnumerator<System::Collections::Generic::KeyValuePair<TKey, TValue>>>(state.
Current.
CollectionEnumerator);
83 TKey key = enumerator->get_Current().get_Key();
87 TValue element = enumerator->get_Current().get_Value();
94 }
while (enumerator->MoveNext());
96 enumerator->Dispose();
Interface of object providing enumerator on contained elements.
Definition: ienumerable.h:26
static auto CoalesceAssign(T0 &value, T1 func) -> T0 &
Implementation of '??=' operator translation.
Definition: object_ext.h:748
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
Definition: dictionary_default_converter.h:32
bool get_CanHaveMetadata() override
Definition: dictionary_default_converter.h:46
void SetTemplateWeakPtr(uint32_t argument) override
Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containe...
Definition: dictionary_default_converter.h:100
bool OnWriteResume(System::SharedPtr< Utf8JsonWriter > writer, TDictionary value, System::SharedPtr< JsonSerializerOptions > options, WriteStack &state) override
Definition: dictionary_default_converter.h:51
static bool ShouldFlush(WriteStack &state, System::SharedPtr< Utf8JsonWriter > writer)
bool TryWrite(System::SharedPtr< Utf8JsonWriter > writer, const TDictionary &value, System::SharedPtr< JsonSerializerOptions > options, WriteStack &state)
Definition: json_converter_of_t.h:378
Definition: json_dictionary_converter.h:107
void SetTemplateWeakPtr(uint32_t argument) override
Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containe...
Definition: json_dictionary_converter.h:404
Definition: json_converter.h:45
System::SharedPtr< Object > CollectionEnumerator
Definition: write_stack_frame.h:53
void EndDictionaryEntry()
bool IsWritingExtensionDataProperty
Definition: write_stack_frame.h:55
System::SharedPtr< System::Text::Json::Serialization::Metadata::JsonTypeInfoBase > JsonTypeInfo
Definition: write_stack_frame.h:56
StackFramePropertyState PropertyState
Definition: write_stack_frame.h:60
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