public IAdaptable CreateAdaptable(XNode node) { IAdaptable a = null; if (node is XElement) { XElement e = (XElement)node; XName nodeName = e.Name; switch (nodeName.ToString()) { case TAG_SHEET: a = new XMindSheet(e, this); break; case TAG_TOPIC: a = new XMindTopic(e, this); break; } } if (a != null) { // Logger.Info($"XMindWorkbook.CreateAdaptable: adaptable is created - {a}"); } else { // Logger.Warn($"XMindWorkbook.CreateAdaptable: adaptable was is not created - {a}"); } return(a); }
public override ISheet CreateSheet() { var sheetElement = new XElement(TAG_SHEET); var sheet = new XMindSheet(sheetElement, this); _adaptableRegistry.RegisterByNode(sheet, sheet.Implementation); return(sheet); }
public IAdaptable?CreateAdaptable(XNode node) { IAdaptable?adaptable = null; if (node is XElement e) { XName nodeName = e.Name; switch (nodeName.ToString()) { case TAG_SHEET: adaptable = new XMindSheet(e, this); break; case TAG_TOPIC: adaptable = new XMindTopic(e, this); break; } } if (adaptable is null) { Logger.Log.Warning($"XMindWorkbook.CreateAdaptable: adaptable was is not created - {adaptable}"); } return(adaptable); }