Rhino.WrapFactory.WrapNewObject C# (CSharp) Method

WrapNewObject() public method

Wrap an object newly created by a constructor call.
Wrap an object newly created by a constructor call.
public WrapNewObject ( Context cx, Scriptable scope, object obj ) : Scriptable
cx Context the current Context for this thread
scope Scriptable the scope of the executing script
obj object the object to be wrapped
return Scriptable
		public virtual Scriptable WrapNewObject(Context cx, Scriptable scope, object obj)
		{
			if (obj is Scriptable)
			{
				return (Scriptable)obj;
			}
			Type cls = obj.GetType();
			if (cls.IsArray)
			{
				return NativeJavaArray.Wrap(scope, obj);
			}
			return WrapAsJavaObject(cx, scope, obj, null);
		}