Пример #1
0
    static InTopic() {
      DEFS_Bool = JSC.JSObject.CreateObject();
      DEFS_Bool["schema"] = "Boolean";

      DEFS_Double = JSC.JSObject.CreateObject();
      DEFS_Double["schema"] = "Double";

      DEFS_String = JSC.JSObject.CreateObject();
      DEFS_String["schema"] = "String";

      DEFS_Date = JSC.JSObject.CreateObject();
      DEFS_Date["schema"] = "Date";
    }
Пример #2
0
 private void ProtoDeep(JSC.JSValue m, JSC.JSObject p)
 {
     if (m.ValueType >= JSC.JSValueType.Object && m.Value != null)
     {
         m.__proto__ = p;
         var          o = m.ToObject();
         JSC.JSObject p_c;
         JSC.JSValue  pv_c;
         foreach (var kv in o)
         {
             if (p != null && p.Value != null && (pv_c = p[kv.Key]).ValueType == JSC.JSValueType.Object)
             {
                 p_c = pv_c.ToObject();
             }
             else
             {
                 p_c = null;
             }
             ProtoDeep(kv.Value, p_c);
         }
     }
 }