protected virtual int SetRoot(ICmObject cmo, out int clidRoot)
{
clidRoot = -1;
var hvoRoot = -1;
// Handle LexEntries that no longer have owners.
if (cmo is ILexEntry)
{
hvoRoot = m_cache.LanguageProject.LexDbOA.Hvo;
clidRoot = m_cache.ServiceLocator.GetInstance<Virtuals>().LexDbEntries;
}
else if (cmo is ICmSemanticDomain)
{
hvoRoot = cmo.OwnerOfClass<ICmPossibilityList>().Hvo;
clidRoot = CmPossibilityListTags.kClassId;
}
else if (cmo.Owner != null)
{
hvoRoot = cmo.Owner.Hvo;
clidRoot = cmo.Owner.ClassID;
}
return hvoRoot;
}