<commit_before>// -------------------------------------------------------------------------
//    @FileName      :    NFCMonoScriptModule.cpp
//    @Author           :    LvSheng.Huang
//    @Date             :    2013-01-02
//    @Module           :    NFCMonoScriptModule
//    @Desc             :
// -------------------------------------------------------------------------

#include "NFCMonoScriptModule.h"
#include "NFMonoScriptPlugin.h"
#include "mono\metadata\metadata.h"
#include "mono\mini\jit.h"
#include "mono\metadata\assembly.h"

bool NFCMonoScriptModule::Init()
{
    m_pEventProcessModule = dynamic_cast<NFIEventProcessModule*>(pPluginManager->FindModule("NFCEventProcessModule"));
    m_pKernelModule = dynamic_cast<NFIKernelModule*>(pPluginManager->FindModule("NFCKernelModule"));
    m_pLogicClassModule = dynamic_cast<NFILogicClassModule*>(pPluginManager->FindModule("NFCLogicClassModule"));

    assert(NULL != m_pEventProcessModule);
    assert(NULL != m_pKernelModule);
    assert(NULL != m_pLogicClassModule);


    return true;
}

bool NFCMonoScriptModule::AfterInit()
{
    //mono_set_assemblies_path("E:\\Projects\\MonoTest\\MonoTest\\");
    //MonoDomain* domain = mono_jit_init("ScriptDomain");

    return true;
}

bool NFCMonoScriptModule::Shut()
{

    return true;
}
<commit_msg>fixed mono plugin<commit_after>// -------------------------------------------------------------------------
//    @FileName      :    NFCMonoScriptModule.cpp
//    @Author           :    LvSheng.Huang
//    @Date             :    2013-01-02
//    @Module           :    NFCMonoScriptModule
//    @Desc             :
// -------------------------------------------------------------------------

#include "NFCMonoScriptModule.h"
#include "NFMonoScriptPlugin.h"
#include "mono/metadata/metadata.h"
#include "mono-3.6.0.39/mono/mini/jit.h"
#include "mono-3.6.0.39/mono/metadata/assembly.h"

bool NFCMonoScriptModule::Init()
{
    m_pEventProcessModule = dynamic_cast<NFIEventProcessModule*>(pPluginManager->FindModule("NFCEventProcessModule"));
    m_pKernelModule = dynamic_cast<NFIKernelModule*>(pPluginManager->FindModule("NFCKernelModule"));
    m_pLogicClassModule = dynamic_cast<NFILogicClassModule*>(pPluginManager->FindModule("NFCLogicClassModule"));

    assert(NULL != m_pEventProcessModule);
    assert(NULL != m_pKernelModule);
    assert(NULL != m_pLogicClassModule);


    return true;
}

bool NFCMonoScriptModule::AfterInit()
{
    mono_set_assemblies_path(".\\MonoTest\\");
    MonoDomain* domain = mono_jit_init("ScriptDomain");

    MonoAssembly* assembly = mono_domain_assembly_open(domain, "test.dll");
    if(!assembly)
    {
        std::cout << "err" << std::endl;
        abort();
    }

    MonoImage* image = mono_assembly_get_image(assembly);
    return true;
}

bool NFCMonoScriptModule::Shut()
{

    return true;
}

{'fraction_non_alphanumeric': 0.22475455820476858, 'fraction_numerical': 0.0091164095371669, 'mean_word_length': 2.36438679245283, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3100643', 'n_tokens_mistral': 901, 'n_tokens_neox': 857, 'n_words': 110}