From 5a03df5faeda15e2d99c4c656eb62ed21817fdf6 Mon Sep 17 00:00:00 2001 From: jpbruyere Date: Tue, 9 Aug 2016 23:59:33 +0200 Subject: move MSIL generator from IML into IMLReader. modifié : src/CompilerServices/CompilerServices.cs rename : src/IMLInstantiatorBuilder.cs => src/IMLReader.cs modifié : src/Interface.cs modifié : Crow.csproj MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Interface.cs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/Interface.cs') diff --git a/src/Interface.cs b/src/Interface.cs index 57291370..f3d8c73b 100644 --- a/src/Interface.cs +++ b/src/Interface.cs @@ -200,7 +200,7 @@ namespace Crow if (!Instantiators.ContainsKey(path)) BuildInstaciator(path); tmp = Instantiators [path].CreateInstance (); - + } catch (Exception ex) { throw new Exception ("Error loading <" + path + ">:", ex); } @@ -220,14 +220,8 @@ namespace Crow #endif try { - using (Stream stream = GetStreamFromPath (path)) { - using (IMLInstantiatorBuilder itr = new IMLInstantiatorBuilder (stream)){ - itr.ReadRootType(); - itr.InitEmitter(); - CompilerServices.BuildInstanciator(itr, itr.RootType); - itr.Read();//close tag - Instantiators[path] = itr.GetInstanciator(); - } + using (IMLReader itr = new IMLReader (path)){ + Instantiators[path] = itr.GetInstanciator(); } } catch (Exception ex) { throw new Exception ("Error loading <" + path + ">:", ex); -- cgit v1.3.1-4-g156e