CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
json_polymorphism_options.h
1#pragma once
2
3#include <system/string.h>
4#include <system/details/pointer_collection_helpers.h>
5#include <cstdint>
6
7#include "system/text/json/serialization/configuration_list.h"
8#include "system/text/json/serialization/metadata/json_derived_type.h"
9
10namespace System
11{
12namespace Collections
13{
14namespace Generic
15{
16template <typename> class IList;
17} // namespace Generic
18} // namespace Collections
19namespace Text
20{
21namespace Json
22{
23namespace Serialization
24{
26namespace Metadata
27{
28class JsonMetadataServices;
29class JsonTypeInfoBase;
30} // namespace Metadata
31} // namespace Serialization
32} // namespace Json
33} // namespace Text
34class TypeInfo;
35} // namespace System
36
37namespace System {
38
39namespace Text {
40
41namespace Json {
42
43namespace Serialization {
44
45namespace Metadata {
46
47class ASPOSECPP_SHARED_CLASS JsonPolymorphismOptions : public System::Object
48{
51
52 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
53 ASPOSECPP_SHARED_RTTI_INFO_DECL();
54
56 friend class JsonTypeInfoBase;
57
58private:
59
60 class DerivedTypeList final : public ConfigurationList<JsonDerivedType>
61 {
62 typedef DerivedTypeList ThisType;
64
65 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
66 ASPOSECPP_SHARED_RTTI_INFO_DECL();
67
68 public:
69
70 bool get_IsReadOnly() const override;
71
72 DerivedTypeList(System::SharedPtr<JsonPolymorphismOptions> parent);
73
74 void SetTemplateWeakPtr(uint32_t argument) override;
75
76 protected:
77
78 void OnCollectionModifying() override;
79
80 virtual ~DerivedTypeList();
81
82 #ifdef ASPOSE_GET_SHARED_MEMBERS
83 void GetSharedMembers(System::Object::shared_members_type& result) const override;
84 #endif
85
86 private:
87
89
90 };
91
92public:
93
95 ASPOSECPP_SHARED_API bool get_IgnoreUnrecognizedTypeDiscriminators();
96 ASPOSECPP_SHARED_API void set_IgnoreUnrecognizedTypeDiscriminators(bool value);
100 ASPOSECPP_SHARED_API void set_TypeDiscriminatorPropertyName(String value);
101
102 ASPOSECPP_SHARED_API JsonPolymorphismOptions();
103
104protected:
105
108 ASPOSECPP_SHARED_API bool get_IsEmpty();
109
111
112 #ifdef ASPOSE_GET_SHARED_MEMBERS
113 void GetSharedMembers(System::Object::shared_members_type& result) const override;
114 #endif
115
116private:
117
119 bool _isConfigured;
120 bool _ignoreUnrecognizedTypeDiscriminators;
121 JsonUnknownDerivedTypeHandling _unknownDerivedTypeHandling;
122 String _typeDiscriminatorPropertyName;
123 System::SharedPtr<JsonTypeInfoBase> pr_DeclaringTypeInfo;
124
125 void VerifyMutable();
126
127};
128
129} // namespace Metadata
130} // namespace Serialization
131} // namespace Json
132} // namespace Text
133} // namespace System
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:51
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:126
Definition: configuration_list.h:34
System::SharedPtr< Collections::Generic::IList< JsonDerivedType > > get_DerivedTypes()
void set_UnknownDerivedTypeHandling(JsonUnknownDerivedTypeHandling value)
System::SharedPtr< JsonTypeInfoBase > get_DeclaringTypeInfo()
void set_DeclaringTypeInfo(System::SharedPtr< JsonTypeInfoBase > value)
@ Text
Defines color adjustment information for text.
@ TypeInfo
Specifies that the member is a type.
JsonUnknownDerivedTypeHandling
Definition: json_unknown_derived_type_handling.h:12
Definition: db_command.h:9