diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-03-11 13:20:27 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-03-11 13:20:27 +0100 |
| commit | 80dc0221c3455a50b8877f19c4a19043af0042f4 (patch) | |
| tree | 0cb88b57c7316b19720904f90ce375f4838f3c97 /src/Interface.cs | |
| parent | 523a04de5252ae089e52eeaf9c8d83a5e0676731 (diff) | |
split ProjectNode classes in separate files
Diffstat (limited to 'src/Interface.cs')
| -rw-r--r-- | src/Interface.cs | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/Interface.cs b/src/Interface.cs index 00a952b0..349243b2 100644 --- a/src/Interface.cs +++ b/src/Interface.cs @@ -410,11 +410,11 @@ namespace Crow /// <param name="path">path of the iml file to load</param> public virtual GraphicObject Load (string path) { - //try { + try { return GetInstantiator (path).CreateInstance (); - //} catch (Exception ex) { - // throw new Exception ("Error loading <" + path + ">:", ex); - //} + } catch (Exception ex) { + throw new Exception ("Error loading <" + path + ">:", ex); + } } /// <summary> /// Fetch instantiator from cache or create it. @@ -435,18 +435,6 @@ namespace Crow Instantiators [path] = new ItemTemplate(this, path); return Instantiators [path] as ItemTemplate; } - //TODO: .Net xml serialisation is no longer used, it has been replaced with instantiators - public void Save<T> (string file, T graphicObject) - { - XmlSerializerNamespaces xn = new XmlSerializerNamespaces (); - xn.Add ("", ""); - XmlSerializer xs = new XmlSerializer (typeof(T)); - - xs = new XmlSerializer (typeof(T)); - using (Stream s = new FileStream (file, FileMode.Create)) { - xs.Serialize (s, graphicObject, xn); - } - } #endregion #region focus |