public void Initialize() { AssertNotInitialized(); // Repack in case members were changed ClassPtr.Pack(ref ClassDefinition); JSNative ctorDelegate; if (ManagedConstructor != null) { ctorDelegate = ManagedConstructor.WrappedMethod; } else { ctorDelegate = NativeConstructor.Target; } Prototype = new JSObjectReference(Context, JSAPI.InitClass( Context, GlobalObject, _ParentPrototype, ClassPtr, ctorDelegate, _NumConstructorArguments, JSPropertySpecPtr.Zero, JSFunctionSpecPtr.Zero, JSPropertySpecPtr.Zero, JSFunctionSpecPtr.Zero )); JSObjectPtr ctor = JSAPI.GetConstructor(Context, Prototype); Constructor = new JSObjectReference(Context, ctor); }
public bool Equals(JSObjectReference rhs) { return(Pointer.Equals(rhs.Pointer)); }