private VMICoreElement ExtractCoreElementType( VMICoreElement element )
{
object el;
//If the element is a VMAlias, we'll process only the Data that its wraps, that can either be a service, or a plugin
el = element as VMAlias<VMICoreElement>;
if( el != null )
{
element = (VMICoreElement)( (VMAlias<VMICoreElement>)el ).Data;
}
el = element as VMIPlugin;
if( el != null )
{
_type = CoreElementType.Plugin;
}
else
{
el = element as VMIService;
if( el != null )
{
_type = CoreElementType.Service;
}
}
return element;
}