Rhino.BaseFunction.CreateObject C# (CSharp) Method

CreateObject() public method

Creates new script object.
Creates new script object. The default implementation of Construct(Context, Scriptable, object[]) uses the method to to get the value for thisObj argument when invoking Call(Context, Scriptable, Scriptable, object[]) . The methos is allowed to return null to indicate that Call(Context, Scriptable, Scriptable, object[]) will create a new object itself. In this case Construct(Context, Scriptable, object[]) will set scope and prototype on the result Call(Context, Scriptable, Scriptable, object[]) unless they are already set.
public CreateObject ( Context cx, Scriptable scope ) : Scriptable
cx Context
scope Scriptable
return Scriptable
		public virtual Scriptable CreateObject(Context cx, Scriptable scope)
		{
			Scriptable newInstance = new NativeObject();
			newInstance.SetPrototype(GetClassPrototype());
			newInstance.SetParentScope(GetParentScope());
			return newInstance;
		}