示例#1
0
        public static void Test()
        {
            //JsEngineSwitcher engineSwitcher = JsEngineSwitcher.Instance;
            //IJsEngine js = null;
            //engineSwitcher.EngineFactories
            //    .AddEFFCChakraCore();

            //engineSwitcher.DefaultEngineName = EFFCChakraCoreJsEngine.EngineName;

            //js = engineSwitcher.CreateDefaultEngine();
            //js.EmbedHostObject("f_p_0", "ych");
            //js.EmbedHostObject("f_p_1", 22);
            //js.Execute($"var js ={{name:f_p_0,age:f_p_1}};");
            //var re = js.GetVariableValue("js");
            //var fec = FrameExposedObject.From(re.GetType());

            //js.Dispose();
            var md5 = ComFunc.getMD5_String(ComFunc.getMD5_String("sa").ToLower() + "8128").ToLower();
            //var serializer = JsonSerializer.Create();
            var json   = "{name:'ych',age:22,schools:[{name:'小学',address:''},{name:'中学',address:''}],birth:{0}}";
            var dobj   = FrameDLRObject.CreateInstanceFromat(json, DateTime.Now);
            var jarray = "[{name:'小学',address:''},{name:'中学',address:''}]";
            var aobj   = FrameDLRObject.CreateArray(jarray);

            Console.WriteLine(dobj.tojsonstring());
        }