Ejemplo n.º 1
0
		}//.ctor
		
		/// <summary>
		/// create new number object boxing the value
		/// </summary>
		public NumberObj( Engine engine, NumberObj baseClass, Value value )
			: base( engine, baseClass, Stdprops )
		{
			this.Number = value;
		}//.ctor
Ejemplo n.º 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
Ejemplo n.º 3
0
		}//Prototype
		
		public NumberFun( Engine engine, Obj baseClass, NumberObj prototype )
			: base( engine, baseClass, new Props( "prototype", prototype ) )
		{
			_prototype = prototype;
		}//.ctor