示例#1
0
 public static BoxedValue ToPrimitive(ScriptObject o, DefaultValueHint hint)
 {
     return o.DefaultValue(hint);
 }
示例#2
0
 public static string ToString(ScriptObject o)
 {
     var s = o as StringObject;
     return s != null
         ? s.Value.Value.String
         : ToString(o.DefaultValue(DefaultValueHint.String));
 }
示例#3
0
 public static double ToNumber(ScriptObject o)
 {
     var n = o as NumberObject;
     return n != null
         ? n.Value.Value.Number
         : ToNumber(o.DefaultValue(DefaultValueHint.Number));
 }