}//.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
}//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
}//Prototype public NumberFun( Engine engine, Obj baseClass, NumberObj prototype ) : base( engine, baseClass, new Props( "prototype", prototype ) ) { _prototype = prototype; }//.ctor