13#include <dotnetpp/dotnetpp.h>
28#include <hpp/finally.hpp>
35 struct script_component_loader_context
39 auto get_script_object(
size_t hash) -> script_component::script_object*
43 auto mono_obj = obj.pinned->get_object();
47 APPLOG_ERROR(
"Script object is invalid for domain version: {}", obj.pinned->get_domain_version());
50 const auto&
type = mono_obj.get_type();
53 APPLOG_ERROR(
"Script object type is invalid for domain version: {}", obj.pinned->get_domain_version());
56 if(
type.get_hash() == hash)
65 thread_local script_component_loader_context* script_component_loader_ctx{};
72 entt::meta_factory<script_component>{}
73 .type(
"script_component"_hs)
86template<
typename Archive,
typename T>
89 template<
typename Invoker>
91 const dotnet::object& obj,
92 const Invoker& invoker) ->
bool
94 auto& ar =
static_cast<Archive&
>(arbase);
95 auto val = invoker.get_value(obj);
96 return try_save(ar, ser20::make_nvp(invoker.get_name(), val));
100 const dotnet::object& obj) ->
bool
102 auto& ar =
static_cast<Archive&
>(arbase);
104 T value = dotnet_converter<T>::from_managed(dotnet::get_managed_ptr(obj));
105 return try_save(ar, ser20::make_nvp(
"value", value));
109 const dotnet::object& obj,
110 const dotnet::field& field) ->
bool
112 auto invoker = dotnet::make_field_invoker<T>(field);
117 const dotnet::object& obj,
118 const dotnet::property& prop) ->
bool
120 auto invoker = dotnet::make_property_invoker<T>(prop);
125template<
typename Archive>
128 template<
typename Invoker>
130 const dotnet::object& obj,
131 const Invoker& invoker) ->
bool
133 auto& ar =
static_cast<Archive&
>(arbase);
134 auto val = invoker.get_value(obj);
138 auto& registry = *save_ctx.save_source.registry();
141 e.handle = entt::const_handle(registry, val);
143 return try_save(ar, ser20::make_nvp(invoker.get_name(), e));
147 const dotnet::object& obj) ->
bool
149 auto& ar =
static_cast<Archive&
>(arbase);
151 auto entity = dotnet_converter<entt::entity>::from_managed(dotnet::get_managed_ptr(obj));
154 auto& registry = *save_ctx.save_source.registry();
157 e.handle = entt::const_handle(registry,
entity);
159 return try_save(ar, ser20::make_nvp(
"value", e));
163 const dotnet::object& obj,
164 const dotnet::field& field) ->
bool
166 auto invoker = dotnet::make_field_invoker<entt::entity>(field);
171 const dotnet::object& obj,
172 const dotnet::property& prop) ->
bool
174 auto invoker = dotnet::make_property_invoker<entt::entity>(prop);
179template<
typename Archive,
typename T>
182 template<
typename Invoker>
184 const dotnet::object& obj,
185 const Invoker& invoker) ->
bool
187 auto& ar =
static_cast<Archive&
>(arbase);
189 auto val = invoker.get_value(obj);
194 const auto& invoker_type = invoker.get_type();
195 auto guid_property = invoker_type.get_property(
"uid");
196 auto mutable_uid_property = dotnet::make_property_invoker<hpp::uuid>(guid_property);
197 auto uid = mutable_uid_property.get_value(val);
204 return try_save(ar, ser20::make_nvp(invoker.get_name(), asset));
208 const dotnet::object& obj) ->
bool
210 auto& ar =
static_cast<Archive&
>(arbase);
215 auto obj_type = obj.get_type();
216 auto prop = obj_type.get_property(
"uid");
219 auto uid_prop = dotnet::make_property_invoker<hpp::uuid>(prop);
220 auto uid = uid_prop.get_value(obj);
228 return try_save(ar, ser20::make_nvp(
"value", asset));
232 const dotnet::object& obj,
233 const dotnet::field& field) ->
bool
235 auto invoker = dotnet::make_field_invoker<dotnet::object>(field);
240 const dotnet::object& obj,
241 const dotnet::property& prop) ->
bool
243 auto invoker = dotnet::make_property_invoker<dotnet::object>(prop);
248template<
typename Archive,
typename T>
254 return dotnet::is_compatible_type<U>(
type);
257 template<
typename Invoker>
260 const Invoker& invoker) ->
bool
262 auto& ar =
static_cast<Archive&
>(arbase);
267 if(
try_load(ar, ser20::make_nvp(invoker.get_name(), val)))
269 invoker.set_value(obj, val);
277 dotnet::object& obj) ->
bool
279 auto& ar =
static_cast<Archive&
>(arbase);
281 if(
try_load(ar, ser20::make_nvp(
"value", value)))
284 auto obj_type = obj.get_type();
285 if(obj_type.is_valuetype())
287 auto mono_value = dotnet_converter<T>::to_managed(value);
288 obj.box_value(mono_value, obj_type);
297 dotnet::field& field) ->
bool
299 auto invoker = dotnet::make_field_invoker<T>(field);
305 dotnet::property& prop) ->
bool
307 auto invoker = dotnet::make_property_invoker<T>(prop);
313template<
typename Archive>
319 return type.is_string();
322 template<
typename Invoker>
325 const Invoker& invoker) ->
bool
327 auto& ar =
static_cast<Archive&
>(arbase);
332 if(
try_load(ar, ser20::make_nvp(invoker.get_name(), val)))
334 invoker.set_value(obj, val);
342 dotnet::object& obj) ->
bool
344 auto& ar =
static_cast<Archive&
>(arbase);
345 auto obj_type = obj.get_type();
349 if(
try_load(ar, ser20::make_nvp(
"value", value)))
351 obj = dotnet::object(dotnet_converter<std::string>::to_managed(value));
362 dotnet::field& field) ->
bool
364 auto invoker = dotnet::make_field_invoker<std::string>(field);
370 dotnet::property& prop) ->
bool
372 auto invoker = dotnet::make_property_invoker<std::string>(prop);
377template<
typename Archive>
383 const auto& expected_name =
type.get_name();
384 bool is_supported = std::is_same_v<entt::entity, U> && expected_name ==
"Entity";
388 template<
typename Invoker>
391 const Invoker& invoker) ->
bool
393 auto& ar =
static_cast<Archive&
>(arbase);
398 if(
try_load(ar, ser20::make_nvp(invoker.get_name(), val)))
400 invoker.set_value(obj, val.handle.entity());
412 dotnet::object& obj) ->
bool
414 auto& ar =
static_cast<Archive&
>(arbase);
416 if(
try_load(ar, ser20::make_nvp(
"value", val)))
418 entt::entity
entity = val.handle ? val.handle.entity() : entt::null;
420 auto obj_type = obj.get_type();
421 if(obj_type.is_valuetype())
423 auto mono_entity = dotnet_converter<entt::entity>::to_managed(
entity);
424 obj.box_value(mono_entity, obj_type);
433 dotnet::field& field) ->
bool
435 auto invoker = dotnet::make_field_invoker<entt::entity>(field);
441 dotnet::property& prop) ->
bool
443 auto invoker = dotnet::make_property_invoker<entt::entity>(prop);
448template<
typename Archive,
typename T>
454 const auto& expected_name =
type.get_name();
455 bool is_supported =
false;
459 is_supported |= std::is_same_v<asset_handle<gfx::texture>, U> && expected_name ==
"Texture";
463 is_supported |= std::is_same_v<asset_handle<material>, U> && expected_name ==
"Material";
467 is_supported |= std::is_same_v<asset_handle<mesh>, U> && expected_name ==
"Mesh";
471 is_supported |= std::is_same_v<asset_handle<animation_clip>, U> && expected_name ==
"AnimationClip";
475 is_supported |= std::is_same_v<asset_handle<prefab>, U> && expected_name ==
"Prefab";
479 is_supported |= std::is_same_v<asset_handle<scene_prefab>, U> && expected_name ==
"Scene";
483 is_supported |= std::is_same_v<asset_handle<physics_material>, U> && expected_name ==
"PhysicsMaterial";
487 is_supported |= std::is_same_v<asset_handle<audio_clip>, U> && expected_name ==
"AudioClip";
491 is_supported |= std::is_same_v<asset_handle<font>, U> && expected_name ==
"Font";
496 template<
typename Invoker>
499 const Invoker& invoker) ->
bool
501 auto& ar =
static_cast<Archive&
>(arbase);
506 if(
try_load(ar, ser20::make_nvp(invoker.get_name(), val)))
508 const auto& field_type = invoker.get_type();
509 auto guid_property = field_type.get_property(
"uid");
510 auto mutable_uid_property = dotnet::make_property_invoker<hpp::uuid>(guid_property);
512 auto var = invoker.get_value(obj);
515 var = field_type.new_instance();
516 invoker.set_value(obj, var);
521 mutable_uid_property.set_value(var, val.uid());
530 dotnet::object& obj) ->
bool
532 auto& ar =
static_cast<Archive&
>(arbase);
533 const auto& obj_type = obj.get_type();
538 if(
try_load(ar, ser20::make_nvp(
"value", asset)))
542 auto prop = obj_type.get_property(
"uid");
545 auto uid_prop = dotnet::make_property_invoker<hpp::uuid>(prop);
546 uid_prop.set_value(obj, asset ? asset.uid() : hpp::uuid{});
559 dotnet::field& field) ->
bool
561 auto invoker = dotnet::make_field_invoker<dotnet::object>(field);
567 dotnet::property& prop) ->
bool
569 auto invoker = dotnet::make_property_invoker<dotnet::object>(prop);
585template<
typename Archive>
588 return try_save(ar, ser20::make_nvp(
name, t.get_fullname()));
591template<
typename Archive>
594 std::string fullname;
603template<
typename Archive,
typename T>
608 try_save(ar, ser20::make_nvp(
"size", obj.container.size()));
609 try_save(ar, ser20::make_nvp(
"container", obj.container));
612template<
typename Archive,
typename T>
617 if(!obj.type.valid())
622 ser20::size_type
size{};
624 obj.container.resize(
static_cast<std::size_t
>(
size));
625 std::vector<dotnet::object_pinned_ptr> element_pins;
626 element_pins.reserve(obj.container.size());
627 for(
auto&
v : obj.container)
629 v = obj.type.new_instance();
630 element_pins.push_back(dotnet::make_object_pinned(
v));
634 try_load(ar, ser20::make_nvp(
"container", obj.container));
641 auto pinned_obj = dotnet::make_object_pinned(obj);
643 using mono_object_serializer = std::function<bool(ser20::detail::OutputArchiveBase&,
const dotnet::object&)>;
645 auto get_object_serializer = [](
const std::string& type_name) ->
const mono_object_serializer&
648 static std::map<std::string, mono_object_serializer> reg = {
681 auto it = reg.find(type_name);
686 static const mono_object_serializer empty;
690 const auto&
type = obj.get_type();
695 auto object_serializer = get_object_serializer(
type.get_name());
696 if(object_serializer)
698 object_serializer(ar, obj);
702 auto& ctx = engine::context();
704 bool should_serialize = (
type.is_serializable() ||
type.is_derived_from(script_sys.get_scriptable_component_base_type()));
706 if(!should_serialize)
718 using mono_field_serializer =
719 std::function<bool(ser20::detail::OutputArchiveBase&,
const dotnet::object&,
const dotnet::field&)>;
721 auto get_field_serilizer = [](
const std::string& type_name) ->
const mono_field_serializer&
724 static std::map<std::string, mono_field_serializer> reg = {
757 auto it = reg.find(type_name);
762 static const mono_field_serializer empty;
766 using mono_property_serializer =
767 std::function<bool(ser20::detail::OutputArchiveBase&,
const dotnet::object&,
const dotnet::property&)>;
769 auto get_property_serilizer = [](
const std::string& type_name) ->
const mono_property_serializer&
772 static std::map<std::string, mono_property_serializer> reg = {
805 auto it = reg.find(type_name);
810 static const mono_property_serializer empty;
814 bool include_base =
true;
815 auto fields =
type.get_fields(include_base);
816 auto properties =
type.get_properties(include_base);
818 for(
auto& field : fields)
820 if(field.get_visibility() == dotnet::visibility::vis_public)
822 if(field.is_static() || field.has_attribute(
"HideAttribute"))
827 const auto& field_type = field.get_type();
828 auto field_serilizer = get_field_serilizer(field_type.get_name());
831 field_serilizer(ar, obj, field);
833 else if(field_type.is_enum())
835 auto enum_type = field_type.get_enum_base_type();
836 auto enum_serilizer = get_field_serilizer(enum_type.get_name());
839 enum_serilizer(ar, obj, field);
842 else if(field_type.is_array() || field_type.is_list())
845 auto invoker = dotnet::make_field_invoker<dotnet::object>(field);
846 auto collection_obj = invoker.get_value(obj);
847 if(collection_obj.valid())
850 if(field_type.is_array())
852 dotnet::array<dotnet::object> array(collection_obj);
853 auto pinned_array = dotnet::make_array_pinned(array);
854 auto vec = array.to_vector_wrapper<std::vector<dotnet::object>>();
855 auto element_pins = dotnet::pin_vector_elements(vec.container);
856 try_save(ar, ser20::make_nvp(field.get_name(), vec));
858 else if(field_type.is_list())
860 dotnet::list<dotnet::object> list(collection_obj);
861 auto pinned_list = dotnet::make_list_pinned(list);
862 auto vec = list.to_vector_wrapper<std::vector<dotnet::object>>();
863 auto element_pins = dotnet::pin_vector_elements(vec.container);
864 try_save(ar, ser20::make_nvp(field.get_name(), vec));
868 else if(field_type.is_serializable())
871 auto invoker = dotnet::make_field_invoker<dotnet::object>(field);
872 auto nested_obj = invoker.get_value(obj);
873 if(nested_obj.valid())
875 auto pinned_nested = dotnet::make_object_pinned(nested_obj);
877 try_save(ar, ser20::make_nvp(field.get_name(), nested_obj));
883 for(
auto& prop : properties)
885 if(prop.get_visibility() == dotnet::visibility::vis_public)
887 if(prop.is_static() || prop.has_attribute(
"HideAttribute"))
891 const auto& prop_type = prop.get_type();
893 auto prop_serilizer = get_property_serilizer(prop_type.get_name());
896 prop_serilizer(ar, obj, prop);
898 else if(prop_type.is_enum())
900 auto enum_type = prop_type.get_enum_base_type();
901 auto enum_serilizer = get_property_serilizer(enum_type.get_name());
904 enum_serilizer(ar, obj, prop);
907 else if(prop_type.is_array() || prop_type.is_list())
910 auto invoker = dotnet::make_property_invoker<dotnet::object>(prop);
911 auto collection_obj = invoker.get_value(obj);
912 if(collection_obj.valid())
915 if(prop_type.is_array())
917 dotnet::array<dotnet::object> array(collection_obj);
918 auto pinned_array = dotnet::make_array_pinned(array);
919 auto vec = array.to_vector_wrapper<std::vector<dotnet::object>>();
920 auto element_pins = dotnet::pin_vector_elements(vec.container);
921 try_save(ar, ser20::make_nvp(prop.get_name(), vec));
923 else if(prop_type.is_list())
925 dotnet::list<dotnet::object> list(collection_obj);
926 auto pinned_list = dotnet::make_list_pinned(list);
927 auto vec = list.to_vector_wrapper<std::vector<dotnet::object>>();
928 auto element_pins = dotnet::pin_vector_elements(vec.container);
929 try_save(ar, ser20::make_nvp(prop.get_name(), vec));
933 else if(prop_type.is_serializable())
936 auto invoker = dotnet::make_property_invoker<dotnet::object>(prop);
937 auto nested_obj = invoker.get_value(obj);
938 if(nested_obj.valid())
940 auto pinned_nested = dotnet::make_object_pinned(nested_obj);
942 try_save(ar, ser20::make_nvp(prop.get_name(), nested_obj));
954 auto pinned_obj = dotnet::make_object_pinned(obj);
956 using mono_object_serializer = std::function<bool(ser20::detail::InputArchiveBase&, dotnet::object&)>;
958 auto get_object_serializer = [](
const std::string& type_name) ->
const mono_object_serializer&
961 static const std::map<std::string, mono_object_serializer> reg = {
994 auto it = reg.find(type_name);
999 static const mono_object_serializer empty;
1003 const auto&
type = obj.get_type();
1010 auto object_serializer = get_object_serializer(
type.get_name());
1011 if(object_serializer)
1013 object_serializer(ar, obj);
1018 auto& ctx = engine::context();
1020 bool should_serialize = (
type.is_serializable() ||
type.is_derived_from(script_sys.get_scriptable_component_base_type()));
1022 if(!should_serialize)
1028 using mono_field_serializer =
1029 std::function<bool(ser20::detail::InputArchiveBase&, dotnet::object&, dotnet::field&)>;
1031 auto get_field_serilizer = [](
const std::string& type_name) ->
const mono_field_serializer&
1034 static const std::map<std::string, mono_field_serializer> reg = {
1067 auto it = reg.find(type_name);
1072 static const mono_field_serializer empty;
1076 using mono_property_serializer =
1077 std::function<bool(ser20::detail::InputArchiveBase&, dotnet::object&, dotnet::property&)>;
1079 auto get_property_serilizer = [](
const std::string& type_name) ->
const mono_property_serializer&
1082 static const std::map<std::string, mono_property_serializer> reg = {
1115 auto it = reg.find(type_name);
1120 static const mono_property_serializer empty;
1124 bool include_base =
true;
1125 auto fields =
type.get_fields(include_base);
1126 auto properties =
type.get_properties(include_base);
1128 for(
auto& field : fields)
1130 if(field.get_visibility() == dotnet::visibility::vis_public)
1132 const auto& field_type = field.get_type();
1133 auto field_serilizer = get_field_serilizer(field_type.get_name());
1136 field_serilizer(ar, obj, field);
1138 else if(field_type.is_enum())
1140 auto enum_type = field_type.get_enum_base_type();
1141 auto enum_serilizer = get_field_serilizer(enum_type.get_name());
1144 enum_serilizer(ar, obj, field);
1147 else if(field_type.is_array() || field_type.is_list())
1150 auto invoker = dotnet::make_field_invoker<dotnet::object>(field);
1151 dotnet::vector_like_wrapper<std::vector<dotnet::object>> vec;
1152 if(
try_load(ar, ser20::make_nvp(field.get_name(), vec)))
1154 auto element_pins = dotnet::pin_vector_elements(vec.container);
1155 if(field_type.is_array())
1157 dotnet::array<dotnet::object> array(vec.container, vec.type);
1158 invoker.set_value(obj, array);
1160 else if(field_type.is_list())
1162 dotnet::list<dotnet::object> list(vec.container, vec.type);
1163 invoker.set_value(obj, list);
1167 else if(field_type.is_serializable())
1170 auto invoker = dotnet::make_field_invoker<dotnet::object>(field);
1171 auto nested_obj = invoker.get_value(obj);
1172 if(nested_obj.valid())
1174 auto pinned_nested = dotnet::make_object_pinned(nested_obj);
1175 try_load(ar, ser20::make_nvp(field.get_name(), nested_obj));
1176 invoker.set_value(obj, nested_obj);
1182 for(
auto& prop : properties)
1184 if(prop.get_visibility() == dotnet::visibility::vis_public)
1186 const auto& prop_type = prop.get_type();
1187 auto prop_serilizer = get_property_serilizer(prop_type.get_name());
1190 prop_serilizer(ar, obj, prop);
1192 else if(prop_type.is_enum())
1194 auto enum_type = prop_type.get_enum_base_type();
1195 auto enum_serilizer = get_property_serilizer(enum_type.get_name());
1198 enum_serilizer(ar, obj, prop);
1201 else if(prop_type.is_array() || prop_type.is_list())
1204 auto invoker = dotnet::make_property_invoker<dotnet::object>(prop);
1205 dotnet::vector_like_wrapper<std::vector<dotnet::object>> vec;
1206 if(
try_load(ar, ser20::make_nvp(prop.get_name(), vec)))
1208 auto element_pins = dotnet::pin_vector_elements(vec.container);
1209 if(prop_type.is_array())
1211 dotnet::array<dotnet::object> array(vec.container, vec.type);
1212 invoker.set_value(obj, array);
1214 else if(prop_type.is_list())
1216 dotnet::list<dotnet::object> list(vec.container, vec.type);
1217 invoker.set_value(obj, list);
1221 else if(prop_type.is_serializable())
1224 auto invoker = dotnet::make_property_invoker<dotnet::object>(prop);
1225 auto nested_obj = invoker.get_value(obj);
1226 if(nested_obj.valid())
1228 auto pinned_nested = dotnet::make_object_pinned(nested_obj);
1229 try_load(ar, ser20::make_nvp(prop.get_name(), nested_obj));
1230 invoker.set_value(obj, nested_obj);
1249 auto object = obj.pinned->get_object();
1250 const auto&
type =
object.get_type();
1252 try_save_mono_type(ar,
"type",
type);
1261 dotnet::type script_type;
1262 try_load_mono_type(ar,
"type", script_type);
1265 if(!script_type.valid())
1273 auto* existing_obj = script_component_loader_ctx
1274 ? script_component_loader_ctx->get_script_object(script_type.get_hash())
1278 obj = *existing_obj;
1282 auto object = script_type.new_instance();
1286 auto pinned_object = obj.pinned->get_object();
1296 const auto& comps = obj.get_script_components();
1297 try_save(ar, ser20::make_nvp(
"script_components", comps));
1307 if(load_ctx.is_updating_prefab())
1310 script_component_loader_context ctx;
1311 ctx.script_objects = obj.get_script_components();
1313 script_component_loader_ctx = &ctx;
1315 auto _ = hpp::finally([&]()
1317 script_component_loader_ctx =
nullptr;
1322 if(
try_load(ar, ser20::make_nvp(
"script_components", comps)))
1324 obj.add_missing_script_components(comps);
1331 if(
try_load(ar, ser20::make_nvp(
"script_components", comps)))
1333 obj.add_script_components(comps);
1348 save_ctx.save_source = e;
1349 save_ctx.to_prefab =
false;
1351 bool was_successful =
false;
1355 ar(ser20::make_nvp(
"script_object", obj));
1356 was_successful =
true;
1358 catch(
const std::exception& e)
1360 APPLOG_ERROR(
"Failed to save script component to stream: {}", e.what());
1363 save_ctx.to_prefab =
false;
1364 save_ctx.save_source = {};
1366 return was_successful;
1372 bool was_successful =
false;
1376 ar(ser20::make_nvp(
"script_object", obj));
1377 was_successful =
true;
1379 catch(
const std::exception& e)
1381 APPLOG_ERROR(
"Failed to load script component from stream: {}", e.what());
1384 return was_successful;
Manages assets, including loading, unloading, and storage.
auto get_asset(const std::string &key, load_flags flags=load_flags::standard, load_mode mode=load_mode::immediate) -> asset_handle< T >
Gets an asset by its key.
Class that contains core data for audio listeners. There can only be one instance of it per scene.
std::vector< script_object > script_components_t
#define APPLOG_ERROR(...)
attributes::value_type attribute
std::map< std::string, meta_any > attributes
auto try_load_mono_type(Archive &ar, const char *name, dotnet::type &t) -> bool
BinaryInputArchive iarchive_binary_t
simd::JSONOutputArchive oarchive_associative_t
BinaryOutputArchive oarchive_binary_t
simd::JSONInputArchive iarchive_associative_t
auto try_save_mono_type(Archive &ar, const char *name, const dotnet::type &t) -> bool
Hash specialization for batch_key to enable use in std::unordered_map.
auto push_save_context() -> bool
void pop_load_context(bool push_result)
auto push_load_context(entt::registry ®istry) -> bool
auto get_save_context() -> save_context &
auto get_load_context() -> load_context &
auto load_from_stream(std::istream &stream, entt::handle e, script_component::script_object &obj) -> bool
void pop_save_context(bool push_result)
auto save_to_stream(std::ostream &stream, entt::const_handle e, const script_component::script_object &obj) -> bool
#define SAVE_INSTANTIATE(cls, Archive)
auto try_save(Archive &ar, ser20::NameValuePair< T > &&t, const hpp::source_location &loc=hpp::source_location::current()) -> bool
#define LOAD_INSTANTIATE(cls, Archive)
#define LOAD_FUNCTION_NAME
auto try_load(Archive &ar, ser20::NameValuePair< T > &&t, const hpp::source_location &loc=hpp::source_location::current()) -> bool
#define SAVE_FUNCTION_NAME
Thread-safe handle to an asset.
static auto context() -> rtti::context &
static auto try_load_mono_object(ser20::detail::InputArchiveBase &arbase, dotnet::object &obj) -> bool
static auto try_load_mono_field(ser20::detail::InputArchiveBase &arbase, dotnet::object &obj, dotnet::field &field) -> bool
static auto is_supported_type(const dotnet::type &type) -> bool
static auto try_load_mono_property(ser20::detail::InputArchiveBase &arbase, dotnet::object &obj, dotnet::property &prop) -> bool
static auto try_load_mono_invoker(ser20::detail::InputArchiveBase &arbase, dotnet::object &obj, const Invoker &invoker) -> bool
static auto try_load_mono_object(ser20::detail::InputArchiveBase &arbase, dotnet::object &obj) -> bool
static auto try_load_mono_invoker(ser20::detail::InputArchiveBase &arbase, dotnet::object &obj, const Invoker &invoker) -> bool
static auto try_load_mono_field(ser20::detail::InputArchiveBase &arbase, dotnet::object &obj, dotnet::field &field) -> bool
static auto is_supported_type(const dotnet::type &type) -> bool
static auto try_load_mono_property(ser20::detail::InputArchiveBase &arbase, dotnet::object &obj, dotnet::property &prop) -> bool
static auto try_load_mono_property(ser20::detail::InputArchiveBase &arbase, dotnet::object &obj, dotnet::property &prop) -> bool
static auto try_load_mono_field(ser20::detail::InputArchiveBase &arbase, dotnet::object &obj, dotnet::field &field) -> bool
static auto try_load_mono_object(ser20::detail::InputArchiveBase &arbase, dotnet::object &obj) -> bool
static auto try_load_mono_invoker(ser20::detail::InputArchiveBase &arbase, dotnet::object &obj, const Invoker &invoker) -> bool
static auto is_supported_type(const dotnet::type &type) -> bool
static auto try_load_mono_field(ser20::detail::InputArchiveBase &arbase, dotnet::object &obj, dotnet::field &field) -> bool
static auto try_load_mono_property(ser20::detail::InputArchiveBase &arbase, dotnet::object &obj, dotnet::property &prop) -> bool
static auto try_load_mono_invoker(ser20::detail::InputArchiveBase &arbase, dotnet::object &obj, const Invoker &invoker) -> bool
static auto is_supported_type(const dotnet::type &type) -> bool
static auto try_load_mono_object(ser20::detail::InputArchiveBase &arbase, dotnet::object &obj) -> bool
static auto try_save_mono_property(ser20::detail::OutputArchiveBase &arbase, const dotnet::object &obj, const dotnet::property &prop) -> bool
static auto try_save_mono_field(ser20::detail::OutputArchiveBase &arbase, const dotnet::object &obj, const dotnet::field &field) -> bool
static auto try_save_mono_object(ser20::detail::OutputArchiveBase &arbase, const dotnet::object &obj) -> bool
static auto try_save_mono_invoker(ser20::detail::OutputArchiveBase &arbase, const dotnet::object &obj, const Invoker &invoker) -> bool
static auto try_save_mono_object(ser20::detail::OutputArchiveBase &arbase, const dotnet::object &obj) -> bool
static auto try_save_mono_invoker(ser20::detail::OutputArchiveBase &arbase, const dotnet::object &obj, const Invoker &invoker) -> bool
static auto try_save_mono_field(ser20::detail::OutputArchiveBase &arbase, const dotnet::object &obj, const dotnet::field &field) -> bool
static auto try_save_mono_property(ser20::detail::OutputArchiveBase &arbase, const dotnet::object &obj, const dotnet::property &prop) -> bool
static auto try_save_mono_field(ser20::detail::OutputArchiveBase &arbase, const dotnet::object &obj, const dotnet::field &field) -> bool
static auto try_save_mono_invoker(ser20::detail::OutputArchiveBase &arbase, const dotnet::object &obj, const Invoker &invoker) -> bool
static auto try_save_mono_object(ser20::detail::OutputArchiveBase &arbase, const dotnet::object &obj) -> bool
static auto try_save_mono_property(ser20::detail::OutputArchiveBase &arbase, const dotnet::object &obj, const dotnet::property &prop) -> bool
auto get_type_by_fullname(const std::string &fullname) const -> dotnet::type