Example #1
0
		}//.ctor
		
		/// <summary>
		/// create new string object boxing the string
		/// </summary>
		public StringObj( Engine engine, StringObj baseClass, string @string )
			: base( engine, baseClass, Stdprops )
		{
			this.String = @string;
		}//.ctor
Example #2
0
		}//Number
		
		public Root( Engine engine )
			: base( engine, null, new Props(), new Props() )
		{
			BaseProps.Set( "undefined", _undefined = new Value() );
			BaseProps.Set( "null", _null = new Value( Vtype.Object, null ) );
			BaseProps.Set( "nan", _nan = new Value( System.Double.NaN ) );
			BaseProps.Set( "infinity", _infinity = new Value( System.Double.PositiveInfinity ) );
			MoreProps.Set( "inf", _infinity );
			var obj = new Obj( engine );
			var fun = new FunctionObj( engine, obj );
			var str = new StringObj( engine, obj );
			var num = new NumberObj( engine, obj );
			BaseProps.Set( "function", new Value( _function = new FunctionFun( engine, fun, fun ) ) );
			BaseProps.Set( "object", new Value( _object = new ObjectFun( engine, fun, obj, this ) ) );
			BaseProps.Set( "string", new Value( _string = new StringFun( engine, fun, str ) ) );
			BaseProps.Set( "number", new Value( _number = new NumberFun( engine, fun, num ) ) );
		}//.ctor
Example #3
0
		}//Prototype
		
		public StringFun( Engine engine, IObject baseClass, StringObj prototype )
			: base( engine, baseClass, new Props( "prototype", prototype ) )
		{
			_prototype = prototype;
		}//.ctor