#include "edge.h"

void Dictionary::Add(MonoObject* _this, const char* name, MonoObject* value)
{
    static MonoMethod* add;
    if (!add) {
        add = mono_class_get_method_from_name(MonoEmbedding::GetClass(), "AddPropertyToObject", -1);
    }

    void* params[3];
    params[0] = _this;	//dict
    params[1] = mono_string_new(mono_domain_get(), name);	// key
    params[2] = value;	// value

    mono_runtime_invoke(add, _this, params, NULL);
}
