internal static TypeInfo LoadFromV8Xml(string v8Xml)
{
if (string.IsNullOrEmpty(v8Xml) ||
string.Equals(v8Xml, "Null", StringComparison.InvariantCultureIgnoreCase) ||
string.Equals(v8Xml, "p1:Null", StringComparison.InvariantCultureIgnoreCase) ||
string.Equals(v8Xml, "d2p1:Null", StringComparison.InvariantCultureIgnoreCase)
)
{
return null;
}
TypeInfo typeIbfo = new TypeInfo();
typeIbfo.Type = ParseTypeEnumFromV8Xml(v8Xml);
typeIbfo.ReferenceTypeName = null;
if (typeIbfo.Type == TypeEnum.CatalogRef ||
typeIbfo.Type == TypeEnum.DocumentRef ||
typeIbfo.Type == TypeEnum.EnumRef
)
{
int dotPos = v8Xml.IndexOf('.');
if (dotPos >= 0)
{
typeIbfo.ReferenceTypeName = v8Xml.Substring(dotPos + 1);
}
}
return typeIbfo;
}