private static Project LoadWithPreviousFormat(XmlElement root) { Project project = new Project(); project.loading = true; Assembly assembly = Assembly.Load("NClass.DiagramEditor"); IProjectItem projectItem = (IProjectItem)assembly.CreateInstance( "NClass.DiagramEditor.ClassDiagram.Diagram", false, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, null, null, null, null); try { projectItem.Deserialize(root); } catch (Exception ex) { throw new InvalidDataException(Strings.ErrorCorruptSaveFile, ex); } project.Add(projectItem); project.loading = false; project.isReadOnly = true; return(project); }
private static Project LoadWithPreviousFormat(XmlElement root) { Project project = new Project(); project.loading = true; Assembly assembly = Assembly.Load("NClass.DiagramEditor"); IProjectItem projectItem = (IProjectItem) assembly.CreateInstance( "NClass.DiagramEditor.ClassDiagram.Diagram", false, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, null, null, null, null); try { projectItem.Deserialize(root); } catch (Exception ex) { throw new InvalidDataException(Strings.ErrorCorruptSaveFile, ex); } project.Add(projectItem); project.loading = false; project.isReadOnly = true; return project; }