public HostViewContext() { RootPath = GlobalCommon.HostCommon.RootPath; RunTimeLibPath = GlobalCommon.HostCommon.RootPath + HostJsConstants.COMPILED_ROOT_PATH; CommonLibPath = GlobalCommon.HostCommon.RootPath; var viewdoc = new ViewDocument(_currentjse); _hostobject.Add(viewdoc.Name, viewdoc); var console = new ConsoleObject(); _hostobject.Add(console.Name, console); var document = new JsDocument(_currentjse, RootPath); _hostobject.Add(document.Name, document); var loadtag = new LoadParser(); var reftag = new RefParser(); var copytag = new CopyParser(); var outtag = new OutTag(); var hjstag = new HjsTag(); //按照先后处理标签的顺序进行标签处理 _hosttag.Add(loadtag.TagName, loadtag); _hosttag.Add(reftag.TagName, reftag); _hosttag.Add(copytag.TagName, copytag); //out会变为hjs标签 _hosttag.Add(outtag.TagName, outtag); _hosttag.Add(hjstag.TagName, hjstag); }
public HostLogicContext() { _currentjse = HostJs.NewInstance(); var loadtag = new LoadParser(); var reftag = new RefParser(); var copytag = new CopyParser(); var actiontag = new ActionTag(); //按照先后处理标签的顺序进行标签处理 _hosttag.Add(loadtag.TagName, loadtag); _hosttag.Add(reftag.TagName, reftag); _hosttag.Add(copytag.TagName, copytag); _hosttag.Add(actiontag.TagName, actiontag); RootPath = GlobalCommon.HostCommon.RootPath; CommonLibPath = GlobalCommon.HostCommon.RootPath; RunTimeLibPath = GlobalCommon.HostCommon.RootPath + HostJsConstants.COMPILED_ROOT_PATH; }