Example #1
0
        public static SavedTabState FromXml(XElement child)
        {
            var type = (string)child.Attribute("tab-type");

            //TODO: Remove the null check after some time after this commit. Only here so older files can be loaded.
            if (type == null || type == SavedDecompileTabState.TYPE)
            {
                return(SavedDecompileTabState.FromXmlInternal(child));
            }
            if (type == SavedHexTabState.TYPE)
            {
                return(SavedHexTabState.FromXmlInternal(child));
            }
            Debug.Fail(string.Format("Unknown type: {0}", type));
            return(null);
        }