Exemplo n.º 1
0
        /// <summary>
        /// Specialized replay for Runtime ctor
        /// </summary>
        /// <param name="currentInstance"></param>
        private void ReplayHTMLRuntimeCtor(BindingInstance currentInstance)
        {
            _replayParams = new string[currentInstance.Parameters.Length];
            for (int i = 0; i < currentInstance.Parameters.Length; i++)
            {
                if (currentInstance.Parameters[i].Equals("--record"))
                {
                    _replayParams[i] = "--replay";
                }
                else if (currentInstance.Parameters[i].Equals("--record+"))
                {
                    _replayParams[i] = "--replay+";
                }
                else
                {
                    _replayParams[i] = (string)currentInstance.Parameters[i];
                }
            }
            HTMLRuntimeConfiguration htmlconfig = new HTMLRuntimeConfiguration(ReplayParams);

            //Loading the runtime
            _runtime = new mwr.HTMLRuntime(htmlconfig);
            if (_runtime != null)
            {
                _runtime.Configuration.EnableReplay = true;
            }
        }
Exemplo n.º 2
0
        public HTMLRuntime(HTMLRuntimeConfiguration configuration)
            : base(configuration)
        {
            Debug.WriteLine("Creating a new HTMLRuntime Instance in Appdomain {0}", AppDomain.CurrentDomain.FriendlyName);
            //mdr.Diagnose.WriteLineIf(Instance != null, "Instance already has a value");
            //Instance = this;
            //domPrototypes = new mdr.DObject[(int) WrapperType.LastWrapperType];
            TimerQueue = new TimerQueue();
            Debug.WriteLine("method call resolution is {0}", Configuration.EnableMethodCallResolution ? "enabled" : "disabled");
            Debug.WriteLine("light code gen is {0}", Configuration.EnableLightCompiler ? "enabled" : "disabled");

#if ENABLE_RR
            if (configuration.EnableRecord)
            {
                //                RecordReplayManager.Instance = new RecordReplayManager();
                RecordReplayManager.Instance.RecordFilename = configuration.RecordFilename;
                RecordReplayManager.Instance.Parameters     = configuration.RecordParams;
                Debug.WriteLine("Start recording the session: filename {0} params {1}", RecordReplayManager.Instance.RecordFilename, RecordReplayManager.Instance.Parameters);
                RecordReplayManager.Instance.StartRecord();
                RecordReplayManager.Instance.Record("HTMLRuntime", null, "ctor", false, configuration.Arguments);
            }
            else
            if (configuration.EnableReplay)
            {
                _page = new DOM.Page(new IntPtr(0));
            }
#endif
        }
Exemplo n.º 3
0
 public HTMLEngine(HTMLRuntimeConfiguration configuration)
     : base(configuration)
 {
 }
Exemplo n.º 4
0
        public HTMLRuntime(HTMLRuntimeConfiguration configuration)
            : base(configuration)
        {
            Debug.WriteLine("Creating a new HTMLRuntime Instance in Appdomain {0}", AppDomain.CurrentDomain.FriendlyName);
            //mdr.Diagnose.WriteLineIf(Instance != null, "Instance already has a value");
            //Instance = this;
            //domPrototypes = new mdr.DObject[(int) WrapperType.LastWrapperType];
            TimerQueue = new TimerQueue();
            Debug.WriteLine("method call resolution is {0}", Configuration.EnableMethodCallResolution ? "enabled" : "disabled");
            Debug.WriteLine("light code gen is {0}", Configuration.EnableLightCompiler ? "enabled" : "disabled");

#if ENABLE_RR
            if (configuration.EnableRecord)
            {
              //                RecordReplayManager.Instance = new RecordReplayManager();
              RecordReplayManager.Instance.RecordFilename = configuration.RecordFilename;
              RecordReplayManager.Instance.Parameters = configuration.RecordParams;
              Debug.WriteLine("Start recording the session: filename {0} params {1}", RecordReplayManager.Instance.RecordFilename, RecordReplayManager.Instance.Parameters);
              RecordReplayManager.Instance.StartRecord();
              RecordReplayManager.Instance.Record("HTMLRuntime", null, "ctor", false, configuration.Arguments);
            }
            else
              if (configuration.EnableReplay)
              {
                _page = new DOM.Page(new IntPtr(0));
              }

#endif

        }
Exemplo n.º 5
0
 public HTMLEngine(HTMLRuntimeConfiguration configuration)
   : base(configuration)
 { }
Exemplo n.º 6
0
 /// <summary>
 /// Specialized replay for Runtime ctor
 /// </summary>
 /// <param name="currentInstance"></param>
 private void ReplayHTMLRuntimeCtor(BindingInstance currentInstance)
 {
     _replayParams = new string[currentInstance.Parameters.Length];
     for (int i = 0; i < currentInstance.Parameters.Length; i++)
     {
         if (currentInstance.Parameters[i].Equals("--record"))
         {
             _replayParams[i] = "--replay";
         }
         else if (currentInstance.Parameters[i].Equals("--record+"))
         {
             _replayParams[i] = "--replay+";
         }
         else
         {
             _replayParams[i] = (string)currentInstance.Parameters[i];
         }
     }
     HTMLRuntimeConfiguration htmlconfig = new HTMLRuntimeConfiguration(ReplayParams);
     //Loading the runtime
     _runtime = new mwr.HTMLRuntime(htmlconfig);
     if (_runtime != null)
     {
         _runtime.Configuration.EnableReplay = true;
     }
 }