/// <summary> /// Creates a userdata DynValue from the specified object, using a specific descriptor /// </summary> /// <param name="o">The object</param> /// <param name="descr">The descriptor.</param> /// <returns></returns> public static DynValue Create(object o, IUserDataDescriptor descr) { return(DynValue.NewUserData(new UserData() { Descriptor = descr, Object = o })); }
/// <summary> /// Creates a static userdata DynValue from the specified IUserDataDescriptor /// </summary> /// <param name="descr">The IUserDataDescriptor</param> /// <returns></returns> public static DynValue CreateStatic(IUserDataDescriptor descr) { if (descr == null) return null; return DynValue.NewUserData(new UserData() { Descriptor = descr, Object = null }); }