Rhino.ScriptRuntime.SearchDefaultNamespace C# (CSharp) Method

SearchDefaultNamespace() public static method

public static SearchDefaultNamespace ( Context cx ) : object
cx Context
return object
		public static object SearchDefaultNamespace(Context cx)
		{
			Scriptable scope = cx.currentActivationCall;
			if (scope == null)
			{
				scope = GetTopCallScope(cx);
			}
			object nsObject;
			for (; ; )
			{
				Scriptable parent = scope.GetParentScope();
				if (parent == null)
				{
					nsObject = ScriptableObject.GetProperty(scope, DEFAULT_NS_TAG);
					if (nsObject == ScriptableConstants.NOT_FOUND)
					{
						return null;
					}
					break;
				}
				nsObject = scope.Get(DEFAULT_NS_TAG, scope);
				if (nsObject != ScriptableConstants.NOT_FOUND)
				{
					break;
				}
				scope = parent;
			}
			return nsObject;
		}
ScriptRuntime