public IObj Construct(double num) { var obj = new ValueObj(num); obj.Class = ObjClass.Number; obj.Prototype = Number_prototype; obj.Context = Context; return obj; }
public IObj Construct(bool bol) { var obj = new ValueObj(bol); obj.Class = ObjClass.Boolean; obj.Prototype = Boolean_prototype; obj.Context = Context; return obj; }
public IObj Construct(string value) { var obj = new ValueObj(value); obj.Class = ObjClass.String; obj.Prototype = String_prototype; obj.Context = Context; obj.SetOwnProperty("length", (double)value.Length); return obj; }
public IObj Construct(object[] args) { var bol = args != null && args.Length > 0 ? JsTypeConverter.ToBoolean(args[0]) : false; var obj = new ValueObj(bol); obj.Class = ObjClass.Boolean; obj.Prototype = Boolean_prototype; obj.Context = Context; return obj; }
public IObj Construct(object[] args) { var num = args != null && args.Length > 0 ? JsTypeConverter.ToNumber(args[0]) : 0.0D; var obj = new ValueObj(num); obj.Class = ObjClass.Number; obj.Prototype = Number_prototype; obj.Context = Context; return obj; }
public IObj Construct(object[] args) { var str = args != null && args.Length > 0 ? JsTypeConverter.ToString(args[0]) : ""; var obj = new ValueObj(str); obj.Class = ObjClass.String; obj.Prototype = String_prototype; obj.Context = Context; obj.SetOwnProperty("length", (double) str.Length); return obj; }