return candidate;
}
-CoreRuntime::CoreRuntime() :
+CoreRuntime::CoreRuntime(const char* mode) :
initializeClr(nullptr),
executeAssembly(nullptr),
shutdown(nullptr),
pluginGetDllPath(nullptr),
pluginBeforeExecute(nullptr),
pluginFinalize(nullptr),
- fd(0)
+ fd(0),
+ __mode(mode)
{
#define __XSTR(x) #x
#define __STR(x) __XSTR(x)
}
if (pluginInitialize)
- pluginInitialize();
+ pluginInitialize(mode);
_DBG("Constructor called!!");
}
}
if (pluginSetCoreclrInfo)
- pluginSetCoreclrInfo(__hostHandle, __domainId);
+ pluginSetCoreclrInfo(__hostHandle, __domainId, createDelegate);
_DBG("Initialize core clr success");
return true;
const char* entryPointMethodName,
void** delegate);
- typedef void (*plugin_initialize_ptr)();
+ typedef void (*plugin_initialize_ptr)(const char* mode);
typedef void (*plugin_preload_ptr)();
typedef void (*plugin_set_coreclr_info_ptr)(
void* hostHandle,
- unsigned int domainId);
+ unsigned int domainId,
+ coreclr_create_delegate_ptr delegateFunc);
typedef char* (*plugin_get_dll_path_ptr)();
class CoreRuntime : public tizen::runtime::LauncherInterface
{
public:
- CoreRuntime();
+ CoreRuntime(const char* mode);
~CoreRuntime();
int initialize(bool standalone) override;
void dispose() override;
plugin_before_execute_ptr pluginBeforeExecute;
plugin_finalize_ptr pluginFinalize;
int fd;
+ const char* __mode;
};
} // dotnetcore
static std::string VersionOption("--version");
static std::string StandaloneOption("--standalone");
-int main(int argc, char *argv[])
+extern "C" int realMain(int argc, char *argv[], const char* mode)
{
int i;
bool standalone = false;
std::unique_ptr<LauncherInterface> runtime;
using tizen::runtime::dotnetcore::CoreRuntime;
- std::unique_ptr<LauncherInterface> coreRuntime(new CoreRuntime());
+ std::unique_ptr<LauncherInterface> coreRuntime(new CoreRuntime(mode));
runtime = std::move(coreRuntime);
if (standalone) {
runtime->dispose();
return 0;
}
+
+int main(int argc, char *argv[])
+{
+ return realMain(argc, argv, "default");
+}
+