Esempio n. 1
0
 public VMRequirementLayer( VMICoreElement element, RequirementLayer layer )
 {
     _layer = layer;
     _element = element;
     _type = CoreElementType.Unknown;
     element = ExtractCoreElementType( element );
 }
Esempio n. 2
0
        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;
        }