internal string GetComponentName(object instance)
{
IComponent comp = instance as IComponent;
if (comp != null)
{
ISite site = comp.Site;
if (site != null)
{
INestedSite nestedSite = site as INestedSite;
if (nestedSite != null)
{
return nestedSite.FullName;
}
else
{
return site.Name;
}
}
}
return null;
}