Rhino.ImporterTopLevel.ImportPackage C# (CSharp) Method

ImportPackage() private method

private ImportPackage ( Context cx, Scriptable thisObj, object args, System.Function funObj ) : void
cx Context
thisObj Scriptable
args object
funObj System.Function
return void
		public virtual void ImportPackage(Context cx, Scriptable thisObj, object[] args, Function funObj)
		{
			Js_importPackage(args);
		}

Same methods

ImporterTopLevel::ImportPackage ( NativeJavaPackage pkg ) : void

Usage Example

コード例 #1
0
ファイル: ImporterTopLevel.cs プロジェクト: hazzik/Rhino.Net
		private object Js_construct(Scriptable scope, object[] args)
		{
			Rhino.ImporterTopLevel result = new Rhino.ImporterTopLevel();
			for (int i = 0; i != args.Length; ++i)
			{
				object arg = args[i];
				if (arg is NativeJavaClass)
				{
					result.ImportClass((NativeJavaClass)arg);
				}
				else
				{
					if (arg is NativeJavaPackage)
					{
						result.ImportPackage((NativeJavaPackage)arg);
					}
					else
					{
						throw Context.ReportRuntimeError1("msg.not.class.not.pkg", Context.ToString(arg));
					}
				}
			}
			// set explicitly prototype and scope
			// as otherwise in top scope mode BaseFunction.construct
			// would keep them set to null. It also allow to use
			// JavaImporter without new and still get properly
			// initialized object.
			result.SetParentScope(scope);
			result.SetPrototype(this);
			return result;
		}