Esempio n. 1
0
        /// <summary>
        /// Obtains the capability for sending requests to a port
        /// </summary>
        /// <param name="targetPort">The port for which the capability is desired</param>
        /// <param name="userInfo">The user on whose behalf the capability is desired</param>
        /// <returns></returns>
        protected VCapability GetCapability(VPort targetPort, UserInfo userInfo)
        {
            VCapability capability = platform.GetCapability(this, targetPort, userInfo.Name, userInfo.Password);

            if (capability == null)
            {
                logger.Log("{0} failed to get capability for {1}", this.ToString(), targetPort.ToString());
            }
            else
            {
                logger.Log("{0} got capability for {1}", this.ToString(), targetPort.ToString());
            }

            return(capability);
        }
Esempio n. 2
0
 public ICapability GetCapability(IModule module, IPort targetPort, string username, string password)
 {
     return(CapabilityAdapter.V2C(_view.GetCapability(ModuleAdapter.C2V(module), PortAdapter.C2V(targetPort), username, password)));
 }