internal void KeepAliveDeleteProperty(int slot, string name, ref JsValue output)
{
#if DEBUG_TRACE_API
Console.WriteLine("deleting prop " + name);
#endif
// TODO: This is pretty slow: use a cache of generated code to make it faster.
var obj = KeepAliveGet(slot);
if (obj == null)
{
output.Type = JsValueType.Error;
output.I64 = (int)JsManagedError.NotFoundManagedObjectId;
return;
}
#if DEBUG_TRACE_API
Console.WriteLine("deleting prop " + name + " type " + type);
#endif
if (typeof(IDictionary).ExtIsAssignableFrom(obj.GetType()))
{
IDictionary dictionary = (IDictionary)obj;
if (dictionary.Contains(name))
{
dictionary.Remove(name);
_convert.ToJsValue(true, ref output);
return;
}
}
_convert.ToJsValue(false, ref output);
}