CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
date_time_converter.h
1#pragma once
2
3#include <system/details/pointer_collection_helpers.h>
4#include <system/date_time.h>
5#include <cstdint>
6
7#include "system/text/json/serialization/converters/value/json_primitive_converter.h"
8
9namespace System
10{
11namespace Text
12{
13namespace Json
14{
15class JsonSerializerOptions;
16namespace Serialization
17{
18enum class JsonNumberHandling;
19enum class JsonValueType : uint8_t;
20} // namespace Serialization
21class Utf8JsonReader;
22class Utf8JsonWriter;
23} // namespace Json
24} // namespace Text
25class TypeInfo;
26} // namespace System
27
28namespace System {
29
30namespace Text {
31
32namespace Json {
33
34namespace Serialization {
35
36namespace Converters {
37
38class DateTimeConverter final : public JsonPrimitiveConverter<DateTime>
39{
42
43 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
44 RTTI_INFO_DECL();
45
46public:
47
51 void WriteAsPropertyNameCore(System::SharedPtr<Utf8JsonWriter> writer, DateTime value, System::SharedPtr<JsonSerializerOptions> options, bool isWritingExtensionDataProperty) override;
53 void SetTemplateWeakPtr(uint32_t argument) override;
54
55};
56
57} // namespace Converters
58} // namespace Serialization
59} // namespace Json
60} // namespace Text
61} // namespace System
Represents a specific date and time value on the time continuum. This type should be allocated on sta...
Definition: date_time.h:50
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
void SetTemplateWeakPtr(uint32_t argument) override
Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containe...
void WriteAsPropertyNameCore(System::SharedPtr< Utf8JsonWriter > writer, DateTime value, System::SharedPtr< JsonSerializerOptions > options, bool isWritingExtensionDataProperty) override
DateTime ReadAsPropertyNameCore(Utf8JsonReader &reader, const System::TypeInfo &typeToConvert, System::SharedPtr< JsonSerializerOptions > options) override
JsonValueType GetSupportedJsonValueTypes(JsonNumberHandling _) override
void Write(System::SharedPtr< Utf8JsonWriter > writer, DateTime value, System::SharedPtr< JsonSerializerOptions > options) override
DateTime Read(Utf8JsonReader &reader, const System::TypeInfo &typeToConvert, System::SharedPtr< JsonSerializerOptions > options) override
Definition: utf8_json_reader.h:78
Represents a particular type and provides information about it.
Definition: type_info.h:109
@ Text
Defines color adjustment information for text.
@ TypeInfo
Specifies that the member is a type.
JsonValueType
Definition: json_value_type.h:15
JsonNumberHandling
Definition: json_number_handling.h:16
Definition: db_command.h:9